Shahriari 2022 Introduction

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Cambridge University Press

978-1-108-47654-6 — An Invitation to Combinatorics


Shahriar Shahriari
Excerpt
More Information

Introduction

Accurate reckoning. The entrance into the knowledge of all existing things and all
obscure secrets.
–The Ahmes–Rhind Papyrus

What is Combinatorics?
Combinatorics is a collection of techniques and a language for the study of (inite or
countably ininite) discrete structures. Given a set of elements (and possibly some structure
on that set), typical questions in combinatorics are:
• Does a speciic arrangement of the elements exist?
• How many such arrangements are there?
• What properties do these arrangements have?
• Which one of the arrangements is maximal, minimal, or optimal according to some
criterion?
Unlike many other areas of mathematics – e.g., analysis, algebra, topology – the core of
combinatorics is neither its subject matter nor a set of “fundamental” theorems. More than
anything else, combinatorics is a collection – some may say a hodgepodge – of techniques,
attitudes, and general principles for solving problems about discrete structures. For any given
problem, a combinatorist combines some of these techniques and principles – e.g., the
pigeonhole principle, the inclusion–exclusion principle, the marriage theorem, various
counting techniques, induction, recurrence relations, generating functions, probabilistic
arguments, asymptotic analysis – with (often clever) ad hoc arguments. The result is a fun
and dificult subject.
In today’s mathematical world, in no small part due to the power of digital computers,
most mathematicians ind much use for the tool box of combinatorics. In problems of pure
mathematics, often, after deciphering the layers of theory, you ind a combinatorics problem
at the core. Outside of mathematics, and as an example, combinatorial problems abound in
computer science.

Typical Problems
To whet your appetite, here is a preliminary sample of problems that we will encounter in the
course of this text.

© in this web service Cambridge University Press www.cambridge.org


Cambridge University Press
978-1-108-47654-6 — An Invitation to Combinatorics
Shahriar Shahriari
Excerpt
More Information

2 Introduction

• How many sequences a1,a2, . . . ,a12 are there consisting of four 0’s and eight 1’s, if no two
consecutive terms are both 0’s?
• A bakery has eight kinds of donuts, and a box holds one dozen donuts. How many different
boxes can you buy? How many different boxes are there that contain at least one of
each kind?
• A bakery sells seven kinds of donuts. How many ways are there to choose one dozen donuts
if no more than three donuts of any kind are used?
• Determine the number of n-digit numbers with all digits odd, such that 1 and 3 each occur
a positive even number of times.
• We are trying to reconstruct a word that is made from the letters A, B, C, D, and R. We are
given a frequency table that shows the number of times a speciic triple occurs in the word:
triple frequency
ABR 2
ACA 1
ADA 1
BRA 2
CAD 1
DAB 1
RAC 1
For example, ABR occurs twice while ACA appears once. We want to know all words with
the same triples and with the same frequency table. The answer may be that there are no
such words. Note that by a word we mean an ordered collection of letters and we are not
concerned with meaning.
• A particular signaling network consists of six pieces of communications equipment:
x1,x2,y1,y2,z1,z2
We can choose various pairs of these and link each pair through an intermediate facility
(e.g., microwave towers, trunk groups). Intermediate facilities are expensive to build but
if one fails, then all the links through them become inoperative. So, if we build just one
intermediate facility and route all of our connections through it, then its failure will
disconnect everything. However, the design speciication requires that if one intermediate
facility fails, then there will remain at least one link between at least one of the x’s and one
of the y’s and between one of the x’s and one of the z’s, as well as between one of the y’s
and one of the z’s. What is the minimum number of facilities that we need and how should
the connections be designed?
• A soccer ball is usually tiled with 12 pentagons and 20 hexagons. Are any other combina-
tions of pentagons and hexagons possible?

How Do We “Count”?
Counting the number of conigurations of a certain type is an important part of combi-
natorics. In all of the examples in the previous section, it is clear what kind of an answer

© in this web service Cambridge University Press www.cambridge.org


Cambridge University Press
978-1-108-47654-6 — An Invitation to Combinatorics
Shahriar Shahriari
Excerpt
More Information

How Do We “Count”? 3

we are looking for. We want a speciic numerical answer or an example of a speciic


coniguration.
However, in many problems, it may be possible to present a solution that is satisfactory in
many ways but is not quite a direct answer. We look at several examples.
(a) Let [n] = {1,2, . . . ,n}, and let f (n) be the number of subsets of [n]. Then f (n) = 2n .
Proof. For any particular subset of [n], each element of [n] is either in that subset or not.
Thus, to construct a typical subset, we have to make one of two choices for each element
of [n]. Furthermore, these choices are independent of each other. Hence, the total number
of choices – and consequently the total number of subsets – is

2 × 2 × · · · × 2 = 2n .
  
n 
This proof gives a closed formula for the answer, and, in fact, gives more than was
asked. It also tells us how to construct all the subsets.
(b) Assume n people give their n hats to a hat-check person. Let f (n) be the number of ways
that the hats can be returned, so that everyone has one hat, but no one has their own hat.
If we list the hats on the left and their owners on the right, then the igure below shows
three ways of returning hats to four people so that none of them gets their own hat back.

1 1 1 1 1 1

2 2 2 2 2 2

3 3 3 3 3 3

4 4 4 4 4 4

You should check that f (1) = 0, f (2) = 1, and f (3) = 2. You should also try to ind
f (4).
We will show in Section 8.3 that
n
 (−1)i
f (n) = n! .
i!
i=0

This is a formula – and you should check your answers for n = 1, . . . ,4 using it – but
we would have preferred a “nice” closed formula. While you may not ind this formula
pleasing, it does work, and will become even more meaningful when we understand the
signiicance of each term in the sum.
It is also possible to show that f (n) is the nearest integer to n!e . This is, of course, easier
to use. But this formula may not have a combinatorial signiicance, and hence, it may be
argued, that it gives us less insight. It is, however, fascinating that in answering a question
about hats, the number e would make an appearance.
(c) Let [n] = {1, . . . ,n}. Let f (n) be the number of subsets of [n] that do not contain two
consecutive integers. For example, if n = 4, then the subsets of {1,2,3,4} that do not
contain two consecutive integers are

© in this web service Cambridge University Press www.cambridge.org


Cambridge University Press
978-1-108-47654-6 — An Invitation to Combinatorics
Shahriar Shahriari
Excerpt
More Information

4 Introduction

∅, {1}, {2}, {3}, {4}, {1,3}, {1,4}, {2,4}.


Thus f (4) = 8. You should also check that f (1) = 2, f (2) = 3, and f (3) = 5.
We will show in Example 1.18 (and again in Example 9.34) that
1 1 √ 1 √
f (n) = √ (τ n+2 − τ n+2 ), where τ = (1 + 5), τ = (1 − 5).
5 2 2
Again, it is unclear how irrational numbers got involved in counting a discrete
phenomenon. This formula can actually be used but seems to give little insight into the
problem. Sometimes, there are alternatives to inding a closed formula. For this problem,
we can prove the following recurrence relation:
CLAIM: f (n) = f (n − 1) + f (n − 2).
Proof. All “good” subsets of [n] either have n or don’t have n. The ones that don’t have
n are exactly the “good” subsets of [n − 1]. The “good” subsets of [n] that include n are
exactly the “good” subsets of [n − 2] together with n. Thus f (n) = f (n − 1) + f (n − 2). 
Seeing the recurrence relation, we know that the sequence f (1), f (2), . . . is the Piṅgala–
Fibonacci sequence (see Section 1.2.1), and we can use the recurrence relation to generate
as many values of f as we want. In fact, the closed formula quoted above can be derived
from this recurrence relation.
(d) We have a sequence a0 = 1, a1 , a2 , . . . such that, for all n ≥ 1,
n

ak an−k = 1.
k=0

We want to ind a47 .


For example,
a0 = 1
a0 a1 + a1 a0 = 1 ⇒ a1 + a1 = 1 ⇒ a1 = 1/2
 2
1
a0 a2 + a1 a1 + a2 a0 = 1 ⇒ a2 + 2 + a2 = 1 ⇒ a2 = 3/8.

We see that we could continue and, step by step, calculate the terms of the sequence.
This is quite tedious. An alternative way to approach this problem is through generating
functions. If we want to ind a formula for some function f (n) where n is a natural number,
then we can form the generating function of f (n):

f (n)xn = f (0) + f (1)x + f (2)x2 + · · · + f (n)xn + · · · .
n≥0

Here we are concerned with formal power series, and questions of convergence do not
come up (at least for elementary applications). Sometimes this power series has a nice
closed form and then we can manipulate this function and get information about f (n).
So for our problem, let
F(x) = a0 + a1 x + a2 x2 + · · · .

© in this web service Cambridge University Press www.cambridge.org


Cambridge University Press
978-1-108-47654-6 — An Invitation to Combinatorics
Shahriar Shahriari
Excerpt
More Information

How Do We “Count”? 5

Now
F(x)F(x) = (a0 + a1 x + a2 x2 + · · · )(a0 + a1 x + a2 x2 + · · · )
= a20 + (a0 a1 + a1 a0 )x + (a0 a2 + a1 a1 + a2 a0 )x2 + · · ·
= 1 + x + x2 + · · ·
1
= .
1−x
1
We have (F(x))2 = 1−x and so
1
F(x) = √ .
1−x
Now an is the coeficient of xn in the Taylor series expansion of F(x). So, we can use a
symbolic algebra software such as SageMath , Maple , or Mathematica to ind any
desired value of an .
As an example, in Maple, we irst deine the function by > F := √ 1 , and
1−x
then get the coeficient of x47 in the Taylor polynomial expansion of F at x = 0 by
>coeftayl(F,x=0,47). We get
50803160635786570329644235
a47 = .
618970019642690137449562112
It is amazing that calculus can help in solving such a discrete problem. In fact, the
generating function F(x) can actually be used to get
1 · 3 · 5 · · · (2n − 1)
an = .
2n n!
However, it is not clear that this formula is any better than the generating function.
As the examples show, we will not only use a myriad of techniques for solving counting
problems, but we will also reine our sense of what a good solution should look like. This all
will (hopefully) become clear as we get our hands dirty and start solving problems.

© in this web service Cambridge University Press www.cambridge.org

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy