CEMC Banner

Grade 9/10 Math Circles
Linear Diophantine Equations Part 2 - Problem Set

  1. This problem will step you through determining all non-negative solutions to the linear Diophantine equation 12x+57y=423.

    1. Use the Euclidean Algorithm to calculate gcd(12,57).

    2. Using part (a), determine a solution to 12x+57y=3.

    3. Using part (b), determine a solution to 12x+57y=423.

    4. Using part (c), determine all solutions to 12x+57y=423.

    5. Using your answer in part (d), determine all solutions to 12x+57y=423 with x0 and y0. That is, determine all non-negative solutions to the linear Diophantine equation 12x+57y=423.

    1. Using the Euclidean algorithm, we find 57=124+912=91+39=33+0 Thus, gcd(12,57)=3.

    2. To find a solution, we will work backwards through the steps in the Euclidean algorithm in our solution to part (a). 3=1219from (2)=121(57412)from (1)=512157 Thus, 12(5)+57(1)=3 Thus, one solution to the linear Diophantine equation 12x+57y=3 is x=5, y=1.

    3. In part (b), we found that one solution to the linear Diophantine equation 12x+57y=3 is x=5, y=1.

      Multiplying both sides of the equation by 141 gives, 141(12(5)+57(1))=141(3)12(1415)+57(141(1))=42312(705)+57(141)=423 Thus, one solution to the linear Diophantine equation 12x+57y=423 is x=705, y=141.

    4. In part (c), we found that one solution to the linear Diophantine equation 12x+57y=423 is x=705, y=141.

      To determine the complete solution, we calculate: x=705+n(bd),y=141n(ad) Substituting a=12, b=57, and d=3: x=705+n(573),y=141n(123) This simplifies to x=705+19n, y=1414n.

      Thus, the complete solution to the linear Diophantine equation 12x+57y=423 is x=705+19n,  y=1414n, where n is any integer.

    5. In part (d), we found that the complete solution to the linear Diophantine equation 12x+57y=423 is x=705+19n,  y=1414n, where n is any integer.

      Now, we also require x0 and y0. Which values of n will satisfy these conditions?

      x0705+19n019n705n37.105... So n is an integer and n37.105, which tells us that n37.

      Similarly, y01414n04n141n35.25 So n is an integer and n35.25, which tells us that n36.

      Thus, in order for x0 and y0, we must have n37 and also have n36. Thus, there are 2 possible values for n: 36, 37.

      Using x=705+19n and y=1414n, we find there are two solutions to this problem. They are:

      • x=21, y=3 (when n=36)

      • x=2, y=7 (when n=37)

  2. Explain why there is no solution to the linear Diophantine equation from Exercise 2, 4182x+3689y=102 with x0 and y0.

    In Exercise 2, we found that the complete solution to the linear Diophantine equation 4182x+3689y=102 is x=90+217ny=102246n, where n is any integer.

    Now, we also require x0 and y0. Which values of n will satisfy these conditions?

    x090+217n0217n90n0.4147... So n is an integer and n0.4147, which tells us that n0.

    Similarly, y0102246n0246n102n0.4146... So n is an integer and n0.4146, which tells us that n1.

    Thus, in order for x0 and y0, we must have n0 and also have n1. There are no values of n that satisfy both of these inequalities simultaneously. Therefore, there is no solution to the linear Diophantine equation 4182x+3689y=102 with x0 and y0.

  3. Determine all possible ways that 1000 can be expressed as the sum of two positive integers, one which is divisible by 11 and the other by 17.

    In Problem Set #3 for Part 1 we were asked to find one way to express 1000 as the sum of two integers, one which is divisible by 11 and the other by 17.

    In the solution, we saw that this problem is equivalent to asking if there is a solution to the linear Diophantine equation 11x+17y=1000, and we saw that one solution is x=3000 and y=2000. (So the two numbers are 33000, which is divisible by 11, and 34000, which is divisible by 17.)

    We are now looking to find a solutions where both x and y are positive.

    First, we can determine the complete solution by calculating: x=3000+n(bd),y=2000n(ad) Substituting a=11, b=17, and d=1: x=3000+17n,y=200011n

    Thus, the complete solution to the linear Diophantine equation 11x+17y=1000 is x=3000+17n, y=200011n, where n is any integer.

    Now, we also require x>0 and y>0. Which values of n will satisfy these conditions? x>03000+17n>017n>3000n>176.47... So n is an integer and n>176.47, which tells us that n177.

    Similarly, y>0200011n>011n>2000n<181.818... So n is an integer and n<181.818, which tells us that n181.

    Thus, when both n177 and n181, we will have x0 and y0.

    Thus, there are 5 possible values for n: 177, 178, 179, 180, 181.

    Using x=3000+17n and y=200011n, we find the five solutions to this problem where the two numbers are non-negative. They are:

    • n=177: x=9, y=53, so the two numbers that sum to 1000 are 99 and 901.

    • n=178: x=26, y=42, so the two numbers that sum to 1000 are 286 and 714.

    • n=179: x=43, y=31, so the two numbers that sum to 1000 are 473 and 527.

    • n=180: x=60, y=20, so the two numbers that sum to 1000 are 660 and 340.

    • n=181: x=77, y=9, so the two numbers that sum to 1000 are 847 and 153.

  4. At a museum, an adult ticket costs $34 and a student ticket costs $28. A group visiting the museum spends exactly $844 on tickets. Determine all possible combinations for the number of adult and student tickets they could have purchased.

    Let a be the number of adult tickets and s be the number of student tickets purchased.

    Since an adult ticket costs $34 and a student ticket costs $28 and a total of $844 was spent on tickets, we are interested in solving the linear Diophantine equation

    34a+28s=844

    We first use the Euclidean Algorithm to calculate gcd(34,28): \setcounterequation034=281+628=64+46=41+24=22+0 So gcd(34,28)=2. Since 844 is divisible by 2, there is a solution to this linear Diophantine equation.

    We find a solution to 34a+28s=2 by working backwards through our steps from the Euclidean Algorithm: 2=614from (3)=61(2846)from (2)=56128=5(34128)128from (1)=5(34)6(28) Therefore, 34(5)+28(6)=2.

    Multiplying both sides by 422: 422[34(5)+28(6)]=422(2)34(422(5))+28(422(6))=84434(2110)+28(2532)=844

    So a solution is a=2110 and s=2532. Thus, the complete solution is:
    a=2110+n(282)=2110+14n and s=2532n(342)=253217n

    Since a and s represent the number of tickets sold, we need a0 and s0.

    a0 means that 2110+14n0, thus 14n2110 and n150.71... 

    Since n is an integer, we need n150.

    s0 means that 253217n0, thus 17n2532 and n148.94...
    Since n is an integer, we need n149.

    Thus, given the context of the problem, it must be the case that 150n149.

    When n=150, we obtain a=2110+14n=2110+14(150)=10 and s=253217n=253217(150)=18.

    When n=149, we obtain a=2110+14n=2110+14(149)=24 and s=253217n=253217(149)=1.

    Therefore, there are two possibilities for the tickets purchased. There could have been 10 adult tickets and 18 student tickets purchased, or 24 adult tickets and 1 student ticket purchased.

  5. Find the smallest positive integer x so that 157x leaves remainder 10 when divided by 24.

    We need to first solve 157x=24y+10 for integers x and y.
    In other words, we need to solve the linear Diophantine equation 157x24y=10.
    We first use the Euclidean Algorithm, to calculate gcd(157,24): 157=246+1324=131+1113=111+211=25+12=12+0 Working backwards through these steps, we obtain: 1=1152from (4)=115(13111)from (3)=611513=6(24113)513from (2)=6241113=62411(157624)from (1)=722411157 Therefore, 157(11)24(72)=1.

    Multiplying both sides of this equation by 10: 10[157(11)24(72)]=10(1)157(10(11))24(10(72))=10157(110)24(720)=10

    Therefore, one solution to 157x24y=10 is x=110,  y=720.

    Thus, the complete solution is
    x=110+(241)n=11024n and y=720(1571)n=720157n

    We are asked for the smallest positive value of x. In order to have x0, we would need x=11024n0. This implies that 24n110, or n4.583....

    Since n is an integer, this implies that we must have n5.

    So the smallest possible value for x is when n=5, and we have x=11024(5)=10.

    Indeed, we can check. When x=10, then 157x=1570, which has remainder 10 when divided by 24.

  6. Determine the number of ways you can make exactly $200 using exactly 1000 coins if each coin is a quarter, a dime, or a nickel.

    Let q represent the number of quarters, d represent the number of dimes and n represent the number of nickels.

    From the information given in the problem, we have q+d+n=100025q+10d+5n=20000 Dividing equation (2) by 5, we obtain 5q+2d+n=4000 Subtracting equation (1) from equation (3), we obtain: 4q+d=3000.

    Thus, we need to solve the linear Diophantine equation 4q+d=3000.

    By inspection, one solution to 4q+d=3000 is q=0, d=3000.

    Therefore, the complete solution is
    q=0+(11)k=k and d=3000(41)k=30004k, where k is any integer.

    Since q+d+n=1000, we have n=1000qd=1000k(30004k)=3k2000.

    Since q,d and n represent coins, we also have the constraints q0, d0, and n0.

    Since q0 and q=k, we have k0.

    Since d0 and d=30004k, we have 30004k0. Solving, we find that 4k3000, and thus k750.

    Since n0 and n=3k2000, we have 3k20000. Solving, we find that 3k2000, and thus k666.6¯. Since k must be an integer, we need k667.

    Thus, 667k750.

    Therefore, there are 750667+1=84 ways to make exactly $200 using exactly 1000 coins if each is a quarter, dime, or a nickel.

  7. Let a, b, and c be positive integers and consider the linear Diophantine equation ax+by=c. Show that the number of non-negative integer solutions to this equation cannot exceed ca or cb.

    Solutions to the linear Diophantine equation ax+by=c correspond to points on the line y=abx+cb.

    This line has slope ab and y-intercept cb.

    We can find the x-intercept of this line by setting y=0 and solving for x: 0=abx+cbabx=cbx=cbab=ca

    Therefore, this line has x-intercept ca.

    The graph of this line looks something like this:

    image

    Notice that the non-negative solutions to the linear Diophantine equation ax+by=c are exactly the integer points that lie on the line segment from (0,cb) to (ca,0). How many of these points can there be?

    Since 0xca, there are at most ca such points.

    Likewise, since 0ycb, there are at most cb such points.

    Therefore, the number of integer solutions to the linear Diophantine equation ax+by=c with x0 and y0 cannot exceed ca or cb