1. Engineering
  2. Computer Science
  3. for q5 use c language to do the programming part...

Question: for q5 use c language to do the programming part...

Question details

Prob. 2 (10pts) Let A and B be two events. Find the largest and smallest possible values P(AUB) can take in terms of P(A) and P(B) and give examples in which these values can be attained. Prob. 3. (10pts) A six-sided die is loaded in a way that each even face is twice as likely as each odd face. All even faces are equally likely, as are all odd faces. Construct a probabilistic model for a single roll of this die and find the probability that the outcome is less than 4 Prob. 4 (20pts) The release of two out of three prisoners has been announced, but their identity is kept secret. One of the prisoners considers asking a friendly guard to tell him who is the prisoner other than himself that will be released, but hesitates based on the following rationale: at the prisoners present state of knowledge, the probability of being released is 2/3, but after he knows the answer, the probability of being released will become 1/2, since there wil be two prisoners (including himself) whose fate is unknown and exactly one of the two will be released. What is wrong with this line of reasoning? Prob. 5 (20pts) (Birthday attack) A birthday attack is a type of cryptographic attack that exploits the mathematics behind the birthday problem i probability theory. It can be used to find collisions in a cryptographic hash function. Suppose that we have a hash function which, when supplied with a random input, returns one of 256 equally likely values. The attack generates n random inputs, supplies them into the hash function, and obtains n returned values (each is chosen from the 256 possible values uniformly at random). Use MATLAB or other programming language, compute and plot the probability of at least two returned values being the same (i.e., collision happens), for n 1 to 30. (Submit your math formula, the code, and a nice-looking plot.)
For Q5, use C language to do the programming part.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution