Counting possible worlds #
The counting problem behind query evaluation over an incomplete or
probabilistic database, for an arbitrary finite relational schema L.
An instance is a structure over two copies of the schema, L.sum L: the left
copy holds the certain facts and the right copy the uncertain ones. A
possible world keeps every certain fact and some of the uncertain ones
(DescriptiveComplexity.IsWorld); it is a structure over the schema itself
(DescriptiveComplexity.worldStructure). For a sentence φ of the schema,
DescriptiveComplexity.PossibleWorlds φ is the number of possible worlds in
which φ holds.
A world is one relation per symbol of the schema, i.e., an assignment of the
block DescriptiveComplexity.worldBlock, and both “this is a world” and “φ
holds in it” are first-order in the instance expanded by that block. So the
problem is the witness count of a kernel, and is in #P for every sentence
whatever (DescriptiveComplexity.possibleWorlds_mem_sharpP): the data
complexity of counting the worlds of a first-order query never exceeds #P.
The reading in probabilities: a fact that is uncertain and not certain is
open, and an instance with k open facts has 2 ^ k worlds
(DescriptiveComplexity.card_isWorld). With each open fact present with
probability 1/2, independently, the probability of φ is
PossibleWorlds φ / 2 ^ k: the model is a tuple-independent database whose
probabilities are 1/2 and 1.
Hardness depends on the query, and is the business of
DescriptiveComplexity.Examples.ProbabilisticQueries.
Worlds #
The block guessing a world: one relation variable per relation symbol of the schema, of the same arity.
Equations
Instances For
Dependency graph
The structure over the schema that a family of relations is.
Equations
Instances For
Dependency graph
The family of relations ρ is a possible world of the instance: it
contains every certain fact, and only certain or uncertain facts.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
A fact that is uncertain and not certain: the facts a world is free to keep or to drop.
Equations
Instances For
Dependency graph
An instance with k open facts has 2 ^ k possible worlds: a world
is a choice among them. So, each open fact being present with probability
1/2 independently of the others, the probability of a sentence is the
number of worlds in which it holds, divided by 2 ^ k.
Registered in the Lax archive as
Lax794877.WorldCount.card_isWorld.
Dependency graph
The kernel #
The vocabulary of the kernel: the instance, and the guessed world.
Equations
Instances For
Dependency graph
The symbol of the guessed world for a relation symbol of the schema.
Equations
Instances For
Dependency graph
Reading a sentence of the schema in the guessed world.
Equations
- DescriptiveComplexity.toWorld L = { onFunction := fun {x : ℕ} (f : L.Functions x) => isEmptyElim f, onRelation := fun {n : ℕ} (R : L.Relations n) => DescriptiveComplexity.worldSym ⟨n, R⟩ }
Instances For
Dependency graph
The sentence saying that the guessed relations form a possible world.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The kernel of the problem: the guessed relations form a possible world, in which the sentence holds.
Equations
Instances For
Dependency graph
The counting problem #
Counting possible worlds: the number of possible worlds of the
instance in which the sentence φ of the schema holds.
Equations
Instances For
Dependency graph
Dependency graph
Counting the possible worlds of a first-order sentence is in #P,
whatever the sentence.
Registered in the Lax archive as
Lax794877.WorldsInSharpP.possibleWorlds_mem_sharpP.