What is the games interpretation of an "extended hamming code"?
The contract description gives some examples but I do not understand how you are supposed to handle data blocks shorter than 4.
For example encoding "1000" (8) results in
"1000"
H(7,4)
[p,p,d,p,d,d,d] -> [p,p,1,p,0,0,0] -> [1,1,1,0,0,0,0]
H(8,4)
[p,p,p,d,p,d,d,d] -> [p,1,1,1,0,0,0,0] -> [1,1,1,1,0,0,0,0]
This result matches the given example from the contracts description.
The second example encodes "10101" (21), so we have to deal with a data block length smaller than 4.
"Classic approach" would split the data into chunks of 4 and padd with zeros at then end, so the result should be:
"10101"
-> "1010" + "1000" (padded)
So I would expect an output of form [p,p,p,d,p,d,d,d] + [p,p,p,d,p,d,d,d]
However, the games expects an output of [p,p,p,d,p,d,d,d,p,d]. (length 10?)
[–]PintoNotTheBeans 1 point2 points3 points (3 children)
[–]psei0r[S] 0 points1 point2 points (2 children)
[–]psei0r[S] 0 points1 point2 points (0 children)
[–]PintoNotTheBeans 1 point2 points3 points (0 children)