

Looking at your queries in the various comments I feel it might be useful to point out that proof by induction and proof by minimal counterexample are logically equivalent but that some of the things you are questioning seem so much clearer w.r.t. However, the second part is nonsense since the only sensible inductive hypothesis concerns 'moving n discs from pole A to pole B, assuming that 3 poles are available'. Your statement of the only thing pending is correct. You are right to be concerned about the second part. Why does it state that we would need to move theĪnd that is not possible since we don't have an induction hypothesis?Īm I misunderstanding something about statements on induction here? Then at that state it seems to me that the only thing pending would be to move the smallest disc from At the beginning of the game, all n disks are all on the rst peg, arranged such that the largest is on the bottom, and the smallest is on the top (so the rst peg. Each disk has a hole in the middle so that it can t on any peg. Is occupied by the smallest disc but I guess it is part of the logic of using induction in proof.) TOWERS OF HANOI In the Towers of Hanoi problem there are three pegs (posts) and n disks of dierent sizes. (At this part I am not sure how this could happen if pole Then we use the inductive hypothesis to move the remaining How I understand it is we move the smallest disc to pole And there is no inductive hypothesis for that so I think I get it. Then at some point we would have to move them again since we would need to place the , and we have no hypothesis about moving discs from Possibilities of using the induction hypothesis, because After this point all possibilities of using the induction hypothesis have been exhausted Then it highlights that this definition is a dead-end since the only 2 ways to use the induction hypothesis as set don't lead anywhere. Is that when the number of discs is 0 then no steps are needed The example I am reading states the following: I am reading about how a wrong formulation of the tower of Hanoi and the inductive hypothesis can lead to a dead-end. The magicoccurs in the succesive rearrangment of the function parameters. In the Tower of Hanoi, the answer is not in the returned result per se, but in the observation of the returned result.


Then move the ( k + 1) th disk to the destination peg. With a tower of k + 1 disks, we first have to move the tower of k disks from off the top of the ( k + 1) th disk onto another of the pegs. Basic programming knowledge is necessary as some quizzes require programming in Python.S n is the minimum number of moves it takes to solve towers of Hanoi where n is a positive integer.
#Hanoi towers big oh proof by induction how to#
We assume only basic math (e.g., we expect you to know what is a square or how to add fractions), common sense and curiosity.Ģ. In the online course, we use a try-this-before-we-explain-everything approach: you will be solving many interactive (and mobile friendly) puzzles that were carefully designed to allow you to invent many of the important ideas and concepts yourself.ġ. We will use these tools to answer typical programming questions like: How can we be certain a solution exists? Am I sure my program computes the optimal answer? Do each of these objects meet the given requirements? In this course, we will learn the most important tools used in discrete mathematics: induction, recursion, logic, invariants, examples, optimality. Mathematical thinking is crucial in all areas of computer science: algorithms, bioinformatics, computer graphics, data science, machine learning, etc.
