This was an extra credit
problem in one of my Scientific Computing classes. It doesn't
have any fancy graphics, but I think it is rather cool.
We studied a bit of cryptography in the class, so I created a
Mathematica function called "Encrypt". This function takes in
a list of 10 integers and returns a list of 10 integers.
Mathematica allows you to hide any code that you
write, and so I could provide this function to the students without
them being able to see how the function works.
I used my function to encrypt a particluar message, and I provided the
hidden function and the encrypted message to the students.
Their goal was to decrypt the message, i.e, break the code,
i.e., figure out how the function works. The extra credit was
written to encourage students to work together.
I am happy to say that a group of three students did in fact decrypt
the message. They did this by decrypting half of the message,
and then guessing what the other half was. So they never
actually figured out how "Encrypt' worked. But then, the goal was to decrypt the message, and they did that..
To try to break the code, download both of these files:
- codebreak.nb
- Mathematica notebook describing the extra credit problem and
providing the message to be broken.
- encrypt2 -
Hidden Mathematica code for the function "Encrypt".