BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple LabVIEW Puzzle Challenge

After more than a year, I'm bringing this thread back from the dead!  If you're a GAMES magazine subscriber, then you've already received the February 2010 issue that has the "Starstruck" puzzle on its cover.  For those of you who haven't seen it, you have to get from Earth to Mars in 21 days, visiting each of the other six (sorry, Pluto) planets along the way.  Each planet has a path to each other planet, but the travel times vary.  I would post a screenshot, but I don't want to get sued for violating copyright.

 

Anyway, I stared at the puzzle  for half an hour over dinner tonight, and after coming up with solutions that were 22 or 23 days several times, I decided to be a nerd and write a VI to solve it (instead of just flipping to the solution):

 

planetpuzzle.png 

Yeah, I own a Mac (mini).  Big whoop, wanna fight about it?  Anyway, it's a brute force randomized approach, but I found that it took anywhere between 1 and 10 milliseconds to run each time.  I've attached it below (saved in 8.5).

 

So are we gonna resurrect this thread, or will it be another year before I feel motivated to solve a GAMES puzzle with LabVIEW again?  🙂 

Message 81 of 192
(5,535 Views)

Cute!

 

This is one of these problems that get out of had very quickly with the number of stops. (O(N!)), but 6 is trivial. 😄

 

Have a look at some of the strategies on the Wikipedia page of you want to solve much bigger trips.

Message Edited by altenbach on 12-08-2009 08:32 AM
Message 82 of 192
(5,502 Views)

Darren,

 

I like the nerd approach (and your solution)!!  This is basically a travelling salesman puzzle.  I didn't know GAMES magazine was still being published.  I subscribed for several years as a teenager, but that was long ago.  The strange thing is that you got the Feb 2010 issue at the beginning of Dec 2009.  That just seems a little early to me.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 83 of 192
(5,500 Views)
I've noticed that as a subscriber, I tend to get the issues in the mail earlier than they appear on the shelves at the bookstore.  But yeah, I don't have much time to do the puzzles these days, but I almost always find time to work on the Cryptic Crosswords, which are definitely my favorite puzzles in the entire magazine.
Message 84 of 192
(5,487 Views)

OK I have run into a real world problem that I think may make a fun 2010 puzzle challenge.  Spring is in the air, at least in Illinois.  It has to do with Soccer but you can substitute in your favorite team sport.

 

You have a team of 15 players.  By the rules of the league all players are required to play the same amount of time (goalie excluded).  So this leaves 14 players that get to play a total of 90 * 10 = 900 minutes (The goalie gets to play 90min straight).  The question is how do you sub the players such that every one gets equal sub/playing time?  There are 4 subs out to start.

 

-SS



0 Kudos
Message 85 of 192
(5,194 Views)
How many games?
0 Kudos
Message 86 of 192
(5,187 Views)
Just one game for now:)  -SS


0 Kudos
Message 87 of 192
(5,186 Views)
I take it you cannot put a player back on the field after they have been taken off?
0 Kudos
Message 88 of 192
(5,179 Views)

Yes you have to put players back in, when a sub comes off the field, and people can sub more than once.

You have to always have 11 players on the field including the goalie.

I guess the real problem is how to demonstrate the solution using LabVIEW.  It's kind of a simplified scheduling problem:)

 

-SS



0 Kudos
Message 89 of 192
(5,180 Views)

SS,

 

Would probably want to define max minutes a player could play in a single stretch as well.

0 Kudos
Message 90 of 192
(5,180 Views)