Foundations of Computing Discrete Mathematics Solutions to exercises for week 12

Similar documents
Discrete Structures Lecture Permutations and Combinations

Discrete Mathematics: Logic. Discrete Mathematics: Lecture 15: Counting

Exercises Exercises. 1. List all the permutations of {a, b, c}. 2. How many different permutations are there of the set {a, b, c, d, e, f, g}?

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

1. An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?

CSC/MTH 231 Discrete Structures II Spring, Homework 5

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

Probability and Counting Techniques

DISCRETE STRUCTURES COUNTING

Jong C. Park Computer Science Division, KAIST

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

Topics to be covered

The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n ways to do the first task and n

Theory of Probability - Brett Bernstein

November 6, Chapter 8: Probability: The Mathematics of Chance

Section 6.1 #16. Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

Section : Combinations and Permutations

With Question/Answer Animations. Chapter 6

Sec 5.1 The Basics of Counting

Week 1: Probability models and counting

CONTENTS CONTENTS PAGES 11.0 CONCEPT MAP A. PERMUTATIONS a EXERCISE A B. COMBINATIONS a EXERCISE B PAST YEAR SPM

Permutations and Combinations

Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples

Mat 344F challenge set #2 Solutions

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 13

Chapter 2. Permutations and Combinations

Combinatorics and Intuitive Probability

CISC 1400 Discrete Structures

Sample Spaces, Events, Probability

Midterm 2 Practice Problems

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following:

What is counting? (how many ways of doing things) how many possible ways to choose 4 people from 10?

CS1802 Week 3: Counting Next Week : QUIZ 1 (30 min)

Permutations and Combinations

Math 166: Topics in Contemporary Mathematics II

CIS 2033 Lecture 6, Spring 2017

JUST THE MATHS UNIT NUMBER PROBABILITY 2 (Permutations and combinations) A.J.Hobson

JIGSAW ACTIVITY, TASK # Make sure your answer in written in the correct order. Highest powers of x should come first, down to the lowest powers.

The Coin Toss Experiment

November 11, Chapter 8: Probability: The Mathematics of Chance

Counting. Chapter 6. With Question/Answer Animations

10-1. Combinations. Vocabulary. Lesson. Mental Math. able to compute the number of subsets of size r.

Most of the time we deal with theoretical probability. Experimental probability uses actual data that has been collected.

Junior Circle Meeting 5 Probability. May 2, ii. In an actual experiment, can one get a different number of heads when flipping a coin 100 times?

When a number cube is rolled once, the possible numbers that could show face up are

Math Fall 2011 Exam 2 Solutions - November 1, 2011

The topic for the third and final major portion of the course is Probability. We will aim to make sense of statements such as the following:

Counting Methods and Probability

Counting (Enumerative Combinatorics) X. Zhang, Fordham Univ.

9.5 Counting Subsets of a Set: Combinations. Answers for Test Yourself

Section Summary. Permutations Combinations Combinatorial Proofs

Discrete Structures for Computer Science

November 8, Chapter 8: Probability: The Mathematics of Chance

Course Learning Outcomes for Unit V

MAT3707. Tutorial letter 202/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/202/1/2017

STAT 430/510 Probability Lecture 3: Space and Event; Sample Spaces with Equally Likely Outcomes

Functional Skills Mathematics

Counting and Probability Math 2320

CSCI 2200 Foundations of Computer Science (FoCS) Solutions for Homework 7

Probability MAT230. Fall Discrete Mathematics. MAT230 (Discrete Math) Probability Fall / 37

W = {Carrie (U)nderwood, Kelly (C)larkson, Chris (D)aughtry, Fantasia (B)arrino, and Clay (A)iken}

CPCS 222 Discrete Structures I Counting

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

7.1 Chance Surprises, 7.2 Predicting the Future in an Uncertain World, 7.4 Down for the Count

MGF 1106: Exam 2 Solutions

Section 5.4 Permutations and Combinations

Contemporary Mathematics Math 1030 Sample Exam I Chapters Time Limit: 90 Minutes No Scratch Paper Calculator Allowed: Scientific

CS 787: Advanced Algorithms Homework 1

Lesson Lesson 3.7 ~ Theoretical Probability

STAT 430/510 Probability

Probability Models. Section 6.2

Section 5.4 Permutations and Combinations

Chapter 4: Introduction to Probability

PROBABILITY. 1. Introduction. Candidates should able to:

STAT 430/510 Probability Lecture 1: Counting-1

CHAPTER 8 Additional Probability Topics

STATISTICAL COUNTING TECHNIQUES

The study of probability is concerned with the likelihood of events occurring. Many situations can be analyzed using a simplified model of probability

AwesomeMath Admission Test A

If a regular six-sided die is rolled, the possible outcomes can be listed as {1, 2, 3, 4, 5, 6} there are 6 outcomes.

CS1800: More Counting. Professor Kevin Gold

Discrete Structures for Computer Science

Sec$on Summary. Permutations Combinations Combinatorial Proofs

I. WHAT IS PROBABILITY?

Raise your hand if you rode a bus within the past month. Record the number of raised hands.

Chapter 7. Intro to Counting

Solutions for Exam I, Math 10120, Fall 2016

Solutions - Problems in Probability (Student Version) Section 1 Events, Sample Spaces and Probability. 1. If three coins are flipped, the outcomes are

Midterm 2 6:00-8:00pm, 16 April

Class 8 Cubes and Cube Root

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. C) 1 6

Intermediate Math Circles November 1, 2017 Probability I

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Probability. Dr. Zhang Fordham Univ.

Finite Math Section 6_4 Solutions and Hints

3 The multiplication rule/miscellaneous counting problems

Probability (Devore Chapter Two)

Discrete mathematics

Grade 8 Math Assignment: Probability

CS1802 Week 9: Probability, Expectation, Entropy

Transcription:

Foundations of Computing Discrete Mathematics Solutions to exercises for week 12 Agata Murawska (agmu@itu.dk) November 13, 2013 Exercise (6.1.2). A multiple-choice test contains 10 questions. There are four possible answers for each question 1. a) In how many ways can a student answer the questions on the test if the student answers every question? For each question a student has 4 options from which he chooses one. That makes the number of ways to be equal to 4 10 by product rule. b) In how many ways can a student answer the questions on the test if the student can leave answers blank? Now student has 5 options as he can choose any of the existing options or leave no answer. Again by product rule, the number of ways is equal to 5 10. Exercise (6.1.12). How many positive integers between 100 and 999 inclusive a) are divisible by 7? Every 7th number is divisible by 7, 1000 div 7 = 142. We have to exclude numbers smaller than 100, there are 100 div 7 = 14 if them. The final answer is therefore 142 14 = 128. b) are odd? Every 2nd number is odd. 1000 div 2 100 div 2 = 500 50 = 450 c) have the same three decimal digits? It is simplest to just list these numbers: 111, 222, 333, 444, 555, 666, 777, 888 and 999 there are 9 of them. 1 We are assuming there is exactly one correct answer to each question 1

d) are not divisible by 4? There are 1000 div 4 100 div 4 = 250 25 = 225 numbers divisible by 4 and 900 numbers between 100 and 999 in general, so there are 900 225 = 675 numbers not divisible by 4. e) are divisible by 3 or 4? There are 1000 div 4 100 div 4 = 225 numbers divisible by 4 and 1000 div 3 100 div 3 = 333 33 = 300 numbers divisible by 3. However, we have counted numbers divisible by 12 in both groups. There are 1000 div 12 100 div 12 = 83 8 = 75 numbers like that. Finally, there are 225 + 300 75 = 450 numbers divisible by 3 or 4. f) are not divisible by either 3 or 4? We will use the solution from previous step. We know that 450 numbers between 100 and 999 are divisible by 3 or by 4. Therefore, there are 900-450=450 numbers not divisible by either 3 or 4. g) are divisible by 3 but not by 4? There are 1000 div 3 100 div 3 = 333 33 = 300 numbers divisible by 3. Out of those, 1000 div 12 100 div 12 = 83 8 = 75 are also divisible by 4 (as they are divisible by 3 4 = 12. So there are 300 75 = 225 numbers divisible by 3 but not by 4. h) are divisible by 3 and 4? Numbers divisible by 3 and 4 are divisible by 12. There are 1000 div 12 100 div 12 = 83 8 = 75 such numbers. Exercise (6.2.4). The bowl contains 10 red balls and 10 blue balls. A woman selects balls at random without looking at them. a) How many balls must she select to be sure of having at least three balls of the same color? She must select 5 balls. A justification for this is the following: having only 4 balls, you either have at least 3 of one color or you are in a situation where you have 2 blue balls and 2 red ones. In the latter case, selecting any additional ball gives you three balls of the same color. Therefore, selecting 5 balls is sufficient. Formally, we can use the generalized pigeonhole principle, where balls are objects and colors are boxes. If we put 5 objects into 2 boxes, there is at least one box (so, color of the balls) containing 5 2 = 3 objects. b) How many balls must she select to be sure of having at least three blue balls? 2

She must select 13 balls. To see this, consider the (unlikely) scenario that first ten balls she selects are all red. Then she still needs to pick 3 more balls to have three blue ones. Exercise (6.3.8). A group contains n men and n women. How many ways are there to arrange these people in a row if the men and women alternate? We have to fill a row of length 2n in such a way that men and women alternate. Note that we can select order of men and order of women separately. If W is the number of ways in which to order women and M is the number of ways to order men, then the final answer will be 2 W M as the only choice we have once men and women are ordered is whether to start the final row with a man or a woman. Now, it remains to calculate W and M. Notice, that in fact W = M as there are n men and n women to arrange (and we have to use them all). In how many ways can we arrange men? It will be a permutation of length n, therefore by definition, M = P(n, n) = n(n 1)(n 2)... (n n + 1) = n!. Finally, the number of ways to arrange these people is 2 W M = 2 n! n!. Exercise (6.3.12). A coin is flipped 10 times where each flip comes up either heads or tails. How many possible outcomes a) are there in total? Each of 10 coins can come up heads (H) or tails (T ), There are 2 possible outcomes when flipping one coin (H or T ), 4 possible outcomes when flipping 2 coins (HH, HT, T H and T T ) and so on. In particular, for 10 coins there are 2 10 = 1024 possible outcomes. b) contain exactly two heads? If there are exactly two Hs, there are also exactly 8 T s when 10 coins are flipped. This means that different possible outcomes come from the exact order in which these two heads are obtained. We need to choose 2 positions out of 10 for the heads, so by definition of combination we have 10! C(10, 2) = = 45 ways to get exactly 2 heads.2 2! (10 2)! c) contain at most three tails? We will solve this by summing up number of possible outcomes with exactly 0, 1, 2 and 3 tails. For 0 tails, there is only one possible outcome all heads. For 1 tails there are 10 possible outcomes, as the tails can occur in any of the 10 flips. For 2 tails there are 45 possible outcomes (by the same argument as we have used in part b) for exactly 2 heads). For 2 Notice, that if we want to instead choose 8 positions out of 10 for the tails, we get the exact same result. 3

10! 3 tails there are C(10, 2) = = 120 possible outcomes. Finally, 3! (10 3)! summing it all up we get 1 + 10 + 45 + 120 = 176 possible outcomes with three or less tails. d) contain the same number of heads and tails? There must be exactly 5 heads and 5 tails. Similarly to the case in part b) we can only choose the 5 positions where the result will be heads. 10! Therefore there are C(10, 5) = = 252 possible outcomes. 5! (10 5)! Exercise (6.3.16). Thirteen people on a softball team show up for a game. a) How many ways are there to choose 10 players to take the field? We choose 10 out of 13 players and we do not care about the order, in which they are chosen. Therefore, we use definition of a combination. There are C(13, 10) = 13! = 286 ways to choose 10 players. 10! 3! b) How many ways there are to assign the 10 positions by selecting players from the 13 people who show up? We can solve this in two ways: We can use the previous solution and notice, that after the 10 players were chosen, we can assign them positions in P(10, 10) = 10! ways, resulting in 286 10! = 1037836800 possibilities We can just choose 10 out of 13 people and assign them positions. This will result in P(13, 10) = 13! = 1037836800, so the exact same 3! result. c) Of the 13 people who show up, three are women. How many ways are there to choose 10 players to take the field if at least one of these players must be a woman? Again, this part can be solved in two ways: There can be exactly 3, 2 or just 1 woman on the team. The choice of men on the team is independent from the choice of women. For 3 women on the team, we choose men in C(10, 7) = 120 ways (as there are 10 men and 7 slots for them) and there is only one way to choose the women (which is consistent with C(3, 3) = 3! = 1). 0! 3! For 2 women on the team, we choose men in C(10, 8) = 45 ways and women in C(3, 2) = 3 ways, resulting in a total of 45 3 = 135 options. For 1 women on the team, we choose men in C(10, 9) = 10 ways and woman in C(3, 1) = 3 way, resulting in a total of 10 3 = 30 options. Summing up these possibilities, there are 120 + 135 + 30 = 285 ways to have at least one women on the team. 4

From part a) we know that there were a total of 286 ways to have 10 people selected. In the current setting, with 10 men and 3 women there is only one way to get a team with no women in it it is to take all the men. Therefore the remaining 285 ways must be ones where at least one woman is on the team. Exercise (6.5.4). How many ways are there to select five unordered elements from a set with three elements when repetition is allowed? We are asked to find a number of combinations where repetition is allowed. The set contains n = 3 elements and we select r = 5 of them, therefore the number of possible ways of doing that is C(n + r 1, r) = C(7, 5) = 21. Exercise (6.5.14). How many solutions are there to the inequality x 1 + x 2 + x 3 11 where x 1, x 2 and x 3 are nonnegative integers? Using the hint, we will introduce nonnegative integer x 4 such that x 1 + x 2 + x 3 + x 4 = 11. 3 We need to find a way of selecting 11 items from a set of four elements so that there are x 1 items of type one, x 2 items of type two, x 3 items of type three and x 4 items of type four. This is again a number of combinations where repetition is allowed: C(4 + 11 1, 11) = C(14, 11) = 14 13 12 = 308. 1 2 3 Exercise (6.5.26). How many different bit strings can be formed using six 1s and eight 0s? We have 14 boxes to use up in total. We have to select places for objects of one type (e.g. for 1s), then fill the rest of boxes with the 0s. This results in the following number of different bit strings: C(14, 6) = 3003. 3 The reasoning follows the solution for example 5. 5