Latest News Feb 10 6:46AM EST 

The winners page is now online. Find out more about our winners and read their contest stories! We've also posted some statistics and commentary about the evolution of the contest and an analysis of some of the code

Per Rutquist is our overall MATLAB Golf Champion. He came away with two first place finishes and two second place finishes. We'll send him a MATLAB Jacket.

Congratulations to all of our first-place finishers: Guy Shechter, Imre Polik, Stijn Helsen, Per Rutquist, Claus Still, François Glineur, and Nicke. You will each receive a MATLAB toolkit.

You can now download the full testsuites used in the contest from the File Exchange.

If you'd like to hear about the next contest, sign up for our Contest Announcement mailing list. To subscribe send e-mail to lists@mathworks.com with subscribe contest-announce in the body.

All holes: frequencies, palindrome, encryption, infection, heaviest, pathfinder, and snake.

Encryption

Given a plaintext message a and a code word b, generate the coded message c with a transposition cipher. The plaintext will be lowercase chars with spaces. Spaces should be left untouched. So when

a = 'message text'
b = 'math'

apply the code word to the length of the message and then encode using a simple transposition cipher for each letter in the plaintext as determined by the corresponding letter in the code word. A transposition cipher is a simple rotation and wrap. The "a" cipher maps a -> a, or no change at all. The "b" cipher maps a -> b, b -> c, and so on. The "n" cipher is the equivalent of a rot13 encryption.

plaintext : message text
code word : mathmathmath

m cipher  : yqeemsq fqjf
a cipher  : message text
t cipher  : fxlltzx mxqm
h cipher  : tlzzhnl alea

encoded   : yelzmgx feqa

Leaders

Place Submitted Entry Author Length
1 17:12:08 PCode Per Rutquist 45
2 17:09:17 test_7 tweak christian ylämäki 48
3 17:03:14 hmm hmm HA jed pack 49
4 16:56:56 peng04 peng 51
5 16:53:54 sheapshots christian ylämäki 52
6 16:28:52 N! jed pack 53
7 16:19:04 hmmmm jed pack 54
8 16:17:46 hmm jed pack 55
9 16:16:52 hmmm jed pack 56
10 16:14:38 test_2 Stijn Helsen 62
11 16:14:04 test_1 Stijn Helsen 63
12 16:12:39 try 4 Christopher Cheng 64
13 16:12:05 test_0 Stijn Helsen 68
14 16:11:47 Attempt #1 Bowen Kerins 71
15 16:10:12 try 3 Christopher Cheng 78
16 16:08:40 try 2 Christopher Cheng 81
17 16:08:03 bruteforce1 walter kuhn 91


 golf_1_encryption
 
Home

Rules

This hole (closed)

     The challenge

     Show all entries

     Search for an entry

Message board

Hall of fame

Send us feedback