Question: Write a predicate order_blocks ( a: :_order, N) that takes as an input the three stacks of blocks (variable B) and put them in order

Write a predicate order_blocks ( "a: :_order, N)
Write a predicate order_blocks ( "a: :_order, N) that takes as an input the three stacks of blocks (variable B) and put them in order (A on the ground, B over A and so on...) in any of the three stacks. The output variable B_order represents the nal status of the three stacks of sorted blocks, while the output variable N is the number of moves done. There are only three stacks available (blocks can only be moved in one of the three stacks). Each time a block is moved the program print the status of the blocks to show each move

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!