Function towers of hanoi towers

towers of hanoi towers.

Format:

towers of hanoi towers

Input:

list towers -
number src -
number dst -
number max_size -

Output:

list - None

Conditional properties that reference this function:

  • if the following are true:
    • the element at index src of stack towers = src_tower
    • get subtowersrc_tower = sub_tower
    • length of sub_tower is even

    then towers of hanoi towers = towers of hanoi top disks towers

    (link)
  • if the following are true:
    • the element at index src of stack towers = src_tower
    • get subtowersrc_tower = sub_tower
    • length of sub_tower is odd

    then towers of hanoi towers = towers of hanoi top disks towers

    (link)
  • if the following are true:
    • the element at index src of stack towers = [ x, rest ]
    • the element at index dst of stack towers = dst_tower
    • x > 1

    then towers of hanoi top towers = towers of hanoi (move disk towers is even)

    (link)


Comments

Please log in to add comments