Up Next
Go up to 4 Designing Video Presentations
Go forward to Solution to part (b).

Solution to part (a).

I have four different solutions:
  1. For the first solution, a segment is chosen that covers the first topic, and all of the topics that this segment also covers are removed from the list of topics left to cover.
  2. The second solution is a directly recursive definition with no predicates defined other than in the question.
  3. The third solution uses an iterative method, where we define another predicate add_to_presentation that adds to existing an presentation to also include more topics. Presentation then asks to add the topics it must cover to an empty presentation.
  4. The fourth solution generates presentations that satisfy the length criterion, and then tests them to see if they cover all of the topics. This is the only one that defines more than one extra predicate.

Computational Intelligence online material, ©David Poole, Alan Mackworth and Randy Goebel, 1999

Up Next