Each pair of communities in a county is directly linked by exactly one
mode of transportation: bus, train, or plane. All three modes of
transportation are used with no community being serviced by all three and
no three communities being linked pairwise by the same mode. What is the
largest number of communities possible under these conditions?
Source: USA Mathematical Olympiad
What if the same conditions as above hold except that no four
communities can be linked pairwise by the same mode?