If given a 'n' value and m = floor ( squareroot(n) ) then is there any way to find the value of 'y' , such that ((m*y) mod n) is congruent to (n-1)
so , i took other examples like , 15,20,35,42,.. and i observed that , if m is one of the divisors of n, then we wont get the solution. So , what about the values for which , m is not a divisor of n?
Still doesn't work. Consider n=38, for example. However, if m and n are have no common prime factors, then you can always do it by first finding the modular inverse of m and then multiplying it by n-1.
Thanks . This may be useful. I have to know what the modular inverse is. and how exactly could i compute y.
As is often the case, Wikipedia comes to the rescue: http://en.wikipedia.org/wiki/Modular_multiplicative_inverse#Computation I recommend using the extended Euclidean algorithm as the easier method for application and understanding. What you want to do is find a number \(x\) such that \(mx\equiv 1\quad\left(\mathrm{mod}\ n\right)\), then you just take \(y=x\left(n-1\right)\) (or preferably its smallest modular equivalent). Again, this is only guaranteed to work if m and n have no common prime factors (also known as "relatively prime"). This kind of methodology is generally one of the first things you learn in modular arithmetic, try checking out an introductory abstract algebra or number theory text for more details.
A modular inverse is found from the multiplication table. Any two numbers whose product is congruent to 1 (mod n) are inverses in Z[sub]n[/sub]. For instance, 2 and 3 are inverses mod 5, 2x3 = 1 -> 2 = 3[sup]-1[/sup] (working in Z[sub]5[/sub]).
If I am not mistaken, if you want to know the segmented inverse of angles in the Euclidean algorithm, then you need to take the angle of the outverse and reverse it by three hundred and sixty degree totals into segments, as you know what the outversed angles are - you can see them. You can calcualte the inverse by taking the 360 degrees and finding the pressure threshold of your materials, and then calculating the [pressure] minus the [pressure threshold] and hoping it is negative. Then you calculate the amount of pressure put onto it by taking the [stress resistance levels] of the material and then subtracting that of the stress put onto it. Then you divide the value by the inverse of ninety degrees it stands at. If it comes back a negative number then it will not hold, and needs to be adjusted.
Is there something wrong with making sure that (m mod n) is congruent to (n-1) first? Then y = (n-1)/m...unless I'm caffeine deficient