The Mailman algorithm: A note on matrix--vector multiplication

  • Authors:
  • Edo Liberty;Steven W. Zucker

  • Affiliations:
  • Computer Science, Yale University, New Haven, CT, USA;Computer Science and Applied Mathematics, Yale University, New Haven, CT, USA

  • Venue:
  • Information Processing Letters
  • Year:
  • 2009

Quantified Score

Hi-index 0.90

Visualization

Abstract

Given an mxn matrix A we are interested in applying it to a real vector x@?R^n in less than the straightforward O(mn) time. For an exact deterministic computation at the very least all entries in A must be accessed, requiring O(mn) operations and matching the running time of naively applying A to x. However, we claim that if the matrix contains only a constant number of distinct values, then reading the matrix once in O(mn) steps is sufficient to preprocess it such that any subsequent application to vectors requires only O(mn/log(max{m,n})) operations. Algorithms for matrix-vector multiplication over finite fields, which save a log factor, have been known for many years. Our contribution is unique in its simplicity and in the fact that it applies also to real valued vectors. Using our algorithm improves on recent results for dimensionality reduction. It gives the first known random projection process exhibiting asymptotically optimal running time. The mailman algorithm is also shown to be useful (faster than naive) even for small matrices.