Main Menu Main Menu (Click on the topics below) Permutation Example 1 Example 2 Circular Permutation Permuting r of n objects Example 1 Example 2 Example.

Slides:



Advertisements
Similar presentations
Counting Techniques: Permutations of Selected Elements Addition Rule, Difference Rule, Inclusion/Exclusion Rule.
Advertisements

1 Counting Techniques: Possibility Trees, Multiplication Rule, Permutations.
Main Menu Main Menu (Click on the topics below) Algebra of Combinations Pascal’s formula More Formulas Click on the picture Sanjay Jain, Lecturer, School.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Main Menu Main Menu (Click on the topics below) Combinations Example Theorem Click on the picture.
1 Section 4.3 Permutations & Combinations. 2 Permutation Set of distinct objects in an ordered arrangement An ordered arrangement of r members of a set.
Permutations and Combinations Rosen 4.3. Permutations A permutation of a set of distinct objects is an ordered arrangement these objects. An ordered arrangement.
How many possible outcomes can you make with the accessories?
Fall 2002CMSC Discrete Structures1 Permutations How many ways are there to pick a set of 3 people from a group of 6? There are 6 choices for the.
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.
Quit Permutations Combinations Pascal’s triangle Binomial Theorem.
Discrete Structures Chapter 4 Counting and Probability Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 04/17/12
Permutations r-permutation (AKA “ordered r-selection”) An ordered arrangement of r elements of a set of n distinct elements. permutation of a set of n.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
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.
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
Discrete Mathematics Lecture 5
Discrete Mathematics Lecture 6 Alexander Bukharovich New York University.
1 More Counting Techniques Possibility trees Multiplication rule Permutations Combinations.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Lecture 07 Prof. Dr. M. Junaid Mughal
Class notes for ISE 201 San Jose State University
Permutations and Combinations AII Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish.
Main Menu Main Menu (Click on the topics below) Permutations with Some repetitions Example r-Combinations with Some repetitions Example Permutations and.
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).
MAT 2720 Discrete Mathematics Section 6.1 Basic Counting Principles
7 Further Topics in Algebra © 2008 Pearson Addison-Wesley. All rights reserved Sections 7.4–7.7.
Jessie Zhao Course page: 1.
Topics to be covered: Produce all combinations and permutations of sets. Calculate the number of combinations and permutations of sets of m items taken.
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.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
Methods of Counting Outcomes BUSA 2100, Section 4.1.
Chapter 3 Permutations and combinations
NO ONE CAN PREDICT TO WHAT HEIGHTS YOU CAN SOAR
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
1 Lecture 4 (part 1) Combinatorics Reading: Epp Chp 6.
V Spanning Trees Spanning Trees v Minimum Spanning Trees Minimum Spanning Trees v Kruskal’s Algorithm v Example Example v Planar Graphs Planar Graphs v.
Spatial Statistics and Spatial Knowledge Discovery First law of geography [Tobler]: Everything is related to everything, but nearby things are more related.
Permutations and Combinations
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.
1 CS 140 Discrete Mathematics Combinatorics And Review Notes.
Lesson 0.4 (Counting Techniques)
37. Permutations and Combinations. Fundamental Counting Principle Fundamental Counting Principle states that if an event has m possible outcomes and another.
SECTION 9 Orbits, Cycles, and the Alternating Groups Given a set A, a relation in A is defined by : For a, b  A, let a  b if and only if b =  n (a)
Chapter 7 – Counting Techniques CSNB 143 Discrete Mathematical Structures.
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.
Permutations and Combinations
Main Menu Main Menu (Click on the topics below) Pigeonhole Principle Example Generalized Pigeonhole Principle Example Proof of Pigeonhole Principle Click.
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.
Relations and Graphs Relations and Graphs Sanjay Jain, Lecturer, School of Computing.
MAT 2720 Discrete Mathematics
The Multiplication Rule
CSE15 Discrete Mathematics 04/19/17
CSNB 143 Discrete Mathematical Structures
COCS DISCRETE STRUCTURES
9. Counting and Probability 1
Permutations and Combinations
CS100: Discrete structures
COUNTING AND PROBABILITY
Permutations and Combinations
COUNTING AND PROBABILITY
Counting techniques Basic Counting Principles, Pigeonhole Principle, Permutations and Combinations.
How many possible outcomes can you make with the accessories?
Discrete Structures Counting.
Presentation transcript:

Main Menu Main Menu (Click on the topics below) Permutation Example 1 Example 2 Circular Permutation Permuting r of n objects Example 1 Example 2 Example 3 Example 4 Addition Rule Example 1 Example 2 Difference Rule Example 1 Inclusion Exclusion Rule Example 1 Symmetric Relations Simple graphs Click on the picture

Permutations Sanjay Jain, Lecturer, School of Computing

Permutations Permutation of a set of objects is an ordering of the objects in a row. Example: {A, B, C} ABC, ACB, BAC, BCA, CAB, CBA

Permutations Theorem: Suppose a set A has n elements (where n  1). Then the number of permutations of A is n!= n*(n-1)*(n-2)*…*1. Proof: Job: select a permuation T 1 : Select the 1st element in the row ---> n ways T 2 : Select the 2nd element in the row ---> n-1 ways …….. T n : Select the nth element in the row ---> 1 way Total number of permutations: n*(n-1)*…..*1

END OF SEGMENT

Examples Number of anagrams of SINGAPORE: This is same as premuting 9 distinct elements. 9!

END OF SEGMENT

Examples Number of anagrams of SINGAPORE which have “SING” as a substring: We can think of “SING” as one element. Thus there are a total of 6 elements to be permuted (“SING”,A,P,O,R,E). 6!

END OF SEGMENT

Examples Letters of “SING” appear together, but not necessarily in that order. T1: First permute “SING”, A, P, O, R, E T2: Permute letters of “SING”. T1 can be done in 6! ways. T2 can be done in 4! ways. Total number of anagrams with the constraint: 6!*4!

END OF SEGMENT

Circular Permutations A CB BA C B C A A BC

How many circular permutations are there? Note that each circular permutation has n different row permutations (by starting at different objects in the circle) Convention 0!=1

END OF SEGMENT

Permuting r of n objects Suppose 1  r  n. An r-permutation of a set of n elements is an ordered selection of r elements from the set. The number of r-permutations of a set of n elements is denoted by P(n,r) nPrnPr

END OF SEGMENT

Permuting r of n objects Theorem: Suppose n, r are integers with 1  r  n. P(n,r) = n*(n-1)*…..(n-r+1) = n!/(n-r)! For r=0, we take P(n,0)=1.

Permuting r of n objects Proof: T 1 : Select the 1st element in the row T 2 : Select the 2nd element in the row …….. T r : Select the rth element in the row T 1 can be done in n ways. T 2 can be done in n-1 ways. ….. T r can be done in n - (r - 1) = n - r + 1 ways. Total number of r-permutations are: n * (n - 1) * ….. * (n - r + 1)

END OF SEGMENT

Example Suppose there are 350 students. In how many ways can one select president, secretary and treasurer if no person can hold two posts? Permuting 3 of 350 objects. P(350,3)

END OF SEGMENT

Example Suppose A and B are finite sets. How many different functions from A to B are 1--1? A = {a 1, a 2,…, a n }. B = {b 1, b 2,..., b m } if n > m: No 1--1 functions from A to B if n  m: Want to select f(a 1 ), f(a 2 ),…, f(a n ) from the set B All distinct. Thus, we are finding a n-permutation from a set of m objects. P(m,n) ways.

END OF SEGMENT

Example How many bijective functions are there from A to B? A = {a 1, a 2,…, a n }. B = {b 1, b 2,..., b m } If m  n: zero bijective functions. If m=n: Want to select f(a 1 ), f(a 2 ),…, f(a n ) from the set B All distinct. We are selecting n out of n objects. P(n,n)=n!

END OF SEGMENT

Example How many Hamiltonian circuits are there in K 5 ? Assume that we start at a fixed vertex. T 1 : Pick first vertex in HC (fixed to be v 1 ) T 2 : Pick second vertex in HC. T 3 : Pick third vertex in HC. T 4 : Pick fourth vertex in HC. T 5 : Pick fifth vertex in HC. Total number of HC starting at a fixed vertex: 1*4*3*2*1=4! T 1 : 1 T 2 : 4 T 3 : 3 T 4 : 2 T 5 : 1

END OF SEGMENT

The Addition Rule Theorem: Suppose a finite set A equals the union of k distinct mutually disjoint sets A 1, A 2,…, A k. That is A= A 1  A 2  ….  A k, and, for i  j, A i  A j = . Then #(A) = #(A 1 ) + #(A 2 ) + …. + #(A k ).

END OF SEGMENT

Example Suppose I can go from SIN to KL by bus, train or plane. There are 8 flights daily 2 morning and 2 evening trains, daily 1 bus daily In how many ways can one go from SIN to KL on a particular day Answer: 8+(2+2)+1 ways

END OF SEGMENT

Example In Fortran identifiers consist of 1 to 6 characters where the first character must be English letter and others either English letter or a digit. How many different identifiers are possible.

First step: we calculate how many identifiers of length k are there (where 1  k  6) T 1 : Pick the first character T 2 : Pick the second character ….. T k : Pick the kth character. T 1 : 26 ways T 2 : 36 ways ….. T k : 36 ways 26*36 k-1 identifiers of length k Second step: Total number of identifiers= 26* * * …..+ 26*36 5

END OF SEGMENT

The Difference Rule Theorem: If A is a finite set and B  A, then #(A - B) = #(A) - #(B).

END OF SEGMENT

Example How many three digit numbers have at least one digit repeated? A---Set of three digit numbers B--- Set of three digit numbers which have no digit repeated. #(A) = 9*10*10 #(B) = 9*9*8 #(A - B) = 9*10*10 - 9*9*8

END OF SEGMENT

Inclusion Exclusion Rule Theorem: If A, B and C are finite sets, then #(A  B) = #(A) + #(B) - #(A  B) #(A  B  C) = #(A) + #(B) + #(C) - #(A  B) - #(A  C) - #(B  C) + #(A  B  C)

END OF SEGMENT

Example Class of 50 students. 30 know Pascal 18 know Fortran 26 know Java 9 know both Pascal and Fortran 16 know both Pascal and Java 8 know both Fortran and Java 47 know at least one of the three languages. Question: How many know all three languages? P: set of students who know Pascal F: set of students who know Fortran J: set of students who know Java

Example #(P  F  J) = #(P) + #(F) + #(J) - #(P  F) - #(P  J) - #(F  J) + #(P  F  J) 47= #(P  F  J) #(P  F  J) =

END OF SEGMENT