like how van B=a(p-1)+b and hows b=B/p-1
I have a few doubts in here
also why didnt we directly did B%p like we did with A
@chemant077 Suppose have a number x and y now let me write some statements.
x/y=k (quotient)
x%y=r (remainder)
Now you can easily see that (basic maths)
x= ky + r
x= ky + x%y
Now in the given question .
B= a*(p-1) + b
If we compare the above equation with the one I derived you can easily understand how we get B (here (p-1) is divisor)
so
B%(p-1)=b (rem)
B/(p-1)=a (quotient)
We choose to factor B in terms of p-1 instead of p, so as to utilize the property . (x^(m-1))%m=1 (m is prime)
If this resolves your doubt mark it as resolved.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.