Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

1. Consider the following randomized algorithm for generating biased random bits. The subroutine FAIRCOIN returns either 0 or 1 with equal probability; the random bits returned by FAIRCOIN are mutually independent.
ONEINTHREE:
if FAIRCOIN = 0
return 0
else
return 1 - ONEINTHREE
(a) Prove that ONEINTHREE returns 1 with probability 1/3.
(b) What is the exact expected number of times that this algorithm calls FAIRCOIN?
(c) Now suppose you are given a subroutine ONEINTHREE that generates a random bit that is equal to 1 with probability 1/3. Describe a FAIRCOIN algorithm that returns either 0 or 1 with equal probability, using ONEINTHREE as your only source of randomness.
(d) What is the exact expected number of times that your FAIRCOIN algorithm calls ONEINTHREE?

2.Consider the following algorithm for finding the smallest element in an unsorted array:
RANDOMMIN(A[1 .. n]):
min ← ∞
for i ← 1 to n in random order
if A[i] < min
min ← A[i] ( )
return min
(a) In the worst case, how many times does RANDOMMIN execute line ( )?
(b) What is the probability that line ( ) is executed during the nth iteration of the for loop?
(c) What is the exact expected number of executions of line ( )

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9117771
  • Price:- $45

Guranteed 36 Hours Delivery, In Price:- $45

Have any Question?


Related Questions in Computer Engineering

Suppose that a weapons inspector must inspect each of 4

Suppose that a weapons inspector must inspect each of 4 different sites 2 times, visiting one site per day. The inspector is free to select the order in which to visit these sites, but cannot visit site X, the most suspi ...

Systems analysis project personal trainer inc owns and

Systems analysis project Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company is planning an international expansion by opening a new "superce ...

A series of information frames with a mean length of 100

A series of information frames with a mean length of 100 bits is to be transmitted across the following data links using an idle RQ protocol. If the velocity of propagation of the links is 2 * 10 8 ms -1 , determine the ...

Under the trade model with external economies of scale is

Under the trade model with external economies of scale, is it possible for a country to be worse off with trade than it would have been without trade? Justify your answer.

Assume newspaper for garbage or recycling has a standard

Assume newspaper for garbage or recycling has a standard deviation of 2 pounds. If we want to estimate the average amount of newspaper for garbage or recycling within .25 pounds with 90% confidence, how many households m ...

Design a moore machine where the output y goes high 1 when

Design a Moore machine where the output Y goes high (=1) when the last four bits of the input X were 1110: 4th to last bit seen = 1 3rd to last bit seen = 1 2nd to last bit seen = 1 Last bit seen = 0 Your machine must be ...

Why regulated industries should be required to follow

Why regulated industries should be required to follow security standards. Provide 2 examples of industries that would fall under this category.

Do research to identify three organizations that develop

Do research to identify three organizations that develop and operate e-commerce Web sites for their clients. Visit their Web sites and identify current job openings. What sort of responsibilities are associated with thes ...

Java program that does the following please use simple

Java program that does the following: Please use simple computer syntax. More easy to understand! Use a while loop to prompt the user to enter 10 rain falls. Calculate and output the total and the average rain fall. Find ...

On a string s we have the following elementary operations i

On a string s, we have the following elementary operations: i) Insertion of a single letter into the string s, e.g., BT ? BAT. ii) Deletion of a single letter in the string s, e.g., CAT E ? CAT. iii) Substitution of one ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As