Download presentation
Presentation is loading. Please wait.
Published byJasmin Rogers Modified over 8 years ago
1
Week 9 - Friday
2
What did we talk about last time? Partial orders Total orders Basic probability Event Sample space Monty Hall Multiplication rule
4
There are 10 thieves who have just stolen an enormous pile of loot: gold, jewels, solid state drives, and so on The thieves need to find a way to divide it all equally Give an algorithm such that each of the 10 thieves believe that he is getting at least 1/10 of the loot Hint: When you were a kid, how did your mother have you and your brother or sister divide the last piece of cake?
6
A permutation of a set of objects is an ordering of the objects in a row Consider set { a, b, c } Its permutations are: abc acb cba bac bca cab If a set has n 1 elements, it has n! permutations
7
How many different ways can the letters in the word "WOMBAT" be permuted? How many different ways can "WOMBAT" be permuted such that "BA" remains together? What is the probability that, given a random permutation of "WOMBAT", the "BA" is together? How many different ways can the letters in "MISSISSIPPI" be permuted? How many would it be if we don't distinguish between copies of letters?
8
What if you want to seat 6 people around a circular table? If you only care about who sits next to whom (rather than who is actually in Seat 1, Seat 2, etc.) how many circular permutations are there? What about for n people?
9
An r-permutation of a set of n element is an ordered selection of r elements from the set Example: A 2-permutation of {a, b, c} includes: ab ac ba bc ca cb The number of r-permutations of a set of n elements is P(n,r) = n!/(n – r)!
10
What is P(5,2)? How many 4-permutations are there in a set of 7 objects? How many different ways can three of the letters in "BYTES" be written in a row?
12
If a finite set A equals the union of k distinct mutually disjoint subsets A 1, A 2, … A k, then: N(A) = N(A 1 ) + N(A 2 ) + … + N(A k )
13
How many passwords are there with length 3 or smaller? Assume that a password is only made up of lower case letters Passwords with length 3 or smaller fall into 3 disjoint sets Number of passwords with length 1 Number of passwords with length 2 Number of passwords with length 3 Total passwords = 26 + 26 2 + 26 3 = 18278
14
If A is a finite set and B is a subset of A, then N(A – B) = N(A) – N(B) Example: Recall that a PIN has 4 digits, each of which is one of the 26 letters or one of the 10 digits How many PINs contain repeated symbols? What is the probability that a PIN contains a repeated symbol?
15
If A, B, C are any finite sets, then N(A B) = N(A) + N(B) – N(A B) And, N(A B C) = N(A) + N(B) + N(C) – N(A B) – N(A C) – N(B C) + N(A B C)
16
How many integers from 1 through 1,000 are multiples of 3 or multiples of 5? How many integers from 1 through 1,000 are neither multiples of 3 nor multiples of 5?
17
Consider a survey of 50 students about the programming languages they know The results are: 30 know Java 18 know C++ 26 know ML 9 known both Java and C++ 16 know both Java and ML 8 know both C++ and ML 47 know at least one of the three How many students know none of the three? How many students know all three? How many students know Java and C++ but not ML? How many students know Java but neither C++ nor ML?
18
Student Lecture
20
How many different subsets of size r can you take out of a set of n items? Subset of size 3 out of a set of size 5? Subset of size 4 out of a set of size 5? Subset of size 5 out of a set of size 5? Subset of size 1 out of a set of size 5? This is called an r-combination, written
21
In r-permutations, the order matters In r-combinations, the order doesn't Thus, the number of r-combinations is just the number of r-permutations divided by the possible orderings
22
How many ways are there to choose 5 people out of a group of 12? What if two people don't get along? How many 5 person teams can you make from a group of 12 if those two people cannot both be on the team?
23
How many five-card poker hands contain two pairs? If a five-card hand is dealt at random from an ordinary deck of cards, what is the probability that the hand contains two pairs?
24
What if you want to take r things out of a set of n things, but you are allowed to have repetitions? Think of it as putting r things in n categories Example: n = 5, r = 4 We could represent this as x||xx|x| That's an r x's and n – 1 |'s 12345 xxxx
25
So, we can think of taking an r-combination with repetitions as choosing r items in a string that is r + n – 1 long and marking those as x's Consequently, the number of r-combinations with repetitions is
26
Let's say you grab a handful of 10 Starbursts Original Starbursts come in Cherry Lemon Strawberry Orange How many different handfuls are possible? How many possible handfuls will contain at least 3 cherry?
27
This is a quick reminder of all the different ways you can count things: Order MattersOrder Doesn't Matter Repetition Allowed nknk Repetition Not Allowed P(n,k)P(n,k)
30
Binomial theorem Probability axioms Expected values
31
Work on Homework 7 Due Friday before midnight! Keep reading Chapter 9
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.