subject

Suppose we are given an array A that contains n distinct integers. Our goal is to find a "nice" pivot A[m] that has the following property: A[m] lies between the (n/10)-th smallest and the (n/10)-th largest element of A. You have access to a quantum oracle Q that works as follows: Q(A0 ) returns the median of an array A0 in constant time whenever A0 has at most n 1/3 elements. Q does not work when the input array has more than n 1/3 elements. Design and describe an efficient algorithm that returns a nice pivot of A by using the quantum oracle Q. Analyze the running time and argue the correctness of your algorithm. You can assume that it only takes constant time to submit subarray A[i..j] of A to the quantum orcale Q. Creating an array of size k takes Θ(k) time.‘

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:30, alexandramendez0616
Jasper and samantha are in a robotics competition. the guidelines state that the robots should be able to move a 10-gram weight at least 2 meters and turn in a circle. jasper and samantha have already built the robot. which step of the design process should they follow next to decide whether their robot meets the minimum criteria for the competition?
Answers: 1
image
Computers and Technology, 22.06.2019 10:40, pbarbee3034
Nims is applicable to all stakeholders with incident related responsibilities. true or false
Answers: 1
image
Computers and Technology, 23.06.2019 21:00, kkpsmith
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
image
Computers and Technology, 23.06.2019 22:30, kayelynn003
How many points do i need before i can send a chat
Answers: 1
You know the right answer?
Suppose we are given an array A that contains n distinct integers. Our goal is to find a "nice" pivo...

Questions in other subjects: