Older Contests
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP ContestsOlder Contests

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 14th, 2002, 09:32 PM
daeken daeken is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Chambersburg, PA, USA
Posts: 14 daeken User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to daeken Send a message via Yahoo to daeken
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?

Reply With Quote
  #2  
Old November 14th, 2002, 10:39 PM
webhappy webhappy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Silicon Valley, CA, USA
Posts: 203 webhappy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: algorithm

Maybe it isn't as impossible as I thought...

Only a little more than a week left... hm...

Reply With Quote
  #3  
Old November 14th, 2002, 10:55 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to notepad
RE: algorithm

Quote:
I was able to get (number_of_discs_in_stack - 1) moves as the maximum number of moves for ANY stack

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

Reply With Quote
  #4  
Old November 14th, 2002, 11:30 PM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 12 m 16 sec
Reputation Power: 7
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


Reply With Quote
  #5  
Old November 14th, 2002, 11:33 PM
notepad notepad is offline
Codewalkers Loyal (3000 - 3499 posts)
 
Join Date: Apr 2007
Location: Central, IL USA
Posts: 3,214 notepad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to notepad
RE: algorithm

doh! alright leave me alone

Reply With Quote
  #6  
Old November 14th, 2002, 11:54 PM
diclophis diclophis is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Tampa. FL, USA
Posts: 35 diclophis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via ICQ to diclophis Send a message via AIM to diclophis Send a message via Yahoo to diclophis
RE: algorithm

5
3
6
1
4
2

how many does this take?

Reply With Quote
  #7  
Old November 15th, 2002, 01:22 AM
daeken daeken is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Chambersburg, PA, USA
Posts: 14 daeken User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to daeken Send a message via Yahoo to daeken
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....

Reply With Quote
  #8  
Old November 15th, 2002, 03:43 AM
diclophis diclophis is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Tampa. FL, USA
Posts: 35 diclophis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via ICQ to diclophis Send a message via AIM to diclophis Send a message via Yahoo to diclophis
RE: algorithm

haha, it looks liek your flipping from both sides of the stack...

Reply With Quote
  #9  
Old November 15th, 2002, 03:46 AM
webhappy webhappy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Silicon Valley, CA, USA
Posts: 203 webhappy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: RE: RE: algorithm

Quote:
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



On the 3rd flip, looks like he's flipping a middle of it ?

Reply With Quote
  #10  
Old November 15th, 2002, 09:59 PM
-vertigo- -vertigo- is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Louth, Lincolnshire
Posts: 314 -vertigo- User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 24 sec
Reputation Power: 3
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).

Reply With Quote
  #11  
Old November 16th, 2002, 12:24 PM
TCR TCR is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Denmark, Copenhagen
Posts: 22 TCR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to TCR
RE: algorithm

=>> -vertigo-
I also got 10 moves it your number combination... dont think i can get it lower.... Hard work... but still...

Reply With Quote
  #12  
Old November 16th, 2002, 01:59 PM
TCR TCR is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Denmark, Copenhagen
Posts: 22 TCR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to TCR
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... Let fix the bugs ;)

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


Reply With Quote
  #13  
Old November 16th, 2002, 02:15 PM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 12 m 16 sec
Reputation Power: 7
RE: algorithm

You can display it any way you choose...

Reply With Quote
  #14  
Old November 16th, 2002, 02:45 PM
TCR TCR is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Denmark, Copenhagen
Posts: 22 TCR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to TCR
RE: algorithm

Matt,
Just one thing more...
What error level do you set? You do not write anything about that this time?

Reply With Quote
  #15  
Old November 16th, 2002, 05:04 PM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 12 m 16 sec
Reputation Power: 7
RE: algorithm

error_reporting = E_ALL & ~E_NOTICE

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > algorithm


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek