Pergunta

I am working through Cover, Thomas "Elements of Information Theory" and want to try and implement a simple example of a binary symmetric channel. That is to say, I can specify a message "1001", an encoding "11000011" (basically repeat each bit twice), a channel law: p(y|x), and I'd like to see my posterior at the receiver update.

Now in all honesty, I don't even know where to begin, and I can't seem to find much hlep online. Most of what I find is using Matlab's simulink to abstract away the process. I actually want to specify distributions as vectors, etc etc. Any pointers would be great!

Edit: I don't know if this question fits better over at DSP.SE but if so, I can move it over.

Foi útil?

Solução

Binary symmetric channel is just flipping bits with a certain probability.

x = [1, 1, 0, 0, 0, 0, 0, 0, 1, 1];
p = 0.1; % with probability p, make an error
errorbits = rand(size(x)) < p; % toss some biased coins and make a logical index
y = x; % first perfectly copy
y(errorbits) = 1 - y(errorbits); % make 0 -> 1 and 1 -> 0

Do you see how this is a $P(y|x)$ that implements the symmetric binary channel?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top