2223 CSC14003 21CLC HW02
2223 CSC14003 21CLC HW02
2223 CSC14003 21CLC HW02
Homework 02
Submission Notices:
● Conduct your homework by filling answers into the placeholders in this file (in Microsoft Word
format).
Questions are shown in black color, instructions/hints are shown in italics and blue color, and your
content should use any color that is different from those.
● After completing your homework, prepare the file for submission by exporting the Word file (filled
with answers) to a PDF file, whose filename follows the following format,
<StudentID-1>_<StudentID-2>_HW01.pdf (Student IDs are sorted in ascending order)
E.g., 2112001_2112002_HW02.pdf
and then submit the file to Moodle directly WITHOUT any kinds of compression (.zip, .rar, .tar, etc.).
● Note that you will get zero credit for any careless mistake, including, but not limited to, the following
things.
1. Wrong file/filename format, e.g., not a pdf file, use “-” instead of “_” for separators, etc.
2. Disorder format of problems and answers
3. Conducted not in English
4. Cheating, i.e., copying other students’ works or letting other students copy your work.
Problem 3. (1pt) 8-puzzle problem. Apply the hill-climbing algorithm with the sum of Manhattan
distance heuristic to find a solution for the following pair of initial and goal states.
Initial state: 1 2 3 Goal state: 1 2 3
7 6 4 5 6
5 4 8 7 8
Problem 6. (2pts) Alice, Betty, and Carol are in a book club. They’re trying to figure which of five
different books they should read next. The books are:
(D): Dreams From My Father by Barack Obama, non-fiction
(L): Lord of the Rings by J.R.R. Tolkein (L), fiction
(A): Artificial Intelligence: A Modern Approach by Stuart Russell and Peter Norvig, non-
fiction
(H) Harry Potter and The Sorceror’s Stone, by J.K. Rowling, fiction, and
(F): The Fabric of the Cosmos: Space, Time, and the Texture of Reality by Brian Greene,
non-fiction.
In this book club, they can’t read the same book because there is only one copy for each book.
Betty only reads non-fiction. Alice won’t read whatever either Betty or Carol are reading, while
Betty and Carol always read the same type of book.
a) (1pt) Formulate this problem as a CSP, stating the variables, domains, and constraints.
Constraints should be specified formally and precisely but may be implicit rather than explicit.
c) (0.5pt) Assume that Betty asked you to choose a book for her. Starting from the domains in a),
show the resulting domains after running arc-consistency.
Domains