Solution, Assignment #6, CSE 191 Fall, 2014

Similar documents
Pigeonhole Principle Solutions

COUNTING SUBSETS OF A SET: COMBINATIONS

Basics of Counting. The product rule. Product rule example. 22C:19, Chapter 6 Hantao Zhang. Sample question. Total is 18 * 325 = 5850

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

SOLUTIONS FOR PROBLEM SET 2

=

Combinatorial Proofs

Math 319 Problem Set #3 Solution 21 February 2002

Homework 3 (due Tuesday, October 13)

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


Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

4. Binomial Expansions

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

BALTIC OLYMPIAD IN INFORMATICS Stockholm, April 18-22, 2009 Page 1 of?? ENG rectangle. Rectangle

Chapter 9. Systems of Linear Equations

Graph Theory Problems and Solutions

Kenken For Teachers. Tom Davis June 27, Abstract

26 Integers: Multiplication, Division, and Order

Shear Forces and Bending Moments

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Reading 13 : Finite State Automata and Regular Expressions

Math 55: Discrete Mathematics

1. Prove that the empty set is a subset of every set.

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

4. How many integers between 2004 and 4002 are perfect squares?

3.1 Solving Systems Using Tables and Graphs

Section 6.4: Counting Subsets of a Set: Combinations

INCIDENCE-BETWEENNESS GEOMETRY

Regular Languages and Finite Automata

Click on the links below to jump directly to the relevant section

Just the Factors, Ma am

Basic Probability Concepts

3. Mathematical Induction

Solution to Homework 2

SECTION 10-5 Multiplication Principle, Permutations, and Combinations

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

MATH10040 Chapter 2: Prime and relatively prime numbers

Vieta s Formulas and the Identity Theorem

Row Echelon Form and Reduced Row Echelon Form

7 Relations and Functions

Section 9.1 Vectors in Two Dimensions

-2- Reason: This is harder. I'll give an argument in an Addendum to this handout.

Full and Complete Binary Trees

Cartesian Products and Relations

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

Sample Induction Proofs

NUMBER SYSTEMS. William Stallings

So let us begin our quest to find the holy grail of real analysis.

Automata and Formal Languages

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

CONTENTS 1. Peter Kahn. Spring 2007

2004 Solutions Ga lois Contest (Grade 10)

Applications of Fermat s Little Theorem and Congruences

Basic Components of an LP:

5.3 The Cross Product in R 3

Lecture 17 : Equivalence and Order Relations DRAFT

Geometric Transformations

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

No Solution Equations Let s look at the following equation: 2 +3=2 +7

THE DIMENSION OF A VECTOR SPACE

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

C H A P T E R Regular Expressions regular expression

Solving Equations. How do you know that x = 3 in the equation, 2x - 1 = 5?

Chapter 3. Distribution Problems. 3.1 The idea of a distribution The twenty-fold way

Regular Languages and Finite State Machines

6.3 Conditional Probability and Independence

Markov random fields and Gibbs measures

5.1 Radical Notation and Rational Exponents

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

The Pointless Machine and Escape of the Clones

Factoring Trinomials of the Form x 2 bx c

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

Quotient Rings and Field Extensions

CS 3719 (Theory of Computation and Algorithms) Lecture 4

Solving Systems of Two Equations Algebraically


Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

Chapter 17. Orthogonal Matrices and Symmetries of Space

Homework until Test #2

Binary Adders: Half Adders and Full Adders

NOTES ON LINEAR TRANSFORMATIONS

Tiers, Preference Similarity, and the Limits on Stable Partners

Properties of Real Numbers

Base Conversion written by Cathy Saxton

Generating Functions Count

Lecture 16 : Relations and Functions DRAFT

Sudoku puzzles and how to solve them

T ( a i x i ) = a i T (x i ).

LEARNING OBJECTIVES FOR THIS CHAPTER

Calculate Highest Common Factors(HCFs) & Least Common Multiples(LCMs) NA1

MATH Fundamental Mathematics IV

Name: Section Registered In:

TU e. Advanced Algorithms: experimentation project. The problem: load balancing with bounded look-ahead. Input: integer m 2: number of machines

Working with whole numbers

PERMUTATIONS AND COMBINATIONS HOW TO AVOID THEM AT ALL COSTS AND STILL ACTUALLY UNDERSTAND AND DO COUNTING PROBLEMS WITH EASE!

The Graphical Method: An Example

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

Design: a mod-8 Counter

Session 7 Bivariate Data and Analysis

Transcription:

Solution, Assignment #6, CSE 191 Fall, 2014 General Guidelines: This assignment will NOT be collected, nor graded. However, you should carefully complete it as if it were to be graded. There will be a quiz based on this assignment (with very similar problems) during the week Oct 27-31. The solution will be posted on Friday, Oct. 24. Note: For problems involving counting, your solution MUST indicate how do you get the answer (such as C(8,4) 3!, P(5,2) 2 3.) This requirement will also apply to the quiz and midterm questions. You do NOT have to give a numerical answer. 1. (0 points). Page 396, Prob 4. Solution: 12 2 3 = 72. 2. (0 points). Page 396, Prob 16. The problem could have two interpretations (with different solutions). Interpretation 1: Count the number of strings with exactly one letter x: Solution: The number of 4 letter strings with x as the first letter is 25 25 25 = 25 3. Similarly, the number of 4 letter strings with x as the second letter is also 25 3. The same is true when x is the third and the fourth letter. So the answer is 4 25 3 = 62500. Interpretation 2: Count the number of strings with at least one letter x: Solution: The number of 4 letter strings with no restrictions: 26 4. The number of 4 letter strings that contain no x: 25 4. So the answer is: 26 4 25 4 = 66351 3. (0 points). Page 396, Prob 22, (d), (e), (f) Solution: Let A = the set of integers between 1 and 1000 that are divisible by 7. B = the set of integers between 1 and 1000 that are divisible by 11. C = A B = the set of integers between 1 and 1000 that are divisible by 77. Then A = 1000/7 = 142, B = 1000/11 = 90, C = 1000/77 = 12. vspace0.1in (d) A B = 1000/7 + 1000/11 1000/77 = 142+90 12 = 220. (e) (A B) C = 220 12 = 208. (f) 999 A B = 1000 220 = 779. (Since it s positive integers LESS than 1000, the total number involved is 999). 4. (3 points). Page 397, Prob 46, (a), (b), (c) 1

Solution: (a) There are P(9,5) ways to pick other 5 people (not including the bride). For each of these arrangements, the bride can take 6 different positions. So the answer is 6 P(9,5). (b) There are P(8,4) ways to pick other 4 people (not including the bride and the groom). For each of these arrangements, the bride can take 5 different positions. After that, the groom can take 6 different positions. So the answer is 6 5 P(8,4). (c) There are P(8,5) ways to pick other 5 people (not including the bride and the groom). For each of these arrangements, the bride can take 6 different positions. So the number of ways that only the bride is in the picture is 6 P(8,5). Similarly, the number of ways that only the groom is in the picture is also 6 P(8,5). Thus the answer is 12 P(8,5). 5. (0 points). Page 405, Prob 4. Solution: (a) 5. (b) 13. 6. (0 points). Page 406, Prob 38. Solution: Let C 1,C 2,...,C 8 denote 8 computers and P 1,P 2,P 3,P 4 denote 4 printers. Connect C 1 to P 1 ; C 2 to P 2 ; C 3 to P 3 and C 4 to P 4 (using 4 cables). Then connect each of C 5,C 6,C 7,C 8 to all 4 printers (using 16 cables). So we use total 20 cables. By using the same argument as in Example 9 (page 402), we can show these connections satisfy the requirement. Now we need to show 20 is the minimum number of cables we need. Suppose that we use at most 19 cables. Then at least one printer, say P 1, is connected to at most 4 computers, say C 1,C 2,C 3,C 4. Then the computers C 5,C 6,C 7,C 8 are connected to P 2,P 3,P 4 only. So the requirement is not satisfied. 7. (0 points). Page 413, Prob 4. Solution: a) There should be P(5,3) = 60 permutations {1, 2, 3}, {1, 3, 2}, {2, 1, 3}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1}, {1, 2, 4}, {1, 4, 2}, {2, 1, 4}, {2, 4, 1}, {4, 1, 2}, {4, 2, 1}, {1, 2, 5}, {1, 5, 2}, {2, 1, 5}, {2, 5, 1}, {5, 1, 2}, {5, 2, 1}, {1, 3, 4}, {1, 4, 3}, {3, 1, 4}, {3, 4, 1}, {4, 1, 3}, {4, 3, 1}, {1, 3, 5}, {1, 5, 3}, {3, 1, 5}, {3, 5, 1}, {5, 1, 3}, {5, 3, 1}, {1, 4, 5}, {1, 5, 4}, {4, 1, 5}, {4, 5, 1}, {5, 1, 4}, {5, 4, 1}, {2, 3, 4}, {2, 4, 3}, {3, 2, 4}, {3, 4, 2}, {4, 2, 3}, {4, 3, 2}, {2, 3, 5}, {2, 5, 3}, {3, 2, 5}, {3, 5, 2}, {5, 2, 3}, {5, 3, 2}, {2, 4, 5}, {2, 5, 4}, {4, 2, 5}, {4, 5, 2}, {5, 2, 4}, {5, 4, 2}, {3, 4, 5}, {3, 5, 4}, {4, 3, 5}, {4, 5, 3}, {5, 3, 4}, {5, 4, 3} b) There should be C(5,3) = 10 combinations {1,2,3}, {1,2,4},{1,2,5},{1,3,4},{1,3,5},{1,4,5},{2,3,4},{2,3,5},{2,4,5},{3,4,5} 8. (0 points). Page 413, Prob 5, (b) (d) Solution: b) 720 2

d) 6720 9. (0 points). Page 413, Prob 6, (b) (c) Solution: b) 10 c) 70 10. (0 points). Page 413, Prob 12. Solution: a) C(12,3) = 220 b) C(12,0)+C(12,1)+C(12,2)+C(12,3) = 1+12+66+220 = 299 c) 12 i=3 C(12,i) = 2 12 C(12,0) C(12,1) C(12,2) = 4017 d) C(12,6) = 924 11. (0 points). Page 413, Prob 18. Solution: (a) 2 8 (b) C(8,3). (c)c(8,3)+c(8,4)+c(8,5)+c(8,6)+c(8,7)+(c(8,8). Or: 2 8 [C(8,0)+C(8,1)+C(8,2)]. (d) C(8,4). 12. (0 points). Page 414, Prob 22, (d) (e) (f). Solution: (d) In this case, AB acts as a single symbol, DE acts as a single symbol, GH acts as a single symbol. So there are actually 5 symbols that can be arranged independently. Thus the answer is 5!. (e) In this case, CABED acts as a single symbol. So we have 4 independent symbols. The answer is 4!. (f) No such permutation exists. Answer is 0. 13. (0 points). Page 414, Prob 26. Solution: (a) C(13, 10). (b) P(13,10) (c) 1 woman team: C(3,1) C(10,9); 2 women team: C(3,2) C(10,8); 3 women team: C(3,3) C(10,7). So the answer is: C(3,1) C(10,9)+C(3,2) C(10,8)+C(3,3) C(10,7). 14. (0 points). Page 421, Prob 8. Solution: (3x+2y) 17 =...+C(17,8) (3x) 8 (2y) 9 +... So the coefficient of x 8 y 9 is: 3 8 2 9 C(17,8). 15. (0 points). Page 421, Prob 12. Solution: 1 11 55 165 330 462 462 330 165 55 11 1 3

16. (0 points). Page 422, Prob 22. Solution: Prove C(n,r) C(r,k) = C(n,k) C(n k,r k) (1) (a) Combinatorial argument: Consider this counter problem: We have a set S with n elements. Count the number of ways to select a subset A with r elements, then the number of ways to select a sub-subset B with k elements within each r-element subset A. The number of choices for A is C(n,r). The number of choices for B within each A is C(r,k). So the total number of choices for the pairs (A,B) is C(n,r) C(r,k), which is the LHS of (1). Now we count the number of such (A,B) pairs in a different way. First we directly select a sub-subset B with k elements from S. The number of such choices is C(n,k). For each such B, we enlarge it to A by adding r k elements from the other n k elements in S. So there are C(n k,r k) different ways to enlarge B to an r-element set A. Thus, by this counting method, the number of (A,B) pairs is C(n,k) C(n k,r k), which is the RHS of (1). Because we are counting the same set of abjects (the (A,B) pairs), the result of the two counting methods must be the same. Thus the equation (1) is true. (b) LHS = C(n,r) C(r,k) = n! r!(n r)! r! k!(r k)! = n! (n r)!k!(r k)!. RHS = C(n,k) C(n k,r k) = n! k!(n k)! (n k)! (r k)!(n k r+k)! = n! (n r)!k!(r k)!. Thus LHS = RHS. 17. (0 points). Page 422, Prob 33. Solution: (a) Each path from the point(0,0) to the point (m,n) consists of m+n line segments (each with length 1). It must have m horizontal line segments, and n vertical line segments. We use a m + n bit binary string to describe a path: 0 represents a horizontal line segment, and 1 represents a vertical line segment. (For example: The path in the first figure on page 422 is represented by: 01100010. The path in the second figure on page 422 is represented by: 10000011.) (b) Thus the number of such paths is the same as the number of m+n bit binary strings containing n 1 s. This number is C(n+m,n). 18. (4 points) There are 8 students trying to solve 8 problems. Each problem is solved by at least 5 students. Prove that there exist two students such that every problem is solved by at least one of them. The easiest way to prove it is perhaps by using Pigeonhole Principle. But you can prove it by any other method that works. Sol 1: Let A = {S 1,S 2,...,S 8 } be the eight students and P = {P 1,P 2,...,P 8 } be the eight problems. Since each problem is solved at least 5 times, the eight problems are collectively solved at least 40 times (these are the pigeons) by 8 students (these are the pigeonholes). By Pigeonhole Principle, at lease one student solved at least 40/8 = 5 problems. (Another way to think about it: If every student solved at most 4 problems, then they collectively solved the problems at most 4 8 = 32 times. It would be impossible that each problem is solved at least 5 students.) 4

Without loss of generality, we assume S 1 solved at least 5 problems. Case 1: S 1 solved all 8 problems. Then S 1 and any another student satisfy the conclusion of the claim. Case 2: S 1 solved 7 problems P 1...P 7. Then S 1 and any student who solved P 8 satisfy the conclusion of the claim. Case 3: S 1 solved 6 problems P 1...P 6, but not P 7 and P 8. The remaining two problems (P 7 and P 8 ) are collectively solved at least 5 2 = 10 times by the other seven students. So at least one other student must have solved these two problems at least 10/7 = 2 times. In other words, this student solved both P 7 and P 8. So S 1 and this student satisfy the conclusion of the claim. Case 4: S 1 solved 5 problems P 1...P 5, but not P 6,P 7,P 8. The remaining three problems (P 6,P 7,P 8 ) are collectively solved at least 5 3 = 15 times by the other seven students. So at least one other student must have solved these three problems at least 15/7 = 3 times. In other words, this student solved all three problems P 6,P 7,P 8. So S 1 and this student satisfy the conclusion of the claim. Solution 2. (This solution is shorter, but harder to follow). There are C(8,2) = 28 pairs of students. Let s take 28 boxes, and label each box by a pair of students. Consider any problem P i. P i is solved by at least 5 students. So P i is NOT solved by at most 3 students. So P i is NOT solved by at most C(3,2) = 3 pairs of students. If P i is not solved by a pair of students, put a card (with P i on it) into the box labeled by that student pair. Thus there are at most 3 cards for each problem P i. Hence there are at most 8 3 = 24 cards for all 8 problems. When you put 24 cards into 28 boxes, at least one box must be empty. Say this empty box is labeled by Student i and Student j. This means that no problem is NOT solved by either Student i or Student j. In other words, every problem is solved either by Student i or Student j. This is what we want to prove. 5