move disk from to move disk from to move disk from to move disk from to move disk from to move disk from to move disk from to move disk from to soour solution to the tower of hanoi is "trivialalgorithm requiring only nine lines of code what is this problem doing in section labeled hard problemsto answer that questionwe have to look at the efficiency of our solution rememberwhen talk about the efficiency of an algorithm mean how many steps it requires to solve given size problem in this casethe difficulty is determined by the number of disks in the tower the question we want to answer is how many steps does it take to move tower of size njust looking at the structure of our algorithmyou can see that moving tower of size requires us to move tower of size twiceonce to move it off the largest diskand again to put it back on top if we add another disk to the towerwe essentially double the number of steps required to solve it the relationship becomes clear if you simply try out the program on increasing puzzle sizes number of disks steps in solution in generalsolving puzzle of size will require steps computer scientists call this an exponential time algorithmsince the measure of the size of the problemnappears in the exponent of this formula exponential algorithms blow up very quickly and can only be practically solved for relatively small sizeseven on the fastest computers just to illustrate the pointif our monks really started with tower of just disks and moved one disk every second hours dayevery daywithout making mistakeit would still take them over billion years to complete their task considering that the universe is roughly billion years old nowi' not too worried about turning to dust just yet even though the algorithm for towers of hanoi is easy to expressit belongs to class known as intractable problems these are problems that require too much computing power (either time or memoryto be solved in practiceexcept for the simplest cases and in this senseour toy-store puzzle does indeed represent hard problem but some problems are even harder than intractableand we'll meet one of those in the next section