How to decode a Hadamard message that was encoded using the inner product method?

50 Views Asked by At

I encoded a message $x = 110$ using the inner product method described on this wikipedia page: https://en.wikipedia.org/wiki/Hadamard_code

Inner product method

This method uses the following formula:

$<x,y> = \sum\limits_{i=1}^k (x_i y_i)$ mod $2$

and

$pHad(x) = (<x,y>)_{y \in \{1\} \times \{0,1\}^{k-1} }$

In words: we need to do a "crossproduct mod 2" between $x$ and all possible values of $y$ where $y$ starts with 1, or y = {100, 101, 110, 111}

To calculate $pHad(x)$:

$(1 \cdot 1 + 1 \cdot 0 + 0 \cdot 0)$ mod $2 = 1$

$(1 \cdot 1 + 1 \cdot 0 + 0 \cdot 1)$ mod $2 = 1$

$(1 \cdot 1 + 1 \cdot 1 + 0 \cdot 0)$ mod $2 = 0$

$(1 \cdot 1 + 1 \cdot 1 + 0 \cdot 1)$ mod $2 = 0$

So the encoded message of $x = 110$ is $pHad(x) = 1100$.

Now my question is, how do I get from the encoded message back to my original message $x$?

EDIT: I have seen the decoding algorithm on the wiki, but I do not understand it. It says I have to pick "j uniformly at random"? This seems like only a way to prove correctness, not an actual algorithm I can use..