1. Consider the geometric shapes given in Figure Q1-1 below. You are required to find
a way to arrange them into the 4×5 rectangular area as shown in Figure Q1-2 (colors.
not shown) such that the area will be entirely filled. All the shapes will be used and
none of the shapes overlap.
Hint: Think of the Tetris (brick) game.
b. Sketch the search tree when performing a backtracking search on the problem
to reach the solution. In the "sketch", you can abstract away (not show) some of
the branches and levels as long as your sketch clearly shows the search
process. You are not required to completely solve the problem, i.e. not required
to find the solution. Your sketch may look something like below. Note this is an
example based on map coloring problem. You will have different variables and
values. The question also expects something more comprehensive, than the
example sketches below. You should show sufficient branches to include the
effect of backtracking.
Figure Q1-1. Shapes to assemble.
Figure Q1-2. Assembled shape.
a. Formulate the problem as a constraint satisfaction problem (CSP) by giving the
following information:
i. What are the state variables? Clearly explain and define them.
ii.
Give the domain for each variable.
iii.
Specify the constraints.
iv.
What would be the successor function?
v.
What would be the goal test function?
Hint: Think of the final solution is a complete assignment of all variables.
What are the possible variables in the final solution? The constraints may be
used to enforce the sub-blocks (shapes) and any other geometric
constraints.
(WA-Red) (WA-Green)
(T-Blue)
(WA Red, NT Green)
(WA-Red, NT Green,.., Tasmania Green)
c. State the worst-case time and space complexity of the search in b.
Hint: Consider the parameters involved in computing the time and space
complexity.