a) Suppose N = 8. What is the maximum number of DECIMAL digits that can be gener
ID: 1811188 • Letter: A
Question
a) Suppose N = 8.
What is the maximum number of DECIMAL digits that can be generated with this choice of N (ie. the maximum length of the sequence of decimal numbers that could be generated with this choice of N, before any number repeats itself)?
What is the maximum number of BINARY digits that can be generated with this choice of N (ie. the maximum length of a binary keytext that could be generated with this choice of N; think how many bits you need for EACH decimal number)?
Make sure to get part (a) correct first before attempting part (b). They are somewhat related.
b) Suppose now we have a secret message that is 110 BINARY digits long.
What is the smallest power of 2 needed to generate a binary codeword long enough for this message? i.e. find N (= 2k) =
What is the maximum number of binary digits that can be generated with this choice of N?
c) The numbers N, A, and B are usually published so that everyone knows them. Suppose A= 21, B= 5, N= 8, and the initial value (or seed) is X(0)=1. Write down the first six decimal numbers that are generated by this algorithm.
X(0)=1
X(1)=
X(2)=
X(3)=
X(4)=
X(5)=
X(6)=
Is this a good random number generator?
d) Now A=431, B=97, N=32, and the initial value X(0)=125. Write down the first six decimal numbers that are generated by this algorithm.
Tries 0/4Explanation / Answer
maximum length=2^n-1:n=8;so maximum length =256-1=255;
b) part length=64<110<128 therefor 128 so N==7
and maximum length will be 127
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.