Skip to content

UGC NET CS 2019Data Structures and Algorithms › Selected TopicsVerified

UGC NET CS 2019 PYQ: Let $a^{2c} \text{ mod } n = (a^c)^2 \text{ mod } n$ and $a^{2c+1}\text{ mod } n= a \cdot (a^c)^2\text{ mod…

Let $a^{2c} \text{ mod } n = (a^c)^2 \text{ mod } n$ and $a^{2c+1}\text{ mod } n= a \cdot (a^c)^2\text{ mod }n$. For $a=7$, $b=17$ and $n=561$, What is the value of $a^b( \text{mod } n)$?

  1. A
    160
    Correct answer
  2. B
    166
  3. C
    157
  4. D
    67

Answer

(A) 160

Approach

Use the given square-and-multiply identities with $c=8$ to compute $7^{17}\bmod 561$ as $7\cdot(7^8)^2\bmod 561$, reducing intermediate squares modulo 561.

Reviewed by UGC IQ Editorial Team.