Some Review Problems for Exam 3: Solutions

Similar documents
Some Review Problems for Exam 3: Solutions

Some Review Problems for Exam 2: Solutions

Combinatorics. But there are some standard techniques. That s what we ll be studying.

Math 324 Summer 2012 Elementary Number Theory Notes on Mathematical Induction

MATH 324 Summer 2011 Elementary Number Theory. Notes on Mathematical Induction. Recall the following axiom for the set of integers.

Math 378 Spring 2011 Assignment 4 Solutions

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

Binomial Coefficient Identities/Complements

Discrete Probability

1 Basic Combinatorics

Math Fall Final Exam. Friday, 14 December Show all work for full credit. The problems are worth 6 points each.

MATH 243E Test #3 Solutions

1 Sequences and Summation

0.1. Linear transformations

Probabilistic models

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

CS1800: Sequences & Sums. Professor Kevin Gold

Discrete Mathematics & Mathematical Reasoning Chapter 6: Counting

Lecture 4: Counting, Pigeonhole Principle, Permutations, Combinations Lecturer: Lale Özkahya

Fall 2017 Test II review problems

Solutions to February 2008 Problems


2 Generating Functions

2 - Strings and Binomial Coefficients

Probability. Part 1 - Basic Counting Principles. 1. References. (1) R. Durrett, The Essentials of Probability, Duxbury.

Exam 2 Solutions. x 1 x. x 4 The generating function for the problem is the fourth power of this, (1 x). 4

Review problems solutions

Sums and Products. a i = a 1. i=1. a i = a i a n. n 1

Some Review Problems for Exam 1: Solutions

First Midterm Examination

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality

MATH 3012 N Solutions to Review for Midterm 2

Chapter 11 - Sequences and Series

Probabilistic models

MATH 114 Fall 2004 Solutions to practice problems for Final Exam

1 The Basic Counting Principles

C if U can. Algebra. Name

CSCE 222 Discrete Structures for Computing. Dr. Hyunyoung Lee

. As the binomial coefficients are integers we have that. 2 n(n 1).

Discrete Mathematics. Kishore Kothapalli

Name: Exam 2 Solutions. March 13, 2017

Recurrence Relations and Recursion: MATH 180

Climbing an Infinite Ladder

An Introduction to Combinatorics

Introduction to Induction (LAMC, 10/14/07)

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence

CS 360, Winter Morphology of Proof: An introduction to rigorous proof techniques

Divisibility = 16, = 9, = 2, = 5. (Negative!)

Systematic Uncertainty Max Bean John Jay College of Criminal Justice, Physics Program

Induction 1 = 1(1+1) = 2(2+1) = 3(3+1) 2

{ 0! = 1 n! = n(n 1)!, n 1. n! =

One-to-one functions and onto functions

Notes. Combinatorics. Combinatorics II. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

Math 101: Course Summary

Contest Number Theory

Counting in the Twilight Zone

Chapter 1 Review of Equations and Inequalities

6 CARDINALITY OF SETS

Module 03 Lecture 14 Inferential Statistics ANOVA and TOI

CS 2336 Discrete Mathematics

Counting Methods. CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo

Math 283 Spring 2013 Presentation Problems 4 Solutions

MATH 10B METHODS OF MATHEMATICS: CALCULUS, STATISTICS AND COMBINATORICS

Discrete Mathematics. Spring 2017

CS280, Spring 2004: Final

Math 3 Proportion & Probability Part 2 Sequences, Patterns, Frequency Tables & Venn Diagrams

Counting. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee


21-301, Spring 2019 Homework 5 Solutions

Confidence Intervals. - simply, an interval for which we have a certain confidence.

Introducing Proof 1. hsn.uk.net. Contents

Generating Function Notes , Fall 2005, Prof. Peter Shor

CSCE 222 Discrete Structures for Computing. Review for Exam 2. Dr. Hyunyoung Lee !!!

4 Linear Recurrence Relations & the Fibonacci Sequence

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

MATH STUDENT BOOK. 12th Grade Unit 9

Solutions to Second Midterm

Notes on counting. James Aspnes. December 13, 2010

1.1.1 Algebraic Operations

Algebra Year 10. Language

Massachusetts Institute of Technology Handout J/18.062J: Mathematics for Computer Science May 3, 2000 Professors David Karger and Nancy Lynch

Introduction to Combinatorial Mathematics

Seunghee Ye Ma 8: Week 2 Oct 6

Discrete Math Midterm 2014

Math 564 Homework 1. Solutions.

The following are generally referred to as the laws or rules of exponents. x a x b = x a+b (5.1) 1 x b a (5.2) (x a ) b = x ab (5.

Note that we are looking at the true mean, μ, not y. The problem for us is that we need to find the endpoints of our interval (a, b).

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.

CHAPTER 8 Advanced Counting Techniques

EXAMPLES OF PROOFS BY INDUCTION

P (E) = P (A 1 )P (A 2 )... P (A n ).

Recursion: Introduction and Correctness

Introduction to Algebra: The First Week

CDM Combinatorial Principles

2 Elementary number theory

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

Summer HSSP Lecture Notes Week 1. Lane Gunderman, Victor Lopez, James Rowan

CIS 2033 Lecture 5, Fall

Math Lecture 3 Notes

MATH c UNIVERSITY OF LEEDS Examination for the Module MATH2210 (May/June 2004) INTRODUCTION TO DISCRETE MATHEMATICS. Time allowed : 2 hours

Transcription:

Math 3355 Spring 017 Some Review Problems for Exam 3: Solutions I thought I d start by reviewing some counting formulas. Counting the Complement: Given a set U (the universe for the problem), if you want to now how many things in U have some property, an indirect approach is to count how many things don t have that property instead. The formula: The number of things that do = U the number that don t. Said differently, if A is a subset of U, and Ā is the complement of A in U, then A = U Ā. Inclusion-Exclusion: A B = A + B A B. The binomial coefficient ( n ) counts: -element subsets of a set of size n, bit strings of length n having exactly ones, committees of size from a group of n people. Permutations: P (n, ) = n(n 1) (n + 1) = n! (n )! counts the number of ways to arrange things from n types of things, if repetition is not allowed. If repetition IS allowed, the formula is easier, in this case, there are n possible arrangements. The other important idea is a combinatorial proof of an identity. We establish the identity by counting something in two different ways. Typically, one side of the identity is simpler than the other. The simpler side usually has a direct count. The tricier side often involves breaing up the count into cases. Here are the review question solutions: 1. The English alphabet contains 1 consonants and five vowels. How many strings of four lowercase letters of the English alphabet contain: (a) A vowel in position? Solution: This is a product rule: 6 5 6 6 = 5 6 3 = 87880. On an exam, 6 5 6 6 or better, 5 6 3 are fine. In fact, I would say that 5 6 3 is a better answer than 87880 because it is easier to grade and shows some of the ideas going into getting the count. (b) Vowels in positions and 3? Solution: Same idea as in (a): 6 5 5 6 = 5 6, or 16900.

(c) A vowel in position or in position 3? Solution: This is harder. One way is to count the complement: Subtract off the number of strings that don t have a vowel in either position from the total: U Ā = 64 6 1 1 6 = 158860. An alternative is to use inclusion-exclusion: A B = A + B A B. In (a) we said 5 6 3 strings have a vowel in position, and the same number have a vowel in position 3. In (b), we said 5 6 have vowels in both positions. The total is 5 6 3 + 5 6 3 5 6 = 158860, as before. (d) At least one consonant? Solution: This is a classic complement problem: U Ā = 64 5 4 = 456351. (e) Exactly one vowel? Solution: I would count this by the following multistep approach: Figure out where you want the vowel to be, decide which vowel to put there, and then fill the remaining 3 positions with consonants. This leads to the answer 4 5 1 1 1 = 0 1 3 = 1850. (f) No vowels in consecutive positions? ( have is OK, beat is not) Solution: This is hard. One approach is to use cases: How many vowels are there in the string? The possibilities are no vowels, one, or two vowels. No vowels gives 1 4, one vowel gives 4 5 1 3 (the answer to part (e).) With two vowels, we have to figure out how many ways to place them. The possibilities are vcvc, vccv, cvcv, for a total of three ways. Next, we pic two vowels and two consonants. The count for this case is 3 5 1. All totaled, we have 1 4 + 4 5 1 3 + 3 5 1 = 41776.. Suppose Minnesota Pic 3 became Minnesota Pic 4 instead (you select four numbers, with order counting, each number between 0 and 9, inclusive). (a) How many combinations are possible? Solution: 10 4 = 10, 000 Page

(b) How many combinations don t contain a 5? Solution: 9 4 = 6561 (c) How many combinations contain a 5? Solution: Complement problem: (answer to (a) - answer to (b)) = 10, 000 6561 = 3439. (d) How many combinations contain exactly two 5 s? Solution: There are ( 4 ) = 6 ways to place the fives, and 9 9 ways to fill the other position, so the total is 6 81 = 486. (e) How many combinations contain at least two 5 s? Solution: Another complement problem, but care must be used. The complement has two cases: no fives or one five. If no fives, we get 6561, as in (b). If one five, we have 4 9 3 = 916 ways. Our answer is 10,000-6561 - 916 = 53 combinations. An alternative is to add up cases with two, three, or four fives. There are 486 ways with two fives, ( 4 3) 9 ways with three fives, and one way with four fives, for a total of 486 + 36 + 1 = 53. 3. How many bit strings of length 6 are there containing: (a) Exactly two 1 s? Solution: ( ) 6 = 6 5 = 15. (b) At least two 1 s? Solution: Count the complement: 6 ( 6 1) ( 6 0) = 64 6 1 = 57. Page 3

(c) Exactly two 1 s, with the 1 s in nonconsecutive positions? Solution: Fastest might be to just list all the possibilities: for a total of 10. 101000, 100100, 100010, 100001 010100, 010010, 010001, 001010, 001001, 000101, An alternative is to count the complement: Of the 15 strings with two ones, 110000, 011000, 001100, 000110, 000011 have the ones in consecutive positions, giving a total of 15-5 = 10. (d) At least two 1 s with no 1 s in consecutive positions? Solution: Again, it might be fastest to just count the possibilities. We have done the case with exactly two ones. If we have three ones, there are four more cases: 101010, 101001, 100101, 010101, and you can t do it with more than three ones, so we have a total of 10 + 4 = 14 cases. 4. (a) Find the coefficient of x 17 in (x 3) 40. 40 ( ) 40 Solution: By the Binomial Theorem, (x 3) 40 = (x) 40 ( 3). We want the stuff that multiplies x 17. This means we want 40 = 17, or = 3. The answer we see is ( ) 40 3 17 ( 3) 3, or ( 40 3) 17 3 3. ( ) (b) Evaluate 5. Solution: By a direct application of the Binomial Theorem, this will be ( + 5) = 7. ( ) (c) Evaluate. Solution: This is also a Binomial Theorem question, with x = 1, y = 1, giving (1 + 1) =. Page 4

( ) ( ( ) (d) Evaluate = 0 0 ( ) ( ) ( )) + 1 + + +. 1 Solution: One way, as mentioned in class, is that n(1 + x) n 1 = d dx (1 + x)n = d dx n ( ) n x = n ( ) n x 1. ( ) Setting x = 1 and n = gives = (1 + 1) 49 = 49. This ( ) could( also be ) done without calculus. A binomial ( ) coefficient ( identity ) is n n 1 49 = n. In the given problem, this says =. If we 1 1 do things without summation notation (so the pattern might be more obvious) this goes as follows: ( ) ( ) ( ) ( ) 0 + 1 + + + 0 1 ( ) ( ) ( ) = 1 + + + 1 ( ) ( ) ( ) 49 49 49 = + + + 0 1 49 (( ) ( ) ( )) 49 49 49 = + + + 0 1 49 = 49. 5. Consider the word SIZIGIES. (a) How many arrangements are there of the word? Solution: There are 8 letters: an E, a G, three I s, two S s and a Z. The number 8! of arrangements is 1!1!3!!1! = 8!, or 3360. 3!! (b) How many arrangements have the three I s together? Solution: There are 6 ways to place the I s (the first I can be in any of positions 1 through 6). This leaves 5 additional positions. We still have to pay attention 5! to identical letters (the two S s) so the total is 6 1!1!!1! = 6! = 360. Page 5

(c) How many don t have the three I s together? Solution: We count the complement, the answer being the difference of the previous two answers: 3360-360 = 3000. (d) How many don t have any I s together? Solution: Another hard problem. One could enumerate the possible positions of the I s: In positions 1, 3, 5 or 1, 3, 6 or.... I get 0 possible ways to place the I s. One way to be systematic: First place an i in position 1. If the second i is in position 3, there are 4 places for the next i. If the second i is in position 4, there are 3 ways and so on, leading to 4 + 3 + + 1 = 10 ways to have an i in position 1. You might now be able to guess there are 3 + + 1 = 6 ways for the first i to be in position, + 1 = 3 ways for the first i to be in position 3, and 1 way if it is in position 4 for a total of 10 + 6 + 3 + 1 = 0 ways. We still 5! have to arrange the other letters. As in part b, this happens in 1!1!!1! = 60 ways. The total is 0 60 = 100. 6. This problem deals with solutions to x + y + z = in integers. Since I did not get this far in class, this material will NOT be on the exam. 7. The US Senate has 100 members, two from each of the states. (a) How many committees can be formed from the 100 senators? Solution: This question ass how many subsets a 100-element set can have. The answer: 100. (b) How many committees are there with exactly one senator from each state? Solution: For each state, pic a senator. The answer:. (c) How many committees of size 5 are there? ( ) 100 Solution: We need five people from the 100 senators, so. 5 Page 6

(d) How many committees of size 5 are there if you are not allowed two senators from the same state? Solution: Select ( ) which of the five states to use, and then pic a senator from each state: 5. 5 (e) How many committees of size 5 are there if you are not allowed two senators from the same state, but one of the senators must be from Minnesota? Solution: Pic a Minnesota senator, then pic four of the ( remaining ) ( states, ) 49 49 and last, a senator from each of those states. The count is 4 = 5. 4 4 8. Give a combinatorial proof for each of the following. (a) n 3 = (n 1) 3 +3(n 1) +3(n 1)+1 Hint: Count strings xyz where each of x, y, z is an integer between 1 and n. For the right hand side, brea into cases based on how many 1 s there are in the string. (b) Solution: We count in two ways, as suggested by the hint. The direct approach is that each of x, y, z has n choices for a total of n 3 possibilities. For the more complicated count, we consider how many 1 s there are in the string, with four cases: no ones, one 1, two 1 s, three 1 s or four 1 s. With no ones, there are n 1 choices for each of x, y, x leading to a count of (n 1) 3. If there is one 1, pic one of x, y, z to be 1, and the others have n 1 choices for a total of 3(n 1). If we have two 1 s, select which two (three ways), and the third variable has n 1 choices, giving 3(n 1), and there is only one string, 1 1 1, with three 1 s. The total from this method is (n 1) 3 +3(n 1) +3(n 1)+1. Since both methods are legitimate approaches, they must give the same answer, so n 3 = (n 1) 3 + 3(n 1) + 3(n 1) + 1. ( ) ( ) ( ) 3n n n = + n + Hint: Pic two numbers between 1 and 3n. For the right hand side, use cases based on how many of the numbers are divisible by 3. If you lie committee models, you could count how many committees of size could be formed from n men and n women. Solution: ( ) If we follow the first hint (numbers between 1 and 3n) then there 3n are ways to pic two numbers (this was the easy count.) The more Page 7

complicated approach is based on how many of the numbers are divisible by 3, there being three cases: Both are divisible by three, one of them is, or none of them is divisible by 3. Now exactly n integers between 1 and 3n are divisible by 3, meaning that n ( of ) them are not. For the first case, we select two of n the n multiples of 3 in ways. If only one of the numbers is divisible by 3, pic that number (n ways) and then pic a second that is not divisible by 3 (n ways). All totaled, this gives (n)(n) = n combinations. Finally, ( ) if n we want two of the n numbers not divisible by 3, we can pic them in ( ) ( ) n n ways. All totaled, this method gives a count of + n +. Since both ( ) these ( methods ) count ( the ) same thing, they must give the same answer, so 3n n n = + n +. 9. Which nonnegative integers can be written as sums of 5 s and 6 s? Prove your answer is correct, both with regular induction and by strong induction. Solution: We start with a list of possible numbers: 5, 6, 10, 11, 1, 15, 16, 17, 18, 0, 1,, 3, 4, 5, 6,.... The first 9 numbers on the list are incidental or accidents of mathematics. What is to be proved is that all integers from 0 on can be written as sums of 5 s and 6 s. First, the strong induction proof. To be careful, we again verify the base cases. In this problem, there are five of them (getting 5 in a row). They are: 0 = 4 5+0 6, 1 = 3 5 + 1 6, = 5 + 6, 3 = 1 5 + 3 6, and 4 = 0 5 + 4 6. Let P (n) be the statement that n is the sum of 5 s and 6 s. Having verified the base case, the inductive hypothesis is that P () is true for all with 0 n, where n is some integer with n 4. The goal is to prove that P (n + 1) is also true. That is, we have to show that n + 1 is the sum of 5 s and 6 s. Intuitively, the reason things wor is that once we have five things in a row, we should be able to just at 5 s to previous things. Since this is a class related to proving things, we should be more rigorous. What should we add 5 to in order to get n + 1? The answer is n 4. So here is the proof that n + 1 is the sum of 5 s and 6 s: Since n 4, n 4 0. By our inductive hypothesis, anything between 0 and n can be written as the sum of 5 s and 6 s, so there are integers j and for which n 4 = 5j + 6. Adding 5 to this, n + 1 = 5(j + 1) + 6, so n + 1 is also the sum of 5 s and 6 s. I thin the standard induction argument is tricier. We need to be able to get from n to n + 1 rather than from n 4 to n + 1. To increase by 1, we loo for ways to Page 8

convert 5 s to 6 s so as to increase the total by 1, and ways to convert 6 s to 5 s to do the same. It is easy to convert 5 s to 6 s, of course: If we have even a single 5, replacing it by a 6 increases the sum by 1. The other direction is slightly harder: we can trade four 6 s for five 5 s to increase the sum by 1. Said differently, suppose that n = 5m + 6 for some integers m and. Then n + 1 = 5(m 1) + 6( + 1), and n + 1 = 5(m + 5) + 6( 4). This means we can go from n to n + 1 if we have at least one 5 or four 6 s. The cases where we can t get from n to n + 1 must be when we have fewer than one 5 and fewer than four 6 s. But 0 5 + 3 6 = 18, so if n > 18 and n is the sum of 5 s and 6 s, then we must have at least one 5 or at least four 6 s. What this means is that as soon as we find an n > 18 which is a sum of 5 s and 6 s, all larger numbers should be sums of 5 s and 6 s as well. The smallest number n > 18 which is the sum of 5 s and 6 s is n = 0. (If 19 were the sum of 5 s and 6 s we could have started there, but it isn t.) With all this preparation, here is the actual proof by regular induction. We prove that each n 0 is the sum of 5 s and 6 s. The base case is n = 0, and since 0 = 4 5 + 0 6, the base case is true. So let n 0, and suppose that n is the sum of 5 s and 6 s, say n = 5m + 6. Since n > 0, either m 1 or 4. If m 1, then n + 1 = 5(m 1) + 6( + 1). If 4, then n + 1 = 5(m + 5) + 6( 4). Either way, n + 1 is the sum of 5 s and 6 s. By the principle of (regular) induction, all numbers n 0 are sums of 5 s and 6 s. 10. Here are two more strong induction problems. (a) If x + 1 is an integer, prove that for all n 1, x xn + 1 is also an integer. Hint: one x n approach is to multiply: (x n + 1 )(x + 1) and solve for x n x xn+1 + 1. x n+1 Solution: Following the hint, (x n + 1 )(x + 1) = x n x xn+1 + 1 + x n 1 + 1, so x n+1 x n 1 x n+1 + 1 = (x n + 1 )(x + 1) x n+1 x n x (xn 1 + 1 ). Since there are terms involving x n 1 n and n 1, we need two base cases. We can let one of the base cases be n = 0, for which x n + 1 = 1+1 = is always an integer. The other base case is n = 1, x n which is our assumption. So let x + 1 be an integer, and suppose that x x + 1 x is an integer for all with 0 n. Then by hypothesis, x n + 1, x n 1 + 1, x n x n 1 and x + 1 are all integers, so x xn+1 + 1 = (x n + 1 )(x + 1) x n+1 x n x (xn 1 + 1 ) is x n 1 also an integer. By the principle of (strong) induction, it follows that x n + 1 x n is an integer for all positive integers n. Page 9

(b) If a 0 = 1, a 1 =, a = 4, and if a n = a n 1 + a n + a n 3 for all n 3, prove that a n n for all n 0. Solution: Since a n depends on three previous things, we need three base cases, which we already have (a 0 = 1 = 0, a 1 = = 1, a = 4 =.) Suppose that a for all with 0 n. Then a n+1 = a n + a n 1 + a n n + n 1 + n = n+1 ( 1 + 1 4 + 1 8 ) = 7 8 n+1 n+1. That is, a n+1 n+1. By the principle of (strong) mathematical induction, a n n for all n 0. 11. Find the recurrence relations, with initial conditions, for each of the following problems. (a) Ternary strings of length n without 3 consecutive 0 s. (b) Ternary strings of length n WITH 3 consecutive 0 s. (c) Ternary strings of length n without 3 consecutive even numbers. (d) ternary strings of length n WITH 3 consecutive even numbers. There will be nothing lie question 11 on the exam. Page 10