Page 1
1 1
INTRODUCTION TO COMBINATORICS
Unit Structure:
1.0 Objective
1.1 Enumeration
1.2 Combinatorics and Graph Theory
1.3 Combinatorics and Number Theory
1.4 Combinatorics and Geometry
1.5 Combinatorics and Optimization,
1.6 Sudoku Puzzles.
1.7 Exercise
1.0 OBJECTIVE
● Combinatorics, also referred to as Combinatorial Mathematics, is the
field of mathematics concerned with problems of selection,
arrangement, and operation within a finite or discrete system.
● It characterizes Mathematical relations and their pro perties.
● Mathematicians uses the term “Combinatorics” as it refers to the
larger subset of Discrete Mathematics.
● It is frequently used in computer Science to derive the formulas and
it is used for the estimation of the analysis of the algorithms .
● The imp ortant features of the combinatorics are as follows:
○ Counting the structures of the provided kind and size.
○ To decide when particular criteria can be fulfilled and analyzing
elements of the criteria, such as combinatorial designs.
○ To identify “greatest”, “ smallest” or “optimal” elements, known as
external combinatorics.
● Combinatorial structures that rise in an algebraic concept, or
applying algebraic techniques to combinatorial problems, known as
algebraic combinatorics.
● In this chapter we are going to lear n about how to :
○ carry over an apply knowledge from Combinatorics and previous
proof -based course munotes.in
Page 2
Combinatorics and Graph
Theory
2 ○ we give a few examples of how we can use graphs to help with a
variety of problems. These problems and examples will continue to
come up throughout the cours e as we learn new graph or
combinatorial ideas.
○ read and understand assigned sections of the textbook.
○ Independently study a new combinatorial topic and present this topic
to their peers.
○ use graphs to model real life situations.
○ recognize graph theore tic properties of graphs and use these
properties in problem -solving.
○ use algorithms to study properties of graphs.
1.1 ENUMERATION
● Enumeration is just another word for counting.
● Enumeration (accurately determining how many) depends on several
skills or methods, including careful counting one by one and
subitizing.
● Enumeration also requires understanding key ideas, for example that
the number of objects in a set stays the same even when objects are
covered or moved.
● So let me show you an example of enumer ation.
● We have five fingers. We can count through them. It turns out there's
more ways we can enumerate fingers.
● Many basic problems in combinatorics involve counting the number of
distributions of objects into cells.
● In this we may or may not be able to distinguish between the objects
and the same for the cells. Also, the cells may be arranged in patterns.
● In short, the basic problem of enumerative combinatorics is that of
counting the number of elements of a finite set.
● Many areas of discrete mathematics involve problems of counting or
enumerating.
● Combinatorics is all about number of ways of choosing some
objects out of a collection and/or number of ways of their
arrangement .
● For example, suppose there are five members in a club, let's say there
names are A, B, C, D, and E, and one of them is to be chosen as the
coordinator.
● This section starts with two elementary but fundamental counting
principles:
munotes.in
Page 3
Introduction to Combinatorics
3 ● The Addition Principle
If there are r1 different objects in the first set, r 2 different objects in the
second set, ..., and r m different objects in the mth set, and if the different
sets are disjoint, then the number of ways to select an object from one of
the m sets is r 1 +r2 +···+r m.
● The Multiplication Principle
Suppose a procedure can be broken into m successive (ordered) stages,
with r 1 different outcomes in the first stage, r2 different outcomes in the
second stage, ... , andrm different outcomes in the mth stage. If the number
of outcomes at each stage is independent of the choices in previous stage s
and if the composite outcomes are all distinct, then the total procedure has
r1 ×r2 ×···×r m different composite outcomes.
● Remember that the addition principle requires disjoint sets of objects
and the multiplication principle requires that the procedure break into
ordered stages and that the composite outcomes be distinct.
Example 1 :
In how many ways can you type one character on a keyboard if the
keyboard has 26 letter keys, 10 digit keys and no others?
If one type of object can be selected in rways and another type can be
selected in sways, then the number of ways of selecting any object is:
r+s.
In our example it is important that we know that there are no letters which
are also digits.
Problem Scenario:
A circular necklace with a total of six beads w ill be assembled using beads
of three different colors. In Figure we show four such necklaces —
however, note that the first three are actually the same necklace. Each has
three red beads, two blues and one green. On the other hand, the fourth
necklace has t he same number of beads of each color but it is a different
necklace.
1. How many different necklaces of six beads can be formed using three
reds, two blues and one green?
munotes.in
Page 4
Combinatorics and Graph
Theory
4 2. How many different necklaces of six beads can be formed using red,
blue and green beads (not all colors have to be used)?
3. How many different necklaces of six beads can be formed using red,
blue and green beads if all three colors have to be used?
4. How would we possibly answer these questions for necklaces of six
thousand beads made wit h beads from three thousand different colors?
What special software would be required to find the exact answer and how
long would the computation take?
1.2 COMBINATORICS AND GRAPH THEORY
● A graph G consists of a vertex set V and a collection E of 2 -element
subsets of V.
● Elements of E are called edges.
● In our course, we will (almost always) use the convention that V {1, 2,
3, . . ., n} for some positive integer n.
● With this convention, graphs can be described precisely with a text
file:
○ The first line of the file contains a single integer n, the number of
vertices in the graph.
○ Each of the remaining lines of the file contains a pair of distinct
integers and specifies an edge of the graph.
We illustrate this convention in Figure 1.2 with a text file and the diagram
for the graph G it defines.
munotes.in
Page 5
Introduction to Combinatorics
5 The above graph G can be defined or explained as following:
➔ G has 9 vertices and 10 edges.
➔ {2, 6} is an edge.
➔ Vertices 5 and 9 are adjacent.
➔ {5, 4} is not an edge.
➔ Vertices 3 and 7 are not adjacent.
➔ P (4, 3, 1, 7, 9, 5) is a path of length 5 from vertex 4 to vertex 5.
➔ C (5, 9, 7, 1) is cycle of length 4.
➔ G is disconnected and has two components. One of the components
has vertex set {2, 6, 8}.
➔ {1, 5, 7} is a triangle.
➔ {1, 7, 5, 9} is a clique of size 4.
➔ {4, 2, 8, 5} is an independent set of size 4.
1.3 NUMBER THEORY
● Number theory generally concerns itself with the properties of the
positive integers.
● G.H. Hardy was a brilliant British mathematician who lived through
both World Wars and conducted a large deal of number -theoretic
research.
● He wrote in his 1940 essay A Mathematician’s Apology “[n]o one has
yet discovered any warlike purpose to be served by the theory of
numbers or relativity, and it seems very unlikely that anyone will do so
for many years .” ¹
● Little did he know, the purest mathematical ideas of number theory
would soon become indispensable for the cryptographic techniques
that kept communications secure.
● Our subject here is not number theory, but we will see a few times
where combinatoria l techniques are of use in number theory.
munotes.in
Page 6
Combinatorics and Graph
Theory
6 Example:
Form a sequence of positive integers using the following rules.
Start with a positive integer n > 1.
If n is odd, then the next number is 3n + 1.
If n is even, then the next number is n/2.
Halt if you ever reach 1.
➔ For example, if we start with 28,
➔ the sequence is 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16,
8, 4, 2, 1.
➔ Now suppose you start with 19.
➔ Then the first few terms are 19, 58, 29, 88, 44, 22.
➔ But now we note that the integ er 22 appears in the first sequence, so
the two sequences will agree from this point on.
➔ Sequences formed by this rule are called Collatz sequences.
➔ Pick a number somewhere between 100 and 200 and write down the
sequence you get. Regardless of your choi ce, you will eventually halt with a 1.
However, is there some positive integer n (possibly quite large) so that if
you start from n, you will never reach 1?
Questions arising in number theory can also have an enumerative flair, as
the following e xample shows. munotes.in
Page 7
Introduction to Combinatorics
7
There are 22 partitions altogether, and as noted, exactly 6 of them are
partitions of 8 into odd parts.
Also, exactly 6 of them are partitions of 8 into distinct parts.
Example:
How many positive factors does the number N = 235473115 have?
Solution:
➔ From the Unique Factorization Theorem for integers,
➔ A divides
(pi ’s are distinct primes)
➔ iff
, with 0 ≤ li ≤ k i , i = 1, . . . , s.
➔ By the product rule, there are (k 1 + 1) (k2 + 1). . .(k s + 1) choices for
A, since l i ’s can be chosen in dependently in ki + 1 ways each.
➔ In our case, the number of positive factors is 4 · 5 · 4 · 6 = 48
1.4 COMBINATORICS AND GEOMETRY:
● There are many problems in geometry that are innately combinatorial
or for which combinatorial techniques shed light on the problem.
● Combinatorial geometry is a blending of principles from the areas of
combinatorics and geometry.
● It deals with combinations and arrangements of geometric objects and
with discrete properties of these objects.
munotes.in
Page 8
Combinatorics and Graph
Theory
8 ● Combinatorics, also called combinato rial mathematics, the field of
mathematics concerned with problems of selection, arrangement, and
operation within a finite or discrete system.
● Included is the closely related area of combinatorial geometry.
● Combinatorial geometry is a blending of princip les from the areas of
combinatorics and geometry.
● It deals with combinations and arrangements of geometric objects and
with discrete properties of these objects.
● It is concerned with such topics as:
○ packing,
○ covering,
○ coloring,
○ folding,
○ symmetry,
○ tiling,
○ partitioning,
○ decomposition, and
○ illumination problems.
● Combinatorial geometry includes aspects of topology, graph theory,
number theory, and other disciplines.
● Example:
In the given Figure, we show a family of 4 lines in the plane.
Each pair of lines intersects and no point in the plane belongs to more than
two lines. These lines determine 11 regions.
Under these same restrictions,
1. how many regions would a family of 8947 lines determine?
2. Can different arrangements of lines determine differen t numbers of
regions?
munotes.in
Page 9
Introduction to Combinatorics
9
1.5 COMBINATORICS AND OPTIMIZATION
● Combinatorial optimization is a subset of mathematical optimization
that is related to operations research, algorithm theory, and
computational complexity theory.
● Combinatorics looks at permutatio ns and combinations.
● Optimization explores ways to make any operation work more
efficiently within given constraints.
● Together, they provide powerful methods for modelling and solving
large management problems, from optimizing flight schedules to
making a factory’s layout as efficient as possible.
● Combinatorial optimization is the process of searching for maxima (or
minima) of an objective function F whose domain is a discrete but
large configuration space (as opposed to an N -dimensional continuous
space) .
● Some simple examples of typical combinatorial optimization problems
are:
○ The Traveling Salesman Problem: given the (x, y) positions of N
different cities, find the shortest possible path that visits each city
exactly once.
○ Bin-Packing: given a set of N objects each with a specified size s i, fit
them into as few bins (each of size B) as possible.
○ Integer Linear Programming: maximize a specified linear
combination of a set of integers X 1 ... X N subject to a set of linear
constraints each of the form
○ a1X1 + ... + a NXN <= c.
○ Job-shop Scheduling: given a set of jobs that must be performed, and
a limited set of tools with which these jobs can be performed, find a
schedule for what jobs should be done when and with what tools that
minimizes the total amount of t ime until all jobs have been completed. munotes.in
Page 10
Combinatorics and Graph
Theory
10 ○ Boolean Satisfiability: assign values to a set of boolean variables in
order to satisfy a given boolean expression. (A suitable objective
function might be the number of satisfied clauses if the expression is a
CNF f ormula.)
○ The space of possible solutions is typically too large to search
exhaustively using pure brute force. In some cases, problems can be
solved exactly using Branch and Bound techniques.
○ However, in other cases no exact algorithms are feasible, and
randomized search algorithms must be employed, such as:
■ Random -restart hill -climbing
■ Simulated annealing
■ Genetic algorithms
■ Tabu search
● A large part of the field of Operations Research involves algorithms
for solving combinatorial optimization problems.
● How ever, these problems are inherently continuous.
● In theory, you can cross the river at any point you want, even if it were
irrational. (OK, so not exactly irrational, but a good decimal
approximation.)
● In this course, we will examine a few optimization pr oblems that are
not continuous, as only integer values for the variables will make
sense.
● It turns out that many of these problems are very hard to solve in
general.
1.6 SUDOKU PUZZLES
● The class of Sudoku puzzles consists of a partially completed row -
column grid of cells partitioned into N regions each of size N cells, to
be filled in ("solved") using a prescribed set of N distinct symbols
(typically the numbers {1, ..., N}), so that each row, column and
region contains exactly one of each element of the s et.
● A Sudoku puzzle is a 9 × 9 array of cells that when completed have the
integers 1, 2, . . . , 9 appearing exactly once in each row and each
column.
● Also, the numbers 1, 2, 3, . . . , 9 appear once in each of the nine 3×3
subsquares identified by the d arkened borders.
● To be considered a legitimate Sudoku puzzle, there should be a unique
solution. munotes.in
Page 11
Introduction to Combinatorics
11 ● In the following Figure, we show two Sudoku puzzles.
[A] [B]
● Figure [A] is fairly easy, and figure [B] is far more challenging.
● There are many sources of Sudoku puzzles, and software that
generates Sudoku puzzles and then allows you to play them with an
attractive GUI is available for all operating systems.
1.7 EXERCISE
Solve the following:
1. Consider the graph G shown in Figure, and answer the following:
1. What is the largest k for which G has a path of length k?
2. What is the largest k for which G has a cycle of length k?
3. What is the largest k for which G has a clique of size k?
4. What is the largest k for which G has an independent set of size k?
5. What is the shortest path from vertex 7 to vertex 6? munotes.in
Page 12
Combinatorics and Graph
Theory
12 2. In the given Figure we use letters for the labels on the vertices to help
distinguish visually from the inte ger weights on the edges.
Figure: A labeled graph with weighted edges
Suppose the vertices are cities, the edges are highways and the weights on
the edges represent distance.
1. What is the shortest path from vertex E to vertex B?
2. Suppose Ariel is a salesperson whose home base is city A. In what order
should Ariel visit the other cities so that she goes through each of them
at least once and returns home at the end —while keeping the total
distance traveled to a minimum? Can Ariel accomplish such a to ur
visiting each city exactly once?
3. Sanjay is a highway inspection engineer and must traverse every
highway each month. Sanjay’s homebase is City E. In what order
should Sanjay traverse the highways to minimize the total distance
traveled? Can Sanjay m ake such a tour traveling along each highway
exactly once?
3. n lines on a plane cut the plane into parts. Assume that every two lines
intersect and there is no triple intersections. Find the number of parts.
How many of these parts are bounded?
4. Consider the graph G with 4 vertices v1,v2,v3 and v4 and degree of
vertices are 3,5,2 and 1 respectively. Is it possible to construct such
graph? Explain.
5. (a) How many ways are there to pick a sequence of two different
letters of the alphabet that appear in the word C RAB? In
STATISTICS? munotes.in
Page 13
Introduction to Combinatorics
13 (b) How many ways are there to pick first a vowel and then a consonant
from CRAB? From STATISTICS?
6. (a) How many integers are there between 0 and 50 (inclusive)?
(b) How many of these integers are divisible by 2?
(c) How many (unord ered) pairs of these integers are there whose
difference is 5?
7. A store carries eight styles of pants. For each style, there are 12
different possible waist sizes, five pants lengths, and four color
choices. How many different types of pants could the store have?
8. How many different sequences of heads and tails are possible if a coin
is flipped 100 times? Using the fact that 210 = 1024 ≈ 1000 = 103,
give your answer in terms of an (approximate) power of 10.
9. How many six -letter “words” (sequence of any six l etters with
repetition) are there? How many with no repeated letters?
10. How many ways are there to pick a man and a woman who are not
husband and wife from a group of n married couples?
11. Given 10 different English books, six different French books, and four
different German books, (a) How many ways are there to select one
book? (b) How many ways are there to select three books, one of each
language?
Reference :
1. Applied Combinatorics2017 Edition, Mitchel T. Keller William
T. Trotter
munotes.in
Page 14
14 2
STRINGS, SETS, AND BINOMIAL
COEFFICIENTS
Unit Structure
2.0 Objective
2.1 Strings - A First Look
2.2 Permutations
2.3 Combinations
2.4 Combinatorial
2.5 The Ubiquitous Nature of Binomial Coefficients
2.6 The Binomial
2.7 Multinomial Coefficients
2.8 Exer cise
2.0 OBJECTIVE
● Much of combinatorial mathematics can be reduced to the study of
strings, as they form the basis of all written human communications.
● Also, strings are the way humans communicate with computers, as well
as the way one computer commun icates with another.
● As we shall see, sets and binomial coefficients are topics that fall under
the string umbrella.So it is important to begin our in -depth study of
combinatorics with strings.
2.1 STRINGS - A FIRST LOOK
● Let n be a positive integer.
● Throu ghout this chapter, we will use the shorthand notation [n] to
denote the n -element set {1, 2, . . ., n}.
● Now let X be a set.
● Then a function s: [n] → X is also called an X -string of length n.
● In discussions of X -strings, it is customary to refer to the elements of
X as characters, while the element s(i) is the i th character of s. munotes.in
Page 15
Strings, Sets, and Binomial
Coefficients
15 ● Whenever practical, we prefer to denote a stri ng s by writing s “x 1x2x3
. . . x n”, rather than the more cumbersome notation s(1) =x 1, s(2)= x2,
…, s(n)= x n.
● There are a number of alternatives for the notation and terminology
associated with strings.
● First, the characters in a string s are frequently written using subscripts
as s1, s2, . . . , sn, so the i th-term of s can be denoted si rather than s(i).
● Strings are also called sequences, especially when X is a set of
numbers and the function s is defined by an algebraic rule.
○ For example, the seque nce of odd integers is defined by s i= 2i−1.
● Alternatively, strings are called words, the set X is called the alphabet
and the elements of X are called letters.
○ For example, aababbccabcbb is a 13 -letter word on the 3 -letter
alphabet {a, b, c}.
● In many co mputing languages, strings are called arrays.
● Also, when the character s(i) is constrained to belong to a subset X i ⊆
X, a string can be considered as an element of the cartesian product X 1
× X 2 × · · · × X n, which is normally viewed as n -tuples of the fo rm (x1,
x2, . . . , xn) such that xi ∈ Xi for all i ∈ [n].
Example
In the state of India, license plates consist of:
a) four digits
b) followed by a space
c) followed by three capital letters.
d) the first digit cannot be a 0.
How many license plates are possible?
Solution .
Let X consist of the digits {0, 1, 2, . . ., 9},
let Y be the singleton set whose only element is a space, and
let Z denote the set of capital letters.
A valid license plate is just a string from
(X − {0}) × X × X × X × Y × Z × Z × Z
so the number of different license plates is
9 × 103 × 1 × 263 = 158 184 000,
since the size of a product of sets is the product of the sets’ sizes. munotes.in
Page 16
Combinatorics and Graph
Theory
16 Explanation:
➔ We can get a feel for why this is the case by focusing just on the
digit part of the string here.
➔ We can think about the digits portion as being four blanks that
need to be filled.
➔ The first blank has 9 options (the digits 1 through 9).
➔ If we focus on just the digit strings beginning with 1, one
perspective is that they range from 1 000 to 1999, so there are 1000
of them.
➔ However, we could also think about there being 10 options for the
second spot, 10 options for the third spot, and 10 options for the
fourth.
➔ Multiplying 10×10×10 gives 1000.
➔ Since our analysis of filling the remai ning digit blanks didn’t
depend on our choice of a 1 for the first position, we see that each
of the 9 choices of initial digit gives 1 000 strings, for a total of 9
000 9 × 103 .
➔ In the case that X {0, 1}, an X -string is called a 0 –1 string (also a
binar y string or bit string.).
➔ When X {0, 1, 2}, an X -string is also called a ternary string.
2.2 PERMUTATIONS :
Fundamental Principles Of Counting:
● Fundamental principle of multiplication –
If there are three different events such that one event occurs in m different
ways, second event happens in n different ways and the third event occurs
in p different ways, then all three events simultaneously will happen in
m×n×p way s.
● Fundamental principle of addition –
If there are two jobs such that the first one ca n be performed
independently in m number of ways and the second work independently
can be done in n number of ways, then either of the two jobs can be
performed in (m+n) ways.
munotes.in
Page 17
Strings, Sets, and Binomial
Coefficients
17 ● A permutation is a mathematical technique that determines the number
of possibl e arrangements in a set when the order of the arrangements
matters.
● Common mathematical problems involve choosing only several items
from a set of items with a certain order.
● Permutation refers to a particular arrangement of a set of objects in a
defined order or a process of arranging numbers or letters in a
sequence.
● We can form many different permutations from a given set of objects
taking all of the digits from the set at a time or a particular number of
objects at a time.
● Permutations are frequently c onfused with another mathematical
technique called combinations. However, in combinations, the order
of the chosen items does not influence the selection.
● Permutations – It is the linear arrangements of distinct objects taken
some or all at a time. The nu mber of arrangements possible is called
the permutations. If we have two positive integers r and n such that l ≤
r ≤ n, then the total number of arrangements or permutations possible
for n distinct items taken r at a time is mathematically given by,
○ Formul a for Calculating Permutations
The general permutation formula is expressed in the following way:
Where:
■ n – the total number of elements in a set
■ k – the number of selected elements arranged in a specific order
■ ! – factorial
● Factorial (noted as “!”) i s the product of all positive integers less than
or equal to the number preceding the factorial sign. For example, 3! =
1 x 2 x 3 = 6 .
● The formula above is used in situations when we want to select only
several elements from a set of elements and arrange t he selected
elements in a special order.
● Permutations Under Certain Conditions:
The total number of arrangements or permutations taken r at a time from a
set of n different objects; munotes.in
Page 18
Combinatorics and Graph
Theory
18 ○ When we always have to include a particular object in every
arrangement is n−1Cr−1×r!.
○ When we don’t have to include a particular object in any arrangement
it is n−1Cr×r!.
Example:
Let’s say we have 8 people:
1: Alice
2: Bob
3: Charlie
4: David
5: Eve
6: Frank
7: George
8: Horatio
How many ways can we award a 1st, 2nd and 3rd p lace prize among eight
contestants? (Gold / Silver / Bronze)
Solution:
We’re going to use permutations since the order we hand out these medals
matters. Here’s how it breaks down:
● Gold medal:
○ 8 choices:
○ A B C D E F G H
○ Let’s say A wins the Gold.
● Silve r medal:
○ 7 choices:
○ B C D E F G H.
○ Let’s say B wins the silver.
munotes.in
Page 19
Strings, Sets, and Binomial
Coefficients
19 ● Bronze medal:
○ 6 choices:
○ C D E F G H.
○ Let’s say C wins the bronze.
● We picked certain people to win,
○ we had 8 choices at first,
○ then 7,
○ then 6.
● The total number of options was
8∗7∗6=336
Explanation:
➔ Let’s look at the details. We had to order 3 people out of 8.
➔ To do this, we started with all options (8) then took them away one
at a time (7, then 6) until we ran out of medals.
➔ We know the factorial is:
➔ Unfortunately, that does too much! We only want 8∗7∗6
➔ How can we “stop” the factorial at 5?
➔ This is where permutations get cool: notice how we want to get rid
of 5∗4∗3∗2∗1
➔ What’s another name for this? 5 factorial!
So, if we do 8!/5! we get:
➔ And why did we use the number 5? Because it was left over after we
picked 3 medals from 8. So, a better way to write this would be:
➔ If we have n items total and want to pick k in a certain order, we get:
munotes.in
Page 20
Combinatorics and Graph
Theory
20 ➔ And this is the permutation formula:
You have n items and want to find the number of ways k items can be
ordered:
2.3 COMBINATIONS
● Combinations are studied in combinatorics but are also used in
different disciplines, including mathematics and finance.
● A combination is a mathematical technique that d etermines the
number of possible arrangements in a collection of items where the
order of the selection does not matter.
● In combinations, you can select the items in any order.
● Combinations can be confused with permutations.
● However, in permutations, the order of the selected items is essential.
● For example, the arrangements ab and ba are equal in combinations
(considered as one arrangement), while in permutations, the
arrangements are different.
● Combinations – If we have to select combinations of items from a
given set of items such that the order or arrangement doesn’t matter,
then we use combinations. Such that to find the number of ways of
selecting r objects from a set of n objects, then mathematically it is
given by,
Formula for Combination
Note t hat the formula above can be used only when the objects from a
set are selected without repetition.
○ Where:
■ n – the total number of elements in a set
■ k – the number of selected objects (the order of the objects is not
important)
■ ! – factorial
● Factorial (not ed as “!”) is a product of all positive integers less or
equal to the number preceding the factorial sign. For example, 3! = 1 x
2 x 3 = 6. munotes.in
Page 21
Strings, Sets, and Binomial
Coefficients
21 Example:
Let’s say we have 8 people:
1: Alice
2: Bob
3: Charlie
4: David
5: Eve
6: Frank
7: George
8: Horatio
But he re instead of giving separate Gold, Silver and Bronze medals,we are
offering empty tin cans.
How many ways can I give 3 tin cans to 8 people?
Solution:
● In this case, the order we pick people doesn’t matter.
● If I give a can to Alice, Bob and then Charlie, it’s the same as giving
to Charlie, Alice and then Bob.
● For a moment, let’s just figure out how many ways we can rearrange
3 people.
● Well, we have
○ 3 choices for the first person,
○ 2 for the second, and
○ only 1 for the last.
● So we have
3∗2∗1 ways to re -arrange 3 people.
● If we want to figure out how many combinations we have, we
just create all the permutations and divide by all the redundancies.
● In our case, we get 336 permutations (from above), and
● we divide by the 6 redundancies for each permutation and get
336/6 = 56.
munotes.in
Page 22
Combinatorics and Graph
Theory
22 Explanation:
➔ The general formula is
➔ which means “Find all the ways to pick k people from n, and
divide by the k! variants”.
➔ Writing this out, we get our combination formula , or the number of
ways to combine k items from a set of n:
➔ Sometimes C(n,k) is written as:
➔ which is the binomial coefficient.
● Difference Between Permutation and Combination
To help students better understand this topic, we have formulated a table
that contains all the poi nts related to the difference between combination
and permutation.
That table is mentioned below.
Permutation Combination
It refers to the task of arranging
digits, people, alphabets, colours,
numbers, and letters It is the selection of food, menu,
cloth es, teams, subjects, and other
objects
Example:
● Permutation is to pick a
team captain, picture, or shortstop
from a group
● Deciding on your two
favourite colours in a particular
order from a colour brochure
● Picking winners for the first,
second, and third place
Example:
● Combinations includes picking
any three team members from a group
● Selecting any two colours from a
colour brochure
● Picking any three winners for an
award
munotes.in
Page 23
Strings, Sets, and Binomial
Coefficients
23 A few examples:
Here’s a few examples of combinations (order doesn’t matter) fro m
permutations (order matters).
Example 1
Combination:
Picking a team of 3 people from a group of 10.
C(10,3)=10!/(7! ∗3!)
=10∗9∗8/(3∗2∗1)
=120
Example 2
Permutation:
Picking a President, VP and Waterboy from a group of 10.
P(10,3)=10!/7!
=10∗9∗8
=720
2.4 COMBINATORIAL
● Combinatorics is a stream of mathematics that concerns the study of
finite discrete structures.
● It deals with the study of permutations and combinations,
enumerations of the sets of elements.
● Mathematicians use the term “Combinatorics” as it refers to the larger
subset of Discrete Mathematics.
● It is frequ ently used in computer Science to derive the formulas and it
is used for the estimation of the analysis of the algorithms.
● In this section, let us discuss combinatorics, its features, formulas,
applications and examples in detail.
● Combinatorics, also call ed combinatorial mathematics, the field of
mathematics concerned with problems of selection, arrangement,
and operation within a finite or discrete system .
● Included is the closely related area of combinatorial geometry.
● Features of combinatorics
Some of t he important features of the combinatorics are as follows: munotes.in
Page 24
Combinatorics and Graph
Theory
24 ○ Counting the structures of the provided kind and size.
○ To decide when particular criteria can be fulfilled and analyzing
elements of the criteria, such as combinatorial designs.
○ To identify “greate st”, “smallest” or “optimal” elements, known as
external combinatorics.
○ Combinatorial structures that rise in an algebraic concept, or applying
algebraic techniques to combinatorial problems, known as algebraic
combinatorics.
● Applications of combinatorics
Combinatorics is applied in most of the areas such as:
○ Communication networks, cryptography and network security
○ Computational molecular biology
○ Computer architecture
○ Scientific discovery
○ Languages
○ Pattern analysis
○ Simulation
○ Databases and data mining
○ Home land security
○ Operations research
● Example:
Let n be a positive integer. Use following figure explain why
Figure: The sum of the first n integers
munotes.in
Page 25
Strings, Sets, and Binomial
Coefficients
25 Solution:
● Consider an (n+1) (n+1) array of dots as depicted in Figure.
● There are(n+1)2 dots altogether, w ith exactly n+1 on the main
diagonal.
● The off -diagonal entries split naturally into two equal size parts, those
above and those below the diagonal.
● Furthermore, each of those two parts has
dots.
● It follows that:
2.5 THE UBIQUITOUS NATURE OF BINOMIAL
COEFFICIENTS
● In this section, we present several combinatorial problems that can
be solved by appealing to binomial coefficients, even though at first
glance, they do not appear to have anything to do with sets.
Example
The office assistant is distributin g supplies. In how many ways can he
distribute 18 identical folders among four office employees: Audrey, Bart,
Cecilia and Darren, with the additional restriction that each will receive at
least one folder?
Solution:
➔ Imagine the folders placed in a row.
➔ Then there are 17 gaps between them.
➔ Of these gaps, choose three and place a divider in each.
➔ Then this choice divides the folders into four non -empty sets.
➔ The first goes to Audrey, the second to Bart, etc.
➔ Thus the answer isC(17,3).
➔ We can illustrate this scheme with Audrey receiving 6 folders, Bart
getting 1 , Cecilia 4 and Darren 7 as follows:
munotes.in
Page 26
Combinatorics and Graph
Theory
26
Figure. Distributing Identical Objects into Distinct Cells
Example:
Suppose we redo the preceding problem but drop the restriction that each
of the four e mployees gets at least one folder. Now how many ways can
the distribution be made?
Solution.
➔ The solution involves a “trick” of sorts.
➔ First, we convert the problem to one that we already know how to
solve.
➔ This is accomplished by artificially inflating everyone's allocation
by one.
➔ In other words, if Bart will get 7 folders, we say that he will get .8.
➔ Also, artificially inflate the number of folders by ,4, one for each of
the four persons. So now imagine a row of 22=18+4 folders.
➔ Again, choose 3 gaps .
➔ This determines a non -zero allocation for each person.
➔ The actual allocation is one less —and may be zero. So the answer is
.C(21,3).
2.6 THE BINOMIAL
● Binomial theorem, statement that for any positive integer n, the nth
power of the sum of two numbers a and b may be expressed as the
sum of n + 1 terms of the form .
● The binomial theorem is used heavily in Statistical and Probability
Analyses .
● It is so useful as our economy depends on Statistical and Probability
Analysis.
● In higher mathematics and calcula tion, the Binomial Theorem is used
in finding roots of equations in higher powers.
● In Algebra, a binomial expression contains two terms joined by either
addition or subtraction sign.
● For instance, (x + y) and (2 – x) are examples of binomial expressions. munotes.in
Page 27
Strings, Sets, and Binomial
Coefficients
27 ● Sometimes, we may need to expand binomial expressions as shown
below.
● In this section, we will learn how to use the Binomial theorem to
expand binomial expression without having to multiply everything out
the long way.
The Binomial Theorem?
● The traces of the binomial theorem were known to human beings since
the 4th century BC.
● The binomial for cubes were used in the 6th century AD.
● An Indian mathematician, Halayudha, explains this method using
Pascal’s triangle in the 10th century AD.
● The clear statemen t of this theorem was stated in the 12th century.
● The mathematicians took these findings to the next stages till Sir Isaac
Newton generalized the binomial theorem for all exponents in 1665.
The Binomial Theorem states the algebraic expansion of exponents of a
binomial, which means it is possible to expand a polynomial (a + b) n into
the multiple terms.
● Mathematically, this theorem is stated as:
munotes.in
Page 28
Combinatorics and Graph
Theory
28 ● we can express the Binomial formula as:
For example:
10C6 = 10! / (10 – 6)! 6!
= 10! / 4! 6!
= (1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10) / 1 x 2 x 3 x 4 x 1 x 2
x 3 x 4 x 5 x 6
= 7 x 8 x 9 x 10 /1 x 2 x 3 x 4
= 7 x 3 x 10 = 210
Steps to use the Binomial Theorem:
● There are a few things which you need to remember whil e applying
the Binomial Theorem. These are:
○ The exponents of the first term (a) decreases from n to zero
○ The exponents of the second term (b) increases from zero to n
○ The sum of the exponents of a and b is equal to n.
○ The coefficients of the first and last term are both 1.
● Let’s use Binomial Theorem on certain expressions to practically
understand the theorem.
Example 1
Expand (a + b)5
Solution