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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 05:30
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
question
Computers and Technology, 24.06.2019 12:50
Write a new lc-3 trap subroutine (i.e. a subroutine that will be invoked via the trap instruction) that will receive a numeric digit entered at the keyboard (i.e. an ascii character), echo it to the screen, and return in r0 the corresponding numeric value: so if the user types the digit '7', the character '7' will appear on the screen, but the value returned in r0 will be b0000 0000 0000 0111 (#7) you may not use any trap calls in your code - you must implement the "polling" code that interrogates the keyboard status and data registers. ; getnum_tsr ; a subroutine for obtaining a numeric value ; given ascii numeric digit input to keyboard. ; the numeric digit is echoed to the console (e.g. '7' = b0000 0000 0011 0111), ; but the value returned in r0 is the actual numeric value ; corresponding to the digit (e.g. b0000 0000 0000 0111 =
Answers: 3
question
Computers and Technology, 25.06.2019 01:00
Your computer will organize files into order. alphabetical chronological size no specific
Answers: 2
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
question
Mathematics, 11.12.2020 06:20
question
Mathematics, 11.12.2020 06:20
question
Biology, 11.12.2020 06:20
question
Mathematics, 11.12.2020 06:20
question
Mathematics, 11.12.2020 06:20