![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2006
Posts: 7
Rep Power: 0
![]() |
does anybody know how to solve this problem
Can you find a solution for the 4 needle towers of hanoi problem according to these rules:
• First move the topmost discs (say the top k discs) to one of the spare needles. • Then use the standard three needles strategy to move the remaining n − k discs (for a general case with n discs) to their destination. • Finally, move the top k discs into their final destination using the four needles. thanks in advance |
|
|
|
|
|
#2 | |
|
Hobbyist Programmer
Join Date: Oct 2005
Posts: 211
Rep Power: 4
![]() |
Quote:
you might want to read up on how to ask a question here -MBirchmeier |
|
|
|
|
|
|
#3 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Hint: Recursion makes this easier.
|
|
|
|
|
|
#4 |
|
Programming Guru
![]() ![]() ![]() |
Please tell me you tried to code this yourself first, obviously this is a homework assignment. What have YOU done?
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#5 |
|
Programmer
Join Date: Jan 2005
Location: Albany, NY
Posts: 43
Rep Power: 0
![]() |
...
This may be of interest:
http://www.csee.umbc.edu/331/fall00/homework/hw4/
__________________
meh... |
|
|
|
|
|
#6 |
|
Programmer
Join Date: Mar 2005
Location: Washington
Posts: 91
Rep Power: 4
![]() |
I recommend you using the best of your logic and wisdom.
References can definately be found on the Internet, but I also recommend you to write it out yourself first and then post up the code if there are any detailed technical problems that you need to ask. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|