No history yet

Final Exam

 

1.The congruence relation ab(modn)a \equiv b \pmod{n} is an equivalence relation because it satisfies three properties. Which are they?

 

2.In C++, the % operator can produce negative results for negative inputs (e.g., -17 % 5 yields -2). What is the standard C++ expression to compute the mathematical modulus of a with respect to m, ensuring the result is always in the range [0, m-1]?

 

3.To prevent integer overflow when calculating (a×b)(modm)(a \times b) \pmod{m}, where a, b, and m can be up to 109+710^9 + 7, what is the safest C++ approach?

 

4.Under which condition does the modular multiplicative inverse of an integer a modulo m exist?

 

5.What is the primary algorithm used to find the modular multiplicative inverse of a modulo m when m is not necessarily prime?

 

6.The calculation of (a/b)(modm)(a / b) \pmod{m} is equivalent to...

 

7.What is the time complexity of computing (ab)(modm)(a^b) \pmod{m} using the binary exponentiation (also known as exponentiation by squaring) algorithm?

 

8.Fermat's Little Theorem provides a shortcut for finding the modular inverse. It states that if p is a prime number, then for any integer a not divisible by p, we have ap11(modp)a^{p-1} \equiv 1 \pmod{p}. How can this be used to find the inverse of a modulo p?

 

9.Euler's Totient Theorem is a generalization of Fermat's Little Theorem. It can be used to find modular inverses when the modulus is composite. True or false?

 

10.What type of problem is the Chinese Remainder Theorem (CRT) used to solve?

 

11.A key requirement for the standard version of the Chinese Remainder Theorem to guarantee a unique solution modulo the product of the moduli is that...

 

12.You need to find the solution to the system of congruences: x2(mod3)x \equiv 2 \pmod{3} and x3(mod5)x \equiv 3 \pmod{5}. What is a possible value for x?

All done? Get your grade