i need help in my project...
-
I want your help in my project(Hanoi Tower2).... Towers of Hanoi The ancient folklore behind the “Towers of Hanoi” puzzle is quite well known. A more recent legend tells us that once the Brahmin monks discovered how long it would take to finish transferring the 64 discs from the needle which they were on to one of the other needles, they decided to find a faster strategy and be done with it. One of the priests at the temple informed his colleagues that they could achieve the transfer in single afternoon at a one disc-per-second rhythm by using an additional needle. He proposed the following strategy: • 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. He calculated the value of k which minimized the number of movements and found that 18,433 transfers would suffice. Thus they could spend just 5 hours, 7 minutes, and 13 seconds with this scheme versus over 500, 000 million years without the additional needle! Try to follow the clever priest’s strategy and calculate the number of transfers using four needles, where the priest can move only one disc at a time and must place each disc on a needle such that there is no smaller disc below it. Calculate the k that minimizes the number of transfers under this strategy. Input The input file contains several lines of input. Each line contains a single integer 0 ≤ N ≤ 10, 000 giving the number of disks to be transferred. Input is terminated by end of file. Output For each line of input produce one line of output which indicates the number of movements required to transfer the N disks to the final needle. Sample Input 1 2 28 64 Sample Output 1 3 769 18433 can u help me....
-
I want your help in my project(Hanoi Tower2).... Towers of Hanoi The ancient folklore behind the “Towers of Hanoi” puzzle is quite well known. A more recent legend tells us that once the Brahmin monks discovered how long it would take to finish transferring the 64 discs from the needle which they were on to one of the other needles, they decided to find a faster strategy and be done with it. One of the priests at the temple informed his colleagues that they could achieve the transfer in single afternoon at a one disc-per-second rhythm by using an additional needle. He proposed the following strategy: • 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. He calculated the value of k which minimized the number of movements and found that 18,433 transfers would suffice. Thus they could spend just 5 hours, 7 minutes, and 13 seconds with this scheme versus over 500, 000 million years without the additional needle! Try to follow the clever priest’s strategy and calculate the number of transfers using four needles, where the priest can move only one disc at a time and must place each disc on a needle such that there is no smaller disc below it. Calculate the k that minimizes the number of transfers under this strategy. Input The input file contains several lines of input. Each line contains a single integer 0 ≤ N ≤ 10, 000 giving the number of disks to be transferred. Input is terminated by end of file. Output For each line of input produce one line of output which indicates the number of movements required to transfer the N disks to the final needle. Sample Input 1 2 28 64 Sample Output 1 3 769 18433 can u help me....
Gee - here's a piece of homework we've never seen posted before. You've posted the description of hte towers of hanoi. You seem not to be asking for help, but a solution. You need to do your own homework. When you have code that doesn't quite work, feel free to post it and ask specific questions. Until then, the best help we can give you, is encourage you that the purpose of your homework is for you to learn, not for you to get the answer from the web. But, I'd be happy to write it for you, for $200 an hour. That's the sort of contracting rate you will never attract in your life, if you don't do your own homework.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Gee - here's a piece of homework we've never seen posted before. You've posted the description of hte towers of hanoi. You seem not to be asking for help, but a solution. You need to do your own homework. When you have code that doesn't quite work, feel free to post it and ask specific questions. Until then, the best help we can give you, is encourage you that the purpose of your homework is for you to learn, not for you to get the answer from the web. But, I'd be happy to write it for you, for $200 an hour. That's the sort of contracting rate you will never attract in your life, if you don't do your own homework.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Christian Graus wrote:
Gee - here's a piece of homework we've never seen posted before
:laugh::laugh::laugh:
Christian Graus wrote:
write it for you, for $200 an hour
Is that all? I charge $500/hr and include a complimentary email to the teacher :->
-
I want your help in my project(Hanoi Tower2).... Towers of Hanoi The ancient folklore behind the “Towers of Hanoi” puzzle is quite well known. A more recent legend tells us that once the Brahmin monks discovered how long it would take to finish transferring the 64 discs from the needle which they were on to one of the other needles, they decided to find a faster strategy and be done with it. One of the priests at the temple informed his colleagues that they could achieve the transfer in single afternoon at a one disc-per-second rhythm by using an additional needle. He proposed the following strategy: • 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. He calculated the value of k which minimized the number of movements and found that 18,433 transfers would suffice. Thus they could spend just 5 hours, 7 minutes, and 13 seconds with this scheme versus over 500, 000 million years without the additional needle! Try to follow the clever priest’s strategy and calculate the number of transfers using four needles, where the priest can move only one disc at a time and must place each disc on a needle such that there is no smaller disc below it. Calculate the k that minimizes the number of transfers under this strategy. Input The input file contains several lines of input. Each line contains a single integer 0 ≤ N ≤ 10, 000 giving the number of disks to be transferred. Input is terminated by end of file. Output For each line of input produce one line of output which indicates the number of movements required to transfer the N disks to the final needle. Sample Input 1 2 28 64 Sample Output 1 3 769 18433 can u help me....
hazem! this is your professor from teh university. whent i heard of your posted homoworks on the cpian websites i had a doubt it could be true. then i am seeing it before mine own eyejob and i must not have a blow doubt about it@! i told must students of sensual nature never to post, no, on the homoCpians websites! becauze you do this horrible thing i must give you the utter cursings of shiva brama and krisna and blue man group. vile humo shiva bar kuntso! p.s. plus blackened grade. and no more sensual acts with student at the university. :((
Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas
-
Christian Graus wrote:
Gee - here's a piece of homework we've never seen posted before
:laugh::laugh::laugh:
Christian Graus wrote:
write it for you, for $200 an hour
Is that all? I charge $500/hr and include a complimentary email to the teacher :->
Paul Conrad wrote:
Is that all?
He's a student, that's my student discount :P
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Paul Conrad wrote:
Is that all?
He's a student, that's my student discount :P
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Christian Graus wrote:
that's my student discount;P
:laugh::laugh::laugh: Wow, I guess I'm not that lenient :->
-
Gee - here's a piece of homework we've never seen posted before. You've posted the description of hte towers of hanoi. You seem not to be asking for help, but a solution. You need to do your own homework. When you have code that doesn't quite work, feel free to post it and ask specific questions. Until then, the best help we can give you, is encourage you that the purpose of your homework is for you to learn, not for you to get the answer from the web. But, I'd be happy to write it for you, for $200 an hour. That's the sort of contracting rate you will never attract in your life, if you don't do your own homework.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Gee - here's a piece of homework we've never seen posted before. You've posted the description of hte towers of hanoi. You seem not to be asking for help, but a solution. You need to do your own homework. When you have code that doesn't quite work, feel free to post it and ask specific questions. Until then, the best help we can give you, is encourage you that the purpose of your homework is for you to learn, not for you to get the answer from the web. But, I'd be happy to write it for you, for $200 an hour. That's the sort of contracting rate you will never attract in your life, if you don't do your own homework.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
iam sorry i understand the rules now. iam very sorry.
-
hazem! this is your professor from teh university. whent i heard of your posted homoworks on the cpian websites i had a doubt it could be true. then i am seeing it before mine own eyejob and i must not have a blow doubt about it@! i told must students of sensual nature never to post, no, on the homoCpians websites! becauze you do this horrible thing i must give you the utter cursings of shiva brama and krisna and blue man group. vile humo shiva bar kuntso! p.s. plus blackened grade. and no more sensual acts with student at the university. :((
Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas
iam so sorry i understand the rules now..... iam so sorry....
-
I want your help in my project(Hanoi Tower2).... Towers of Hanoi The ancient folklore behind the “Towers of Hanoi” puzzle is quite well known. A more recent legend tells us that once the Brahmin monks discovered how long it would take to finish transferring the 64 discs from the needle which they were on to one of the other needles, they decided to find a faster strategy and be done with it. One of the priests at the temple informed his colleagues that they could achieve the transfer in single afternoon at a one disc-per-second rhythm by using an additional needle. He proposed the following strategy: • 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. He calculated the value of k which minimized the number of movements and found that 18,433 transfers would suffice. Thus they could spend just 5 hours, 7 minutes, and 13 seconds with this scheme versus over 500, 000 million years without the additional needle! Try to follow the clever priest’s strategy and calculate the number of transfers using four needles, where the priest can move only one disc at a time and must place each disc on a needle such that there is no smaller disc below it. Calculate the k that minimizes the number of transfers under this strategy. Input The input file contains several lines of input. Each line contains a single integer 0 ≤ N ≤ 10, 000 giving the number of disks to be transferred. Input is terminated by end of file. Output For each line of input produce one line of output which indicates the number of movements required to transfer the N disks to the final needle. Sample Input 1 2 28 64 Sample Output 1 3 769 18433 can u help me....
Hi, I can confirm 18,433 transfers is correct minimum for 64 discs. You can solve all such problems with a little program (below 50 lines of code). :)
Luc Pattyn [My Articles]