Problem

Source: Russian TST 2019, Day 9 P1 (Groups A & B)

Tags: graph theory, combinatorics



The shores of the Tvertsy River are two parallel straight lines. There are point-like villages on the shores in some order: 20 villages on the left shore and 15 villages on the right shore. We want to build a system of non-intersecting bridges, that is, segments connecting a couple of villages from different shores, so that from any village you can get to any other village only by bridges (you can't walk along the shore). In how many ways can such a bridge system be built?