Question

We have a function F : {0, . . . , n − 1} → {0,...

We have a function F : {0, . . . , n − 1} → {0, . . . , m − 1}. We know that, for 0 ≤ x, y ≤ n − 1, F((x + y) mod n) = (F(x) + F(y)) mod m. The only way we have for evaluating F is to use a lookup table that stores the values of F. Unfortunately, an Evil Adversary has changed the value of 1/5 of the table entries when we were not looking. Describe a simple randomized algorithm that, given an input z, outputs a value that equals F(z) with probability at least 1/2. Your algorithm should work for every value of z. Your algorithm should use as few lookups and as little computation as possible. Suppose you are allowed to repeat your initial algorithm three times. What should you do in this case, and what is the probability that your enhanced algorithm returns the correct answer?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer: part 1: Randomized algorithm otwo Let us picla an x, uni tormly at random, From coin-i] Then, we compute y=Z-x modn.- parta: JF We can repeat the algorithm three times, we pick thre e value cwith replacement). Of Y, Yz. 43 as our y valve, an

Add a comment
Know the answer?
Add Answer to:
We have a function F : {0, . . . , n − 1} → {0,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT