cd /news/artificial-intelligence/the-p-completeness-of-inverted-index… · home topics artificial-intelligence article
[ARTICLE · art-103244] src=machinelearning.apple.com ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

The P-Completeness of Inverted Index Traversal: On the Complexity of Evaluating Boolean Query DAGs

A paper by Amir Aavani, published in August 2026, proves that evaluating Boolean query DAGs over inverted indexes is P-Complete, establishing theoretical limits for AI agents' search workflows. The paper introduces ComputePN, a deterministic algorithm that bounds evaluation time to O(|Q| · |U_active|) by decoupling negation from universe-scale materialization, avoiding exponential blowup and universal scan penalties.

read2 min views3 publishedAug 19, 2026
The P-Completeness of Inverted Index Traversal: On the Complexity of Evaluating Boolean Query DAGs
Image: Apple ML Research

content type paperpublished August 2026 The P-Completeness of Inverted Index Traversal: On the Complexity of Evaluating Boolean Query DAGs

AuthorsAmir Aavani

The P-Completeness of Inverted Index Traversal: On the Complexity of Evaluating Boolean Query DAGs

AuthorsAmir Aavani

Modern AI agents increasingly rely on search infrastructure to execute complex, neuro-symbolic reasoning workflows. These workflows often compile into deeply nested, non-monotonic Boolean queries over text fields. However, standard query evaluation strategies over inverted indices face severe theoretical limits when handling these structures. Stateful iterator models (Document-at-a-Time) are structurally bounded by NC^1 formula evaluation, suffering a worst-case O(2^|Q|) exponential blowup in query complexity when unrolling re-convergent logic. Conversely, recursive materialization models (Term-at-a-Time) incur an Ω(|U|) space complexity penalty (the Universal Scan) when evaluating logical negation over the document universe.

In this paper, we establish the theoretical boundaries of executing complex logic natively over an inverted index. We formalize a retrieval language (L_R) based on Directed Acyclic Graphs (DAGs) and prove that its evaluation problem is strictly P-Complete. To make evaluation tractable, we introduce ComputePN, a deterministic, sparsity-aware evaluation algorithm. By decoupling logical negation from universe-scale materialization via a novel Positive-Negative dual representation, and utilizing native DAG memoization, ComputePN strictly bounds evaluation time to O(|Q| · |U_active|). This approach successfully evaluates P-Complete queries natively over the index, avoiding both the combinatorial tree-expansion bottleneck and the universal scan penalty, laying the formal foundation for computational retrieval.

Scalable Private Search with Wally

October 16, 2024research area Privacy This paper presents Wally, a private search system that supports efficient semantic and keyword search queries against large databases. When sufficiently many clients are making queries, Wally’s performance is significantly better than previous systems. In previous private search systems, for each client query, the server must perform at least one expensive cryptographic operation per database entry. As a result, performance degraded…

Synthetic Query Generation using Large Language Models for Virtual Assistants

June 17, 2024research area Knowledge Bases and Search, research area Speech and Natural Language Processingconference SIGIR

This paper was accepted in the Industry Track at SIGIR 2024.

Virtual Assistants (VAs) are important Information Retrieval platforms that help users accomplish various tasks through spoken commands. The speech recognition system (speech-to-text) uses query priors, trained solely on text, to distinguish between phonetically confusing alternatives. Hence, the generation of synthetic queries that are similar to existing VA usage can greatly improve…

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @amir aavani 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/the-p-completeness-o…] indexed:0 read:2min 2026-08-19 ·