Hacker News new | ask | show | jobs
by jotadambalakiri 2960 days ago
> In fact, whenever two students win each other’s jackpot trade, there must always be a third student that’s higher on the ranking at one of the schools — and that wants a spot at this school

I don't think that's true, what if in both schools they were ranked last place and last place plus one?

1 comments

The algorithm won't assign them that way in that case. A more thorough explanation is elsewhere in the comments, but essentially if Alice got placed at B despite preferring A, they had to have gotten bumped from A, then bumped someone (or found an open space) at B. But Bob can't have been the person that bumped them: if there was an open space at B, Bob would never even have considered A; if Alice bumped someone at school B, then in your situation it must have been Bob, and so for Bob to end up at A when Alice couldn't there had to be someone else with priority between Alice and Bob for A, exactly the person getting screwed over by the swap.