we see 491 - 1 = 490 = 2 x 5 x 72.
we determine the numbers
x1 = x mod 2
x2 = x mod 5
x3 = x mod 72
Determination of x1 :
x1 = c0 mod 2 where c0 = 0 or 1
Now 192(491-1)/2 = 192245 = 1 mod 491 = 26245c0 mod 491 = 490c0 mod 491.
So c0 = 0. That is x = 0 mod 2.
Determination of x2 :
x2 = c0 mod 5 where c0 = 0,1,2,3 or 4
Now 192(491-1)/5=19298 = 381 mod 491 = 2698c0mod 491 = 101c0 mod 491.
So c0 = 2. That is x = 2 mod 5.
Determination of x3 :
x3 = c0 + c1(7) where c0,c1 = 0,1,2,3,4,5 or 6.
Now 192(491-1)/7 = 19270 = 37 = 223 mod 491 = 2670c0 mod 491 = 4147c0 mod 491 = 223c0 mod 491.
So c0 = 1.
Now 261+7c1 = 192 mod 491
=> 2610+70c1 = 19210 mod 491 = 3 mod 491
=> 414 x 223c1 = 3 mod 491
=> 223c1 = 3(414)-1 mod 491 = 3 x 51 = 153 mod 491
So c1 = 5 . That is x = 1 + 5x7 = 36 mod 49.
now,
x = 0 mod 2
x = 2 mod 5
x = 36 mod 49
M1 = 490/2 = 245 . 245 -1 = 1 mod 2.
M2 = 490/5 = 98 . 98 -1 = 2 mod 5
M3 = 490/49 = 10 . 10 -1 = 5 mod 49.
so by Chinese remainder theorem,
x = 0x245x1 + 2x98x2 + 36x10x5 mod 491
= 228 mod 491.
Hence x = 228.
4 [20 points] Given that 491 is a prime and 26 is primitive modulo 491, use the Pohlig- Hellman a...
Implement a method that uses insertion sort to sort numbers. Use the numbers provided in files (100.txt, 1000.txt, 5000.txt, 50000.txt, 100000.txt and 500000.txt) as input. Measure the time taken to sort these numbers (do not include the file IO time). Plot the time taken to sort the numbers [Programming, 35 points] .Files to submit. A report that briefly talks about your solution to each of the problem (the explanation should not exceed more than half pages each). Seperate file for...