Docsity

Solved Problems for Assignment 6 - Constructing Proofs | CS 1050, Assignments of Computer Science

Toggle sidebar
bg1
CS 1050A: Constructing Proofs
Problem Set 6
Due on Wed, Dec 6, 2006
Submit any six problems. All problems are worth 10 points.
Problem 1
Let aand bbe positive integers. The goal of this exercise is to show that there exist integers uand
vsuch that gcd(a, b) = u·a+v·b.
Let Sbe the set of integers defined as:
S={x·a+y·b|x, y ∈Z}
1. Prove that Scontains at least one positive integer.
Let x=y= 1. Here, x, y ∈Zand x·a+y·b=a+bis a positive ineteger as both aand b
are positive integers. Therefore, a+b∈S.
2. Let gdenote the smallest positive integer in S. Prove that g|aand similarly that g|b.
(Hint: Prove by contradiction; if g6 | a, then there exist integers q, r, 0 < r < g such that
a=q·g+r).
(Proof by contradiction):
gdenotes the smallest positive integer in S. Since g∈S, there exists xg, yg∈Z, such that
g=xg·a+yg·b.
Assume g6 | a, then there exist integers q, r, 0 < r < g such that a=q·g+r(ris a positive
integer smaller than g).
r=a−q·g
=a−q(xg·a+yg·b)
= (1 −q·xg)a+ (−q·yg)b
(1 −q·xg),(−q·yg)∈Z, so r∈S. CONTRADICTION
Therefore, g|a.
By similar arguement g|b.
3. Prove that if cis a positive integer that divides both aand b, then c|g. Conclude that g
equals gcd(a, b).
gdenotes the smallest positive integer in S. Since g∈S, there exists xg, yg∈Z, such that
g=xg·a+yg·b.
c|aand c|b
⇒c|xgaand c|ygb
⇒c|xga+ygb
⇒c|g
We proved in Part 2 that g|a, g|b. And we just proved above that any inetger cthat divides
both aand b, also divides g. Therefore, c < g and gis the greatest common divisor.
1
pf3
pf4
pf5
pf8

Partial preview of the text

Download Solved Problems for Assignment 6 - Constructing Proofs | CS 1050 and more Assignments Computer Science in PDF only on Docsity!

CS 1050A: Constructing Proofs

Problem Set 6

Due on Wed, Dec 6, 2006

Submit any six problems. All problems are worth 10 points.

Problem 1

Let a and b be positive integers. The goal of this exercise is to show that there exist integers u and v such that gcd(a, b) = u · a + v · b.

Let S be the set of integers defined as:

S = {x · a + y · b | x, y ∈ Z}

  1. Prove that S contains at least one positive integer.

Let x = y = 1. Here, x, y ∈ Z and x · a + y · b = a + b is a positive ineteger as both a and b are positive integers. Therefore, a + b ∈ S.

  1. Let g denote the smallest positive integer in S. Prove that g|a and similarly that g|b. (Hint: Prove by contradiction; if g 6 | a, then there exist integers q, r, 0 < r < g such that a = q · g + r).

(Proof by contradiction): g denotes the smallest positive integer in S. Since g ∈ S, there exists xg, yg ∈ Z, such that g = xg · a + yg · b. Assume g 6 | a, then there exist integers q, r, 0 < r < g such that a = q · g + r (r is a positive integer smaller than g).

r = a − q · g = a − q(xg · a + yg · b) = (1 − q · xg)a + (−q · yg)b (1 − q · xg), (−q · yg) ∈ Z, so r ∈ S. CONTRADICTION Therefore, g|a. By similar arguement g|b.

  1. Prove that if c is a positive integer that divides both a and b, then c|g. Conclude that g equals gcd(a, b).

g denotes the smallest positive integer in S. Since g ∈ S, there exists xg, yg ∈ Z, such that g = xg · a + yg · b. c|a and c|b ⇒ c|xga and c|ygb ⇒ c|xga + ygb ⇒ c|g

We proved in Part 2 that g|a, g|b. And we just proved above that any inetger c that divides both a and b, also divides g. Therefore, c < g and g is the greatest common divisor.

Problem 2

Let a and n be positive integers such that gcd(a, n) = 1. Prove that gcd(a^2 , n) = 1.

gcd(a, n) is the smallest positive integer that can be written as xa + yn where x, y ∈ Z.

1 = xa + yn ⇒ a = 1 − yn x ⇒ a^2 = 1 − 2 yn + y^2 n^2 x^2 ⇒ 1 = (x^2 )a^2 + (2y + y^2 n)n

1 is the smallest positive inetger that is there and (x^2 ), (2y + y^2 n) ∈ Z. Therefore, gcd(a^2 , n) = 1.

Problem 3

Compute the remainder when 24^141 is divided by 11.

(Hint: Fermat’s Little Theorem could be useful).

24 ≡ 2(mod11) ⇒ 24141 ≡ 2141 (mod11) 2141 = 210 · 210 · · · 210 · 21 210 ≡ 1(mod11)(By Fermat’s Little Theorem) 2141 ≡ 114 · 21 (mod11) ⇒ 2141 ≡ 2(mod11)

Therefore, remainder when 24^141 is divided by 11 is 2.

Problem 4

Prove or disprove: there exists an integer x such that

x ≡ 9 (mod 35) and x ≡ 12 (mod 56).

Assume there exists an inetger x that satisfies the following:

x ≡ 9 (mod 35) and x ≡ 12 (mod 56).

So, there exists integers s and t such that:

x − 9 = 35 · s and x − 12 = 56 · t ⇒ 35 · s + 9 = 56 · t + 12 ⇒ 3 = 35 · s + 56 · (−t)

However, gcd(56, 35) = 7. Therefore, the smallest number that can be wriiten in the form 35x+56y is 7 and 3 < 7. CONTRADICTION. Therefore, no such x exists.

Consider any two consecutive numbers in the sequence - 2^2 i

  • 1 and 2^2 i+
    1. Let x = 2^2 i

. Then, 22 i+

  • 1 = 2^2 i· 2
  • 1 = (2^2 i )^2 + 1 = x^2 + 1. Find gcd(x + 1, x^2 , 1) by Euclid’s Algorithm: x^2 + 1 = (x − 1) · (x + 1) + 2 Therefore, gcd(x^2 + 1, x + 1) = gcd(x + 1, 2) = 1 as x is even and x + 1 is odd. So, any two elements in the sequence will be of the form x + 1 and x^2 k^ + 1. Find gcd(x + 1, x^2 k, 1) by Euclid’s Algorithm: x^2 k^ + 1 = (x^2 k^ − 1) + 2 = (x^2 k−^1 − x^2 k−^2 + x^2 k−^3 · · · + x − 1) · (x + 1) + 2 Therefore, gcd(x^2 k^ + 1, x + 1) = gcd(x + 1, 2) = 1 as x is even and x + 1 is odd.

Problem 8

Let a and n be positive integers such that gcd(a, n) = 1. Prove that there exists a positive integer k such that ak^ ≡ 1 (mod n).

(Hint: Look at the integers a, a^2 , a^3 , a^4 , a^5 ,... and the remainders when divided by n. There must be a remainder that repeats itself).

Suppose, remainder, when a is divided by n, is r. So, 0 < r < n. Now, for any two distinct integers i and j, (j < i), we claim that ai^6 ≡ aj^ (modn). Proof is by contradiction: ai^ ≡ aj^ (modn) ⇒ n|(ai^ − aj^ ) ⇒ n|aj^ (ai−j^ − 1) Since gcd(n, a) = 1, n 6 |aj^. ⇒ n|(ai−j^ − 1) ⇒ ai−j^ ≡ 1(modn) and we are done because then k = i − j. However, ai^6 ≡ aj^ (modn) can not be true for any two distinct integers i and j. For all i, such that 1 ≤ i ≤ n, at least two have to have same remainder when divided by n.And then, for those two powers of a, say i 1 and i 2 , ai^1 ≡ ai^2 (modn). And then ai^1 −i^2 ≡ 1(modn).

Problem 9

Suppose G is a simple graph on 5 vertices. Four of its vertices have degree 4 each. What is the degree of the fifth vertex? Why?

Let A, B, C, D and E be the 5 vertices of G. Let deg(A) = deg(B) = deg(C) = deg(D) = 4. Since deg(A) = 4, therefore A is connected to 4 vertices i.e. B, C, D, E. Since deg(B) = 4, therefore B is connected to 4 vertices i.e. A, C, D, E. Since deg(C) = 4, therefore C is connected to 4 vertices i.e. A, B, D, E. Since deg(D) = 4, therefore D is connected to 4 vertices i.e. A, B, C, E. Therefore, E is connected to A, B, C, D i.e. 4 vertices. Therefore, deg(E) = 4.

Problem 10

Construct a simple graph on 7 vertices such that the degrees of the vertices are 6, 3 , 3 , 3 , 3 , 3 , 3.

Construct a simple graph on 7 vertices such that the degrees of the vertices are 6, 2 , 2 , 2 , 2 , 2 , 2.

Methane

Ethane

Propane

  1. Show that there are two different trees that could represent butane (C 4 H 10 ).

Two different trees that could represent Butane