r/codegolf • u/LT_Wobbles • Jun 01 '14
[perl] Reversible Substitution Algorithm
I propose a new challenge.
write a program in the shorted amount of characters which:
Takes an input string
Performs 3 different substitution on the string (swapping every two characters, reversing the string, replacing all characters with equivalent hex values, etc, be creative)
Perform a 1/2 rotation substitution. Essentially each letter maps to the 13 letter over in the alphabet
The algorithm must be reversible. Meaning I enter a string like "hello" and get some nonsense like "ryubb", and when I make "ryubb" the input I should get "hello".
View all comments
Show parent comment
1
u/autowikibot Jun 01 '14
Involution (mathematics):
Interesting: Semigroup with ^involution | Telephone number ^(mathematics) | Fricke ^involution | Rosati ^involution
Parent commenter can toggle ^NSFW or ^delete. Will also delete on comment score of -1 or less. | FAQs | ^Mods | Magic ^Words