There is an exercise, 5.5(b) which I'm stuck with. I just can't get a
correct approach for it...
Consider we have 3 Groups (GroupA, GroupB, GroupC), 3 Rooms (RoomA,
RoomB, RoomC), 3 Teachers(TeacherA, TeacherB, TeacherC), 3 subjects
(SubjA, SubjB, SubjC) and 3 possible timeframes(Lesson1, Lesson2,
Then I put constrains, that link teachers to subjects:
These are binary relations, that's excellent.
And now, how to write a constraint, that says: "Only one group can be
in the classroom" or "Only one teacher can teach one subject on the
same lesson" or "Group can have only one subject in the same lesson".
I just can't get an idea how to express that. What should be
variables? For example, we can put variable TimetableRecord, that is a
record and has the following fields: Group, Classroom, Teacher,
Lesson, Subject. But that is nit correct, I know... What approach is
I know, answers to exercises can';t be post here, but I don't need it.
I just need a hint on how to express restrictions I mentioned above...