prog4 - 6 rectangle is formed. The output of your program...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Science 130B Winter 2007 Programming Assignment #4 Do not turn in. For your practice only Imagine a set of 8 plane patterns as shown in Figure 1(a). Each pattern di±ers in shape from the others but together they can be arranged to make di±erent-sized rectangles. In Figure 1(b), there is an illustration of how these 8 plane patterns can be put together to create a 6 × 6 rectangle. Code a backtracking algorithm that ²nds one possible way to place these 8 patterns so that a 6
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6 rectangle is formed. The output of your program should be 36 numbers arranged in 6 rows by 6 columns to represent the coverage of the 6 6 rectangle. If location ( i, j ) in the rectangle is occupied by pattern k , then you should output a number k at the i-th row and j-th column. Write a short README le to explain the strategy for generating the state space tree and the bounding function used. 1 2 3 8 7 6 5 4 1 2 3 4 5 6 7 8 (a) (b) Figure 1:...
View Full Document

This note was uploaded on 08/06/2008 for the course CS 130B taught by Professor Suri during the Winter '08 term at UCSB.

Ask a homework question - tutors are online