0% found this document useful (0 votes)
53 views2 pages

17 - Csp-Lecture Schedule Problem - Backtracking

The document outlines a scheduling problem for the MIT Time Travel Society convention, where seven historical figures must be assigned to four time slots while adhering to various constraints based on student interests. Key constraints include specific time slot limitations for Alan Turing, preferences for physicists, mathematicians, ancient Greeks, female speakers, and British speakers, as well as a personal requirement to see both Curie and Pythagoras. The document also includes instructions for diagramming constraints and conducting a depth-first search to find a valid schedule, with a focus on backtracking when necessary.

Uploaded by

Rithwika Narla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views2 pages

17 - Csp-Lecture Schedule Problem - Backtracking

The document outlines a scheduling problem for the MIT Time Travel Society convention, where seven historical figures must be assigned to four time slots while adhering to various constraints based on student interests. Key constraints include specific time slot limitations for Alan Turing, preferences for physicists, mathematicians, ancient Greeks, female speakers, and British speakers, as well as a personal requirement to see both Curie and Pythagoras. The document also includes instructions for diagramming constraints and conducting a depth-first search to find a valid schedule, with a focus on backtracking when necessary.

Uploaded by

Rithwika Narla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ITCS 6150/8150

Dr. Dewan T. Ahmed

[Source MIT] The MIT Time Travel Society (MITTTS) has invited seven famous historical figures to each give
a lecture at the annual MITTTS convention, and you've been asked to create a schedule for them.
Unfortunately, there are only four time slots available (1pm - 4pm), and you discover that there are some
restrictions on how you can schedule the lectures and keep all the convention attendees happy. For instance,
physics students will be disappointed if you schedule Niels Bohr and Isaac Newton to speak during the same me
slot, because those students were hoping to attend both of those lectures.

After talking to some students who are planning to attend this year's convention, you determine that they fall
into certain groups, each of which wants to be able to see some subset of the time traveling speakers.
(Fortunately, each student identifies with at most one of the groups.) You write down everything you know:

The list of guest lecturers consists of Alan Turing, Ada Lovelace, Niels Bohr, Marie Curie, Socrates, Pythagoas,
and Isaac Newton.

1. Turing has to get home early to help win World War II, so he can only be assigned to the 1pm slot.
2. Physics students want to see the physicists: Bohr, Curie, and Newton.
3. Math students want to see the mathematicians: Lovelace, Pythagoras, and Newton.
4. The members of the Ancient Greece Club want to see the ancient Greeks: Socrates and Pythagoras.
5. The visiting Wellesley students want to see the female speakers: Lovelace and Curie.
6. The CME students want to see the British speakers: Turing, Lovelace, and Newton.
7. Finally, you decide that you will be happy if and only if you get to see both Curie and Pythagoras. (Yes,
even if you belong to one or more of the groups above.)

Question 1: Diagram these constraints by drawing a line between the initials of each pair of guests who cannot
share a time slot.
ITCS 6150/8150
Dr. Dewan T. Ahmed

Question 2: Search for a solution using depth-first search only—without any forward checking or propagation. The
only check is to make sure that each new assignment violates no constraint with any previous assignment. As a tiebreaker,
assign a lecturer to the earliest available timeslot. Continue up to the first time you try and fail to assign any time to
Newton and must backtrack, at which point you give up and move on to Question 3 to try a more sophisticated approach.

Fill out this worksheet as you draw your search tree. There may be more rows than you need.
1. Every time you assign a variable or remove a variable from the propagation queue, fill out a new row in the table. (The
same variable might appear in more than one row, especially if you have to backtrack.)
2. In that row, indicate which variable you assigned or de-queued; write its assigned value if it has one (e.g. X=x),
otherwise just write its name (X). In the second column, list the values that were just eliminated from neighboring
variables as a result. If no values were just eliminated, write NONE instead.
3. If your search has to backtrack after assigning or de-queuing a variable: first, finish listing all values eliminated from
neighboring variables in the current row. Next, check the backtrack box in that row. Then, continue with the next assignment
in the following row as usual.
4. At some point, you might add several variables to your propagation queue at once. Break ties by adding variables to your
propagation queue in alphabetical order.

Domain for this problem:


T 1
L 1 2 3 4
B 1 2 3 4
C 1 2 3 4
S 1 2 3 4
P 1 2 3 4
N 1 2 3 4

Step# Var assigned List all values eliminated from neighboring variables Backtrack
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

You might also like