On the Expressive Power of Query Languages for Matrices

We investigate the expressive power of $\mathsf{MATLANG}$, a formal language for matrix manipulation based on common matrix operations and linear algebra. The language can be extended with the operation $\mathsf{inv}$ of inverting a matrix. In $\mathsf{MATLANG}+\mathsf{inv}$ we can compute the transitive closure of directed graphs, whereas we show that this is not possible without inversion. Indeed we show that the basic language can be simulated in the relational algebra with arithmetic operations, grouping, and summation. We also consider an operation $\mathsf{eigen}$ for diagonalizing a matrix, which is defined so that different eigenvectors returned for a same eigenvalue are orthogonal. We show that $\mathsf{inv}$ can be expressed in $\mathsf{MATLANG}+\mathsf{eigen}$. We put forward the open question whether there are boolean queries about matrices, or generic queries about graphs, expressible in $\mathsf{MATLANG} + \mathsf{eigen}$ but not in $\mathsf{MATLANG}+\mathsf{inv}$. The evaluation problem for $\mathsf{MATLANG} + \mathsf{eigen}$ is shown to be complete for the complexity class $\exists \mathbf{R}$.

[1]  Dennis S. Arnon,et al.  Geometric Reasoning with Logic and Algebra , 1988, Artif. Intell..

[2]  Gianna M. Del Corso,et al.  Fast PageRank Computation via a Sparse Linear System , 2005, Internet Math..

[3]  Anthony Bonato,et al.  A course on the Web graph , 2008 .

[4]  S. Axler Linear Algebra Done Right , 1995, Undergraduate Texts in Mathematics.

[5]  Leslie G. Valiant,et al.  Completeness classes in algebra , 1979, STOC.

[6]  Martin Otto,et al.  Undecidability Results on Two-Variable Logics , 1997, STACS.

[7]  Gabriel M. Kuper,et al.  Constraint Query Languages , 1995, J. Comput. Syst. Sci..

[8]  Heikki Mannila,et al.  Principles of Data Mining , 2001, Undergraduate Topics in Computer Science.

[9]  Bastian Laubner,et al.  The structure of graphs and new logics for the characterization of Polynomial Time , 2011 .

[10]  Hung Q. Ngo,et al.  In-Database Factorized Learning , 2017, AMW.

[11]  J. Kratochvil,et al.  Intersection Graphs of Segments , 1994, J. Comb. Theory, Ser. B.

[12]  Dan Olteanu,et al.  Learning Linear Regression Models over Factorized Joins , 2016, SIGMOD Conference.

[13]  Anuj Dawar,et al.  Linear equation systems and the search for a logical characterisation of polynomial time , 2015 .

[14]  Yu Cheng,et al.  A Survey on Array Storage, Query Languages, and Systems , 2013, ArXiv.

[15]  Marcus Schaefer,et al.  Complexity of Some Geometric and Topological Problems , 2009, GD.

[16]  Chris D. Godsil Some graphs with characteristic polynomials which are not solvable by radicals , 1982, J. Graph Theory.

[17]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[18]  Shirish Tatikonda,et al.  SystemML: Declarative Machine Learning on Spark , 2016, Proc. VLDB Endow..

[19]  Marcus Schaefer,et al.  Fixed Points, Nash Equilibria, and the Existential Theory of the Reals , 2017, Theory of Computing Systems.

[20]  Din J. Wasem,et al.  Mining of Massive Datasets , 2014 .

[21]  Kenneth E. Iverson,et al.  A programming language , 1899, AIEE-IRE '62 (Spring).

[22]  Jeffrey F. Naughton,et al.  Towards Linear Algebra over Normalized Data , 2016, Proc. VLDB Endow..

[23]  Sergey Brin,et al.  The Anatomy of a Large-Scale Hypertextual Web Search Engine , 1998, Comput. Networks.

[24]  S. Basu,et al.  Algorithms in real algebraic geometry , 2003 .

[25]  Anthony C. Klug Equivalence of Relational Algebra and Relational Calculus Query Languages Having Aggregate Functions , 1982, JACM.

[26]  Martin Otto,et al.  Bounded Variable Logics and Counting: A Study in Finite Models , 1997, Lecture Notes in Logic.

[27]  Lauri Hella,et al.  Logics with aggregate operators , 2001, JACM.

[28]  Leonid Libkin Expressive Power of SQL , 2001, ICDT.

[29]  Thomas Schwentick,et al.  Reachability Is in DynFO , 2015, ICALP.

[30]  Jirí Matousek,et al.  Intersection graphs of segments and $\exists\mathbb{R}$ , 2014, ArXiv.

[31]  Taisuke Sato Embedding Tarskian Semantics in Vector Spaces , 2017, AAAI Workshops.

[32]  Mijung Kim TensorDB and Tensor-Relational Model (TRM) for Efficient Tensor-Relational Operations , 2014 .

[33]  Dan Suciu,et al.  LaraDB: A Minimalist Kernel for Linear and Relational Algebra Computation , 2017, BeyondMR@SIGMOD.

[34]  A. Tarski,et al.  A Formalization Of Set Theory Without Variables , 1987 .

[35]  Singh M. Nayan,et al.  On Fixed Points , 1981 .

[36]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.

[37]  Neil Immerman,et al.  An optimal lower bound on the number of variables for graph identification , 1992, Comb..

[38]  Anuj Dawar,et al.  Logics with Rank Operators , 2009, 2009 24th Annual IEEE Symposium on Logic In Computer Science.

[39]  Anand Rajaraman,et al.  Mining of Massive Datasets , 2011 .

[40]  Anuj Dawar,et al.  On the Descriptive Complexity of Linear Algebra , 2008, WoLLIC.

[41]  Jan Van den Bussche,et al.  A crash course on database queries , 2007, PODS.

[42]  Phokion G. Kolaitis On the Expressive Power of Logics on Finite Models , 2007 .

[43]  Taisuke Sato,et al.  A linear algebraic approach to datalog evaluation , 2016, Theory and Practice of Logic Programming.

[44]  Maarten Marx,et al.  Multi-dimensional modal logic , 1997, Applied logic series.

[45]  Gene H. Golub,et al.  Matrix computations , 1983 .