This question has been answered
Question

Use the above ideas to define a function psuccessperm(k,p) to compute

the permuted probability of success in k guesses. Check your function by computing the permuted probability of success for k=5 and 7.
(in R studio)
psuccess<-function(k,p){
 sum(p[1:k])
}


p<-c(0.22, 0.13,0.15, 0.02, 0.08, 0.1, 0.1, 0.1, 0.05, 0.05)


#apply the function here
psuccess(5,p)
psuccess(7,p) 


output is:
[1] 0.6 [1] 0.8



Discuss how the cryptographer could use these ideas to generate a better key if p is the distribution vector he has to work with?

Answered by Expert Tutors
Step-by-step explanation
The student who asked this found it Helpful
Overall rating 100%
Use the above ideas to define a functionpsuccessperm(k,p)to compute the permuted probability of success in k guesses. Check your function by...
Get unstuck

367,984 students got unstuck by Course
Hero in the last week

step by step solutions

Our Expert Tutors provide step by step solutions to help you excel in your courses