200 likes | 334 Views
Knowledge Compilation. Dr. Rolf Haenni Center for Junior Research Fellows University of Konstanz. Introduction Negational Normal Forms Knowledge Compilation Map Conclusion. Inhalt :. Query. Evaluator. Answer. Propositional KB. 1. Introduction.
E N D
Knowledge Compilation Dr. Rolf Haenni Center for Junior Research FellowsUniversity of Konstanz Introduction Negational Normal Forms Knowledge Compilation Map Conclusion Inhalt:
Query Evaluator Answer Propositional KB 1. Introduction • Propositional languages are usefull tools to represent knowledge about binary variables: • propositional KB subset of n-dimensional state space • On the basis of a propositional KB, different queries can answered • The time to answer a query grows often exponentially with the size of the propositional KB
Knowledge compilation means to pre-process the original propositional KB such that all necessary queries can be answered in polytime Propositional KB Query Pre-Processing CompiledPropositional KB PolytimeEvaluator Answer • A propositional language is more succinct than another language , iff for all sentences of size there is an equivalent sentence of size •
KB Queries: • KB Transformation: – Consistency (CO) – Validity (VA) – Clause Entailment (CE) – Term Entailment (TE) – Sentence Entailment (SE) – Equivalence (EQ) – Model Counting (MC) – Model Enumerating (ME) – Probability (PR) – Simple Forgetting (SF) – Forgetting (FO) – Conditioning (CD) – Binary Conjoining (BAND) – Conjoining (AND) – Binary Disjoining (BOR) – Disjoining (OR) – Negating (NEG) • The more succinct a language is, the less queries can be answered in polytime • The goal is thus to compile the original propositional KB into the most succinct language that supports (answer in polytime) all the necessary types of queries
Example: WFF • The size of such a DAG can be exponentially times smaller than the size of the WFF (tree): 2. Negational Normal Forms • Propositional sentences can be represented by rooted directed acyclic graphs: propositional DAG Leaves Propositions, true, false Non-Leaves Connectors
Example: Propositons Literals • and are equally succinct • A negational normal form (NNF) is a propositional DAG in which negations appear only at the bottom: • Leaves are literals
Flatness: • A sentence is flat, if the depth of the DAG is smaller or equal to 2 • The corresponding language of all flat NNFs is denoted by • Remark: CNFs and DNFs are flat • Example:
Decomposability: • A sentence is decomposable, if at every -node we have • The corresponding language is denoted by • Remark: DNFs are decomposable • Example:
Determinism: • A sentence is deterministic, if at every -node we have • The corresponding language is denoted by • Example:
Smoothness: • A sentence is smooth, if at every -nodewe have • The corresponding language is denoted by • Example:
Further Languages: • DNFs are sentences whose root is a -node and all other nodes are -nodes • The corresponding language is denoted by • CNFs are sentences whose root is a -node and all other nodes are -nodes • The corresponding language is denoted by • is the subset of whose sentences contain all prime implicates of • is the subset of whose sentences contain all prime implicants of • is the subset of whose sentences list all the models (conjunctions of maximal length) of
CO, CE, ME VA, TE CO, CE, ME, VA, TE, MC, PR, EQ? CO, CE, ME CO, CE, ME, VA, TE, MC, PR, EQ? VA, TE, CO, CE, SE, EQ, ME CO, CE, ME, VA, TE, SE, EQ CO, CE, ME, VA, TE, MC, PR, SE, EQ Overview 1: Sub-Languages
Decision: • A -node is a decision node, if it hasthe following form: This corresponds to a decision node in a binary decision diagram (BDD): • The language whose sentences consist only of decision nodes is denoted by • Remark: sentences are deterministic • Free BDD‘s (each path from the root to a leaf contains a decision variable at most once): • Ordered BDD‘s (all paths from the root to the leaves contain the decision variables in the same order):
CO, CE, ME VA, TE CO, CE, ME, VA, TE, MC, PR, EQ? CO, CE, ME CO, CE, ME, VA, TE, MC, PR, EQ? CO, CE, ME, VA, TE, MC, PR, EQ? VA, TE, CO, CE, SE, EQ, ME CO, CE, ME, VA, TE, SE, EQ CO, CE, ME, VA, TE, MC, PR, SE, EQ CO, CE, ME, VA, TE, MC, PR, SE, EQ Overview 2: Sub-Languages
3. Knowledge Compilation Map Overview 3: Succinctness
Queries Transformation TE NOT AND BAND OR BOR MC/PR Succinctness
CO, CE, ME CO, VA, CE, TE, ME, MC, PR, EQ? CO, CE, ME, VA, TE, MC, PR, EQ? VA, TE CO, CE, ME, VA, TE, MC, PR, EQ? CO, CE, ME CO, CE, ME, VA, TE, MC, PR, EQ? CO, CE, ME, VA, TE, SE, EQ VA, TE, CO, CE, SE, EQ, ME CO, CE, ME, VA, TE, MC, PR, SE, EQ CO, CE, ME, VA, TE, MC, PR, SE, EQ Overview 4: Succinctness vs. Queries
Overview 5: Succinctness vs. Transformations CD, SFO, AND, BAND, OR, BOR, NOT CD, FO, SFO, OR BOR CD, SFO, AND, BAND, BOR CD, NOT? CD, FO, SFO, BAND, OR, BOR CD, NOT? CD, NOT? CD, FO, SFO, BOR CD, BAND CD, SFO, BAND, BOR, NOT CD, FO, SFO, BAND
? 4. Conclusion • Negational normal forms (NNFs) are interesting classes of propositional languages • Special properties of NNFs are Flatness, Decomposability, Determinism, Smoothness, and Decision • The more properties a language possesses– the less succinct it is– the more queries can be answered in polytime • The idea of knowledge compilation is to find the most succinct language that supports all necessary queries • An important open question is