Adaptive binary queries to a singleton oracle
DefinitionSATLocalQueryDetectorcombinatoricscomplexity-theory
An adaptive detector is a binary query tree. An internal node queries an input point and selects a subtree using the oracle's Boolean response. A leaf returns an output. The singleton oracle returns true at exactly its designated target.
Definition code
import Mathlib
set_option autoImplicit false
namespace SATLocalQuery
/-- An adaptive detector may use every previous reply when choosing its
next oracle query. The output is independent of replies absent from its trace. -/
inductive Detector (I O : Type*) where
| result : O → Detector I O
| ask : I → (Bool → Detector I O) → Detector I O
namespace Detector
variable {I O : Type*}
def run (oracle : I → Bool) : Detector I O → O
| .result output => output
| .ask i next => run oracle (next (oracle i))
def calls (oracle : I → Bool) : Detector I O → List I
| .result _ => []
| .ask i next => i :: calls oracle (next (oracle i))
def onlyAt [DecidableEq I] (target : I) : I → Bool :=
fun i => decide (i = target)
end Detector
end SATLocalQuery
Source
Deterministic oracle decision trees.