Format your assignment as a single PDF file. Due Thursday, April 11 at 11:59 PM under "Problem Set 1" in Blackboard. Late assignments penalized 10% per day.

  1. In a fictional registrar's office, classrooms are assigned to courses based on multiple factors. Say we have a set of rooms R, and a set of classes C where each class is characterized by a meeting time interval and a set of acceptable classrooms (e.g. those that are large enough for the class enrollment, have required projection facilities, etc.). An assignment of classrooms to classes is valid if each class is assigned to an acceptable classroom, and no two classes meet at the same place at the same time.

    Because of the many factors involved, it's sometimes tough for the registrar's office to arrive at a valid assignment. You've taken an AI course for a week, so the university turns to you for guidance. Your task is to design a search algorithm that starts from the current class-to-room assignment (which is invalid) and finds a path to a valid assignment using the smallest number of changes from the current assignment as possible. The number of changes is equal to the number of classes that move to a different room (note, the meeting times cannot change).

    Answer the following questions:

    1. 1 point. Define the classroom assignment problem as a search problem. Specifically, in about one sentence each, precisely define the states, operators, start state, and goal test you will use.
    2. 1/2 point. Does this problem require an optimal search procedure? In a sentence, why or why not?
    3. 1/2 point. What is the maximum branching factor of your search tree?
    4. 1/2 point. Using iterative deepening with depth-first search, what is the approximate time complexity of your algorithm in the worst case? (Use big-O notation here).
    5. 1/2 point. Will your search have problems with duplicate states? If no, why not? If yes, give a brief example.
    6. 1/2 point. Define an admissible heuristic for your search problem, and state why the heuristic is admissible.

  2. Consider a search problem with seven states, represented by the letters A-G. The start state is A, and G is the goal state. From each state, transitions to specific other states are allowed at a given cost, as follows:
    • From A, can move to: B with cost 5, or C with cost 9
    • From B, can move to: D with cost 5, E with cost 3, or G with cost 22
    • From C, can move to: F with cost 5
    • From D, can move to: None
    • From E, can move to: None
    • From F, can move to: G with cost 5
    • From G, can move to: None (this is the goal state)

    Answer the following questions. Note, in all questions below we say a search algorithm ``explores'' a state when it performs a goal test on that state. Also, the uninformed search algorithms (DFS, BFS, and iterative deepending DFS) ignore the costs given above (A* uses the costs).
    1. 1 point. Draw the full search tree associated with this state space.
    2. 1/2 point. Write out the sequence of states in the order depth-first search (DFS) will explore the search tree. Assume that from a given state, DFS explores successors in the order they are listed above (so from B, DFS will explore D before E, and E before G).
    3. 1/2 point. Write out the sequence of states in the order breadth-first-search (BFS) will explore the search tree. Make the same assumption about successors as in DFS above.
    4. 1/2 point. Write out the sequence of states in the order iterative deepening DFS will explore the search tree.
    5. 1/2 point. Consider a very simple heuristic that returns h(n) = 0 for all nodes n. Is this heuristic admissible?
    6. 1/2 point. Write out the sequence of states in the order A* explores the search tree when using the above heuristic.
    7. 1/2 point. What path to the goal does A* return, using the heuristic above?
    8. 1/2 point. Define a new heuristic on this search tree that is admissible, and for which A* explores exactly 5 distinct states.