8
NZ Math Olympiad Training Programme 2004 Assignment 2: Combinatorics Problems & Solutions 1. In a rectangular m × n table the number of columns n is at least the number of rows m. This table is filled with zeros and ones in such a way that no two rows are equal. Prove that it is possible to cross out one of the columns so that no two rows will be equal again. Solution: Let us denote the table as T . We will prove the statement by induction on m. For m = 2, the statement is obvious because there is a column in T where the two rows differ and there is at least one other column, which can be removed. Suppose m> 2. Remove the first column of T to obtain T 1 . If all rows of T 1 are still different, there is nothing to prove. If not, remove those rows of T , which repeat, leaving in a new table T 2 the rows of T 1 without repetitions. The table T 2 has k m1 rows and at least m1 columns. We use induction hypothesis to find a column that can be removed leaving all rows different. This column can be also removed from the original table T . 2. 22 points are chosen from the 7 × 7 grid of points (i, j ), where 1 i 7 and 1 j 7. Prove that four of the chosen points are the vertices of a rectahgle with horizontal and vertical sides. Show that this might not be the case, if 21 vertices are chosen. Solution: Let n i be the number of points chosen from row i. Then 7 i=1 n i 2 = 7 i=1 n i (n i 1) 2 7 22 7 ( 22 7 1) 2 = 23 4 7 by Jensen’s inequality. (The function f (x)= x(x 1)/2 is convex.) Since 23 4 7 > 21 = ( 7 2 ) , the desired rectangle exists. The following set of 21 points do not satisfy the property: (1, 1) (1, 2) (1, 3) (2, 3) (2, 4) (2, 5) (3, 1) (3, 5) (3, 6) (4, 1) (4, 4) (4, 7) (5, 2) (5, 5) (5, 7) (6, 3) (6, 6) (6, 7) (7, 2) (7, 4) (7, 6). 3. Prove that for n 5, every graph with n vertices and n 2 /4 +2 edges contains a bowtie (i.e., two triangles with exactly one vertex in common). 1

combinatorics_matholympiadtraining'04.pdf

Embed Size (px)

Citation preview

Page 1: combinatorics_matholympiadtraining'04.pdf

NZ Math Olympiad Training Programme 2004

Assignment 2: Combinatorics

Problems & Solutions

1. In a rectangular m × n table the number of columns n is at least thenumber of rows m. This table is filled with zeros and ones in such away that no two rows are equal. Prove that it is possible to cross outone of the columns so that no two rows will be equal again.

Solution: Let us denote the table as T . We will prove the statementby induction on m. For m = 2, the statement is obvious because thereis a column in T where the two rows differ and there is at least oneother column, which can be removed. Suppose m > 2. Remove the firstcolumn of T to obtain T1. If all rows of T1 are still different, there isnothing to prove. If not, remove those rows of T , which repeat, leavingin a new table T2 the rows of T1 without repetitions. The table T2 hask ≤ m−1 rows and at least m−1 columns. We use induction hypothesisto find a column that can be removed leaving all rows different. Thiscolumn can be also removed from the original table T .

2. 22 points are chosen from the 7×7 grid of points (i, j), where 1 ≤ i ≤ 7and 1 ≤ j ≤ 7. Prove that four of the chosen points are the verticesof a rectahgle with horizontal and vertical sides. Show that this mightnot be the case, if 21 vertices are chosen.

Solution: Let ni be the number of points chosen from row i. Then

7∑

i=1

(ni

2

)=

7∑

i=1

ni(ni − 1)

2≥ 7

227(22

7− 1)

2= 23

4

7

by Jensen’s inequality. (The function f(x) = x(x − 1)/2 is convex.)Since 234

7> 21 =

(72

), the desired rectangle exists.

The following set of 21 points do not satisfy the property:

(1, 1) (1, 2) (1, 3) (2, 3) (2, 4) (2, 5) (3, 1)(3, 5) (3, 6) (4, 1) (4, 4) (4, 7) (5, 2) (5, 5)(5, 7) (6, 3) (6, 6) (6, 7) (7, 2) (7, 4) (7, 6).

3. Prove that for n ≥ 5, every graph with n vertices and �n2/4� + 2edges contains a bowtie (i.e., two triangles with exactly one vertex incommon).

1

Page 2: combinatorics_matholympiadtraining'04.pdf

Solution: It is easy to check directly that any graph with 5 verticesand 8 edges has a bowtie. This gives us a basis for the induction.Given a graph with n > 5 vertices, we delete any vertex of smallestdegree together with all edges connecting this deleted vertex with othervertices.

Let us assume first that n = 2k. We note that k > 2 Then �n2/4� =k2 + 2. The minimal degree dmin then will be at most

dmin ≤⌊

2(k2 + 2)

2k

⌋=

⌊k2 + 2

k

⌋= k.

Therefore there will be at least k2+2−k edges left. But �(n − 1)2/4�+2 = k2−k+2 and the statement is true due to the induction hypothesis.

Now let n = 2k+1. Then �n2/4� = k2+k+2 and �(n − 1)2/4� = k2+2.The minimal degree dmin then will be in this case at most

dmin ≤⌊

2(k2 + k + 2)

2k + 1

⌋= k +

⌊k + 4

2k + 1

⌋= k.

For k > 3 we obtain dmin ≤ k and the induction goes smoothly as inthe first case. The case k = 3, i.e. n = 7 is a special case. In thisspecial case every vertex must have degree 4. My proof of this case ishighly inelegant. I had hoped that some of you will come up with anicer proof but this does not seem to have happened. I will think a bitmore then.

4. A regular hexagon is partitioned into 24 regular triangles as shown

At each of the 19 vertices of this grid a number is written so that notwo numbers are equal. In some of these triangles the number at thevertices increase anticlockwise if we start from a particular vertex, insome these numbers decrease. Prove that, no matter how the numberswere chosen, there will be always at least seven triangles of each type.

Solution: If in a certain triangle the numbers at the vertices increaseanticlockwise (starting from a particular vertex), we will call such atriangle right triangle, otherwise we will call it left.

2

Page 3: combinatorics_matholympiadtraining'04.pdf

For each edge with the numbers a, b written at its vertices we draw anarrow directed to the left of the segment if we travel it from the smallernumber to the larger one (see the picture)

b

a

a < b

Among 12 arrows drawn to the sides of the hexagon, at least one isdirected inside, otherwise for numbers a1, . . . , a12, written at verticesof the hexagon, we will have a1 < a2 . . . < a12 < a1. 30 more arrowsdrawn to the internal segments will be also inside the hexagon so weget at least 31 arrow inside. If the triangle is right, we have two arrowsinside it and one if it is left. Let n be the number of right trianglesand m be the number of left triangles. Then, counting triangles, weget n+m = 24 and, counting arrows, we get 2n+m = 31. Subtractingwe get n ≥ 7. Similarly m ≥ 7.

5. Two people play a game on a n × n board. A counter is placed inthe bottom left hand square, and players take turns to move it into asquare with which it shares a side. Players cannot move the counterinto a square it has previously occupied, and the loosing player is theone who cannot move. Who has the winning strategy?

Answer: The first player, if n is even and the second, if n is odd.

Solution: It is easy to show that in the even case the whole board canbe covered with dominoes, and in the even case we can cover the wholeboard without initial square. In the even case the winning strategy ofthe first player is to make a move inside the domino that covers theinitial square. The second player will move to another domino and thefirst player should move inside that domino too. The second player willalways start a new domino and the first player will always have a moveinside that new domino, so he never looses. In the odd case the firstplayer starts a certain domino and now the second player can make amove inside it. It is now the first player who will always start a newdomino and eventually loose.

3

Page 4: combinatorics_matholympiadtraining'04.pdf

6. The sequence (an) is given recursively by a0 = 1 and

n∑

k=0

akan−k = 1, n ≥ 1. (1)

Find the formula for an.

Solution: Let G(x) = a0 + a1x + . . . + anxn + . . . be the generating

function for this sequence. Then (??) tells us that

G(x)2 = 1 + x + x2 + . . . =1

1 − x,

hence G(x) = (1 − x)−1/2. Now

an = [xn](1 − x)−1/2 = (−1)n

(−12

n

)= (−1)n−1

2(−1

2− 1) . . . (−1

2− n + 1)

n!

Simplifying the RHS we obtain an = 4−n(2nn

).

7. Each cell of a hexagonal grid is a hexagon with the sidelength 1.

A beetle moves along the lines of the grid between two vertices A and Btravelling a distance of 100. It is known that it is the shortest possibleway for him to get from A to B. Prove that half of his way he movedin one of the possible six directions.

Solution: Let us choose two opposite directions and call them hori-zontal.

4

Page 5: combinatorics_matholympiadtraining'04.pdf

a

b

Let a and b be two neighboring horizontal segments, i.e. such segmentsof the path between which the beetle crawls in four other directions.Then the beetle cannot crawl a and b in the opposite directions, oth-erwise his path can be shortened as shown by dashed lines.

Hence, after crawling a horizontal segment a from left to right, the nexthorizontal segment will be crawled from left to right as well. This willbe one of the segments b1, b2, . . . , bn, . . . shown in the following picture.

b5

b1

b2

b3

b4

a

We note that there will be an odd number of segments between aand bi, hence the numbers of all horizontal segments have the sameparity. We will also have two other groups of segments all having thesame direction: those which make angle 60◦ with horizontal segmentsand those making 120◦. Therefore either all even segments or all oddsegments have the same direction and there are exactly 50 of them.

8. Given k ≥ 1, let an be the number of 0-1 strings of length n that donot have k consequtive zeros, and let bn be the number of 0-1 strings oflength n that have neither k+1 consequtive zeros nor k+1 consequtiveones. Prove that bn+1 = 2an.

5

Page 6: combinatorics_matholympiadtraining'04.pdf

9. Map (x1, . . . , xn) to (0, y1, . . . , yn) by setting yi = yi−1 if xi = 0 (weconsider that y0 = 0) and yi �= yi−1 if xi = 1. This mapping is a bi-jection from the set of all 0-1 strings of length n with no k consecutivezeros onto the set of all 0-1 strings of length n+1 with no k+1 consec-utive zeros and no k + 1 consecutive ones. Thus there are an of thesestrings. There are another an such strings of the type (1, y1, . . . , yn),and the result follows.

10. (Shortlist, 2003) Every point with integer coordinates in the plane isthe centre of a disc with radius 1/1000.

(a) Prove that there exists an equilateral triangle whose vertices liein different discs;

(b) Prove that every equilateral triangle with vertices in different discshas sidelength greater than 96.

Solution: (a) We will look for an equilateral triangle with vertices(0, 0), (2a, 0), (a, a

√3), where a is an integer. The first two vertices

have integer coordinates for any a, the first coordinate of the thirdvertex is also an integer. Let us show that it is possible to choose sucha that a

√3) is within distance 0.001 from an integer. For this, let us

consider the function {x} = x − �x� called the fractional part of x.Splitting the interval [0, 1] into 1000 intevals of equal lehgth, by thepigeonhole principle we can find two integers 0 ≤ n1 < n2 ≤ 1000 suchthat |{n2

√3}−n1

√3| < 0.001. Then for a = n2 −n1 and some integer

m we get |a√

3 − m| < 0.001. This is the integer a sought for.

(b) Let P ′Q′R′ be a triangle such that P ′Q′ = Q′R′ = R′P ′ = � ≤ 96and P ′, Q′, R′ lie in discs with centres P, Q,R, respectively. Then

� − 0.002 ≤ PQ, QR, RP ≤ � + 0.002.

Since PQR is not an equilateral triangle, we may assume that PQ �=QR. At the same time

|PQ2 − QR2| = (PQ + QR)|PQ − QR|

≤ 2(� + 0.002) · 0.004 ≤ 2 · 96.002 · 0.04 < 1.

However, PQ2 − QR2 is an integer. This contradiction proves thestatement.

11. (Shortlist, 2003) Let f(k) be the number of integers n that satisfy thefollowing conditions:

6

Page 7: combinatorics_matholympiadtraining'04.pdf

(a) 0 ≤ n < 10k, so n has exactly k decimal digits (leading zerosallowed);

(b) The digits of n can be permuted in such a way that this operationyields an integer divisible by 11.

Prove that f(2m) = 10f(2m − 1) for every positive integer m.

Solution: We use the notation ak−1ak−2 . . . a0 to denote the numberwith digits ak−1, ak−2, . . . , a0, i.e.

ak−1ak−2 . . . a0 = ak−110k−1 + ak−210k−2 + . . . + a0.

Let us fix a positive integer m and denote the sets Ai and Bi as follows.

• Ai is the set of all integers n with the following properties:

(a) 0 ≤ n < 102m, i.e. n has 2m digits;

(b) The rightmost 2m−1 digits of n can be permuted so that theresulting integer is congruent to i modulo 11.

• Bi is the set of all integers n with the following properties:

(a) 0 ≤ n < 102m−1, i.e. n has 2m − 1 digits;

(b) The digits of n can be permuted so that the resulting integeris congruent to i modulo 11.

It is clear that f(2m) = |A0| and f(2m − 1) = |B0|. Since 99 · · · 9︸ ︷︷ ︸2m

≡ 0

(mod 11), we have

n ∈ Ai ⇐⇒ 99 · · · 9︸ ︷︷ ︸2m

−n ∈ A−i.

Hence

|Ai| = |A−i|. (2)

Since 99 · · · 9︸ ︷︷ ︸2m−1

≡ 9 (mod 11), we have

n ∈ Bi ⇐⇒ 99 · · · 9︸ ︷︷ ︸2m−1

−n ∈ B9−i.

Thus

|Bi| = |B9−i|. (3)

7

Page 8: combinatorics_matholympiadtraining'04.pdf

For any 2m-digit integer n = ja2m−2 . . . a0, we have

n ∈ Ai ⇐⇒ a2m−2 . . . a0 ∈ Bi−j.

Hence |Ai| = |Bi|+|Bi−1|+ . . .+|Bi−9|. Since Bi = Bi+11, this can be writtenas

|Ai| =10∑

k=0

|Bk| − |Bi+1|, (4)

hence

|Ai| = |Aj| ⇐⇒ |Bi+1| = |Bj+1|, (5)

From (??), (??), and (??), we obtain |Ai| = |A0| and |Bi| = |B0|. Substitut-ing this into (??), yields |A0| = 10|B0|, and f(2m) = 10f(2m − 1).

8