Permutations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Permutations Reading: Kolman, Section 3.1.

Slides:



Advertisements
Similar presentations
Lecture 12 Permutations and Combinations CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Advertisements

Warm-Up Problem Can you predict which offers more choices for license plates? Choice A: a plate with three different letters of the alphabet in any order.
Chapter 13 sec. 3.  Def.  Is an ordering of distinct objects in a straight line. If we select r different objects from a set of n objects and arrange.
Probability – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Probability Reading: Kolman, Section 3.4.
Math 221 Integrated Learning System Week 2, Lecture 1
How many possible outcomes can you make with the accessories?
Today Today: Reading: –Read Chapter 1 by next Tuesday –Suggested problems (not to be handed in): 1.1, 1.2, 1.8, 1.10, 1.16, 1.20, 1.24, 1.28.
Combinations We should use permutation where order matters
Chapter 11 Counting Methods © 2008 Pearson Addison-Wesley. All rights reserved.
Permutations and Combinations AII Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish.
1 The Multiplication Principle Prepared by E.G. Gascon.
3.4 Counting Principles Statistics Mrs. Spitz Fall 2008.
Section 2: The Multiplication Rule Consider the game of tossing a coin, then rolling a die, then picking a card. One possible event would be (H, 2, 2clubs).
1 Permutations and Combinations. 2 In this section, techniques will be introduced for counting the unordered selections of distinct objects and the ordered.
S /1/2015 Math 2 Honors - Santowski 1.  Use the Fundamental Counting Principle to determine the number of outcomes in a problem.  Use the idea.
Notes 9.1 – Basic Combinatorics. I. Types of Data 1.) Discrete Data – “Countable”; how many? 2.) Continuous Data – “uncountable”; measurements; you can.
Advanced Mathematics Counting Techniques. Addition Rule Events (tasks) A and B are mutually exclusive (no common elements/outcomes) and n(A) = a, n(B)
Warm Up 1/31/11 1. If you were to throw a dart at the purple area, what would be the probability of hitting it? I I 5.
Counting Principles. What you will learn: Solve simple counting problems Use the Fundamental Counting Principle to solve counting problems Use permutations.
Permutations and Combinations. Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish permutations.
Counting Subsets of a Set: Combinations Lecture 31 Section 6.4 Wed, Mar 21, 2007.
Section 10-3 Using Permutations and Combinations.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
3. Counting Permutations Combinations Pigeonhole principle Elements of Probability Recurrence Relations.
Lesson Counting Techniques. Objectives Solve counting problems using the Multiplication Rule Solve counting problems using permutations Solve counting.
Objectives Solve counting problems using the Multiplication Rule Solve counting problems using permutations Solve counting problems using combinations.
Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 M ARIO F. T RIOLA E IGHTH E DITION E LEMENTARY S TATISTICS Section 3-6 Counting.
Sullivan Algebra and Trigonometry: Section 14.2 Objectives of this Section Solve Counting Problems Using the Multiplication Principle Solve Counting Problems.
Copyright 2013, 2010, 2007, Pearson, Education, Inc. Section 12.8 The Counting Principle and Permutations.
Permutations S /4/ Math 2 Honors - Santowski.
Ch Counting Principles. Example 1  Eight pieces of paper are numbered from 1-8 and placed in a box. One piece of paper is drawn from the box, its.
CSNB143 – Discrete Structure
Permutations and Combinations
Permutations and Combinations. Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish permutations.
Discrete Structures Combinations. Order Doesn’t Matter In the previous section, we looked at two cases where order matters: Multiplication Principle –
Counting Principles Multiplication rule Permutations Combinations.
Copyright © Ed2Net Learning Inc.1. 2 Warm Up Tell whether each event is dependent or independent 1. Selecting a name from a Chicago telephone book and.
Lesson 0.4 (Counting Techniques)
I CAN: Use Permutations and Combinations
Combinations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Combinations Reading: Kolman, Section 3.2.
3.2 Combinations.
8.6 Counting Principles. Listing Possibilities: Ex 1 Eight pieces of paper are numbered from 1 to 8 and placed in a box. One piece of paper is drawn from.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 11 Counting Methods and Probability Theory.
Permutations Counting where order matters If you have two tasks T 1 and T 2 that are performed in sequence. T 1 can be performed in n ways. T 2 can be.
Chapter 7 – Counting Techniques CSNB 143 Discrete Mathematical Structures.
CSCI 115 Chapter 3 Counting. CSCI 115 §3.1 Permutations.
Permutations and Combinations
Permutations and Combinations AII Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish.
Do Now A password must contain 4 characters. 1. How many passwords are possible if you just use digits in the password? 2. How many are possible with just.
The Fundamental Counting Principle and Permutations 18.0 Students use fundamental counting principles to compute combinations and permutations Students.
Permutations and Combinations
Chapter 10 Counting Methods.
CSNB 143 Discrete Mathematical Structures
Counting Methods and Probability Theory
Section 12.8 The Counting Principle and Permutations
Permutations and Combinations
Lesson 11-1 Permutations and Combinations
Permutations and Combinations
Counting techniques Basic Counting Principles, Pigeonhole Principle, Permutations and Combinations.
Permutations and Combinations
Counting Methods and Probability Theory
Chapter 10 Counting Methods.
Bellwork Practice Packet 10.3 B side #3.
Permutations and Combinations
Standard DA-5.2 Objective: Apply permutations and combinations to find the number of possibilities of an outcome.
Permutations and Combinations
Lecture 7: Permutations and Combinations
Permutations and Combinations
9.1 Basic Combinatorics.
Presentation transcript:

Permutations – Page 1CSCI 1900 – Discrete Structures CSCI 1900 Discrete Structures Permutations Reading: Kolman, Section 3.1

Permutations – Page 2CSCI 1900 – Discrete Structures Sequences Derived from a Set Assume we have a set A containing n items. Examples include alphabet, decimal digits, playing cards, etc. We can produce sequences from each of these sets.

Permutations – Page 3CSCI 1900 – Discrete Structures Types of Sequences from a Set There are a number of different ways to create a sequence from a set –Any order, duplicates allowed –Any order, no duplicates allowed –Order matters, duplicates allowed –Order matters, no duplicates allowed

Permutations – Page 4CSCI 1900 – Discrete Structures Classifying Real-World Sequences Determine size of set A and classify each of the following as one of the previously listed types of sequences Five card stud poker Phone numbers License plates Lotto numbers Binary numbers Windows XP CD Key Votes in a presidential election Codes for 5-digit CSCI door locks

Permutations – Page 5CSCI 1900 – Discrete Structures Multiplication Principle of Counting The first type of sequence we will look at is where duplicates are allowed and their order matters. Supposed that two tasks T 1 and T 2 must be performed in sequence. If T 1 can be performed in n 1 ways, and for each of these ways, T 2 can be performed in n 2 ways, then the sequence T 1 T 2 can be performed in n 1  n 2 ways.

Permutations – Page 6CSCI 1900 – Discrete Structures Multiplication Principle (continued) Extended previous example to T 1, T 2, …, T k Solution becomes n 1  n 2  …  n k

Permutations – Page 7CSCI 1900 – Discrete Structures Examples of Multiplication Principle 8 character passwords –First digit must be a letter –Any character after that can be a letter or a number –26*36*36*36*36*36*36*36 = 2,037,468,266,496 Windows XP/2000 software keys –25 characters of letters or numbers –36 25

Permutations – Page 8CSCI 1900 – Discrete Structures More Examples of Multiplication Principle License plates of the form “ABC 123”: –26*26*26*10*10*10 = 17,576,000 Phone numbers –Three digit area code cannot begin with 0 –Three digit exchange cannot begin with 0 –9*10*10*9*10*10*10*10*10*10 = 8,100,000,000

Permutations – Page 9CSCI 1900 – Discrete Structures Calculation of the Number of Subsets Let A be a set with n elements: how many subsets does A have? Each element may either be included or not included. In section 1.3, we talked about the characteristic function which defines membership in a set based on a universal set Example: –U={1,2,3,4,5,6} –A = {1,2}, B={2, 4, 6} –f A = {1,1,0,0,0,0}, f B = {0,1,0,1,0,1}

Permutations – Page 10CSCI 1900 – Discrete Structures Calculation of the Number of Subsets (continued) Every subset of A can be defined with a characteristic function of n elements where each element is a 1 or a 0, i.e., each element has 2 possible values Therefore, there are 2  2  2  …  2 = 2 n possible characteristic functions

Permutations – Page 11CSCI 1900 – Discrete Structures Permutations The next type of sequence we will look at is where duplicates are not allowed and their order matters Assume A is a set of n elements Suppose we want to make a sequence, S, of length r where 1 < r < n

Permutations – Page 12CSCI 1900 – Discrete Structures Multiplication Principle Versus Permutations If repeated elements are allowed, how many different sequences can we make? Process: –Each time we select an element for the next element in the sequence, S, we have n to choose from –This gives us n  n  n  …  n = n r possible choices

Permutations – Page 13CSCI 1900 – Discrete Structures Multiplication Principle Versus Permutations (continued) Suppose repeated elements are not allowed, how many different sequences can we make? Process: –The first selection, T 1, provides n choices. –Each time we select an element after that, T k where k>1, there is one less than there was for the previous selection, k-1. –The last choice, T r, has n – (r – 1) = n – r + 1 choices –This gives us n  (n – 1)  (n – 2)  …  (n – r + 1)

Permutations – Page 14CSCI 1900 – Discrete Structures Permutations Notation: n P r is called number of permutations of n objects taken r at a time. Word scramble: How many 4 letter words can be made from the letters in “Gilbreath” without duplicate letters? 9 P 4 = 9  8  7  6 = 3,024 Example, how many 4-digit PINs can be created for the 5 button CSCI door locks? 5 P 4 = 5  4  3  2 = 120 Would adding a fifth digit give us more PINs?

Permutations – Page 15CSCI 1900 – Discrete Structures Factorial For r=n, n P n = n P r = n  (n – 1)  (n – 2)  …  2  1 This number is also written as n! and is read n factorial n P r can be written in terms of factorials n P r = n  (n – 1)  (n – 2)  …  (n – r + 1) n  (n – 1)  (n – 2)  …  (n – r + 1)  (n – r)  …  2  1 (n – r)  …  2  1 n P r = n P r = n!/(n – r)!

Permutations – Page 16CSCI 1900 – Discrete Structures Distinguishable Permutations from a Set with Repeated Elements If the set from which a sequence is being derived has duplicate elements, e.g., {a, b, d, d, g, h, r, r, r, s, t}, then straight permutations will actually count some sequences multiple times. Example: How many words can be made from the letters in Tarnoff? Problem: the f’s cannot be distinguished, e.g., aorf cannot be distinguished from aorf

Permutations – Page 17CSCI 1900 – Discrete Structures Distinguishable Permutations from a Set with Repeated Elements Number of distinguishable permutations that can be formed from a collection of n objects where the first object appears k 1 times, the second object k 2 times, and so on is: n! / (k 1 !  k 2 !  k t !) where k 1 + k 2 + … + k t = n

Permutations – Page 18CSCI 1900 – Discrete Structures Example How many distinguishable words can be formed from the letters of JEFF? Solution: n = 4, k j = 1, k e = 1, k f = 2 n!/(k j !  k e !  k f !) = 4!/(1! 1! 2!) = 12 List: JEFF, JFEF, JFFE, EJFF, EFJF, EFFJ, FJEF, FEJF, FJFE, FEFJ, FFJE, and FFEJ

Permutations – Page 19CSCI 1900 – Discrete Structures Example How many distinguishable words can be formed from the letters of MISSISSIPPI? Solution: n = 11, k m = 1, k i = 4, k s = 4, k p = 2 n!/(k m !  k i !  k s !  k p !) = 11!/(1! 4! 4! 2!) = 34,650

Permutations – Page 20CSCI 1900 – Discrete Structures In-Class Exercises How many ways can you sort a deck of 52 cards? Compute the number of 4-digit ATM PINs where duplicate digits are allowed. How many ways can the letters in the word “TARNOFF” be arranged?