Problem 4
There is an integer . There are stations on a slope of a mountain, all at different altitudes. Each of two cable car companies, and , operates cable cars; each cable car provides a transfer from one of the stations to a higher one (with no intermediate stops). The cable cars of have different starting points and different finishing points, and a cable car which starts higher also finishes higher. The same conditions hold for . We say that two stations are linked by a company if one can start from the lower station and reach the higher one by using one or more cars of that company (no other movements between stations are allowed). Determine the smallest positive integer for which one can guarantee that there are two stations that are linked by both companies.
Step 2 of 8: Count the chains
In plain words
Adding one car joins two previously separate path components, so every car lowers the component count by exactly one.
Detailed analysis
Start with n² isolated stations, hence n² components. Each of the k cars joins two different components: a car cannot join vertices already in the same component, because that would create a directed cycle while altitude strictly increases. Consequently each car reduces the number of path components by one, and each company has n²-k chains.