Skip to main content
OlympiadHQ

Browse · MathNet

Print

Balkan Mathematical Olympiad Shortlisted Problems

counting and probability

Problem

There are cities in a country, where is a positive integer. Some pairs of cities are connected by (two-way) flights. For two cities and , a path is a sequence of distinct cities , such that there are flights between and for every , with and . A long path between and is defined as a path such that no other path has more vertices. Similarly, a short path is defined as a path with the fewest vertices. In particular, if and have a direct flight, that is the shortest path. Assume that for any pair of cities and in the country, there exist a long path and a short path between them that have no cities in common (except and ). For a given , find all possible numbers of flights in the country.

problem


problem
Solution
Use the obvious graph interpretation. We show that any such graph is one of the following: the full graph , the circular graph , and for even, the bipartite graph . First, we show that these graphs satisfy the condition. For , we can choose any long path and the short path is the edge. For , we have exactly two paths between any two vertices, and one of them has at most as many vertices as the other. * For , if the vertices are on different sides, the short path is the edge. Otherwise, take any long path. We observe that it alternates between the sides and begins and ends on one side. Therefore, there is a vertex on the other side that doesn't appear in the long path. Additionally, there is a short path that passes through this vertex. Next, we show that only these graphs work for large enough. The graph is clearly connected, as any two vertices belong to a path. Consider a longest path in the graph. Let be its length and denote the vertices in the path by in the corresponding order. We can assume that this path is the long path between and that has a corresponding short path through other vertices. We show that the edge belongs to the graph. If the edge doesn't exist, the short path has length at least two, implying that there is a vertex different from such that there exists an edge from to . Then the path has length , which gives a contradiction. Next we show that , i.e. that the cycle contains all the vertices. If there exists another vertex connected with an edge to a vertex , then the path has length , which gives a contradiction. Since the graph is connected, the cycle contains all vertices. For two vertices of the graph, we say that they have distance if there are exactly vertices between them on a side of the cycle. Observe that they also have distance . If we relabel the vertices by in such a way that we know the graph has of the edges (where ), then it also has the last one. This is shown same as before. Next, we show that if we have an edge between and , then we also have an edge between and . Assume . Consider the path

of length . As before, we conclude that there is an edge between and . Repeating this, we get that if we have an edge between two vertices at distance , then we have edges between any two vertices at distance . Define as the set of numbers such that the graph has the edges of distance . Note that . For positive integers and with , consider the ordering The distance between two consecutive vertices in this ordering is or . This implies that if two numbers from the multiset belong to , so does the third one. Now, if , we take and easily get that contains any number from to . This gives us the solution . Assume now . This implies that we do not have two consecutive numbers smaller than in . But as , we also have , so doesn't contain two consecutive integers. If , we get the solution . Otherwise, there exists such that . Consider the path of length .

Same as before, we get that there is an edge between and . Therefore, we have . Now, taking , we get that any odd number smaller than or equal to lies in . Since we assumed doesn't contain consecutive integers, we get that is even and . This gives us the solution . Finally, the number of edges can be , , and if is even it can also be .
Final answer
n, n(n−1)/2, and when n is even also n^2/4

Techniques

Graph TheoryColoring schemes, extremal arguments