English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

well my math reacher is again making us do this problem presentation. she wants to know how many seconds would it take for some one to move 7 disks (bigger at the bottom smaller in the top) to a complete other colum, there are 3 colums, one is already being used by the disk, now we have to move them, suposing that you can move one per second, and that you cant up a bigger one on top of a smaller one. she wants us to show a table of balues that we can continue and continue untill we reach 7, (like: 1 disc-one second, 2 discs- 3seconds) but she sayd that there is a way of figuring it out, using a function rule. the moder is something like this: y=x to the "a" power. so please... HELP!!! i will choose a best answer

2007-03-08 13:12:32 · 1 answers · asked by Poseidon 2 in Computers & Internet Other - Computers

1 answers

For n disks it is (2^n) - 1 moves to solve.

So for 7 disks it is 127 moves.

Why?
If you have a function that computes it
f(n)
For f(2) = 3
Now if you add another disk, you will have to do what you did in the previous round, to move all the (n-1) disks over, then you will have to move over the nth disk, then repeat all the steps again to put them on top.
So
f(2) = f(1)*2 +1
f(3) = f(2)*2 + 1 = (f(1)*2 + 1)*2 + 1 = 2*2 + 2 +1
f(4) = 2*2*2 + 4+2+1

The first term becomes 2^(n-1)
The second term can be changed into 2^(n-1) - 1

So altogether you get
(2^n) - 1

Im sure that was horribly explained but there you go.

2007-03-08 14:08:25 · answer #1 · answered by rsmith985 3 · 0 0

fedest.com, questions and answers