Direct Access for Conjunctive Queries with Negation
This paper investigates the direct access problem to the k-th answer in lexicographic order for conjunctive queries with negation (CQ¬) over databases: after polynomial-time preprocessing, arbitrary rank-k queries must be answered in polylogarithmic time. To address this, we systematically extend the characterization of direct-access tractability from positive conjunctive queries to CQ¬, introducing a unified framework based on representable relation circuits. We prove that both β-acyclic and bounded nested set-width classes of negative queries are tractable within this framework, strictly generalizing prior tractability boundaries for positive and negative queries. Experimental evaluation confirms that our approach achieves polynomial preprocessing and polylogarithmic access time, subsuming all previously known tractable classes and extending beyond them.