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

Chapter Two Combinatorics

The document discusses elementary combinatorics and provides examples and rules for counting objects using different models such as sequences, permutations, combinations, and multisets. It examines how to use the rule of sum and product to solve counting problems, and provides exercises involving selecting teams, arranging books, and distributing balls into cells.

Uploaded by

Dwi Maryono
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
212 views

Chapter Two Combinatorics

The document discusses elementary combinatorics and provides examples and rules for counting objects using different models such as sequences, permutations, combinations, and multisets. It examines how to use the rule of sum and product to solve counting problems, and provides exercises involving selecting teams, arranging books, and distributing balls into cells.

Uploaded by

Dwi Maryono
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

CHAPTER TWO

ELEMENTARY
COMBINATORICS
BY Dwee Mar
INTRODUCTION

 Combinatorics: art of counting without


counting
 Counting abjects in some set without listing
all the object being counted
 It is important in the analysis algorithm
INTRODUCTION

 Example
 How many ways a person walk from A to B along the line.
He just only move right and down every block.
A

B
 How many dominos can we make if we use digit from 0 to
6?
 How many 6-digit password can we make from all
character ‘A’-’Z’, ‘a’-’z’ and 0-9, where repeatition is
allowed
RULES OF SUM AND PRODUCT

 Rule of Sum (ROS)


 Suppose that A and B are disjoint events; that is, they
never occur at the same time. Suppose furthe A occurs in
m ways and B ocurs in n ways, then the event A or B
occurs in m + n ways
 Examples:
 A college library has 10 textbooks on graph theory and 15
textbooks dealing with numerical method. How many ways
a student can select among the textbooks in order to learn
one of these two subject?
 How many ways are there to pick an ace or a queen from a
deck of cards?
 How many ways are there to pick an ace or a red card from
a deck of cards?
RULES OF SUM AND PRODUCT
 Rule of Product (ROP)
 Suppose that C can be decomposed into two stages, A
and B that A occurs in m ways and B occurs in n ways.
Suppose that these stages are unrelated in the sense
that stage B occurs in n ways regardess of the outcome
of stage A. Then the event C occurs in m x n ways.
 Examples
 A badminton club has 7 men and 9 women athletes. How
many ways can we make a mixed double pair?
RULES OF SUM AND PRODUCT
 Some times we need to combine ROS and ROP at time in the solution of
one problem
 Example
 How many integers between 100 and 1000 have distinct digits?
Of these how many are odd?
Of these how many can be divided by 5?
Of these how many are less then 700 and they are even
 How many ways are there to arrange the letters in COMPUTER? If the

vowels appear together? Vowels are not at the ends of the letters
 In a programming language, a variable name consist of a single letter (A,

B, C,..Z) or a single letter followed by a single digit. Since the computer


doesn’t distinguish between capital and small lettter (a and A are
considered the same variable name), how many variable name can be
made?
MODEL S OF COUNTING
 Contoh: Misalkan di sebuah warung ada 3 jenis makanan bakso,
pecel, dan soto. Kemudian datang dua orang pelanggan untuk
makan, di mana masing-masing pelanggan hanya akan makan satu
macam makanan
 Ada berapa cara menyajikan makanan kepada 2 orang
pelanggan tersebut, di mana urutan diperhatikan dan menu boleh
sama? SEQUENCE(BARISAN)
 Ada berapa cara menyajikan makanan kepada 2 orang
pelanggan tersebut dengan catatan tidak boleh ada pelanggan
mendapatkan menu yang sama dan urutan diperhatikan?
PERMUTASI
 Ada berapa cara memilihkan menu makanan dari 3 yang
tersedia, untuk 2 orang pelanggan tersebut dengan syarat dua
orang tidak boleh sama makanannya? KOMBINASI
 Ada berapa cara seorang perwakilan pelanggan (dari 2 orang)
memesan makanan? MULTISET
MODELS OF COUNTING
 Basic Models of counting
 Suppose we have set on n distinct objects (x1, x2, …,
xn) from which we take sample of r objects. In how
many ways can this be done?
a. If the order is important and we allow repetition

b. If the order is important and we don’t allow repetition

c. If the order is not important and we don’t allow


repetition
d. If the order is not important and we allow repetition

 If the order is important we say that our sample consist


of arrangement (a, b)
 If the order is not important we say that our sample
consist of selection {c, d}
MODELS OF COUNTING

 Suppose we take sample of two objects from


(x1, x2, x3}, that is n = 3 and r =2. Please list all
possible sample we can take using four criteria
above!
 order is important and we allow repetition

 order is important and we don’t allow


repetition
 order is not important and we don’t allow
repetition
 order is not important and we allow repetition,
MODELS OF COUNTING

 If the order is important and we allow


repetition, it is called r-sequence
 If the order is important and we don’t allow
repetition, it is called r- permutation
 If the order is not important and we don’t
allow repetition, it is called r-combination
 If the order is not important and we allow
repetition, it is called r-multiset
R-SEQUENCE

 The number of r-sequence from n object is nr


 Proof :
r-sequence means taking r objects from n where the
order is important and we allow repetition.
R-PERMUTATION

 The number of r-permutation from n objects is n (n-1) (n-


2) …(n-r+1)
We denote later expression as P(n,r)
 Proof :

 When n =r, we have n-permutation, n(n-1)…1. This later


expression can be denoted by n!, called n factorial.
 For example 6 ! =6 x 5 x 4 x 3 x 2 x 1
 So we have n! =n(n-1)!. We define 0! = 1
 P(n,r)=n!/(n-r)!
R-COMBINATION

 The number of r-combination from n –objects is


P(n,r)/r!, or we denote as C(n,r) or  n 
r
 Proof :
In permutation, we will find some r-permutations have
the same elements. If the order is not important so
those r-permutations become a selection with r
elements, or we can say an r-combination. So that for
an r-combination we can make r! different arrangement.
If the number of r-combination is C(n,r) then we get the
total number of r-permutation is
P(n,r) = C(n,r) x r!
Hence C(n,r) = P(n,r) / r! = n!/((n-r)!r!)
R-MULTISET
 n 1  r 
 The number of r-multiset from n-object is  
 r 
 Proof :
Ilustration:
Suppose we take sample of two objects from (x1, x2, x3}, that is n = 3
and r =2 where order is not important and we allow repetition. Or in
similar problem, we order two kinds of food from three.
Example: (x1, x1), (x1,x3), (x3,x3)
We have three menu which are separated with two ‘|’ and the number
of ordered foods which denoted with two ‘*’
x1 x2 x3
** | | (x1,x1)
| * | * (x2,x3)
*| | * (x1,x3)
This problem is similar to distribute two *’s and two |’s in 4 distinct
spaces which has C(4,n) ways
LATIHAN

1. Ada berapa password 6 digit ATM yang terdiri dari angka 0-9?
Ada berapa cara membagikan 12 buku cerita berbeda kepada 8
anak jika tiap anak hanya mendapakan sebuah buku saja?
2. A class contains nineteen women and ten men. How many ways to
select a team consist of 4 women and 6 men?
3. In how many ways can the ten non-identical horses on a carousel
be painted so that three are brown, three are white, and four are
black? C(3,10) C(3,7) C(4,4)
4. Ada berapa cara membagikan 8 buah apel kepada 4 anak jika
a. boleh ada anak yang tidak mendapatkan apel
b. tiap anak minimal mendapatkan satu apel
6. Ada berapa cara menyusun 8 buku berbeda ke dalam rak buku
yang terdiri dari 12 ruang yang bernomor
 Example
 A Student has 25 different books, but space for only 10 in her bookshelf.
In how many ways he arrange the books into those spaces:
 How many ways a person walk from A to B along the line. He just only
move right and down for every block.
A

 How many 6-digit password can we make from all character ‘A’-’Z’, and
digits 0-9, where
 repeatition is allowed -> 366
 repeatition is not allowed -> P(36,6)
EXERCISES

 What is probability that random guessing on test


consisting of 20 true-false questions results a score
80%?
 A class contains nineteen women and ten men. How
many ways to select a team consist of 4 women and 6
men?
 In how many ways can the ten non-identical horses on a
carousel be painted so that three are brown, three are
white, and four are black?
 A certain ice cream store has 31 flavors of ice cream available. In
how many ways can we order a dozen ice cream cones if (a) we do
not want the same flavor more than once? (b) a flavor may be
ordered as many as 12 times? (c) a flavor may be ordered no more
than 11 times?
The Distribution model of counting

 How many distinct ways to distribute 3 distinct balls


into 4 distinct cell, with any number of balls per cell?
Answer:
 How many distinct ways to distribute 3 distinct balls
into 4 distinct cell with at most one ball per cell?
Answer :
 How many distinct ways to distribute 3 identical balls
into 4 distinct cells, with at most one ball per cell?
Answer:
 How many distinct ways to distribute 3 identical balls
into 4 distinct cell with any number ball per cell?
Answer:
The Distribution model of counting

 How many distinct ways to distribute 2 identical balls


into 5 distinct cell, with at most one ball per cell?
Answer: Combination:C(5,2)
 How many distict ways to distribute 2 identical balls
into 5 distinct cell with any number ball per cell?
Answer:Multiset, C(5-1+2,2)
 How many distict ways to distribute 2 distinct balls
into 5 distinct cell, with any number of balls per cell?
Answer: Sequence : 52
 How many distict ways to distribute 2 distinct balls
into 5 distinct cell with at most one ball per cell?
Answer : Permutation: P(5,2)
The Distribution model of counting

 How many distinct ways to distribute r distinct balls


into n distinct cell, with any number of balls per cell?
r-sequence: nr
 How many distinct ways to distribute r distinct balls
into n distinct cell, with at most one ball per cell?
r-Permutation: P(n,r)
 How many distinct ways to distribute r identical balls
into n distinct cell with at most one ball per cell?
r-Combination: C(n,r)
 How many distinct ways to distribute r identical balls
into n distinct cell with any number ball per cell?
r-Multiset: C(n-1+r,r)
EXAMPLE
 In how many ways we can distribute 7 apples to 4 children if
 There is no restriction
 Anak tertua mendapatkan tepat dua apel
 Each child at least get one
 In how many ways can a teacher distribute 12 different books among 16 students if
 There is no restriction
 No student gets more than one book
 The oldest student get two books but no other students gets more than one book
The Distribution model of counting

 Example:
 How many ways to arrange two identical A’s, three
identical B’s and 4 Identical C’s.
Multinomial Coefficient

 How many ways are there to arrange the


letters in ABRACADABRA’
 Solution:
We have 11 spaces for 5 identicals A’s, 2
identicals B’s, 2 identicals R’s, one C, and
one D. We decompose the arrangement into
5 stages
11!/(5!2!2!1!1!)
 Ada berapa cara menyusun 3 buku komputer 4 buku matematika dan 2 buku fisika ke
dalam rak buku secara berderet di mana tiap jenis buku identik satu sama lain
dengan
 Tidak ada aturan
 Buku komputer harus selalu berdampingan
 2 buku matematika harus berada di paling ujung
Multinomial Coefficient

 Suppose we have n total objects, r1 objects type


one, r2 objects type 2, …, and rk objects type k, then
the number of ways to arrange these n objects is
n!
r1! r2 !...rk !
 Proof: ……
 This expression is called multinomial coefficient
The Integer Solution of an Equation
Problem
 How many integer solution are there to
X1 + X2 + X3 = 6,
with Xi 0
 Solution:
The problem is identically the same with
distributing 6 identical balls to 3 non-identical
cells, that is in C(3-1+6,6) ways (MULTISET).
So there is C(8,6) integer solutions
EXERCISE (HW1)
 How many mays are here to arrange the letters in GARDEN
 with the vowels together?

 With the vowels in alphabetical order (don’t have to be together)?

 In how many ways can the letter in UNUSUAL be arranged if


 First letter and last letter must be vowels

 have no consecutive U
 Sembilan kursi dalam sebuah baris akan diduduki oleh 6 orang
siswa dan 3 profesor, yaitu A, B, dan C. Ada berapa cara mengatur
tempat duduk sehingga
 Setiap professor selalu berdampingan
 setiap professor dapat diapit oleh 2 siswa?
 Ada berapa cara menyusun huruf-huruf pada kata “MISSISIPI”, jika
 Tidak ada aturan
 Semua I harus berdekatan
 Tidak ada S yang berturutan
 Pada susunan kubus berikut, kita ingin bergerak dari dari A ke B
dengan syarat kita hanya boleh melangkah ke kanan, ke belakang
dan ke atas saja pada sepanjang rusuk-rusuk kubus. Banyaknya
rute terpendek yang bisa ditempuh adalah
The Integer Solution of an Equation
Problem
 How many integer solution are there to
X1 + X2 + … + Xn = r,
with Xi 0
 Solution:
 State in a different problem, but identically the
same!
 The number of the solution is Multiset C(n-1+r,r)
The Integer Solution of an Equation
Problem
 How many integer solution are there to
X1 + X2 + … + Xn = r,
with Xi 0
Similar to
 Distribute r balls into n distinct cell with any
number balls each cell
 The solution is r-multiset, that is C(n-1+r, r)
The Integer Solution of an Equation
Problem
 Examples:
1. How many non negatives integer solutions
are there to X1 + X2 + X3 = 6, Xi0 [C(8,6)]
2. How many non negatives integer solutions
are there to X1 + X2 + X3  6, Xi0
3. How many non negatives integer solutions
are there to 2X1 + X2 + X3 = 10, Xi0
4. How many non negatives integer solutions
are there to X1 + X2 + X3 = 10, Xi-3
Combinatorial Identities

 Pascal identiy
C(n,r)=C(n-1,r-1)+C(n-1,r)
 Proof
 Algebra

 Combinatoric argument
Combinatorial Identities

 Proof C(n,r)=C(n-1,r-1)+C(n-1,r) by combinatoric


argument
 Proof
We have already known that C(n,r) is the number of
r-element subsets. We want to show that the right
hand side also count the same problem. Pick any
obyek xn. Every r-element subsets, there will be two
possibility
 It includes xn, there are C(n-1,r-1) such subset, OR
 It doesn’t include xn , there C(n-1,r) such subset

By ROS, we have C(n-1,r-1)+C(n-1,r) r-element subset. So


the right hand is also the number of r-element subset .
Combinatorial Identities

 Proof this identity using combinatoric argument


1. C(n,r)=C(n,n-r)
2. C(m+n,r) = C(m,0)C(n,r) + C(m,1)C(n,r-1)+ …+
C(m,r)C(n,0)
3.

 Proof this identity using both, algebra (mathematics


induction) and combinatoric argument
C(n,0)+C(n,1) +… + C(n,n) = 2n
 Identity: C(n,0)+C(n,1) +… + C(n,n) = 2n
 Using combinatoric argument:
Define a problem that has solution in both side forms. For
example how many subset of a set A with n elements. We can
do this problem in both side ways.
Subset of A can be construct in several possibilites
Subset with 0 element : C(n,0); 1 element: C(n,1); 2 elements
: C(n,2) ; … ; n elements : C(n,n)
Using ROS we get the number of subset of A is
C(n,0)+C(n,1) +… + C(n,n)
Next proove that the right hand side is also the number of
subset of A
Suppose n objects as n distinct balls with labels x1, x2, ..,
xn. We can construct a subset in n stages.
Stage 1: For object x1, we have to decide wheater it is
included in the subset or not
Stage 2: For object x2, we have to decide wheater it is
included in the subset or not

Stage n : For object xn, we have to decide wheater it is
included in the subset or not
In how many ways we can make a subset of A?
Binomial Theorem

 Binomial Theorem:
(1+x)n = C(n,0) +C(n,1)xn + C(n,2)x2+…+C(n,n)xn
 n  k nk
n
x  y      x y
n

k 0  k 

 Evaluate n
n k
  2 = 3n
k 0  k 

 Show that for n  1


 n  n  n  n  n  n
         ...         ...  2n 1
 0  2  4  1  3  5
HOMEWORK

 Michael Townsend page 75-76:


 Number 7, 9, 10*, 11,19
 Michael Townsend page 82
 Number 2, 3, 5
 Proof this identities using combinatoric argument
2
 2n  n
n
     
 n  k 0  k 
 n  r  1 r  n  k 
     
 r  k 0  k 

You might also like