Skip to main content
OlympiadHQ

Browse · MathNet

Print

Mongolian Mathematical Olympiad

Mongolia counting and probability

Problem

There were two parallel railways, on the first of which are stations and on the other are stations. A company constructed a new station between the railways and connected by railways the new station with the old ones. From an economical point of view, the company decided to close some railways between stations to have only railways. How many ways can it be arranged so that one could make a journey from any station to any other station? (proposed by B. Horoldagwa)

problem


problem


problem


problem


problem
Solution
It is equivalent to find number of spanning trees in the figure below.



Thus it is sufficient to find number of spanning trees of . Denote number of spanning trees of .



Let be edge of the graph . Now if we remove the edge then vertices and will coincide. Denote remaining graph. Spanning trees of are divided into two subsets that either contain or not.



Trees that do not contain are those trees of the graph remained after deleting from . Since spanning tree of such graph contains edge , number of spanning trees that do not contain equals to .

On the other hand, for those trees that contain , either or will be removed. Therefore number of spanning trees of equals to number of spanning trees of that do not contain . Number of spanning trees of equals to in case that removed and equals to in case that removed . However, we need to note that in case that both edges and are removed the number of the spanning trees may be counted 2 times. Therefore we get recurrence relation . It is easy to see and . Solving the recurrence relation we get and conclude that desired number equals to

---

Alternative solution.

II solution. (Due to MMO's 5 times winner B. Bayarjargal.)



Denote number of the possibilities of removing edges from edges. Let's divide stations into parts with length (where is number of stations in a part).



Since remaining graph must be connected, there is one edge from every part to and number of such possibilities equals to .

Therefore equals to the sum of all possible summands , where .

Let's consider generating function of the sequence : Since we get Finally, the desired number equals to .
Final answer
\frac{1}{5}\left(\left(\frac{3+\sqrt{5}}{2}\right)^n - \left(\frac{3-\sqrt{5}}{2}\right)^n\right)\left(\left(\frac{3+\sqrt{5}}{2}\right)^m - \left(\frac{3-\sqrt{5}}{2}\right)^m\right)

Techniques

Graph TheoryGenerating functionsRecursion, bijectionRecurrence relations