For the knight puzzle, if someone decides to try it, try to tweak your code once your done to solve the following puzzle:
Puzzle #4A Using the knight regular move on the chess board, make it go through every single tile without ever touching the same one twice. It's a simple exercise of recursion but it might be challenging in LabVIEW. I'll give it a thought as well.
Finally, Darren, if you're really into those mind games, I used to play a lot with the "Binary Arts"(now ThinkFun I believe) puzzles. My favorite games in there were Rush Hour (which would be a pretty amazing challenge to solve in LabVIEW) and Lunar Lockout. I wrote a solver in C for that one and it was capable of genrating new challenges as well.
Was that a tumble weed that rolled by?....
OK Knight's tour is admittedly involved, I recently read that Steve Wozniak solved this puzzle using BASIC so it's certainly doable.
Let's shoot for something fun and easy for Simple LabVIEW Puzzle #5. This one was made famous by Abbott And Costello. Costello manages to prove to Abbot three separate ways that 13 X 7 = 28.
The question is how many other number combinations can be made to follow these same simple rules of revised math and what are they? -SS
I'm a little too young to have ever watched the show on TV but it is quite funny! I was also surprised by the number of times their maths are actually right in this problem. I counted 22 when using the numbers [10..99] and [1..9] with the numbers between 10 and 20 being the best candidates. I don't know what the rules would be if we picked higher numbers so I limitted myself there. Thanx for the laugh.
Congradulation OlivierL! And what is your prize? Why you get to pick the next Simple LabVIEW #6 challenge. <insert one man clapping>
Remember keep it fairly simple but fun. If you choose not to accept this "prize" the automated system will automatically choose one for you
Again thank you for playing. -SS
Simple LabVIEW #6 is about a taxi cab and what is refered to as the Hardy-Ramanujan Number. This is the smallest number that can be expressed, two different ways, as the sum of two cubes.
I'm thinking 15mins tops to solve this puppy Have a nice weekend. -SS
I cringe at the orange wires imposed by the "power of three". I prefer the compound multiply node instead, keeping things all blue. 🙂
While Labview does a good job folding your duplicate operations, I would prefer of you would place the constant computations out by a few loops, where the inputs change for the first time. You are also doing twice too many tests (A^3+B^3 vs. B^3+A^3) that's why you need to check for degenerate solutions.
Here's my alternative. (I am still not sure if you are theoretically guaranteed to get the lowest solution this way.)
... and here's a version that does not use the outer array:
My VIs have built-in error handling and return "0" if you solution is found (e.g. if the upper limit is too low). It is left to the student to figure out why. 😄
(note the Rube Goldberg construct in my previous version. We can remove the "index array" and tap in the the +1 output nearby instead. We need to keep the "index array" if we want to precompute the cubes in the init loop, and thus avoiding duplicate work, e.g. as follows)