I have a large wedding of 500 people and 100 tables, each table containing 5 seats. Each person at the wedding lists (up to) 4 people they would like to sit at their table (order of the ranking matters). The more people they sit with, the happier they are.
What is best way of finding the optimal solution that the most people are happy?
I am considering linear programming, specifically max flow min cut, but I'm unsure of how to map the constraints/problem.