Elements of Combinatorics
[66/76%].
Find the sum .
Pascal's rule. if .
\begin{Bmatrix} \end{Bmatrix} n+1 \\ k+1 \end{Bmatrix} = (k+1)\begin{Bmatrix} \end{Bmatrix} n \\ k+1 \end{Bmatrix} + \begin{Bmatrix} \end{Bmatrix} n \\ k \end{Bmatrix}. Here \begin{Bmatrix} \end{Bmatrix} n \\ k \end{Bmatrix} is the number of partitions of an -element set into parts (i.e. nonempty subsets); partitions are considered unordered, i.e. the partition of the set into the parts and and the partition of the same set into the parts and are considered the same. Cf. Problem 1.4.7(5).
The numbers \begin{Bmatrix} \end{Bmatrix} n \\ k \end{Bmatrix} are called Stirling numbers of the second kind; for more on them see, for example, [GKP, p.287].
How many subsets of the set contain no two consecutive numbers?
The same for three consecutive numbers.
.
The binomial theorem. .
Find the sums:
;
;
;
;
;
;
;
.
Find .
Find .
Find .
In the answer, use only integer-valued functions of an integer argument.
Denote by Euler's totient function, i.e. the number of integers from 1 to that are coprime to .
Find the number of integers not exceeding 1001 and not divisible by any of the numbers 7, 11, 13.
Find , where is a prime number and .
, where is the canonical prime factorization of .
On the floor of a room of area there are three carpets (of arbitrary shape), each of area . Then the area of the intersection of some two carpets is at least .
There are five patches (of arbitrary shape) on a caftan. The area of each of them is greater than half the area of the caftan. Then the area of the common part of some two patches is greater than one fifth of the area of the caftan.
Consider subsets of a finite set . By definition, put .
Suppose the number depends only on the size of the index set , and not on the set itself. Then
Let . In particular, . Then
Bonferroni inequalities. For any , ,
This section offers problems of the following type: given a finite set and a collection of properties (subsets) , , it is required to find the number of elements that have at least one of the properties (i.e., ), or the number of elements that have none of the properties (i.e., ).
For this purpose two versions of the inclusion--exclusion formula are used (see Problem 1.2.3(2)). Moreover, if in all intersections of sets of the collection the number of elements depends only on the number of sets being intersected, the formula can be simplified (see Problem 1.2.3(1)).
In Problems 1.2.4(1) and 1.2.5 it is assumed that the answer is written in the form of a sum (similar to the inclusion--exclusion formula).
There are 10 distinct books on a shelf.
In how many ways can they be rearranged so that no book remains in its place?
The number of permutations of the books in which exactly 4 books remain in place is greater than 50000.
In how many ways can 20 tourists be accommodated in 5 distinct cabins so that no cabin is empty?
How many distinct surjections are there?
Prove the following formula:
If the sum of real numbers equals , then there is a summand not greater than , and also a summand not less than .
If the sum of integers is greater than for some integer , then there is a summand not less than .
If the sum of integers is less than for some integer , then there is a summand not greater than .
Statement 1.3.1(1) is used in solving problems; see, for example, Problem 1.3.9. Its ``discrete analogue'', Statement 1.3.1(2), is called the pigeonhole principle and is often formulated as follows: for any distribution of or more objects into boxes, some box will contain at least objects.
Methodologically, it would be more correct [MS, Glossary, entry estimate''] to call Sec.1.3 Estimates by contradiction''. However, we have chosen the title by which most readers will be able to form the clearest idea of the content of this section.
A bag contains 32 red balls, 29 green balls, 45 blue, 17 yellow, and 30 each of white, black and gray. What is the smallest number of balls one must take so that among them there are certainly balls
of all 9 colors?
of 7 colors?
Among the 7-digit numbers ending in 3 fives, there are at least 1200 numbers having the same remainder upon division by 7.
For each 4-digit number, the sum of the digits of its square was computed. Prove that there are at least 1200 numbers for which the computed sums give the same remainder upon division by 7.
Among the numbers written using only ones, there is a number divisible by 1997.
Suppose integers are written in a row. Prove that one can select one or several consecutive ones among them whose sum is a multiple of .
Among any real numbers there are two whose fractional parts differ by at most .
Integers are placed in a table, and any two numbers in cells adjacent by a side differ by at most 5. Prove that among these numbers there are two equal ones.
Let be an arbitrary irrational number.
For any positive integer there exist coprime such that and
There exist infinitely many pairs of coprime numbers for which
Remark. In the formulation of Statement 1.3.6(2) one can get rid of coprimality, since for each fraction satisfying the inequality , there exist only finitely many integers such that .
The natural numbers from 1 to 101 are written in some order. Prove that this sequence contains either an increasing or a decreasing subsequence of length 11.
A subsequence is what is obtained from a sequence by deleting some of its terms.
There are 10 apples, each weighing at most 100 g, and two identical plates. Prove that one can put on the plates
several apples so that the weights on the plates differ by less than 1 g.
the same number of apples on each plate so that the weights on the plates differ by less than 2 g.
Here at least one apple must lie on the plates, but not all the apples have to lie on them (and in part (1) it is not required that each plate hold at least one apple).
For any vectors of length 1 in the plane there exists a tuple such that
,
.
Place several knights on a chessboard so that each of them attacks four others.
The 33 letters of the Russian alphabet are encoded by sequences of zeros and ones.
What is the least sequence length for which the encoding can be made unambiguous?
If an error in at most one digit is possible when a message is received, i.e., if the codes of different letters must differ in at least three digits, then 8 digits are not enough.
If an error in at most two digits is possible, then 10 digits are not enough.
Find the least number of digits sufficient for the encoding from part (2).
For fixed , the number is maximal at .
Best in their own ways. schoolchildren took part in a mathematical olympiad. It turned out that for any two schoolchildren and there was a problem that solved and did not solve, and a problem that solved but did not solve. What is the least possible number of problems under this condition? In other words, find the least possible for which there exists a family of subsets of an -element set such that no subset of the family is (properly) contained in another.
There is a board with lit bulbs. Each switch can be connected to some of the bulbs. When the button of a switch is pressed, the bulbs connected to it change their state: lit bulbs go out and unlit ones light up. What is the least number of switches needed so that any set of bulbs can be lit (the bulbs not in this set must not be lit)?
On the first day of his reign, a king organizes parties among his subjects. On the second day, an adviser brings the king a list of surnames of some of the subjects (on the first day this list is unknown). On the third day, the king may choose several parties and send to prison all the subjects who are members of each of them. What is the least number of parties that must be organized on the first day so that on the third day it is certainly possible to send to prison all the subjects from the list brought by the adviser (and only them)?
The following important construction is useful (though not necessary) for solving the problems above (and many others). Draw points corresponding to all subsets of the set . Place the points corresponding to -element sets on the -th level. Join by an arrow those of them that are obtained from each other by adding one element. Then points joined by an arrow lie on adjacent levels. The resulting graph is called the -dimensional cube. Its vertices correspond to vectors from .
The definition of the set is given at the beginning of Sec.7.1.
A subset is called a linear subspace if for any (not necessarily distinct). In other words, a linear subspace is a family of subsets of an -element set which, together with any two subsets, contains their symmetric difference (i.e., their sum modulo 2).
Every linear subspace contains the zero vector .
The number of elements in any linear subspace is a power of two.
Denote by the number of linear subspaces of consisting of elements (such linear subspaces of are called -dimensional).
Find for .
Find for .
, .
.
.
Find .
Find .
Solving this problem requires some notions introduced at the beginning of Sec.7.1.
The notation denotes the sum over all positive divisors of .
Define the Möbius function as follows:
Find the sum of the values of the Möbius function over exactly those divisors of whose canonical factorization contains an even number of prime factors.
The Möbius inversion formula. Let be an arbitrary function, and let . Then the following formula holds:
Euler's totient function is defined in Sec.1.2 (Problem 1.2.1).
Find the sum .
.
Note that by applying the Möbius inversion formula (Problem 1.5.1(3)) to the function , one can prove the formula for in a slightly different way (see Statement 1.2.1(3)).
Indeed, using Statements 1.5.2(1, 2), we obtain:
Denote by the number of ways to color a carousel of cars in colors, i.e. the number of colorings of the vertices of a regular -gon in colors, where colorings that coincide after a rotation are considered indistinguishable. Here
-
a coloring need not use all the colors;
-
the colors are distinguishable: for example, the colorings RRRY and YYYR are different.
Let us give a more formal definition. For any coloring of a carousel, one can ``break'' the carousel between any two cars and write down the resulting sequence of colors (a coloring of a train), starting from the break point and going clockwise. For example, the following sequences correspond to the same coloring of a carousel:
On the other hand, from every sequence of colors one can obtain a coloring of a carousel by ``gluing'' its beginning and end in the proper way.
The cyclic shift of a sequence is the sequence . A coloring of a carousel (or, in more learned terms, a cyclic sequence) is an equivalence class of sequences up to cyclic shift.
Thus, is the number of cyclic sequences of length whose elements are the numbers .
Find for .
.
The period of a sequence is the smallest positive integer such that cyclic shifts map the sequence to itself. The period of a carousel is defined similarly.
The period of a sequence divides its length.
If divides , then the number of sequences of length and period equals the number of sequences of length and period .
Denote by the number of sequences of length and period whose elements are the numbers .
Find .
Express in terms of all , where .
.
. (A simpler proof of this formula is given in Sec.1.9, Problem 1.9.4(1).)
Find the number of distinct colorings of a carousel of cars in colors in which
color occurs times for each (here a formula with summation over divisors, analogous to 1.5.5(3), is accepted as an answer);
exactly 4 of the given colors are present.
21 nine-element subsets of a 30-element set are given. Then some element of the 30-element set is contained in at least seven of the given subsets.
A committee met 40 times. Exactly 10 people were present at each meeting, and no two of them were together more than once. Then the committee has at least 60 members.
In a company, any two people who are acquainted with each other have exactly 5 common acquaintances (other than themselves). Then the number of pairs of mutually acquainted people in the company is divisible by 3.
Denote by the number of permutations of the set of positive integers from 1 to that leave exactly numbers in place. Then .
Let be an arbitrary family of -element subsets of an -element set.
If and every -element subset of the -element set is contained in some subset from , then .
The number of -element subsets of the -element set that are entirely contained in at least one of the subsets of the family is at least .
On the planet Mars, 100 countries are united into blocs, each of which contains at most 50 countries. It is known that any two countries belong together to at least one bloc. Find the minimum possible number of blocs. (Cf. Problem 1.6.2(1).)
Exactly 19 vertices of a regular 97-gon are painted white, and the remaining vertices are painted black. Then the number of isosceles monochromatic triangles with vertices at vertices of the 97-gon does not depend on the way of coloring. (A triangle is monochromatic if all its vertices are either white or black.)
Let numbers and a set of points in the plane be given. If no three points of the set lie on one line and for every point there exist at least distinct points of the set equidistant from , then .
Every set of distinct positive integers contains a subset of more than numbers in which there are no three numbers such that the sum of two of them equals the third.
In a firm, for each of 100 kinds of work there are exactly 8 specialists. Each employee must be given a day off on Saturday or on Sunday. Prove that this can be done so that on both Saturday and Sunday, for each kind of work, a specialist in it is at work.
Clearly, for a given number of specialists (in Problem 1.6.7, ) and a small number of kinds of work, the days off can always be distributed in this way. But for a large number of kinds of work this may no longer be possible. In Problem 1.6.8 we find an asymptotic lower bound for such a number .
Here is a more learned formulation of (a generalization of) Problem 1.6.7. There are subsets of some set, each of which contains exactly elements. Then the elements of this set can be colored in two colors so that none of the subsets is monochromatic. Cf. Problem 6.2.1(1).
If for some even
then in an -element set one can find subsets of elements each such that for any coloring of the elements of this set in two colors at least one of these subsets is monochromatic.
There exists such that for any there exist -element subsets of some set, at most in number, such that for any coloring of the elements of this set in two colors one of these subsets is monochromatic.
Fifteen schoolchildren sit on fifteen numbered chairs. Every minute a kind teacher reseats them according to the following scheme:
After how many minutes will all the schoolchildren be back in their original seats for the first time?
A permutation of a set is a listing of the elements of this set in an arbitrary order. More rigorously, a permutation of a set is a one-to-one mapping of this set onto itself (i.e., a bijection). It is convenient to depict a permutation as a directed graph whose vertices are the elements of the set and whose edges go from the vertex to the vertex . The permutation of the set that takes to is written in the form
usually for all . The inverse permutation of is the permutation written in the form
A cycle (of length ) is a permutation of the form
This permutation is briefly denoted by .
The composition of permutations and is the permutation defined by the formula .
Find the compositions of permutations of the set of digits
;
;
;
;
;
;
.
Give the answer as a composition of disjoint cycles. For example, .
From now on, the composition sign is omitted.
For every permutation there exists for which (i.e., for which, after the -fold application of the permutation , every element is mapped to itself).
The order of a permutation is the least for which .
Do there exist permutations of a 9-element set of orders ?
What is the order of a composition of disjoint cycles of elements, respectively?
The permutations of an -element set from Problem 1.7.5 are called permutations of type . For example, the permutations , are of type , while the permutation is of a different type, .
Find the number of permutations of type
;
;
.
Every permutation can be represented as a composition of
disjoint cycles;
transpositions, i.e., permutations each of which swaps some two elements and leaves the rest in place (in other words, cycles of length 2);
transpositions , .
Find two permutations whose compositions yield every permutation of an -element set.
Permutations and are called conjugate if for some permutation .
Permutations and are conjugate if and only if their types are the same.
Let and be arbitrary permutations of an -element set. Then
In other words, the cycle decomposition of the permutation is obtained from the cycle decomposition of the permutation by replacing each element with its -image: if , then
Find for and .
Can every permutation be represented as a composition of several cycles of length 3?
Can every permutation be represented as a composition of an even number of transpositions?
The 15 puzzle. A square box of size holds 15 square tiles of size numbered , and one place is left empty. Initially the tiles are arranged as in the figure on the right. Is it possible, by successively sliding tiles into the empty place, to obtain the arrangement of tiles in the figure on the left?
How does the parity of a cycle of length depend
on the order in which the elements of the cycle follow one another?
on ?
The composition of an even (odd) permutation and a transposition is odd (even).
How can one determine the parity of a composition of permutations, knowing the parities of the factors?
Each of the following conditions is equivalent to the permutation being even:
The permutation can be represented as a composition of an even number of transpositions.
Every representation of the permutation as a composition of transpositions contains an even number of them.
The permutation can be represented as a composition of several cycles of length 3.
Which permutations of an -element set are more numerous: even or odd ones?
What is the minimal number of transpositions into which a permutation of an -element set consisting of disjoint cycles of length greater than 1 can be decomposed?
A permutation is generated by permutations if , where for every there exists such that .
The set of all even permutations of a finite set is generated by any pair of cycles (each of length at least 2) that have exactly one common element and contain all elements of the set.
If is even, , , then the cycles and generate all permutations of the set .
If is odd, , , then the cycles and generate all even permutations of the set and only them.
Colorings that can be carried into each other by a rotation of space (i.e., by an orientation-preserving motion of space) are considered the same (except in part(3) below).
How many
colorings of the unlabeled faces of a cube in red and gray are there?
distinct (i.e., non-isomorphic) undirected graphs with 4 unlabeled vertices are there?
colorings of the unlabeled vertices of a regular tetrahedron in colors are there? Here colorings that can be carried into each other by a motion of space (not necessarily orientation-preserving) are considered the same.
colorings of the vertices of the complete graph on 4 unlabeled vertices in colors are there? Here colorings that can be carried into each other by a permutation of the vertices (i.e., an automorphism) of this graph are considered the same.
For a prime , find the number of closed oriented connected -segment polygonal lines (possibly self-intersecting) passing through all vertices of a given regular -gon. Polygonal lines that can be carried into each other by a rotation are indistinguishable.
Find the number of colorings of a carousel of unlabeled cars in colors (i.e., the number of colorings of the vertices of a regular -gon in colors, if colorings that can be carried into each other by a rotation are indistinguishable) for
;
;
.
Find the number of:
colorings of a carousel of cars in colors (see the formalization and another solution in Sec.1.5, Problem 1.5.5);
-colored necklaces of beads (necklaces are considered the same if they can be carried into each other either by a rotation about the center of the necklace or by an axial symmetry of the necklace);
colorings of the unlabeled faces of a cube in colors;
colorings of the unlabeled vertices of a cube in colors;
colorings of the unlabeled vertices of the graph (Sec.2.1) in colors. Colorings are considered the same if they can be carried into each other by an automorphism of this graph.
Hint for parts(2)--(5): if you get stuck, read on (Problems 1.9.5--1.9.7).
List all rotations of a cube (i.e., rotations of space that map the cube to itself).
Let us call a coloring of the numbered faces of a cube a frozen coloring. (Then there are frozen colorings in total.)
For each rotation of the cube, find the number of frozen colorings that are mapped to themselves by the rotation .
Find the number of pairs such that is a rotation of the cube and is a frozen coloring that is mapped to itself by the rotation .
, where is the number of rotations of the cube that map the frozen coloring to itself, and the summation is over all frozen colorings .
If there exists a rotation taking a frozen coloring to a frozen coloring , then the number of such rotations equals .
For frozen colorings and that are taken to each other by some rotation, .
(These equal numbers are denoted by , where is the corresponding coloring of the unnumbered faces of the cube.)
, where is the number of frozen colorings corresponding to the coloring , and the summation is over all colorings of the unnumbered faces.
equals the number of rotations of the cube for any coloring .
How can one state a general result that could be applied instead of repeating the outlined solutions of Problems 1.9.4(1, 3)?
Let a finite set and a family of transformations of this set be given, closed under composition and under taking inverses. Call elements of the set equivalent if one can be taken to the other by one of the given transformations. Then the number of equivalence classes equals , where is the number of elements of the set that the transformation maps to themselves.
Find the number of graphs with vertices up to isomorphism. (The answer may be left in the form of a sum.)
Find the number of maps up to permutation of the variables.
Prove that exists, and find this limit.