Number of combinations for the first code: N1=106=1000000.N_1=10^6=1000000.N1=106=1000000.
Number of combinations for the second code: N2=103∗242=576000.N_2=10^3*24^2=576000.N2=103∗242=576000.
i) Since N1>N2N_1>N_2N1>N2, the first code is better.
ii) N=N1N2=1000000∗576000=576000000000=5.76∗1011.N=N_1N_2=1000000*576000=576000000000=5.76*10^{11}.N=N1N2=1000000∗576000=576000000000=5.76∗1011.
P=1N=1.7361∗10−12.P=\frac{1}{N}=1.7361*10^{-12}.P=N1=1.7361∗10−12.
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments