# Spectral Sparsification in the Semi-streaming Setting

## Abstract

Let *G* be a graph with *n* vertices and *m* edges. A sparsifier of *G* is a sparse graph on the same vertex set approximating *G* in some natural way. It allows us to say useful things about *G* while considering much fewer than *m* edges. The strongest commonly-used notion of sparsification is spectral sparsification; *H* is a spectral sparsifier of *G* if the quadratic forms induced by the Laplacians of *G* and *H* approximate one another well. This notion is strictly stronger than the earlier concept of combinatorial sparsification.

In this paper, we consider a semi-streaming setting, where we have only \(\tilde{O}(n)\) storage space, and we thus cannot keep all of *G*. In this case, maintaining a sparsifier instead gives us a useful approximation to *G*, allowing us to answer certain questions about the original graph without storing all of it. We introduce an algorithm for constructing a spectral sparsifier of *G* with *O*(*n*log*n*/*ϵ* ^{2}) edges (where *ϵ* is a parameter measuring the quality of the sparsifier), taking \(\tilde{O}(m)\) time and requiring only one pass over *G*. In addition, our algorithm has the property that it maintains at all times a valid sparsifier for the subgraph of *G* that we have received.

Our algorithm is natural and conceptually simple. As we read edges of *G*, we add them to the sparsifier *H*. Whenever *H* gets too big, we resparsify it in \(\tilde{O}(n)\) time. Adding edges to a graph changes the structure of its sparsifier’s restriction to the already existing edges. It would thus seem that the above procedure would cause errors to compound each time that we resparsify, and that we should need to either retain significantly more information or reexamine previously discarded edges in order to construct the new sparsifier. However, we show how to use the information contained in *H* to perform this resparsification using only the edges retained by earlier steps in nearly linear time.

## Keywords

Algorithms and data structures Graph algorithms Spectral graph theory Sub-linear space algorithms Spectral sparsification## Notes

### Acknowledgements

We would like to thank the referees for their helpful comments. This work was partially supported by National Science Foundation grant CCF-0843915. The second author is supported by a National Science Foundation graduate fellowship.

## References

- 1.Ahn, K.J., Guha, S.: Graph sparsification in the semi-streaming model. In: Proceedings of the 36th International Colloquium on Automata, Languages and Programming: Part II, ICALP ’09, pp. 328–338. Springer, Berlin (2009) CrossRefGoogle Scholar
- 2.Benczúr, A.A., Karger, D.R.: Approximating
*s*-*t*minimum cuts in*O*(*n*^{2}) time. In: Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, STOC ’96, pp. 47–55. ACM, New York (1996). doi: 10.1145/237814.237827 CrossRefGoogle Scholar - 3.Goel, A., Kapralov, M., Khanna, S.: Graph sparsification via refinement sampling. arXiv:1004.4915 [cs.DS]
- 4.Harvey, N.: Lecture 11 Notes for C&O 750: Randomized Algorithms. Available at http://www.math.uwaterloo.ca/~harvey/W11 (2011)
- 5.Koutis, I., Levin, A., Peng, R.: Improved spectral sparsification and numerical algorithms for SDD Matrices. In: Proceedings of the 29th International Symposium on Theoretical Aspects of Computer Science, STACS ’12, pp. 266–277 (2012) Google Scholar
- 6.Koutis, I., Miller, G.L., Peng, R.: Approaching optimality for solving SDD systems. In: Proceedings of the 51st Annual IEEE Symposium on Foundations of Computer Science, FOCS ’10 (2010). arXiv:1003.2958 Google Scholar
- 7.Koutis, I., Miller, G.L., Peng, R.: A nearly-
*m*log*n*solver for SDD linear systems. In: Proceedings of the 52nd Annual IEEE Symposium on Foundations of Computer Science, FOCS ’11 (2011). arXiv:1102.4842 Google Scholar - 8.Lawler, G.F., Coyle, L.N.: Lectures on Contemporary Probability. Student Mathematical Library, vol. 2. Am. Math. Soc., Providence (1999) MATHGoogle Scholar
- 9.Rudelson, M.: Random vectors in the isotropic position. J. Funct. Anal.
**164**(1), 60–72 (1999). doi: 10.1006/jfan.1998.3384 MathSciNetMATHCrossRefGoogle Scholar - 10.Spielman, D.A., Srivastava, N.: Graph sparsification by effective resistances. In: Proceedings of the 40th Annual ACM Symposium on Theory of Computing, STOC ’08, pp. 563–568. ACM, New York (2008). doi: 10.1145/1374376.1374456 CrossRefGoogle Scholar
- 11.Spielman, D.A., Teng, S.H.: Spectral sparsification of graphs. arXiv:0808.4134 [cs.DS]
- 12.Spielman, D.A., Teng, S.H.: Nearly-linear time algorithms for graph partitioning, graph sparsification, and solving linear systems. In: Proceedings of the Thirty-Sixth Annual ACM Symposium on Theory of Computing, STOC ’04, pp. 81–90. ACM, New York (2004). doi: 10.1145/1007352.1007372 CrossRefGoogle Scholar
- 13.Srivastava, N.: Spectral Sparsification and Restricted Invertibility Google Scholar
- 14.Vershynin, R.: A note on sums of independent random matrices after Ahlswede-Winter. http://www.umich.edu/~romanv/teaching/reading-group/ahlswede-winter.pdf