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?
You can keep trying harder from the state, just click again on the Optimize buttons.
I admit, I haven't optimized the optimizer yet.
But as the NP-hardness of that problem goes: Say you have 400 guests on 50 tables and you probably expect multiple solutions, you're looking at maybe 20K variables in a SAT encoding. That's an industrial scale SAT problem but very much not untractable.
The question is, whether we would usually expect a number of solutions in the thousands or whether we expect just a handful. I'd guess its the former, as many people on the "cheap tables" are really interchangeable and not subject to many constraints. So usually you'd looking at just a handful of tables and guests that are difficult to place. That begs the question whether the problem OP's trying to solve is really a problem people have difficulties solving (or isn't easily solved by adding a table or two).
In practice, the "optimal" solution depends on what you're optimizing for. In my case, it was maximizing the number of dogs that could board on any given night. This involved looking for open paths - since dogs can be moved around daily if necessary. Then rule out any based on the constraints: Prevent enemy conflict, limit to max occupancy, etc. After that, the preference is for boarding them in a kennel with a friend if possible, however there are trade-offs here in whether this creates too many extra moves... e.g. if a friend is coming in for one night of a dog's 7-night stay, we don't prefer to move. So the third priority, which occasionally overrides the second priority, is minimizing the number of moves which add work for employees. To do that, we look for the longest stretch open at each move branch, ranking them by number of friends descending, barring any with enemies.
As you can imagine, this was way too complicated and branching, so the system prunes the option tree at each necessary move down to a few dozen possibilities and continues down each of those paths, then ranks all the paths for the user to choose from.
In other words, a lot of the decisions for optimizing it (in the non-mathematical sense) were about limiting its output to a manageable number of reasonably good choices. Enemies create a hard limit on the number of spots available. Friends are optional (but good for business).
[Edit: An example of a magical constant is the weighting of "friends" over a period of time versus "number of moves" required to achieve optimal friendships]
I think arbitary weightings are unavoidable when optimizing 'soft' (social) problems like kennel allocation or seating plans. The optimal solution is not well defined.
In a larger way, though, 90% of this kind of work is pencil and paper, drawing out all possibilities you can think of, and then asking questions like "what if X and Y are friends staying together, and Y and Z and Q are friends, but X and Z are enemies, and Z+Q is showing up on night 4 of X+Y stay, should Y move in with Z if there are 2 nights left? 3? A majority? Ever?" I would get into long, long conference calls where I would ask them all these scenarios and graph them out before I started writing the code. So the code just expresses what they would hopefully wish to do based on their domain knowledge and best practices. And that is the real trick of optimization... making the clients happy ;)
Yes.
>and basically unsolvable for more than a couple preferences?
Our PerfectTablePlan table planner can optimize seating for thousands of guests with thousands of preference constraints (between individuals and groups) on a standard desktop PC/Mac. It uses a genetic algorithm to quickly produce a 'good enough' (but not guaranteed to be optimal) solution. For seating plans it isn't really clear what the optimum is anyway. It is more important that than Bob sits next to Jill or not next to Jack or not next to an empty seats? Debatable.
But just to be complete, since TSP was mentioned here:
We could solve TSP instances with >80k cities to optimality back in 2006:
https://www.math.uwaterloo.ca/tsp/
The trick is that some types of problems, like TSP or assignment problems, have structure that can be exploited. Of course they remain NP-hard, so as size grows, at some point the computational cost becomes unsustainable. But the point at which this happens is often way further (i.e. for much larger instances) than most imagine.