PDA

View Full Version : Christmas Challenge: Day 21



Chippiewill
21-12-2011, 05:02 PM
Ok, so a very difficult challenge here today (I'd say the hardest actually), enjoy working out how to solve RAID. It turns out that Father Christmas's computer had a hard drive failure, however, he did use RAID5 for redundancy. He lost six bytes of data in total (Adding up to a WHOPPING six letters.

Most of you probably don't know how raid5 works, it uses XOR, the beauty of XOR is that it's very durable. XOR basically means output 1 if the two inputs are different and 0 if they're the same:

http://www.cybermike.net/reference/liec_book/Digital/04116.jpg

This is useful for backing up, because it turns out that XOR can be used to replace lost bits. For example

01 and 11 go into an XOR gate and gives: 10 (1 and 0 give 1, 1 and 1 gives 0), say now we lost one of these pairs of bits, 11, we can substitute the output of the XOR gate, called a parity into the lost pair to give 01 and 10, if we XOR these we get 11 as our output, which happens to be our lost pair of bits. As you can see, it's very good for data recovery. In fact the same applies if we originally had 3 or 300 pairs of bits, we can just substitute in our parity and recover the lost bit (You XOR the first pair and the XOR the parity with the third one and then the fourth and so on.

So, now to start recovering Santa's data:



01001101 [M]
01100101 [E]
01110010 [R]
01110010 [R]
01111001 [Y]

00100000 [SPACE]

CORRUPT! [00110101]
01101101 [M]
CORRUPT! [00010010]
01110011 [S]


00100000 [SPACE]
CORRUPT! [01100101]
01110110 [V]
CORRUPT! [00010011]
01110010 [R]
CORRUPT! [00001011]
01101111 [O]
01101110 [N]
01100101 [E]
CORRUPT! [01000101]


Next to the corrupted bytes I have included the Parity for the pair of bytes. The last corrupted byte for whatever reason has a parity shared with the all of last four of the bytes so you'll have to xor the the last four bytes (In order!) with the parity substituted for the last.

I'll help you with the first one!


CORRUPT! [00110101]
01101101 [M]

Hmm, well, let's just substitute in the parity for the lost byte:
00110101 XOR 01101101,

0 and 0 -> 0
0 and 1 -> 1
1 and 1 -> 0
1 and 0 -> 1
0 and 1 -> 1
1 and 1 -> 0
0 and 0 -> 0
1 and 1 -> 0

01011000 goes to X, so now we have Xm s what could it be...

For your efforts I'll give 2 months for the pairs of XOR and another month for the quadruplet. Do your worst!

Apologies if there's an error, this is very easy to mess up, I'll be checking my XORing over the next couple of minutes.
Edit: All of my XORs are correct. You might be able to guess them but you won't learn anything that way, do the long way and you'll learn something new about computers.

Chippiewill
21-12-2011, 08:38 PM
"Judge Judy" impressively managed to complete this behemoth. I didn't even expect anyone to do the last one. It's still worth a shot at doing this, it's a good learning experience.

Want to hide these adverts? Register an account for free!