# 1. What s wrong with the following proofs by induction?

Save this PDF as:

Size: px
Start display at page:

Download "1. What s wrong with the following proofs by induction?"

## Transcription

1 ArsDigita University Month : Discrete Mathematics - Professor Shai Simonson Problem Set 4 Induction and Recurrence Equations Thanks to Jeffrey Radcliffe and Joe Rizzo for many of the solutions. Pasted together and modified by Dimitri Kountourogiannis 1. What s wrong with the following proofs by induction? (a) All binary strings are identical. The proof is by induction on the size of the string. For n=0 all binary strings are empty and therefore identical. Let X = b n b n 1... b 1 b 0 be an arbitrary binary string of length n+1. Let Y = b n b n 1... b 1 and Z = b n 1... b 1 b 0. Since both Y and Z are strings of length less than n+1, by induction they are identical. Since the two strings overlap, X must also be identical to each of them. This is not a subtly flawed proof. It is a terribly flawed proof. The problem is with the induction step. It is never true that the pasting together of two identical strings is identical to the strings. Furthermore, the n = 1 case fails for another reason: A string of length 1 is not the pasting together of two strings of length 0. (b) Any amount of change greater than or equal to twenty can be gotten with a combination of five cent and seven cent coins. The proof is by induction on the amount of change. For twenty cents use four five-cent coins. Let n > 0 be the amount of change. Assume that n = 7x + y for some non-negative integers x and y. For any n > 0, either x > 1, or y > 3. If x > 1, then since 3() (7) = 1, n+1 = (y+3)+7(x ). If y > 3, then since 3(7) 4() = 1, n+1 = 7(x+3)+(y 4). In either case, we showed that n+1 = 7u + v where u and v are non-negative integers. For any n > 0, either x > 1 or y > 3 is false. For example, if n = 1, then 1 = Prove by induction that: (a) The nth Fibonacci number, F n equals where F 0 = 0 and F 1 = 1. Base Case: These hold since and [ G 1 = 1 [ G 0 = 1 ( 1 + [ G n = 1 ( 1 + ( 1 + ) n ( 1 + ] ) n ) 0 ( 1 + ] ) 0 = 1 (1 1) = 0 ) 1 ( 1 + ] [ ) 1 = ] = 1 Induction Step: Suppose that G n = F n and G n 1 = F n 1 We would like to show G n+1 = F n+1 Let a = ( 1 + ) Let b = ( 1 ) We will use the fact that a, b are roots of r r 1 = 0 and hence a = a + 1 b = b + 1 1

2 Starting with G n+1, G n+1 = 1 (a n+1 b n+1 ) = 1 (a a n 1 b b n 1 ) So the induction step is proven. QED. = 1 ((a + 1)a n 1 (b + 1)b n 1 ) = 1 (a n b n ) + 1 (a n 1 b n 1 )) = F n + F n 1 = F n+1 (b) The sum of the geometric series 1 + a + a a n equals (1 a n +1 )/(1 a), where a does not equal one. Base Case: n = 0 Inductive Step: Suppose Then (1 a 0+1 ) 1 a = a + a a n = 1 an+1 1 a 1 + a + a a n + a n+1 = 1 an+1 1 a And the inductive step is proven. Q.E.D. (c) 1 divides 4 n+1 + n 1 + a n+1 = 1 an+1 + a n+1 a n+ 1 a = 1 an+ 1 a Base Case: If n = 1, then = 1, which is divisible by 1. Inductive step: Assume that for some n is divisible by 1. Then 4 n+1 + n 1 4 n+ + n+1 = 4 4 n+1 + n 1 = 4 4 n n n 1 = 4( 4 n+1 + n 1 ) + 1 n 1 The first term is divisible by 1 by the induction hypothesis, and the second term is manifestly divisible by 1. Hence the induction step holds. Q.E.D.

3 (d) The number of leaves in a complete binary tree is one more than the number of internal nodes. (Hint: Split the tree up into two smaller trees). We induct on the depth of the tree. Base Case: For a tree of depth 1, there is one internal node and two leaves. Inductive step: Suppose for all complete binary trees T of depth at most n, that L(T ) = I(T ) + 1 Where L(t) is the number of leaves of T and I(T ) is the number of internal nodes of T. Let B n+1 be a complete binary tree of depth n + 1. We would like to verify L(B n+1 )? =? I(B n+1 ) + 1 This will follow from the following relations between B n+1 and its left and right subtrees B n, B n. I(B n+1 ) = I(B n ) + I(B n) + 1 (+1 for the new root) L(B n+1 ) = L(B n ) + L(B n) So L(B n+1 ) = L(B n ) + L(B n) = (I(B n ) + 1) + (I(B n) + 1) by induction = (I(B n ) + I(B n) + 1) = I(B n+1 ) + 1 And the induction step is proven. Q.E.D. (e) A graph s edges can be covered by n edge-disjoint paths, but not n-1, if and only if the graph has n pairs of odd-degree vertices. (Euler discussed the case for n = 1). There are two directions to the proof. Thanks to Sam Klein for the argument in the first direction. Suppose that a graph G has n pairs of odd degree vertices, a 1, b 1, a, b,..., a n, b n. Construct a graph G that is G with the n edges {a 1, b 1 }, {a n, b n } thrown in. In G all the vertices are of even degree, so there is an Euler circuit, i.e. a path which traverses every edge of G without going over any edge twice. Removing the edges we added to G, we chop the loop into n edge-disjoint paths that cover G. To prove the rest, we will use the following fact: X has at most k pairs of odd-degree vertices. if k edge-disjoint paths cover a graph X, then This is because an odd degree vertex must lie at the beginning or the end of some path, or else there will be an outgoing edge for each incoming edge at the vertex and so it will necessarily be even degree. So it follows that there cannot be n 1 edge-disjoint paths if there are n pairs of odd-degree vertices. Conversely, if there are n edge disjoint paths but not n 1 (or any smaller number). We know then that there are at most n pairs of odd vertices. If there were fewer than n pairs of odd vertices then by the other direction of the proof, we would have fewer than n edge-disjoint paths that cover the graph, which would contradict our assumption. Therefore there must be n pairs of odd-degree vertices. 3

4 3. Solve the following recurrence equations using the techniques for linear recurrence relations with constant coefficients. State whether or not each recurrence is homogeneous. (a) a n = a n 1 8a n, and a 0 = 4, a 1 = 10. a n = a n 1 8a n, and a 0 = 4, a 1 = 10 This is a homogeneous recurrence equation. r k r k = rk 1 8k k r k r = r 8 r r + 8 = 0 (r )(r 4) = 0 The roots are, 4. a n = α 1 n + α 4 n a 0 = α α 4 0 = α 1 + α = 4 a 1 = α α 4 1 = α 1 + 4α = 10 α 1 = 3 and α = 1. The solution is a n = 3( n ) + 1(4 n ). (b) a n = a n 1 + a n, and a 0 = 0, a 1 = 1. This is a homogeneous recurrence equation. The solution is a n = 1 3 (n ) 1 3 ( 1n ). (c) a n = 7a n 1 10a n + 3 n, and a 0 = 0, a 1 = 1. This is a nonhomogenous equation. homogeneous equation: First, determine the roots of the associated r k r k = 7rk 1 10k k r k r = 7r 10 r = 0 (r )(r ) = 0 4

5 The roots are and. Next, find the particular solution, setting p3 n = a n : p3 n = 7p3 n 1 10p3 n + 3 n 7 3 p3n 10 9 p3n + 3 n 3 n p = 7 3 p 10 9 p + 1 p3 n 3 n = 9 9 p 1 9 p p = 1 9 p = 1 p = 9 a n = α 1 n + α 4 n a 0 = 0 = α α 4 0 = α 1 + α 9 a 1 = 1 = α α (31 ) = α 1 + α 7 Solving these equations, α 1 = 11, and α = 1. The final solution is (d) a n = 3 a n 1 9a n, and a 0 = 0, a 1 = 1. a n = 11(n ) + 1( n ) 7(3 n ). This is not a homogeneous recurrence equation. The solution is a n = 3 1 ( 3n ) 1 1 n( 3n ) A particular graph-matching algorithm on n nodes, works by doing n steps, and then solving a new matching problem on a graph with one vertex less. (a) Show that the number of steps it takes to run the algorithm on a graph with n nodes is equal to the sum of the first n perfect squares. Taking T 0 = 0 as the base case, we can use substitution to show that this algorithm is equal to the sum of the squares from one to n. T n = T n 1 + n = (T n 1 + (n 1) ) + n = (T n + (n ) ) + (n 1) + n = T n r + (n r) + (n (r + 1)) + (n (r + )) )... (n 1) + n = (n 1) + n = (n 1) + n (b) Derive the formula for the sum of the first n perfect squares by constructing an appropriate linear non-homogeneous recurrence equation and solving it.

6 The general equation for the recurrence equation a n = a n 1 + n can be expressed as a n = α 1 (1 n ) + n(p n + p 1 n + p 0 )(1 n ). First solve to find a (p) n : a n = n(p n + p 1 n + p 0 ) = p n 3 + p 1 n + p 0 n (p (n 1) 3 + p 1 (n 1) + p 0 (n 1)) + n p n 3 + p 1 n + p 0 n (p n 3 p 3n + p 3n p ) + (p 1 n p 1 n + p 1 ) + (p 0 n p 0 ) + n p 3n p 3n + p + p 1 n p 1 + p 0 n = 0 (3p 1)n + (p 1 3p )n + (p p 1 + p 0 ) = 0 ( 1)n + (0)n + (p p 1 + p 0 ) = 0 Solving the series of equations, p = 1 3, p 1 = 1, and p 0 = 1. So, a(p) n = ( n ) + 3n + 1 Solving for a 0 = 0, a (h) n ( n n 3 + n + 1 ) = n = 0. The closed form is then n(n+1)(n+1). = n(n + 1)(n + 1). (c) Show that the time complexity of this algorithm is Θ(n 3 ). We can multiply the the solution from 4b to equal 1 (n3 + 3n + n), and show that this function is both O(n 3 ) and Ω(n 3 ) as follows: 1 (n3 + 3n + n) n 3 1 (n3 + 3n + n) 1 n3 with n > 1. Therefore, this function is Θ(n 3 ).. Write a recurrence relation to compute the number of binary strings with n digits that do not have two consecutive 1 s. Solve the recurrence, and determine what percentage of 8-bit binary strings do not contain two consecutive 1 s. In the following table, T n is the number of binary numbers which do not have consecutive ones with n binary digits. T n n This can be expressed in the recurrence equation T n = T n 1 + T n, with T 1 = and T = 3. This is just the Fibonacci recurrence relation with initial conditions shifted over by, since F 3 =, and F 4 = 3 That is, [ T n = F n+ = 1 ( 1 + ) n+ ( 1 + ] ) n+

7 The percentage binary numbers which do not have consecutive ones for n = 8 is, or 1.%. Note, we don t need a brute force method to figure out the recurrence relation. It can be proven as follows: Either the string begins with a 0, and there are T n 1 cases were this happens, or the string begins with a 1, so necessarilly, the first two bits are 10, and there are T n cases were this happens.. Strassen s algorithm shows how to multiply two n by n matrices by multiplying 7 pairs of n/ by n/ matrices, and then doing n operations to combine them. Write the recurrence equation for this algorithm, and calculate the complexity of Strassen s algorithm, by solving the recurrence by repeated substitution. Strassen s algorithm can be expressed in the recurrence equation T n = 7T n +n. Assuming T 1 = 1, we can solve this algorithm iteratively as follows: T 1 = 1 T = 7 + T 4 = 7(7 + )4 = T 8 = 7( ) + 8 = T k = 7 k + 7 k k k + k This is a geometric series with a ratio of 7. Its sum is k k = 1 3 (7k+1 k+ ) Because powers of seven beat powers of four, this is Θ(7 k+1 ) = Θ(7 k ). And since So the algorithm is Θ(n log 7 ) 7 k = log 7 k = ( k ) (log 7) = n log 7 7. Write and solve the recurrence equations for the time complexity of the following recursive algorithms. Explain why your equations are correct. (a) To search for a value in a sorted list, compare it to the middle value, and search the right half of the list if it is larger, and the left half if it is smaller. The equation for this algorithm is T n = T n + 1. It is O(log n) (b) The maximum of a list of numbers is the larger of the maximum of the first half and the maximum of the second half. The equation for this algorithm is T n = T n + n. It is O(n log n). (c) To sort a list of numbers, divide the list into four equal parts. Sort each part. Merge these sorted four lists into two sorted lists, and then merge the two into one. The equation for this algorithm is T n = 4T n + n. It is O(n log n) Solving the following recurrence by a change of variable: a n = a n + lg n, a 1 = 0. (Solve by setting m = lg n). You should solve this only when n is to the power of k. 7

8 Let m = log n n = m. Define b m = a n = a m. Then, so b m = a n = a n + log n = a m + m = b m + m b 1 = C b = C + 1 = (C + 1) b 4 = (C + 1) + = (C + ) b 8 = (C + ) + 3 = 3 (C + 3). b k = k (C + k) So or a k = k (C + k) a n = log n(c + log log n) 9. Parenthesized Expressions (a) A sequence of n+1 matrices A 1 A... A n+1 can be multiplied together in many different ways dependent on the way n pairs of parentheses are inserted. For example for n+1 = 3, there are two ways to insert the parentheses: ((A 1 A )A 3 ) and (A 1 (A A 3 )). Write a recurrence equation for the number of ways to insert k pairs of parenthesis. Do not solve it. (Hint: Concentrate on where the last multiplication occurs). This algorithm can be expressed as T n = T 1 T n 1 + T T n + T 3 T n T n 1 T 1. (b) Write a list of the different ways to parenthesize a sequence of n+1 matrices for n+1=,3,4. The following table shows the possible combinations for n + 1 =, 3, 4. n + 1 possilibities (A 1 A ) 3 (A 1 (A A 3 )) ((A 1 A ) A 3 ) 4 ((A 1 (A A 3 )) A 4 ) (((A 1 A ) A 3 ) A 4 ) (A 1 (A (A 3 A 4 ))) (A 1 ((A A 3 ) A 4 )) ((A 1 A ) (A 3 A 4 )) (c) A balanced arrangement of parenthesis is defined inductively as follows: The empty string is a balanced arrangement of parentheses. If x is balanced arrangement of parentheses then so is (x). If u and v are each a balanced arrangement of parentheses, then so is uv. 8

9 Write a list of strings that represent a balanced arrangement of n parentheses for n=1,,3. The following table shows the possible combinations for n = 1,, 3. n possilibities 1 () (()) ()() 3 (())() ()()() ((())) (()()) ()(()) (d) Describe a 1-1 correspondence between the strings that are balanced arrangements of n pairs of parentheses, and the number of ways to multiply a sequence of n+1 matrices. It s easier to see this, if we map both things to a third set of strings. For the pairs of parentheses replace the left parentheses with α and the right parentheses with β. For example: n possilibities transformed form 1 () αβ (()) ααββ ()() αβαβ 3 (())() ααββαβ ()()() αβαβαβ ((())) αααβββ (()()) ααβαβα ()(()) αβααββ For the ways to multiply n + 1 matrices, remove the matrices and the left parentheses from the expression, and replace any multiplication by α and any right parenthesis by β. For example: n + 1 possilibities transformed form (A 1 A ) αβ 3 (A 1 (A A 3 )) ααββ ((A 1 A ) A 3 ) αβαβ 4 ((A 1 (A A 3 )) A 4 ) ααββαβ (((A 1 A ) A 3 ) A 4 ) αβαβαβ (A 1 (A (A 3 A 4 ))) αααβββ (A 1 ((A A 3 ) A 4 )) ααβαββ ((A 1 A ) (A 3 A 4 )) αβααββ 10. Prove that any O( E ) time algorithm on a planar graph is also O( V ). (Hint: Use the fact that every face has at least three vertices and edges, and a counting argument, to calculate a relationship between the number of faces and the number of edges. Then use Euler s Theorem to derive a linear relationship between the number of edges and the number of vertices.) (The devil is in the details... Note that the statement is false without the condition that the graph is simple, i.e. that there is at most one edge connecting any two vertices. Otherwise we could add an arbitrary number of edges between two vertices. and so make the number of edges much much larger than the number or vertices ) The statement follows from the following claim: from page 0 of Rosen On any simple connected planar graph with e edges and v vertices, e 3v. 9

10 Therefore if the algorithm satisfies T Graph Ce for large enough e, it satisfies Hence the algorithm is O(v) T Graph C(3v ) < 3Cv 11. The following recurrence cannot be solved using the master theorem. Explain why. Solve it directly by substitution, and calculate its order of growth. T (n) = 4T (n/) + (nlogn) and T(1) = 1. It fails to satisfy the hypotheses of the master theorem.. In this case a = 4, b = and log a b = The function n log n is Ω(n loga b ) = Ω(n ), however it is not polynomially greater than n so the master theorem does not apply. Let s solve this for n = k by repeated substitution. The recurrence relation becomes T ( k ) = 4T ( k 1 ) + 4 k k Assuming T ( 0 ) = 1 Then, T ( 1 ) = T ( ) = (4 + 4 ) + 4 T ( 3 ) = ( ) T ( 4 ) = ( ) T ( k ) = 4 k ( k ) = 4 k k(k + 1)(k + 1) (1 + ) So T ( k ) is Θ(k 3 4 k ), or Θ((log n) 3 n ) 10

### Mathematical Induction. Lecture 10-11

Mathematical Induction Lecture 10-11 Menu Mathematical Induction Strong Induction Recursive Definitions Structural Induction Climbing an Infinite Ladder Suppose we have an infinite ladder: 1. We can reach

### Discrete Mathematics Problems

Discrete Mathematics Problems William F. Klostermeyer School of Computing University of North Florida Jacksonville, FL 32224 E-mail: wkloster@unf.edu Contents 0 Preface 3 1 Logic 5 1.1 Basics...............................

### Math 55: Discrete Mathematics

Math 55: Discrete Mathematics UC Berkeley, Spring 2012 Homework # 9, due Wednesday, April 11 8.1.5 How many ways are there to pay a bill of 17 pesos using a currency with coins of values of 1 peso, 2 pesos,

### Math 55: Discrete Mathematics

Math 55: Discrete Mathematics UC Berkeley, Fall 2011 Homework # 5, due Wednesday, February 22 5.1.4 Let P (n) be the statement that 1 3 + 2 3 + + n 3 = (n(n + 1)/2) 2 for the positive integer n. a) What

### Full and Complete Binary Trees

Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full

### Mathematical induction. Niloufar Shafiei

Mathematical induction Niloufar Shafiei Mathematical induction Mathematical induction is an extremely important proof technique. Mathematical induction can be used to prove results about complexity of

### SECTION 10-2 Mathematical Induction

73 0 Sequences and Series 6. Approximate e 0. using the first five terms of the series. Compare this approximation with your calculator evaluation of e 0.. 6. Approximate e 0.5 using the first five terms

### Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.

7 Catalan Numbers Thomas A. Dowling, Department of Mathematics, Ohio State Uni- Author: versity. Prerequisites: The prerequisites for this chapter are recursive definitions, basic counting principles,

### Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

1. (Chapter 1 supplementary, problem 7): There are 12 men at a dance. (a) In how many ways can eight of them be selected to form a cleanup crew? (b) How many ways are there to pair off eight women at the

### Section 6-2 Mathematical Induction

6- Mathematical Induction 457 In calculus, it can be shown that e x k0 x k k! x x x3!! 3!... xn n! where the larger n is, the better the approximation. Problems 6 and 6 refer to this series. Note that

### Discrete Mathematics: Homework 7 solution. Due: 2011.6.03

EE 2060 Discrete Mathematics spring 2011 Discrete Mathematics: Homework 7 solution Due: 2011.6.03 1. Let a n = 2 n + 5 3 n for n = 0, 1, 2,... (a) (2%) Find a 0, a 1, a 2, a 3 and a 4. (b) (2%) Show that

### Intro. to the Divide-and-Conquer Strategy via Merge Sort CMPSC 465 CLRS Sections 2.3, Intro. to and various parts of Chapter 4

Intro. to the Divide-and-Conquer Strategy via Merge Sort CMPSC 465 CLRS Sections 2.3, Intro. to and various parts of Chapter 4 I. Algorithm Design and Divide-and-Conquer There are various strategies we

### Recursive Algorithms. Recursion. Motivating Example Factorial Recall the factorial function. { 1 if n = 1 n! = n (n 1)! if n > 1

Recursion Slides by Christopher M Bourke Instructor: Berthe Y Choueiry Fall 007 Computer Science & Engineering 35 Introduction to Discrete Mathematics Sections 71-7 of Rosen cse35@cseunledu Recursive Algorithms

### 3. Mathematical Induction

3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

### CMPS 102 Solutions to Homework 1

CMPS 0 Solutions to Homework Lindsay Brown, lbrown@soe.ucsc.edu September 9, 005 Problem..- p. 3 For inputs of size n insertion sort runs in 8n steps, while merge sort runs in 64n lg n steps. For which

### Section IV.1: Recursive Algorithms and Recursion Trees

Section IV.1: Recursive Algorithms and Recursion Trees Definition IV.1.1: A recursive algorithm is an algorithm that solves a problem by (1) reducing it to an instance of the same problem with smaller

### 2.3 Scheduling jobs on identical parallel machines

2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

### Notes: Chapter 2 Section 2.2: Proof by Induction

Notes: Chapter 2 Section 2.2: Proof by Induction Basic Induction. To prove: n, a W, n a, S n. (1) Prove the base case - S a. (2) Let k a and prove that S k S k+1 Example 1. n N, n i = n(n+1) 2. Example

### Why? A central concept in Computer Science. Algorithms are ubiquitous.

Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

### Sample Induction Proofs

Math 3 Worksheet: Induction Proofs III, Sample Proofs A.J. Hildebrand Sample Induction Proofs Below are model solutions to some of the practice problems on the induction worksheets. The solutions given

### Lecture 1: Course overview, circuits, and formulas

Lecture 1: Course overview, circuits, and formulas Topics in Complexity Theory and Pseudorandomness (Spring 2013) Rutgers University Swastik Kopparty Scribes: John Kim, Ben Lund 1 Course Information Swastik

### Induction. Margaret M. Fleck. 10 October These notes cover mathematical induction and recursive definition

Induction Margaret M. Fleck 10 October 011 These notes cover mathematical induction and recursive definition 1 Introduction to induction At the start of the term, we saw the following formula for computing

### Many algorithms, particularly divide and conquer algorithms, have time complexities which are naturally

Recurrence Relations Many algorithms, particularly divide and conquer algorithms, have time complexities which are naturally modeled by recurrence relations. A recurrence relation is an equation which

### CS473 - Algorithms I

CS473 - Algorithms I Lecture 4 The Divide-and-Conquer Design Paradigm View in slide-show mode 1 Reminder: Merge Sort Input array A sort this half sort this half Divide Conquer merge two sorted halves Combine

### Induction Problems. Tom Davis November 7, 2005

Induction Problems Tom Davis tomrdavis@earthlin.net http://www.geometer.org/mathcircles November 7, 2005 All of the following problems should be proved by mathematical induction. The problems are not necessarily

### Introduction. Appendix D Mathematical Induction D1

Appendix D Mathematical Induction D D Mathematical Induction Use mathematical induction to prove a formula. Find a sum of powers of integers. Find a formula for a finite sum. Use finite differences to

### Appendix F: Mathematical Induction

Appendix F: Mathematical Induction Introduction In this appendix, you will study a form of mathematical proof called mathematical induction. To see the logical need for mathematical induction, take another

### Homework Exam 1, Geometric Algorithms, 2016

Homework Exam 1, Geometric Algorithms, 2016 1. (3 points) Let P be a convex polyhedron in 3-dimensional space. The boundary of P is represented as a DCEL, storing the incidence relationships between the

### CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis. Linda Shapiro Winter 2015

CSE373: Data Structures and Algorithms Lecture 3: Math Review; Algorithm Analysis Linda Shapiro Today Registration should be done. Homework 1 due 11:59 pm next Wednesday, January 14 Review math essential

### Homework until Test #2

MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such

### Finding and counting given length cycles

Finding and counting given length cycles Noga Alon Raphael Yuster Uri Zwick Abstract We present an assortment of methods for finding and counting simple cycles of a given length in directed and undirected

### APPLICATIONS OF THE ORDER FUNCTION

APPLICATIONS OF THE ORDER FUNCTION LECTURE NOTES: MATH 432, CSUSM, SPRING 2009. PROF. WAYNE AITKEN In this lecture we will explore several applications of order functions including formulas for GCDs and

### Indiana State Core Curriculum Standards updated 2009 Algebra I

Indiana State Core Curriculum Standards updated 2009 Algebra I Strand Description Boardworks High School Algebra presentations Operations With Real Numbers Linear Equations and A1.1 Students simplify and

### Examination paper for MA0301 Elementær diskret matematikk

Department of Mathematical Sciences Examination paper for MA0301 Elementær diskret matematikk Academic contact during examination: Iris Marjan Smit a, Sverre Olaf Smalø b Phone: a 9285 0781, b 7359 1750

### Analysis of Algorithms, I

Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadth-first search (BFS) 4 Applications

### Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs Kousha Etessami U. of Edinburgh, UK Kousha Etessami (U. of Edinburgh, UK) Discrete Mathematics (Chapter 6) 1 / 13 Overview Graphs and Graph

### The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, cheapest first, we had to determine whether its two endpoints

### Graphs without proper subgraphs of minimum degree 3 and short cycles

Graphs without proper subgraphs of minimum degree 3 and short cycles Lothar Narins, Alexey Pokrovskiy, Tibor Szabó Department of Mathematics, Freie Universität, Berlin, Germany. August 22, 2014 Abstract

### 2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)

### Euler Paths and Euler Circuits

Euler Paths and Euler Circuits An Euler path is a path that uses every edge of a graph exactly once. An Euler circuit is a circuit that uses every edge of a graph exactly once. An Euler path starts and

### Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

CSE599s: Extremal Combinatorics November 21, 2011 Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs Lecturer: Anup Rao 1 An Arithmetic Circuit Lower Bound An arithmetic circuit is just like

### Graph Theory Problems and Solutions

raph Theory Problems and Solutions Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles November, 005 Problems. Prove that the sum of the degrees of the vertices of any finite graph is

### 1.1 Logical Form and Logical Equivalence 1

Contents Chapter I The Logic of Compound Statements 1.1 Logical Form and Logical Equivalence 1 Identifying logical form; Statements; Logical connectives: not, and, and or; Translation to and from symbolic

### Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

### Binary Search Trees CMPSC 122

Binary Search Trees CMPSC 122 Note: This notes packet has significant overlap with the first set of trees notes I do in CMPSC 360, but goes into much greater depth on turning BSTs into pseudocode than

### Homework 5 Solutions

Homework 5 Solutions 4.2: 2: a. 321 = 256 + 64 + 1 = (01000001) 2 b. 1023 = 512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = (1111111111) 2. Note that this is 1 less than the next power of 2, 1024, which

### Divide And Conquer Algorithms

CSE341T/CSE549T 09/10/2014 Lecture 5 Divide And Conquer Algorithms Recall in last lecture, we looked at one way of parallelizing matrix multiplication. At the end of the lecture, we saw the reduce SUM

### 8.1 Min Degree Spanning Tree

CS880: Approximations Algorithms Scribe: Siddharth Barman Lecturer: Shuchi Chawla Topic: Min Degree Spanning Tree Date: 02/15/07 In this lecture we give a local search based algorithm for the Min Degree

### The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

### Answer Key for California State Standards: Algebra I

Algebra I: Symbolic reasoning and calculations with symbols are central in algebra. Through the study of algebra, a student develops an understanding of the symbolic language of mathematics and the sciences.

### MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

MATHEMATICAL INDUCTION MIGUEL A LERMA (Last updated: February 8, 003) Mathematical Induction This is a powerful method to prove properties of positive integers Principle of Mathematical Induction Let P

### princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora Scribe: One of the running themes in this course is the notion of

### 12 Abstract Data Types

12 Abstract Data Types 12.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define the concept of an abstract data type (ADT).

### Solutions for Practice problems on proofs

Solutions for Practice problems on proofs Definition: (even) An integer n Z is even if and only if n = 2m for some number m Z. Definition: (odd) An integer n Z is odd if and only if n = 2m + 1 for some

### Data Structures and Algorithms Written Examination

Data Structures and Algorithms Written Examination 22 February 2013 FIRST NAME STUDENT NUMBER LAST NAME SIGNATURE Instructions for students: Write First Name, Last Name, Student Number and Signature where

### IB Maths SL Sequence and Series Practice Problems Mr. W Name

IB Maths SL Sequence and Series Practice Problems Mr. W Name Remember to show all necessary reasoning! Separate paper is probably best. 3b 3d is optional! 1. In an arithmetic sequence, u 1 = and u 3 =

### Parallel Random Access Machine (PRAM) PRAM Algorithms. Shared Memory Access Conflicts. A Basic PRAM Algorithm. Time Optimality.

Parallel Random Access Machine (PRAM) PRAM Algorithms Arvind Krishnamurthy Fall 2 Collection of numbered processors Accessing shared memory cells Each processor could have local memory (registers) Each

### Outline BST Operations Worst case Average case Balancing AVL Red-black B-trees. Binary Search Trees. Lecturer: Georgy Gimel farb

Binary Search Trees Lecturer: Georgy Gimel farb COMPSCI 220 Algorithms and Data Structures 1 / 27 1 Properties of Binary Search Trees 2 Basic BST operations The worst-case time complexity of BST operations

### Worksheet on induction Calculus I Fall 2006 First, let us explain the use of for summation. The notation

Worksheet on induction MA113 Calculus I Fall 2006 First, let us explain the use of for summation. The notation f(k) means to evaluate the function f(k) at k = 1, 2,..., n and add up the results. In other

### Cost Model: Work, Span and Parallelism. 1 The RAM model for sequential computation:

CSE341T 08/31/2015 Lecture 3 Cost Model: Work, Span and Parallelism In this lecture, we will look at how one analyze a parallel program written using Cilk Plus. When we analyze the cost of an algorithm

### SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH

31 Kragujevac J. Math. 25 (2003) 31 49. SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH Kinkar Ch. Das Department of Mathematics, Indian Institute of Technology, Kharagpur 721302, W.B.,

### Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

### Mathematics for Algorithm and System Analysis

Mathematics for Algorithm and System Analysis for students of computer and computational science Edward A. Bender S. Gill Williamson c Edward A. Bender & S. Gill Williamson 2005. All rights reserved. Preface

### 3. INNER PRODUCT SPACES

. INNER PRODUCT SPACES.. Definition So far we have studied abstract vector spaces. These are a generalisation of the geometric spaces R and R. But these have more structure than just that of a vector space.

### Polynomials and Vieta s Formulas

Polynomials and Vieta s Formulas Misha Lavrov ARML Practice 2/9/2014 Review problems 1 If a 0 = 0 and a n = 3a n 1 + 2, find a 100. 2 If b 0 = 0 and b n = n 2 b n 1, find b 100. Review problems 1 If a

### 2. Methods of Proof Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try.

2. METHODS OF PROOF 69 2. Methods of Proof 2.1. Types of Proofs. Suppose we wish to prove an implication p q. Here are some strategies we have available to try. Trivial Proof: If we know q is true then

### PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include 2 + 5.

PUTNAM TRAINING POLYNOMIALS (Last updated: November 17, 2015) Remark. This is a list of exercises on polynomials. Miguel A. Lerma Exercises 1. Find a polynomial with integral coefficients whose zeros include

### CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

CONTINUED FRACTIONS AND PELL S EQUATION SEUNG HYUN YANG Abstract. In this REU paper, I will use some important characteristics of continued fractions to give the complete set of solutions to Pell s equation.

### CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

### Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Computer Algorithms NP-Complete Problems NP-completeness The quest for efficient algorithms is about finding clever ways to bypass the process of exhaustive search, using clues from the input in order

### Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

### SCORE SETS IN ORIENTED GRAPHS

Applicable Analysis and Discrete Mathematics, 2 (2008), 107 113. Available electronically at http://pefmath.etf.bg.ac.yu SCORE SETS IN ORIENTED GRAPHS S. Pirzada, T. A. Naikoo The score of a vertex v in

### V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005

V. Adamchik 1 Graph Theory Victor Adamchik Fall of 2005 Plan 1. Basic Vocabulary 2. Regular graph 3. Connectivity 4. Representing Graphs Introduction A.Aho and J.Ulman acknowledge that Fundamentally, computer

### = 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without

### Exercises of Discrete Mathematics

Exercises of Discrete Mathematics Updated: February 4, 2011 Note for the students: the proposed solutions of some exercises are quite lengthy. This does not necessarily mean that the exercise is difficult:

### Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

### Discrete Math in Computer Science Homework 7 Solutions (Max Points: 80)

Discrete Math in Computer Science Homework 7 Solutions (Max Points: 80) CS 30, Winter 2016 by Prasad Jayanti 1. (10 points) Here is the famous Monty Hall Puzzle. Suppose you are on a game show, and you

### Just the Factors, Ma am

1 Introduction Just the Factors, Ma am The purpose of this note is to find and study a method for determining and counting all the positive integer divisors of a positive integer Let N be a given positive

### Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new

Reminder: Complexity (1) Parallel Complexity Theory Lecture 6 Number of steps or memory units required to compute some result In terms of input size Using a single processor O(1) says that regardless of

### Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new GAP (2) Graph Accessibility Problem (GAP) (1)

Reminder: Complexity (1) Parallel Complexity Theory Lecture 6 Number of steps or memory units required to compute some result In terms of input size Using a single processor O(1) says that regardless of

### MA3059 Combinatorics and Graph Theory

MA3059 Combinatorics and Graph Theory Martin Stynes Department of Mathematics, UCC January 23, 2007 Abstract These notes are designed to accompany the textbook A first course in discrete mathematics by

### Binary Multiplication

Binary Multiplication Q: How do we multiply two numbers? eg. 12, 345 6, 789 111105 987600 8641500 + 74070000 83, 810, 205 10111 10101 10111 00000 1011100 0000000 + 101110000 111100011 Pad, multiply and

### 1 Introduction to Counting

1 Introduction to Counting 1.1 Introduction In this chapter you will learn the fundamentals of enumerative combinatorics, the branch of mathematics concerned with counting. While enumeration problems can

### Zachary Monaco Georgia College Olympic Coloring: Go For The Gold

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold Coloring the vertices or edges of a graph leads to a variety of interesting applications in graph theory These applications include various

### Functions and Equations

Centre for Education in Mathematics and Computing Euclid eworkshop # Functions and Equations c 014 UNIVERSITY OF WATERLOO Euclid eworkshop # TOOLKIT Parabolas The quadratic f(x) = ax + bx + c (with a,b,c

### 5.1 The Remainder and Factor Theorems; Synthetic Division

5.1 The Remainder and Factor Theorems; Synthetic Division In this section you will learn to: understand the definition of a zero of a polynomial function use long and synthetic division to divide polynomials

### 6.3 Conditional Probability and Independence

222 CHAPTER 6. PROBABILITY 6.3 Conditional Probability and Independence Conditional Probability Two cubical dice each have a triangle painted on one side, a circle painted on two sides and a square painted

### Reading 13 : Finite State Automata and Regular Expressions

CS/Math 24: Introduction to Discrete Mathematics Fall 25 Reading 3 : Finite State Automata and Regular Expressions Instructors: Beck Hasti, Gautam Prakriya In this reading we study a mathematical model

### Sample Questions Csci 1112 A. Bellaachia

Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k

### Dynamic Programming. Applies when the following Principle of Optimality

Dynamic Programming Applies when the following Principle of Optimality holds: In an optimal sequence of decisions or choices, each subsequence must be optimal. Translation: There s a recursive solution.

### Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction

Lecture 11 Dynamic Programming 11.1 Overview Dynamic Programming is a powerful technique that allows one to solve many different types of problems in time O(n 2 ) or O(n 3 ) for which a naive approach

### CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

### Binary Search Trees. Data in each node. Larger than the data in its left child Smaller than the data in its right child

Binary Search Trees Data in each node Larger than the data in its left child Smaller than the data in its right child FIGURE 11-6 Arbitrary binary tree FIGURE 11-7 Binary search tree Data Structures Using

### Answers to some of the exercises.

Answers to some of the exercises. Chapter 2. Ex.2.1 (a) There are several ways to do this. Here is one possibility. The idea is to apply the k-center algorithm first to D and then for each center in D

### CMPSCI611: Approximating MAX-CUT Lecture 20

CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to

### HOMEWORK 5 SOLUTIONS. n!f n (1) lim. ln x n! + xn x. 1 = G n 1 (x). (2) k + 1 n. (n 1)!

Math 7 Fall 205 HOMEWORK 5 SOLUTIONS Problem. 2008 B2 Let F 0 x = ln x. For n 0 and x > 0, let F n+ x = 0 F ntdt. Evaluate n!f n lim n ln n. By directly computing F n x for small n s, we obtain the following

### 4/1/2017. PS. Sequences and Series FROM 9.2 AND 9.3 IN THE BOOK AS WELL AS FROM OTHER SOURCES. TODAY IS NATIONAL MANATEE APPRECIATION DAY

PS. Sequences and Series FROM 9.2 AND 9.3 IN THE BOOK AS WELL AS FROM OTHER SOURCES. TODAY IS NATIONAL MANATEE APPRECIATION DAY 1 Oh the things you should learn How to recognize and write arithmetic sequences

### Lecture Notes on Polynomials

Lecture Notes on Polynomials Arne Jensen Department of Mathematical Sciences Aalborg University c 008 Introduction These lecture notes give a very short introduction to polynomials with real and complex