How to Solve for Y in the Equation X = Y%Z?

  • Level: High School 
  • Thread starter Thread starter Superposed_Cat
  • Start date Start date
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
4 replies · 2K views
Superposed_Cat
Messages
388
Reaction score
5
Hey all, if x=y%z How do i solve for y?
 
Mathematics news on Phys.org
Superposed_Cat said:
Hey all, if x=y%z How do i solve for y?
Take an example:

[tex]3=12\%9[/tex]

So in this case we have that x=3, z=9, and y=12. But also,

[tex]3=3\%9[/tex]
[tex]3=21\%9[/tex]
[tex]3=-6\%9[/tex]
[tex]3=(100*9+3)\%9[/tex]

Are you seeing the pattern? Can you develop a simple formula that gives us every possible y value that satisfies this equation?
 
Why greater than 0? -6= 3%9 because -6= 3+ (-1)9.

(I would say "-6= 3 (mod 9). "%" is computer code.)
 
HallsofIvy said:
Why greater than 0? -6= 3%9 because -6= 3+ (-1)9.
Yes, ## y = nz+x## ##∀x,y,z,n ∈ ℤ ## is more inclusive.