# Counting and Sampling from Substructures Using Linear Algebraic Queries

## Document Type

Conference Article

## Publication Title

Leibniz International Proceedings in Informatics, LIPIcs

## Abstract

For an unknown n × n matrix A having non-negative entries, the inner product (IP) oracle takes as inputs a specified row (or a column) of A and a vector v ∈ Rn with non-negative entries, and returns their inner product. Given two input vectors x and y in Rn with non-negative entries, and an unknown matrix A with non-negative entries with IP oracle access, we design almost optimal sublinear time algorithms for the following two fundamental matrix problems: Find an estimate X for the bilinear form xTAy such that X ≈ xTAy. Designing a sampler Z for the entries of the matrix A such that P(Z = (i, j)) ≈ xiAijyj/(xTAy), where xi and yj are i-th and j-th coordinate of x and y respectively. As special cases of the above results, for any submatrix of an unknown matrix with non-negative entries and IP oracle access, we can efficiently estimate the sum of the entries of any submatrix, and also sample a random entry from the submatrix with probability proportional to its weight. We will show that the above results imply that if we are given IP oracle access to the adjacency matrix of a graph, with non-negative weights on the edges, then we can design sublinear time algorithms for the following two fundamental graph problems: Estimating the sum of the weights of the edges of an induced subgraph, and Sampling edges proportional to their weights from an induced subgraph. We show that compared to the classical local queries (degree, adjacency, and neighbor queries) on graphs, we can get a quadratic speedup if we use IP oracle access for the above two problems. Apart from the above, we study several matrix problems through the lens of IP oracle, like testing if the matrix is diagonal, symmetric, doubly stochastic, etc. Note that IP oracle is in the class of linear algebraic queries used lately in a series of works by Ben-Eliezer et al. [SODA'08], Nisan [SODA'21], Rashtchian et al. [RANDOM'20], Sun et al. [ICALP'19], and Shi and Woodruff [AAAI'19]. Recently, IP oracle was used by Bishnu et al. [RANDOM'21] to estimate dissimilarities between two matrices.

## DOI

10.4230/LIPIcs.FSTTCS.2022.8

## Publication Date

12-1-2022

## Recommended Citation

Bishnu, Arijit; Ghosh, Arijit; Mishra, Gopinath; and Paraashar, Manaswi, "Counting and Sampling from Substructures Using Linear Algebraic Queries" (2022). *Conference Articles*. 372.

https://digitalcommons.isical.ac.in/conf-articles/372