(vi) xry iff x y 2 (see the previous exercise); (iii) xry iff xy 0;

Similar documents
MAD 3105 PRACTICE TEST 2 SOLUTIONS

Section Summary. Relations and Functions Properties of Relations. Combining Relations

Packet #5: Binary Relations. Applied Discrete Mathematics

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

ASSIGNMENT 1 SOLUTIONS

1. multiplication is commutative and associative;

CHAPTER 3. Congruences. Congruence: definitions and properties

Math 300: Final Exam Practice Solutions

CHAPTER 1. Relations. 1. Relations and Their Properties. Discussion

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

Math 2534 Solution to Test 3A Spring 2010

Introduction to Cryptography CS 355 Lecture 3

MATH 55 - HOMEWORK 6 SOLUTIONS. 1. Section = 1 = (n + 1) 3 = 2. + (n + 1) 3. + (n + 1) 3 = n2 (n + 1) 2.

A SUMMARY OF RECURSION SOLVING TECHNIQUES

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

Sets and Motivation for Boolean algebra

MAS114: Solutions to Exercises

* 8 Groups, with Appendix containing Rings and Fields.

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

8 Primes and Modular Arithmetic

Part IA Numbers and Sets

Solution Sheet (i) q = 5, r = 15 (ii) q = 58, r = 15 (iii) q = 3, r = 7 (iv) q = 6, r = (i) gcd (97, 157) = 1 = ,

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

Review Problems for Midterm Exam II MTH 299 Spring n(n + 1) 2. = 1. So assume there is some k 1 for which

Math 2602 Finite and Linear Math Fall 14. Homework 8: Core solutions

CSC B36 Additional Notes sample induction and well-ordering proofs. c Nick Cheng

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Name (please print) Mathematics Final Examination December 14, 2005 I. (4)

Chapter VI. Relations. Assumptions are the termites of relationships. Henry Winkler

Revision Problems for Examination 1 in Algebra 1

Chapter 7: Exponents

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

0 Sets and Induction. Sets

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include

1.4 Equivalence Relations and Partitions

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

PUTNAM TRAINING EASY PUTNAM PROBLEMS

Chapter 7: Exponents

MATH 2200 Final LC Review

CDM. Recurrences and Fibonacci

Homework #2 solutions Due: June 15, 2012

1. Algebra 1.5. Polynomial Rings

CDM. Recurrences and Fibonacci. 20-fibonacci 2017/12/15 23:16. Terminology 4. Recurrence Equations 3. Solution and Asymptotics 6.

1. Suppose that a, b, c and d are four different integers. Explain why. (a b)(a c)(a d)(b c)(b d)(c d) a 2 + ab b = 2018.

MATH 145 LECTURE NOTES. Zhongwei Zhao. My Lecture Notes for MATH Fall

LESSON 7.1 FACTORING POLYNOMIALS I

Chapter 1. Sets and Numbers

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

X-MA2C01-1: Partial Worked Solutions

Relations. P. Danziger. We may represent a relation by a diagram in which a line is drawn between two elements if they are related.

8 Appendix: Polynomial Rings

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

Deviations from the Mean

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

M381 Number Theory 2004 Page 1

1. Let r, s, t, v be the homogeneous relations defined on the set M = {2, 3, 4, 5, 6} by

Math 312/ AMS 351 (Fall 17) Sample Questions for Final

3.2 Solving linear congruences. v3

CSC Discrete Math I, Spring Relations

9 RELATIONS. 9.1 Reflexive, symmetric and transitive relations. MATH Foundations of Pure Mathematics

Algebraic structures I

Exam 2. Is g one-to-one? Is g onto? Why? Solution: g is not one-to-one, since for c A, g(b) = g(c) = c. g is not onto, since a / g(a).

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

Chapter 1. Sets and Mappings

Rings and modular arithmetic

D-MATH Algebra I HS 2013 Prof. Brent Doran. Solution 3. Modular arithmetic, quotients, product groups

LEGENDRE S THEOREM, LEGRANGE S DESCENT

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

Chapter 2 - Relations

3 Applications of partial differentiation

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

D-MATH Algebra I HS18 Prof. Rahul Pandharipande. Solution 1. Arithmetic, Zorn s Lemma.

Part IA. Numbers and Sets. Year

Questionnaire for CSET Mathematics subset 1

12x + 18y = 50. 2x + v = 12. (x, v) = (6 + k, 2k), k Z.

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

ORDERS OF ELEMENTS IN A GROUP

Solutions to In Class Problems Week 4, Mon.

Section 7.1 Relations and Their Properties. Definition: A binary relation R from a set A to a set B is a subset R A B.

Fundamentals of Pure Mathematics - Problem Sheet

Rings If R is a commutative ring, a zero divisor is a nonzero element x such that xy = 0 for some nonzero element y R.

Moreover this binary operation satisfies the following properties

Writing Assignment 2 Student Sample Questions

Discrete Structures, Final Exam

x y z 2x y 2y z 2z x n

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

I Foundations Of Divisibility And Congruence 1

CHAPTER 12 Boolean Algebra

Polynomials. Henry Liu, 25 November 2004

Chapter 2 Algorithms and Computation

FALL 07 CSE 213: HW4

Multiplication of Polynomials

RED. Fall 2016 Student Submitted Sample Questions

(2) Generalize De Morgan s laws for n sets and prove the laws by induction. 1

Chapter12. Relations, Functions, and Induction

Handout #6 INTRODUCTION TO ALGEBRAIC STRUCTURES: Prof. Moseley AN ALGEBRAIC FIELD

EXAMPLES OF PROOFS BY INDUCTION

Discrete Structures: Solutions to Sample Questions, Exam 2

Transcription:

Final: Practice problems Relations Properties Exercise: For the following relations on Z, investigate the four basic properties. (i) arb iff a = b ; (v) arb iff a = b+; (ii) arb iff a b; (vi) arb iff a b (see the next exercise); (iii) arb iff a b; (vii) arb iff a and b share some common divisor other than. (iv) arb iff a b = k for some k Z; Exercise: For the following relations on R, investigate the four basic properties. (i) xry iff y x Z; (v) xry iff x = y ; (ii) xry iff x y Q; (vi) xry iff x y (see the previous exercise); (iii) xry iff xy 0; (vii) xry iff x y. (iv) xry iff xy ; Exercise: Investigate the basic four properties for the following relations: (i) Relation R on the set R defined as follows: (u,v)r(x,y) iff u y = x v, formally, R = {((u,v),(x,y)) R R ; u y = x v}. (ii) Relation R on the set R defined as follows: (u,v)r(x,y) iff u y = v x, formally, R = {((u,v),(x,y)) R R ; u y = x v}. (iii) Relation R on the set F of all mappings Z Z defined as TRS iff T(0)S(0) =. (iv) Relation R on the set F of all mappings Z Z defined as TRS iff T() = S(). (v) Relation R on the set F of all functions R R defined as frg iff f(x) g(y) for all x R. (vi) Relation R on the set M of all real matrices defined as ARB iff A = B (the same determinant). (vii) Relation R on the set M all real matrices defined as ( ) ( ) a a b b R iff a a b b a = b. (viii) Relation R on the set P of all real polynomials defined as p(x)rq(x) iff p and q have the same degree. (ix) Relation R on the set P all real polynomials defined as p(x)rq(x) iff p and q have the same roots including their multiplicities. (x) Relation R on the set P all real polynomials defined as p(x)rq(x) iff p and q have the same complex roots including their multiplicities. Equations modulo Exercise: Find all solutions (x,y) Z for the following diophantine equations: (i) 89x+35y = 6; (ii) 0x 5y = 3; (iii) 6x+9y = 04. Exercise: Solve the following congruences: (i) 84x 56 (mod 308); (ii) 3x 7 (mod 0); (iii) x 0 (mod 0). Exercise: Solve the following equations in the given Z n : (i) 84x = 6 v Z 0 ; (ii) 0x = 0 v Z 35 ; (iii) 8x = 0 v Z. Exercise: Solve the following systems of congruences: (i) x 0 (mod 3) (ii) x 4 (mod ) (iii) x (mod 7) (iv) x 3 (mod 5) x (mod 4) x 4 (mod 3) x 0 (mod 9) x 4 (mod 4) x (mod 5); x 4 (mod 5); x (mod ); x 5 (mod 3). Linear recurrences Exercise: Solve the following recurrence equation problems with initial conditions: (i) 5a n = a n+ +6a n, n ; a = 9, a = ; (ii) a n+ = 4a n 5a n +a n, n ; a 0 =, a =, a = ; (iii) a n+ 4a n = 0, n ; a =, a = 0. Exercise: Find general solutions of the following equations: (i) a n+ a n = 8n n, n 0; (iv) a n+ = a n +a n +3 n ( ) n, n ; (ii) a n+ +a n+ 3a n = (5n+) n, n 0; (v) a n+3 +3a n+ 4a n = 6 n +9, n 0; (iii) a n+ 4a n+ +4a n = 3 3 n 3, n ; (vi) a n+ = a n +n, n.

Exercise: Find solutions of the following initial value problems: (i) a n+ a n = (8n+8)3 n, n ; a = 6, a = 3; (ii) a n+ = a n a n 4 ( ) n, n 0; a = 0, a 0 = ; (iii) a n+ +a n+ 3a n = 5 n +8, n ; a = 5, a = 9; (iv) a n+ = a n +4a n 4a n +(6n 7)( ) n, n ; a 0 =, a = 4, a = 7. Induction Exercise: Prove by induction that the following formulas are true for all n N: (i) +4+6+ +(n) = n(n+); (v)!+!+ +n n! = (n+)! ; (ii) ++3+ +n = n(n+); (vi) +! + 3! + + n! n! ; (iii) + +3 + +n = 6 n(n+)(n+); (vii) + 4 + 9 + + n n ; (iv) 3 + 3 5 + 5 7 + + (n ) (n+) = n n+ ; (viii) n! < nn (this one for n ). Exercise: Consider functions defined inductively by the following formulas. For each of them calculate the first few values and try to guess an explicit formula for f(n). Then prove that the formula is correct. (i) (0) f(0) = 0, () f(n+) = f(n) for n N 0 ; (ii) (0) f() = 0, () f(n+) = f(n)+ for n N; n (iii) (0) f() =, () f(n+) = f(n) n+ for n N; (iv) (0) f() =, f() =, () f(n+) = f(n) f(n ) for n N, n ; (v) (0) f() =, f() =, f(3) =, () f(n + ) = f(n) + f(n ) f(n ) for n N, n 3; Exercise: Consider functions defined inductively by the following formulas. For each of them prove the given (in)equality. (i) (0) f() =, f() =, () f(n+) = f(n)+nf(n ) for n ; inequality f(n) n!; (ii) (0) f() =, f() =, () f(n+) = n f(n)+f(n ) for n ; inequality f(n) n ; (iii) (0) f() =, f() =, () f(n+) = nf(n)+nf(n ) for n ; equality f(n) = n!; (iv) (0) f() =, f() = 3, () f(n+) = nf(n)+n f(n ) for n ; inequality f(n) n!. Binary operations Exercise: For every given set with a binary operation decide whether is asociative (that is, whether M is a semigroup). If the answer is positive, determine whether there is a unit element. If M turns out to be a monoid, explore which of its elements are invertible and find a formula for inverse elements. (i) M = Z, x y = x+y +3; (vi) M = R {0}, x y = ; x + y (ii) M = Q, x y = (x+)(y +) ; (vii) M = R, (u,v) (x,y) = (u+x,v y); (iii) M = R, x y = x +y ; (viii) M = Z, (u,v) (x,y) = (u+x,v y); (iv) M = R, x y = x y; (ix) M = Z, (u,v) (x,y) = (u x,v +y); (v) M = Q, x y = xy ; (x) M = Q, (u,v) (x,y) = (uy,vx). Remark for (vi): This is the way parallel resistors in circuits are added. Relations Equivalences, partial orderings, etc. Exercise: Draw a Hasse diagram for (A, ) (divisibility relation), where (i) A = {,,3,4,5,6,7,8}; (iii) A = {,3,4,5,6,30,60}; (v) A = {,,4,8,6,3,64}; (ii) A = {,,3,5,,3}; (iv) A = {,,3,6,,4}; (vi) A = {,4,6,,4,36}. Exercise: Consider the poset ({3, 5, 9, 5, 4, 45}, ), that is, the divisibility relation. (i) Draw its Hasse diagram. (ii) Find its maxima, minima, greatest and least elements when they exist. (iii) Find maxima, minima, greatest and least elements of the set M = {3,9,5}, when they exist. Extra: Calculations modulo Exercise: Evaluate the following expression in the given Z n. First rewrite subtraction as addition with opposite elements. (i) (7+8) 46 in Z 3 ; (ii) (3 4 6) 79 in Z 3.

Extra: Recurrence equations Exercise: Consider functions given by the following recurrence equations. For each of them determine its asymptotic growth (see the Θ notation) using methods of linear recurrence equations, but without really determining the functions. (i) f(n+) = f(n)+n; (iv) f(n+) = 4f(n) 3f(n )+n n ; (ii) f(n+) = f(n)+n; (v) f(n+) = 4f(n) 3f(n )+3 n ; (iii) f(n+) = 4f(n) 3f(n )+n; (vi) f(n+) = 4f(n) 3f(n )+4 n. Exercise: Use recurrence equations to deduce closed formulas for the following sums: (i) +4+7+0+ +(3n+) = n (3k +); (iii) +3+6+0+ + n(n+) = n k=0 (ii) +λ+λ + +λ n = n λ k pro λ ; k=0 Extra: Structural induction Exercise: Define the set of all binary words (chains) that (i) do not contain adjacent zeros; (ii) end with a zero; (iii) do not end with a zero; (iv) contain the combination 0. k= k(k+) ; (iv) +3 + +(n+) = n (k +). Exercise: Define the set of all words over the alphabet C = {,,3,4} that: (i) do not contain adjacent threes; (ii) start with a two; (iii) do not end with a one; (iv) have the same number of odd and even numerals. k=0 3

Solutions Relations Properties Solution: (i): R: For every a Z we have a = a, hence ara. Is reflexive. S: Arbitrary a,b Z satisfying arb, that gives a = b, hence b = a and so bra. Is symmetric. A: Arbitrary a,b Z satisfying arb and bra, that gives a = b and b = a, we will not get a = b from this. Counterexample: 3 = 3, hence 3R( 3) and ( 3)R3, but 3 = 3 not true, so R is not antisymmetric. T: Arbitrary a,b,c Z satisfying arb and brc, that gives a = b and b = c, from that we have a = c and so arc. R is transitive. (ii): R: yes, for a A we have a a, hence ara; S: no, R as, but not true, hence R not true; A: yes, arb bra = a b b a = a = b; T: yes, arb brc = a b b c = a c = arc. (iii): R: no, for instance not true hence R not true; S: yes, arb = a b = b a = bra; A: no, say, R R, but = not true; T: no, say, R and R, but R not true. (iv): R: yes, a a = 0 = ara for every a; S: yes, arb = a b = k = b a = ( k) = bra; A: no, say, R3 and 3R, yet = 3 not true; T: yes, arb brc = a b = k b c = l = a c = (k +l) = arc. (v): R: no, 3 = 3+ not true and hence 3R3 not true; S: no, R but R not true; A: yes, arb bra = a = b + b = a + = b = b + = 0 = contradiction, so the assumption is never true, hence the implication is always valid; T: no, say, 3R and R, but 3R not true. (vi): Is not R, see a = ; not S see 4R; A: arb bra = a b b a. If a = 0, then that gives 0 b = b = 0 = a. If a 0, then a, also a b 0 and hence a, similarly b. We calculate: a b b a = a b a 4 = a a 4 = a 3, together with a that gives a =. Then b = b = and again a = b. Relation is antisymmetric. T: For b Z we have b b (see A), hence arb brc = a b b c = a b c = a c = arc. is transitive. (vii): R: Does every a Z have some common divisor with itself other than? Almost yes, not true for a =. So R is not reflexive. S: Let a,b Z satisfy arb. Then there is c > that divides both a and b, it then also divides b and a, so bra. R is symmetric. A: arb bra gives a common divisor, no chance to force a = b. Counterexample: R4 and 4R (common divisor ), hence is not antisymmetric. T: a,b have common divisor >, b,c have common divisor >, this does not yield anything common for a,c. Counterexample: R6 and 6R3, but not R3. It is not transitive. Solution: (i): R,S,T, see example in the book; (ii): R yes x x = 0 Q, S yes y x Q = x y = (y x) Q, T yes y x Q (z y) Q = (z x) = (y x)+(z y) Q; not A see R and R; (iii): R yes xx = x 0, S yes xy 0 = yx 0; not A see R and R; not T see ( )R0 and 0R; (iv): Not R see x = 0, S yes xy = yx ; not A see R and R; not T see R4 and 4R; (v): Not R see x = ; not S see 4R; A yes x = y y = x = x,y 0 x = x 4 y = y 4 = x = y = x = y = 0; not T see 6R4 and 4R; (vi): Not R see x = ; not S see 4R; not A see x = 0., y = 0. as 0. (0.) and 0. (0.) but not 0. = ; not T see (0.5)R(0.7) as 0.5 (0.7) = 0.49, (0.7)R(0.8) as 0.7 0.64, but not 0.5 0.64 (this was probably a bit tricky). (vii): R yes x x, T yes x y y z = x z ; not S see R, not A see R( ) and ( )R. 4

Solution: (i): R: yes u v = u v = (u,v)r(u,v); S: (u,v)r(x,y) = u y = x v = x v = u y = (x,y)r(u,v) yes; A: no, see e.g. (,4)R(,) and (,)R(,4); T: yes; (s,t)r(u,v) & (u,v)r(x,y) = s v = u t u y = x v sest s v +u y = u t+x v = s y = x t = (s,t)r(x,y). (ii): R: no, see e.g. (,3), not true that 3 = 3 ; S: no, see e.g. (,)R(,4) but not (,4)R(,); A: no, see e.g. (,0)R(0,) and (0,)R(,0); T: no, see e.g. (,4)R(,) and (,)R(,4) but not (,4)R(,4). (iii): R: no, this would require that all mappings satisfy T(0)T(0) =, but for isntance the mapping T(n) = n+ has T(0)T(0) = = ; S: yes TRS = T(0)S(0) = = S(0)T(0) = = SRT; A: no, say, T(n) = n +, S(n) = 3n+, then T(0)S(0) = = = S(0)T(0), so TRS and SRT, but not T = S; T: n, say, T(n) = n+, S(n) = 3n+, U(n) = (n+), then TRS and SRU, but not TRU as T(0)U(0) =. (iv): R: no, this would require that all mappings satisfy T() = T(), but for instance the mapping T(n) = n has T() = and T() = ; S: no, say, T(n) = n+ and S(n) = n, then T() = = S(), hence TRS, but S() = T() not true; A: no, say, T(n) = (n 3), S(n) = (a constant mapping), then T() = = S() and S() = = T(), hence TRS and SRT, but not T = S; T: no, say, T(n) = n +, S(n) = n, U(n) = n, then TRS and SRU, but not TRU as T() = and U() =. (v): R: yes, arbitrary function f satisfies the inequality f(x) f(x) for all x R; S: no, say, f(x) = x+3, g(x) = x satisfy frg but not grf; A: yes, frg and grf mean f(x) g(x) and g(x) f(x) for all x, that is, f(x) = g(x) for all x, that is, f = g; T: yes, frg and grh give for all x R that f(x) g(x) and g(x) h(x), that is, f(x) h(x), so frh. (vi): R: yes A = A ; S: yes ARB = A = B = B = A = BRA; A: no, say, a matrix of all zeros or a non-zero matrix with repeated rows have zero determinant; T: yes ARB BRC = A = B B = C = A = C = ARC. ( ) 0 (vii): R: no, say, in the matrix A = the upper left and lower bottom corners do not match, 0 0 hence ARA not true; ( ) ( ) 3 S: no, say, for A = and B = we have ARB, but not BRA; 7 3 3 ( ) ( ) 3 3 A: no, say, A = T: no, say, A = 3 ( 3 3 and B = ), B = ( 3 3 3 satisfy ARB and BRA, but not A = B; 3 3 ) ( ) 4 3 and C = satisfy ARB and BRC, but not 5 3 ARC. (viii): R: yes deg(p) = deg(p); S: yes prq = deg(p) = deg(q) = deg(q) = deg(p) = qrp; A: no, say, p = x and q = x+; T: yes prq qrr = deg(p) = deg(q) deg(q) = deg(r) = deg(p) = deg(r) = prr; (ix): R: yes; S: yes; A: no, say, p = x and q = x ; T: yes; (x): R: yes; S: yes; A: no, say, p = x and q = x ; T: yes; Equations modulo Solution: (i): gcd(89,35) = 63 = 89 + ( 5) 35, 63 divides 6 so there is a solution. Multiply Bezout s identity by : 89 4+35 ( 0) = 6. Solution x = 4, y = 0. Homogeneous eq.: 89x+35y = 0 cancels to 3x+5y = 0, so x h = 5k, y h = 3k. Solution is x = 4 5k, y = 3k 0 for k Z, or (x,y) = (4 5k, 0+3k) for k Z. (ii): We guess gcd(0, 5) = 5, this does not divide 3. No solution. (iii): We guess gcd(6, 9) = 3, so instead of the Euclid algorithm we try just cancelling in the equation: x+3y = 68. We easily guess that gcd(3,) = = 3+( ), multiply to get 68: ( 68)+3 68 = 68. Thus particular solution x = 68, y = 68. Homogeneous case: x+3y = 0 yields x h = 3k, y h = k, so the general solutions is x = 3k 68, y = 68 k for k Z, or also (x,y) = ( 68+3k,68 k) for k Z. Solution: (i): 56 = 84x + 308n, Euclid: gcd(308,84) = 8 = ( ) 308 + 4 84. Since 56 8 = Z, the equation is solvable. Multiplying the Bezout identity by that we obtain 56 = 84 ( 8)+ 308, so x = 8 is a solution. Hom. case: 84x + 308n = 0 cancels to 3x + n = 0, hence x h = k. We get the solution x = 8+k, k Z. I prefer x = 3+k, k Z. 5

(ii): 7 = 3x+0n, obviously gcd(3,0) = = ( 3) 3+ 0 (we guess), multiply this by seven to get 7 = 3 ( )+7 0, hence x = is a solution. Hom. case: 3x+0n = 0 gives x h = 0k (nothing to cancel), hence the given equation has solution x = +0k, k Z. I prefer x = 9+0k, k Z. (iii): Obviously gcd(,0) = 4, we cancel: 3x+5n = 0 has the solution x = 5k, k Z. Solution: (i): 6 = 84x+0n, Euklid s algorithm: gcd(0, 84) = 4 = 0+( ) 84, equation has a solution as 6 4 = 3 Z. Multiplying Bezout s identity by 3 we obtain 6 = 84 ( 6)+0 3, hence x = 6 is a solution. Hom. case: 84x + 0n = 0 cancels to 3x + 5n = 0, hence x h = 5k and x = 6 + 5k solves the congruence. There are gcd(0,84) = 4 solutions in Z 0 : x = 4+5k for k = 0,,...,4, that is, {4,9,4,9,...,04,09}. (ii): We solve 0x+35n = 0, we guess gcd(35,0) = 5, divide the equation: x+7n = 0, so the congruency has the solution x = 7k. There are gcd(35,0) = 5 solutions in Z 35, namely x = 7k for k = 0,,,3,4, that is, {0,7,4,,8}. (iii): 0 = 8x+n, we can guess gcd(,8) = 4 = +( ) 8, no solution since 4 does not divide 0. Solution: (i): n = 60, N = 0, inverse element in Z 3 is x = ; N = 5, inverse element in Z 4 is x = ; N 3 =, inverse element in Z 5 is x 3 =. x = 0 0 ( )+ 5 ( )+ ( ) = 63 57 (mod 60). General solution is x = 60k 63 (I prefer 57+60k) for k Z. (ii): n = 30, N = 5, inverse element in Z is x = ; N = 0, inverse element in Z 3 is x = ; N 3 = 6, inverse element in Z 5 is x 3 =. x = 4 5 +( 4) 0 +4 6 = 44 4 (mod 30). General solution is x = 44+30k (I prefer 4+30k) for k Z. (iii): n = 693, N = 99, inverse element in Z 7 is x = ; N = 77, inverse element in Z 9 is x = ; N 3 = 63, inverse element in Z is x 3 = 4. x = 99 +0 77 +( ) 63 ( 4) = 35. General solution is x = 35+693k for k Z. (iv): Rewrite as x 3 (mod 5), x 0 (mod 4), x (mod 3). n = 60, N =, inverse element in Z 5 is x = 3; we need not worry about N ; N 3 = 0, inverse element in Z 3 is x 3 =. x = 3 3+0+ 0 = 88. General solution is x = 88+60k (I prefer x = 8+60k) for k Z. Linear recurrences Solution: (i): We rewrite: a n+ 5a n+ +6a n = 0, n ; (λ )(λ 3) = 0, general sol. { n u+3 n v} n=, init. conditions yield {3 n +3 n } n=; (ii): We rewrite: a n+3 4a n+ +5a n+ a n = 0, n 0; (λ ) (λ ) = 0; general sol. {u+nv + n w} n=0; init. conditions yield { n n} n=0; (iii): (λ )(λ+) = 0, general sol. { n u+( ) n v} n=; init. conditions yield { n +( ) n } n=, it goes {,0,8,0,3,0,64,...}. Solution: (i): (λ )(λ+) = 0, a h,n = u+( ) n v; guess a n = (An+B) n, {(6n 6) n +u+ ( ) n v} n=0; (ii): (λ )(λ+3) = 0, a h,n = u+( 3) n v; guess a n = (An+B) n, {n n +u+( 3) n v} n=0; (iii): (λ ) = 0, a h,n = n n u+ n v; guess a n = A3 n +B, {3 3 n 3+n n u+ n v} n=; (iv): rewrite: a n+ a n+ a n = 6 n +4 ( ) n, n ; (λ )(λ+) = 0, a h,n = n u+( ) n v; guess a n = n A n +B( ) n, {n n +( ) n + n u+( ) n v} n=; (v): (λ )(λ + ) = 0, a h,n = u + ( ) n v + n( ) n w; guess a n = A n + n B, {n + n + u + ( ) n v +n( ) n w} n=0; (vi): rewrite: a n+ a n = n = n n, n ; (λ )(λ + ) = 0, a h,n = u + ( ) n v; guess a n = n(an+b), { 4 n fracn+u+( ) n v }. n=0 Solution: (i): (λ )(λ+) = 0, a h,n = u+( ) n v; guessa n = (An+B)3 n, {n3 n +u+( ) n v} n=, init. cond. give {n3 n +3} n=; (ii): rewrite: a n+ a n+ +a n = 4 ( ) n, n ; (λ ) = 0, a h,n = u+nv; guess a n = A( ) n, {( ) n +u+nv} n=, init. cond. give {( ) n +} n=, it is {0,,0,,0,,0,,...}; (iii): (λ )(λ+3) = 0, a h,n = u+( 3) n v; guess a n = A n +n B, { n +n+u+( 3) n v} n=, init. cond. give { n +n+} n=; 6

(iv): rewrite: a n+3 a n+ 4a n+ +4a n = (6n+5)( ) n, n 0; (λ )(λ )(λ+) = 0, a h,n = u+ n v+( ) n w; guess a n = (An+B)( ) n, {(n+)( ) n +u+ n v+( ) n w} n=0, init. cond. give {(n+)( ) n + n+ ( ) n } n=0. Induction Solution: (i): (0) V() says =, true. () Let n N. Assumption: +4+6+ +(n) = n(n+). To prove: +4+6+ +(n+) = (n+)(n+). Decomposition: +4+6+ +(n+) = [+4+6+ +(n)]+(n+) = [n(n+)]+(n+) = n +3n+ = (n+)(n+). (ii): (0) V() says =, true. () Let n N. Assumption: ++3+ +n = n(n+). To prove: ++3+ +(n+) = (n+)(n+). Decomposition: ++3+ +(n+) = [++3+ +n]+(n+) = [ n(n+)] +(n+) = (n +3n+) = (n+)(n+). (iii): (0) V() says = 6 3, true. () Let n N. Assumption: + + 3 + + n = 6 n(n+)(n+). To prove: + +3 + +(n+) = 6 (n+)(n+)(n+3). Decomposition: + +3 + +(n+) = [ + +3 + +n ]+(n+) = [ 6 n(n+)(n+)] +(n+) = = 6 (n3 +9n +3n+6) = 6 (n+)(n+)(n+3). (iv): (0) V() says 3 = 3, true. () Let n N. Assumption: 3 + 3 5 + + (n ) (n+) = n n+. To prove: 3 + 3 5 + + (n+) (n+3) = n+ n+3. Decomposition: 3 + 3 5 + + (n+) (n+3) = = [ 3 + 3 5 + + (n ) (n+) ] + (n+) (n+3) = [ n n+ ] + (n+) (n+3) = n +3n+ (n+)(n+3) = n+ n+3. (v): (0)V()says =, true. ()Letn N. Assumption:!+!+ +n n! = (n+)!. To prove:!+!+ +n n!+(n+) (n+)! = (n+)!. Decomposition:!+!+ +n n!+(n+) (n+)! = [!+!+ +n n!]+(n+) (n+)! = = [(n+)! ]+(n+) (n+)! = (n+)!+(n+) (n+)! = (n+)(n+)! = (n+)!. (vi): (0) V() says, true. () Let n N. Assumption: +! + 3! + + n! n!. To prove: +! + 3! + + (n+)! (n+)!. Decomposition: +! + 3! + + (n+)! = ] + (n+)! = [ +! + 3! + + n!] + (n+)! [ (n+) n! = (n+)! = n (n+)! (n+)!. (vii): (0) V() says, true. () Let n N. Assumption: + 4 + 9 + + n n. To prove: + 4 + 9 + + (n+) n+. Decomposition: + 4 + 9 + + = [ + 4 + 9 + + n ] + (n+) [ n (n+) ] + (n+) = (n+) n n(n+) = n +n+ n(n+) n +n n(n+) = n+. (viii): (0) V() says < 4, true. () Let n. Assumption: n! < n n. To prove: (n + )! < (n+) n+. Decomposition: (n+)! = (n+)n! < (n+)n n < (n+)(n+) n = (n+) n+. Solution: (i): f(n) = 0. Weak principle. (0) n = 0 checks. () Let n N 0. Assume that f(n) = 0. Then f(n+) = f(n) = 0, works for n+. (ii): f(n) = n. Weak principle. (0) n = checks. () Let n N. Assume that f(n) = n. Then f(n+) = f(n)+ = n + = (n+), works for n+. (iii): f(n) = n. Weak principle. (0) n = checks. () Let n N. Assume that f(n) = n. Then f(n+) = f(n) n n+ = n n n+ = n+, works for n+. (iv): f(n) = n. Strong (modified) principle. (0) n = a n = checks. () Let n N. Assume that f(k) = k for k = n,n. Pak f(n+) = f(n) f(n ) = n (n ) = n+, works for n+. (v): f(n) =. Strong (modified) principle. (0) n =, n = a n = 3 checks. () Let n N. Assume that f(k) = for k = n,n,n. Then f(n+) = f(n)+f(n ) f(n ) = + =, works for n+. Solution: (i): Strong (modified) induction (0) For n =, it checks. () Let n, assuming validity of V(k): f(k) k! for k = n,n. Then f(n+) = f(n)+nf(n ) n!+n (n )! = n! (n+)n! = (n+)!. (ii): Strong (modified) induction (0) For n =, it checks. () Let n, assuming validity of V(k): f(k) k for k = n,n. Then f(n + ) = k f(n) + f(n ) n n + (n ) = n+n n+ = n n+ n +n+ = (n+). 7

(iii): Strong (modified) induction (0) For n =, it checks. () Let n, assuming validity of V(k): f(k) = k! for k = n,n. Then f(n + ) = nf(n) + nf(n ) = n n! + n (n )! = n n!+n! = (n+) n! = (n+)!. (iv): Strong (modified) induction (0) For n =, it checks. () Let n, assuming validity of V(k): f(k) k! for k = n,n. Then f(n+) = nf(n)+n f(n ) = n n!+n (n )! = n n!+n n! = n n! (n+) n! = (n+)!. Binary operations Solution: (i): (x y) z = (x + y + 3) z = (x + y + 3) + z + 3 = x + y + z + 6 and x (y z) = x (y +z +3) = x+(y +z +3)+3 = x+y +z +6. Equal, is associative. Identity: equation x e = x yields x + e + 3 = x, hence e = 3. Check: x Z: x e = x ( 3) = x+( 3)+3 = x, e x = ( 3) x = ( 3)+x+3 = x, yes, we have a monoid. Inverse elements: Given x M = Z, want x y = e, hence x+y+3 = 3. Solution: y = 6 x. Conclusion: All elements are invertible, x = x 6. (ii): (x y) z = ([x+][y+] ) z = [x+][y+](z+) and x (y z) = x ([y+][z+] ) = (x+)[y +][z +]. Equal, is associative. Identity: equation x e = x yields (x + )(e + ) = x, hence e = 0. Check: x Q: x e = x 0 = (x+)(0+) = x, e x = 0 x = (0+)(x+) = x, yes, we have a monoid. Inverse elements: Given x M = Q, want x y = e, hence (x + )(y + ) = 0. Solution: y = x+ for x. Conclusion: All elements x are invertible, x = x x+. (iii): (x y) z = x +y z = x +y +z, x (y z) = x y +z = x +y +z, equal. Raising both sides of equation x e = x yields e = 0, unfortunately it is not a solution as it does not work in the original equation for x < 0. It s actually obvious that we cannot get a negative x using a square root. No identity element. If we changed the problem by considering this operation on R + 0, then e = 0 would be an identity. What about inverse elements then? No x > 0 is invertible, since for arbitrary y we have x y = x +y x > 0. (iv): Not associative, (x y) z = x 4 y z, while x (y z) = x y z. Counterexample: say, x =, y =, z = to see difference between the two formulas, then ( ) = 4 = 6, while ( ) = = 4. (v): Is associative, (x y) z = xy z = xy z = xyz = x (y z). No identity element, for x = we want e such that x e = x, hence e =, not possible. It is not a monoid. (vi): Surprisingly, it is associative, (x y) z = x + y z = = x (y z). x + y + z = 0, no such number. However, in the Identity element e would have to satisfy x =, hence x + e e world of resistor there is a possibility of e =, and infinite resistor works as identity in parallel configuration. (vii): [(s,t) (u,v)] (x,y) = (s + u,tv) (x,y) = (s + u + x,tvy) and (s,t) [(u,v) (x,y)] = (s,t) (u+x,vy) = (s+u+x,tvy). Equal, is associative. Identity: (x,y) (e,e ) = (x,y) yields x+e = x and ye = y for all x,y, hence e = 0 a e =. Check: (x,y) (0,) = (0,) (x,y) = (x,y). Inverse element: given (x,y), we want (x + u,yv) = (0,). Then u = x and v = y, if possible. Conclusion: (x,y) is invertible for y 0, then (x,y) = ( x, y). (viii): Asociativity and identity element: see (vii). Inverse element: given (x,y), we want (x + u,yv) = (0,). Then u = x and v = y, if possible. Conclusion: (x,y) is invertible for y = ±, then (x,y) = ( x,y). (ix): [(s,t) (u,v)] (x,y) = (s u,t + v) (x,y) = ((s u ) x,t + v + y) and (s,t) [(u,v) (x,y)] = (s,t) (u x,v +y) = (s ux,t+v +y). Not equal, (s u ) x = s ux differs from s (ux), so not associative. Counterexample: say, [(,0) (,0)] (3,0) = (4,0) (3,0) = (64,0) whereas (,0) [(,0) (3,0)] = (,0) (8,0) = (56,0). (x): [(s,t) (u,v)] (x,y) = (sv,tu) (x,y) = (svy,tux) and (s,t) [(u,v) (x,y)] = (s,t) (uy,vx) = (svx,tuy). Not equal so not associative. Counterexample: we need different x and y, say, [(,) (,)] (,) = (,) (,) = (,) whereas (,) [(,) (,)] = (,) (,) = (,). 8

Relations Equivalences, partial orderings, etc. Solution: (i): 8 4 6 (ii): 3 5 3 (iii): 60 30 3 5 7 4 6 (iv): 4 6 3 (v): 4 8 6 (vi): 3 4 36 4 6 5 Solution: (ii): Max 4,45, greatest DNE, min 3,5, least DNE. (iii): Max 9,5, greatest DNE, min 3, least 3. 45 4 9 5 3 5 Extra: Calculations modulo Solution: (i): (7+8) 46 +5 = 5 46 +5 46 +5 = + +5 = ( ) +5 = 4+5 = 9 (mod 3). The calculation is valid as gcd(,3) = and 3 is a prime. (ii): = (3 4+7) 79 (8 4+7) 79 = (3+7) 79 (9+7) 9 = 6 79 3 79 = 3 8 +3 = (3 ) 8 3 3 8 3 3 = 7 4 (mod 3). The calculation is valid as gcd(3,3) = and 3 is a prime. Extra: Recurrence equations Solution: (i): char. number: λ =, so hom. e. f(n) = n u. Odhad prav strany: f(n) = An+B, so general sol. will have form f(n) = n +An+B. Since n (n+), we get f(n) = Θ( n ). (ii): char. number: λ =, so hom. e. f(n) = u. Odhad prav strany: f(n) = n(an+b), so general sol. will have form f(n) = u+an +Bn. We get f(n) = Θ(n ). (iii): char. numbers: λ =,3, so hom. e. f(n) = u+3 n v. Odhad prav strany: f(n) = n(an+b), so general sol. will have form f(n) = u + 3 n v + An + Bn. Since 3 n (An + Bn + u), we get f(n) = Θ(3 n ). (iv): char. numbers: λ =,3, so hom. e. f(n) = u+3 n v. Odhad prav strany: f(n) = (An+B) n, so general sol. will have form f(n) = u+3 n v+(an+b) n. Since 3 n (An n +B n +u), we get f(n) = Θ(3 n ). (v): char. numbers: λ =,3, so hom. e. f(n) = u + 3 n v. Odhad prav strany: f(n) = An3 n, so general sol. will have form f(n) = u+3 n v +An3 n. We get f(n) = Θ(n3 n ). (vi): char. numbers: λ =,3, so hom. e. f(n) = u+3 n v. Odhad prav strany: f(n) = A 4 n, so general sol. will have form f(n) = u+3 n v +A 4 n. Since 4 n (3 n +u), we get f(n) = Θ(4 n ). Solution: (i): s n+ = s n +(3n+4) a s 0 = ; s h,n = u, guess s n = n(an+b) = An +Bn, obtain A = 3, B = 5, s n = 3 n + 5 n+u. Init. cond. gives u =, s n = (n+)(3n+). (ii): s n+ = s n + λ n+ a s 0 = ; s h,n = u, guess for s n+ s n = λ λ n and λ is s n = Aλ k, obtain A = λ λ, s n = λ λ λn +u. Init. cond. gives u = λ, s n = λn+ λ. (iii): s n+ = s n + (n+)(n+) a s = ; s h,n = u, guess s n = n(an +Bn+C) = An 3 +Bn +Cn, obtain A = 6, B =, C = 3, s n = 6 n3 + n + 3 n+u. Init. cond. gives u = 0, s n = n(n+)(n+) 6. (iv): s n+ = s n +(n+3) as 0 = ; s h,n = u, guesss n = n(an +Bn+C) = An 3 +Bn +Cn, obtain A = 4 3, B = 4, C = 3, s n = 4 3 n3 +4n + 3 n+u. Init. cond. gives u =, s n = (n+)(n+)(n+3) 3. 9

Extra: Structural induction Solution: (i): (0a) 0 M. (0b) M. (0c) 0 M. (a) w M = w M. (b) w M = w0 M. Remark: Without (0c) we can t get 0. (ii): (0) 0 M. (a) w M = 0w M. (b) w M = w M. Remark: We have to add from the left to guarantee the correct ending on the right. (iii): (0) M. (a) w M = 0w M. (b) w M = w M. Remark: We have to add from the left to guarantee the correct ending on the right. (iv): (0) 0 M. (a) w M = 0w M. (b) w M = w M. (c) w M = w0 M. (d) w M = w M. Solution: (i): (0a) c C = c M. (0b) c C {3} = c3 M. (a) [w M c C {3}] = wc M. (b) [w M c C {3}] = wc3 M. Remark: Without (0b) we can t get 3. (ii): (0) M. () [w M c C] = wc M. (iii): (0) c C {} = c M. () [w M c C] = cw M. Remark: We have to add from the left to guarantee the correct ending on the right. (iv): (0a) λ M (0b) [c {,3} d {,4}] = cd M. (0c) [c {,3} d {,4}] = dc M. (a) [r,s M c {,3} d {,4}] = rcsd M. (b) [r,s M c {,3} d {,4}] = rdsc M. Remark: We add from the right, each time we insert a number of opposite parity in the middle. Is that the right way? Proof of correctness of the produced words can be done recursively, we remove the right character and also some character of opposite parity from rest of the chain. We do have to allow for removing from the middle, see the chain, we do not need to make allowance for taking away from the left end. If a chain has at least 4 characters, then there must be at least two characters of opposite parity, so one of them must be in the middle for taking out. We had to add (0a), otherwise we could not create chains like. 0