2017 AIME II Problem 11
Problem 11 of 15HarderCombinatorics
Five towns are connected by a system of roads. There is exactly one road connecting each pair of towns. Find the number of ways there are to make all the roads one-way in such a way that it is still possible to get from any town to any other town using the roads (possibly passing through other towns on the way).
Your answer
Integer from 0 to 999
Show solution
Solution
The assignment works if and only if no town has all four roads inbound or all four outbound. One direction is clear: an all-inbound town cannot be left, and an all-outbound town cannot be reached. Conversely, suppose every town has an inbound and an outbound road, yet town cannot be reached from town Let be the set of towns reachable from (including ) and the set of towns from which is reachable (including ). These sets are disjoint, every outbound road of a town in stays inside and every inbound road of a town in comes from inside Since has an outbound road, and similarly as one of the two sets has exactly two towns. If the outbound roads of and of must both stay inside forcing the single road between them to point both ways — a contradiction (and is symmetric).
Now count assignments with a bad town among the total. Choosing a town to be all-outbound ( ways) and orienting the remaining roads freely gives assignments, and there can be at most one all-outbound town. Similarly assignments have an all-inbound town. Assignments with both are counted twice: choose the all-outbound town (), the all-inbound town (), and the other roads freely, So assignments fail.
The number that work is
Tagged: graph theory · complementary counting · inclusion-exclusion