About this book

This text provides a theoretical background for several topics in combinatorial mathematics, such as enumerative combinatorics (including partitions and Burnside's lemma), magic and Latin squares, graph theory, extremal combinatorics, mathematical games and elementary probability. A number of examples are given with explanations while the book also provides more than 300 exercises of different levels of difficulty that are arranged at the end of each chapter, and more than 130 additional challenging problems, including problems from mathematical olympiads. Solutions or hints to all exercises and problems are included. The book can be used by secondary school students preparing for mathematical competitions, by their instructors, and by undergraduate students. The book may also be useful for graduate students and for researchers that apply combinatorial methods in different areas.

Solving combinatorial problems always requires knowledge of basic combinatorial configurations such as arrangements, permutations, and combinations. All of them are formed from the elements of the finite sets considered, for example, by taking sequences of the elements that belong to some sets or by taking subsets. In this chapter we shall define these combinatorial configurations and provide some examples and exercises.

In this chapter we shall introduce one more method for solving combinatorial counting problems that is based on generating functions. We shall also give some examples of the generating functions of certain sequences of positive integers that appear in combinatorial problems.

In this chapter we shall consider the representation of a given positive integer as a sum of positive integers, as well as the representation of a given finite set in the form of the union of pairwise disjoint sets. These representations will be called the partitions of positive integers and the partitions of finite sets. We shall be interested in counting the number of partitions that satisfy some additional conditions.

The simple problem of coloring fields of a square 2 × 2 using three colors is considered in Example 2.​7.​11, and the number of nonequivalent colorings is determined by direct counting. At the beginning of this section we shall formulate two more similar problems.

We shall start this chapter with two examples. The first one was formulated in 1736 by Leonard Euler. Now it is known as the Königsberg bridge problem and is usually considered to be the beginning of Graph Theory.

In this section we shall focus on graphs without cycles. A tree is a connected graph that has no cycles. A forest is a disconnected graph that has no cycles. It is obvious that any connected component of a forest is a tree.

A square table n × n filled with the positive integers 1, 2, …, n2 is called a magic square of ordern if the sum of all numbers in each row, the sum of all numbers in each column, and the sum of all numbers in the two main diagonals are equal to each other. This constant sum is called a magic sum. The magic sum of a magic square of order n is

The nim game is defined as follows. Suppose there are a few piles with a finite number of coins in each of them. Two players alternately take any number of coins from any single one of the piles. The winner is the player who removes the last coin (or the last few coins). Suppose now that two players, A and B, are playing the nim game, and that player A makes the first move. Is there a winning strategy for player A or B? If the answer to this question is yes, how should the player with a winning strategy play? Let us first consider some examples.

Digit c1 of the three-digit number c1c2c3 can be chosen arbitrarily from the set {1, 2, …, 9}. There are 9 possible choices of digit c2 such that c2 ≠ c1, and there are 8 possible choices of digit c3 such that c3 ≠ c1 and c3 ≠ c2. By the product rule it follows that the number of positive integers with the given properties is equal to 9 ⋅ 9 ⋅ 8 = 648.