0% found this document useful (0 votes)
58 views

Let's Count: Seriously

The document provides an overview of counting problems and concepts related to permutations and combinations. It discusses key results such as the number of permutations of n objects (n!), the number of combinations of selecting k objects from n without order (n choose k), and proofs of basic identities involving permutations and combinations. Examples of counting problems from different domains like arrangements, competitions, and computer science functions are presented. Readers are encouraged to try solving practice problems involving permutations, combinations and identities on their own.

Uploaded by

MUHAMMAD HASSAN
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

Let's Count: Seriously

The document provides an overview of counting problems and concepts related to permutations and combinations. It discusses key results such as the number of permutations of n objects (n!), the number of combinations of selecting k objects from n without order (n choose k), and proofs of basic identities involving permutations and combinations. Examples of counting problems from different domains like arrangements, competitions, and computer science functions are presented. Readers are encouraged to try solving practice problems involving permutations, combinations and identities on their own.

Uploaded by

MUHAMMAD HASSAN
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 50

Let’s Count

Seriously

Dr Aamir Hashmi
Email: [email protected]
Office Hours:
-My office:
Tuesday: 14:00 – 15:30
Cabin-3, F-102, B-Building
Wednesday: 1230 – 1400
Thursday: 14:00 – 15:30
Friday: 15:00 – 17:00
or by appointment (email)
Recap
•We
  covered some important results:
• Number of subsets of an n–set

• Number of leaf nodes in a complete binary tree with n levels

• Number of binary strings of length

• Number possible sequences of length from a set of elements

• Number possible sequences of length , if we have objects, each object having


possible symbols/types, types, …, types
Try to solve this one?
You have one minute to answer
• In how many ways you can arrange these fruits?

• Factorial of 8 = 8!
Try to solve this one?
You have one minute to answer
•  In how many ways you can arrange these fruits?

• In how many ways, we can make 3 people stand out of these 8 people?

8x7x6

In case of a meeting, order does not matter …


Try to solve this one?
You have one minute to answer
• In how many ways you can color 4 houses using 3 colors – red, blue, green?

• Similar problem as making words of 4 characters , with 3 letters = 3^4 = 81


What kind of counting problems a
Computer Scientist may come across?
• How many different values can function “f ( )” return?

• We shall come back to this later


What kind of counting problems a
Computer Scientist may come across?
Permutations (Section 1.6 of book)
• Recall Alice Party ..
How many ways can we seat n people on n chairs?
or
order the people in a single line, in how may ways we can stand them up?

N!
Permutations (Section 1.6 of book)
• Recall Alice Party ..
How many ways can we seat n people on n chairs?

• If we have a list of n objects (an ordered set, where it is specified which


element is the first, second, etc.), and we rearrange them so that they are in
another order, this is called permuting them; the new order is called a
permutation of the objects.
Permutations (Section 1.6 of book)
• If
  we have a list of n objects (an ordered set, where it is specified which element is
the first, second, etc.), and we rearrange them so that they are in another order, this
is called permuting them; the new order is called a permutation of the objects.

• For example, the set has the following 6 permutations:


abc, acb, bac, bca, cab, cba

How many 2-permutations of {a,b,c} are possible?


ab, ba, ac, ca, bc, cb
How many permutations of {a,b,c} are possible?
a,b,c
Permutations (Section 1.6 of book)
• If
  we have a list of n objects (an ordered set, where it is specified which element is
the first, second, etc.), and we rearrange them so that they are in another order, this
is called permuting them; the new order is called a permutation of the objects.

• So the question is to determine the number of ways objects can be ordered. The
solution found by the people at the party works in general:
• We can put any of the people in the first place; no matter whom we choose, we
have choices for the second.
So the number of ways to fill the first two positions is .
No matter how we have filled the first and second positions, there are choices for the
third position, so the number of ways to fill the first three positions is
.
Permutations (Section 1.6 of book)
•  So the question is to determine the number of ways objects can be ordered.
The solution found by the people at the party works in general:
• We can put any of the people in the first place; no matter whom we choose,
we have choices for the second.
So the number of ways to fill the first two positions is .
No matter how we have filled the first and second positions, there are choices
for the third position, so the number of ways to fill the first three positions is
.
• It is clear that this argument goes on like this until all positions are filled.
• Thus the number of ways to fill all positions is
--- factorial of .
Permutations (Section 1.6 of book)
• If we have a list of n objects (an ordered set, where it is specified which
element is the first, second, etc.), and we rearrange them so that they are in
another order, this is called permuting them; the new order is called a
permutation of the objects.
Permutations (Section 1.6 of book)
Permutations (Section 1.6 of book)
Problems from Book – Do it by yourself

7x5x3x1
Number of Ordered Subsets (Section 1.7)
•  At a competition of athletes, only the order of the first is recorded.
How many different outcomes does the competition have?

100 x 99 x 98 x … x 91

=
Number of Ordered Subsets (Section 1.7)
• At a competition of 100 athletes, only the order of the first 10 is recorded.
How many different outcomes does the competition have?
The first place can be won by any of the 100 athletes;
no matter who wins, there are 99 possible second place winners,
so the first two prizes can go 100 ・ 99 ways.
Given the first two, there are 98 athletes who can be third etc.
So the answer is 100 ・ 99 ・ ・ ・ 91.
Number of Ordered Subsets (Section 1.7)
• At a competition of 100 athletes, only the order of the first 10 is recorded.
How many different outcomes does the competition have?
So the answer is 100 ・ 99 ・ ・ ・ 91.

Try it at your own:


Number of Ordered Subsets (Section 1.7)
• At a competition of 100 athletes, only the order of the first 10 is recorded.
How many different outcomes does the competition have?
So the answer is 100 ・ 99 ・ ・ ・ 91.

• We may also view this as selecting a subset of the athletes containing k


elements, and then ordering them.
Number of Ordered Subsets (Section 1.7)
• We may also view this as selecting a subset of the athletes containing k
elements, and then ordering them.
Number of Ordered Subsets (Section 1.7)
•• We
  may also view this as selecting a subset of the athletes containing k elements, and then
ordering them.

•= =

• We may write it as
Permutations
Permutations
Number of Subsets of a Given Size (Section 1.8)
• From here, we can easily derive one of the most important counting results.
Number of Subsets of a Given Size (Section 1.8)
• From here, we can easily derive one of the most important counting results.

• We have a special term for it: <n choose k>


Number of Subsets of a Given Size (Section 1.8)
• 

• The number of different lottery tickets is ,


• the number of handshakes at the start of Alice’s birthday party is etc.
• The numbers are also called binomial coefficients
Combinations
Combinations
Number of Subsets of a Given Size (Section 1.8)
•  The value of is – how?

• The value of is – how?


Number of Subsets of a Given Size (Section 1.8)
•  The value of is 1 – how?

• The value of is 1 – how?

• Proof:
Number of Subsets of a Given Size (Section 1.8)

• Proof:
Number of Subsets of a Given Size (Section 1.8)

• Proof:
Number of Subsets of a Given Size (Section 1.8)
• Try it at your own:
Number of Subsets of a Given Size (Section 1.8)
• Try it at your own:
Try to solve this one?
You have one minute to answer
• How many different values can function “f ( )” return?
Examples: Permutations --- Do it by yourself

Problem 1
Examples: Permutations --- Do it by yourself

Problem 2

• How many 2 – permutations are possible?


• How many 1 – permutations are possible?
• How many 3 – permutations are possible?
Examples: Permutations --- Do it by yourself

Problem 3
Examples: Combinations --- Do it by yourself

Problem 4
Examples: Combinations --- Do it by yourself

Problem 5

• How many 1 – combinations are possible?


• How many 2 – combinations are possible?
• How many 3 – combinations are possible?
• How many 4 – combinations are possible?
Examples: Combinatorial Identities ---
Do it by yourself

Problem 6
Examples: Combinatorial Identities ---
Do it by yourself

Problem 7
Examples: Combinatorial Identities ---
Do it by yourself

Problem 8
Examples: Combinatorial Identities ---
Do it by yourself

Problem 9
Examples: Combinations --- Do it by yourself

Problem 10
Examples: Combinations --- Do it by yourself

Problem 11
Examples: Combinations --- Do it by yourself

Problem 12
• Stay Safe and Healthy

Gracias!!!

Note:
Assignment Deadline: Monday/Tuesday, – 17 November
Be ready for the quiz in next class
Youtube videos: (to help you in assignment)
• Click here: YouTube Playlist

You might also like