mercredi 17 juin 2015

MATLAB code for using a Markov chain for evalutating an entropy noise source

I am trying to integrate page 68 of this PDF into MATLAB code: http://ift.tt/1rMqgMu

I have included these instructions as an image here:

As I know nothing or very little of Markov chains, I am first confused by the instructions signifying what oi is. "oi denotes the number of times that state i has occurred in the sample". What is state i?

Step 4 is probably the most difficult of them all. I have no idea how to calculate S or anything like that.

Here is my beginning code:

function minEntropy = markovTest(points, bitSize)
if bitSize > 6
    err('Maximum of 6 bits are allowed for Markov test, re-map inputs as in 7.2')
end
k = 128;
alpha = 0.05;
alpha = min(alpha^(bitSize^2),alpha^k);
% Estimate the initial state probability distribution:
e = sqrt(log(1./(1-alpha))./(2*N));
N = length(points);
oi == ?
Pi = min(1, oi./N + e);
??? hat to do next?
end




Aucun commentaire:

Enregistrer un commentaire