community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.

Challenge #148: Rotating Century Puzzle

Sr. Learning Strategy Manager
Sr. Learning Strategy Manager

 

This week, we got a real puzzler of a puzzle. Before we talk a bit about it, a big shout out and thanks to @patrick_digan@brianaburke002, and @DultonM for sending me this challenge and solution. If anyone here every comes across a great challenge, feel free to message us with your idea! Some of our best challenges come from people like Patrick, Briana, and Dalton who come up against a problem and challenge themselves to solve it in Alteryx.

 

rcp.jpg

Let's try and solve this puzzle using Alteryx! There are 6 Rings  in this puzzle, with 6 numbers in each ring. Notice that you can rotate the rings and get 6 different rows of data. For example, one row could have 22 in Ring 1 (outermost), 7 in Ring 2, 16 in Ring 3,  2 in Ring 4, 18 in Ring 5 and 4 in Ring 6 (innermost). Summing these up, that row has a value of 22+7+16+2+18+4=69. The goal is to rotate the Rings until all 6 rows sum up to 100. For example, you could rotate it to get 15+12+13+26+5+29=100, but the next row would necessarily be 20+14+32+8+34+6=114. Can you rotate the Rings to the correct position? 

Bolide

Cheers! This was a lot of fun!

Spoiler
I used an iterative macro to simulate a turning of each circle. Here is what I came up with.

Challenge_148.PNGMy Workflowchallenge_148_1.PNGMy Iterative Macro
Highlighted

Fun one.

 

Spoiler
2019-01-14_18-10-01.jpg
Alteryx Certified Partner

The idea of an iterative macro got stuck in my head when I started. I was finished by the time I realized how inefficient the solution was. Oh well, it works. 

 

Meteoroid

Couldn't figure out at first how to automatically get the answer, instead built a macro to mimic the rotations so you can play the game as it was intended.

 

 

Spoiler
Solution.PNGOutput.PNG

 

 

Meteor

My Solution (not the neatest) 

 

Spoiler
challenge_148_solution_SP.JPG
Asteroid

Challenge Completed 

Asteroid

Mine is a bit of a trainwreck, but it seems to get the job done.  RIP, my brain!

 

Spoiler
148EW.PNG
Bolide

Solution attached.

Quasar

Didn't finish early enough today for the first approach to be a unique solution, so added another :)

 

 

Spoiler
Create all combinations of wheels with Append Fields.

First approach was like many, using MOD to give each arrangement of the rings a unique code. Matching codes mean they're all in the same arrangement (you can add a summarize tool, and there are a total of 6 records per unique code). Check which spokes add up to 100. Count the total records in each unique code, and filter out for the code that appears 6 times in the result. Join back to the data to pull in the values and remove unwanted field.

Second approach, had to be different. Took a little longer. Instead of the matching unique codes, created a string that shows the position of each wheel (e.g., 112233), and then the position of the next set of numbers as you move clockwise (e.g. 223344). Filter out for spokes that add to 100, and join back to original data to bring in the next spoke clockwise for each of those arrangements - join on next position field on those that add to 100 to position field on original data. Filter out for spokes in the second match that add to 100. Still more than 6 records. Rinse and repeat join and filter process. Down to 6 records!! Check that the positions make sense

PosStringNextPosString
112231223342
223342334453
334453445564
445564556615
556615661126
661126112231

Reorder rows, and remove fields we don't need

FUN!!!!
image.png