Problem

Source: Iran TST 2002

Tags: induction, group theory, combinatorics proposed, combinatorics



$n$ people (with names $1,2,\dots,n$) are around a table. Some of them are friends. At each step 2 friend can change their place. Find a necessary and sufficient condition for friendship relation between them that with these steps we can always reach to all of posiible permutations.