|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
algorithm
With my algorithm, I was able to get (number_of_discs_in_stack - 1) moves as the maximum number of moves for ANY stack... anyone able to beat this?
|
|
#2
|
|||
|
|||
|
RE: algorithm
Maybe it isn't as impossible as I thought...
Only a little more than a week left... hm... |
|
#3
|
|||
|
|||
|
RE: algorithm
Quote:
4-2-3-1 1-3-2-2 3-1-1-3 2-4-4-4 four discs, can you get minus one with that one? i wanna see a visual plzkthx |
|
#4
|
|||
|
|||
|
RE: algorithm
4-2-3-1
1-3-2-2 3-1-1-3 2-4-4-4 what you just posted is n-1 .... original: 4 1 3 2 after first flip: 2 3 1 4 after second flip: 3 2 1 4 after third flip: 1 2 3 4 |
|
#5
|
|||
|
|||
|
RE: algorithm
doh! alright leave me alone
|
|
#6
|
|||
|
|||
|
RE: algorithm
5
3 6 1 4 2 how many does this take? |
|
#7
|
|||
|
|||
|
RE: RE: algorithm
5-5-1-1-1
3-3-4-3-2 6-2-2-2-3 1-4-3-4-4 4-1-5-5-5 2-6-6-6-6 n-1 -edit- I just realized how badly I don't follow the rules code pending fixing.... |
|
#8
|
|||
|
|||
|
RE: algorithm
haha, it looks liek your flipping from both sides of the stack...
|
|
#9
|
|||
|
|||
|
RE: RE: RE: algorithm
Quote:
On the 3rd flip, looks like he's flipping a middle of it ? |
|
#10
|
|||
|
|||
|
RE: algorithm
Interestingly enough, after looking at those numbers of yours, diclophis, I notice my algorith needed some adjustment. It took 8 steps, whereas I see now it can easily get 7.
Another interesting set of numbers are: 6, 3, 7, 9, 2, 4, 1, 8, 5. I've got ten flips on that one. I think the winner of this comp should be eligable for the Nobel Prize for Algorithmic Development (if only). |
|
#11
|
|||
|
|||
|
RE: algorithm
=>> -vertigo-
I also got 10 moves it your number combination... dont think i can get it lower.... |
|
#12
|
|||
|
|||
|
RE: algorithm
Hmmm.... i looks like i have a kind of error...
with your numbers i have ten moves... but but... when I output every move, I looks like i make moves, that just move itself Well.. basicly i really have 7 moves then... BTW Matt... im really not interested in making a nice output... I very hard. Is it okay every step just shown with etc.. 3-2-1 1-2-3 |
|
#13
|
|||
|
|||
|
RE: algorithm
You can display it any way you choose...
|
|
#14
|
|||
|
|||
|
RE: algorithm
Matt,
Just one thing more... What error level do you set? You do not write anything about that this time? |
|
#15
|
|||
|
|||
|
RE: algorithm
error_reporting = E_ALL & ~E_NOTICE
|
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > algorithm |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|