1(a). How many ways are there to rearrange the letters in the word COMPUTER?



Similar documents
Pigeonhole Principle Solutions

Sample Induction Proofs

Math 319 Problem Set #3 Solution 21 February 2002

Section 1.1 Linear Equations: Slope and Equations of Lines

(Refer Slide Time: 01.26)

Exercises of Discrete Mathematics

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

3. Mathematical Induction

LINEAR INEQUALITIES. Mathematics is the art of saying many things in many different ways. MAXWELL

Section 6.4: Counting Subsets of a Set: Combinations

14.1 Rent-or-buy problem

1.7 Graphs of Functions

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

1. Then f has a relative maximum at x = c if f(c) f(x) for all values of x in some

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Mathematical Induction. Mary Barnes Sue Gordon

Tiers, Preference Similarity, and the Limits on Stable Partners

Math 115 Spring 2011 Written Homework 5 Solutions

Mathematical Induction

Math 55: Discrete Mathematics

Graph Theory Problems and Solutions

Lemma 5.2. Let S be a set. (1) Let f and g be two permutations of S. Then the composition of f and g is a permutation of S.

3.3 Real Zeros of Polynomials

8 Primes and Modular Arithmetic

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Vieta s Formulas and the Identity Theorem

THE SIGN OF A PERMUTATION

Binary Number System. 16. Binary Numbers. Base 10 digits: Base 2 digits: 0 1

The Mathematics 11 Competency Test Percent Increase or Decrease

Reading 13 : Finite State Automata and Regular Expressions

Math 120 Final Exam Practice Problems, Form: A

Lecture 3: Finding integer solutions to systems of linear equations

We can express this in decimal notation (in contrast to the underline notation we have been using) as follows: b + 90c = c + 10b

Fundamentele Informatica II

Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014

Student Outcomes. Lesson Notes. Classwork. Discussion (10 minutes)

Costs of Production and Profit Maximizing Production: 3 examples.

Some practice problems for midterm 2

The string of digits in the binary number system represents the quantity

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

Elasticity. I. What is Elasticity?

Cartesian Products and Relations

Row Echelon Form and Reduced Row Echelon Form

Playing with Numbers

Notes on Continuous Random Variables

Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

Solutions for Practice problems on proofs

The Graphical Method: An Example

Parallel and Perpendicular. We show a small box in one of the angles to show that the lines are perpendicular.

CIRCLE COORDINATE GEOMETRY

36 CHAPTER 1. LIMITS AND CONTINUITY. Figure 1.17: At which points is f not continuous?

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

On the Unique Games Conjecture

2 When is a 2-Digit Number the Sum of the Squares of its Digits?

n 2 + 4n + 3. The answer in decimal form (for the Blitz): 0, 75. Solution. (n + 1)(n + 3) = n lim m 2 1

Math Workshop October 2010 Fractions and Repeating Decimals

TEACHER NOTES MATH NSPIRED

Practice with Proofs

s = s = s =

Angles and Quadrants. Angle Relationships and Degree Measurement. Chapter 7: Trigonometry

INCIDENCE-BETWEENNESS GEOMETRY

Section 1.3 P 1 = 1 2. = P n = 1 P 3 = Continuing in this fashion, it should seem reasonable that, for any n = 1, 2, 3,..., =

Descriptive statistics Statistical inference statistical inference, statistical induction and inferential statistics

Introduction. Appendix D Mathematical Induction D1

A Detailed Price Discrimination Example

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.

PYTHAGOREAN TRIPLES KEITH CONRAD

12. Parallels. Then there exists a line through P parallel to l.

Every Positive Integer is the Sum of Four Squares! (and other exciting problems)

Quotient Rings and Field Extensions

Set Theory Basic Concepts and Definitions

1 if 1 x 0 1 if 0 x 1

Section 4.2: The Division Algorithm and Greatest Common Divisors

Baltic Way Västerås (Sweden), November 12, Problems and solutions

TOPIC 4: DERIVATIVES

ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION

Thinking of a (block) cipher as a permutation (depending on the key) on strings of a certain size, we would not want such a permutation to have many

Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.

2014 Chapter Competition Solutions

k, then n = p2α 1 1 pα k

6.2 Permutations continued

The Taxman Game. Robert K. Moniot September 5, 2003

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Session 6 Number Theory

LEARNING OBJECTIVES FOR THIS CHAPTER

Cardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set.

Automata and Formal Languages

Representation of functions as power series

Math 55: Discrete Mathematics

Linear Programming. March 14, 2014

AP CALCULUS AB 2007 SCORING GUIDELINES (Form B)

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

MATH2210 Notebook 1 Fall Semester 2016/ MATH2210 Notebook Solving Systems of Linear Equations... 3

Kenken For Teachers. Tom Davis June 27, Abstract

SUM OF TWO SQUARES JAHNAVI BHASKAR

Pythagorean Triples and Rational Points on the Unit Circle

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

MODERN APPLICATIONS OF PYTHAGORAS S THEOREM

Transcription:

CS 280 Solution Guide Homework 5 by Tze Kiat Tan 1(a). How many ways are there to rearrange the letters in the word COMPUTER? There are 8 distinct letters in the word COMPUTER. Therefore, the number of ways to rearrange the letters would simply be 8! = 40 320 1(b). How many ways if you are required to keep the vowels in alphabetical order? (In other words, the consonants can be in any order at all, but the vowels must appear in the order EOU, possibly with consonants in between the vowels.) In any rearrangement of the word COMPUTER, there are 3! ways to permutate the vowels in the word. Only 1 of out these 3! ways are correct. Therefore, out of the 8! possible arrangement of the letters in the word COMPUTER, only 1/3! of these arrangments have the 3 vowels in alphabetical order. Thus, the number of ways to arrange COMPUTER, keeping the vowels in alphabetical order, is 8!/3! (or P(8, 3)) = 6720 Another way to think about the problem is to consider the number of ways to permutate the consonants first. There are 5 consonants and 8 positions to choose from. The number of ways to permutate this is 8 7 6 5 4 = 6720. There is only 1 way to arrange the vowels in the remaining 3 positions (namely, in the order E, O and U). Therefore, the number of arrangements given the constraints is 6720. 1(c). How many ways if the consonants must be kept in alphabetical order? This is similar to question 1(b), except that there are 5! ways to permutate the consonants in the word. Therefore, the number of ways to arrange COMPUTER, keeping the consonants in in alphabetical order is 8!/5! = 336. Alternatively, we can first consider the number of ways to permutate the vowels first. There are 3 vowels and 8 positions to choose from; the number of ways to permutate this is 8 7 6 = 336. There is only 1 way to arrange the consonants in the remaining 5 positions, so that number of arrangements given the constraint is still 336. 1(d). How many ways if both vowels and consonants must be kept in alphabetical order? There are C(8,5) = 56 ways to choose 5 positions out of 8 on which the consonants must stay. Once these 5 positions are chosen, there is only 1 way to arrange the consonants in these 5 positions (i.e. in alphabetical order). Similarly, there is only 1 way to arrange the vowels in the remaining 3 positions. Therefore, there are 56 ways to arrange COMPUTER, given the above constraint. Alternatively we can choose to position the vowels first. We will get C(8,3) = 56 ways to select a combination of positions on which the vowels must stay. After that, there is only 1 way to arrange all the vowels and consonants, resulting in the same answer.

2. Given an arbitrary set of 10 integers, prove that there is a subset of these 10 integers whose sum is divisible by 10. Suppose the 10 integers are x 1, x 2,, x 10. Consider the 10 possible subsets {x 1 }, {x 1, x 2 }, {x 1, x 2, x 3 },, {x 1, x 2,, x 10 }. We shall call them S 1, S 2,, S 10 in that order. Consider the last digit of the sum of integers in each of the 10 subsets. If the last digit of the sum is 0, it indicates that the sum of integers in the subset is divisible by 10. If any of the last digit of the sum of integers in each of the 10 subsets given above is 0, then, clearly, the sum is divisible by 10, and we are done. Otherwise, the last digit of the sum of integers in each of the 10 subsets given above must be non-zero. There are only 9 possible non-zero digits, and 10 sums. By Pigeon Hole Principle, there must be 2 distinct subsets S i and S j for which their sums have the same last digits. Suppose that j > i (this is arbitrary). Since the subsets are monotoneincreasing, (i.e. S i S j if i < j), the sum of integers in the subset S j S i will be equal to (the sum of integers in subset S j ) (the sum of integers in subset S i ). Since these 2 sums have the same last digits, the sum of integers in the subset S j S i will have a last digit of 0. Therefore, the subset S j S i will have a sum divisible by 10. Since S j S i is a valid subset of these 10 integers and it has a sum divisible by 10, we have shown that even if none of the subsets S 1,, S 10 are divisible by 10, there exists another subset (S j S i ) which is. Therefore, for any arbitrary set of 10 integers, there is always a subset of these 10 integers whose sum is divisible by 10. 3. Five points with integer coordinates are plotted on a graph. Consider the midpoints of the segments that join these 5 points. Prove that at least one of these midpoints has integer coordinates. Consider 2 points (x i, y i ) and (x j, y j ). The midpoint of these 2 points is ½ (x i + x j, y i + y j ) The x coordinate of this midpoint is an integer if and only if: x i and x j are both odd or both even (same parity). Similary, the y coordinate of this midpoint is an integer if and only if: y i and y j are both odd or both even (same parity). Therefore, the midpoint of any 2 end-points has integer coordinates if the x-coordinates of both end-points have the same parity, and the y-coordinates of both end-points also have the same parity. However, there are only 2 2 = 4 possible ways to permutate the parities of the x and y- coordinates of a point; namely (O, O), (O, E), (E, O) and (E, E). (O = odd, E = even) Since there are 5 points and only 4 possible parity permutations, by the Pigeon Hole Principle, at least 2 points will have exactly the same parity for both the x-coordinates

and the y-coordinates. Subsequently, as proven above, the midpoint of these 2 points must have integer coordinates. Therefore, at least one of the midpoints has integer coordinates. 4(a). How many ways are there to divide 15 people into 3 teams of 5 each? There are C(15,5) ways of choosing a first team of 5 from 15 people. There are C(10,5) ways of choosing a second team of 5 from the 10 remaining people. There are C(5,5) ways of choosing a third team of 5 from the 5 remaining people. Finally, there are 3! ways of permutating the order in which these 3 teams are chosen. In the above example, we have defined 3 separate teams chosen in a particular order, but if the people in these 3 teams are chosen in some other arbitrary order (e.g. people in team 2 gets chosen before the people in team 1), the permutation would essentially be the same, although we would have overcounted this case as another new way of dividing the 15 people. Therefore, the number of ways to divide 15 people into 3 teams of 5 each is: C(15,5) C(10,5) C(5,5) / 3! = (3003 252 1) / 6 = 126 126. 4(b). How many ways are there to choose two teams of 5 people each from 15 people? Similar to the above question: There are C(15,5) ways of choosing a first team of 5 from 15 people. There are C(10,5) ways of choosing a second team of 5 from the 10 remaining people. There are 2! = 2 ways of permutating the order in which the 2 teams are chosen. Therefore, the number of ways to divide 15 people into 2 teams of 5 each is: C(15,5) C(10,5) / 2! = (3003 252) / 2 = 378 378. 5(a). You re driving back to Ithaca and approaching the tollbooth as you exit the NY Thruway when you notice that there are two lines waiting to pay the toll: one of the line consisting entirely of m cars; the other consisting entirely of n trucks. Inspired by your love of cs280, you realize that you can find a formula for all the patterns by which the cars and trucks can leave the toll plaza. What is this formula? A pattern looks like C 1 T 1 C 2 C 3 C 4 T 2... where C i represents the i th car and T i represents the i th truck. You should assume that the cars remain in their current order and the trucks remain in their current order. The only thing that can vary is when the attendant decides to release the vehicle. There are m + n vehicles going through the tollbooth altogether. Consider the pattern P generated by the sequence of vehicles leaving the tollbooth; it should have a length of m + n. Furthermore, of all the m + n bits in the pattern P, m of them must be occupied by C s. The number of ways to choose m bits out of m + n bits in P (for which the bit is occupied by a C ) is C(m + n, n). Once chosen, there is only 1 way to arrange the m cars within the m chosen bits, and n trucks within n remaining bits; namely, in their order of arrival at the tollbooth.

Alternatively, we can choose to permutate the trucks first, and get the answer C(m + n, n). It has the same value as C(m + n, m). (See the answer to question 1(d) for similar analogy) 5(b). After leaving the tollbooth, you continue on your journey to Ithaca, arriving late at night and hungry. You decide to buy a snack at P&C. At P&C, there are three lines open. There are people waiting in each line; in fact, there are p people in the first line, q people in the second and r people in the third. Find a formula for the number of possible orders in which these p+q+r people leave P&C and give a brief explanation of why your formula is correct. You should assume that if any line becomes empty then the checker immediately closes that line; thus, people do not change lines even if another line becomes empty. Each person leaves the store as soon as they re checked out. There are p + q + r people leaving P&C altogether. Let A 1, A 2, A p denote the people waiting in the first line. Let B 1, B 2, B q denote the people waiting in the second line. Let C 1, C 2, C r denote the people waiting in the third line. Consider the pattern P 2 generated by the sequence of people leaving the tollbooth; it should have a length of p + q + r. Furthermore, of all the p + q + r bits in the pattern P 2, p of them must be occupied by A s, denoting the people in the first line. The number of ways to choose p bits out of p + q + r bits in P 2 (for which the bit is occupied by a A ) is C(p + q + r, p). Furthermore, there are C(q + r, q) ways to choose q bits out of the remaining q + r bits (for which the bit is occupied by a B ), and C(r, r) = 1 way to choose r bits from the remaining r bits available. Therefore, there are: C(p + q + r, p) C(q + r, q) C(r, r) = (p + q + r)! / (p! q! r!) ways to arrange the bits in the pattern P 2 such that p of them are A s, q of them are B s and r of them are C s. Once an arrangement is chosen, there is only 1 way to arrange the p people in the first queue within the p chosen bits, the q people in the second queue within the q chosen bits, and the r people in the third queue within the r chosen bits; namely, in their order of arrival at the line. Since the number of possible permutations of P 2 corresponds to the number of possible orders in which the p + q + r people leave P&C, and there are (p + q + r)! / (p! q! r!) possible permutations of P 2, there are (p + q + r)! / (p! q! r!) possible orders. 6. The instructor for a small class (7 students) tells the students after an exam that if any 4 of them get together they'll have at least one correct solution to every problem. He goes on to claim that if any 3 of them get together there will be at least one problem for which each of the 3 has an incorrect answer. The exam has 30 questions. Show that the instructor's claim must be incorrect. Consider the number of distinct groups of 3 that the students in the class can form. There are C(7, 3) = 35 possible groups of 3 which can be formed. If the instructor s claim is correct, each of these 35 groups will have at least one problem for which the entire group has an incorrect answer. Since there are only 30 exam

questions and 35 possible groups of 3, by Pigeon-Hole Principle, there will be at least 2 possible groups of 3, (call them G 1 and G 2 ) which have incorrect answers to the same exam question. Consider the group G = G 1 G 2 ; since G 1 and G 2 are distinct groups, they differ by at least one person, so G 1 G 2 will have at least 4 people. However, since both groups G 1 and G 2 have incorrect answers to the same exam question, the new group G will also have incorrect answers to the same exam question. Since G 4, and G does not have all the correct answers to the exam, any subset of G consisting of 4 people will not have all the correct answers to the exam, contradicting the instructor s claim that if any 4 of them get together they'll have at least one correct solution to every problem.