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.
Getting started with Designer? | Start your journey with our new Learning Path!
SOLVED

Challenge #159: April ENcyptanalytics

Alteryx
Alteryx

The last time I posted a challenge (#155) it dealt with string analysis and decrypting a message from a noisy block of text.

 

People have been interested in how I came up with the data block for the challenge.

 

I decided this would be a good opportunity to let you be creative and show me!

 

The challenge this week is to create an ENCODER for a message that is compatible with the DECODER we built in challenge #155.

 

The easiest thing to do would be to simply generate some number of copies of the input message
(even just copying out the original message), but let us disqualify all such non-encodings!

 

Comet

Here's my solution. My first 1st post :)

Spoiler
So I decided to encode my message by using the CharToInt function and then using a random number generate add a random number to the converted character to integer.

Challenge 159.PNG

A snippet of my encoded message:

Challenge 159 Encoded Message.PNG

Fun!

Spoiler
I just generated random data using ASCII characters 33-133 and then replaced the most popular +least popular characters with the intended letter. I added the least popular letter to avoid any ties.
Capture.PNG
Alteryx Partner

Fun! Will look for a more efficient method later. I had to make my own list of characters which probably made it more complicated than necessary.

 

Spoiler
2019-04-09 12_07_12-Alteryx Designer x64 - 159..yxmd.png

 

 

 

 

Alteryx Partner
Alteryx Partner

Interesting challenge :)

Spoiler
Untitled.png
Nebula
Nebula

Fun Challenge @TerryT .  

 

Encoded strings

 

Encoded strings.png

 

Spoiler
WF.png

 

Dan

Magnetar
Magnetar

Me: This looks like a tricky one, but I'm sure I can get there using the skills I already have using the basic tools that I'm most familiar with.

 

Also me: ... Although this seems like a good time to try learning Python, on an extremely difficult challenge, even though I've never used it before... right?!?

 

Spoiler
I created an app for mine, in the end - allows the user to enter a string to be encoded, along with desired minimum number of rows to be included in the block of text (more may be added in order to get to the desired max number per character in each position, but this at least ensures a minimum number of rows).

AppParameter159.JPG

Workflow then parses the original message, feeds parameters into the Python tool, and uses the numpy.random.randint() function to create an array based on integers 32-127 (which will get converted back to standard A-Z a-z 0-9 & common symbol characters in the latter part of the workflow). I count the max number of occurrences of any character in each position of the resulting randomized array, and then add that many occurrences + 1 of the original characters to the array to ensure that my desired characters are the ones that occur the most. I then pivot the data, use a RandInt formula to come up with a new random order per position, sort the data using the new random order, un-pivot the fields, and then concatenate by row. 

WeeklyChallenge159.JPG

The results will then output your Encoded Text Block as well as a copy of your Original Text for validation.

EncodedBlockText159.JPG

Extremely pleased that I eventually figured this one out... and jumping in the deep end appears to be the way to go with Python, because that was SUPER fun and now I want to try more :) #neverstoplearning #andnevertakeeasywayout

 

Cheers!!

NJ

Asteroid

Here is my solution

Bolide

I am a huge fan of this series! Thanks @TerryT! Next maybe we can tackle KRYPTOS with Alteryx! 

Spoiler
I definitely struggled with this one initially (should never try and do these at the end of a work day). I could not figure out how I was going to break a tie if two characters had the same number of occurrences. I then decided just grabbing the top two. It is a bit of overkill, but this way I can ensure success of no ties.
Challenge 159.PNG
Asteroid

Thanks @TerryT  nice challenge!! Right now, I feel like a spy in the Cold War haha

 

Hope you like my solution

 

Spoiler