We study constant-delay enumeration for conjunctive queries with negation ($\texttt{CQ}^{\neg}$). It is known that $\textit{signed-acyclic}$ queries can be enumerated with constant delay after linear preprocessing time, using linked lists with skip links. We use a hypergraph width measure for $\texttt{CQ}^{\neg}$, the $\textit{fractional signed hyperorder width}$ ($\textsf{sfhow}$), which requires a single variable order to simultaneously handle every subset of the negative atoms, which Capelli et al. introduced to characterize the preprocessing time of direct access. $\textsf{sfhow}$ strictly generalizes signed-acyclicity (recovered when $\textsf{sfhow} = 1$) and fractional hypertree width (recovered on queries without negation). Our main algorithmic result is a variable-elimination algorithm that achieves constant-delay enumeration on input $I$ for any full $\texttt{CQ}^{\neg}$ query with preprocessing time $O(|I|^{\textsf{sfhow}})$. Furthermore, we show that using multiple variable orders can improve this bound, exhibiting an $O(|I|^{3/2})$ algorithm for $k$-cycle queries with at least one negative edge.
翻译:暂无翻译