I followed this course by, Prof. Ronald de Haan during my 5th Semester at the ILLC Amsterdam for my M.Sc. Logic (UvA).
Assignments
Lecture Notes
Here I summarise the material and, in particular, write in a very schematic manner, all that is needed for passing the exam.
09.09, III. DPLL & CDCL
- SAT is NP-complete
- a CNF formula, is a conjunction of clauses, which are disjunctions of possibly negated literals (at.form.)
- every is logically equivalent to a CNF-formula
- Tseytin transformation solves the problem in P-time.
- for , for literal, then is given
- every is logically equivalent to a CNF-formula
- Backtracking search: is a brute force algorithm on truth-assignments
- it can easily represented through a tree-graph
- Propagation:
- Unit Propagation: if contains a unit clause, satisfy it (DPLL)
- repeat until there is no unit clause
- unit clauses are those whose all literals other than one have already been set false [s.15]
- Conflict Analysis: (CDCL) [lec., 1:12]
- Build the conflict graph
- arrows from literals to literals that indicate what forced propagation
- Draw cuts, each corresponds to a clause
- the clause is the negation of provenience of the cut arrows
- Theorem: if you add these clauses to the formula, the result does not change
- to avoid this situation again, you can add these clauses
- these clauses are logically entailed in the initial formula
- Adding all makes the algorithm slower, take the 1UIP [1:24]
- 1UIP is the rightmost asserting clause [1:27]
- a clause is asserting if it contains (the neg. of) exac. one literal of the maximal decision level
- the decision level of a literal is when it got chosen, if it derived from propagation, take the highest literal that forced propagation.
- precise method: once drawn the graph, proceed by define the cut ,
- all with not max.dec.lev. in
- is the dec.lit. of max.dec.lev.
- is lit. closest to s.t. lies on all path
- put the path in , & all lit. with max.dec.lev.
- the rest (and ) in
- 1UIP is the disj. of the neg. of the antecedents of the arrows crossing
- a clause is asserting if it contains (the neg. of) exac. one literal of the maximal decision level
- 1UIP is the rightmost asserting clause [1:27]
- Jump back the second highest decision level of the 1UIP and use it to propagation
- Build the conflict graph
- if a literal appears and never its negation, assume it (PL) [1:46]
- pick the literal that satisfies as many clauses as possible
- a random restart makes the algorithm sometimes quicker
- Give each literal a score, at each conflict decrease the score of all literals involved, always chose the one with the least score (VSIDS)
- Unit Propagation: if contains a unit clause, satisfy it (DPLL)
13.09, IV. ASP
- Similar to Prolog (idk)
- Introduction to Syntax
- rules: `a :- b, c, d, …, z
- meaning
- facts: formula that are true
a
meaning
- Examples:
- Universally quantifiers:
- rules: `a :- b, c, d, …, z
- Semantic Rules:
- Domain Closure: the objects mentioned are the only objects
- Unique-names Assumption: objects with different names are different objects
- Closed-world Assumption: what is not proved true is false
- Herbrand Interpretation: ? [S. 10]
- Minimal Model is a model s.t. any subset of it is not a model
- for positive programs there is one unique minimal model.
- Supported Model: for each , there is a rule in s.t. makes true
- Normal Logic Programs (NLP)
not
meansa :- b_1, ..., b_n, not c_1, ..., not c_n
is allowed- we lose the unique-minimal-model property
- Simpler: Stratified Negation
- draw the dependency graph [S. 16]
- check that there is no cycle of negative arrows
16.09, V. ASP & VI.
- For a NLP and an interpretation , then s.t.
- remove rules with
not a
in the body if - remove literals
not b
from all rules if
- remove rules with
- An Answer Set (AS) of is a minimal model of
- Lego Approach: learn some pieces that improve ASP vocabulary
has as a AS the binary combinations of to right and left, can be expanded by adding num(2)
.
You can add then left(1)
or right(1)
then you can narrow the AS.
- if a command starts with a
#
is a meta-command#show left/1
only show the predicates you are interested in (e.g. hidenum()
)#show predicate/arity
- Given a formula in CNF, then:
- take
var(1..n)
for number of prop.var. - set
true(X) :- not false(X), var(X)
andfalse(X) :- not true(X), var(X)
- set to false (no head) the formulae that falsify each clause of
- take
- Choice rule
{ a; b }
(as a fact or as a head of a rule)- Cardinality constrain:
1 { a; b; c } 2
(take only solutions with at least 1 true variables and maximally 2).
- Cardinality constrain:
s :- p(X) : q(X)
stands fors :- p(1), p(2)
[V. S. 32]- one-to-one mappings [V. S. 33]
23.09, VI. Games with ASP
- we use
T = #sum {C, X, Y, Z : P(X), P(Y)}
sums onlyC
s but allows the sum of two equalC
s if theX, Y, Z
are different. D = #count { M : edge(N, M, C)}
workds similarly, or also#max
18.10, Summary
- Syntax
- normal logic programs
- containing only rules of the form:
a :- g, c, d, not e, not f
- containing only rules of the form:
- extensions:
- include variables `X, Y
- choice rules (with cardinality constrains)
- aggregates (
#sum, #count
)
- normal logic programs
- Semantic
- Interpretations
- Models are interpretations that make all rules of the program true
- Supported Models are models where each atom is supported
- Answer Sets are minimal models of the riduct
- More Theory
- ==Clark Completion==: translate the program
- Exam: not going to make us write the clark completion of a program down
- ==Unfounded Sets==:
- ==Clark Completion==: translate the program