Skip to content

Comment on Show HN: Better Seater – Wedding seating chart optimizerparent

Comments

Solving this problem to optimality (for whatever constraints and objective function one is interested in -- a precise formulation was not given by the O.P.) is presumably NP-hard indeed, meaning that the computational cost grows exponentially with the size of the problem (in practice: the number of invitees).

However,

1. This is only an asymptotic argument. For "small" size, these problems can be tackled. People routinely solve this type of problem (namely: mixed-integer optimization problems), with up to hundreds of thousands of variables, to proven optimality, in a matter of minutes (see [1]). In this case, it looks like an assignment problem in which the number of variables would be (number of invitees) times (number of tables), so for up to 1000 invitees and 100 tables, there is a chance the problem can be solved optimally.

2. The O.P. is most likely looking heuristically for good solutions, not optimal ones. And I can't really blame them for that. Do we really care about optimality here?

[1] https://plato.asu.edu/ftp/milp.html

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.