Why can't you just take each individual person from the list and put them in groups based off of how many people they would be incompatible with. Then, starting from the person with the least amount of incompatible partners, add them to the party. Of course, if the person is incompatible with somebody already added, they would be skipped over.