{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# n9 - CS 70-2 Spring 2009 Counting Discrete Mathematics and...

This preview shows pages 1–2. Sign up to view the full content.

CS 70-2 Discrete Mathematics and Probability Theory Spring 2009 Alistair Sinclair, David Tse Note 9 Counting In the next major topic of the course, we will be looking at probability. Suppose you toss a fair coin a thousand times. How likely is it that you get exactly 500 heads? And what about 1000 heads? It turns out that the chances of 500 heads are roughly 5%, whereas the chances of 1000 heads are so infinitesimally small that we may as well say that it is impossible. But before you can learn to compute or estimate odds or probabilities you must learn to count! That is the subject of this note. We will learn how to count the number of outcomes while tossing coins, rolling dice and dealing cards. Many of the questions we will be interested in can be cast in the following simple framework called the occupancy model: Balls in Bins: We have a set of k balls. We wish to place them into n bins. How many different possible outcomes are there? How do we represent coin tossing and card dealing in this framework? Consider the case of n = 2 bins labelled H and T , corresponding to the two outcomes of a coin toss. The placement of the k balls correspond to the outcomes of k successive coin tosses. To model card dealing, consider the situation with 52 bins corresponding to a deck of cards. Here the balls correspond to successive cards in a deal. The two examples illustrate two different constraints on ball placements. In the coin tossing case, different balls can be placed in the same bin. This is called sampling with replacement . In the cards case, no bin can contain more than one ball (i.e., the same card cannot be dealt twice). This is called sampling without replacement . As an exercise, what are n and k for rolling dice? Is it sampling with or without replacement? We are interested in counting the number of ways of placing k balls in n bins in each of these scenarios. This is easy to do by applying the first rule of counting: First Rule of Counting: If an object can be made by a succession of choices, where there are n 1 ways of making the first choice, and for every way of making the first choice there are n 2 ways of making the second choice, and for every way of making the first and second choice there are n 3 ways of making the third choice, and so on up to the n k -th choice, then the total number of distinct objects that can be made in this way is the product n 1 · n 2 · n 3 ··· n k .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern