And Yet More...First Things First
Now, before getting any further into details, let’s see the solver deal with a slightly more interesting problem, more typical of logic puzzles. Once again, it is not particularly difficult, but it illustrates the technique and the style of problem representation.
Muddle Management
Six managers of Muddle and Company have to schedule a series of meetings on various aspects of the company’s activities. Not all of them are to attend every meeting, but each of them has to attend three or four meetings. The managers’ names are Amy, Bernard, Chester, Dianne, Emma and Frank. The meetings concern marketing, networks, orders, production, quality control, revenue, sales and timetables. These may take place in any order, except that the meeting on sales must happen before the one on marketing, and both production and quality control have to be discussed before the timetabling meeting can take place. The meetings they are required to attend are:
Amy: | networks | quality | revenue | sales |
---|---|---|---|---|
Bernard: | marketing | orders | revenue | sales |
Chester: | networks | production | revenue | timetables |
Dianne: | production | quality | timetables | – |
Emma: | marketing | orders | quality | timetables |
Frank: | marketing | networks | timetables | – |
They want to schedule the meetings to fit into the smallest possible number of timeslots, so as to get to their golf game straight after lunch. They find it hard to decide how many timeslots they need and which meetings to hold in parallel with which.
Can you help them out?
Look at the solver to see a suggested encoding of this problem. Don’t panic if the notation looks baffling: read these pages, do the exercises and all will be revealed! For the moment, let’s just get an impression of what such things look like.
Basically, we say there are three sorts of things: people, meetings and timeslots. The people and meetings can be listed (or “enumerated”) since we know their names. Then there are two things to declare in the “Vocabulary” box: a relation (also known as a predicate) saying who attends which meetings, and a function “time” that assigns a timeslot to each meeting. Then we can write “A at N” to say that A is at N (i.e. Amy is at the meeting on networks), and we can write “time(N)” to refer to the timeslot when N happens.
In the “Constraints” box we say first that two meetings cannot be in the same timeslot if someone has to attend both of them. Finally, we have to list the attendance required of each manager.
Click on SOLVE to see the optimal solution.
Solver
Auto Parser Results
No errors found.