-
Specification and Automatic Verification of Computational Reductions
Authors:
Julien Grange,
Fabian Vehlken,
Nils Vortmeier,
Thomas Zeume
Abstract:
We are interested in the following validation problem for computational reductions: for algorithmic problems $P$ and $P^\star$, is a given candidate reduction indeed a reduction from $P$ to $P^\star$? Unsurprisingly, this problem is undecidable even for very restricted classes of reductions. This leads to the question: Is there a natural, expressive class of reductions for which the validation pro…
▽ More
We are interested in the following validation problem for computational reductions: for algorithmic problems $P$ and $P^\star$, is a given candidate reduction indeed a reduction from $P$ to $P^\star$? Unsurprisingly, this problem is undecidable even for very restricted classes of reductions. This leads to the question: Is there a natural, expressive class of reductions for which the validation problem can be attacked algorithmically? We answer this question positively by introducing an easy-to-use graphical specification mechanism for computational reductions, called cookbook reductions. We show that cookbook reductions are sufficiently expressive to cover many classical graph reductions and expressive enough so that SAT remains NP-complete (in the presence of a linear order). Surprisingly, the validation problem is decidable for natural and expressive subclasses of cookbook reductions.
△ Less
Submitted 4 July, 2024;
originally announced July 2024.
-
Givens Rotations for QR Decomposition, SVD and PCA over Database Joins
Authors:
Dan Olteanu,
Nils Vortmeier,
Đorđe Živanović
Abstract:
This article introduces Figaro, an algorithm for computing the upper-triangular matrix in the QR decomposition of the matrix defined by the natural join over relational data. Figaro's main novelty is that it pushes the QR decomposition past the join. This leads to several desirable properties. For acyclic joins, it takes time linear in the database size and independent of the join size. Its execut…
▽ More
This article introduces Figaro, an algorithm for computing the upper-triangular matrix in the QR decomposition of the matrix defined by the natural join over relational data. Figaro's main novelty is that it pushes the QR decomposition past the join. This leads to several desirable properties. For acyclic joins, it takes time linear in the database size and independent of the join size. Its execution is equivalent to the application of a sequence of Givens rotations proportional to the join size. Its number of rounding errors relative to the classical QR decomposition algorithms is on par with the database size relative to the join output size.
The QR decomposition lies at the core of many linear algebra computations including the singular value decomposition (SVD) and the principal component analysis (PCA). We show how Figaro can be used to compute the orthogonal matrix in the QR decomposition, the SVD and the PCA of the join output without the need to materialize the join output.
A suite of experiments validate that Figaro can outperform both in runtime performance and numerical accuracy the LAPACK library Intel MKL by a factor proportional to the gap between the sizes of the join output and input.
△ Less
Submitted 16 October, 2023; v1 submitted 1 April, 2022;
originally announced April 2022.
-
The Dynamic Complexity of Acyclic Hypergraph Homomorphisms
Authors:
Nils Vortmeier,
Ioannis Kokkinis
Abstract:
Finding a homomorphism from some hypergraph $\mathcal{Q}$ (or some relational structure) to another hypergraph $\mathcal{D}$ is a fundamental problem in computer science. We show that an answer to this problem can be maintained under single-edge changes of $\mathcal{Q}$, as long as it stays acyclic, in the DynFO framework of Patnaik and Immerman that uses updates expressed in first-order logic. If…
▽ More
Finding a homomorphism from some hypergraph $\mathcal{Q}$ (or some relational structure) to another hypergraph $\mathcal{D}$ is a fundamental problem in computer science. We show that an answer to this problem can be maintained under single-edge changes of $\mathcal{Q}$, as long as it stays acyclic, in the DynFO framework of Patnaik and Immerman that uses updates expressed in first-order logic. If additionally also changes of $\mathcal{D}$ are allowed, we show that it is unlikely that existence of homomorphisms can be maintained in DynFO.
△ Less
Submitted 13 July, 2021;
originally announced July 2021.
-
Work-sensitive Dynamic Complexity of Formal Languages
Authors:
Jonas Schmidt,
Thomas Schwentick,
Till Tantau,
Nils Vortmeier,
Thomas Zeume
Abstract:
Which amount of parallel resources is needed for updating a query result after changing an input? In this work we study the amount of work required for dynamically answering membership and range queries for formal languages in parallel constant time with polynomially many processors. As a prerequisite, we propose a framework for specifying dynamic, parallel, constant-time programs that require sma…
▽ More
Which amount of parallel resources is needed for updating a query result after changing an input? In this work we study the amount of work required for dynamically answering membership and range queries for formal languages in parallel constant time with polynomially many processors. As a prerequisite, we propose a framework for specifying dynamic, parallel, constant-time programs that require small amounts of work. This framework is based on the dynamic descriptive complexity framework by Patnaik and Immerman.
△ Less
Submitted 21 January, 2021;
originally announced January 2021.
-
Dynamic complexity of Reachability: How many changes can we handle?
Authors:
Samir Datta,
Pankaj Kumar,
Anish Mukherjee,
Anuj Tawari,
Nils Vortmeier,
Thomas Zeume
Abstract:
In 2015, it was shown that reachability for arbitrary directed graphs can be updated by first-order formulas after inserting or deleting single edges. Later, in 2018, this was extended for changes of size $\frac{\log n}{\log \log n}$, where $n$ is the size of the graph. Changes of polylogarithmic size can be handled when also majority quantifiers may be used.
In this paper we extend these result…
▽ More
In 2015, it was shown that reachability for arbitrary directed graphs can be updated by first-order formulas after inserting or deleting single edges. Later, in 2018, this was extended for changes of size $\frac{\log n}{\log \log n}$, where $n$ is the size of the graph. Changes of polylogarithmic size can be handled when also majority quantifiers may be used.
In this paper we extend these results by showing that, for changes of polylogarithmic size, first-order update formulas suffice for maintaining (1) undirected reachability, and (2) directed reachability under insertions. For classes of directed graphs for which efficient parallel algorithms can compute non-zero circulation weights, reachability can be maintained with update formulas that may use "modulo 2" quantifiers under changes of polylogarithmic size. Examples for these classes include the class of planar graphs and graphs with bounded treewidth. The latter is shown here.
As the logics we consider cannot maintain reachability under changes of larger sizes, our results are optimal with respect to the size of the changes.
△ Less
Submitted 27 April, 2020;
originally announced April 2020.
-
Dynamic Complexity Meets Parameterised Algorithms
Authors:
Jonas Schmidt,
Thomas Schwentick,
Nils Vortmeier,
Thomas Zeume,
Ioannis Kokkinis
Abstract:
Dynamic Complexity studies the maintainability of queries with logical formulas in a setting where the underlying structure or database changes over time. Most often, these formulas are from first-order logic, giving rise to the dynamic complexity class DynFO. This paper investigates extensions of DynFO in the spirit of parameterised algorithms. In this setting structures come with a parameter…
▽ More
Dynamic Complexity studies the maintainability of queries with logical formulas in a setting where the underlying structure or database changes over time. Most often, these formulas are from first-order logic, giving rise to the dynamic complexity class DynFO. This paper investigates extensions of DynFO in the spirit of parameterised algorithms. In this setting structures come with a parameter $k$ and the extensions allow additional "space" of size $f(k)$ (in the form of an additional structure of this size) or additional time $f(k)$ (in the form of iterations of formulas) or both. The resulting classes are compared with their non-dynamic counterparts and other classes. The main part of the paper explores the applicability of methods for parameterised algorithms to this setting through case studies for various well-known parameterised problems.
△ Less
Submitted 15 October, 2019; v1 submitted 14 October, 2019;
originally announced October 2019.
-
Dynamic Complexity of Parity Exists Queries
Authors:
Nils Vortmeier,
Thomas Zeume
Abstract:
Given a graph whose nodes may be coloured red, the parity of the number of red nodes can easily be maintained with first-order update rules in the dynamic complexity framework DynFO of Patnaik and Immerman. Can this be generalised to other or even all queries that are definable in first-order logic extended by parity quantifiers? We consider the query that asks whether the number of nodes that hav…
▽ More
Given a graph whose nodes may be coloured red, the parity of the number of red nodes can easily be maintained with first-order update rules in the dynamic complexity framework DynFO of Patnaik and Immerman. Can this be generalised to other or even all queries that are definable in first-order logic extended by parity quantifiers? We consider the query that asks whether the number of nodes that have an edge to a red node is odd. Already this simple query of quantifier structure parity-exists is a major roadblock for dynamically capturing extensions of first-order logic.
We show that this query cannot be maintained with quantifier-free first-order update rules, and that variants induce a hierarchy for such update rules with respect to the arity of the maintained auxiliary relations. Towards maintaining the query with full first-order update rules, it is shown that degree-restricted variants can be maintained.
△ Less
Submitted 15 November, 2021; v1 submitted 14 October, 2019;
originally announced October 2019.
-
Reachability and Distances under Multiple Changes
Authors:
Samir Datta,
Anish Mukherjee,
Nils Vortmeier,
Thomas Zeume
Abstract:
Recently it was shown that the transitive closure of a directed graph can be updated using first-order formulas after insertions and deletions of single edges in the dynamic descriptive complexity framework by Dong, Su, and Topor, and Patnaik and Immerman. In other words, Reachability is in DynFO.
In this article we extend the framework to changes of multiple edges at a time, and study the Reach…
▽ More
Recently it was shown that the transitive closure of a directed graph can be updated using first-order formulas after insertions and deletions of single edges in the dynamic descriptive complexity framework by Dong, Su, and Topor, and Patnaik and Immerman. In other words, Reachability is in DynFO.
In this article we extend the framework to changes of multiple edges at a time, and study the Reachability and Distance queries under these changes. We show that the former problem can be maintained in DynFO$(+, \times)$ under changes affecting O($\frac{\log n}{\log \log n}$) nodes, for graphs with $n$ nodes. If the update formulas may use a majority quantifier then both Reachability and Distance can be maintained under changes that affect O($\log^c n$) nodes, for fixed $c \in \mathbb{N}$. Some preliminary results towards showing that distances are in DynFO are discussed.
△ Less
Submitted 23 April, 2018;
originally announced April 2018.
-
A Strategy for Dynamic Programs: Start over and Muddle through
Authors:
Samir Datta,
Anish Mukherjee,
Thomas Schwentick,
Nils Vortmeier,
Thomas Zeume
Abstract:
In the setting of DynFO, dynamic programs update the stored result of a query whenever the underlying data changes. This update is expressed in terms of first-order logic. We introduce a strategy for constructing dynamic programs that utilises periodic computation of auxiliary data from scratch and the ability to maintain a query for a limited number of change steps. We show that if some program c…
▽ More
In the setting of DynFO, dynamic programs update the stored result of a query whenever the underlying data changes. This update is expressed in terms of first-order logic. We introduce a strategy for constructing dynamic programs that utilises periodic computation of auxiliary data from scratch and the ability to maintain a query for a limited number of change steps. We show that if some program can maintain a query for log n change steps after an AC$^1$-computable initialisation, it can be maintained by a first-order dynamic program as well, i.e., in DynFO. As an application, it is shown that decision and optimisation problems defined by monadic second-order (MSO) formulas are in DynFO, if only change sequences that produce graphs of bounded treewidth are allowed. To establish this result, a Feferman-Vaught-type composition theorem for MSO is established that might be useful in its own right.
△ Less
Submitted 7 May, 2019; v1 submitted 26 April, 2017;
originally announced April 2017.
-
Dynamic Complexity under Definable Changes
Authors:
Thomas Schwentick,
Nils Vortmeier,
Thomas Zeume
Abstract:
This paper studies dynamic complexity under definable change operations in the DynFO framework by Patnaik and Immerman. It is shown that for changes definable by parameter-free first-order formulas, all (uniform) $AC^1$ queries can be maintained by first-order dynamic programs. Furthermore, many maintenance results for single-tuple changes are extended to more powerful change operations: (1) The r…
▽ More
This paper studies dynamic complexity under definable change operations in the DynFO framework by Patnaik and Immerman. It is shown that for changes definable by parameter-free first-order formulas, all (uniform) $AC^1$ queries can be maintained by first-order dynamic programs. Furthermore, many maintenance results for single-tuple changes are extended to more powerful change operations: (1) The reachability query for undirected graphs is first-order maintainable under single tuple changes and first-order defined insertions, likewise the reachability query for directed acyclic graphs under quantifier-free insertions. (2) Context-free languages are first-order maintainable under $Σ_1$-defined changes. These results are complemented by several inexpressibility results, for example, that the reachability query cannot be maintained by quantifier-free programs under definable, quantifier-free deletions.
△ Less
Submitted 10 January, 2017;
originally announced January 2017.
-
Dynamic Graph Queries
Authors:
Pablo Muñoz,
Nils Vortmeier,
Thomas Zeume
Abstract:
Graph databases in many applications---semantic web, transport or biological networks among others---are not only large, but also frequently modified. Evaluating graph queries in this dynamic context is a challenging task, as those queries often combine first-order and navigational features.
Motivated by recent results on maintaining dynamic reachability, we study the dynamic evaluation of tradi…
▽ More
Graph databases in many applications---semantic web, transport or biological networks among others---are not only large, but also frequently modified. Evaluating graph queries in this dynamic context is a challenging task, as those queries often combine first-order and navigational features.
Motivated by recent results on maintaining dynamic reachability, we study the dynamic evaluation of traditional query languages for graphs in the descriptive complexity framework. Our focus is on maintaining regular path queries, and extensions thereof, by first-order formulas. In particular we are interested in path queries defined by non-regular languages and in extended conjunctive regular path queries (which allow to compare labels of paths based on word relations). Further we study the closely related problems of maintaining distances in graphs and reachability in product graphs.
In this preliminary study we obtain upper bounds for those problems in restricted settings, such as undirected and acyclic graphs, or under insertions only, and negative results regarding quantifier-free update formulas. In addition we point out interesting directions for further research.
△ Less
Submitted 17 December, 2015;
originally announced December 2015.
-
Static Analysis for Logic-Based Dynamic Programs
Authors:
Thomas Schwentick,
Nils Vortmeier,
Thomas Zeume
Abstract:
A dynamic program, as introduced by Patnaik and Immerman (1994), maintains the result of a fixed query for an input database which is subject to tuple insertions and deletions. It can use an auxiliary database whose relations are updated via first-order formulas upon modifications of the input database. This paper studies static analysis problems for dynamic programs and investigates, more specifi…
▽ More
A dynamic program, as introduced by Patnaik and Immerman (1994), maintains the result of a fixed query for an input database which is subject to tuple insertions and deletions. It can use an auxiliary database whose relations are updated via first-order formulas upon modifications of the input database. This paper studies static analysis problems for dynamic programs and investigates, more specifically, the decidability of the following three questions. Is the answer relation of a given dynamic program always empty? Does a program actually maintain a query? Is the content of auxiliary relations independent of the modification sequence that lead to an input database? In general, all these problems can easily be seen to be undecidable for full first-order programs. Therefore the paper aims at pinpointing the exact decidability borderline for programs with restricted arity (of the input and/or auxiliary database) and restricted quantification.
△ Less
Submitted 16 July, 2015;
originally announced July 2015.