There are n universities(number them from 1 to n) in a country. To help their students, the universities make a pact to exchange thier best professors for a semester. Each university nominates a professor to be exchanged. The constraints are:
a. No professor can stay in his own university.
b. If the university i goes to the university j, the professor from university j cannot go to university i.
The second constraint has been introduced to prevent the universities from forming pairs.
If the solution is U(n), post the value of U(13).
Eg: U(1)=0, U(2)=0, U(3)=2, U(4)=6.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment