at time 6:54 you mentioned that we can write x = (p’-yd’)/w’ but can you please tell me why this equation will always give me integral value of x .
why (p’-yd’)%w’ == 0
can you please give me a prove of it
Why solution of x is integral
We have removed all the other cases. Like the solution won’t be integral if the inverse didn’t exist but we checked that inverse existed. Now after that it’s certain that solution is integral if it exists.
Check this article ,it does the same thing.
This is just how mod-inverse works. If mod inverse exists then b is integral in that equation.