Maths Olympiad Prep

Library / /231 of 397

, 2021

Combinatorics Difficulty 6.1 National Olympiad Prove it Taiwan

Let knk \le n be two positive integers. IMO-nation has nn villages, and some pairs of villages are connected by a road. For any two villages, the distance between them is defined as the minimum number of roads one needs to travel to get from one village to the other; if it is completely impossible to travel from one village to the other, then the distance between these two villages is defined to be infinite.
Alice, who just arrived IMO-nation, is doing her quarantine in some place, so she does not know the configuration of roads, but she knows nn and kk. She wants to know whether the furthest two villages have finite distance. To do so, for every phone call she dials to the IMO office, she can choose two villages, and ask the office whether the distance between them is larger than, equal to, or smaller than kk. The office answers faithfully (infinite distance is larger than kk.) Prove that Alice can know whether the furthest two villages have finite distance between them in at most 2n2/k2n^2/k calls.

Solution

Let GG be the graph corresponding to IMO-nation, and let d(u,v)d(u,v) be the distance between uu and vv. Consider the following strategy.

1. Arbitrarily choose a village vv, and let S={v}S = \{v\}.

2. For every uvu \ne v, make one phone call asking for the distance between uu and vv.

3. If there exists vv' such that minsSd(v,s)k\min_{s \in S} d(v', s) \ge k, and there exists sSs \in S such that d(v,s)=kd(v', s) = k, then let S=S{v}S = S \cup \{v'\}, change vv to vv', and return to step 2.

4. Check whether every village is at distance at most kk from some sSs \in S; if so, report that GG is connected. Otherwise, report that GG is not connected.

First we prove that this algorithm indeed determines whether GG is connected. Denote by S0S_0 the set SS at the end of the algorithm. By step 3, the points in S0S_0 must all belong to the same connected set (this can be proved by induction), so if step 4 reports that GG is connected, then GG is indeed connected. Conversely, if step 4 reports that GG is not connected, this means there exists uu such that minsS0d(u,s)>k\min_{s \in S_0} d(u, s) > k. Suppose that GG is in fact connected; then for any vS0v \in S_0, there must exist a shortest path from uu to vv, and its length is greater than kk. Moreover, on this path there must exist a point ww whose distance to a point in SS is at most kk. But then, at step 3, we should have obtained v=wv' = w and returned to step 2, so the algorithm would not yet have ended, a contradiction. Hence the algorithm reports that GG is connected if and only if GG is indeed connected.

Next we prove that the number of phone calls required by this algorithm is at most 2n2/k2n^2/k. Note that we only make nn phone calls in step 2, and step 2 is repeated at most S0|S_0| times, so it suffices to prove that S02n/k|S_0| \le 2n/k. This is obvious when S0=1|S_0| = 1, so assume S02|S_0| \ge 2. Consider the connected set CC in which S0S_0 lies, and suppose C=m|C| = m. Consider a spanning tree on CC, and consider an Euler tour v1,,v2(m1)v_1, \dots, v_{2(m-1)} on this tree. Then we can certainly choose i1<i2<<iS0i_1 < i_2 < \dots < i_{|S_0|} such that S0={vi1,vi2,,vik}S_0 = \{v_{i_1}, v_{i_2}, \dots, v_{i_k}\}.

Now, since vijv_{i_j} and vij+1v_{i_{j+1}} are two distinct elements of S0S_0, by step 3 the distance between the two points is at least kk, and hence ij+1ijki_{j+1} - i_j \ge k. This shows that viSi1k(S01)|v_{i_S} - i_1| \ge k(|S_0| - 1). Also note that we may set vi+2(m1)=viv_{i+2(m-1)} = v_i, and consider the path starting from viS0v_{i|S_0|} to vi1+2(m1)v_{i_1+2(m-1)}; this distance likewise must be at least kk, that is, i1+2(m1)S0ki_1 + 2(m-1) - |S_0| \ge k. Combining the two inequalities, we obtain kS02(m1)<2nk|S_0| \le 2(m-1) < 2n, so S0<2n/k|S_0| < 2n/k. This completes the proof.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from zh; metadata (topic, difficulty) added by this project.