Question: 7.5 The fit/5 predicate in our program only works for four blocks. All the blocks and pairs of blocks are explicitly enumerated to check for
7.5 The fit/5 predicate in our program only works for four blocks. All the blocks and pairs of blocks are explicitly enumerated to check for the no-overlap requirement. Extending the program in this style for a larger number of blocks (beyond 10, say) would become too cumbersome. Re-define the fit predicate as: fit( Box, [BlockName1/Rectangle1, BlockName2/Rectangle2,...]) which would work for a list of blocks of any (reasonable) length.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
