Inner Product Oracle can Estimate and Sample
Arijit Bishnu, Arijit Ghosh, Gopinath Mishra, Manaswi Paraashar
aa r X i v : . [ c s . CC ] J un Inner Product Oracle can Estimate and Sample ∗ Arijit Bishnu † Arijit Ghosh ∗ Gopinath Mishra ∗ Manaswi Paraashar ∗ Abstract
Edge estimation problem in unweighted graphs using local and sometimes global queries is afundamental problem in sublinear algorithms. It has been observed by Goldreich and Ron [GR08],that weighted edge estimation for weighted graphs require Ω( n ) local queries, where n denotesthe number of vertices in the graph. To handle this problem, we introduce a new inner productquery on matrices. Inner product query generalizes and unifies all previously used local querieson graphs used for estimating edges. With this new query, we show that weighted edge estimationin graphs with particular kind of weights can be solved using sublinear queries, in terms of thenumber of vertices. We also show that using this query we can solve the problem of the bilinearform estimation, and the problem of weighted sampling of entries of matrices induced by bilinearforms. This work is a first step towards weighted edge estimation mentioned in Goldreich andRon [GR08]. The
Edge Estimation problem for a simple, unweighted, undirected graph G = ( V ( G ) , E ( G )), | V ( G ) | = n , where G is accessed using queries to an oracle, is a fundamental and well studiedproblem in the area of sublinear algorithms. Goldreich and Ron [GR08], motivated by a work ofFiege [Fei06], gave an algorithm to estimate the number of edges of an unweighted graph G by using e θ ( n/ √ m ) local queries, where m = | E ( G ) | . The local queries they use are – degree query : theoracle returns the degree of a vertex, and neighbor query : the oracle reports the i -th neighbor of avertex, if it exists. Apart from that, an often used local query is the adjacency query : the oraclereports whether there exists an edge between a given pair of vertices. In the same work, Goldreichand Ron observed that Ω( n ) degree and neighbor queries are essential for the Weighted EdgeEstimation problem, where the objective is to estimate P e ∈ E ( G ) w ( e ) for any arbitrary weightfunction w : E ( G ) → R + . We have not observed any development till date on the WeightedEdge Estimation problem. Another research direction that emerged was to consider oracles thatcan handle queries that are global in nature [RT16, DL18, BHR +
18, RSW18], as opposed to theearlier local queries. Most of these queries come under the group query or subset query definedin [RT16]. In particular, Beame et al. [BHR +
18] showed that the
Edge Estimation problem canbe solved using O (cid:0) log n/ǫ (cid:1) many Bipartite Independent Set ( BIS ) queries (in the worstcase). A
BIS oracle takes two disjoint subsets A and B of vertices and reports whether there existsan edge with endpoints in both A and B . Note the improvement in the number of queries as weused a powerful oracle.Faced with the negative result of a lower bound of Ω( n ) local queries [GR08] and the use ofpowerful oracles, a natural question to ask is – are there interesting weight functions and query ∗ This work was submitted to RANDOM-APPROX’19 on 3 May 2019. † Indian Statistical Institute, Kolkata, India Given an ǫ ∈ (0 , Edge Estimation problem to report ˆ m such that | ˆ m − | E ( G ) || ≤ ǫ | E ( G ) | e θ ( · ) and e O ( · ) hides a poly(log n, /ǫ ) term in the upper bound. racles with not too much of power that can handle the Weighted Edge Estimation problem?
The weight function that we study in this paper is motivated from Wiener number of vertex weightedgraphs [KG97] and quadratic forms on graphs [AMMN05]. The graph G has a weight functionon the vertices f G : V ( G ) → { , , . . . , γ } that is known apriori, and the objective is to estimate Q = P { u,v }∈ E f G ( u ) f G ( v ) or a more generalized quantity stated in terms of bilinear form estimationof a matrix. We show a lower bound of Ω( n ) on the number of local queries to estimate Q (SeeSection 2). The next obvious question is how does BIS measure up to the problem of estimating Q .We can show that O (cid:0) γ log n/ǫ (cid:1) many BIS queries are enough to estimate Q (see Appendix B).Faced with this contrasting scenario, the query oracle that we work with is motivated by two recentworks [BLWZ19, SW]; the query is to an unknown matrix and is linear algebraic in nature. Theoracle implementation can be naturally supported by any reasonable data structure storing a graph.The query oracle proposed encompasses the local queries and is obviously more powerful than localqueries but is surely less powerful than BIS . We next describe formally our query oracle and theproblems considered. We start with the notations used.
Notations:
In this paper, we denote the set { , . . . , n } by [ n ] and { , . . . , n } by [[ n ]]. Throughoutthis paper, n = | V ( G ) | or the number of rows or columns of a square matrix A , that will be clearfrom the context. Without loss of generality, we consider n to be a power of 2. f G denotes theweight function on the vertices of G . For a matrix A , A ij denotes the element in the i -th rowand j -th column of A . A i, ∗ and A ∗ ,j denote the i -th row and j -th column vector of the matrix A , respectively. A ∈ [[ ρ ]] n × n means A ij ∈ [[ ρ ]] for each i, j ∈ [ n ]. Throughout this paper, vectorsare matrices of order n × x i denotes the i -th element of thevector x . denotes x with all x i = 1. h x , y i is the standard inner product of x and y , that is, h x , y i = P ni =1 x i y i . p is an (1 ± ǫ )-approximation to q means | p − q | ≤ ǫq . By high probability, wemean the probability of success is at least 1 − /n c , where c is a positive constant. Let S be a fixed set of vectors in R n . Our query oracle gives access to an unknown matrix A ∈ [[ ρ ]] n × n . Inner Product Oracle ( IP S ): For a matrix A of order n × n , given an index i ∈ [ n ] for a row anda vector v ∈ S as input, the IP S oracle access to A reports the value of h A i ∗ , v i . Similarly, given anindex j ∈ [ n ] for a column and a vector v ∈ S as input, the IP S oracle reports the value of h A ∗ j , v i .If the input index is for row (column), we refer the corresponding query as row (column) IP S query.The main problem considered in this work is Bilinear-Form-Estimation S ( x , y ), in short, Bfe S ( x , y ) and is defined as follows. Input:
Two vectors x ∈ [[ γ ]] n , y ∈ [[ γ ]] n , IP S oracle access to a matrix A , and ǫ ∈ (0 , Output:
An (1 ± ǫ )-approximation to x T A y .Note that graphs can be stored as matrices. So Edge Estimation , Weighted Edge Es-timation problems are special cases of
Bfe S ( x , y ). Apart from Bfe S ( x , y ), we also consider Sample Almost Uniformly S ( x , y ), in short, Sau S ( x , y ), which is defined as follows. Input: IP S access to a matrix A having only non-negative entries and a parameter ǫ ∈ (0 , Output:
Report Z satisfying (1 − ǫ ) x i A ij y j x T A y ≤ P ( Z = A ij ) ≤ (1 + ǫ ) x i A ij y j x T A y .Observe that sampling edges of a graph almost uniformly , studied by Eden and Rosenbaum [ER18],is a special case of Sau S ( x , y ). 2 P { , } n as an unified framework for all local queries in a graph: Let us consider theadjacency matrix A of an unweighted and undirected graph G . Let V ( G ) = [ n ] and let { , } n denote the set of n -dimensional vectors with entries either 0 or 1. The degree of a vertex a ∈ [ n ]is h A a ∗ , i and ( a, b ) ∈ E ( G ) if and only if h A a ∗ , v i = 1, where v is the vector such that v b = 1and v k = 0 for k = b . So, degree and adjacency queries are special cases of IP { , } n . Also, observethat the i -th neighbor of a given vertex a can be determined by log n many IP { , } n queries. Hence, IP { , } n has an unified framework for all local queries in a graph. Additional power of IP { , } n – Find random element of a given row: Unlike local queries,we can sample an element of a given row in proportion to its value in the given row by using only O (log n ) many IP { , } n queries. The formal procedure Regr is described in Algorithm 1.
Random-element-of-given-row ( Regr ) plays a central role to solve
Bilinear-Form-Estimation and
Sample Almost Uniformly . A pseudocode for
Regr is given in Algorithm 1. We formally
Algorithm 1 : Regr ( x , i ) Input : A vector x ∈ { , } n such that the 1’s in x are consecutive and the number of 1’s is apower of 2, an integer i ∈ [ n ] and IP { , } n access to a matrix A . Output : A ij with probability A ij · x j h A i, ∗ , x i along with the row indices i and j . begin if (the number of ’s in x is 1) then Report h A i, ∗ , x i as the output along with the indices from row and column of the only non-zero element. else Form a vector y ( z ) in { , } n by setting second (first) half of the nonzero elements in y ( z ) to 0 and keeping the remaining elements unchanged.Determine h A i, ∗ , y i and h A i, ∗ , z i . With probability h A i, ∗ , y ih A i, ∗ , z i report Regr ( y , i ) and with probability h A i, ∗ , z ih A i, ∗ , x i report Regr ( x , i ). end state Observation 1.1 about the procedure Regr . Observation 1.1.
Regr takes i ∈ [ n ] as input, outputs A ij with probability A ij x j / (cid:16)P j ∈ [ n ] A ij (cid:17) by using O (log n ) IP { , } n queries to matrix A .A striking feature of our algorithm is that the queries required by our algorithm can be imple-mented in O (1) time as mentioned in Appendix A. All of our algorithmic and lower bound results are randomized. For S = { , } n and x = y = ,we denote Bfe S ( x , y ) and Sau S ( x , y ) by Bfe and
Sau , respectively. We first discuss our resultswhen A is a symmetric matrix, A ij ∈ [[ ρ ]] ∀ i, j ∈ [ n ] and x = y = . Though our main focus isto estimate the bilinear form x T A y , we show that it is enough to consider the case of symmetricmatrix A and x = y = , that is, T A . The extension for general A and x , y can be deduced bysome simple matrix operations and properties of IP S oracle as shown in Appendix C.3he results for Bfe and
Sau when the matrix A is symmetric, is given in Table 1. Note thatthe queries made in the above case when A is symmetric are only row IP { , } n queries. The resultsfor Bfe S ( x , y ) and Sau S ( x , y ) are presented in Table 2.Problem Upper bound Lower bound Bfe { , } n ( , ) e O (cid:16) √ ρn √ T A (cid:17) Ω (cid:16) √ ρn √ T A (cid:17) Sau R n ( , ) e O (cid:16) √ ρn √ T A (cid:17) Ω (cid:16) √ ρn √ T A (cid:17) Table 1: Query complexities for
Bfe S ( x , y ) and Sau S ( x , y ) when x = y = . The upper boundholds for S = { , } n and the lower bound holds for S = R n . The stated result is for any matrix A and when A ij ∈ [[ ρ ]] ∀ i, j ∈ [ n ].Problem Upper bound Lower bound Bfe S ( x , y ) e O (cid:16) √ ργ γ n √ T A (cid:17) Ω (cid:16) √ ργ γ n √ T A (cid:17) Sau { , } n ( x , y ) e O (cid:16) √ ργ γ n √ T A (cid:17) Ω (cid:16) √ ργ γ n √ T A (cid:17) Table 2: Query complexities for
Bfe S ( x , y ) and Sau S ( x , y ), where the upper bound holds for S = S ∗ and the lower bounds hold for S = R n .According to our results on Bilinear-Form-Estimation as mentioned in Table 2, the weightededge estimation problem of estimating Q = P { u,v }∈ E f G ( u ) f G ( v ) can be solved with e O ( √ ρ n/ √ m )queries. Also, according to our results on Sample Almost Uniformly , an edge from a weightedgraph can also be sampled almost uniformly with the same number of queries, which is a general-ization of the result by Eden and Rosenbaum [ER18].
In Section 2, we show that
Weighted Edge Estimation problem even for a special kindof weight function requires Ω( n ) many queries if we are allowed to make only local queries. InSections 3 and 4, we give algorithms for Bfe and
Sau using IP { , } n query oracle, respectively.In Section 5, we show that our algorithms for Bfe and
Sau are tight. Appendix A describes anefficient implementation of
Inner product oracle. In Appendix B, we show how
BIS is useful tosolve
Weighted Edge Estimation Problem for a special class of weight function on edges. InAppendix C, we extend the algorithm for
Bfe and
Sau for symmetrix matrix to general cases. Westate some standard form of Chernoff bound in Appendix D. Appendix E contains a missing prooffrom Section 3.
Theorem 2.1.
Let ǫ ∈ (0 , / , ρ ≥ . Any algorithm that reports a (1 ± ǫ ) -approximation to Q = P { u,v }∈ E ( G ) f G ( u ) f G ( v ) for a graph G with known weight function f G : V ( G ) → [ ρ ] , withprobability at least / , requires Ω( n ) many local queries to the graph G .Proof. Note that n = | V ( G ) | . Without loss of generality assume n is even and n >
36. Partition V ( G ) into two parts V and V ρ such that | V | = | V ρ | . The weight function f G is defined as follows. f G ( v ) = 1 if v ∈ V and f G ( v ) = ρ if v ∈ V ρ . Consider the two families of graphs G and G ρ on n vertices as follows. 4 Each graph in G ( G ρ ) consists of an independent set of size n − √ n , • H ( A , A ) , H ( A , A ) and H ( A , A ) such thateach A i , i ∈ [6], is of size √ n , • In G , A , . . . , A ⊂ V ρ and A , A ⊂ V ; while in G ρ , A , . . . , A ⊂ V ρ and A , A ⊂ V .Note that any two graphs in the same family differ only in the labeling of vertices. Verify that for G ∈ G , P { u,v }∈ E ( G ) f G ( u ) f G ( v ) = ( ρ + 2) n and for G ∈ G ρ , P { u,v }∈ E ( G ) f G ( u ) f G ( v ) = (2 ρ + 1) n .Let us consider the following problem, where G is chosen from either G or G ρ with equal proba-bility and our objective is to decide whether G ∈ G or G ∈ G ρ . Considering the fact that ρ ≥ ǫ < /
5, observe that any algorithm A that finds an (1 ± ǫ )-approximation of P { u,v }∈ E ( G ) f G ( u ) f G ( v ),can decide the class of G . So, we will be done by showing that we cannot decide the class of G unless we make sufficiently large number of local queries.Each graph in class G has 4 √ n many vertices from V and 2 √ n many vertices form H ( A , A ) ∪ H ( A , A ) ∪ H ( A , A ). Whereas, each graph in class G ρ has 4 √ n many vertices from V ρ and 2 √ n many vertices form V . Note that unless our algorithm hits √ n + 1 many vertices of the same weightfrom H ( A , A ) ∪ H ( A , A ) ∪ H ( A , A ) that is from I = S i =1 A i , it cannot determine the classto which G belongs. As we are using only local queries, the probability of hitting such a vertexfrom I is 4 √ n/n , which is O (1 / √ n ). So, the number of queries required to hit a vertex from I isΩ ( √ n ). Hence, we need Ω( n ) many local queries to hit √ n + 1 many vertices from I , that is, todecide the class to which G belongs, with probability 2 / Bilinear-Form-Estimation
Theorem 3.1.
There exists an algorithm for
Bfe that takes ǫ ∈ (0 , / as input and determinesan (1 ± ǫ ) -approximation to T A with high probability by using e O (cid:16) √ ρn √ T A (cid:17) many IP { , } n queriesto a symmetric matrix A ∈ [[ ρ ]] n × n .Proof. The algorithm is a generalization of the “bucketing technique” first given by Feige [Fei06]which was strengthened later by Goldriech and Ron [GR08]. Consider a partition of [ n ], thatcorresponds to the set of the indices of the rows of the symmetric matrix A , into buckets with theproperty that all j ’s present in a particular bucket B i have approximately the same value of h A j ∗ , i .Concretely, for all j ∈ B i , (1 + β ) i − ≤ h A j ∗ , i < (1 + β ) i , where β = O ( ǫ ). As h A j ∗ , i ≤ ρn foreach j ∈ [ n ], there will be at most O (log( ρn )) buckets. Based on the number of rows in a bucket,we classify the buckets to be either large or small . To define the large and small buckets, we requirea lower bound on the value of T A . However, this restriction can be removed by using a standardtechnique in property testing [GR08, ELRS17]. Let V, U ⊆ [ n ] be the sets of indices of rows thatlie in large and small buckets, respectively. For I ⊆ [ n ], let x I denote the sub-vector of x inducedby the indices present in I . Similarly, for I, J ⊆ [ n ], let A IJ denote the sub-matrix of A where therows are induced by the indices present in I and columns are induced by the indices present in J .Observe that T A = V T A V V V + V T A V U U + U T A UV V + U T A UU U The algorithm begins by sampling K rows of A independently and uniformly at random withreplacement, and for each sampled row j , the algorithm determines h A j ∗ , i by using IP { , } n oracle. This determines the bucket in which each sampled row lies. Depending on the number ofsampled rows present in different buckets, our algorithm classifies each bucket as either large or5mall. Let ˜ V and ˜ U be the indices of the rows present in large and small buckets as classified bythe algorithm, respectively. Note that T A = ˜ V T A ˜ V ˜ V ˜ V + ˜ V T A ˜ V ˜ U ˜ U + ˜ U T A ˜ U ˜ V ˜ V + ˜ U T A ˜ U ˜ U ˜ U . We can show that ˜ U T A ˜ U ˜ U ˜ U is at most ǫ ℓ , where ℓ is a lower bound on T A . Thus, T A ≈ ˜ V T A ˜ V ˜ V ˜ V + ˜ V T A ˜ V ˜ U ˜ U + ˜ U T A ˜ U ˜ V ˜ V . For a sufficiently large K , with high probability, the fraction of rows in any large bucket is ap-proximately preserved in the sampled set of rows. Also, we know tight (upper and lower) boundson h A j ∗ , i for every row j , where j ∈ ˜ V . Thus, the random sample K approximately preserves ˜ V T A ˜ V ˜ V ˜ V + ˜ V T A ˜ V ˜ U ˜ U . In order to get an (1 ± ǫ )-approximation to T A , we need to estimate ˜ U T A ˜ U ˜ V ˜ V , which is same as estimating ˜ V T A ˜ V ˜ U ˜ U since A is a symmetric matrix. We estimate ˜ V T A ˜ V ˜ U ˜ U , that is, the number of A ij ’s such that i ∈ ˜ V and j ∈ ˜ U , as follows. For each bucket B i that is declared as large by the algorithm, we select enough number of rows randomly from K ∩ B i ,invoke Regr for each selected row and increase the count by 1 if the element A ij reported by Regr be such that j ∈ ˜ U . A formal description of our algorithm is given in Algorithm 2. Now, we focuson the correctness proof of our algorithm for Bfe .We assume that our algorithm has a prior information of ℓ , which is a lower bound on m = T A .However, this assumption can be removed by using a standard technique in property testing [GR08,ELRS17]. Let t = ⌈ log β ( ρn ) ⌉ + 1, where β ≤ ǫ/
8. For i ∈ [ t ], we define the set B i as follows. B i = { j ∈ [ n ] : (1 + β ) i − ≤ h A j ∗ , i < (1 + β ) i } . Since A ij ≤ ρ the maximum number of such buckets B i required are at most t = ⌈ log β ( ρn ) ⌉ + 1.Now consider the following fact along with Definition 3.2 that will be used in our analysis. Fact 1:
For every i ∈ [ t ], (1 + β ) i − | B i | ≤ h A j ∗ , i < (1 + β ) i | B i | . Definition 3.2.
We fix a threshold θ = t · n q ǫ · ℓρ . For i ∈ [ t ], we define the set B i to be a largebucket if | B i | ≥ θn . Otherwise, the set B i is defined to be a small bucket . Thus, the set of largebuckets L is defined as L = { i ∈ [ t ] : | B i | ≥ θn } , and [ t ] \ L is the set of small buckets.Before we start proving that ˆ m is an (1 ± ǫ )-approximation of m = T A , let us consider thefollowing definition and the technical Lemma 3.4. Definition 3.3.
For i ∈ L , α i is defined as P u ∈ Bi h A u ∗ , ˜ U i P u ∈ Bi h A u ∗ , i . Lemma 3.4.
For a suitable choice of constant in Θ( · ) for selecting K samples in Algorithm 2, thefollowing hold with high probability.(i) For each i ∈ L , (1 − ǫ ) | B i | n ≤ | S i | K ≤ (1 + ǫ ) | B i | n . (ii) For each i ∈ [ t ] \ L , | S i | K < t · n q ǫ · ℓρ .(iii) | ˜ U | < q ǫ · ℓρ , where ˜ U = { j ∈ B i : i ∈ [ t ] \ ˜ L } (iv) For every i ∈ ˜ L ,(a) if α i ≥ ǫ , then (1 − ǫ ) α i ≤ ˜ α i ≤ (1 + ǫ ) α i , and lgorithm 2 : Bfe ( ℓ , ǫ ) Input : An estimate ℓ for T A1 and ǫ ∈ (0 , Output : b m , which is an (1 ± ǫ )-approximation of T A . begin Independently select K = Θ (cid:16) √ ρn √ ℓ · ǫ − . · log ( ρn ) · log(1 /ǫ ) (cid:17) rows of A uniformly at random and let S denote the multiset of the selected indices (of rows) sampled. For i ∈ [ t ], let S i = B i ∩ S .Let ˜ L = n i : | S i || S | ≥ t · n q ǫ · ℓρ o . Note that ˜ L is the set of buckets that algorithm declares to be large. Similarly, [ t ] \ ˜ L is the set of buckets declared to be small by the algorithm.For every i ∈ ˜ L , select | S i | samples uniformly at random from S i , with replacement, and let Z i be the set of samples obtained. For each z ∈ Z i , make a Regr ( z, ) query and let A zk z = Regr ( z, ). Let Y z be a random variable that takes value 1 if k z ∈ ˜ U and 0,otherwise. Determine ˜ α i = P z ∈ Zi Y z | S i | .Output b m = nK P i ∈ ˜ L (1 + ˜ α i ) · | S i | · (1 + β ) i end (b) if α i < ǫ/ , then ˜ α i < ǫ/ .Proof Sketch. (i) Observe that E h | S i | K i = | B i | n . (i) can be shown by applying Chernoff bound asmentioned in Lemma D.1(i) in Appendix D.(ii) It can be shown by applying Chernoff bound as mentioned in part (a) of Lemma D.1(ii) inAppendix D.(iii) By the definition of ˜ U , (cid:12)(cid:12)(cid:12) ˜ U (cid:12)(cid:12)(cid:12) = (cid:12)(cid:12)(cid:12) { j ∈ B i : | S i | < t · n q ǫ · ℓρ } (cid:12)(cid:12)(cid:12) . Applying Lemma 3.4(i) and thedefinition of L , we get (cid:12)(cid:12)(cid:12) ˜ U (cid:12)(cid:12)(cid:12) ≤ (cid:12)(cid:12)(cid:12) { j ∈ B i : | B i | < (1 − ǫ ) − · nK · t · n q ǫ · ℓρ } (cid:12)(cid:12)(cid:12) . As there are atmost t many buckets, (cid:12)(cid:12)(cid:12) ˜ U (cid:12)(cid:12)(cid:12) < (cid:12)(cid:12)(cid:12) { j ∈ B i : | B i | < t q ǫ · ℓρ } (cid:12)(cid:12)(cid:12) ≤ q ǫ · ℓρ . (iv) From the description of the algorithm, for every i ∈ ˜ L , we select | S i | many samples uniformlyat random from S i , with replacement, and let Z i be the set of samples obtained. For each z ∈ Z i , we make a Regr ( z, ) query and let A zk z = Regr ( z, ). Let Y z be a random variablethat takes value 1 if k z ∈ ˜ U and 0, otherwise. Also, ˜ α i = P z ∈ Zi Y z | S i | .Using the fact that we choose S independently and uniformly at random, set S i = S ∩ B i andsample the elements in Z i from S i , we get E [ Y z ] = | S i || B i | · | S i | X u ∈ B i h A u ∗ , ˜ U ih A u ∗ , i = 1 | B i | · X u ∈ B i h A u ∗ , ˜ U ih A u ∗ , i . So, E [ α i ] = | B i | · P u ∈ B i h A u ∗ , ˜ U ih A u ∗ , i . Since u ∈ B i , (1 + β ) i − ≤ h A u ∗ , i < (1 + β ) i . Also, by Fact7, | B i | (1 + β ) i − ≤ P u ∈ B i h A u ∗ , i ≤ | B i | (1 + β ) i . Thus, P u ∈ B i h A u ∗ , ˜ U i| B i | (1 + β ) i ≤ E [ ˜ α i ] ≤ P u ∈ B i h A u ∗ , ˜ U i| B i | (1 + β ) i −
11 + β · P u ∈ B i h A u ∗ , ˜ U ih A u ∗ , i ≤ E [ ˜ α i ] ≤ P u ∈ B i h A u ∗ , ˜ U ih A u ∗ , i (1 + β )Recalling the definition of α i = P u ∈ Bi h A u ∗ , ˜ U i P u ∈ Bi h A u ∗ , i (Definition 3.3) along with the fact that β ≤ ǫ/ (cid:16) − ǫ (cid:17) α i ≤ E [ ˜ α i ] ≤ (cid:16) ǫ (cid:17) α i The rest of the proof follows from Chernoff bound mentioned in Lemma D.1 (ii) in Appendix D.Now, we have all the ingredients to show following claim, which shows that ˆ m is an (1 ± ǫ )-approximation of m = T A . Claim 3.5. (i) ˆ m ≥ (1 − ǫ ) m , and (ii) ˆ m ≤ (1 + ǫ ) m , where m = T A .Proof. We prove (i) here. The proof of (ii) is similar to that of (i) and is presented in Appendix ERecall the estimate ˆ m returned by Algorithm 2. Using Lemma 3.4 (i), we have b m ≥ X i ∈ ˜ L (1 + ˜ α i )(1 − ǫ β ) i | B i | = (1 − ǫ X i ∈ ˜ L (1 + ˜ α i )(1 + β ) i | B i | = (1 − ǫ (cid:16) X i ∈ ˜ Lα i ≥ ǫ/ (1 + ˜ α i )(1 + β ) i | B i | + X i ∈ ˜ Lα i <ǫ/ (1 + ˜ α i )(1 + β ) i | B i | (cid:17) ≥ (1 − ǫ (cid:16) X i ∈ ˜ Lα i ≥ ǫ/ (cid:0) − ǫ α i (cid:1) (1 + β ) i | B i | + X i ∈ ˜ Lα i <ǫ/ (1 − ǫ ǫ β ) i | B i | (cid:17) > (1 − ǫ (cid:16) X i ∈ ˜ Lα i ≥ ǫ/ (cid:0) (1 − ǫ α i ) (cid:1) (1 + β ) i | B i | + X i ∈ ˜ Lα i <ǫ/ (1 − ǫ α i )(1 + β ) i | B i | (cid:17) = (1 − ǫ X i ∈ ˜ L (1 + α i )(1 + β ) i | B i |≥ (1 − ǫ X i ∈ ˜ L (cid:16) (1 + α i ) X k ∈ B i h A k ∗ , i (cid:17) P k ∈ B i h A k ∗ , ˜ T i = α i P k ∈ B i h A k ∗ , i we have: b m ≥ (1 − ǫ X i ∈ ˜ L (cid:16) (1 + α i ) X k ∈ B i h A k ∗ , i (cid:17) = (1 − ǫ X i ∈ ˜ L (cid:16) X k ∈ B i h A k ∗ , i + α i X k ∈ B i h A k ∗ , i (cid:17) = (1 − ǫ X i ∈ ˜ L (cid:16) X k ∈ B i h A k ∗ , ˜ L i + X k ∈ B i h A k ∗ , ˜ T i + α i X k ∈ B i h A k ∗ , i (cid:17) = (1 − ǫ X i ∈ ˜ L (cid:16) X k ∈ B i h A k ∗ , ˜ L i + 2 X k ∈ B i h A k ∗ , ˜ T i (cid:17)b m = (1 − ǫ (cid:16) X i ∈ ˜ L X k ∈ B i h A k ∗ , ˜ L i + 2 X i ∈ ˜ L X k ∈ B i h A k ∗ , ˜ T i (cid:17) = (1 − ǫ (cid:16) T ˜ V A ˜ V , ˜ V ˜ V + 2 T ˜ V A ˜ V , ˜ U ˜ U (cid:17) = (1 − ǫ (cid:16) T A − T ˜ U A ˜ U, ˜ U ˜ U (cid:17) Since | ˜ U | < q ǫ · ℓρ (From Lemma 3.4 (iii)) and for all i, j ∈ [ n ], | A ij | ≤ ρ we have T ˜ U A ˜ U, ˜ U ˜ U ≤ ǫ · ℓ Since ℓ is a lower bound on m = T A , we have b m ≥ (1 − ǫ ) · ǫ m In this Section, we discuss the algorithm for
Sample Almost Uniformly . We can have a roughestimate, with high probability, ˆ m for T A by using Theorem 3.1 such that T A ≤ ˆ m ≤ · T A .Note that we make e O (cid:16) √ ρn √ T A (cid:17) many IP { , } n queries. Before presenting the idea, consider thefollowing definition for a threshold τ , which is a function of ˆ m . Definition 4.1.
The i -th row of the matrix is light if h A i, ∗ , i is at most τ . Otherwise, A ij is heavy.The elements present in a light (heavy) row are refered to as light (heavy) elements.We denote the set of all light (heavy) elements of the matrix A by L ( H ). Also, let I ( L )( I ( H )) denote the set of light (heavy) rows of the matrix A . Let w ( L ) = P A ij ∈L A ij and w ( H ) = P A ij ∈H A ij .Our algorithm for Sample Almost Uniformly is a generalization of the algorithm for sam-pling an edge from an unweighted graph almost uniformly [ER18]. Our algorithm consists of repeatedinvocation of two subroutines, that is,
Sample-Light and
Sample-Heavy . Both
Sample-Light and
Sample-Heavy succeed with good probability and sample elements from L and H almostuniformly, respectively. The threshold τ is set in such a way that there are large number of lightrows and small number of heavy rows. In Sample-Light , we select a row uniformly at random,and if the selected row is light, then we sample an element from the selected row randomly using
Regr . This gives us an element from L uniformly. However, the same technique will not work for Sample-Heavy as we have few heavy rows. To cope up with this problem, we take a row uniformly Large is parameterized by τ .
9t random and if the selected row is light, we sample an element from the selected row randomlyusing
Regr . Let A ij be the output of the Regr query. Then we go to the j -th row, if it is heavy,and then select an element from the j -th row randomly using Regr query.The formal algorithm for
Sample-Light and
Sample-Heavy are given in Algorithm 3 andAlgorithm 4, respectively. The formal correctness proof of
Sample-Light and
Sample-Heavy aregiven in Lemma 4.2 and Lemma 4.3, respectively. We give the final algorithm along with its proofof correctness in Theorem 4.5.
Algorithm 3 : Sample-Light
Input : An estimate ˆ m for T A and a threshold τ . Output : A ij ∈ L with probability A ij nτ . begin Select a row r ∈ [ n ] uniformly at random. if ( r ∈ I ( L ) , that is, h A r, ∗ , i is at most τ ) then Return
Fail with probability p = τ −h A r, ∗ , i τ , and Return Regr ( r, ) with probability − p as the output. else Return
Fail end Lemma 4.2.
Sample-Light succeeds with probability w ( L ) nτ . Let Z ℓ be the output in case it succeeds.Then P ( Z ℓ = A ij ) = A ij nτ if A ij ∈ L , and P ( Z ℓ = A ij ) = 0 , otherwise. Moreover, the number ofqueries made by Sample-Light is O (log n ) .Proof. Consider an element A ij ∈ L . The probability that A ij is returned by Sample-Light is P ( Z ℓ = A ij ) = P ( r = i ) · P ( Sample-Light returns
Regr ( r, )) · P ( Regr ( r, ) returns A ij )= 1 n · h A r, ∗ , i τ · A ij h A r, ∗ , i = A ij nτ Hence, the probability that
Sample-Light does not return
Fail is P A ij ∈L A ij nτ = w ( L ) nτ .The query complexity of Sample-Light follows from the query complexity of
Regr given inLemma 1.1. 10 lgorithm 4 : Sample-Heavy ( ˆ m ) Input : An estimate ˆ m for T A and a thershold τ . Output : A ij ∈ H with probability at most A ij nτ and at least (cid:16) − ρ ˆ mτ (cid:17) A ij nτ . begin Select a row r ∈ [ n ] uniformly at random. if ( r ∈ I ( L ) , that is, h A r, ∗ , i is at most τ ) then Return
Fail with probability p = τ −h A r, ∗ , i τ , and with probability 1 − p do the following. A rs = Regr ( r, ) if ( s ∈ I ( H ) , that is, h A s, ∗ , i > τ ) then Return
Regr ( s, ) as the output. else Return fail else Return
Fail end Lemma 4.3.
Sample-Heavy succeeds with probability at most w ( H ) nτ and at least (cid:16) − ρ ˆ mτ (cid:17) w ( H ) nτ .Let Z h be the output in case it succeeds. Then (cid:16) − ρ ˆ mτ (cid:17) A ij nτ ≤ P ( Z h = A ij ) ≤ A ij nτ for each A ij ∈ H ,and P ( Z h = A ij ) = 0 , otherwise. Moreover, the query complexity of Sample-Heavy is O (log n ) .Proof. For each k ∈ I ( H ), note that, h A k ∗ , i is more than τ . So, | I ( H ) | ≤ T A τ ≤ ˆ mτ . h A k, ∗ , i = X u ∈ I ( L ) A ku + X v ∈ I ( H ) A kv Observe that X v ∈ I ( H ) A kv ≤ ρ | I ( H ) | ≤ ρ ˆ mτ ≤ ρ ˆ m h A k, ∗ , i τ . So, we have the following Observation.
Observation 4.4. P u ∈ I ( L ) A ku ≥ (cid:16) − ρ ˆ mτ (cid:17) h A k, ∗ , i , where k ∈ I ( H ).Let us consider some A ij ∈ H . The probability that A ij is returned by the algorithm is P ( Z h = A ij ) = P ( s = i ) · P ( Regr ( s, ) returns A ij )= X u ∈ I ( L ) P ( r = u ) · h A r ∗ , i τ · P ( Regr ( r, ) returns A ri ) · A ij h A i ∗ , i = 1 n · A ij h A i ∗ , i · X u ∈ I ( L ) h A u ∗ , i τ · A ui h A u ∗ , i = A ij nτ · P u ∈ I ( L ) A iu h A i ∗ , i ( ∵ A is a symmetric matrix . )11ow by using the fact that P u ∈ I ( L ) A iu ≤ h A i ∗ , i along with Observation 4.4, we have1 ≤ P u ∈ I ( L ) A iu h A i ∗ , i ≤ − ρ ˆ mτ . Putting everything together, (cid:18) − ρ ˆ mτ (cid:19) · A ij nτ ≤ P ( Z h = A ij ) ≤ A ij nτ . So, the probability that
Sample-Heavy succeeds is P A ij ∈H P ( Z = A ij ), which lies between (cid:16) − ρ ˆ mτ (cid:17) w ( H ) nτ and w ( H ) nτ .The query complexity of the Sample-Light follows from the query complexity of
Regr givenin Lemma 1.1.Now, we give our final algorithm along with its correctness proof in the following Theorem.
Theorem 4.5.
There exists an algorithm for
Sample Almost Uniformly that takes ǫ ∈ (0 , as input and succeeds with high probability. In case the algorithm succeeds, it reports Z satisfying (1 − ǫ ) A ij T A ≤ P ( Z = A ij ) ≤ (1 + ǫ ) A ij T A . Moreover, the algorithm makes e O (cid:16) √ ρn √ T A (cid:17) many IP { , } n queries to the symmetric matrix A ∈ [ ρ ] n × n .Proof. Our algorithm first finds a rough estimate ˆ m for T A , with high probability, by usingTheorem 3.1 such that T A ≤ ˆ m ≤ · T A . For the rest of the proof, we work on the conditionalprobability space that T A ≤ ˆ m ≤ · T A .We set τ = q Γ ˆ mǫ and do the following for Γ times, where Γ is a parameter to be set later. Withprobability 1 / Sample-Light and with probability 1 / Sample-Heavy . Ifelement A ij is reported as the output by either Sample-Light or Sample-Heavy , we report that.If we get
Fail as the output in all of the trials, we report
Fail .Now, let us consider a particular trial and compute the probability of success P ( S ), which is P ( S ) = 12 ( P ( Sample-Light succeeds) + P ( Sample-Heavy succeeds)) . From Lemma 4.2 and 4.3, (cid:16) w ( L ) nτ + (cid:16) − ρ ˆ mτ (cid:17) w ( H ) nτ (cid:17) ≤ P ( S ) ≤ (cid:16) w ( L ) nτ + w ( H ) nτ (cid:17) . Putting the value of τ and using w ( L ) + w ( H ) = T A , we get (1 − ǫ ) T A nτ ≤ P ( S ) ≤ T A nτ Now, let us compte the probability of the event E ij , that is, the algorithm succeeds and itreturns A ij . If A ij ∈ L , by Lemma 4.2, P ( Z = A ij ) = · A ij nτ . Also, if A ij ∈ H , by Lemma 4.3, · (cid:16) − ρ ˆ mτ (cid:17) A ij nτ ≤ P ( Z = A ij ) ≤ · A ij nτ . So, the following holds for any A ij .(1 − ǫ ) A ij nτ ≤ P ( E ij ) ≤ A ij nτ . Let us compute the probability of E ij on the conditional probability space that the algorithmsucceeds, that is, P ( Z = A ij | S ) = P ( E ij ) P ( S ) . To boost the probability of success, we set Γ = O (cid:16) n √ ρ (1 − ǫ ) √ ǫ ˆ m log n (cid:17) for a suitable large constantin O ( · ) notation. The query complexity of each call to Sample-Light and
Sample-Heavy is12 (log n ). Also note that our algorithm for Sample Almost Uniformly makes at most ρ = O (cid:16) n √ ρ (1 − ǫ ) √ ǫ ˆ m log n (cid:17) many invocation to Sample-Light and
Sample-Heavy . Hence, the totalquery complexity of our algorithm is e O (cid:16) √ ρn √ T A (cid:17) . Bfe and
Sau
In this Section, we show that our algorithms for
Bfe and
Sau are almost tight. The lowerbound holds for IP S even if S = R n . Theorem 5.1.
Any algorithm that takes ǫ ∈ (0 , as input, determines an (1 ± ǫ ) -approximationto T A with probability / , requires Ω (cid:16) √ ρn √ T A (cid:17) many IP R n queries to symmetric matrix A ∈ [[ ρ ]] n × n .Proof. The proof idea is inspired by Goldreich and Ron [GR08]. Without loss of generality assumethat m = o ( ρn ). Consider matrix M ∈ [ ρ ] n × n with all the entries 0, and a family of matrices M in [ ρ ] n × n as follows. For each matrix A ∈ M , there exists an I ⊂ [ n ] of size √ mρ such that A ij = ρ for each i, j ∈ I and A ij = 0, otherwise. Note that any two matrices in M differ only inthe labeling of I ⊂ [ n ]. Note that T M = 0 and T M = m for each M ∈ M .Let us consider the following problem. The input matrix A is M with probability 1 /
2, and withremaining probability 1 / A is chosen uniformly at random from M . The objective is to decidewhether A = M or A ∈ M . Observe that we can decide the type of input matrix A if we candetermine T A approximately. Now, we will be done by showing that we cannot determine thetype of A unless we make large number of IP R n queries.Note that if A ∈ M , then A is completely described by an I ⊂ [ n ]. The probability of hittingan index in I , that is making an IP R n query of the form h A r ∗ , v i or h A ∗ r , v i , such that r ∈ I and v ∈ R n , is O (cid:16) | I | n (cid:17) = O (cid:16) √ m √ ρn (cid:17) . So, the number of queries required to hit an index from I isΩ (cid:16) √ ρn √ m (cid:17) . As we cannot decide the type of the input matrix without hitting an index from I , weneed Ω (cid:16) √ ρn √ m (cid:17) many IP R n queries to determine the type of the input matrix A .The distribution of input graph considered to show the lower bound for Bilinear-Form-Estimation in the proof of Theorem 5.1, also can be used to show lower bound for
Sample Almost Uniformly .The result is formally stated in the following Theorem.
Theorem 5.2.
Any algorithm that takes ǫ ∈ (0 , as input, reports Z satisfying (1 − ǫ ) A ij T A ≤ P ( Z = A ij ) ≤ (1 + ǫ ) A ij T A with probability / , requires Ω (cid:16) √ ρn T A (cid:17) many IP R n queries to symmetricmatrix A ∈ [[ ρ ]] n × n . In this paper, we addressed
Weighted Edge Estimation and sampling an edge from aweighted graph almost uniformly in the lens of sublinear time algorithm. In doing so, we intro-duce a new query oracle named
Inner Product oracle that has a very efficient implementation.We believe that
Inner Product oracle will be useful to obtain weighted version of other graphparameter estimation problems. 13 eferences [AMMN05] Noga Alon, Konstantin Makarychev, Yury Makarychev, and Assaf Naor. QuadraticForms on Graphs. In
Proceedings of the 37th Annual ACM Symposium on Theory ofComputing, STOC , pages 486–493, 2005.[BHR +
18] P. Beame, S. Har-Peled, S. N. Ramamoorthy, C. Rashtchian, and M. Sinha. EdgeEstimation with Independent Set Oracles. In
ITCS , pages 38:1–38:21, 2018.[BLWZ19] Maria-Florina Balcan, Yi Li, David P. Woodruff, and Hongyang Zhang. Testing MatrixRank, Optimally. In
Proceedings of the Thirtieth Annual ACM-SIAM Symposium onDiscrete Algorithms, SODA , pages 727–746, 2019.[DL18] Holger Dell and John Lapinskas. Fine-grained reductions from approximate countingto decision. In
Proceedings of the 50th Annual ACM SIGACT Symposium on Theoryof Computing, STOC , pages 281–288, 2018.[DP09] Devdatt Dubhashi and Alessandro Panconesi.
Concentration of Measure for the Anal-ysis of Randomized Algorithms . Cambridge University Press, New York, NY, USA, 1stedition, 2009.[ELRS17] T. Eden, A. Levi, D. Ron, and C. Seshadhri. Approximately Counting Triangles inSublinear Time.
SIAM Journal on Computing , 46(5):1603–1646, 2017.[ER18] Talya Eden and Will Rosenbaum. On sampling edges almost uniformly. In , pages 7:1–7:9, 2018.[Fei06] U. Feige. On Sums of Independent Random Variables with Unbounded Variance andEstimating the Average Degree in a Graph.
SIAM Journal on Computing , 35(4):964–984, 2006.[GR08] O. Goldreich and D. Ron. Approximating Average Parameters of Graphs.
RandomStructures & Algorithms , 32(4):473–493, 2008.[KG97] Sandi Klavzar and Ivan Gutman. Wiener Number of Vertex-weighted Graphs and aChemical Application.
Discrete Applied Mathematics , 80(1):73–81, 1997.[RSW18] Aviad Rubinstein, Tselil Schramm, and S. Matthew Weinberg. Computing Exact Min-imum Cuts Without Knowing the Graph. In
Proceedings of the 9th Innovations inTheoretical Computer Science Conference, ITCS , pages 39:1–39:16, 2018.[RT16] Dana Ron and Gilad Tsur. The power of an example: Hidden set size approximationusing group queries and conditional sampling.
TOCT , 8(4):15:1–15:19, 2016.[SW] Xiaofei Shi and David P. Woodruff. Sublinear time numerical linear algebra for struc-tured matrices. In
Proceedings of the AAAI, 2019 .14
Efficient implementation of IP { , } n oracle in our context Note that our algorithms for both
Bfe and
Sau either ask for inner product of a row with orinvoke Regr . So, in any case we ask for inner product of a row with some x ∈ { , } n such thatall 1’s in x are consecutive. Now, we describe a simple datastructure that can return answer to aquery asked by our algorithms in O (1) time.Let A be the original matrix which is with the oracle and unknown to the algorithm. The oraclepreprocesses the matrix A and generate a matrix B of order n × n such that B ij = j P k =1 A ik for1 ≤ i, j ≤ n . Let x ∈ { , } n be such that the x i = 1 if and only if 1 ≤ p ≤ i ≤ q ≤ n and thealgorithm asks for the inner product of j -th row with x . The oracle reports B jq as the answer tothe query if p = 1 and B jq − B jp if p >
1, where p = p −
1. Note that oracle always returns correctanswer to any query asked by our algorithms using O (1) time. B Estimation of Q by using BIS query
Let f G : V ( G ) → { , . . . , γ } be the weight function on vertices known apriori and the objective isto estimate of Q = P { u,v }∈ E f G ( u ) f G ( v ) using BIS . For i ∈ { , . . . , γ } , let V i = { v ∈ V ( G ) : f G ( v ) = i } .Note that Q = P ≤ i ≤ j ≤ [ γ ] ij | E ( V i , V j ) | , where E ( V i , V j ) denotes the set of edges with one vertex in V i . Observe that the properties of BIS oracle is such that each E ( V i , V j ) can be estimated with in(1 ± ǫ/ij )-factor by using O (cid:16) i j log nǫ (cid:17) BIS queries. Hence Q can be estimated by using a totalnumber of O (cid:16) γ log nǫ (cid:17) many BIS queries.
C Our results
We first discuss our results when A is a symmetric matrix, A ij ∈ [[ ρ ]] ∀ i, j ∈ [ n ] and x = y = .Though our main focus is to estimate the bilinear form x T A y , we show that it is enough to considerthe case of symmetric matrix A and x = y = , that is, T A . Then we show how our results forthe special case can be extended to the general case. A is symmetric and x = y = In this case we have the results mentioned in Table 3. NoteProblem Upper bound Lower bound
Bfe { , } n ( , ) e O (cid:16) √ ρn √ T A (cid:17) Ω (cid:16) √ ρn √ T A (cid:17) Sau R n ( , ) e O (cid:16) √ ρn √ T A (cid:17) Ω (cid:16) √ ρn √ T A (cid:17) Table 3: Query complexities for
Bfe S ( x , y ) and Sau S ( x , y ) when x = y = . The upper boundholds for S = { , } n and the lower bound holds for S = R n . The stated result is for any matrix A and when A ij ∈ [[ ρ ]] ∀ i, j ∈ [ n ].that the queries made in the above case when A is symmetric are only row IP { , } n queries. A is not necessarily symmetric and x = y = Now, we discuss how our result can beextended to the case when A is not necessarily symmetric. Let B = A + A T . Note that B is a15ymmetric matrix. By our result for symmetric matrices, we can solve Bfe and
Sau for B by usingrow IP { , } n queries if we have IP { , } n access to B . Observe that one can simulate the row IP { , } n access for B by using two IP { , } n queries to A as h B i ∗ , v i = h A i ∗ , v i + h A ∗ i , v i . So, we can solve Bfe and
Sau for B by using O (cid:16) n √ ρ √ T A (cid:17) and O (cid:16) √ ρn √ T A (cid:17) IP { , } n queries to the matrix A .Now, we argue how to convert the solution obtained for the matrix B to the correspondingsolution for the matrix A . In case of Bfe , as T A = T B , we report the output obtained for thematrix B as the corresponding output for the matrix A .In case of Sau for the matrix B , we get B ij as the output with probability h (1 − ǫ ) B ij T B , (1 + ǫ ) B ij T B i .Now, we discuss how to simulate Sau for matrix A . We find A ij and A ji by two row IP { , } n queriesto the matrix A as A ij = h A i ∗ , a j i and A ji = h A j ∗ , a i i , where a i ( a j ) is the vector in { , } n having 1only in the i -th ( j -th) entry 1. We report A ij and A ji with probability A ij A ij + A ij and A ij A ij + A ij , respec-tively. Note that A ij can be the output only when B ij or B ji is the output by the Sau algorithm onthe matrix B . Using the fact that B ij = A ij + A ji and T A = T B , we report A ij with probability h (1 − ǫ ) A ij T A , (1 + ǫ ) A ij T A i . Hence, the results mentioned in Table 3 also hold for the case when thematrix A is not necessarily symmetric. General
Bfe S ( x , y ) and Sau S ( x , y ) for the input matrix A : Observe that T C = x T Ay ,where C ij = x i A ij x j . So, if we have IP { , } n oracle access to C , we can solve Bfe and
Sau problemon C , that is, we can solve Bfe S ( x , y ) and Sau S ( x , y ) problem on the matrix A . But we do nothave the oracle access to C . However, we can simulate IP { , } n query for C by using the IP S accessfor the matrix A , where S = S ∗ = { , } n ∪ { v : v i = x i y j or v i = x j y i or v i = 0 , i, j ∈ [ n ] } , by thefollowing Observation. Observation C.1. h C k ∗ , a i = h A k ∗ , a ′ i , where a ∈ { , } n and a ′ i = x k a i y i for each i ∈ [ n ] and h C ∗ k , a i = h A ∗ k , a ′ i , where a ∈ { , } n and a ′ i = x i a i y k for each i ∈ [ n ].For the query complexity, observe that we are solving T C1 and C ij ∈ [ ργ γ ]. Now using theresult mentioned in Table 3, we have the following results mentioned in Table 4 for Bfe S ( x , y ) and Sau S ( x , y ). Problem Upper bound Lower bound Bfe S ( x , y ) e O (cid:16) √ ργ γ n √ T A (cid:17) Ω (cid:16) √ ργ γ n √ T A (cid:17) Sau { , } n ( x , y ) e O (cid:16) √ ργ γ n √ T A (cid:17) Ω (cid:16) √ ργ γ n √ T A (cid:17) Table 4: Query complexities for
Bfe S ( x , y ) and Sau S ( x , y ), where the upper bound holds for S = S ∗ and the lower bounds hold for S = R n .The lower bounds mentioned in the Table 4 can be proved by usinh minor modification to theproof of Theorem 5.1. Hence, we have the following Theorems. Theorem C.2. • There exists an algorithm for
Bfe S ∗ ( x , y ) that takes x ∈ [[ γ ]] n , y ∈ [[ γ ]] n and ǫ ∈ (0 , / as input, and determines an (1 ± ǫ ) -approximation to x T A y with high proba-bility by using e O (cid:18) √ γ γ ρn √ x T A y (cid:19) many IP S ∗ queries to a matrix A ∈ [[ ρ ]] n × n . S ∗ is as it is mentioned n Line number 366. Any algorithm for
Bfe R n ( x , y ) that takes x ∈ [[ γ ]] n , y ∈ [[ γ ]] n and ǫ ∈ (0 , / as input,and determines an (1 ± ǫ ) -approximation to x T A y with probability / , requires Ω (cid:18) √ γ γ ρn √ x T A y (cid:19) many IP R n queries to matrix A ∈ [[ ρ ]] n × n . Theorem C.3. • There exists an algorithm for
Sau S ∗ ( x , y ) that takes x ∈ [[ γ ]] n , y ∈ [[ γ ]] n and ǫ ∈ (0 , / as input, and reports Z satisfying (1 − ǫ ) x i A ij y j x T A y ≤ P ( Z = A ij ) ≤ (1 + ǫ ) x i A ij y j x T A y with high probability by using e O (cid:18) √ ρn √ x T A y (cid:19) many IP S ∗ queries to a matrix A ∈ [[ ρ ]] n × n . • Any algorithm for
Sau R n ( x , y ) that takes x ∈ [[ γ ]] n , y ∈ [[ γ ]] n and ǫ ∈ (0 , / as input, andreports Z satisfying (1 − ǫ ) x i A ij y j x T A y ≤ P ( Z = A ij ) ≤ (1 + ǫ ) x i A ij y j x T A y with probability / , requires Ω (cid:18) √ γ γ ρn √ x T A y (cid:19) many IP R n queries to matrix A ∈ [[ ρ ]] n × n . D Probability Results
Lemma D.1. [DP09] Let X = P i ∈ [ n ] X i where X i , i ∈ [ n ] , are independent random variables, X i ∈ [0 , and E [ X ] is the expected value of X . Then(i) For ǫ > | X − E [ X ] | > ǫ E [ X ]] ≤ exp (cid:16) − ǫ E [ X ] (cid:17) . (ii) Suppose µ L ≤ E [ X ] ≤ µ H , then for < ǫ < (a) Pr[
X > (1 + ǫ ) µ H ] ≤ exp (cid:16) − ǫ µ H (cid:17) .(b) Pr[
X < (1 − ǫ ) µ L ] ≤ exp (cid:16) − ǫ µ L (cid:17) . Missing proof of Section 3
Proof of Claim 3.5(ii).
From Lemma 3.2 eqn. (5) b m ≤ X i ∈ ˜ L (1 + ˜ α i )(1 + ǫ β ) i | B i | = (1 + ǫ X i ∈ ˜ L (1 + ˜ α i )(1 + β ) i | B i | = (1 + ǫ (cid:16) X i ∈ ˜ Lα i ≥ ǫ/ (1 + ˜ α i )(1 + β ) i | B i | + X i ∈ ˜ Lα i <ǫ/ (1 + ˜ α i )(1 + β ) i | B i | (cid:17) ≤ (1 + ǫ (cid:16) X i ∈ ˜ Lα i ≥ ǫ/ (cid:0) ǫ α i (cid:1) (1 + β ) i | B i | + X i ∈ ˜ Lα i <ǫ/ (1 + ǫ β ) i | B i | (cid:17) < (1 + ǫ (cid:16) X i ∈ ˜ Lα i ≥ ǫ/ (cid:0) (1 + ǫ α i ) (cid:1) (1 + β ) i | B i | + X i ∈ ˜ Lα i <ǫ/ (1 + ǫ α i )(1 + β ) i | B i | (cid:17) = (1 + ǫ X i ∈ ˜ L (1 + α i )(1 + β ) i | B i |≤ (1 + ǫ (1 + β ) X i ∈ ˜ L (cid:16) (1 + α i ) X k ∈ B i h A k ∗ , i (cid:17) Since β ≤ ǫ and P k ∈ B i h A k ∗ , ˜ U i = α i P k ∈ B i h A k ∗ , i we have: b m ≤ (1 + ǫ (1 + ǫ X i ∈ ˜ L (cid:16) (1 + α i ) X k ∈ B i h A k ∗ , i (cid:17) ≤ (1 + 3 ǫ X i ∈ ˜ L (cid:16) X k ∈ B i h A k ∗ , i + α i X k ∈ B i h A k ∗ , i (cid:17) = (1 + 3 ǫ X i ∈ ˜ L (cid:16) X k ∈ B i h A k ∗ , ˜ V i + X k ∈ B i h A k ∗ , ˜ U i + α i X k ∈ B i h A k ∗ , i (cid:17) = (1 + 3 ǫ X i ∈ ˜ L (cid:16) X k ∈ B i h A k ∗ , ˜ V i + 2 X k ∈ B i h A k ∗ , ˜ U i (cid:17) = (1 + 3 ǫ (cid:16) X i ∈ ˜ L X k ∈ B i h A k ∗ , ˜ V i + 2 X i ∈ ˜ L X k ∈ B i h A k ∗ , ˜ U i (cid:17) = (1 + 3 ǫ (cid:16) T ˜ V A ˜ V , ˜ V ˜ V + 2 T ˜ V A ˜ V , ˜ U ˜ U (cid:17) ≤ (1 + 3 ǫ (cid:16) T A (cid:17)(cid:17)