IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS. 1. Combinatorics

Similar documents
STUDY GUIDE FOR THE WRECKONING. 1. Combinatorics. (1) How many (positive integer) divisors does 2940 have? What about 3150?

MATH 2200 Final LC Review

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

1 Basic Combinatorics

(1) Which of the following are propositions? If it is a proposition, determine its truth value: A propositional function, but not a proposition.

Chapter 1 : The language of mathematics.

MATH 2200 Final Review

MATH 363: Discrete Mathematics

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

MATH FINAL EXAM REVIEW HINTS

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017

CMSC Discrete Mathematics SOLUTIONS TO FIRST MIDTERM EXAM October 18, 2005 posted Nov 2, 2005

MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM

Chapter 1. Sets and Numbers

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

Tutorial Obtain the principal disjunctive normal form and principal conjunction form of the statement

Exam Practice Problems

MTH 299 In Class and Recitation Problems SUMMER 2016

Contribution of Problems

MATH 201 Solutions: TEST 3-A (in class)

RED. Name: Instructor: Pace Nielsen Math 290 Section 1: Winter 2014 Final Exam

MATH 13 FINAL EXAM SOLUTIONS

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Real Analysis Math 131AH Rudin, Chapter #1. Dominique Abdi

Part IA Numbers and Sets

5 Set Operations, Functions, and Counting

Midterm 1. Your Exam Room: Name of Person Sitting on Your Left: Name of Person Sitting on Your Right: Name of Person Sitting in Front of You:

CS 70 Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Midterm 1 Solutions

Problems for Putnam Training

About This Document. MTH299 - Examples Weeks 1-6; updated on January 5, 2018

MATH 114 Fall 2004 Solutions to practice problems for Final Exam

Thus, X is connected by Problem 4. Case 3: X = (a, b]. This case is analogous to Case 2. Case 4: X = (a, b). Choose ε < b a

SOLUTIONS TO EXERCISES FOR. MATHEMATICS 205A Part 1. I. Foundational material

Name (print): Question 4. exercise 1.24 (compute the union, then the intersection of two sets)

Basic Combinatorics. Math 40210, Section 01 Fall Homework 8 Solutions

0 Sets and Induction. Sets

MA Discrete Mathematics

1 Take-home exam and final exam study guide

Logic. Facts (with proofs) CHAPTER 1. Definitions

MATH1240 Definitions and Theorems

Part IA. Numbers and Sets. Year

SETS AND FUNCTIONS JOSHUA BALLEW

2.1 Sets. Definition 1 A set is an unordered collection of objects. Important sets: N, Z, Z +, Q, R.

CSE 321 Solutions to Practice Problems

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms

Week Some Warm-up Questions

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant).

6 CARDINALITY OF SETS

Fundamentals of Pure Mathematics - Problem Sheet

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

UNIVERSITY OF VICTORIA DECEMBER EXAMINATIONS MATH 122: Logic and Foundations

CSE 1400 Applied Discrete Mathematics Proofs

are the q-versions of n, n! and . The falling factorial is (x) k = x(x 1)(x 2)... (x k + 1).

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

SUMS PROBLEM COMPETITION, 2000

1 Homework. Recommended Reading:

Math 210 Exam 2 - Practice Problems. 1. For each of the following, determine whether the statement is True or False.

PRACTICE PROBLEMS: SET 1

2k n. k=0. 3x 2 7 (mod 11) 5 4x 1 (mod 9) 2 r r +1 = r (2 r )

REVIEW FOR THIRD 3200 MIDTERM

1. Consider the conditional E = p q r. Use de Morgan s laws to write simplified versions of the following : The negation of E : 5 points

and problem sheet 6

Do not open this exam until you are told to begin. You will have 75 minutes for the exam.

7.11 A proof involving composition Variation in terminology... 88

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

Notation Index. gcd(a, b) (greatest common divisor) NT-16

MATH 3330 ABSTRACT ALGEBRA SPRING Definition. A statement is a declarative sentence that is either true or false.

VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur

An Introduction to Mathematical Reasoning

ASSIGNMENT 1 SOLUTIONS

NORTHERN INDIA ENGINEERING COLLEGE, LKO D E P A R T M E N T O F M A T H E M A T I C S. B.TECH IIIrd SEMESTER QUESTION BANK ACADEMIC SESSION

Test Codes : MIA (Objective Type) and MIB (Short Answer Type) 2007

1. Given the public RSA encryption key (e, n) = (5, 35), find the corresponding decryption key (d, n).

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

MATH NEW HOMEWORK AND SOLUTIONS TO PREVIOUS HOMEWORKS AND EXAMS

Economics 204 Fall 2011 Problem Set 1 Suggested Solutions

Notes on ordinals and cardinals

Unit I (Logic and Proofs)

Economics 204 Summer/Fall 2017 Lecture 1 Monday July 17, 2017

Sets and Motivation for Boolean algebra

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Math 105A HW 1 Solutions

Chapter Summary. Sets (2.1) Set Operations (2.2) Functions (2.3) Sequences and Summations (2.4) Cardinality of Sets (2.5) Matrices (2.

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

Prof. Ila Varma HW 8 Solutions MATH 109. A B, h(i) := g(i n) if i > n. h : Z + f((i + 1)/2) if i is odd, g(i/2) if i is even.

Simplification by Truth Table and without Truth Table

Math 205 April 28, 2009 Final Exam Review

We are going to discuss what it means for a sequence to converge in three stages: First, we define what it means for a sequence to converge to zero

Theorem. For every positive integer n, the sum of the positive integers from 1 to n is n(n+1)

Some Review Problems for Exam 3: Solutions

MAT115A-21 COMPLETE LECTURE NOTES

Mathematical Reasoning & Proofs

Mid Term-1 : Practice problems

Math 3450 Homework Solutions

Discrete mathematics , Fall Instructor: prof. János Pach

Topics in Logic and Proofs

Chapter Summary. Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Computability

Transcription:

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS Combinatorics Go over combinatorics examples in the text Review all the combinatorics problems from homewor Do at least a couple of extra problems given below ( How many (positive integer divisors does 2940 have? What about 50? (2 How many permutations of the English alphabet are there in which letters A and B (a are (b are not next to each other? ( (a In how many ways can you mae a -people committee out of a group of 6 people? (b In how many ways can you mae 5 different -people committees out of a group of 6 people? (4 In how many ways can the following poer hands occur? (a Straight flush - 5 consecutive rans, all in the same suit, ace rans high, ie ace, 2,, 4, 5 isn t valid (b Four of a ind - all 4 cards of a single ran plus one other card (c Full house - cards of one ran and 2 cards of another ran (d Flush - 5 cards of the same suit but don t count the straight flushes (e Straight - 5 consecutive rans, suits don t matter, but don t count the straight flushes (f Three of a ind - cards of a single ran, and two other cards of distinct rans (g Two pair - 2 cards of one ran, 2 cards of another ran, and card of a distinct ran (5 How many poer hands are there with: (a at least one ing or at least one queen; Solution: The complement of the set we are ased about is the set of all poer hands with no ings and no queens Clearly, its cardinality is ( 44 5 Thus, the number of poer hands with at least one ing or at least one queen is ( ( 52 5 44 5 (b at least one ing and at least one queen;

2 IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS ( [ 52 2 5 Solution: The complement here is the union of two sets: the set NK of poer hands with no ings and the set NQ of poer hands with no queens; both have cardinality ( 48 5 The intersection of the two sets has cardinality ( 44 5, as in the previous problem Bythe Inclusion - Exclusion Principle the answer to our question is ( ( ( ( 52 48 44 2 5 5 5 (c at least one ing, at least one queen and at least one jac; Solution: This is another application of the Inclusion-Exclusion Principle applied to the complement of what we are ased to find the cardinality of The answer is ( ( ( ( ( 52 48 44 40 5 5 5 5 (d exactly two clubs or exactly two diamonds or exactly two spades; Solution: Let C be the set of poer hands with exactly two clubs, let D be the set of poer hands with exactly two diamonds, and let S be the set of poer hands with exactly two spades We are looing for C D S We have C = D = S = ( 2 ( 9 and C D = C S = D S = Since C D S = 0 the answer to our question is ( ( ( 9 2 ( 26 2 2 ( 2 (e at least one ing, at least one queen and no more than three diamonds 2 ( 26 Solution: The complement of the set we are interested in consists of poer hands with no ings or no queens or more than three diamonds Let NK denote the set of hands with no ings, let NQ be the set of hands with no queens, and let D be the set of hands with more than three diamonds We have NK = NQ = ( 48 5, while D = ( 4 ( 9 It is easy to see that NK NQ = ( 44 5, while ( 2 NK D = NQ D = 4 Similarly, we have NK NQ D = ( 4 ( ( 5 ( 6 ( 2 5 ( 5 By the Inclusion-Exclusion Principle we get the answer of ( ( ( ( ( (( ( 48 9 44 2 6 2 5 4 5 5 4 ( 2 5 ( 4 ( ( ] 5

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS (6 (a In how many ways can you give away 2 apples and 0 pears to 4 people so that each person gets at least one apple and one pear? (b In how many ways can you give away 8 apples, 9 pears and 0 peaches to people so that each person gets at least one piece of each fruit? (7 Iva is in a gardening store looing at pepper plants There are 20 different varieties She will get bac home with 8 pepper plants (a In how many ways can she choose 8 plants of mutually distinct varieties? (b In how many ways can she mae her acquisition if she is not committed to getting 8 plants of mutually distinct varieties? (8 You are going to a bagel shop which sells four types of bagels: plain, sesame, cinnamon raisin, blueberry They are almost sold out: they only have 20 plain bagels, 5 sesame bagels, 0 cinnamon raisin bagels, and 0 blueberry bagels left You need to come home with 40 bagels How many different orders of 40 bagels are there? Solution: Let x P, x S,x C and x B denote the numbers of plain, sesame, cinnamon raisin, and blueberry bagel in an order Our order will have to satisfy x P x S x C x B = 40, 0 x P 20, 0 x S 5, 0 x C 0, 0 x B 0 Again, we will count the cardinality of the complement: the impossible orders Let P be the set of orders with x P 2, let S be the set of orders with x S 6, let C be the set of orders with x C and let B be the set of orders with x B Then we have P = ( 22 Similarly, it follows that ( 6 P S = while Finally, we have ( 5 P S C =, S =, P C = ( 7, C = ( 2 (, S C = P B = C B = 0, B = ( 2 ( 26, S B = ( 6 while P S B = P C B = S C B = P S C B = 0 By the Inclusion-Exclusion Principle we have ( {( ( ( ( 52 22 7 2 2 5 [( 6 ( ( 26 ( ] 6 (9 Let A and B be two disjoint finite sets of cardinality A = n and B = m (a How many functions f : A B are there? (b How many functions f : {, 2} A B are there? ( } 5 (c How many functions f : {, 2} A B are there such that f( A and f(2 B? Solution: Using the Multiplicative Principle we find that the answer to part a is m n, to part b is (n m 2 and to part c is nm (0 Let A B be finite sets of cardinality A = n and B = m; we have n m

4 IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS (a How many subsets X of B are there which are disjoint from A? (b How many subsets X of B are there such that A X? Solution: In part a we are looing at P(B A; its cardinality is 2 m n In part b we are looing at the relative complement of P(B A within P(B; the answer is 2 m 2 m n 2 Proof-writing Go over the proofs that 2 is irrational, and that there are infinitely many primes Go through all the proof-writing feedbac you got on your homewor and exam(s ( Show, without using the Fundamental Theorem of Arithmetic, that if a and c are two coprime integers (that is, GCD(a, c = and if the product bc is divisible by a (that is, a bc, then b must be divisible by a (2 Show, without using the Fundamental Theorem of Arithmetic, that if a product of two integers is divisible by a prime p then at least one of the integers is divisible by p ( Prove that p, for p a prime integer, is irrational (4 Let n > 2 be an integer Prove that there is a prime number p strictly between n and n!: n < p < n! (5 Let p, p 2,, p n be n distinct prime numbers Show that is never an integer p p 2 p n (6 Let p be a prime, and let 0 < < p be an integer Prove that the binomial coefficient ( p is divisible by p = p! Proof: Since ( p!(p! is an integer we now that!(p! divides p! = p (p! Our next claim is that p and!(p! are coprime; this follows immediately the Fundamental Theorem of Arithmetic and the fact that the prime divisors of! = 2 and (p! = 2 (p are necessarily less than p Using Problem ( we obtain that!(p! divides (p! In (p! other words, we now now that!(p! is an integer It follows that ( p (p! = p!(p! is divisible by p (7 Show that for all integers a and b, and all prime numbers p the number (a b p a p b p is divisible by p Proof: By the Binomial Theorem we have: p ( p p ( p (a b p = a p b = a p b p a p b =0 =

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS 5 By the previous problem we now that each term under the summation sign is divisible by p Since the sum of integers divisible by p is itself divisible by p it follows that p ( p (a b p a p b p = a p b is divisible by p (8 Integers a, b and c are the sides of a right-angled triangle Prove that at least one of a, b and c is divisible by = (9 Let a, b and c be three integers such that a 2 b 2 = c 2 (a Show that (c a or (c a; (b Show that at least one of a and b has to be even (0 Use the Fundamental Theorem of Arithmetic to show that if the total number of divisors of a positive integer n is odd, then the number n must be a perfect square ( (a Show that ( n ( n = ( n for all n (b Use mathematical induction to prove the Binomial Theorem ( n (x y n = x n y Proof of a: We compute: ( ( n n n! = (!(n! n!!(n! = n! (n n!!(n!!(n! ( n! (n n! (n n! = =!(n!!(n! = (n! n!(n! = Proof of b: We see from ( 0 0 = 0! 0! 0! = that the base case, (x y0 = = ( 0 0 x 0 y 0, holds Next, we mae the inductive hypothesis that for some n 0 we have ( n (x y n = x n y From the distributive law we then also have ( n ( n (x y n = (x y x n y = x n y =0 We can mae a change of variable l = in the last sum; it becomes ( n n ( n x n y = x n l y l l =0 =0 =0 =0 l= =0 ( n x n y

6 IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS Of course, the use of the variable l is not essential In fact, in the next line of computation we will go bac to the summation variable Isolating the first and the last terms of the summations produces: (x y n = x n = ( n x n y = ( n x n y y n Combining under a single summation sign, and utilizing the part a of the problem produces: (x y n = x n ( n n ( n x n y y n = x n y = This completes the induction step, and our proof (2 Use the principle of mathematical induction to prove that the following identity holds for all integers n =0 (2n (2n (2n 5 (4n = n 2 ( Use mathematical induction to show that for integers, 2,, n the product leaves remainder after division by 4 (4 (4 2 (4 n (4 In calculus we discuss the Product Rule ie a theorem regarding the derivative of the product of two functions The theorem states if f and g are two differentiable functions, so is their product f g Furthermore, the derivative of f g is equal to: (f g = f g f g Often times, however, we need a result that can handle a product of many functions Use mathematical induction and the Product Rule as stated above to prove the Generalized Product Rule: (f f 2 f n = f f 2 f n f f 2 f n f f 2 f n for differentiable functions f, f 2,, f n (5 Prove that 2 n 2n for all integers n (6 Let x be some real number with 0 < x < Show that ( x n nx n for all integers n (7 Use mathematical induction to prove that for all natural numbers n 2 we have 2 (n < n4 4 (8 Show that for all n the number 7 n 6n is divisible by 6

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS 7 Logic ( Express the following using only the logical operations, and, and simplify as far as possible The variables p, q, r are some statements (a (p q (b (p q (c (p q (p r (d q (q p (e (p q (q p (2 Please negate the following statements (a (m, n N 2, m 2 = 2n 2 (b n N, n n {, } (c n N, (d x > 0, y > 0, n 2 n y < x (e C > 0, n N, e n < C n! (f ε > 0, N N, n N, (g ε > 0, δ > 0, x R, ( Please prove or disprove the following: (a x R, x x < ; (b C N, n N, n Cn; (c ε > 0, n N, n < ε; (d n N, ε > 0, n < ε; (e ε > 0, n N, x n n 2 < ε n > N n < ɛ x < δ x 2 < ɛ 4 Set Theory ( Prove (or disprove each of the following statements of set theory The set I is some index set, possibly infinite and possibly even uncountable (a (A B C = (A C (B C for all sets A, B, C; (b ( λ I A λ B = λ I (A λ B for all sets B and A λ with λ I; (c (A B (C D = (A C (B D for all sets A, B, C, D; (d A (B C = (A B (A C for all sets A, B, C; (e A ( λ I A λ = λ I (A A λ for all sets A and A λ with λ I; (f (A B C = A (B C for all A, B, C; (g A (A B = B; (h P(A P(B = P(A B for all A, B;

8 IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS (i P(A P(B = P(A B for all A, B; (j (A B C = (A C (B C for all A, B, C (2 Let U S and V T be such that S U = T V Use the method of element chasing to show: (a S V = T U; (b S V = T U Proof of a: First let x S V To show x T U suppose the opposite: that x T U, ie that x T C and x U C Note that T C V C (due to V T and thus x T C necessitates x V C As x S V, ie as x S or x V, we must have x S Together with x U C this means that x S U ie x T V Since T V T the latter contradicts x T C Thus, x T U and S V T U To prove the remaining inclusion, S V T U, it suffices to switch the roles of S and T, U and V in the above proof Proof of b: Let x S V Since x V and V T we now that x T On the other hand, if it were the case that x U C then we would have x S U and consequently x T V In particular, we would have to have x V C This contradicts x S V, proving that x U Overall, we have proven that x T U ie that S V T U To prove the remaining inclusion, S V T U, it suffices to switch the roles of S and T, U and V in the above proof ( Let A B and D C Use the method of element chasing to prove that (A C (B D B C Proof: Let (x, y (A C (B D We have two (no necessarily exclusive cases: (x, y A C and (x, y B D In the case when (x, y A C we have x A and y C Since A B it follows that x B and that (x, y B C In the case when (x, y B D we have x B and y D Since D C we in particular have y C and (x, y B C In either case, (x, y B C and thus (A C (B D B C (4 (a Use element chasing to show n N P(A n P ( n N A n Solution: We start with an arbitrary X n N P(A n Thus, there is some n N such that X P(A n, ie X A n We proceed by observing that X n N A n (To see the latter we note that each x X is an element of some A n due to X A n for some n N It follows that X P ( n N A n, and our proof is complete (b Is it true that n N P(A n = P ( n N A n? Solution: No it is not true It suffices to consider the sets A = {a}, A 2 = {b} and A n = for n Then n N P(A n = {, {}, {2}} while P ( n N A n = {, {}, {2}, {, 2}} (c What can you say about the relationship between n N P(A n and P ( n N A n?

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS 9 Solution: The two are equal To see this, start with an arbitrary X n N P(A n; it satisfies X P(A n ie X A n for all n N We proceed by observing that X n N A n (To see the latter we note that x X is an element of each and every A n due to X A n for all n N It follows that X P ( n N A ( n Conversely, let X P n N A n ie let X n N A n Then each x X is an element of A n for all n N In particular, n N, X A n ie n N, X P(A n It follows that X n N P(A n (5 Let f : X Y be a function, and let A n and B n with n N be subsets of X and Y respectively Prove or disprove each of the following Employ the method of element chasing whenever possible Reminders The image f(a of some subset A X is defined by f(a = { y Y x A, y = f(x } The pre-image f (B of some subset B Y is defined by (a f(a A 2 = f(a f(a 2 (b f ( n N A n = n N f(a n (c f(a A 2 = f(a f(a 2 (d f ( n N A n = n N f(a n (e f (B B 2 = f (B f (B 2 (f f ( n N B n = n N f (B n (g f (B B 2 = f (B f (B 2 (h f ( n N B n = n N f (B n f (B = { x X f(x B } (6 Let be an equivalence relation on a set A, and let a, b A (a Suppose that a b Use the method of element chasing to show that a = b (b Suppose that (a, b Show that a b = (7 Find, with proof, the following unions Unless specifically stated otherwise, the problems use the interval notation encountered in your pre-calculus classes: (a n N ( n 2, Solution: We claim that (a, b = {x R a < x < b}, n N etc ( n 2, = (0,

0 IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS We begin our proof of this claim by proving n N ( n 2, (0, To this end, let x ( n N n 2, By the definition of the infinite union this means that there is some n N such that ( x n 2,, ie n 2 < x Since n N we also have 0 < n 2 and in particular 0 < n 2 < x From this we may conclude x > 0, ie x (0, We proceed by proving that (0, n N ( n 2, To that end, let x (0,, ie let x > 0 We need to show that x n N ( n 2,, ie that n N, n 2 < x Consider n N such that n > x ; such n exists because we can always find a (positive integer which exceeds a given (real number, in our case x Note that n > x implies that n 2 x > and consequently n 2 < < x n 2 This completes our proof (b n N (, n Solution: Refer to an earlier study guide (c λ R {λ2 } Solution: We claim that λ R {λ2 } = [0, Indeed, if x λ R {λ2 } then for some λ R we have x = λ 2 Since λ 2 0 for all λ R, it follows that x 0 Overall, we have x [0, and λ R {λ2 } [0, Conversely, suppose that x [0, and let λ = x For this particular λ R we have that x {λ 2 } Thus x λ R {λ2 } and [0, λ R {λ2 } (d ϱ R {(x, y R2 x 2 y 2 = ϱ 2 } Solution: We claim that ϱ R {(x, y R2 x 2 y 2 = ϱ 2 } = R 2 Since he inclusion {(x, y R 2 x 2 y 2 = ϱ 2 } R 2 ϱ R is immediate, we proceed by showing that R 2 ϱ R{(x, y R 2 x 2 y 2 = ϱ 2 } To this end let (u, v R 2 be arbitrary, and consider ϱ = u 2 v 2 For this value of ϱ R we have (u, v {(x, y R 2 x 2 y 2 = ϱ 2 }, meaning that (u, v ϱ R{(x, y R 2 x 2 y 2 = ϱ 2 } This completes our proof

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS 5 (Equivalence Relations ( Consider the relation D on R (ie consider D R R such that x D y xy Q (a Is the relation reflexive? Prove your claim (b Is the relation symmetric? Prove your claim (c Is the relation antisymmetric? Prove your claim (d Is this an equivalence relation? (2 Prove that the relation on Z given by: n m 5 (n m is an equivalence relation Then describe the equivalence classes 0, and 2 ( Let A be the set of all positive real numbers, ie let A = (0, Prove that the relation on A given by is an equivalence relation x y y x Q Solution: Since x x = Q for all x A we immediately have x x So, is reflexive To show symmetry consider x, y A with x y Thus, we now that y x = x y Q Since reciprocals of rational numbers are rational, we have that x y = y x Q and that y x as well Finally, let x, y, z A be such that x y and y z We have x y, y z Q Products of rational numbers are rational, and thus z x = x z = x y y z Q This means that x z and that our relation is also transitive (4 Prove that the relation on R 2 {(0, 0} given by (x, y (z, w ( λ R {0}, (z, w = (λx, λy is an equivalence relation Then describe the equivalence classes (,, (0, and (,0 (5 Let G be a graph, and let V (G be the set of its vertices Define the relation on V (G by the following: for two vertices v and w write v w if v = w or if there exists a wal starting at v and ending at w Prove that is an equivalence relation How do you visualize the equivalence classes of this equivalence relation?

2 IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS Solution: The reflexivity follows from the fact that v w whenever v = w To prove symmetry suppose v w If v = w there is nothing to show since then we immediately have w v So, suppose v w with v w Then there exists a wal starting at v and ending at w The wal in reverse order goes from w to v meaning that w v Finally, we prove transitivity Let v w and w z If v = w or w = z we immediately get v z Therefore, it suffices to assume v w and w z with v w and w z Under these assumptions we have wals from v to w and then from w to z Concatenating the two wals produces a wal from v to z, meaning that v z This observation completes the proof that is an equivalence relation Two distinct vertices are in the same equivalence class if and only if there is a wal between them, and therefore the equivalence classes of correspond to the connected components of G (6 Let g : A R be a function Prove that the relation on A defined by is reflexive, transitive and anti-symmetric a b g(a g(b Solution: To prove reflexivity, let a A Since g(a g(a we have a a To prove transitivity let a, b, c be elements of A such that a b and b c In order words, let a, b, c A such that g(a g(b and g(b g(c We then also have g(a g(c, and it follows that a c Finally, we address anti-symmetry Let a, b A be such that a b and b a, ie g(a g(b and g(b g(a We then must have g(a = g(b Since g is by assumption, we see that a = b ( Let f : N 2 N 2 be given by: Is f -? Is f onto? Prove your claims 6 Functions f ( m, n = (GCD(m, n, LCM(m, n Proof: The function f is not To see this consider the fact that: f(2, = (, 6 = f(, 2 The function if also not onto To see this consider (2, N 2 If there existed (m, n N 2 with f(m, n = (GCD(m, n, LCM(m, n = (2, then we would have 2 m and m Overall, we would have to have 2 which is false Thus (2, is not in the image of f and the function f is not onto (2 Consider the function f : R 2 R given by f(x, y := x y (a Is this function onto? If not, find its range (b Is this function -? If not, restrict its domain so that it becomes an injection

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS ( Let P be the set of all polynomials in one variable, and let D : P P be the derivative operator, D(P = P (So for example, D(x 2x 2 x = x 2 4x (a Prove or disprove that D is injective; (b Prove or disprove that D is surjective Solution: The function D is not injective as evidenced by the fact that D(x = D(x = while x x The function D, however, is surjective To see this let p(x = a n x n a xa 0 P be arbitrary Consider q(x = a n n xn a 2 x2 a 0 x Clearly, D(q = p and thus D is onto (4 Let V be the set of all polynomials whose coefficients are real numbers (For example, P (x = 7x x 2 is an element of V Furthermore, let be a function defined by L : V R 2 L(P = (P (0, P ( for P V (a Is L a function? Justify your claim (b Is L an onto function? Justify your claim Solution: The function L is not Indeed, consider the polynomials P (x = x and P 2 (x = x 2 We have L(P = L(P 2 = (0, and yet P P 2 The function L is, however, an onto function To see this let (a, b R 2 be arbitrary, and let P (x = a (b ax Then P (0 = a, while P ( = a (b a = b In particular, it follows that L(P = (a, b (5 (a Show that the composition of two bijections is a bijection (b If the composition of two functions is a bijection, do the individual functions in the composition have to be bijections? Proof of a: Let f : X Y and g : Y Z be two bijections We will show that g f : X Z is also a bijection To prove it is, assume g f(x = g f(x 2 for some x, x 2 X Since g (f(x = g (f(x 2 and since g is injective we see that f(x = f(x 2 Furthermore, since f is injective we now must have x = x 2 Overall, this proves that g f is To show that it is onto consider arbitrary z Z Since g is onto we now that for some y Y we have g(y = z In addition, since f is onto we now that for some x X we have f(x = y, meaning that g f(x = z This completes our proof of surjectivity Solution of b: The answer is no A counterexample if obtained by the following Let f : {} {, 2} and g : {, 2} {} be given by f( =, g( = g(2 = Clearly, f is not onto and g is not At the same time we have that g f : {} {} is a bijection

4 IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS (6 Verify that the function F : R 2 R 2 given by is a bijection What is its inverse F? F (x, y := ( x y, x 2y (7 Find a bijection between the intervals (0, 2 and (, 5 on the real number line Prove your claim! (8 Two simple graphs G = (V, E and G = (V, E are said to be isomorphic if there exist bijections F : V V and F 2 : E E such that for all {v, w} E we have {F (v, F (w} E In such a case we write G = G Show that = is an equivalence relation on simple graphs Proof: To see that = is reflexive consider a simple graph G = (V, E The identity functions Id : V V and Id : E E show that G = G To show symmetry assume G = G for two simple graphs G = (V, E and G = (V, E By assumption, there exist bijections F : V V and F 2 : E E such that for all {v, w} E we have {F (v, F (w} E Consider the bijections F : V V and F2 : E E We need to show that for each {v, w } E we have {F (v, F (w} E If that were not the case the induced map {v, w} {F (v, F (w} from E to E would be a map which is not onto, violating our assumption that E = E < Thus, = is symmetric Finally, let G = G and let G = G for simple graphs G = (V, E, G = (V, E and G = (V, E This means that there are bijections F : V V, F 2 : E E, F : V V and F 4 : E E such that for all {v, w} E we have {F (v, F (w} E and for all {v, w } E we have {F (v, F 4 (w } E The compositions F F : V V and F 4 F 2 : E E are bijections such that whenever {v, w} E we also have {F F (v, F F (w} E Thus = is transitive 7 Graph Theory Review terminology: simple graph, multigraph, subgraph, degree, degree sequence, wal, trail, path, circuit, cycle, connected, connected component, Eulerian circuit, Eulerian trail, Eulerian graph, semi-eulerian graph, Hamiltonian cycle, Hamiltonian graph, planar graph, bipartite graph, K n, K m,n, tree, spanning tree, minimal spanning tree Review results: The Handshae Theorem, the Eulerian Graph Theorem, Euler s Theorem about planar graphs, Prim s and Krusal s Algorithms for finding minimal spanning trees ( Show that in a simple graph there have to be two vertices of the same degree (Hint: Pigeonhole Principle

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS 5 Solution: Let V be the set of vertices of a simple graph, and let v = V Consider the function deg : V {0,,, v } which to a vertex associates its degree Note that deg is not onto since we cannot simultaneously have a vertex of degree 0 and a vertex of degree v Since V = v = {0,,, v } this means that deg is not In particular, there must be two vertices of the same degree (2 Is there are simple graph whose degree sequence is a,,, 2? b,,,, 2? c, 2,, 0? Solution: In the case a the answer is no due to the Handshae Theorem In the case b the answer is yes : such a graph can be obtained by an elementary subdivision from the graph K 4 Finally, in the case c the answer is no, since in the graph with 4 vertices one cannot simultaneously have a vertex of degree 0 and a vertex of degree ( Recall that we define trees as connected graphs without circuits Now let G be a simple connected graph on n vertices Show that the following are equivalent: (a G is a tree; (b G has n edges; (c removing an edge of G disconnects G Remar: Consult the textboo, Section 85 (4 A disconnected graph with no circuits is called a forest How many edges does a forest with connected components and n vertices have? Solution: Each connected component of a forest is a tree If i-th component has n i vertices then it has n i edges On the other hand, the total number of vertices is n = n i and the total number of edges is (ni = ( n i = n (5 Show that there are at least two vertices of degree in each tree Solution: Suppose the opposite: that there is a tree with at most one vertex of degree If this tree has n vertices then it has at least n vertices of degree of at least 2 Thus, the sum of the degrees of all the vertices is at least 2(n On the other hand, since the number of edges in a tree is n the Handshae Theorem guarantees that the sum of the degrees is exactly 2(n Contradiction (6 Is it possible to have a connected graph with n vertices and n 2 edges? Prove your answer Proof: The answer is no Suppose such a graph existed Its spanning tree would be a subgraph with n vertices and n edges Since a subgraph cannot have more edges than the original graph, we have a contradiction (7 Does there exist a tree with the degree sequence,, 2, 2,,? Prove your answer Proof: The answer is no Suppose such a tree existed It would have 6 vertices and 5 edges By the Handshae Theorem we have deg(v = 2 5 = 0 However, the sum of all the degrees is 2 2 = 2 Contradiction (8 The following questions have to do with the complete bipartite graph K n,n

6 IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS (a What is the number of vertices and edges in the complete bipartite graph K n,n? (b What is the degree sequence for the complete bipartite graph K n,n? (c What is the length of the shortest cycle in the complete bipartite graph K n,n? (d For what value of n is the complete bipartite graph K n,n : (i planar? Briefly explain your answer (ii Hamiltonian? Briefly explain your answer (iii Eulerian? Briefly explain your answer (iv semi-eulerian? Briefly explain your answer Solution: The graph K n,n has 2n vertices and n 2 edges The degree sequence is a constant sequence n, n,, n with 2n terms The shortest cycle is 4, except in the case of K, in which no cycle exists Clearly, K, and K 2,2 have drawings in which no edges intersect, and are planar For n the graph K n,n contains K, as a subgraph, and so by Kuratowsi Theorem they are not planar With the exception of K, all graphs K n,n are Hamiltonian To see this, note that in the case of n > the graph K n,n satisfies the hypothesis of Ore s Theorem Indeed, if n > we have 2n and deg(x deg(y = n n 2n for all non-adjacent x and y The graph K n,n is Eulerian only in the case when each vertex is of even degree, ie only in the case when n is even On the other hand, K n,n is semi-eulerian if and only if there are exactly two vertices of odd degree This is only the case with K, and no other K n,n (9 What is the minimal number of edges one needs to add to K 4, in order to obtain an Eulerian graph? Please modify K 4, by adding this minimal amount of edges; then find an Eulerian circuit of the modified graph (0 Suppose that a planar graph G has connected components, v vertices and e edges Into how many regions is a planar drawing of G dividing the plane? Solution: The components of the graph are planar graphs with v i vertices, e i edges and f i faces, where i Note that v = v i, e = e i, f = ( f i (, where f is the number of faces of G (The last equality is due to the fact that the infinite face is counted in each f i when in fact it only needs to be counted only once Adding the equalities v i e i f i = 2 which hold for each i we get v e f ( = 2, ie f = v e Thus, the graph G divides the plane into v e regions ( Let G be a simple connected planar graph with v vertices and e edges (a Show that if v then v e 6; (b Show that if v 4 and the shortest cycle is of length at least 4, then 2v e 4

IVA S STUDY GUIDE FOR THE DISCRETE FINAL EXAM - SELECTED SOLUTIONS 7 Proof of a: By Euler s Theorem we have v e f = 2 ie f = 2 v e Since each face has at least edges we must have 2e f From here we have the inequality: 2e (2 v e, ie v e 6 Proof of b: By Euler s Theorem we have v e f = 2 ie f = 2 v e Since each face has at least edges we must have 2e 4f From here we have the inequality: (2 Show that K 5 and K, are not planar Remar: Consult the textboo, Section 84 2e 4(2 v e, ie 2v e 4