Matthias van der Hallen
31/10/2019
+ example
Candidate for \(\mathcal{G}\)
- example
Find a graph \(\mathcal{G}\) such that:
Introduce variables representing non-logical objects:
\(\forall x : Person(x) \lor Dog(x).\)
"Everything is either a dog or a person."
Also introduce variables representing predicates & functions:
\(\exists P : P(alice) \land P(bob).\)
"There is a set that contains both \(alice\) and \(bob\)."
Divide \(n\) people over \(k\) cars such that
nobody has to sit with someone they dislike.
Observations:
Alice
Bob
David
Charles
Alice
Bob
David
Charles
Model:
type Person. % The Person type, corresponding to nodes
type Car. % The Car type, corresponding to colours
dislike :: (Person, Person). % A predicate encoding dislikes
sitsIn :: (Person)→Car
∀ a,b :: Person: dislike(a,b) ⇒ sitsIn(a) ≠ sitsIn(b).
Note that we introduce a vocabulary \(V\) of predicates and functions (dislike, sitsIn)
=> Perform model generation/expansion
∃ sitsIn :: Person -> Car ::
∀ a,b :: Person: dislike(a,b) ⇒ sitsIn(a) ≠ sitsIn(b).
Actually, solving a second-order formula \(\exists V : \phi\)
=> Perform 'minimization'
Actually: solving a second-order formula
\(\exists V : \phi \land \forall V' : \phi' \Rightarrow T(V) < T(V') \)
Find critical friendship pairs: two distinct people \(p1,p2\) s.t. there would not exist a proper division if they would dislike each other.
"All valid colorings assign \(p1\) and \(p2\) the same color"
type Person. % The Person type, corresponding to nodes
type Car. % The Car type, corresponding to colours
dislike :: (Person, Person). % A predicate encoding dislikes
p1 :: Person. % A person constant
p2 :: Person. % A second person constant
p1 ≠ p2.
∃sitsIn :: (Person)→Car:
∀ a,b :: Person: dislike(a,b) ⇒ sitsIn(a) ≠ sitsIn(b).
∀sitsIn :: (Person)→Car:
(∀ a,b :: Person: dislike(a,b) ⇒ sitsIn(a) ≠ sitsIn(b))
⇒ sitsIn(p1)=sitsIn(p2).
Model:
Find critical friendship pairs: two distinct people \(p1,p2\) s.t. there would not exist a proper division if they would dislike each other.
type Person. % The Person type, corresponding to nodes
type Car. % The Car type, corresponding to colours
dislike :: (Person, Person). % A predicate encoding dislikes
p1 :: Person. % A person constant
p2 :: Person. % A second person constant
p1 ≠ p2.
∃sitsIn :: (Person)→Car:
∀ a,b :: Person: dislike(a,b) ⇒ sitsIn(a) ≠ sitsIn(b).
∀sitsIn :: (Person)→Car:
(∀ a,b :: Person: dislike(a,b) ⇒ sitsIn(a) ≠ sitsIn(b))
⇒ sitsIn(p1)=sitsIn(p2).
Alice
Bob
David
Charles
Alice
Bob
David
Charles
Many interesting second-order constraints;
often implemented as specific inferences.
ASP systems provide special interfaces for computing cautious consequences by means of query answering. But sometimes one has to do more, such as answering a complex query over the cautious consequences [...] So far, ASP solvers provide no support for such tasks. Instead, computations like this have to be done outside ASP systems, which hampers usability and limits the potential of ASP.
- Faber, Woltran
A system with support for second-order logic:
PCNF \(\phi\)
Extend Assignment
\(\phi[A]\) = T/F
Propagation
T: Learn Cube
F: Learn Clause
No
UNSAT
\(\empty\) Clause
\(\empty\) Cube
SAT
Backtrack
Cube/Clause \(\neq\empty\)