# Doubt in modules

62 views

where Theta(n) = 216

can someone please tell me how 31 is calculated

Please some one help me in this

reopened
0
Please someone help me on this

1 vote

x = $7^{-1}\ mod\ 216$

=> $(7 * x)\ mod\ 216 = 1$

We use the extended euclidean algorithm to compute x

$216 = 7 * 30 + 6\ (1)$

$7 = 6 * 1 + 1\ (2)$

In equation (2), we get 1 as remainder implying GCD (7,216) = 1 , therefore there exists a multiplicative inverse of 7 modulo 216

From equation (2)

$1 = 7 - 6 \ (3)$

From equation (1)

$6 = 216 - 7 * 30\ (4)$

Substituting 6 of equation (4) in equation (3)

$1 = 7 - (216 - 7 * 30)$

$=> 1 = 7 * 31 - 216$

Taking mod 216 on both sides

1 =  (7*31) mod 216 - 216 mod 216

=> 1 = (7*31) mod 216

Thus x = 31

selected
0
really thank you for answer

but looking at answer , i think we need to make it shorter for exam time.

may be at third step it self we come to know about 30 . So we can try nearby number may be 29 or 31

will it be correct approach please reply.

## Related questions

Carl Hamachar : Time to access information in the cache = $1$ cycle Main memory is constructed as $4$ interleaved modules Cache block size of $8$ words. In a cache miss, the first word of a block can be accessed from main memory in $7$ cycles and subsequent words take ... = 0.95 $A$. What is the average memory access time for data? $B$. What is the average memory access time for instruction?