00:01
If you were given a modified tower of alloy problem where a move, we're solving for d disk was involved in the second thing, like number two.
00:15
So we're as to find a recurrent solution for the number of moves required to solve for d disks with the restriction that you must use peg number two.
00:32
Well, we know there's zero disk, it's just zero moves.
00:38
And then for d plus 1 disk, first you have to solve for d disks, and then you have to move the last one.
00:47
So you would keep the bottom peg there and then move the other d disks to peg 3.
00:55
So you move these all the way to peg 3.
01:05
So then in order to do this number of steps, to do this is s sub b.
01:13
And then now you have to move the bottom peg, the bottom disc.
01:20
All it from peg 1 to peg 2 then you move this one to peg 2 so that's plus 1 move and now you have to move these d discs from peg 3 back to peg 1 so that you can move the large disk on peg 2 to peg 3 so then you then take these guys back to peg 1 and that takes s sub d moves again and finally you move the largest peg that was on peg 2 to peg 3 to peg 3 so that's plus 1 move again and at last we're just going to move on the d disk at peg 1 to the d disk at peg 1 we're going to again move them back to peg 3 so you can put them on top of the the largest disk and that requires s some d moves again so let's add this up we have 3 s sub d plus 2 so that's the number of moves required to solve this with d next we're asked to solve this recurrent solution to find a formula for the number of moves required to solve the puzzle for n disks.
02:59
Okay, so you know for zero disk this is zero, for one disk it's going to be two moves.
03:12
Can you have to use peg two? and a regular gate will be one move.
03:17
So if the added restriction will be true.
03:19
And then for three discs, there will be eight moves.
03:24
And for this, now it will be 26 moves.
03:32
It should be 2, 3.
03:39
And notice there's a pattern here, so it's just s sub d equal to 3 raised to the number, three race to the number of disks minus 1.
03:51
And in the regular game, it was 2d race to the d minus 1.
04:05
So now all we have to do is prove that this formula actually works for all number of disks.
04:12
So we're going to prove this by induction.
04:23
It's going to be similar to a proof of showing that it's 2 to the d minus 1 for a regular game.
04:32
So the first thing we have a...
04:36
I'm going to let our hypothesis p of n equal the number of moves it takes to solve for d disks.
04:47
Well, p of d in this case is equal to 3d minus 1.
05:00
And we have a base case.
05:06
So let's use a base case of 0.
05:09
There is zero disk, well, it's just zero steps.
05:25
And this works from the formula that we have 3 to 0 minus 1.
05:30
It's just 1 minus 1, which is 0.
05:33
The base case works.
05:36
Now for inductive step.
05:46
Well, first you want to assume that our hypothesis, p of d, is true.
06:00
And we want to show that p of d plus 1 is also true.
06:06
We want to show p of d plus 1.
06:21
Well, p of d plus 1 is just 3 to the d plus 1 minus 1.
06:26
So we want to show this is true.
06:28
So this is our end result.
06:29
This is what we're trying to get to.
06:39
Well, if you have d plus 1 disk, you still need to keep the largest disk 6 and then move all the other disks to peg 3, just like from before.
06:51
So you have your peg 1, peg 2, peg 3, you have some number of, we have d plus 1 disk.
07:09
This is 1, this is d.
07:11
So you can keep this bottom 1 fixed and move all these here to peg 3.
07:19
So that requires at least 3 to the d minus 1 steps from our inductive hypothesis p of d...