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 18th, 2002, 02:51 PM
tchala tchala is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Manchester, UK
Posts: 59 tchala User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Worst case scenario

Thought some peeps might like some worst case scenarios

I wrote a little script that works out every permutation of a stack

Below are 3 of the 455 stacks that take 9 flips to solve for an 8 disc stack - sort of puts paid to those claims of 'I can do it in N-1' !

I ain't running this with any more than 8 discs 'cos this run took 14Mb and 10:52:30 to complete - 9 would take weeks...

1-3-2-4-6-8-5-7
6-8-4-2-7-5-8-6
7-1-4-2-6-8-3-5

Reply With Quote
  #2  
Old November 18th, 2002, 03:32 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: Worst case scenario

I once thought I had proved mathematically that it was possible to solve any and all of these problems in N-1. The problem was finding the algorithm.

I'll look and see...

Mean while, a quick question: Does your "Every possible permutation" allow for duplicate flips? Example:

[pre]
Step: 1-2-3-4
3 7 8 7
7 3 3 3
8 8 7 8
[/pre]

You see, even though this is "a" possible 4th level permutation, the stack is still solvable with 1 flip... I will check my research again, but if I remember correctly, after N-1 permutations, everything was a duplicate from some past permutation.

Reply With Quote
  #3  
Old November 18th, 2002, 04:08 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: Worst case scenario

1 3 2 1 7 5 6 8 1
3 1 1 2 5 7 8 7 2
2 2 3 3 8 8 7 6 3
4 4 4 4 6 6 5 5 4
6 6 6 6 4 4 4 4 5
8 8 8 8 3 3 3 3 6
5 5 5 5 2 2 2 2 7
7 7 7 7 1 1 1 1 8

Is this the solution? If not, could you post the solution - Shouldn't there only be one optimum solution?

Reply With Quote
  #4  
Old November 18th, 2002, 04:21 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: Worst case scenario

Heh - proof by example - 9 is _not_ the optimum solution

Stacks are vertical:

6 8 4 7 5 8 6 2
8 5 2 2 4 8 6 4
4 7 7 4 2 7 5 5
2 2 5 5 7 2 4 6
7 4 8 8 8 4 2 6
5 8 8 8 8 5 7 7
8 6 6 6 6 6 8 8
6 6 6 6 6 6 8 8

Reply With Quote
  #5  
Old November 20th, 2002, 11:35 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: Worst case scenario

As posted before on the forum:

5,3,6,1,4,2 has a solution of 7.

That should get all of you thinking "I can do it in N-1" to think again. (And I have tested all permutation of 6 numbers, and worst case is 7. I have also tested all permutation of 7..)

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > Worst case scenario


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 10 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek