Discrete Mathematics Math 6A Homework 4 Solution.

Slides:



Advertisements
Similar presentations
Counting Chapter 6 With Question/Answer Animations.
Advertisements

Recursively Defined Functions
Section 4.1: The Basics of Counting As we have seen, one way to count the number of objects in a finite set S is to produce a one-to-one correspondence.
TECHNIQUES OF INTEGRATION
College of Information Technology & Design
Solving Linear Equations
1.2 Row Reduction and Echelon Forms
Recurrence Relations Reading Material –Chapter 2 as a whole, but in particular Section 2.8 –Chapter 4 from Cormen’s Book.
CSE115/ENGR160 Discrete Mathematics 04/17/12
Permutations r-permutation (AKA “ordered r-selection”) An ordered arrangement of r elements of a set of n distinct elements. permutation of a set of n.
Lecture 5 Counting 4.3, Permutations r-permutation: An ordered arrangement of r elements of a set of n distinct elements. Example: S={1,2,3}:
More Counting Lecture 16: Nov 9 A B …… f. Counting Rule: Bijection If f is a bijection from A to B, then |A| = |B| A B …… f.
Recurrence Relations Reading Material –Chapter 2 as a whole, but in particular Section 2.8 –Chapter 4 from Cormen’s Book.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Linear Inequalities in Two Variables
4.4.2 Combinations of multisets
LIAL HORNSBY SCHNEIDER
6.7 – Permutations and Combinations
How many ways are there to pass through city A where the arrows represent one-way streets? Answer: mn ways The counting principal: Suppose two experiments.
Factoring Polynomials
Solving Systems of Equations by Substitution by Tammy Wallace Varina High School.
More Counting Lecture 13 A B …… f. Counting Rule: Bijection If f is a bijection from A to B, then |A| = |B| A B …… f.
More Counting Lecture 16: Nov 9 A B …… f. This Lecture We will study how to define mappings to count. There will be many examples shown. Bijection rule.
Review of 5.1, 5.3 and new Section 5.5: Generalized Permutations and Combinations.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Combinations with repetitions allowed Red, green and blue cubes are given. There are at least five cubes of each of the above colors. In how many ways.
Basic Counting Lecture 12: Oct 28. This Lecture We will study some basic rules for counting. Sum rule, product rule, generalized product rule Permutations,
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.4,
Basic Counting. This Lecture We will study some basic rules for counting. Sum rule, product rule, generalized product rule Permutations, combinations.
Generalized Permutations and Combinations
Variables Tutorial 3c variable A variable is any symbol that can be replaced with a number to solve a math problem. An open sentence has at least one.
Chapter 6 With Question/Answer Animations 1. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
March 10, 2015Applied Discrete Mathematics Week 6: Counting 1 Permutations and Combinations How many different sets of 3 people can we pick from a group.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Daily Homework Quiz Simplify the expression. 1. ()() 7+t6 – 4 – t b+20a – 8b8b – 15a ANSWER 72 ANSWER 6b6b+5a5a– 3t3t78 – 3.Evaluate when 2x2x ()2)2.
1 Binomial Coefficients CS 202 Epp, section ??? Aaron Bloomfield.
The Basics of Counting Section 6.1.
Discrete Mathematics Math 6A Homework 6 Solution.
1 Counting by Mapping Lecture 15: Nov 4 A B …… f.
The Pigeonhole Principle. The pigeonhole principle Suppose a flock of pigeons fly into a set of pigeonholes to roost If there are more pigeons than pigeonholes,
Lecture 19 Spherical Polar Coordinates Remember Phils Problems and your notes = everything Come to see me before.
1 CS 140 Discrete Mathematics Combinatorics And Review Notes.
5.5 Generalized Permutations and Combinations
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
Section Basic Counting Principles: The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n 1.
Division Division Problems Do you have problems with division problems? Here is a guide to help you.
1.7 Intro to Solving Equations Objective(s): 1.) to determine whether an equation is true, false, or open 2.)to find solutions sets of an equation 3.)to.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 4.5.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Linear Programming Many problems take the form of maximizing or minimizing an objective, given limited resources and competing constraints. specify the.
The Pigeonhole Principle
CSE15 Discrete Mathematics 04/19/17
Generalized Permutations and Combinations
COCS DISCRETE STRUCTURES
Generalized Permutations & Combinations: Selected Exercises
6.7 – Permutations and Combinations
Recursively Defined Functions
CS100: Discrete structures
Evaluate the expression ( i) + ( i) and write the result in the form a + bi. Choose the answer from the following: i i i.
Linear Programming.
Permutations and Combinations
Basic Counting.
More Counting A B … f Lecture 16: Nov 9.
Permutations and Combinations
Representations of Integers
Combinations with repetitions allowed
4.4 Permutations and Combinations of multisets
TBF General Mathematics - II Lecture – 9 : Linear Programming
Algebra 1 Section 7.2.
Presentation transcript:

Discrete Mathematics Math 6A Homework 4 Solution

^5 = ^6=308, ^7=279, ^3 = C(3+5-1,5) = C(7,5) = C(5+3-1,3) = C(7,3) = (a) C(8+6-1,6) = C(13,6) = 1716 (b) C(8+12-1,12) = C(19,12) = 50,388 (c) C(8+24-1,24) = C(31,24) = 2,629,575 (d) Here we want to solve the equation b1+b2+...+b8=12, subject to the constraint that each bi>= 1. We reduce this problem to the form in which Th 2 is applicable with the following trick. Let b'i = bi-1; then b'i represents the number of bagels of type i, in excess of the required 1, that are selected. If we substitute bi = b'i + 1 into original equation, we obtain (b'1+1) + (b'2+1) (b'8+1) = 12, which reduces to b'1+b2'+...+b[8 = 4. In other words, we are asking how many ways are there to choose the 4 extra bagels from among the 8 types. So C(8+4-1,4) = C(11,4) = 330

(e) First let us ignore the restriction that there can be no more than 2 salty bagels (i.e. that b4 =3). Thus we want to count the number of solutions to the equation b1+b2+...+b8 = 12, subject to the condition that bi>=0 for all i and b3>=3. As in part (d), we use the trick of choosing the 3 egg bagels at the outset, leaving 9 bagels free to be chosen; equivalently, we set b'3 = b3 -3, to represent the extra egg bagels, above the required 3, that are chosen. Now Theorem 2 applies to the number of solutions of b1+b2+b'3+b4+...+b8 = 9, so there are C(8+9-1,9)=C(16,9) = 11,440 Next we need to worry about the restriction that b4 =3). The difference will be the desired answer. to violate the restriction means to have b4>=3. Thus we want to count the number of solutions to b1+...+b8 = 12, which b3>=3 and b4>=3. Using the same technique as we have just used, this is equal to the number of nonnegative solutions to the equation b1+b2+b'3+b'4+b5+...+b8 = 6 (the 6 on the right being ). So C(8+6-1,6) = C(13,6) = 1716 ways to make this selection. Therefore, our final answer is =9724

(a)C(6+12-1,12) = C(17,12) = 6188 (b)C(6+36-1, 36) = C(41,36) = 749,398 (c)If we first pick the two of each kind, then we have picked 2*6=12. This leaves one dozen left to pick without restriction, so the answer is the same as in part (a), namely C(6+12-1,12) = C(17,12) = 6188 (d)We first compute the number of ways to violate the restriction, by choosing at least three broccoli. This can be done in C(6+21-1,21) = C(26,21) = ways, since once we have picked the three broccoli there are 21 left to pick without restriction. Since there are C(6+24-1,24) = C(29,24) = ways to pick 24 croissants without any restriction, there must be – = 52,975 ways to choose two dozen croissants with no more than two broccoli. (e)Eight croissants are specified, so this problem is the same as choosing 24-8=16 croissants without restriction, which can be done in C(6+16-1,16) = C(21,16) = 20,349 ways. (f)First let us include all the lower bound restrictions. If we choose the required 9 croissants, then there are 24-9=15 left to choose, and if there were no restriction on the broccoli croissants then there would be C(6+15-1,15) = C(20,15) = ways to make the selections. If in addition we were to violate the broccoli restriction by choosing at least four broccoli croissants, there would be C( ,11) = C(16,11) = 4368 choices. Therefore the number of ways to make the selection without violating the restriction is = 11,136

C(2+8-1,8) = C(9,8) = C(4+17-1,17) = C(20,17) = (a)We require each xi >= 2. This uses up 12 of the 29 total required, so the problem is the same as finding the number of solutions to x'1+...+x'6 = 17 with each x'i a nonnegative integer. The number of solutions is therefore C(6+17-1, 17) = C(22,17)=26,334 (b)The restriction used up 22 of the total, leaving a free total of 7. Therefore the answer is C(6+7-1,7)=C(12,7)=792 (c)The number of solutions without restriction is C(6+29-1,29)=C(34,29)= the nuber of solution violating the restriction by having x1 >= 6 is C(6+23-1,23) = C(28,23) = Therefore the answer is – = 179,976 (d)The number of solutions with x2 >= 9 (as required) but without the restriction on x1 is C(6+20-1, 20) = C(25,20) = The number of solution violating the additional restriction by having x1 >= 8 is C(6+12-1,12) = C(17,12) = Therefore the answer is – 6188 = 46, Theorem 3 applies here, with n=10 and k=3. The answer is therefore 10!/2!3!5! = 2520

Theorem 3 applies here, with n=14, n1=n2=3 (the triplets), n3=n4=n5 =2 (the twins), and n6=n7=1. The answer is therefore 14!/(3!3!3!2!2!2!1!1!) = 302,702, We introduce the nonnegative slack variable x4, and our problem becomes the same as the problem of counting the number of nonnegative integer solutions to x1+x2+x3+x4 = 11. So the answer is C(4+11-1,11) = C(14,11) = C(12,2)C(10,2)C(8,2)C(6,2)C(4,2)C(2,2)= 7,484, Let g1, g2, g3, g4 be the number of 0's placed in gaps 1 through 4, respectively. The only restriction is that each gi>=2 for each i. Letting gi=g'i+2, we want to count the number of solutions to the equation g1+g2+g3+g4=12, with gi >=2 for each i. Letting gi=g'i + 2, we want to count the number of nonnegative solutions to g'1+g'2+g'3+g'4=4. C(4+4-1,4) = C(7,4) = 35 solutions !/2! = 360

We need to consider the three determined by the number of characters used in the string: 7,8, or 9. If all nine letters are to be used, then Theorem 3 applies and we get 9!/(4!2!1!1!1!)=7560 strings. If only eight letters are used, then we need to consider which letter is left out. In each of the cases in which the V,G or N is omitted, so 8!/(4!2!1!1!) = 840 string, for a total of 2520 for these cases. If an R is left out, then there are 8!/(4!1!1!1!) = 1680 strings, and if an E is left out, then there are 8!/(3!2!1!1!) = 3360 strings. This gives a total of = 7560 strings of length 8. For strings of length 7 there are even more cases. We tabulate them here: omitting VG7!/(4!2!1!) = 105 strings, omitting VN7!/(4!2!1!) = 105 strings omitting GN7!/(4!2!1!) = 105 strings omitting VR7!/(4!1!1!1!) = 210 strings omitting GR7!/(4!1!1!1!) = 210 strings omitting NR7!/(4!1!1!1!) = 210 strings omitting RR7!/(4!1!1!1!) = 210 strings omitting EV7!/(3!2!1!1!) = 420 strings omitting EG7!/(3!2!1!1!) = 420 strings omitting EN7!/(3!2!1!1!) = 420 strings omitting ER7!/(3!1!1!1!1!) = 840 strings omitting EE7!/(2!2!1!1!1!) = 1260 strings Thus the answer is =19,635

Theorem 3 applies, with n=7, n1=3, n2=2, and n3=2. The answer is 7!/(3!2!2!) = C(52,7)C(45,7)C(38,7)C(31,7)C(24,7) = 52!/(7! 7! 7! 7! 7!17!)  7.0*10^ (a) All that matters is the number of books on each shelf, so the answer is the number of solutions to x1+...+x4 = 12, where xi is being viewed as the number of books on shelf i. The answer is C(4+12-1,12) = C(15,12) = 455 (b) No generality is lost if we number the books b1, b2,...,b12 and think of placing book b1, then placing b2, and so on. there are clearly 4 ways to place b1, since we put it as the first book on any of the shelves. After b1 is placed, there are 5 ways to place b2, since it can go to the right of b1 or it can be the first book on any of the shelves. We continue in this way: there are 6 ways to place b3 (to the right of b1, to the right of b2, or ads the first book on any of the shelves), 7 ways to placeb4,...,15 ways to place b12. Therefore answer is the product of these numbers 4*5*...*15 = 217,945,728,000

a) Letting xi be the number of copies of the book placed on shelf i, we are asking for the number of solutions t the equation x1+...+xk = n, with each xi a nonnegative integer. By theorem 2 this is C(k+n-1,n). b) No generality is lost if we number the books b1, b2,...,bn and think of placing book b1, then placing b2, and so on. There are clearly k ways to place b1, since we can put it as the first book on any of the shelve. After b1 is placed, there are k+1 ways to place b2, since it can go to the right of b1 or it can be the first book on any of the shelves. We continue tin this way: there are k+2 ways to place b3, k+3 ways to place b4,...,k+n-1 ways to place bn. Therefore the answer is the product of these numbers, which can more easily be expressed as (k+n-1)!/(k-1)! Another, perhaps easier, way to obtain this answer is to think of first choosing the locations for the books, which is what we counted in part (a), and then choose a permutation of the n books to put into those locations (shelf by shelf, from the top down, and from left to right on each shelf). Thus the answer is C(k+n-1,n)n!, which evaluates to the same thing we obtained with our other analysis.