Counting and Probability The outcome of a random process is sure to occur, but impossible to predict. Examples: fair coin tossing, rolling a pair of dice,

Slides:



Advertisements
Similar presentations
Permutations and Combinations Rosen 4.3. Permutations A permutation of a set of distinct objects is an ordered arrangement these objects. An ordered arrangement.
Advertisements

Counting Chapter 6 With Question/Answer Animations.
Counting Techniques: Combinations
Multiplication Rule. A tree structure is a useful tool for keeping systematic track of all possibilities in situations in which events happen in order.
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
Discrete Mathematics Lecture 7 More Probability and Counting Harper Langston New York University.
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
Counting and probability What do you mean by counting? How do you count things in daily life? Counting the European way or the English speaking way?
Basics of Probability. Trial or Experiment Experiment - a process that results in a particular outcome or “event”. Simple event (or sample point), E i.
Discrete Mathematics Lecture 5
Discrete Mathematics Lecture 6 Alexander Bukharovich New York University.
Counting Elements in a List How many integers in the list from 1 to 10? How many integers in the list from m to n? (assuming m
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Chapter 1 Fundamental principles of counting 陳彥良 中央大學資管系.
4. Counting 4.1 The Basic of Counting Basic Counting Principles Example 1 suppose that either a member of the faculty or a student in the department is.
Counting and Probability Sets and Counting Permutations & Combinations Probability.
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
7 Further Topics in Algebra © 2008 Pearson Addison-Wesley. All rights reserved Sections 7.4–7.7.
Counting. Techniques for counting Rule 1 Suppose we carry out have a sets A 1, A 2, A 3, … and that any pair are mutually exclusive (i.e. A 1  A 2 =
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.4,
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Topics to be covered: Produce all combinations and permutations of sets. Calculate the number of combinations and permutations of sets of m items taken.
Generalized Permutations and Combinations
Discrete Mathematical Structures (Counting Principles)
Counting and Probability. Counting Elements of Sets Theorem. The Inclusion/Exclusion Rule for Two or Three Sets If A, B, and C are finite sets, then N(A.
9.3 Addition Rule. The basic rule underlying the calculation of the number of elements in a union or difference or intersection is the addition rule.
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.
1 Lecture 4 (part 1) Combinatorics Reading: Epp Chp 6.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Chapter 6, Counting and Probability
Introduction to Probability. 5.1 Experiments, Outcomes, Events, and Sample Spaces Sample space - The set of all possible outcomes for an experiment Roll.
Simple Arrangements & Selections. Combinations & Permutations A permutation of n distinct objects is an arrangement, or ordering, of the n objects. An.
September1999 CMSC 203 / 0201 Fall 2002 Week #9 – 21/23/25 October 2002 Prof. Marie desJardins.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.1,
Aaron Tan October Counting and Probability 1 IntroductionPossibility Trees and Multiplication RuleCounting Elements of Disjoint SetsThe Pigeonhole.
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,
Discrete Mathematics Lecture # 25 Permutation & Combination.
Main Menu Main Menu (Click on the topics below) Combinatorics Introduction Equally likely Probability Formula Counting elements of a list Counting elements.
Counting Principles Multiplication rule Permutations Combinations.
1 CS 140 Discrete Mathematics Combinatorics And Review Notes.
+ Chapter 5 Overview 5.1 Introducing Probability 5.2 Combining Events 5.3 Conditional Probability 5.4 Counting Methods 1.
Probability. 3.1 Events, Sample Spaces, and Probability Sample space - The set of all possible outcomes for an experiment Roll a die Flip a coin Measure.
UNIT 3. OUTLINE: Sets and Subsets Set Operations the Laws of Set Theory Counting and Venn Diagrams. A First Word on Probability. The Axioms of Probability.
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
Spring 2016 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University.
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.
Copyright © Peter Cappello 2011 Simple Arrangements & Selections.
Section The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must have more than 1 pigeon.
Week 9 - Friday.  What did we talk about last time?  Partial orders  Total orders  Basic probability  Event  Sample space  Monty Hall  Multiplication.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 5 Counting 歐亞書局.
Section 6.3. Section Summary Permutations Combinations.
PROBABILITY AND STATISTICS WEEK 2 Onur Doğan. Introduction to Probability The Classical Interpretation of Probability The Frequency Interpretation of.
Discrete Mathematics Lecture 8 Probability and Counting
What Is Probability?.
9. Counting and Probability 1
9. Counting and Probability 1 Summary
CS100: Discrete structures
COUNTING AND PROBABILITY
PROBABILITY AND STATISTICS
COUNTING AND PROBABILITY
COUNTING AND PROBABILITY
Discrete Structures Counting.
Presentation transcript:

Counting and Probability The outcome of a random process is sure to occur, but impossible to predict. Examples: fair coin tossing, rolling a pair of dice, card drawing from a well shuffled card deck, etc. Sample space is the set of all possible outcomes of a random process. An event is a subset of a sample space. The probability of an event is the ratio between the number of outcomes that satisfy the event to the total number of possible outcomes.

Possibility Trees Teams A and B are to play each other repeatedly until one wins two games in a row or a total three games. What is the probability that five games will be needed to determine the winner? Suppose there are 4 I/O units and 3 CPUs. In how many ways can I/Os and CPUs be paired with each other when there are no restrictions?

Multiplication Rule Multiplication rule: if an operation consists of k steps each of which can be performed in n i ways (i = 1, 2, …, k), then the entire operation can be performed in  n i ways. Number of PINs with repetitions Number of elements in a Cartesian product Number of PINs without repetition Number of Input/Output tables for a circuit with n input signals Number of iterations in nested loops

Multiplication Rule Three officers – a president, a treasurer and a secretary are to be chosen from four people: Alice, Bob, Cindy and Dan. Alice cannot be a president, Either Cindy or Dan must be a secretary. How many ways can the officers be chosen?

Permutations A permutation of a set of objects is an ordering of these objects. The number of permutations of a set of n objects is n!. An r-permutation of a set of n elements is an ordered selection of r elements taken from a set of n elements: P(n, r) P(n, r) = n! / (n – r)! Show that P(n, 2) + P(n, 1) = n 2

Exercises How many odd integers are there from 10 through 99 that have distinct digits? (40) How many numbers from 1 through contain exactly one of each of the digits 2, 3, 4, and 5? (720) Let n = p 1 k1 p 2 k2 …p m km. How many divisors does n have? What is the smallest integer with exactly 12 divisors? (60)

Addition Rule If a finite set A is a union of k mutually disjoint sets A 1, A 2, …, A k, then N(A) =  N(A i ) Number of words of length no more than 3 Number of 3-digit integers divisible by 5 The Difference Rule If A is a finite set and B is its subset, then N(A – B) = N(A) – N(B). Example 6.3.3: How many 4-symbol PINs contain repeated symbols? (Each symbol is chosen from the 26 letters of the alphabet and the ten digits)

Inclusion/Exclusion Rule n(AUB) = n(A) + n(B) – n(A∩B). Derive the above rule for 3 sets. How many integers from 1 through 1000 are multiples of 3 or multiples of 5? How many integers from 1 through 1000 are neither multiples of 3 nor multiples of 5?

Exercises Suppose that out of 50 students, 30 know Pascal, 18 know Fortran, 26 know Cobol, 9 know both Pascal and Fortran, 16 know both Pascal and Cobol, 8 know Fortran and Cobol and 47 know at least one programming language. How many students know none of the three languages? (3) How many students know all three languages? (6) How many students know exactly 2 languages? (15)

Exercises A calculator has an eight-digit display and a decimal point which can be before, after or in between digits. The calculator can also display a minus sign for negative numbers. How many different numbers can the calculator display? (Q. of Hw6) A combination lock requires three selections of numbers from 1 to 39. How many combinations are possible if the same number cannot be used for adjacent selections? (39*38*38)

Exercises How many integers from 1 to contain the digit 6 exactly once / at least once? What is the probability that a random number from 1 to will contain two or more occurrences of digit 6? 6 new employees, 2 of whom are married are assigned 6 desks, which are lined up in a row. What is the probability that the married couple will have non-adjacent desks?

Exercises Consider strings of length n over the set {a, b, c, d}: How many such strings contain at least one pair of consecutive characters that are the same? If a string of length 10 is chosen at random, what is the probability that it contains at least on pair of consecutive characters that are the same? How many permutations of abcde are there in which the first character is a, b, or c and the last character is c, d, or e? How many integers from 1 through contain each of the digits 1, 2, and 3 at least once?

Combinations An r-combination of a set of n elements is a subset of r of the n elements, denoted C(n, r) or. Permutation is an ordered selection; combination is an unordered selection. Quantitative relationship between permutations and combinations: P(n, r) = C(n, r) * r! See slides later for permutations of a set with repeated elements.

Team Selection Problems 12 people, 5 men and 7 women, work on a project: How many 5-person teams can be chosen? C(12,5) If two people insist on working together (or not working at all), how many 5-person teams can be chosen? C(10,3)+C(10,5) If two people insist on not working together, how many 5- person teams can be chosen? C(10,5)+C(10,4)*2 How many 5-person teams consist of 3 men and 2 women? C(5,3)*C(7,2) How many 5-person teams contain at least 1 man? C(12,5)-C(7,5) How many 5-person teams contain at most 1 man? C(7,5)+C(5,1)*C(7,4)

Similar Exercises An instructor gives an exam with 14 questions. Students are allowed to choose any 10 of them to answer: Suppose 6 questions require proof and 8 do not: How many groups of 10 questions contain 4 that require a proof and 6 that do not? How many groups of 10 questions contain at least one that require a proof? How many groups of 10 questions contain at most 3 that require a proof? A student council consists of 3 freshmen, 4 sophomores, 3 juniors and 5 seniors. How many committees of eight members contain at least one member from each class?

Permutations with Repetition Suppose a collection consists of n objects of which n 1 are of type 1 and are indistinguishable from each other n 2 are of type 2 and are indistinguishable from each other … n k are of type k and are indistinguishable from each other, and suppose n 1 +n 2 + …+n k =n. Then the number of distinct permutations of the n objects is Example: How many distinguishable orderings of the letters in the word MISSISSIPPI are there?

Combinations with Repetition An r-combination with repetition allowed is an unordered selection of elements where some elements can be repeated. The number of r-combinations with repetition allowed from a set of n elements is C(r + n –1, r) Example: How many triples of integers from 1 through n can be formed in which the elements of the triple are in increasing order but not necessarily distinct?

Integral Equations How many non-negative integer solutions are there to the equation x 1 + x 2 + x 3 + x 4 = 10? How many positive integer solutions are there for the above equation?

Algebra of Combinations and Pascal’s Triangle The number of r-combinations from a set of n elements equals the number of (n – r)- combinations from the same set. Namely, C(n,r)=C(n, n-r) Show that C(n, 0) 2 + C(n, 1) 2 + … + C(n, n) 2 = C(2n, n). Pascal’s Formula: Let n and r be positive integers and r ≤ n. Then C(n + 1, r) = C(n, r – 1) + C(n, r)

Binomial Theorem (a + b) n =  C(n, k)a n-k b k Show that  C(n, k) = 2 n Show that  (-1) k C(n, k) = 0. Express  C(n, k)3 k in the closed form.