0% found this document useful (0 votes)
375 views5 pages

Number Theory - Linear Diophantine Equation - CICS COMPUTER SCIENCE 1

This document contains practice exercises on solving linear Diophantine equations. It begins by asking the reader to determine whether given equations can be solved or not by finding the greatest common divisor. It then asks the reader to find the general solution to some equations. Finally, it asks the reader to find all positive integer solutions to equations. Key steps include using the division algorithm to find the gcd, and using the gcd and linear combinations to write the general solution in terms of parameters.

Uploaded by

Jiaqi Xu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
375 views5 pages

Number Theory - Linear Diophantine Equation - CICS COMPUTER SCIENCE 1

This document contains practice exercises on solving linear Diophantine equations. It begins by asking the reader to determine whether given equations can be solved or not by finding the greatest common divisor. It then asks the reader to find the general solution to some equations. Finally, it asks the reader to find all positive integer solutions to equations. Key steps include using the division algorithm to find the gcd, and using the gcd and linear combinations to write the general solution in terms of parameters.

Uploaded by

Jiaqi Xu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Name: ___________________________________ Daete: ____________

Section: __________________________________ Score: ____________

Practice Exercises
Linear Diophantine Equation

A. Tell whether the following Diophantine Equation can be solved or not. Encircle S if
it is solvable and NS if the given equation cannot be solved.

a) 9x + 62y = 99 S NS

Solution:

Find d = gcd(9, 62)

By division algorithm;

62 = (9)(6) + 8
9 = (8)(1) + 1
8 = (1)(8) + 0

Hence the gcd(9, 62) = 1. Since 1|99 there is a solution.

b) 66x + 28y = 230 S NS

Solution:

Find the gcd(66, 28)

Again, by division algorithm;

66 = (28)(2) + 10
28 = (10)(2) + 8
10 = (8)(1) + 2
8 = (2)(4) + 0

Hence the gcd(66, 28) = 2. Since 2|230, there is a solution.

c) 28x + 70y = 186 S NS

Solution:

Let us find again the gcd(28, 70) using division algorithm.

70 = (28)(2) + 14

Number Theory | Linear Diophantine Equation | CICS COMPUTER SCIENCE 1|Page


28 = (14)(2) + 0

The question is, “Is 186 exactly divisible by 14?”. The answer is NO. Since 14 does not
divides 186, there is no solution.

d) 32x + 68y = 124 S NS

Solution:

Let us take a look if the next equation has a solution by finding first the gcd(32, 68) using
again the division algorithm,

68 = (32)(2) + 4
32 = (4)(8) + 0.

Now, let us examine if 4 divides 124. What can you say? Yes, 4 divides 124 or 124 is exactly
divisible by 4. So, the equation has a solution.

e) 16x + 18y = 45 S NS

Lastly, let us look if our next equation has a solution or do not have a solution. What are we
going to do? Correct! First, we need to determine the gcd(16, 18) using again the division
algorithm.

18 = (16)(1) + 2
16 = (2)(8) + 0.

What do you think? Is there a solution or not? Is 45 exactly divisible by 2? The answer is NO.
Hence, there is no solution.

Number Theory | Linear Diophantine Equation | CICS COMPUTER SCIENCE 2|Page


B. Directions: Determine all solutions of the following Diophantine equations. Show
your complete solution on the space provided after each item. (5-mark each item)

a) 24x + 138 y = 18 ; ax + by = c

First, we need to determine if the equation has a solution or not. Since we are looking for its
general solution, the Diophantine equation should have first a solution. We need to look for the
greatest common divisor of 24 and 138 first.

138 = (24)(5) + 18
24 = (18)(1) + 6
18 = (6)(3) + 0.

The gcd(24, 138) = 6. So, the value of d = 6.

Now, since 6 | 18, there is a solution. Since, there is a solution, we could look for the possible
complete solution for this. Next is we are going to write gcd(24, 138) as a linear combination of
a and b by reversing the steps in Euclidean algorithm.

6 = (24)(1) – (18)(1)
6 = (24)(1) – [(138) – (24)(5)](1)
6 = (24)(1) – (138)(1) + (24)(5)
6 = (24)(6) – (138)(1)
(6)(3) = (24)(18) + (138)(-3)

So, the xo = 18 and yo = -3. Hence the complete solution would be;

x = xo + (b/d)t = 18 + (138/6)t = 18 + 23t

and

y = yo - (a/d)t = -3 - (24/6)t = -3 - 4t

b) 221 x + 35y = 11

Solution:

Just like what we did in (a), we could find its complete solution if and only if there is a solution.

Number Theory | Linear Diophantine Equation | CICS COMPUTER SCIENCE 3|Page


Here, we let that a = 221 and b = 35. Finding its gcd(221, 35) we get;

221 = (35)(6) + 11
35 = (11)(3) + 2
11 = (2)(5) + 1
2 = (1)(2) + 0.

Now by linear combination;

1 = (11)(1) – (2)(5)
1 = (11)(1) – [(35) – (11)(3)](5)
1 = (11)(1) – (35)(5) + (11)(15)
1 = (11)(16) – (35)(5)
1 = [(221) – (35)(6)](16) – (35)(5)
1 = (221)(16) – (35)(96) – (35)(5)
1 = (221)(16) – (35)(101)
1 = (221)(16) + (35)(-101)
(1)(11) = (221)(176) + (35)(-1111)

So, the xo = 176 and yo = -1111. Hence the complete solution would be;

x = xo + (b/d)t = 176 + (35/1)t = 176 + 35t

and

y = yo - (a/d)t = -1111 - (221/1)t = -1111 - 221t

C. Directions: Determine all solutions in the positive integers of the following


Diophantine equations: Show the complete solution after each item. (5-mark each
item)

a) 54x + 21y = 906

54 = (21)(2) + 12
21 = (12)(1) + 9
12 = (9)(1) + 3
9 = (3)(3) + 0

Now, the gcd(54, 12) = 3 which divides 906. The equation 54x + 21y = 906 has
infinitely many solutions. Then find the general solutions by using linear
combination;

3 = 12 – (9)(1)
3 = 12 – [21 – (12)(1)](1)
3 = 12 – (21)(1) + (12)(1)

Number Theory | Linear Diophantine Equation | CICS COMPUTER SCIENCE 4|Page


3 = (12)(2) – (21)(1)
3 = [54 – (21)(2)](2) – (21)(1)
3 = (54)(2) – (21)(4) – (21)(1)
3 = (54)(2) – (21)(5)
3 = (54)(2) + (21)(-5)
(3)(302) = (54)(604) + (21)(-1510)

Thus, xo = 604 and yo = -1510. Hence the general solution would be

x = xo + (b/d)t = 604 + (21/3)t = 604 + 7t

and

y = yo - (a/d)t = -1510 - (54/3)t = -1510 - 18t;

let x > 0 and y > 0. It follows that 604 + 7t > 0. Solving for t > -86.29. Similarly in -1510 – 18t
> 0 and solving for t < - 83.89. It shows that; -86.29 < t < -83.89. Since t is an integer then we
could say that t = -86, -85 and – 84.

When t = -86, our x = 2 and y = 38


When t = -85, our x = 9 and y = 20
When t = -84, our x = 16 and y =2.

Therefore; x = 2; 9; and 16 and y = 38; 20 and 2 are the only positive solutions in the positive
integers.

Number Theory | Linear Diophantine Equation | CICS COMPUTER SCIENCE 5|Page

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy