Results 1 to 7 of 7

Math Help - Modular Arithmetic - Simultaneous Equation

  1. #1
    Newbie
    Joined
    Apr 2005
    Posts
    3

    Modular Arithmetic - Simultaneous Equation

    Hi,

    I am having some problems trying to solve this:

    k+a mod n = x
    k+b mod n = y

    where n, a, b, x and y is known integers and n is prime number
    Is there a way to find k?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Apr 2005
    Posts
    20
    k+a mod n = x
    k+b mod n = y

    Can be written as:

    x - (k+a) is evenly divisible by n
    y - (k+b) is evenly divisible by n

    Do you agree? now we try to solve for k?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Apr 2005
    Posts
    3

    Re:

    Yes, how to solve for k?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Site Founder MathGuru's Avatar
    Joined
    Mar 2005
    From
    San Diego
    Posts
    478
    Awards
    1

    How about this?

    How about dividing (x-a) by n and finding the remainder
    and also dividing (y-a) by n and finding the remainder

    Both should give you the value of k
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Site Founder Math Help's Avatar
    Joined
    Apr 2005
    Posts
    171
    unless k>n

    think about it . . . if k was 9 and n was 5 then your method would give k=4

    essentially you would know that k=remainder + p*n and p could equal 0,1,2,3 etc.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Apr 2005
    Posts
    3

    Re:

    hmm...
    So,

    (k+a) mod n = x
    (k+b) mod n = y

    k+a = x + np
    k+b = y + nq

    where p and q could be 0,1,2,3...

    is there any way to find k without having to substituting in the p and q values to see if they match?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Apr 2005
    Posts
    20
    I think you have 2 equations and 3 unknowns. p, q, and k are unknown.
    Maybe someone has a slick way to do it though.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Modular arithmetic
    Posted in the Number Theory Forum
    Replies: 9
    Last Post: May 6th 2011, 02:14 AM
  2. Modular Arithmetic
    Posted in the Number Theory Forum
    Replies: 3
    Last Post: March 24th 2011, 10:43 PM
  3. Set of 4 simultaneous equations using modular
    Posted in the Pre-Calculus Forum
    Replies: 9
    Last Post: March 18th 2011, 06:53 AM
  4. Modular arithmetic
    Posted in the Math Topics Forum
    Replies: 1
    Last Post: February 28th 2010, 10:45 AM

Search Tags


/mathhelpforum @mathhelpforum