Question: 14.5 Write a procedure show2( Solution Tree) to display a solution tree found by the andor program of Figure 14.12. Let the display format be
14.5 Write a procedure show2( Solution Tree) to display a solution tree found by the andor program of Figure 14.12. Let the display format be similar to that of the show procedure of Figure 14.8, so that show2 can be written as a modification of show, using a different tree representation. Another useful modification would be to replace the goal write(Node) in show by a user-defined procedure writenode(Node, H) which outputs Node in some suitable form, and instantiates H to the number of characters that Node takes if output in this form. H is then used for proper indentation of subtrees.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
