# BreakPoint

cancel
Showing results for
Did you mean:

## Re: Simple LabVIEW Puzzle Challenge

Ravens Fan wrote:

Which were you thinking of as the challenge, LV program to solve and finding the solution?  Or a LV program as a game to help a person to discover the solution.?

Either would be acceptable, but the game sounds like it would take longer.  -SS

Message 11 of 192
(7,835 Views)

## Re: Simple LabVIEW Puzzle Challenge

Ok, I'll go first.  Here's a brute force approach that discovers the optimal time very quickly.  Theoretically this approach could take an extremely long time if the random pulls are infinitely unlucky.  I'm guessing some math whiz could come up with a better way to pre-calculate all the possible combinations and just run through those.

Here's a screenshot of the diagram, and the VI (saved in LabVIEW 7.0) is attached below.

-D

P.S. - GAMES magazine is awesome!  My favorite puzzles are Cryptic Crosswords and Cartoon Rebuses.

Message Edited by Darren on 09-09-2008 12:19 PM
Message 12 of 192
(7,823 Views)

## Re: Simple LabVIEW Puzzle Challenge

Darren,

Excellent! I love the icon  -SS

Message 13 of 192
(7,820 Views)

## Re: Simple LabVIEW Puzzle Challenge

Darren,

After further review I realize your solution doesn't actually provide or show the order of who went where and when

But it's still the only attempt so far.  -SS

Message 14 of 192
(7,802 Views)

## Re: Simple LabVIEW Puzzle Challenge

Easy enough to add...the data was on the diagram, just needed to add it to the panel:

-D

Message Edited by Darren on 09-09-2008 04:43 PM
Message 15 of 192
(7,800 Views)

## Re: Simple LabVIEW Puzzle Challenge

Darren,

Looks like you're the only one to take the challenge.  I really like your very simple brute force approach.  When I solved the problem I got it stuck in my head to use toggling back and forth between moving two over and one back.  I was playing around with logical checks such as 5 & 10 must go together but gave up since it made the vi very complicated.

I plan on creating another solution that generates all possible solutions as you suggested.

Here is my solution, FYI you solved the puzzle much faster than I did using LabVIEW very impressive.

I will post a new puzzle shortly.  -SS

Message Edited by ShotSimon on 09-10-2008 09:33 AM

Message 16 of 192
(7,774 Views)

## Re: Simple LabVIEW Puzzle Challenge

OK LabVIEW puzzle #2 is more challenging and is known as a magic star.  I will provide the start to one solution but would like to see someone solve for all solutions.

The rules are similar to a magic square.  Using the integers 1-12, each only once, complete the magic star such that each line of four number's sum is equal to the same number 26.

Since this is a harder puzzle I may post a new puzzle before this one is completely solved by someone.

Regards,

-SS

Message Edited by ShotSimon on 09-10-2008 10:49 AM

Message 17 of 192
(7,767 Views)

## Re: Simple LabVIEW Puzzle Challenge

Here's my solution for the Magic Star.  It generated 960 solutions.  Since there are over 479 million combinations of the numbers 1-12 in the star, it took this VI a couple of hours to run.  Again, I used a brute force approach, but this time I was able to calculate every single possible combination (compared to the random combinations I used in the Bridge Crossing problem).  Also, credit partially goes to a permutation VI I found at http://www.fafiles.com/examplevis.php that I used as inspiration in calculating my permutations.

The VI is saved in LabVIEW 8.5 this time, since I used For Loop with Break in my solution.

-D

Message Edited by Darren on 09-10-2008 03:02 PM
Message 18 of 192
(7,741 Views)

## Re: Simple LabVIEW Puzzle Challenge

Darren,

That is amazing and very well done.  My guess is you are a puzzle master.

I've decided to leave Puzzle #3 open for you to choose...since I can't give away prizes

Try to keep the level of difficultly between LabVIEW Puzzle #1 and Puzzle #2.  -SS

Message 19 of 192
(7,732 Views)

## Re: Simple LabVIEW Puzzle Challenge

Darren,

This is known as a magic star order 6 and has 80 solutions.  I think the 960 comes about if you count rotated solutions as different solutions, so you are correct.

It is interesting to note some people solve all 80 with paper and pencil using logic no programming.  -SS

Message Edited by ShotSimon on 09-10-2008 04:25 PM

Message 20 of 192
(7,725 Views)