encoding and decoding randomly
Posted: Fri Nov 06, 2015 8:09 am
There is a file which includes words from beginning of 26 letter english alphabet to end about 16000 or more Like *words.lisp* of content,
As I said the alphabet file also there is. Like, *alph.lisp* of content
I have been trying to write a function that finds the encoder of a given encrypted paragraph using the words file. As you can see, words are represented as atom lists and paragraphs are represented as list of lists (word lists). Alphabet is defined as atom list. Encrypted paragraph will be the argument of the function and as known the words and alphabet. Encoder is a one-to-one, randomly shuffled alphabet
I want advices what should I do? How can I start?
Could you guide?
Code: Select all
(defparameter *words* '(
(a b a c a)
(a b a c a s)
(a b a c k)
.
.
.
.
(z y m o t i c)
(z y m u r g y))
Code: Select all
`(defparameter *alphabet* '(a b c d e f g h i j k l m n o p q r s t u v w x y z))`
Code: Select all
Original Paragraph:
((A N X I O U S) ( H O M E ) ( N O I S E ))
Encrypted Paragraph:
((G P N Y A X Q) ( J A B L ) ( P A Y Q L ))
Alphabet: (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
I try to find the encrypter
Encrypter : (G Z O C L H T J Y M E R B P A F W K Q I X U S N V D)
Code: Select all
Example input
(find-encrypter '((G P N Y A X Q) ( J A B L ) ( P A Y Q L )))
Example output:
(G Z O C L H T J Y M E R B P A F W K Q I X U S N V D)