Seating & timetabling
Seating and timetabling are discrete placement problems: assign entities to positions or time slots so that conflict and capacity rules hold. Savanty encodes the rules as ASP integrity constraints and Clingo finds a valid plan.
Seating a wedding and timetabling a school term are the same kind of problem: place a finite set of entities into a finite set of positions so that a set of hard rules never breaks. Answer Set Programming expresses placement and conflict rules directly.
The encoding
Each entity takes one position (a choice rule); conflicts and capacities become integrity constraints:
1 { assign(C, R) : room(R) } 1 :- class(C). % each class to one room-slot
:- assign(C1, R), assign(C2, R), clash(C1, C2). % no clashing classes together
:- 5 { assign(C, R) : class(C) }, room(R). % room capacity: max 4
#show assign/2.
Conflict-free by construction
The hard part of timetabling is that a fix in one place breaks another. A solver handles that globally: Clingo either produces a placement with zero clashes or proves that none exists. An LLM writing a timetable by hand will confidently seat two feuding relatives together on table 4; Savanty routes the decision through Clingo instead, so the plan is conflict-free by construction.
When constraints over-determine the layout — more separation rules than the room count can satisfy — you get an UNSAT with a minimal unsatisfiable core naming the conflicting rules, so you know exactly which preference to relax.
Frequently asked questions
Can it handle 'keep these two people apart' rules?
Yes. Separation is a natural integrity constraint: forbid any answer set where two named people share a table. Adjacency preferences work the same way, expressed as hard rules or soft optimization goals.
Is timetabling not just scheduling?
They are close cousins — both assign entities to slots under hard rules. Timetabling emphasizes conflict-free placement (no clashes) while rostering emphasizes coverage. Both fit ASP; describe your rules and Savanty encodes the right ones.