So as I said, this problem is related to the ASCII decoding problem from the final last year. The key to solving the problem is coming up with the correct interpretation of “Checkerboard”. In the competition we had to give a few hints when the teams headed off with a 2D interpretation, but it's much simpler than that: all we've done is reverse the bits of every second character. I meant to use another language for this sample answer but I was having fun with AS3, so here's another one in ol' faithful:
package {
import flash.display.Sprite;
import flash.text.TextField;
public class CheckerboardMatrix extends Sprite {
public function CheckerboardMatrix() {
var source : String =
"010101001001011101100101110111110100110110011110011101001000110101101001" +
"100001110010000010001000011000011000110000100000100111100010000010011000" +
"011100101001101001100001100010110010000010010010011011111000100101101001" +
"100110100010111011011111001000001010101101101111100100000010000010011101" +
"011000011001101100100000100010110110100010011010011110011101111101101110" +
"100110100111011010011010011100101101111101101101100111100110010010011010" +
"001000001001111001101110100001100010000010001100011001011000111001110101" +
"10011010011011001000110000101110";
var c : Number;
var out : Array = new Array();
var f : TextField = new TextField();
for (var i : Number = 0; i <= source.length - 1; i++) {
if (i % 8 == 0)
c = 0;
if (i % 16 < 8)
c += ((source.charAt(i) == "1") ? 1 : 0) * Math.pow(2, 7 - (i % 8));
else
c += ((source.charAt(i) == "1") ? 0 : 1) * Math.pow(2, 7 - (i % 8));
if (i % 8 == 7)
out.push(String.fromCharCode(c));
}
f.text = 'The answer is "' + out.join('') + '"';
f.width = 800;
addChild(f);
}
}
}
The decoded string is 'The Matrix was a great movie. Too bad they never made any sequels.' — a tip of the hat to our favourite online comic :-). Watch out for the final question from round one tomorrow.
Cheers, Robin