In a country between every two cities there is a direct bus or a direct train line (all lines are two-way and they don't pass through any other city). Prove that all cities in that country can be arranged in two disjoint sets so that all cities in one set can be visited using only train so that no city is visited twice, and all cities in the other set can be visited using only bus so that no city is visited twice.
Solution
Let be the set of all cities in the country. We call a pair , where and are disjoint subsets of good if all cities in the set can be visited using only bus such that no city is visited twice and all cities in the set can be visited using only train such that no city is visited twice.
Let be a good pair such that the set has the maximal number of elements. If we prove , the statement of the problem holds.
Let us assume the opposite, i.e. there is a city which isn't from nor . Without loss of generality we can assume that and are non-empty, because otherwise we can transfer any city from a non-empty set to an empty one.
Let be the number of cities in the set , and the number of cities in the set . Let us arrange the cities from in the series such that every two consecutive cities in that series are connected by a direct bus line. Also, let us arrange the cities from in the series such that every two consecutive cities in that series are connected by a direct train line.
Since we assumed that the pair is maximal, the cities and have to be connected by train (otherwise the pair would be a good pair whose union would have more elements than ), and and have to be connected by bus (otherwise the pair would be a good pair whose union would have more elements than ).
The cities and have to be connected by bus or by train.
If and are connected by bus, let us put and . Then is a good pair and the number of elements of is greater than the number of elements of , which contradicts the assumption.
If and are connected by train, let us put and . Then is a good pair and the number of elements of is greater than the number of elements of , which contradicts the assumption.
Since all cases lead to contradiction, we conclude that the assumption was wrong and that every city is either in the set or in the set .