Editorial for Bubble Cup V9 F Pokermon League challenge
Submitting an official solution before solving the problem yourself is a bannable offence.
The key idea is to first put players into conferences and then assign them to teams. We go through all of the players and put them into conferences so that the first condition is satisfied. We take them one by one and select a conference for each player such that he hates more (or equally many) players in the other conference than the one we put him in. That means that at any point of this process, there will be more hate edges connecting players in different conferences than those connecting players in the same conferences. Thus, in the end, we have satisfied the first condition. Complexity is for this part.
Now we will try to satisfy the second condition by assigning teams to the players. Let be the set of all of the teams that appear on at least one wish list. Let's select some subset of . We select it in a way that every element from will be thrown in it with chance. Now, we will assign teams from to players in conference and teams from to players in conference . If such assigning is possible while satisfying the second condition, we will be done. Let's see what is the chance that a particular player in conference can't be assigned a valid team from . That means none of at least teams on his wish list are in . The chance for that is . Same goes for all players in conference and equivalently for conference . So, the chance that at least one player can't be assigned a team is at most . This means that there is at least chance that this method will give us the final solution which fulfills both problem conditions. This means that after several steps, we will very likely solve the problem. Complexity is for this part. For example, if we do steps, the probability that we will find a correct solution is .
Comments