comQUIZ MCQS
comQUIZ MCQS
[Combinatorics]
Discrete Structures
1
Chapter – Combinatorics Discrete Structures
Elementary Combinatorics
Combinatorics is the study of arrangements or possible combination of objects. We come
up with different situations where we need to identify the number of elements having
similar features, number of steps required to solve the problem, amount of storage
required, etc.
Basics of Counting
There are two basic counting principles that can be used to solve the counting problems.
We define those two principles below:
2
Chapter – Combinatorics Discrete Structures
∏
n
the Cartesian product S1 × S2 × …× Sn, is the product i =1
| S i | i.e. | S1 × S2 × …× Sn| =
∏
n
i =1
| Si | .
Example 1:
An office building contains 27 floors and has 37 offices on each floor. How many offices
are there are in the building?
Solution:
By the product rule there are 27.37 = 999 offices in the building.
Example 2:
How many different three-letter initials with none of the letters can be repeated can
people have?
Solution:
Here the first letter can be chosen in 26 ways, since the first letter is assigned we can
choose second letter in 25 ways and in the same manner we can choose third letter in 24
ways. So by product rule number of different three-letter initials are 26.25.24 = 15600.
3
Chapter – Combinatorics Discrete Structures
Example 2:
How many functions are there from the set {1, 2, …, n}, where n is a positive integer, to
the set {0, 1}.
Solution:
Each element from the set {1, 2, …, n}can map the set {0, 1} in 2 ways. Since there are n
elements in the first set by the product rule number of possible functions are 2.2.2…..nth
term i.e. 2n.
Tree Diagrams
We can use a tree diagram to solve the counting problem (don’t worry we will study tree
in detail later).
Example:
Use a tree diagram to find the number of bit strings of length four with no three
consecutive 0s.
Solution: 1
0
0 1
0
1
1 0
0 1
1 0 1
0 1 1
1 0 0 1 0
0 1 0 1
1
From the above tree we can get that there are total number of 13 bit strings of length four
with no three consecutive zeroes. For this we can explain as if a bit string start with 1
then there is only one bit string that can have three consecutive 0s (1000), the total
number of bit string of length starting with 1 and have no three consecutive 0s is thus
2.2.2 –1 =7, similarly if the bit string start with 0 then there is a possibility that the next
two bits may be 0 so the possible bit strings of length four with consecutive 0s starting
with 0 are 0001 and 0000, so the total number of bit string of length starting with 1 and
have no three consecutive 0s is thus 2.2.2 –2 =6. Using the sum rule the total number of
such bit strings is 13.
4
Chapter – Combinatorics Discrete Structures
Pigeonhole principle
The pigeonhole principle states that if there are more pigeons than pigeonholes, then
there must be at least one pigeonhole with at least two pigeons. The concept of pigeons
can be extended to any objects.
Theorem 1: The pigeonhole principle
If k + 1 or more objects are placed into k boxes, then there is at least one box containing
two or more of the objects.
Proof:
We use proof by contradiction here. Suppose that k+1 or more boxes are placed into k
boxes and no boxes contain more than one object in it. If there are k boxes then there
must be k objects such that there are no two objects in a box. This contradicts our
assumption. So there is at least one box containing two or more of the objects.
Example:
Show that if there are 30 students in a class, then at least two have last names that begin
with the same letter.
Proof:
There are 30 students in the class and we have 26 letters in English alphabet that can be
used in beginning of the last name. Since there are only 26 letters and 30 students, by
pigeonhole principle at least two students have the last name that begins with the same
letter.
Theorem 2: The generalized pigeonhole principle
If N objects are placed into k boxes, then there is at least one box containing at least
N / k objects.
Proof:
Suppose N objects are placed into k boxes and there is no box containing more than
N / k -1 objects. So the total number of objects is at most
k( N / k -1) < k((N/k + 1) –1) = N. This is the contradiction that N objects are placed
into k boxes (since we showed that there are total number of objects less than N). Hence,
the proof.
5
Chapter – Combinatorics Discrete Structures
Example:
If a class has 24 students, what is the maximum number of possible grading that must be
done to ensure that there at least two students with the same grade.
Solution:
There are total 24 students and the class and at least two students must have same grade.
If the number of possible grades is k then by pigeonhole principle we have 24 / k = 2.
Here the largest value that k can have is 23 since 24 = 23.1 + 1. So the maximum number
of possible grading to ensure that at least two of the students have same grading is 23.
6
Chapter – Combinatorics Discrete Structures
Self Studies
Read chapter 4.1 and 4.2 of your textbook such that you can cover all the read materials
in the class.