Search for question
Question

2. Hidden multi-linear functions (part II) [12 points].

Let p be prime and n ≥ 2. Let a2,...,an € Zp and o: Z → Zp be any permutation

(which means that the mapping σ is 1-to-1 and onto). Define f: (Z₂)" → Z, as

f(x₁,x2,...,xn) = 0 (₁ + a₂x₂ +

+ ann mod p),

(2)

for all x₁, x2,..., In € Zp. Note that this is similar to the function in question 1, Eq. (1),

except for these two notable differences:

• In Eq. (2), the first coefficient is set to 1 (i.e., a₁ = 1).

mod p

• In Eq. (2), an arbitrary permutation on Z, is applied to a₁ + a22+ + Ann

(whereas, in Eq. (1), the permutation is of the restricted form o(z)=z+ b mod p).

Suppose that you are given access to a black-box that, on input (₁, 2,...,n) € (Z₂)",

produces f(x₁,x2,...,n) as output, but you do not know what the linear coefficients

a2,..., an are, nor the permutation o. Your goal is to determine the linear coefficients

a₂....,an. For this question, it suffices to determine the answer with success probability

at least 1-in all cases (i.e., for every instance f of the form of Eq. (2)).

Give a quantum algorithm that solves this problem making only one f-query (with success

probability at least 1-3). Explain why your algorithm works.

Fig: 1


Most Viewed Questions Of Data Structures And Algo

3. We have a two-word query. For one term the postings list consists of the following 16 entries: [4,6,10,12,14,16,18,20,22,32,47,81,120,122,157,180] and for the other it is the one entry postings list: [47]. Work out how many comparisons would be done to intersect the two postings lists with the following two strategies. Briefly justify your answers (Let (x,y) denote a posting comparison. x refers to a value in the upper list and y refers to a value in the lower list) write down those comparisons): a. Using standard postings lists b. Using postings lists stored with skip pointers, with a skip length of VP (for a postings list of length P).


(a) Give the standard Theta (O(. )) form for each of the following functions. (E.g., 2n + 3 would be written as O(n).) [10 marks] \text { 1. } 5 n^{3}+n^{4}+3 n(\log n)^{10} \text { 2. } 25 \log n+2 n+7777 \text { 3. } 3 \log \left(n^{4}\right) \text { 4. } \frac{n(n+1)(2 n+1)}{6} \text { 5. } 2 n+3 n(\log n)^{2}+2 (b) Put the following Theta classes in order of increasing growth (e.g.,increasing running times). [10 marks] \Theta(\log n), \quad \Theta\left(n^{2}\right), \quad \Theta\left(n^{2} \log n\right), \quad \Theta(1), \quad \Theta(n) \Theta\left(\frac{n^{2}}{\log n}\right), \quad \Theta\left(\sqrt[4]{n^{9}}\right), \quad \Theta\left(2^{n}\right), \quad \Theta\left(n(\log n)^{2}\right), \quad \Theta(n !) :) Following are some big-Oh relationships. For each, give witnesses no and c that can be used to prove the relationship. Choose your witnesses to be minimal, in the sense that no – 1 and c are not witnesses, and ifd < c, then no and d are not witnesses. [9 marks] 16 n^{2} \text { is } \mathcal{O}\left(n^{4}\right) 3^{n+5} \text { is } \mathcal{O}\left(3^{2 n}\right) n^{2} \text { is } \mathcal{O}(n !)


2. An algorithm takes 0.5 ms for input size 100. How long will it take for input size 500 if the running time is the following (assume low order terms are negligible) a. Linear b. O(NlogN) c. Quadratic


Draw the binary tree representation of the following arithmetic expression (((5+2) * (2-1)) / ((2+9) + ((7−2) − 1)) * 8) Write this expression to its postfix equivalent.


5. Consider the following fragment of a positional index with the format: word: document: (position, position, ...); document: (position, ...) Gates: 1: (3); 2: (6); 3: (2,17); 4: (1) IBM: 4: (3); 7: (14) Microsoft: 1: (1); 2: (1,21); 3: (3); 5: (16,22,51) The /k operator, word1 /k word2 finds occurrences of word1 within k words of word2 (on either side), where kis a positive integer argument. Thus k=1 demands that word1 be adjacent to word2. a. Describe the set of documents that satisfy the query Gates /2 Microsoft. b. Describe each set of values for k for which the query Gates /k Microsoft returns a different set of documents as the answer.


(a) Suppose you work for a major airline and are given the job of writing the algorithm for processing upgrades into first class on various flights. Any frequent flyer can request an upgrade for his or her up-coming flight using this online system. Frequent flyers have different priorities, which are determined first by frequent flyer status (which can be, in order, silver, gold, platinum, and super) and then, if there are ties, by length of time in the waiting list. In addition, at any time prior to the flight, a frequent flyer can cancel his or her upgrade request (for instance, if he or she wants to take a different flight), using a confirmation code they got when he or she made his or her upgrade request. When it is time to determine upgrades for a flight that is about to depart, the gate agents inform the system of the number, k, of seats available in first class, and it needs to match those seats with the k highest-priority passengers on the waiting list. Describe a system that can process upgrade requests and cancellations in O(log n) time and can determine the highest-priority flyers on the waiting list in O(k log n) time, where n is the number of frequent flyers on the waiting list.


1. The following pairs of words are stemmed to the same form by the Porter stemmer. Which pairs would you argue shouldn't be conflated. Give your reasoning. a. abandon/abandonment b. absorbency/absorbent c. marketing/markets d. university/universe e. volume/volumes


Which of the below is the correct way to call the function " ": A. cout<<myFunction(10 , 12.45); O B. myFunction (7, 4); O C. myFunction(12.5, 11.8); D. cout<<myFunction(10.7, 6);


What is the output of the following piece of code? #include <iostream> using namespace std; int main() { int array [] = {1, 2, 3, 4, 5); cout<<array[4]; return 0; }


Northeastern University CET2200 – Data Structures and Algorithms Homework 4 1. Order the following functions by growth rate N, N1.5, N2, √N, NlogN, 2N.