Algorithm Search⌘K

Techniqueresearch

SAT encoding of argumentation semantics

Also called Besnard-Doutre encoding.

Encodes conflict-freeness, admissibility and stability as propositional formulas so SAT solvers enumerate extensions.

The SAT encoding of argumentation semantics turns the question "which sets of arguments does this semantics accept?" into a propositional formula. Each argument gets a variable, the formula states the conditions of the semantics, and the models of the formula are exactly the extensions. Philippe Besnard and Sylvie Doutre (2004) gave such formulas for conflict-free sets and for stable, admissible and complete extensions. A SAT solver then finds one extension, decides whether an argument is credulously or sceptically accepted, or enumerates all extensions with blocking clauses. Many solvers for abstract argumentation work this way, and for preferred semantics they call the solver many times.

In plain words

Give every argument a switch: on means accepted, off means rejected. Each rule of a semantics is a rule about switches. "Two arguments that attack each other are not both on" is one rule. "If an argument is on, each of its attackers is attacked by something that is on" is another. Write all these rules as one long logical formula. A SAT solver finds switch settings that obey every rule, and each such setting is an acceptable set of arguments.

To list all the sets, ask the solver for one, then add a rule that forbids exactly that setting, and ask again. To check whether an argument can be accepted, add the rule "this switch is on" and ask once.

When it applies

The technique applies to a finite abstract argumentation framework F=(A,R)F = (A, R) and to any semantics whose sets can be described by conditions on each argument and its attackers. Use it when:

  • the problem is NP-hard or coNP-hard, for example credulous acceptance under stable or preferred semantics, which is NP-complete (Dimopoulos and Torres 1996);
  • the frameworks are large and a modern CDCL solver will beat a hand-written search;
  • all extensions are wanted, or a witness extension is wanted for an answer.

It is not needed for grounded semantics, which a linear-time propagation computes. For problems on the second level of the polynomial hierarchy, such as sceptical acceptance under preferred semantics, which is Π2P\Pi_2^P-complete (Dunne and Bench-Capon 2002), one SAT call is not enough unless the hierarchy collapses. Then the encoding is used inside a loop of calls.

The template

Step 1: variables. For each argument aa take a variable ina\mathit{in}_a, true when a∈Sa \in S. For clauses of small size, also take outa\mathit{out}_a, true when a∈S+a \in S^+, that is, when some attacker of aa is in SS. Write a−a^- for the set of the attackers of aa.

Step 2: define the out variables. For each argument aa:

outa↔⋁b∈a−inb,\mathit{out}_a \leftrightarrow \bigvee_{b \in a^-} \mathit{in}_b,

which is the clause ¬outa∨⋁b∈a−inb\neg \mathit{out}_a \vee \bigvee_{b \in a^-} \mathit{in}_b and the clauses outa∨¬inb\mathit{out}_a \vee \neg \mathit{in}_b for each b∈a−b \in a^-. These are the clauses of the Tseitin transformation. In every model, outa\mathit{out}_a is fixed by the in variables, so each set SS has at most one model.

Step 3: the conditions of the semantics. Add, for each argument aa:

semantics clauses for argument aa meaning
conflict-free ¬ina∨¬inb\neg \mathit{in}_a \vee \neg \mathit{in}_b for each b∈a−b \in a^- no attack inside SS
admissible conflict-free, and ¬ina∨outb\neg \mathit{in}_a \vee \mathit{out}_b for each b∈a−b \in a^- SS attacks each attacker of its members
complete admissible, and ina∨⋁b∈a−¬outb\mathit{in}_a \vee \bigvee_{b \in a^-} \neg \mathit{out}_b SS also contains each argument it defends
stable conflict-free, and ina∨outa\mathit{in}_a \vee \mathit{out}_a each argument is in SS or attacked by SS

A self-attack (a,a)(a, a) gives the unit clause ¬ina\neg \mathit{in}_a. An argument with no attacker gets the unit clause ¬outa\neg \mathit{out}_a, and under complete semantics the unit clause ina\mathit{in}_a.

Step 4: the size. With n=∣A∣n = |A| and m=∣R∣m = |R|, there are 2n2n variables and O(n+m)O(n + m) clauses with O(n+m)O(n + m) literals in total. The encoding is built in linear time.

Step 5: ask the solver. One call finds an extension or shows that none exists. Read S={a:ina}S = \{a : \mathit{in}_a\} from the model. Any complete solver works. The code of this page uses a small DPLL solver with unit propagation, and a CDCL solver is the choice for large frameworks.

Step 6: enumerate. After each model with set SS, add the blocking clause ⋁a∈S¬ina∨⋁a∉Sina\bigvee_{a \in S} \neg \mathit{in}_a \vee \bigvee_{a \notin S} \mathit{in}_a and call again. By step 2 the models and the sets are one to one, so each extension is found once.

Without the out variables, the conditions are the formulas that Besnard and Doutre (2004) use, over the in variables only. Stable: ⋀a(ina↔⋀b∈a−¬inb)\bigwedge_a \big(\mathit{in}_a \leftrightarrow \bigwedge_{b \in a^-} \neg \mathit{in}_b\big). Admissible: ⋀a(ina→⋀b∈a−(¬inb∧⋁c∈b−inc))\bigwedge_a \big(\mathit{in}_a \rightarrow \bigwedge_{b \in a^-} (\neg \mathit{in}_b \wedge \bigvee_{c \in b^-} \mathit{in}_c)\big). Complete: the admissible formula with ↔\leftrightarrow in place of →\rightarrow for the defence part. The stable and admissible formulas are already short clauses. The complete one is not: its "if defended then in" direction becomes a CNF of exponential size when the "or" is distributed, which is why the out variables are used.

Classic examples

A worked case. Take A={a,b,c,d}A = \{a, b, c, d\} with a↔ba \leftrightarrow b, b→cb \to c and c→dc \to d. The stable encoding has 88 variables and 1616 clauses: four clauses that bound each out variable from above, four of the form outx∨¬iny\mathit{out}_x \vee \neg \mathit{in}_y, four conflict clauses and four clauses inx∨outx\mathit{in}_x \vee \mathit{out}_x. Since aa and bb attack each other, ina∨outa\mathit{in}_a \vee \mathit{out}_a forces ina\mathit{in}_a or inb\mathit{in}_b.

  • If ina\mathit{in}_a, then ¬inb\neg \mathit{in}_b by the conflict clause, cc has no attacker in SS, so ¬outc\neg \mathit{out}_c and then inc\mathit{in}_c, and so ¬ind\neg \mathit{in}_d. The set is {a,c}\{a, c\}.
  • If inb\mathit{in}_b, then outa\mathit{out}_a and outc\mathit{out}_c, so dd has no attacker in SS, and ind\mathit{in}_d. The set is {b,d}\{b, d\}.

So the stable extensions are {a,c}\{a, c\} and {b,d}\{b, d\}. With the complete encoding the solver also finds ∅\emptyset, the grounded extension, and with the admissible encoding it finds ∅\emptyset, {a}\{a\}, {b}\{b\}, {a,c}\{a, c\} and {b,d}\{b, d\}. The page's tests check this case and compare the enumeration with brute force on random frameworks.

Credulous acceptance. Is aa in some preferred extension? Every admissible set lies in a preferred one, so the question is whether the admissible encoding plus the unit clause ina\mathit{in}_a is satisfiable. That is one SAT call for an NP-complete problem.

Sceptical acceptance under stable semantics. aa is in every stable extension exactly when the stable encoding plus ¬ina\neg \mathit{in}_a is unsatisfiable. Note that with no stable extension at all, every argument is sceptically accepted under this definition.

Preferred extensions by iterated calls. Find an admissible set SS. Then ask for an admissible set that contains SS and at least one more argument: add the unit clauses ina\mathit{in}_a for a∈Sa \in S and the clause ⋁a∉Sina\bigvee_{a \notin S} \mathit{in}_a. Repeat until the answer is "no": SS is then a preferred extension. Add the clause ⋁a∉Sina\bigvee_{a \notin S} \mathit{in}_a to the main formula, so that no subset of SS is found again, and start over. This is how the iterated SAT solvers enumerate preferred extensions, and Dvořák, Järvisalo, Wallner and Woltran (2014) use loops of this kind for sceptical preferred acceptance.

Variations

  • Labelling encodings. With the labelling view, the in and out variables are the labels in and out, and undec is "neither". The clauses of step 3 are then the rules of complete labellings, one argument at a time.
  • Answer set programming. The same conditions are a short logic program, and an ASP solver can handle the maximality of preferred semantics with its own optimization. See answer set programming.
  • Quantified Boolean formulas. Preferred and semi-stable semantics need "no larger admissible set exists", which is a universal quantifier. A QBF with one more alternation states it directly.
  • Incremental solving. The loops above add clauses and call again on almost the same formula. An incremental SAT solver keeps the learned clauses between calls, which saves much of the work.
  • Range variables. For semi-stable and stage semantics, ina∨outa\mathit{in}_a \vee \mathit{out}_a says that aa is in the range S∪S+S \cup S^+, and maximizing the range becomes a loop of the same kind.

Pitfalls

  • Missing out definitions. If the clause ¬outa∨⋁b∈a−inb\neg \mathit{out}_a \vee \bigvee_{b \in a^-} \mathit{in}_b is left out, a model can set outa\mathit{out}_a to true with no attacker of aa in SS. The admissible encoding then accepts sets that are not admissible, and the blocking clauses of step 6 can find the same set more than once.
  • Distributing the defence. Writing "defended implies in" directly in CNF without auxiliary variables multiplies the clause sizes and can blow up the formula.
  • Blocking on all variables. Block on the in variables only. With auxiliary variables that are not fixed by the in variables, blocking whole models lists the same extension many times.
  • Preferred is not one call. Maximality is not a property of one model. A single SAT call gives an admissible set, not a preferred one.
  • Empty extension. The empty set is admissible in every framework, and it is the grounded extension whenever every argument has an attacker. A solver that returns ∅\emptyset has not failed.
  • Unconstrained variables. An argument that attacks nothing and is not attacked appears in no clause of the admissible encoding. Its in variable is free, and the enumeration must give it both values.

Code

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

af.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Shared helper of the argumentation pages of https://algorithm.tamnd.com/. The authors are listed in prov/.
"""Finite abstract argumentation frameworks, for the argumentation pages.

A framework is a pair (args, attacks). args is a set of arguments, and attacks
is a set of pairs (a, b), read "a attacks b", with a and b in args. An argument
is any hashable value that sorts with the other arguments, for example a small
int or a short string. A self-attack (a, a) is allowed.

The functions are the plain definitions of Dung (1995), Caminada (2006) and
Baroni, Caminada and Giacomin (2018), written for clarity and checked by the
tests of each page. The enumerators look at all 2^n subsets of the arguments,
so they accept at most MAX_ARGS arguments. The algorithms of the pages live in
their own files, not here.
"""

from itertools import combinations

MAX_ARGS = 10


def check_framework(args, attacks):
    """Raise ValueError when an attack names an argument that is not in args."""
    for a, b in attacks:
        if a not in args or b not in args:
            raise ValueError(f"attack {(a, b)!r} names an argument outside args")


def attackers(attacks, a):
    """The set of the arguments that attack a."""
    return frozenset(x for x, y in attacks if y == a)


def attacked_by(attacks, s):
    """The set S+ of the arguments that some member of s attacks."""
    return frozenset(y for x, y in attacks if x in s)


def range_of(attacks, s):
    """The range S u S+ of the set s."""
    return frozenset(s) | attacked_by(attacks, s)


def conflict_free(attacks, s):
    """True when no member of s attacks a member of s."""
    return not any(x in s and y in s for x, y in attacks)


def defends(attacks, s, a):
    """True when s attacks every attacker of a (a is acceptable with respect to s)."""
    hit = attacked_by(attacks, s)
    return all(b in hit for b in attackers(attacks, a))


def characteristic(args, attacks, s):
    """The characteristic function F(s): the set of the arguments that s defends."""
    hit = attacked_by(attacks, s)
    return frozenset(a for a in args if all(b in hit for b in attackers(attacks, a)))


def is_admissible(args, attacks, s):
    """Conflict-free, and s defends each of its members."""
    return conflict_free(attacks, s) and frozenset(s) <= characteristic(args, attacks, s)


def is_complete(args, attacks, s):
    """Conflict-free, and s is a fixed point of the characteristic function."""
    return conflict_free(attacks, s) and frozenset(s) == characteristic(args, attacks, s)


def is_stable(args, attacks, s):
    """Conflict-free, and s attacks every argument outside s."""
    return conflict_free(attacks, s) and range_of(attacks, s) == frozenset(args)


def subsets(args):
    """All subsets of args as frozensets, smallest first. At most MAX_ARGS arguments."""
    items = sorted(args)
    if len(items) > MAX_ARGS:
        raise ValueError(f"brute force accepts at most {MAX_ARGS} arguments")
    for k in range(len(items) + 1):
        for c in combinations(items, k):
            yield frozenset(c)


def _maximal(sets):
    """The members of sets that are maximal under set inclusion."""
    return [s for s in sets if not any(s < t for t in sets)]


def _key(s):
    return (len(s), sorted(s))


def admissible_sets(args, attacks):
    return sorted((s for s in subsets(args) if is_admissible(args, attacks, s)), key=_key)


def complete_extensions(args, attacks):
    return sorted((s for s in subsets(args) if is_complete(args, attacks, s)), key=_key)


def grounded_extension(args, attacks):
    """The complete extension that is a subset of every complete extension."""
    comp = complete_extensions(args, attacks)
    least = [s for s in comp if all(s <= t for t in comp)]
    assert len(least) == 1
    return least[0]


def preferred_extensions(args, attacks):
    """The admissible sets that are maximal under set inclusion."""
    return sorted(_maximal(admissible_sets(args, attacks)), key=_key)


def stable_extensions(args, attacks):
    return sorted((s for s in subsets(args) if is_stable(args, attacks, s)), key=_key)


def semi_stable_extensions(args, attacks):
    """The complete extensions whose range is maximal under set inclusion."""
    comp = complete_extensions(args, attacks)
    rng = {s: range_of(attacks, s) for s in comp}
    return sorted((s for s in comp if not any(rng[s] < rng[t] for t in comp)), key=_key)


def labelling(args, attacks, s):
    """The labelling of the set s: in for s, out for S+, undec for the rest."""
    hit = attacked_by(attacks, s)
    return {a: "in" if a in s else "out" if a in hit else "undec" for a in args}
argumentation_sat_encoding.py 152 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/argumentation-sat-encoding/. The authors are listed in prov/RCX19M.jsonl.

"""SAT encodings of argumentation semantics, after Besnard and Doutre (2004).

A framework is (args, attacks) as in af.py. Each argument a gets two
variables: in(a), "a is in the set S", and out(a), "some attacker of a is in
S", which is "a is in S+". A clause is a list of nonzero ints, as in DIMACS:
v means variable v is true and -v means it is false.

out(a) is defined by clauses, so it is a Tseitin variable: in every model it
equals the "or" of in(b) over the attackers b of a. So the models of the
formula are in one to one correspondence with the sets S that the semantics
accepts, and blocking the in part of each model enumerates the extensions.

The solver is a small DPLL procedure with unit propagation. It is meant for
the tests of this page, not for large frameworks.
"""

from af import attackers, check_framework

SEMANTICS = ("conflict-free", "admissible", "complete", "stable")


def variables(args):
    """Map each argument to its pair (in variable, out variable), in sorted order."""
    return {a: (2 * i + 1, 2 * i + 2) for i, a in enumerate(sorted(args))}


def encode(args, attacks, semantics):
    """Return (clauses, var) for the semantics, where var maps a to (in var, out var)."""
    if semantics not in SEMANTICS:
        raise ValueError(f"unknown semantics {semantics!r}")
    args = frozenset(args)
    attacks = frozenset(attacks)
    check_framework(args, attacks)
    var = variables(args)
    clauses = []
    for a in sorted(args):
        ia, oa = var[a]
        att = sorted(attackers(attacks, a))
        # out(a) <-> in(b1) or ... or in(bk)
        clauses.append([-oa] + [var[b][0] for b in att])
        for b in att:
            clauses.append([oa, -var[b][0]])
        # Conflict-free: a and an attacker of a are not both in.
        for b in att:
            clauses.append([-ia, -var[b][0]] if b != a else [-ia])
        if semantics in ("admissible", "complete"):
            # a in S -> every attacker of a is in S+.
            for b in att:
                clauses.append([-ia, var[b][1]])
        if semantics == "complete":
            # Every attacker of a is in S+ -> a in S.
            clauses.append([ia] + [-var[b][1] for b in att])
        if semantics == "stable":
            # a is in S or in S+.
            clauses.append([ia, oa])
    return clauses, var


def dpll(clauses, nvars):
    """Return a model as a dict {variable: bool} for all 1..nvars, or None if there is none."""

    def propagate(assign):
        changed = True
        while changed:
            changed = False
            for clause in clauses:
                free = []
                sat = False
                for lit in clause:
                    v = assign.get(abs(lit))
                    if v is None:
                        free.append(lit)
                    elif v == (lit > 0):
                        sat = True
                        break
                if sat:
                    continue
                if not free:
                    return False  # every literal is false
                if len(free) == 1:
                    assign[abs(free[0])] = free[0] > 0
                    changed = True
        return True

    def search(assign):
        if not propagate(assign):
            return None
        for clause in clauses:
            if any(assign.get(abs(lit)) == (lit > 0) for lit in clause):
                continue
            lit = next(x for x in clause if abs(x) not in assign)
            for value in (lit > 0, lit < 0):
                trial = dict(assign)
                trial[abs(lit)] = value
                found = search(trial)
                if found is not None:
                    return found
            return None
        return assign  # every clause is satisfied

    model = search({})
    if model is None:
        return None
    return {v: model.get(v, False) for v in range(1, nvars + 1)}


def extensions(args, attacks, semantics):
    """All sets of arguments accepted by the semantics, by SAT calls with blocking clauses."""
    clauses, var = encode(args, attacks, semantics)
    clauses = [list(c) for c in clauses]
    nvars = 2 * len(var)
    found = []
    while True:
        model = dpll(clauses, nvars)
        if model is None:
            break
        s = frozenset(a for a in var if model[var[a][0]])
        found.append(s)
        # Block this set: some in variable must take the other value.
        clauses.append([-var[a][0] if a in s else var[a][0] for a in var])
    return sorted(found, key=lambda s: (len(s), sorted(s)))


def preferred_extensions(args, attacks):
    """The maximal admissible sets, by growing one admissible set at a time.

    Find an admissible set S not inside a preferred extension found so far.
    Then ask again and again for an admissible set that strictly contains S,
    until there is none: S is then preferred. Block every subset of S with the
    clause "some argument outside S is in".
    """
    clauses, var = encode(args, attacks, "admissible")
    nvars = 2 * len(var)
    blocks = []
    found = []
    while True:
        model = dpll(clauses + blocks, nvars)
        if model is None:
            break
        s = frozenset(a for a in var if model[var[a][0]])
        while True:
            grow = [[var[a][0]] for a in s] + [[var[a][0] for a in var if a not in s]]
            bigger = dpll(clauses + grow, nvars)
            if bigger is None:
                break
            s = frozenset(a for a in var if bigger[var[a][0]])
        found.append(s)
        blocks.append([var[a][0] for a in var if a not in s])
    return sorted(found, key=lambda s: (len(s), sorted(s)))
test_argumentation_sat_encoding.py 126 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/argumentation-sat-encoding/. The authors are listed in prov/RCX19M.jsonl.

import itertools
import random

import pytest

import af
from argumentation_sat_encoding import dpll, encode, extensions, preferred_extensions


def random_framework(rng, n, prob):
    args = frozenset(range(n))
    attacks = frozenset((a, b) for a in args for b in args if rng.random() < prob)
    return args, attacks


def brute(args, attacks, semantics):
    if semantics == "conflict-free":
        sets = [s for s in af.subsets(args) if af.conflict_free(attacks, s)]
        return sorted(sets, key=af._key)
    if semantics == "admissible":
        return af.admissible_sets(args, attacks)
    if semantics == "complete":
        return af.complete_extensions(args, attacks)
    return af.stable_extensions(args, attacks)


def satisfiable_by_brute_force(clauses, nvars):
    for bits in itertools.product([False, True], repeat=nvars):
        if all(any(bits[abs(x) - 1] == (x > 0) for x in c) for c in clauses):
            return True
    return False


def satisfies(model, clauses):
    return all(any(model[abs(x)] == (x > 0) for x in c) for c in clauses)


def test_dpll_against_truth_tables():
    rng = random.Random(1)
    for _ in range(400):
        nvars = rng.randrange(1, 7)
        clauses = []
        for _ in range(rng.randrange(0, 14)):
            width = rng.randrange(1, 4)
            clauses.append([rng.randrange(1, nvars + 1) * rng.choice([1, -1]) for _ in range(width)])
        model = dpll(clauses, nvars)
        assert (model is not None) == satisfiable_by_brute_force(clauses, nvars)
        if model is not None:
            assert set(model) == set(range(1, nvars + 1))
            assert satisfies(model, clauses)
    assert dpll([[]], 1) is None
    assert dpll([], 2) == {1: False, 2: False}


SEEDS = {"conflict-free": 11, "admissible": 12, "complete": 13, "stable": 14}


@pytest.mark.parametrize("semantics", ["conflict-free", "admissible", "complete", "stable"])
def test_extensions_match_brute_force(semantics):
    rng = random.Random(SEEDS[semantics])
    for _ in range(120):
        n = rng.randrange(0, 7)
        args, attacks = random_framework(rng, n, rng.choice([0.1, 0.2, 0.35]))
        assert extensions(args, attacks, semantics) == brute(args, attacks, semantics)


def test_models_are_one_to_one_with_extensions():
    # The out variables are fixed by the in variables, so each extension has one model.
    rng = random.Random(2)
    for _ in range(60):
        n = rng.randrange(1, 5)
        args, attacks = random_framework(rng, n, 0.3)
        for semantics in ("admissible", "complete", "stable"):
            clauses, var = encode(args, attacks, semantics)
            nvars = 2 * len(var)
            models = [bits for bits in itertools.product([False, True], repeat=nvars)
                      if all(any(bits[abs(x) - 1] == (x > 0) for x in c) for c in clauses)]
            sets = sorted((frozenset(a for a in var if bits[var[a][0] - 1]) for bits in models), key=af._key)
            assert sets == brute(args, attacks, semantics)
            for bits in models:
                s = frozenset(a for a in var if bits[var[a][0] - 1])
                out = af.attacked_by(attacks, s)
                assert all(bits[var[a][1] - 1] == (a in out) for a in var)


def test_preferred_by_iterated_sat():
    rng = random.Random(3)
    for _ in range(150):
        n = rng.randrange(0, 8)
        args, attacks = random_framework(rng, n, rng.choice([0.1, 0.2, 0.35]))
        assert preferred_extensions(args, attacks) == af.preferred_extensions(args, attacks)


def test_page_example():
    # a <-> b, b -> c, c -> d. The worked example of the page.
    args = frozenset("abcd")
    attacks = frozenset({("a", "b"), ("b", "a"), ("b", "c"), ("c", "d")})
    assert extensions(args, attacks, "admissible") == sorted(
        [frozenset(), frozenset("a"), frozenset("b"), frozenset("ac"), frozenset("bd")], key=af._key)
    assert extensions(args, attacks, "complete") == [frozenset(), frozenset("ac"), frozenset("bd")]
    assert extensions(args, attacks, "stable") == [frozenset("ac"), frozenset("bd")]
    assert preferred_extensions(args, attacks) == [frozenset("ac"), frozenset("bd")]
    assert frozenset("abd") not in extensions(args, attacks, "conflict-free")
    clauses, var = encode(args, attacks, "stable")
    # 4 definitions of out, 4 links in(b) -> out(a), 4 conflict clauses, 4 "in or out" clauses.
    assert len(clauses) == 16
    assert len(var) == 4


def test_self_attack_and_odd_cycle():
    # A self-attacking argument has no stable extension; nor has an odd cycle.
    assert extensions({0}, {(0, 0)}, "stable") == []
    assert extensions({0}, {(0, 0)}, "complete") == [frozenset()]
    cycle = {(0, 1), (1, 2), (2, 0)}
    assert extensions({0, 1, 2}, cycle, "stable") == []
    assert extensions({0, 1, 2}, cycle, "admissible") == [frozenset()]


def test_bad_input():
    with pytest.raises(ValueError):
        encode({0}, {(0, 1)}, "stable")
    with pytest.raises(ValueError):
        encode({0}, set(), "grounded")

Exercises

  1. Write the complete encoding for the 3-cycle a→b→c→aa \to b \to c \to a, and show that its only model has all in variables false.
  2. Show that for the stable encoding, the clauses outa∨¬inb\mathit{out}_a \vee \neg \mathit{in}_b can be dropped without changing the set of the in parts of the models, but the clauses ¬outa∨⋁b∈a−inb\neg \mathit{out}_a \vee \bigvee_{b \in a^-} \mathit{in}_b cannot. Is the same true for the admissible encoding?
  3. Prove that the stable encoding with the out variables has exactly one model for each stable extension.
  4. Give an encoding whose models are the sets SS that are admissible and contain a given set TT. Use it to decide whether TT is inside some preferred extension.
  5. Count the clauses of each encoding as a function of nn and mm, and give a framework where the complete encoding without out variables has a clause count exponential in nn after distribution.

References

  1. Philippe Besnard and Sylvie Doutre, Checking the acceptability of a set of arguments, in James P. Delgrande and Torsten Schaub (eds), 10th International Workshop on Non-Monotonic Reasoning (NMR 2004), 59 to 64 (2004), the whole paper (propositional formulas whose models are the conflict-free sets and the stable, admissible and complete extensions of a framework)
  2. Phan Minh Dung, On the acceptability of arguments and its fundamental role in nonmonotonic reasoning, logic programming and n-person games, Artificial Intelligence 77(2), 321 to 357 (1995), Section 2 (conflict-free, admissible, complete and stable sets)
  3. Yannis Dimopoulos and Alberto Torres, Graph theoretical structures in logic programs and default theories, Theoretical Computer Science 170(1-2), 209 to 244 (1996), the whole paper (credulous acceptance under stable and preferred semantics is NP-complete)
  4. Paul E. Dunne and Trevor J. M. Bench-Capon, Coherence in finite argument systems, Artificial Intelligence 141(1-2), 187 to 203 (2002), the whole paper (sceptical acceptance under preferred semantics is Pi2P-complete)
  5. Wolfgang Dvořák, Matti Järvisalo, Johannes Peter Wallner and Stefan Woltran, Complexity-sensitive decision procedures for abstract argumentation, Artificial Intelligence 206, 53 to 78 (2014), the whole paper (iterated SAT calls for the problems on the second level of the polynomial hierarchy)
  6. Wolfgang Dvořák and Paul E. Dunne, Computational problems in formal argumentation and their complexity, in Pietro Baroni, Dov Gabbay, Massimiliano Giacomin and Leendert van der Torre (eds), Handbook of Formal Argumentation, volume 1, College Publications (2018), Section 3.3 (Table 1, the complexity of the reasoning problems that the encodings solve)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • three classic examples