We address the problem of checking query containment, a foundational problem in database research. Although extensively studied in theory research, optimization opportunities arising from query containment are not fully leveraged in commercial database systems, due to the high computational complexity and sometimes even undecidability of the underlying decision problem. In this article, we present the first approach to applying quantum computing to the query containment problem for conjunctive queries under set semantics. We propose a novel formulation as an optimization problem that can be solved on gate-based quantum hardware, and in some cases directly maps to quantum annealers. We formally prove this formulation to be correct and present a prototype implementation which we evaluate using simulator software as well as quantum devices. Our experiments successfully demonstrate that our approach is sound and scales within the current limitations of quantum hardware. In doing so, we show that quantum optimization can effectively address this problem. Thereby, we contribute a new computational perspective on the query containment problem.
TREE CONTAINMENT is a central decision problem in mathematical phylogenetics, asking whether a given rooted phylogenetic tree is embeddable in ("displayed by") a given rooted phylogenetic network. While the problem is NP-complete for general networks, many algorithmic advances have relied on structural parameters that capture how "tree-like" a network is. In this paper we investigate TREE CONTAINMENT under the structural parameter scanwidth, a directed width measure generalizing popular parameters measuring tree-likeness of phylogenetic networks. We first present a parameterized algorithm that solves the problem in $O(4^{k + k\log{k}} n + nm^2)$ time, where $n$ and $m$ are the numbers of nodes and arcs in the network and $k$ is the width of a given tree-extension. Complementing this upper bound, we prove a matching lower bound under the Exponential-Time Hypothesis (ETH), showing that there is no algorithm for TREE CONTAINMENT that runs in $2^{o(c\log{c})} n^{O(1)}$ time, even on binary inputs, where $c$ is the directed cutwidth of the input network, which upper-bounds the scanwidth $k$.
Building upon the work of Buczyńska et al., we study here tensor formats and their corresponding encoding of tensors via two-fold tensor products determined by the combinatorics of a binary tree. The set of all tensors representable by a given network forms the corresponding tensor network variety. A very basic question asks whether every tensor representable by one network is representable by another network, namely, when one tensor network variety is contained in another. Specific instances of this question became known as the Hackbusch Conjecture. Here, we propose a general framework for this question and take first steps, theoretical as well as experimental, towards a better understanding. In particular, given any two binary trees on $n$ leaves, we define (and prove existence of) a new measure, the containment exponent, which gauges how much one has to boost the parameters of one network for the containment to hold. We present an algorithm for bounding these containment exponents of tensor network varieties and report on an exhaustive search among trees on up to $n=8$ leaves.
The April 2026 disclosure that a frontier large language model escaped its security sandbox, executed unauthorized actions, and concealed its modifications to version control history demonstrates that agentic AI systems with autonomous tool access can circumvent the containment mechanisms designed to constrain them. This paper analyzes four categories of current containment approaches - alignment training, environmental sandboxing, application-level tool-call interception, and accessible audit systems - and identifies the failure modes each exhibits when the AI agent is treated as a potential adversary rather than a trusted component receiving adversarial inputs. We categorize five behavioral incidents from the public disclosure and situate them within 698 real-world AI scheming incidents documented by the Centre for Long-Term Resilience between October 2025 and March 2026, a 4.9x acceleration establishing the challenge as systemic. We derive five architectural requirements: trust separation through layered OS privilege enforcement with semantic intent analysis, sequential intent inference through five-phase taxonomic monitoring, independent containment integrity monitoring, advers
The zonotope containment problem, i.e., whether one zonotope is contained in another, is a central problem in control theory. Applications include detecting faults and robustifying controllers by computing invariant sets, and obtain fixed points in reachability analysis. Despite the inherent co-NP-hardness of this problem, an approximation algorithm developed by S. Sadraddini and R. Tedrake has gained widespread recognition for its swift execution and consistent reliability in practice. In our study, we substantiate the precision of the algorithm with a definitive proof, elucidating the empirical accuracy observed in practice. Our proof hinges on establishing a connection between the containment problem and the computation of matrix norms, thereby enabling the extension of the approximation algorithm to encompass ellipsotopes -- a broader class of sets derived from zonotopes. We also explore the computational complexity of the ellipsotope containment problem with a focus on approximability. Finally, we present new methods to compute safe sets for linear dynamical systems, demonstrating the practical relevance of approximating the ellipsotope containment problem.
Tree Containment is a fundamental problem in phylogenetics useful for verifying a proposed phylogenetic network, representing the evolutionary history of certain species. Tree Containment asks whether the given phylogenetic tree (for instance, constructed from a DNA fragment showing tree-like evolution) is contained in the given phylogenetic network. In the general case, this is an NP-complete problem. We propose to solve it approximately using Graph Neural Networks. In particular, we propose to combine the given network and the tree and apply a Graph Neural Network to this network-tree graph. This way, we achieve the capability of solving the tree containment instances representing a larger number of species than the instances contained in the training dataset (i.e., our algorithm has the inductive learning ability). Our algorithm demonstrates an accuracy of over $95\%$ in solving the tree containment problem on instances with up to 100 leaves.
We introduce infinitesimal weak containment for measure-preserving actions of a countable group $Γ$: an action $(X,μ)$ is infinitesimally contained in $(Y,ν)$ if the statistics of the action of $Γ$ on small measure subsets of $X$ can be approximated inside $Y$. We show that the Bernoulli shift $[0,1]^Γ$ is infinitesimally contained in the left-regular action of $Γ$. For exact groups, this implies that sparse factor-of-iid subsets of $Γ$ are approximately hyperfinite. We use it to quantify a theorem of Chifan--Ioana on measured subrelations of the Bernoulli shift of an exact group. For the proof of infinitesimal containment we define \emph{entropy support maps}, which take a small subset $U$ of $\{0,1\}^I$ and assign weights to coordinates above every point of $U$, according to how ''important'' they are for the structure of the set.
We build on work of Elek and Zucker and develop a topological analogue of the theory of weak containment. We show that definitions in terms of local patterns, containment in ultra(co)products, and continuous model theory are all equivalent, just as in ergodic theory. And, for actions on Cantor space, we show these are all equivalent to approximate conjugacy. Restricting our attention to Cantor space, we connect this theory to questions about generic actions. We show how the shape of the space of weak equivalence classes reflects the geometry of the acting group. And, we show that, for $\mathbb{Z}^2$, there is no smallest limit of finite actions.
Let $G$ be a second-countable, locally compact Hausdorff groupoid equipped with a Haar system. This paper investigates the weak containment of continuous unitary representations of groupoids. We show that both induction and inner tensor product of representations preserve weak containment. Additionally, we introduce the notion of a topological invariant mean on $G/H$ and explore its connection to amenability. With that, we establish a groupoid analogue of Greenleaf's theorem. Finally, we provide independent results concerning the restriction of induced representations for continuous unitary representations of relatively clopen wide subgroupoids $H\subseteq G$ with discrete unit space and closed transitive wide subgroupoids of compact transitive groupoids.
In this paper, we introduce the notion of the containment graph of a family of sets and containment classes of graphs and posets. Let $Z$ be a family of nonempty sets. We call a (simple, finite) graph G = (V, E) a $Z$-containment graph provided one can assign to each vertex $v_i \in V $ a set $S_i \in Z$ such that $v_i v_j \in E$ if and only if $S_i \subset S_j$ or $S_j \subset S_i$ . Similarly, we call a (strict) partially ordered set $P = (V, <)$ a $Z$-containment poset if to each $v_i \in V $ we can assign a set $S_i \in Z$ such that $v_i < v_j$ if and only if $S_i \subset S_j$. Obviously, $G$ is the comparability graph of $P$. We give some basic results on containment graphs and investigate the containment graphs of iso-oriented boxes in $d$-space. We present a characterization of those classes of posets and graphs that have containment representations by sets of a specific type, and we extend our results to ``injective'' containment classes. After that we discuss similar characterizations for intersection, overlap, and disjointedness classes of graphs. Finally, in the last section we discuss the nonexistence of a characterization theorem for ``strong'' containment classe
The problem of determining whether a graph $G$ contains another graph $H$ as a minor, referred to as the minor containment problem, is a fundamental problem in the field of graph algorithms. While it is NP-complete when $G$ and $H$ are general graphs, it is sometimes tractable on more restricted graph classes. This study focuses on the case where both $G$ and $H$ are trees, known as the tree minor containment problem. Even in this case, the problem is known to be NP-complete. In contrast, polynomial-time algorithms are known for the case when both trees are caterpillars or when the maximum degree of $H$ is a constant. Our research aims to clarify the boundary of tractability and intractability for the tree minor containment problem. Specifically, we provide dichotomies for the computational complexities of the problem based on three structural parameters: the diameter, pathwidth, and path eccentricity.
We investigate vertex levels of containment in a random hypergraph grown in the spirit of a recursive tree. We consider a local profile tracking the evolution of the containment of a particular vertex over time, and a global profile concerned about counts of the number of vertices of a particular containment level. For the local containment profile, we obtain the exact mean, variance and probability distribution in terms of standard combinatorial quantities like generalized harmonic numbers and Stirling numbers of the first kind. Asymptotically, we observe phases: the early vertices have an asymptotically normal distribution, intermediate vertices have a Poisson distribution, and late vertices have a degenerate distribution. As for the global containment profile, we establish an asymptotically normal distribution for the number of vertices at the smallest containment level as well as their covariances with the number of vertices at the second smallest containment level and the variances of these numbers.
Tight estimates of exit/containment probabilities are of particular importance in many control problems. Yet, estimating the exit/containment probabilities is non-trivial: even for linear systems (Ornstein-Uhlenbeck processes), the containment probability can be computed exactly for only some particular values of the system parameters. In this paper, we derive tight bounds on the containment probability for a class of nonlinear stochastic systems. The core idea is to compare the "pull strength" (how hard the deterministic part of the system dynamics pulls towards the origin) experienced by the nonlinear system at hand with that of a well-chosen process for which tight estimates of the containment probability are known or can be numerically obtained (e.g. an Ornstein-Uhlenbeck process). Specifically, the main technical contribution of this paper is to define a suitable dominance relationship between the pull strengths of two systems and to prove that this dominance relationship implies an order relationship between their containment probabilities. We also discuss the link with contraction theory and highlight some examples of applications.
We consider the class of conditional graph patterns (\emph{CGPs}) that allow user to query data graphs with complex patterns that contain negation and predicates. To overcome the prohibitive cost of subgraph isomorphism, we consider matching of \emph{CGPs} under simulation semantics which can be conducted in quadratic time. In emerging applications, one would like to reduce more this matching time, and the static analysis of patterns may allow ensuring part of this reduction. We study the containment problem of \emph{CGPs} that aims to check whether the matches of some pattern $P_1$, over any data graph, are contained in those of another pattern $P_2$ (written $P_1\sqsubseteq P_2$). The optimization process consists to extract matches of $P_1$ only from those of $P_2$ without querying the (possibly large) data graph. We show that the traditional semantics of containment is decidable in quadratic time, but it fails to meet the optimization goal in the presence of negation and predicates. To overcome this limit, we propose a new semantics of containment, called \emph{strong containment}, that is more suitable for \emph{CGPs} and allows to reduce their matching time. We show that \emp
We study the computational question whether a given polytope or spectrahedron $S_A$ (as given by the positive semidefiniteness region of a linear matrix pencil $A(x)$) is contained in another one $S_B$. First we classify the computational complexity, extending results on the polytope/polytope-case by Gritzmann and Klee to the polytope/spectrahedron-case. For various restricted containment problems, NP-hardness is shown. We then study in detail semidefinite conditions to certify containment, building upon work by Ben-Tal, Nemirovski and Helton, Klep, McCullough. In particular, we discuss variations of a sufficient semidefinite condition to certify containment of a spectrahedron in a spectrahedron. It is shown that these sufficient conditions even provide exact semidefinite characterizations for containment in several important cases, including containment of a spectrahedron in a polyhedron. Moreover, in the case of bounded $S_A$ the criteria will always succeed in certifying containment of some scaled spectrahedron $νS_A$ in $S_B$.
The query containment problem is a fundamental algorithmic problem in data management. While this problem is well understood under set semantics, it is by far less understood under bag semantics. In particular, it is a long-standing open question whether or not the conjunctive query containment problem under bag semantics is decidable. We unveil tight connections between information theory and the conjunctive query containment under bag semantics. These connections are established using information inequalities, which are considered to be the laws of information theory. Our first main result asserts that deciding the validity of maxima of information inequalities is many-one equivalent to the restricted case of conjunctive query containment in which the containing query is acyclic; thus, either both these problems are decidable or both are undecidable. Our second main result identifies a new decidable case of the conjunctive query containment problem under bag semantics. Specifically, we give an exponential time algorithm for conjunctive query containment under bag semantics, provided the containing query is chordal and admits a simple junction tree.
We study the problem of containment for shape expression schemas (ShEx) for RDF graphs. We identify a subclass of ShEx that has a natural graphical representation in the form of shape graphs and their semantics is captured with a tractable notion of embedding of an RDF graph in a shape graph. When applied to pairs of shape graphs, an embedding is a sufficient condition for containment, and for a practical subclass of deterministic shape graphs, it is also a necessary one, thus yielding a subclass with tractable containment. While for general shape graphs a minimal counter-example i.e., an instance proving non-containment, might be of exponential size, we show that containment is EXP-hard and in coNEXP. Finally, we show that containment for arbitrary ShEx is coNEXP-hard and in coTwoNEXP^NP.
The containment rate of query Q1 in query Q2 over database D is the percentage of Q1's result tuples over D that are also in Q2's result over D. We directly estimate containment rates between pairs of queries over a specific database. For this, we use a specialized deep learning scheme, CRN, which is tailored to representing pairs of SQL queries. Result-cardinality estimation is a core component of query optimization. We describe a novel approach for estimating queries result-cardinalities using estimated containment rates among queries. This containment rate estimation may rely on CRN or embed, unchanged, known cardinality estimation methods. Experimentally, our novel approach for estimating cardinalities, using containment rates between queries, on a challenging real-world database, realizes significant improvements to state of the art cardinality estimation methods.
Phylogenetic (evolutionary) trees and networks are leaf-labeled graphs that are widely used to represent the evolutionary relationships between entities such as species, languages, cancer cells, and viruses. To reconstruct and analyze phylogenetic networks, the problem of deciding whether or not a given rooted phylogenetic network embeds a given rooted phylogenetic tree is of recurring interest. This problem, formally know as Tree Containment, is NP-complete in general and polynomial-time solvable for certain classes of phylogenetic networks. In this paper, we connect ideas from quantum computing and phylogenetics to present an efficient Quadratic Unconstrained Binary Optimization formulation for Tree Containment in the general setting. For an instance (N,T) of Tree Containment, where N is a phylogenetic network with n_N vertices and T is a phylogenetic tree with n_T vertices, the number of logical qubits that are required for our formulation is O(n_N n_T).
The containment problem of Datalog queries is well known to be undecidable. There are, however, several Datalog fragments for which containment is known to be decidable, most notably monadic Datalog and several "regular" query languages on graphs. Monadically Defined Queries (MQs) have been introduced recently as a joint generalization of these query languages. In this paper, we study a wide range of Datalog fragments with decidable query containment and determine exact complexity results for this problem. We generalize MQs to (Frontier-)Guarded Queries (GQs), and show that the containment problem is 3ExpTime-complete in either case, even if we allow arbitrary Datalog in the sub-query. If we focus on graph query languages, i.e., fragments of linear Datalog, then this complexity is reduced to 2ExpSpace. We also consider nested queries, which gain further expressivity by using predicates that are defined by inner queries. We show that nesting leads to an exponentially increasing hierarchy for the complexity of query containment, both in the linear and in the general case. Our results settle open problems for (nested) MQs, and they paint a comprehensive picture of the state of the art