0% found this document useful (0 votes)
9 views

Problem_Set_8

Uploaded by

louxiaoxiao42
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Problem_Set_8

Uploaded by

louxiaoxiao42
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

MATH-UA 120 Discrete Mathematics:

Problem Set 8
Paddington Bear
Due Monday, December 2nd, 2024

Assignment Instructions
• These are to be written up in LATEX and turned in on Gradescope.
• Click here to duplicate this .tex file in Overleaf .
• Write your solutions inside the solution environment.
• You are always encouraged to talk problems through with your peers and your instructor, but your
write up should be done independently.

• Problems are graded on correctness and fluency.


• Unless stated otherwise, all calculations require justification.
• Some tutorials on how to use LATEX can be found here. If you have any questions about LATEX
commands you can always ask your instructor for advice.

Statement on generative AI
In this and other mathematics courses, you are expected to construct clear and concise mathematical argu-
ments based on statements proven in our text and class notes. Large language models such as ChatGPT
are unable to produce this kind of solution. They also frequently generate circular logic and outright false
results.
You may use AI to summarise content, generate study plans, create problems, or do other study-related
activities. You may not ask a chatbot to solve your quiz or homework problems, or do any assessment-related
activities.
You may use AI tools to edit your grammar and punctuation, but remember that mathematical English
is not the same as academic English in other disciplines.

1
Problem 1
a) Find d = gcd (29341, 1739) and integers x and y such that 29341x + 1739y = d.
b) Prove that 7 cannot be expressed as an integral linear combination of 29341 and 1739.

(a) We compute d = gcd(29341, 1739) using the Euclidean Algorithm.

29341 = 1739 · 16 + 1517

1739 = 1517 · 1 + 222

1517 = 222 · 6 + 185

222 = 185 · 1 + 37

185 = 37 · 5 + 0
At this point, the remainder is 0, so the gcd is:

d = gcd(29341, 1739) = 37

In order to find x, y.
From the last nonzero remainder:
37 = 222 − 185 · 1
2. Substitute 185 = 1517 − 222 · 6 into the equation:

37 = 222 − (1517 − 222 · 6) · 1 = 222 − 1517 + 222 · 6 = 222 · 7 − 1517

3. Substitute 222 = 1739 − 1517 · 1 into the equation:

37 = (1739 − 1517 · 1) · 7 − 1517 = 1739 · 7 − 1517 · 7 − 1517 = 1739 · 7 − 1517 · 8

4. Substitute 1517 = 29341 − 1739 · 16 into the equation:

37 = 1739 · 7 − (29341 − 1739 · 16) · 8


= 1739 · 7 − 29341 · 8 + 1739 · 16 · 8
= 1739 · (7 + 128) − 29341 · 8
= 1739 · 135 − 29341 · 8

Thus, the integers x and y are:


x = −8, y = 135
(b) Beacuse of Thm 36.6,The smallest positive integer of the form 29341x+1739y, is gcd(29341,1739),thus
7 cannot be expressed as an integral linear combination of 29341 and 1739.

2
Problem 2
a) Let a, b, c ∈ Z such that a and b are relatively prime. Prove that if a | c and b | c then (ab) | c.
b) Explain why part a) is false if a and b are not relatively prime.

(a) If a | c and b | c, then there exist integers x, y such that c = xa and c = by. This implies xa = by.
Thus, b | xa. However, since a and b are relatively prime, b | x. Therefore, there exists an integer z such
that x = zb. Substituting, we get c = xa = zba, which shows that (ab) | c.
(b) If a and b are not relatively prime, gcd(a, b) = d > 1, then ab cannot simply divide c even if both
a | c and b | c. This is because the common factor d in a and b may ”double count” in ab, and c might not
contain this higher multiplicity of d.
Let a = 6, b = 9, and c = 18. Here:
a | c because 18 ÷ 6 = 3, so c = 6 · 3.
b | c because 18 ÷ 9 = 2, so c = 9 · 2.
However, ab = 6 · 9 = 54, and 54 ∤ 18.

3
Problem 3
Prove that gcd (a, gcd (b, c)) = gcd (gcd (a, b) , c) for all a, b, c ∈ Z.

Firstly: We prove gcd(a, gcd(b, c)) | gcd(gcd(a, b), c)


Let d1 = gcd(a, gcd(b, c)). By definition of gcd: 1. d1 | a, 2. d1 | gcd(b, c). Since d1 | gcd(b, c), d1 also
divides both b and c.
Thus, d1 divides a, b, and c. In particular, d1 divides both a and b, so d1 | gcd(a, b). Since d1 | gcd(a, b)
and d1 | c, we have:
d1 | gcd(gcd(a, b), c).
Therefore:
gcd(a, gcd(b, c)) | gcd(gcd(a, b), c).
Secondly: We prove gcd(gcd(a, b), c) | gcd(a, gcd(b, c))
Let d2 = gcd(gcd(a, b), c). By definition of gcd: 1. d2 | gcd(a, b), so d2 divides both a and b, 2. d2 | c.
Thus, d2 divides a, b, and c. In particular, d2 divides both b and c, so d2 | gcd(b, c). Since d2 | a and
d2 | gcd(b, c), we have:
d2 | gcd(a, gcd(b, c)).
Therefore:
gcd(gcd(a, b), c) | gcd(a, gcd(b, c)).
Combining the results:

gcd(a, gcd(b, c)) | gcd(gcd(a, b), c) and gcd(gcd(a, b), c) | gcd(a, gcd(b, c)).

By the properties of divisibility, we conclude:

gcd(a, gcd(b, c)) = gcd(gcd(a, b), c).

4
Problem 4
Consider the following definition.
Definition. For any subset A ⊆ Z, we say d divides A provided that for any a ∈ A, d | a. We denote this
by d | A.
Prove that d | ({a} ∪ {b} ∪ C) if and only if d | ({gcd (a, b)} ∪ C) for all a, b, d ∈ Z and C ⊆ Z.

We first prove (d | {a} ∪ {b} ∪ C =⇒ d | {gcd(a, b)} ∪ C)**


Assume d | {a} ∪ {b} ∪ C. By the definition of d | A, this means:

d | a, d | b, and d | c, ∀c ∈ C.

If d | a and d | b, then d | gcd(a, b). Hence:

d | gcd(a, b).

Moreover, since d | c for all c ∈ C, we can deduce:

d | {gcd(a, b)} ∪ C.

Thus:
d | {gcd(a, b)} ∪ C.
Next, we prove (d | {gcd(a, b)} ∪ C =⇒ d | {a} ∪ {b} ∪ C)**
Assume d | {gcd(a, b)} ∪ C. By the definition of d | A, this means:

d | gcd(a, b) and d | c, ∀c ∈ C.

If d | gcd(a, b), it follows that d | a and d | b. Hence:

d | a, d | b.

Moreover, since d | c for all c ∈ C, we can deduce:

d | {a} ∪ {b} ∪ C.

Thus:
d | {a} ∪ {b} ∪ C.
We have now proven both directions: 1. If d | {a}∪{b}∪C, then d | {gcd(a, b)}∪C, 2. If d | {gcd(a, b)}∪C,
then d | {a} ∪ {b} ∪ C.
Therefore, we conclude:

d | ({a} ∪ {b} ∪ C) if and only if d | ({gcd(a, b)} ∪ C) .

5
Problem 5
Consider the following definition.
Definition. For any subset A ⊆ Z, gcd (A) is defined to be the greatest common divisor of all elements in
A.
Prove that d | ({a} ∪ B) if and only if d | gcd (a, gcd (B)) for all a, d ∈ Z and finite subsets B ⊆ Z, by
induction on the cardinality of B.
Hint: Use problems 3 and 4.

We will prove the statement by induction on the cardinality of B (i.e., |B|).


Consider the base case: When |B| = 1
If |B| = 1, then B = {b1 }. In this case, the statement becomes:

d | ({a} ∪ B) ⇐⇒ d | gcd (a, gcd(B)) .

Since gcd(B) = b1 , the statement reduces to:

d | {a, b1 } ⇐⇒ d | gcd(a, b1 ),

which is naturally true by the definition of the greatest common divisor.


Thus, the base case holds.
Assume the statement holds for any finite subset B ⊆ Z with |B| = n. That is, assume:

d | ({a} ∪ B) ⇐⇒ d | gcd (a, gcd(B)) ,

for all a, d ∈ Z.
Now we prove the statement for |B| = n + 1
Let B = {b1 , b2 , . . . , bn+1 }. Define B ′ = {b1 , b2 , . . . , bn }, so that |B ′ | = n. By the definition of gcd(B),
we have:
gcd(B) = gcd(gcd(B ′ ), bn+1 ).
We now need to prove:
d | ({a} ∪ B) ⇐⇒ d | gcd (a, gcd(B)) .
Firstly we prove (d | ({a} ∪ B) =⇒ d | gcd(a, gcd(B)))**
Assume d | ({a} ∪ B). By definition, this means:

d|a and d | bi ∀bi ∈ B.

In particular, we have:
d | bn+1 and d | bi for all bi ∈ B ′ .
By the inductive hypothesis, since d | ({a} ∪ B ′ ), we know:

d | gcd(a, gcd(B ′ )).

Additionally, since d | bn+1 , it follows from the definition of the gcd that:

d | gcd (gcd(a, gcd(B ′ )), bn+1 ) .

Using the fact that gcd(B) = gcd(gcd(B ′ ), bn+1 ), we can conclude:

d | gcd(a, gcd(B)).

Secondly we prove (d | gcd(a, gcd(B)) =⇒ d | ({a} ∪ B))**


Assume d | gcd(a, gcd(B)). From the definition of gcd(B), we have:

gcd(B) = gcd(gcd(B ′ ), bn+1 ).

6
Hence:
d | gcd(a, gcd(B)) =⇒ d | gcd (a, gcd(gcd(B ′ ), bn+1 )) .
By the properties of the gcd, this implies:

d | gcd(a, gcd(B ′ )) and d | bn+1 .

From d | gcd(a, gcd(B ′ )), the inductive hypothesis ensures:

d | ({a} ∪ B ′ ) .

Combining this with d | bn+1 , it follows that:

d | ({a} ∪ B) .

By induction, we have shown that the statement holds for all finite subsets B ⊆ Z. Specifically, for all
a, d ∈ Z and finite B ⊆ Z, it holds that:

d | ({a} ∪ B) ⇐⇒ d | gcd (a, gcd(B)) .

7
Problem 6
a) Disprove: There exist integers a and b such that a + b = 100 and gcd (a, b)) = 8.
b) Prove: There exist infinitely many pairs of integers (a, b) such that a + b = 87 and gcd (a, b) = 3.

(a) We give a proof by contradiction: Assume there exist integers a and b such that:

a + b = 100 and gcd(a, b) = 8.

Since gcd(a, b) = 8, by the properties of the gcd, there exist integers x and y such that:

a = 8x, b = 8y,

and gcd(x, y) = 1 (i.e., x and y are relative prime).


Substituting a = 8x and b = 8y into a + b = 100, we get:

8x + 8y = 100 ⇒ x + y = 12.5.

But this is clearly impossible because x and y are integers. This proves that there do not exist integers
a and b such that a + b = 100 and gcd(a, b) = 8.
(b) Proof:
Let a = 3x and b = 3y, where x and y are integers. Since gcd(a, b) = 3, by the properties of the gcd, we
must have:
gcd(x, y) = 1,
i.e., x and y must be relative prime.
Substituting a = 3x and b = 3y into a + b = 87, we get:

3x + 3y = 87 ⇒ x + y = 29.

We only need to find pairs of integers (x, y) that satisfy x + y = 29 and gcd(x, y) = 1. For example:

x = 1, y = 28

x = 2, y = 27
x = 4, y = 25
x = 5, y = 24
and so on.
Let x = k and y = 29 − k. For every k such that gcd(k, 29 − k) = 1, we can construct (a, b) = (3x, 3y),
which satisfies a + b = 87 and gcd(a, b) = 3. There are infinitely many such k, so there are infinitely many
valid pairs (a, b).

8
Problem 7
Let a, b ∈ Z. Prove by induction on b that there exists x, y ∈ Z such that gcd (a, b) = ax + by.

We will prove by mathematical induction on b ≥ 0 that for any integers a, b ∈ Z, there exist integers
x, y ∈ Z such that:

gcd(a, b) = ax + by.
When b = 1, we have gcd(a, b) = gcd(a, 1) = 1. We can directly set x = 0 and y = 1, since:

gcd(a, 1) = a · 0 + b · 1.
Thus, the base case holds.
Now assume that for some b = k (where k ≥ 1), the statement holds. That is, for any integer a, there
exist integers x, y ∈ Z such that:

gcd(a, k) = ax + ky.
Now assume b = k + 1. We need to prove that for any integer a, there exist x, y ∈ Z such that:

gcd(a, k + 1) = ax + (k + 1)y.
By the division algorithm, we can write:

k + 1 = qk + r,

where q = 1 and r = 1 in this specific case.


Now observe that:
gcd(a, k + 1) = gcd(a, r),
because the gcd is invariant under replacing k + 1 by k + 1 − qk. In this case, r = 1.
By the inductive hypothesis, since r < k, there exist integers x1 , y1 ∈ Z such that:

gcd(a, r) = ax1 + ry1 .

Substituting r = (k + 1) − qk, we get:



gcd(a, r) = ax1 + (k + 1) − qk y1
= ax1 + (k + 1)y1 − qky1
= ax1 + (k + 1)y1 + k(−qy1 )

This shows that gcd(a, k + 1) (which equals gcd(a, r)) can be written as:

gcd(a, k + 1) = ax + (k + 1)y,

where x = x1 and y = y1 − qy1 .


Thus, the statement holds for b = k + 1.
By mathematical induction, we have proven that for any integers a, b ∈ Z, there exist integers x, y ∈ Z
such that:
gcd(a, b) = ax + by.

9
Problem 8
a) Perform the Euclidean Algorithm to show that the greatest common divisor of 61 and 14 is 1.
61
b) The continued fraction of is
14
61 1
=4+ .
14 1
2+
1
1+
4+0
2024
Use this example with your answer from part a) to write the continued fraction for .
314

(a) Using the Euclidean Algorithm to compute gcd(61, 14):

61 = 14 · 4 + 5
14 = 5 · 2 + 4
5=4·1+1
4=1·4+0

The last nonzero remainder is 1, so:


gcd(61, 14) = 1
(b)
2024
To find the continued fraction of 314 , perform the Euclidean Algorithm:

2024 = 314 · 6 + 80
314 = 80 · 3 + 74
80 = 74 · 1 + 6
74 = 6 · 12 + 2
6=2·3+0

Quotients: 6, 3, 1, 12, 3.
The continued fraction is:
2024 1
=6+
314 1
3+
1
1+
1
12 +
3

Why do we care about continued fractions? Continued fractions are good for calculating rational approx-
imations for irrational numbers. For example, π has a continued fraction that never terminates:

π 1
=3+ .
1 1
7+
1
15 +
···
1 22
Truncating the continued fraction after two steps gives us a common approximation for π: π ≈ 3 + = .
7 7

10

You might also like