Seating at a large wedding 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.

This blog post demonstrates one approach that uses mixed integer linear programming:
https://blogs.sas.com/content/operations/2014/11/10/do-you-have-an-uncle-louie-optimal-wedding-seat-assignments/
