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, 22.06.2019 06:00
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
Need asap write a short paper describing the history and differences between six sigma, waterfall, agile, and scrum models. understanding these models can give you a good idea of how diverse and interesting it development projects can be. describe what the rationale for them is and describe their key features. describe the history behind their development. at least 400 words
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
Consider the following declarations (1, 2, 3, 5, 7)class bagtype{public: void set(string, double, double, double, double); void print() const; string getstyle() const; double getprice() const; void get(double, double, double, double); bagtype(); bagtype(string, double, double, double, double); private: string style: double l; double w; double h; double price; }; a.) write the definition of the number function set so that private members are set according to the parametersb.) write the definition of the member function print that prints the values of the data membersc.) write the definition of the default constructor of the class bagtype so that the private member variables are initialized to "", 0.0, 0.0, 0.0, 0.0, respectively d.) write a c++ statement that prints the value of the object newbag.e.) write a c++ statement that declares the object tempbag of type bagtype, and initialize the member variables of tempbag to "backpack", 15, 8, 20 and 49.99, respectively
Answers: 3
question
Computers and Technology, 23.06.2019 12:30
How is the brightness of oled of the diaplay is controled
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
question
Mathematics, 24.09.2020 06:01
Questions on the website: 13722360