I'm building a Swiss System algorithm and have the following scenario. 10 participants. 8 rounds are to be played. Generating round 8, I have three players that haven't played each other. These three players have all played the same other 7 players in the previous 7 rounds of the tournament. For round 8 I can pair two of the three players together and the third wouldn't have anyone to play with, since everyone can only play everyone else once? Is this situation logically possible?
Is this situation logically possible?
This is one of the known problems with using Swiss pairing when the number of rounds is close to the number of players. It is called "jamming". There is no simple software solution. For a serious tournament you would not use Swiss pairing when (Number of players) < (number of rounds + 2). Remember a round-robin tournament has (number of players - 1) rounds for an even number of players.
In real life what the arbiter does is check for potential jamming when close to the limit, particularly if there is a group of players who have only played each other. This is a warning sign that jamming is a possibility. In your case in round 7 the arbiter would check the pairing before publishing as follows:
Set all the results to draws and pair the next round. If this works there will be no jamming in this round and the arbiter would rollback the draws he entered to the correct round and publish the pairings. If jamming does occur then he would rollback and manually change the pairings to break up the jammed group of players and then check by setting all draws as before.