1 Counting Techniques: Possibility Trees, Multiplication Rule, Permutations.

Slides:



Advertisements
Similar presentations
4-1 Chapter 4 Counting Techniques.
Advertisements

The Fundamental Counting Principle & Permutations
Counting Techniques: Permutations of Selected Elements Addition Rule, Difference Rule, Inclusion/Exclusion Rule.
T HE F UNDAMENTAL C OUNTING P RINCIPLE & P ERMUTATIONS.
CSCE 2100: Computing Foundations 1 Combinatorics Tamara Schneider Summer 2013.
Counting Techniques: Combinations
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,
Multiplication Rule. A tree structure is a useful tool for keeping systematic track of all possibilities in situations in which events happen in order.
12.1 & 12.2: The Fundamental Counting Principal, Permutations, & Combinations.
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
ENM 207 Lecture 5. FACTORIAL NOTATION The product of positive integers from 1 to n is denoted by the special symbol n! and read “n factorial”. n!=1.2.3….(n-2).(n-1).n.
Discrete Mathematics Lecture 6 Alexander Bukharovich New York University.
1 More Counting Techniques Possibility trees Multiplication rule Permutations Combinations.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Lecture 07 Prof. Dr. M. Junaid Mughal
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.
Computer Implementation of Genetic Algorithm
The Fundamental Counting Principal, Permutations, & Combinations.
Some lovely and slightly random facts… Give the number of objects described. 1. The number of cards in a standard deck The number of cards of each.
T HE F UNDAMENTAL C OUNTING P RINCIPLE & P ERMUTATIONS.
The Fundamental Counting Principal - Permutations - Factorials.
The Basics of Counting Section 6.1.
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 =
Topics to be covered: Produce all combinations and permutations of sets. Calculate the number of combinations and permutations of sets of m items taken.
Counting Techniques 0.4.
Number of Elements in a Finite Set. Notation : The number of the elements of the set A will be denoted by n(A) Examples (1): Let: Let: A = {a,b,c,d} B.
Chapter 6 With Question/Answer Animations 1. Chapter Summary The Basics of Counting The Pigeonhole Principle Permutations and Combinations Binomial Coefficients.
Permutations and Combinations
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
Methods of Counting Outcomes BUSA 2100, Section 4.1.
CSE 221: Algorithms and Data Structures Lecture #10 Counting: Easy as 1, 2, C(3,1) Steve Wolfman 2009W1 1.
© The McGraw-Hill Companies, Inc., Chapter 4 Counting Techniques.
Lesson Counting Techniques. Objectives Solve counting problems using the Multiplication Rule Solve counting problems using permutations Solve counting.
Elements of Combinatorics (Continuation) 1. Pigeonhole Principle Theorem. If pigeons are placed into pigeonholes and there are more pigeons than pigeonholes,
Part 2 – Factorial and other Counting Rules
Simple Arrangements & Selections. Combinations & Permutations A permutation of n distinct objects is an arrangement, or ordering, of the n objects. An.
Permutations. Definition of Permutation An arrangement of objects in which the order of selection matters. Ex: You have to visit Andrew’s house (A), Betty’s.
Counting CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Objective: You should be able to solve problems involving permutations and combinations.
Counting Principles Multiplication rule Permutations Combinations.
9.6 The Fundamental Counting Principal & Permutations.
What is a permutation? A permutation is when you take a group of objects or symbols and rearrange them into different orders Examples: Four friends get.
Counting Techniques Tree Diagram Multiplication Rule Permutations Combinations.
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.
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.
Chance of winning Unit 6 Probability. Multiplication Property of Counting  If one event can occur in m ways and another event can occur in n ways, then.
CS 104: Discrete Mathematics
Week 9 - Friday.  What did we talk about last time?  Partial orders  Total orders  Basic probability  Event  Sample space  Monty Hall  Multiplication.
0.4 Counting Techniques. Fundamental Counting Principle TWO EVENTS:If one event can occur in m ways and another event can occur in n ways, then the number.
Section The Product Rule  Example: How many different license plates can be made if each plate contains a sequence of three uppercase English letters.
The Multiplication Rule
Multiplication Rule Combinations Permutations
4-1 Chapter 4 Counting Techniques.
Lesson 13.2 Find Probabilities Using Permutations
Counting, Permutations, & Combinations
BASIC PROBABILITY Probability – the chance of something (an event) happening # of successful outcomes # of possible outcomes All probability answers must.
combinaTorial Analysis
Chapter 0.4 Counting Techniques.
4-1 Chapter 4 Counting Techniques.
4-1 Chapter 4 Counting Techniques.
Elementary Statistics
12.1 The Fundamental Counting Principle & Permutations
COUNTING AND PROBABILITY
COUNTING AND PROBABILITY
Permutations and Combinations
Discrete Structures Counting.
4-1 Chapter 4 Counting Techniques.
Presentation transcript:

1 Counting Techniques: Possibility Trees, Multiplication Rule, Permutations

Possibility Trees Winner of set 1 Winner of set 2 Winner of set 3 In a tennis match, the first player to win two sets, wins the game. Question: What is the probability that player A will win the game in 3 sets? Construct possibility tree:

3 Possibility trees and Multiplication Rule  Example: When buying a PC system, you have the choice of  3 models of the basic unit: B1, B2, B3 ;  2 models of keyboard: K1, K2 ;  2 models of printer: P1, P2.  Question: How many distinct systems can be purchased?

4 Possibility trees and Multiplication Rule Select the basic unit Select the keyboard Example(cont.): The possibility tree: Select the printer The number of distinct systems is: 3∙2∙2=12

5 The Multiplication Rule If an operation consists of k steps and  the 1 st step can be performed in n 1 ways,  the 2 nd step can be performed in n 2 ways (regardless of how the 1 st step was performed), ….  the k th step can be performed in n k ways (regardless of how the preceding steps were performed), then the entire operation can be performed in n 1 ∙ n 2 ∙… ∙ n k ways.

6 Multiplication Rule (Example)  Consider the following nested loop: for i:=1 to 5 for j:=1 to 6 [ Statement 1 ; Statement 2. ] next j next i  Question: How many times the statements in the inner loop will be executed?  Solution: 5 ∙ 6 = 30 times (based on the multiplication rule)

Multiplication Rule (Example)  A PIN is a sequence of any 4 digits (repetitions allowed); e.g., 5279, 4346,  Question. How many different PINs are possible?  Solution. Choosing a PIN is a 4-step operation:  Step 1: Choose the 1st symbol ( 10 different ways ).  Step 2: Choose the 2nd symbol ( 10 different ways ).  Step 3: Choose the 3rd symbol ( 10 different ways ).  Step 4: Choose the 4th symbol ( 10 different ways ). Based on the multiplication rule, 10∙10∙10∙10 = 10,000 PINs are possible.

8 Multiplication Rule (Example)  Consider the problem of choosing PINs but now repetitions are not allowed.  Question. How many different PINs are possible?  Solution. Choosing a PIN is a 4-step operation:  Step 1: Choose the 1st symbol ( 10 different ways ).  Step 2: Choose the 2nd symbol ( 9 different ways ).  Step 3: Choose the 3rd symbol ( 8 different ways ).  Step 4: Choose the 4th symbol ( 7 different ways ). Based on the multiplication rule, 10∙9∙8∙7 = 5,040 PINs are possible.

Multiplication Rule and Permutations  Consider the problem of choosing PINs again. Now  a PIN is a sequence of 1, 2, 3, 4 ;  repetitions are not allowed.  Question. How many different PINs are possible?  Solution. Choosing a PIN is a 4-step operation:  Step 1: Choose the 1st symbol (4 different ways ).  Step 2: Choose the 2nd symbol (3 different ways ).  Step 3: Choose the 3rd symbol (2 different ways ).  Step 4: Choose the 4th symbol (1 way ). Based on the multiplication rule, 4∙3∙2∙1 = 4! = 24 PINs are possible.  Note: The number of different PINs in this case is just the number of different orders of 1,2,3,4.

Permutations  A permutation of a set of objects is an ordering of the objects in a row. Example: The permutations of {a,b,c}: abc acb bac bca cab cba  Theorem. For any integer n with n≥1, the number of permutations of a set with n elements is n!.  Proof. Forming a permutation is an n-step operation:  Step 1: Choose the 1 st element ( n different ways ).  Step 2: Choose the 2 nd element ( n-1 different ways ). …  Step n: Choose the n th element (1 way ). Based on the multiplication rule, the number of permutations is n∙(n-1)∙…∙2∙1 = n!

11 Example on Permutations: The Traveling Salesman Problem (TSP)  There are n cities. The salesman  starts his tour from City 1,  visits each of the cities exactly once,  and returns to City 1. Question: How many different tours are possible? Answer: Each tour corresponds to a permutation of the remaining n-1 cities. Thus, the number of different tours is (n-1)!. Note: The actual goal of TSP is to find a minimum-cost tour.