119
Descriptive complexity for counting complexity classes Mart´ ın Mu˜ noz PUC Chile - IMFD Joint work with Marcelo Arenas and Cristian Riveros

Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

  • Upload
    others

  • View
    28

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Descriptive complexityfor counting complexity classes

Martın Munoz

PUC Chile - IMFD

Joint work with

Marcelo Arenas and Cristian Riveros

Page 2: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Descriptive complexity has been very fruitful

in connecting logics with computational complexity

NP ≡ ∃SO

coNP ≡ ∀SO

P ≡ LFP≤

NL ≡ TC≤

AC0 ≡ FO+Bit

PSPACE ≡ PFP≤

⋮ ⋮ ⋮

Many applications in diverse areas like:

1. Computational complexity and logics.

2. Database management systems.

3. Verification systems.

Page 3: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Descriptive complexity has been very fruitful

in connecting logics with computational complexity

NP ≡ ∃SO

coNP ≡ ∀SO

P ≡ LFP≤

NL ≡ TC≤

AC0 ≡ FO+Bit

PSPACE ≡ PFP≤

⋮ ⋮ ⋮

Many applications in diverse areas like:

1. Computational complexity and logics.

2. Database management systems.

3. Verification systems.

Page 4: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Descriptive complexity has been very fruitful

in connecting logics with computational complexity

NP ≡ ∃SO

coNP ≡ ∀SO

P ≡ LFP≤

NL ≡ TC≤

AC0 ≡ FO+Bit

PSPACE ≡ PFP≤

⋮ ⋮ ⋮

Many applications in diverse areas like:

1. Computational complexity and logics.

2. Database management systems.

3. Verification systems.

Page 5: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Descriptive complexity has been very fruitful

in connecting logics with computational complexity

NP ≡ ∃SO

coNP ≡ ∀SO

P ≡ LFP≤

NL ≡ TC≤

AC0 ≡ FO+Bit

PSPACE ≡ PFP≤

⋮ ⋮ ⋮

Many applications in diverse areas like:

1. Computational complexity and logics.

2. Database management systems.

3. Verification systems.

Page 6: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

. . . but computational complexity

is not only about true or false

One would like to study the complexity of problems like:

“How many valuations satisfies my boolean formula?”

“How many simple paths

are connecting two vertices in my graph?”

Page 7: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

. . . but computational complexity

is not only about true or false

One would like to study the complexity of problems like:

“How many valuations satisfies my boolean formula?”

“How many simple paths

are connecting two vertices in my graph?”

Page 8: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

. . . but computational complexity

is not only about true or false

One would like to study the complexity of problems like:

“How many valuations satisfies my boolean formula?”

“How many simple paths

are connecting two vertices in my graph?”

Page 9: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

. . . but computational complexity

is not only about true or false

Counting

complexity

classes

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

#P

≡ ?

SpanP

≡ ?

FP

≡ ?

#L

≡ ?

#PSPACE

≡ ?

⋮ ⋮

Page 10: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

. . . but computational complexity

is not only about true or false

Counting

complexity

classes

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

#P

≡ ?

SpanP

≡ ?

FP

≡ ?

#L

≡ ?

#PSPACE

≡ ?

⋮ ⋮

Page 11: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

. . . but computational complexity

is not only about true or false

Counting

complexity

classes

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

#P ≡ ?

SpanP ≡ ?

FP ≡ ?

#L ≡ ?

#PSPACE ≡ ?

⋮ ⋮ ⋮

How can we describe these counting classes with logic?

Page 12: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

In this paper, we propose to use weighted logics for

descriptive complexity of counting classes

We propose to use:

Quantitative Second Order Logics (QSO) = Weighted Logics over N

Specifically, our contributions are:

1. We show that QSO captures many counting complexity classes.

● #P, SpanP, FP, #PSPACE, MinP, MaxP, . . .

2. We use QSO to find classes below #P

that have good tractability and closure properties.

3. We show how to define quantitative recursion over QSO

in order to capture classes below FP.

Page 13: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

In this paper, we propose to use weighted logics for

descriptive complexity of counting classes

We propose to use:

Quantitative Second Order Logics (QSO) = Weighted Logics over N

Specifically, our contributions are:

1. We show that QSO captures many counting complexity classes.

● #P, SpanP, FP, #PSPACE, MinP, MaxP, . . .

2. We use QSO to find classes below #P

that have good tractability and closure properties.

3. We show how to define quantitative recursion over QSO

in order to capture classes below FP.

Page 14: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

In this paper, we propose to use weighted logics for

descriptive complexity of counting classes

We propose to use:

Quantitative Second Order Logics (QSO) = Weighted Logics over N

Specifically, our contributions are:

1. We show that QSO captures many counting complexity classes.

● #P, SpanP, FP, #PSPACE, MinP, MaxP, . . .

2. We use QSO to find classes below #P

that have good tractability and closure properties.

3. We show how to define quantitative recursion over QSO

in order to capture classes below FP.

Page 15: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

In this paper, we propose to use weighted logics for

descriptive complexity of counting classes

We propose to use:

Quantitative Second Order Logics (QSO) = Weighted Logics over N

Specifically, our contributions are:

1. We show that QSO captures many counting complexity classes.

● #P, SpanP, FP, #PSPACE, MinP, MaxP, . . .

2. We use QSO to find classes below #P

that have good tractability and closure properties.

3. We show how to define quantitative recursion over QSO

in order to capture classes below FP.

Page 16: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

In this paper, we propose to use weighted logics for

descriptive complexity of counting classes

We propose to use:

Quantitative Second Order Logics (QSO) = Weighted Logics over N

Specifically, our contributions are:

1. We show that QSO captures many counting complexity classes.

● #P, SpanP, FP, #PSPACE, MinP, MaxP, . . .

2. We use QSO to find classes below #P

that have good tractability and closure properties.

3. We show how to define quantitative recursion over QSO

in order to capture classes below FP.

Page 17: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

In this paper, we propose to use weighted logics for

descriptive complexity of counting classes

We propose to use:

Quantitative Second Order Logics (QSO) = Weighted Logics over N

Specifically, our contributions are:

1. We show that QSO captures many counting complexity classes.

● #P, SpanP, FP, #PSPACE, MinP, MaxP, . . .

2. We use QSO to find classes below #P

that have good tractability and closure properties.

3. We show how to define quantitative recursion over QSO

in order to capture classes below FP.

Page 18: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Quantitative second order logic

QSO vs counting complexity

Below and beyond

Outline

Page 19: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Quantitative second order logic

QSO vs counting complexity

Below and beyond

Outline

Page 20: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Some notation and restrictions

Given a relational signature R = {R1, . . . ,Rk ,<},

we consider finite ordered structures over R of the form:

A = (A,RA1 , . . . ,R

Ak ,<A)

where A is the domain and <A is a linear order over A.

Let Struct(R) be the set of all finite ordered structures over R.

We consider formulas of Second Order logic over R of the form:

ϕ ∶= True ∣ x = y ∣ R(u) ∣ X(v) ∣ ¬ϕ ∣ (ϕ ∨ ϕ) ∣ ∃x . ϕ ∣ ∃X . ϕ

where R ∈ R and x and X are a first and second order variable, respectively.

The semantics of a second order formula is defined as usual.

Page 21: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Some notation and restrictions

Given a relational signature R = {R1, . . . ,Rk ,<},

we consider finite ordered structures over R of the form:

A = (A,RA1 , . . . ,R

Ak ,<A)

where A is the domain and <A is a linear order over A.

Let Struct(R) be the set of all finite ordered structures over R.

We consider formulas of Second Order logic over R of the form:

ϕ ∶= True ∣ x = y ∣ R(u) ∣ X(v) ∣ ¬ϕ ∣ (ϕ ∨ ϕ) ∣ ∃x . ϕ ∣ ∃X . ϕ

where R ∈ R and x and X are a first and second order variable, respectively.

The semantics of a second order formula is defined as usual.

Page 22: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Some notation and restrictions

Given a relational signature R = {R1, . . . ,Rk ,<},

we consider finite ordered structures over R of the form:

A = (A,RA1 , . . . ,R

Ak ,<A)

where A is the domain and <A is a linear order over A.

Let Struct(R) be the set of all finite ordered structures over R.

We consider formulas of Second Order logic over R of the form:

ϕ ∶= True ∣ x = y ∣ R(u) ∣ X(v) ∣ ¬ϕ ∣ (ϕ ∨ ϕ) ∣ ∃x . ϕ ∣ ∃X . ϕ

where R ∈ R and x and X are a first and second order variable, respectively.

The semantics of a second order formula is defined as usual.

Page 23: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Some notation and restrictions

Given a relational signature R = {R1, . . . ,Rk ,<},

we consider finite ordered structures over R of the form:

A = (A,RA1 , . . . ,R

Ak ,<A)

where A is the domain and <A is a linear order over A.

Let Struct(R) be the set of all finite ordered structures over R.

We consider formulas of Second Order logic over R of the form:

ϕ ∶= True ∣ x = y ∣ R(u) ∣ X(v) ∣ ¬ϕ ∣ (ϕ ∨ ϕ) ∣ ∃x . ϕ ∣ ∃X . ϕ

where R ∈ R and x and X are a first and second order variable, respectively.

The semantics of a second order formula is defined as usual.

Page 24: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Syntax of Quantitative Second Order logic

DefinitionA QSO-formula α over R is given by the following syntax:

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

where ϕ is a (boolean) second order formula and s ∈ N.

Example

Let R = {E(⋅, ⋅),<} where E encodes an edge relation.

α ∶= Σx .Σy .Σz . (E(x , y) ∧ E(y , z) ∧ E(z , x) ∧ x < y ∧ y < z)

Page 25: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Syntax of Quantitative Second Order logic

DefinitionA QSO-formula α over R is given by the following syntax:

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

where ϕ is a (boolean) second order formula and s ∈ N.

Example

Let R = {E(⋅, ⋅),<} where E encodes an edge relation.

α ∶= Σx .Σy .Σz . (E(x , y) ∧ E(y , z) ∧ E(z , x) ∧ x < y ∧ y < z)

Page 26: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Syntax of Quantitative Second Order logic

DefinitionA QSO-formula α over R is given by the following syntax:

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

where ϕ is a (boolean) second order formula and s ∈ N.

Example

Let R = {E(⋅, ⋅),<} where E encodes an edge relation.

α ∶= Σx .Σy .Σz . (E(x , y) ∧ E(y , z) ∧ E(z , x) ∧ x < y ∧ y < z)

Page 27: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Syntax of Quantitative Second Order logic

DefinitionA QSO-formula α over R is given by the following syntax:

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

where ϕ is a (boolean) second order formula and s ∈ N.

Example

Let R = {E(⋅, ⋅),<} where E encodes an edge relation.

α ∶= Σx .Σy .Σz . (E(x , y) ∧ E(y , z) ∧ E(z , x) ∧ x < y ∧ y < z´¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶

SO formula ϕ

)

Page 28: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Given a QSO-formula α, A ∈ Struct(R) and a var. assignment v ∶ X→ A

we define the semantics ⟦α⟧ ∶ Struct(R)→ N recursively as follow:

⟦ϕ⟧(A, v) =⎧⎪⎪⎨⎪⎪⎩

1 if (A, v) ⊧ ϕ0 otherwise

⟦s⟧(A, v) = s

⟦α1 + α2⟧(A, v) = ⟦α1⟧(A, v) + ⟦α2⟧(A, v)

⟦α1 ⋅ α2⟧(A, v) = ⟦α1⟧(A, v) ⋅ ⟦α2⟧(A, v)

⟦Σx . α⟧(A, v) = ∑a∈A

⟦α⟧(A, v[a/x])

⟦Πx . α⟧(A, v) = ∏a∈A

⟦α⟧(A, v[a/x])

⟦ΣX . α⟧(A, v) = ∑C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

⟦ΠX . α⟧(A, v) = ∏C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

Page 29: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Given a QSO-formula α, A ∈ Struct(R) and a var. assignment v ∶ X→ A

we define the semantics ⟦α⟧ ∶ Struct(R)→ N recursively as follow:

⟦ϕ⟧(A, v) =⎧⎪⎪⎨⎪⎪⎩

1 if (A, v) ⊧ ϕ0 otherwise

⟦s⟧(A, v) = s

⟦α1 + α2⟧(A, v) = ⟦α1⟧(A, v) + ⟦α2⟧(A, v)

⟦α1 ⋅ α2⟧(A, v) = ⟦α1⟧(A, v) ⋅ ⟦α2⟧(A, v)

⟦Σx . α⟧(A, v) = ∑a∈A

⟦α⟧(A, v[a/x])

⟦Πx . α⟧(A, v) = ∏a∈A

⟦α⟧(A, v[a/x])

⟦ΣX . α⟧(A, v) = ∑C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

⟦ΠX . α⟧(A, v) = ∏C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

Page 30: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Given a QSO-formula α, A ∈ Struct(R) and a var. assignment v ∶ X→ A

we define the semantics ⟦α⟧ ∶ Struct(R)→ N recursively as follow:

⟦ϕ⟧(A, v) =⎧⎪⎪⎨⎪⎪⎩

1 if (A, v) ⊧ ϕ0 otherwise

⟦s⟧(A, v) = s

⟦α1 + α2⟧(A, v) = ⟦α1⟧(A, v) + ⟦α2⟧(A, v)

⟦α1 ⋅ α2⟧(A, v) = ⟦α1⟧(A, v) ⋅ ⟦α2⟧(A, v)

⟦Σx . α⟧(A, v) = ∑a∈A

⟦α⟧(A, v[a/x])

⟦Πx . α⟧(A, v) = ∏a∈A

⟦α⟧(A, v[a/x])

⟦ΣX . α⟧(A, v) = ∑C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

⟦ΠX . α⟧(A, v) = ∏C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

Page 31: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Given a QSO-formula α, A ∈ Struct(R) and a var. assignment v ∶ X→ A

we define the semantics ⟦α⟧ ∶ Struct(R)→ N recursively as follow:

⟦ϕ⟧(A, v) =⎧⎪⎪⎨⎪⎪⎩

1 if (A, v) ⊧ ϕ0 otherwise

⟦s⟧(A, v) = s

⟦α1 + α2⟧(A, v) = ⟦α1⟧(A, v) + ⟦α2⟧(A, v)

⟦α1 ⋅ α2⟧(A, v) = ⟦α1⟧(A, v) ⋅ ⟦α2⟧(A, v)

⟦Σx . α⟧(A, v) = ∑a∈A

⟦α⟧(A, v[a/x])

⟦Πx . α⟧(A, v) = ∏a∈A

⟦α⟧(A, v[a/x])

⟦ΣX . α⟧(A, v) = ∑C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

⟦ΠX . α⟧(A, v) = ∏C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

Page 32: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Given a QSO-formula α, A ∈ Struct(R) and a var. assignment v ∶ X→ A

we define the semantics ⟦α⟧ ∶ Struct(R)→ N recursively as follow:

⟦ϕ⟧(A, v) =⎧⎪⎪⎨⎪⎪⎩

1 if (A, v) ⊧ ϕ0 otherwise

⟦s⟧(A, v) = s

⟦α1 + α2⟧(A, v) = ⟦α1⟧(A, v) + ⟦α2⟧(A, v)

⟦α1 ⋅ α2⟧(A, v) = ⟦α1⟧(A, v) ⋅ ⟦α2⟧(A, v)

⟦Σx . α⟧(A, v) = ∑a∈A

⟦α⟧(A, v[a/x])

⟦Πx . α⟧(A, v) = ∏a∈A

⟦α⟧(A, v[a/x])

⟦ΣX . α⟧(A, v) = ∑C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

⟦ΠX . α⟧(A, v) = ∏C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

Page 33: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Given a QSO-formula α, A ∈ Struct(R) and a var. assignment v ∶ X→ A

we define the semantics ⟦α⟧ ∶ Struct(R)→ N recursively as follow:

⟦ϕ⟧(A, v) =⎧⎪⎪⎨⎪⎪⎩

1 if (A, v) ⊧ ϕ0 otherwise

⟦s⟧(A, v) = s

⟦α1 + α2⟧(A, v) = ⟦α1⟧(A, v) + ⟦α2⟧(A, v)

⟦α1 ⋅ α2⟧(A, v) = ⟦α1⟧(A, v) ⋅ ⟦α2⟧(A, v)

⟦Σx . α⟧(A, v) = ∑a∈A

⟦α⟧(A, v[a/x])

⟦Πx . α⟧(A, v) = ∏a∈A

⟦α⟧(A, v[a/x])

⟦ΣX . α⟧(A, v) = ∑C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

⟦ΠX . α⟧(A, v) = ∏C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

Page 34: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Given a QSO-formula α, A ∈ Struct(R) and a var. assignment v ∶ X→ A

we define the semantics ⟦α⟧ ∶ Struct(R)→ N recursively as follow:

⟦ϕ⟧(A, v) =⎧⎪⎪⎨⎪⎪⎩

1 if (A, v) ⊧ ϕ0 otherwise

⟦s⟧(A, v) = s

⟦α1 + α2⟧(A, v) = ⟦α1⟧(A, v) + ⟦α2⟧(A, v)

⟦α1 ⋅ α2⟧(A, v) = ⟦α1⟧(A, v) ⋅ ⟦α2⟧(A, v)

⟦Σx . α⟧(A, v) = ∑a∈A

⟦α⟧(A, v[a/x])

⟦Πx . α⟧(A, v) = ∏a∈A

⟦α⟧(A, v[a/x])

⟦ΣX . α⟧(A, v) = ∑C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

⟦ΠX . α⟧(A, v) = ∏C⊆Aarity(X)

⟦α⟧(A, v[C/X ])

Page 35: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the triangles in a graph)

1

2

34

5

34

5

3

1

2

A ∶

triangle(x , y , z) ∶= E(x , y) ∧ E(y , z) ∧ E(z , x) ∧ x < y ∧ y < z

⟦triangle⟧(A,3,4,5) = 1 ⟦triangle⟧(A,1,2,3) = 0

α ∶= Σx .Σy .Σz . triangle(x , y , z)

⟦α⟧(A) = 3

Page 36: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the triangles in a graph)

1

2

34

5

34

5

3

1

2

A ∶

triangle(x , y , z) ∶= E(x , y) ∧ E(y , z) ∧ E(z , x) ∧ x < y ∧ y < z

⟦triangle⟧(A,3,4,5) = 1 ⟦triangle⟧(A,1,2,3) = 0

α ∶= Σx .Σy .Σz . triangle(x , y , z)

⟦α⟧(A) = 3

Page 37: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the triangles in a graph)

1

2

34

5

34

5

3

1

2

A ∶

triangle(x , y , z) ∶= E(x , y) ∧ E(y , z) ∧ E(z , x) ∧ x < y ∧ y < z

⟦triangle⟧(A,3,4,5) = 1

⟦triangle⟧(A,1,2,3) = 0

α ∶= Σx .Σy .Σz . triangle(x , y , z)

⟦α⟧(A) = 3

Page 38: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the triangles in a graph)

1

2

34

5

34

5

3

1

2

A ∶

triangle(x , y , z) ∶= E(x , y) ∧ E(y , z) ∧ E(z , x) ∧ x < y ∧ y < z

⟦triangle⟧(A,3,4,5) = 1 ⟦triangle⟧(A,1,2,3) = 0

α ∶= Σx .Σy .Σz . triangle(x , y , z)

⟦α⟧(A) = 3

Page 39: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the triangles in a graph)

1

2

34

5

34

5

3

1

2

A ∶

triangle(x , y , z) ∶= E(x , y) ∧ E(y , z) ∧ E(z , x) ∧ x < y ∧ y < z

⟦triangle⟧(A,3,4,5) = 1 ⟦triangle⟧(A,1,2,3) = 0

α ∶= Σx .Σy .Σz . triangle(x , y , z)

⟦α⟧(A) = 3

Page 40: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the triangles in a graph)

1

2

34

5

34

5

3

1

2

A ∶

triangle(x , y , z) ∶= E(x , y) ∧ E(y , z) ∧ E(z , x) ∧ x < y ∧ y < z

⟦triangle⟧(A,3,4,5) = 1 ⟦triangle⟧(A,1,2,3) = 0

α ∶= Σx .Σy .Σz . triangle(x , y , z)

⟦α⟧(A) = 3

Page 41: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the number of cliques in a graph)

1

2

34

5

34

5

1

2

A ∶

clique(X) ∶= ∀x . ∀y . (X(x) ∧X(y) ∧ x ≠ y)→ E(x , y)

⟦clique⟧(A,{3,4,5}) = 1 ⟦clique⟧(A,{1,2}) = 1

α ∶= ΣX . clique(X)

⟦α⟧(A) = 18

Page 42: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the number of cliques in a graph)

1

2

34

5

34

5

1

2

A ∶

clique(X) ∶= ∀x . ∀y . (X(x) ∧X(y) ∧ x ≠ y)→ E(x , y)

⟦clique⟧(A,{3,4,5}) = 1 ⟦clique⟧(A,{1,2}) = 1

α ∶= ΣX . clique(X)

⟦α⟧(A) = 18

Page 43: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the number of cliques in a graph)

1

2

34

5

34

5

1

2

A ∶

clique(X) ∶= ∀x . ∀y . (X(x) ∧X(y) ∧ x ≠ y)→ E(x , y)

⟦clique⟧(A,{3,4,5}) = 1

⟦clique⟧(A,{1,2}) = 1

α ∶= ΣX . clique(X)

⟦α⟧(A) = 18

Page 44: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the number of cliques in a graph)

1

2

34

5

34

5

1

2

A ∶

clique(X) ∶= ∀x . ∀y . (X(x) ∧X(y) ∧ x ≠ y)→ E(x , y)

⟦clique⟧(A,{3,4,5}) = 1 ⟦clique⟧(A,{1,2}) = 1

α ∶= ΣX . clique(X)

⟦α⟧(A) = 18

Page 45: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the number of cliques in a graph)

1

2

34

5

34

5

1

2

A ∶

clique(X) ∶= ∀x . ∀y . (X(x) ∧X(y) ∧ x ≠ y)→ E(x , y)

⟦clique⟧(A,{3,4,5}) = 1 ⟦clique⟧(A,{1,2}) = 1

α ∶= ΣX . clique(X)

⟦α⟧(A) = 18

Page 46: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Semantics of Quantitative Second Order logic

Example (counting the number of cliques in a graph)

1

2

34

5

34

5

1

2

A ∶

clique(X) ∶= ∀x . ∀y . (X(x) ∧X(y) ∧ x ≠ y)→ E(x , y)

⟦clique⟧(A,{3,4,5}) = 1 ⟦clique⟧(A,{1,2}) = 1

α ∶= ΣX . clique(X)

⟦α⟧(A) = 18

Page 47: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Subfragments and extentions of QSO

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

QSO = QSO±α

«SO )

We can restrict or extend the language of ϕ:

QSO(FO) := ϕ is restricted to FO logic.

QSO(LFP) := ϕ is restricted to LFP logic.

We can restrict or extend the language of α:

QFO(SO) := α is restricted to first order operators (i.e. s,+, ⋅,Σx . ,Πx . ).

ΣQSO(SO) := α is restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

Or both ϕ and α:

QFO(LFP) = α is restricted to first order operators

and ϕ is restricted to LFP logic.

Page 48: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Subfragments and extentions of QSO

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

QSO = QSO±α

«SO )

We can restrict or extend the language of ϕ:

QSO(FO) := ϕ is restricted to FO logic.

QSO(LFP) := ϕ is restricted to LFP logic.

We can restrict or extend the language of α:

QFO(SO) := α is restricted to first order operators (i.e. s,+, ⋅,Σx . ,Πx . ).

ΣQSO(SO) := α is restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

Or both ϕ and α:

QFO(LFP) = α is restricted to first order operators

and ϕ is restricted to LFP logic.

Page 49: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Subfragments and extentions of QSO

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

QSO = QSO±α

«SO )

We can restrict or extend the language of ϕ:

QSO(FO) := ϕ is restricted to FO logic.

QSO(LFP) := ϕ is restricted to LFP logic.

We can restrict or extend the language of α:

QFO(SO) := α is restricted to first order operators (i.e. s,+, ⋅,Σx . ,Πx . ).

ΣQSO(SO) := α is restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

Or both ϕ and α:

QFO(LFP) = α is restricted to first order operators

and ϕ is restricted to LFP logic.

Page 50: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Subfragments and extentions of QSO

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

QSO = QSO±α

«SO )

We can restrict or extend the language of ϕ:

QSO(FO) := ϕ is restricted to FO logic.

QSO(LFP) := ϕ is restricted to LFP logic.

We can restrict or extend the language of α:

QFO(SO) := α is restricted to first order operators (i.e. s,+, ⋅,Σx . ,Πx . ).

ΣQSO(SO) := α is restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

Or both ϕ and α:

QFO(LFP) = α is restricted to first order operators

and ϕ is restricted to LFP logic.

Page 51: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Subfragments and extentions of QSO

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

QSO = QSO±α

«SO )

We can restrict or extend the language of ϕ:

QSO(FO) := ϕ is restricted to FO logic.

QSO(LFP) := ϕ is restricted to LFP logic.

We can restrict or extend the language of α:

QFO(SO) := α is restricted to first order operators (i.e. s,+, ⋅,Σx . ,Πx . ).

ΣQSO(SO) := α is restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

Or both ϕ and α:

QFO(LFP) = α is restricted to first order operators

and ϕ is restricted to LFP logic.

Page 52: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Subfragments and extentions of QSO

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

QSO = QSO±α

«SO )

We can restrict or extend the language of ϕ:

QSO(FO) := ϕ is restricted to FO logic.

QSO(LFP) := ϕ is restricted to LFP logic.

We can restrict or extend the language of α:

QFO(SO) := α is restricted to first order operators (i.e. s,+, ⋅,Σx . ,Πx . ).

ΣQSO(SO) := α is restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

Or both ϕ and α:

QFO(LFP) = α is restricted to first order operators

and ϕ is restricted to LFP logic.

Page 53: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Subfragments and extentions of QSO

α ∶= ϕ ∈ SO ∣ s ∣ (α + α) ∣ (α ⋅ α) ∣ Σx . α ∣ Πx . α ∣ ΣX . α ∣ ΠX . α

QSO = QSO±α

«SO )

We can restrict or extend the language of ϕ:

QSO(FO) := ϕ is restricted to FO logic.

QSO(LFP) := ϕ is restricted to LFP logic.

We can restrict or extend the language of α:

QFO(SO) := α is restricted to first order operators (i.e. s,+, ⋅,Σx . ,Πx . ).

ΣQSO(SO) := α is restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

Or both ϕ and α:

QFO(LFP) = α is restricted to first order operators

and ϕ is restricted to LFP logic.

Page 54: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Quantitative second order logic

QSO vs counting complexity

Below and beyond

Outline

Page 55: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Capturing a counting complexity class with QSO

Recall that a counting complexity C ⊆ {f ∶ Σ∗ → N}.

Let enc(A) be any reasonable encoding of A into a string in Σ∗.

Definition

Let F be a fragment or extension of QSO and C a counting complexity class.

Then F captures C over ordered R-structures if:

1. for every α ∈ F , there exists f ∈ C such that ⟦α⟧(A) = f (enc(A))for every A ∈ Struct[R].

2. for every f ∈ C, there exists α ∈ F such that f (enc(A)) = ⟦α⟧(A)for every A ∈ Struct[R].

F captures C over ordered structures if F captures C over ordered

R-structures for every signature R.

Page 56: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Capturing a counting complexity class with QSO

Recall that a counting complexity C ⊆ {f ∶ Σ∗ → N}.

Let enc(A) be any reasonable encoding of A into a string in Σ∗.

Definition

Let F be a fragment or extension of QSO and C a counting complexity class.

Then F captures C over ordered R-structures if:

1. for every α ∈ F , there exists f ∈ C such that ⟦α⟧(A) = f (enc(A))for every A ∈ Struct[R].

2. for every f ∈ C, there exists α ∈ F such that f (enc(A)) = ⟦α⟧(A)for every A ∈ Struct[R].

F captures C over ordered structures if F captures C over ordered

R-structures for every signature R.

Page 57: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Capturing a counting complexity class with QSO

Recall that a counting complexity C ⊆ {f ∶ Σ∗ → N}.

Let enc(A) be any reasonable encoding of A into a string in Σ∗.

Definition

Let F be a fragment or extension of QSO and C a counting complexity class.

Then F captures C over ordered R-structures if:

1. for every α ∈ F , there exists f ∈ C such that ⟦α⟧(A) = f (enc(A))for every A ∈ Struct[R].

2. for every f ∈ C, there exists α ∈ F such that f (enc(A)) = ⟦α⟧(A)for every A ∈ Struct[R].

F captures C over ordered structures if F captures C over ordered

R-structures for every signature R.

Page 58: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Capturing a counting complexity class with QSO

Recall that a counting complexity C ⊆ {f ∶ Σ∗ → N}.

Let enc(A) be any reasonable encoding of A into a string in Σ∗.

Definition

Let F be a fragment or extension of QSO and C a counting complexity class.

Then F captures C over ordered R-structures if:

1. for every α ∈ F , there exists f ∈ C such that ⟦α⟧(A) = f (enc(A))for every A ∈ Struct[R].

2. for every f ∈ C, there exists α ∈ F such that f (enc(A)) = ⟦α⟧(A)for every A ∈ Struct[R].

F captures C over ordered structures if F captures C over ordered

R-structures for every signature R.

Page 59: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Capturing a counting complexity class with QSO

Recall that a counting complexity C ⊆ {f ∶ Σ∗ → N}.

Let enc(A) be any reasonable encoding of A into a string in Σ∗.

Definition

Let F be a fragment or extension of QSO and C a counting complexity class.

Then F captures C over ordered R-structures if:

1. for every α ∈ F , there exists f ∈ C such that ⟦α⟧(A) = f (enc(A))for every A ∈ Struct[R].

2. for every f ∈ C, there exists α ∈ F such that f (enc(A)) = ⟦α⟧(A)for every A ∈ Struct[R].

F captures C over ordered structures if F captures C over ordered

R-structures for every signature R.

Page 60: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Capturing a counting complexity class with QSO

Recall that a counting complexity C ⊆ {f ∶ Σ∗ → N}.

Let enc(A) be any reasonable encoding of A into a string in Σ∗.

Definition

Let F be a fragment or extension of QSO and C a counting complexity class.

Then F captures C over ordered R-structures if:

1. for every α ∈ F , there exists f ∈ C such that ⟦α⟧(A) = f (enc(A))for every A ∈ Struct[R].

2. for every f ∈ C, there exists α ∈ F such that f (enc(A)) = ⟦α⟧(A)for every A ∈ Struct[R].

F captures C over ordered structures if F captures C over ordered

R-structures for every signature R.

Page 61: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

What counting classes can be captured by QSO?

Counting

complexity

classes

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

#P

≡ ?

SpanP

≡ ?

FP

≡ ?

#L

≡ ?

#PSPACE

≡ ?

⋮ ⋮

We show that most of these classes

can be captured by subfragments or extensions of QSO

Page 62: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

What counting classes can be captured by QSO?

Counting

complexity

classes

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

#P

≡ ?

SpanP

≡ ?

FP

≡ ?

#L

≡ ?

#PSPACE

≡ ?

⋮ ⋮

We show that most of these classes

can be captured by subfragments or extensions of QSO

Page 63: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture #P?

f ∈ #P iff there exists an NP machine M

such that f (x) = #acceptsM(x) for all x ∈ Σ∗.

ΣQSO(FO) := α restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

and ϕ restricted to FO logic.

TheoremΣQSO(FO) captures #P over ordered structures.

Page 64: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture #P?

f ∈ #P iff there exists an NP machine M

such that f (x) = #acceptsM(x) for all x ∈ Σ∗.

ΣQSO(FO) := α restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

and ϕ restricted to FO logic.

TheoremΣQSO(FO) captures #P over ordered structures.

Page 65: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture #P?

f ∈ #P iff there exists an NP machine M

such that f (x) = #acceptsM(x) for all x ∈ Σ∗.

ΣQSO(FO) := α restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

and ϕ restricted to FO logic.

TheoremΣQSO(FO) captures #P over ordered structures.

Page 66: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture #P?

f ∈ #P iff there exists an NP machine M

such that f (x) = #acceptsM(x) for all x ∈ Σ∗.

ΣQSO(FO) := α restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

and ϕ restricted to FO logic.

TheoremΣQSO(FO) captures #P over ordered structures.

Page 67: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture SpanP?

#P ≡ ΣQSO(FO)

f ∈ SpanP iff there exists an NP machine M with output

such that f (x) = #outputsM(x) for all x ∈ Σ∗.

ΣQSO(∃SO) := α restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

and ϕ restricted to existential SO logic.

TheoremΣQSO(∃SO) captures SpanP over ordered structures.

#P and SpanP were shown to be captured

by a different framework of Saluja et al. and Compton et al.

Page 68: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture SpanP?

#P ≡ ΣQSO(FO)

f ∈ SpanP iff there exists an NP machine M with output

such that f (x) = #outputsM(x) for all x ∈ Σ∗.

ΣQSO(∃SO) := α restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

and ϕ restricted to existential SO logic.

TheoremΣQSO(∃SO) captures SpanP over ordered structures.

#P and SpanP were shown to be captured

by a different framework of Saluja et al. and Compton et al.

Page 69: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture SpanP?

#P ≡ ΣQSO(FO)

f ∈ SpanP iff there exists an NP machine M with output

such that f (x) = #outputsM(x) for all x ∈ Σ∗.

ΣQSO(∃SO) := α restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

and ϕ restricted to existential SO logic.

TheoremΣQSO(∃SO) captures SpanP over ordered structures.

#P and SpanP were shown to be captured

by a different framework of Saluja et al. and Compton et al.

Page 70: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture SpanP?

#P ≡ ΣQSO(FO)

f ∈ SpanP iff there exists an NP machine M with output

such that f (x) = #outputsM(x) for all x ∈ Σ∗.

ΣQSO(∃SO) := α restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

and ϕ restricted to existential SO logic.

TheoremΣQSO(∃SO) captures SpanP over ordered structures.

#P and SpanP were shown to be captured

by a different framework of Saluja et al. and Compton et al.

Page 71: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture SpanP?

#P ≡ ΣQSO(FO)

f ∈ SpanP iff there exists an NP machine M with output

such that f (x) = #outputsM(x) for all x ∈ Σ∗.

ΣQSO(∃SO) := α restricted to sum operators (i.e. s,+,Σx . ,ΣX . )

and ϕ restricted to existential SO logic.

TheoremΣQSO(∃SO) captures SpanP over ordered structures.

#P and SpanP were shown to be captured

by a different framework of Saluja et al. and Compton et al.

Page 72: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FP?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)

f ∈ FP iff there exists a PTIME machine M with output

such that f (x) =M(x) for all x ∈ Σ∗.

QFO(LFP) := α restricted to first order op. (i.e. +, ⋅,Σx . ,Πx . )

and ϕ restricted to LFP logic.

TheoremQFO(LFP) captures FP over ordered structures.

Page 73: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FP?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)

f ∈ FP iff there exists a PTIME machine M with output

such that f (x) =M(x) for all x ∈ Σ∗.

QFO(LFP) := α restricted to first order op. (i.e. +, ⋅,Σx . ,Πx . )

and ϕ restricted to LFP logic.

TheoremQFO(LFP) captures FP over ordered structures.

Page 74: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FP?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)

f ∈ FP iff there exists a PTIME machine M with output

such that f (x) =M(x) for all x ∈ Σ∗.

QFO(LFP) := α restricted to first order op. (i.e. +, ⋅,Σx . ,Πx . )

and ϕ restricted to LFP logic.

TheoremQFO(LFP) captures FP over ordered structures.

Page 75: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FP?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)

f ∈ FP iff there exists a PTIME machine M with output

such that f (x) =M(x) for all x ∈ Σ∗.

QFO(LFP) := α restricted to first order op. (i.e. +, ⋅,Σx . ,Πx . )

and ϕ restricted to LFP logic.

TheoremQFO(LFP) captures FP over ordered structures.

Page 76: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FPSPACE?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)FP ≡ QFO(LFP)

f ∈ FPSPACE iff there exists a PSPACE machine M with output

such that f (x) =M(x) for all x ∈ Σ∗.

QSO(PFP) := ϕ restricted to PFP logic.

TheoremQSO(PFP) captures FPSPACE over ordered structures.

Page 77: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FPSPACE?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)FP ≡ QFO(LFP)

f ∈ FPSPACE iff there exists a PSPACE machine M with output

such that f (x) =M(x) for all x ∈ Σ∗.

QSO(PFP) := ϕ restricted to PFP logic.

TheoremQSO(PFP) captures FPSPACE over ordered structures.

Page 78: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FPSPACE?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)FP ≡ QFO(LFP)

f ∈ FPSPACE iff there exists a PSPACE machine M with output

such that f (x) =M(x) for all x ∈ Σ∗.

QSO(PFP) := ϕ restricted to PFP logic.

TheoremQSO(PFP) captures FPSPACE over ordered structures.

Page 79: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FPSPACE?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)FP ≡ QFO(LFP)

f ∈ FPSPACE iff there exists a PSPACE machine M with output

such that f (x) =M(x) for all x ∈ Σ∗.

QSO(PFP) := ϕ restricted to PFP logic.

TheoremQSO(PFP) captures FPSPACE over ordered structures.

Page 80: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FPSPACE(poly)?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)FP ≡ QFO(LFP)

FPSPACE ≡ QSO(PFP)

f ∈ FPSPACE(poly) iff there exists a PSPACE machine M

with output of polynomial size

such that f (x) =M(x) for all x ∈ Σ∗.

QFO(PFP) := α restricted to first order op. (i.e. +, ⋅,Σx . ,Πx . )

and ϕ restricted to PFP logic.

TheoremQFO(PFP) captures FPSPACE(poly) over ordered structures.

Page 81: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FPSPACE(poly)?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)FP ≡ QFO(LFP)

FPSPACE ≡ QSO(PFP)

f ∈ FPSPACE(poly) iff there exists a PSPACE machine M

with output of polynomial size

such that f (x) =M(x) for all x ∈ Σ∗.

QFO(PFP) := α restricted to first order op. (i.e. +, ⋅,Σx . ,Πx . )

and ϕ restricted to PFP logic.

TheoremQFO(PFP) captures FPSPACE(poly) over ordered structures.

Page 82: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FPSPACE(poly)?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)FP ≡ QFO(LFP)

FPSPACE ≡ QSO(PFP)

f ∈ FPSPACE(poly) iff there exists a PSPACE machine M

with output of polynomial size

such that f (x) =M(x) for all x ∈ Σ∗.

QFO(PFP) := α restricted to first order op. (i.e. +, ⋅,Σx . ,Πx . )

and ϕ restricted to PFP logic.

TheoremQFO(PFP) captures FPSPACE(poly) over ordered structures.

Page 83: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

How to capture FPSPACE(poly)?

#P ≡ ΣQSO(FO)SpanP ≡ ΣQSO(∃SO)FP ≡ QFO(LFP)

FPSPACE ≡ QSO(PFP)

f ∈ FPSPACE(poly) iff there exists a PSPACE machine M

with output of polynomial size

such that f (x) =M(x) for all x ∈ Σ∗.

QFO(PFP) := α restricted to first order op. (i.e. +, ⋅,Σx . ,Πx . )

and ϕ restricted to PFP logic.

TheoremQFO(PFP) captures FPSPACE(poly) over ordered structures.

Page 84: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

More classes?

#P ≡ ΣQSO(FO)

SpanP ≡ ΣQSO(∃SO)

FP ≡ QFO(LFP)

FPSPACE ≡ QSO(PFP)

FPSPACE(poly) ≡ QFO(PFP)

GapP ≡ ΣQSOZ(FO)

MaxP ≡ MaxQSO(FO)

MinP ≡ MinQSO(FO)

Page 85: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

More classes?

#P ≡ ΣQSO(FO)

SpanP ≡ ΣQSO(∃SO)

FP ≡ QFO(LFP)

FPSPACE ≡ QSO(PFP)

FPSPACE(poly) ≡ QFO(PFP)

GapP ≡ ΣQSOZ(FO)

MaxP ≡ MaxQSO(FO)

MinP ≡ MinQSO(FO)

Page 86: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

More classes?

#P ≡ ΣQSO(FO)

SpanP ≡ ΣQSO(∃SO)

FP ≡ QFO(LFP)

FPSPACE ≡ QSO(PFP)

FPSPACE(poly) ≡ QFO(PFP)

GapP ≡ ΣQSOZ(FO)

MaxP ≡ MaxQSO(FO)

MinP ≡ MinQSO(FO)

Page 87: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Quantitative second order logic

QSO vs counting complexity

Below and beyond

Outline

Page 88: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Use QSO to understand classes below #P

#P ≡ ΣQSO(FO)

We consider subfragments below FO:

Σ0 = { θ ∈ FO ∣ θ has no first-order quantifiers }

Σ1 = { ϕ ∈ FO ∣ ϕ = ∃x . θ(x) ∧ θ ∈ Σ0 }

Π1 = { ϕ ∈ FO ∣ ϕ = ∀x . θ(x) ∧ θ ∈ Σ0 }

Σ2 = { ϕ ∈ FO ∣ ϕ = ∃x . ∀y . θ(x , y) ∧ θ ∈ Σ0 }

Π2 = { ϕ ∈ FO ∣ ϕ = ∀x . ∃y . θ(x , y) ∧ θ ∈ Σ0 }

Page 89: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Use QSO to understand classes below #P

#P ≡ ΣQSO(FO)

We consider subfragments below FO:

Σ0 = { θ ∈ FO ∣ θ has no first-order quantifiers }

Σ1 = { ϕ ∈ FO ∣ ϕ = ∃x . θ(x) ∧ θ ∈ Σ0 }

Π1 = { ϕ ∈ FO ∣ ϕ = ∀x . θ(x) ∧ θ ∈ Σ0 }

Σ2 = { ϕ ∈ FO ∣ ϕ = ∃x . ∀y . θ(x , y) ∧ θ ∈ Σ0 }

Π2 = { ϕ ∈ FO ∣ ϕ = ∀x . ∃y . θ(x , y) ∧ θ ∈ Σ0 }

Page 90: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Use QSO to understand classes below #P

#P ≡ ΣQSO(FO)

Saluja et. al. counting classes below #P

#Σ0 ⊊ #Σ1 ⊊ #Π1 ⊊ #Σ2 ⊊ #Π2 = #FO ≡ #P

Theorem (ΣQSO-hierarchy)

#Σ0

#Σ1

ΣQSO(Σ0)⊊

ΣQSO(Σ1)⊊

⊊#Π1⊊ ΣQSO(Π1)= #Σ2⊊

#Σ2 ΣQSO(Σ2)= #Π2⊊ ΣQSO(Π2)= #P≡

Page 91: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Use QSO to understand classes below #P

#P ≡ ΣQSO(FO)

Saluja et. al. counting classes below #P

#Σ0 ⊊ #Σ1 ⊊ #Π1 ⊊ #Σ2 ⊊ #Π2 = #FO ≡ #P

Theorem (ΣQSO-hierarchy)

#Σ0

#Σ1

ΣQSO(Σ0)⊊

ΣQSO(Σ1)⊊

⊊#Π1⊊ ΣQSO(Π1)= #Σ2⊊

#Σ2 ΣQSO(Σ2)= #Π2⊊ ΣQSO(Π2)= #P≡

Page 92: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Use QSO to understand classes below #P

#P ≡ ΣQSO(FO)

Saluja et. al. counting classes below #P

#Σ0 ⊊ #Σ1 ⊊ #Π1 ⊊ #Σ2 ⊊ #Π2 = #FO ≡ #P

Theorem (ΣQSO-hierarchy)

#Σ0

#Σ1

ΣQSO(Σ0)⊊

ΣQSO(Σ1)⊊

#Π1⊊ ΣQSO(Π1)= #Σ2⊊

#Σ2 ΣQSO(Σ2)= #Π2⊊ ΣQSO(Π2)= #P≡

Page 93: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Use QSO to understand classes below #P

#P ≡ ΣQSO(FO)

Saluja et. al. counting classes below #P

#Σ0 ⊊ #Σ1 ⊊ #Π1 ⊊ #Σ2 ⊊ #Π2 = #FO ≡ #P

Theorem (ΣQSO-hierarchy)

#Σ0

#Σ1

ΣQSO(Σ0)⊊

ΣQSO(Σ1)⊊

⊊#Π1⊊ ΣQSO(Π1)=

#Σ2⊊

#Σ2 ΣQSO(Σ2)= #Π2⊊ ΣQSO(Π2)= #P≡

Page 94: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Use QSO to understand classes below #P

#P ≡ ΣQSO(FO)

Saluja et. al. counting classes below #P

#Σ0 ⊊ #Σ1 ⊊ #Π1 ⊊ #Σ2 ⊊ #Π2 = #FO ≡ #P

Theorem (ΣQSO-hierarchy)

#Σ0

#Σ1

ΣQSO(Σ0)⊊

ΣQSO(Σ1)⊊

⊊#Π1⊊ ΣQSO(Π1)= #Σ2⊊

#Σ2 ΣQSO(Σ2)=

#Π2⊊ ΣQSO(Π2)= #P≡

Page 95: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Use QSO to understand classes below #P

#P ≡ ΣQSO(FO)

Saluja et. al. counting classes below #P

#Σ0 ⊊ #Σ1 ⊊ #Π1 ⊊ #Σ2 ⊊ #Π2 = #FO ≡ #P

Theorem (ΣQSO-hierarchy)

#Σ0

#Σ1

ΣQSO(Σ0)⊊

ΣQSO(Σ1)⊊

⊊#Π1⊊ ΣQSO(Π1)= #Σ2⊊

#Σ2 ΣQSO(Σ2)= #Π2⊊ ΣQSO(Π2)= #P≡

Page 96: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

The class ΣQSO(Σ1[FO])

Consider the following fragment of FO:

Σ1[FO] = { ϕ ∈ FO ∣ ϕ = ∃x . θ(x) and θ can contain

atomic formulae of the form

u = v , X(u) and ϕ(u) ∈ FO }

Theorem (good decision and closure properties)

The class ΣQSO(Σ1[FO]) is closed under sum, multiplication and

subtraction by one. Moreover, ΣQSO(Σ1[FO]) ⊆ TotP and

every function in ΣQSO(Σ1[FO]) has an FPRAS.

Page 97: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

The class ΣQSO(Σ1[FO])

Consider the following fragment of FO:

Σ1[FO] = { ϕ ∈ FO ∣ ϕ = ∃x . θ(x) and θ can contain

atomic formulae of the form

u = v , X(u) and ϕ(u) ∈ FO }

Theorem (good decision and closure properties)

The class ΣQSO(Σ1[FO]) is closed under sum, multiplication and

subtraction by one. Moreover, ΣQSO(Σ1[FO]) ⊆ TotP and

every function in ΣQSO(Σ1[FO]) has an FPRAS.

Page 98: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

The class ΣQSO(Σ1[FO])

Consider the following fragment of FO:

Σ1[FO] = { ϕ ∈ FO ∣ ϕ = ∃x . θ(x) and θ can contain

atomic formulae of the form

u = v , X(u) and ϕ(u) ∈ FO }

Theorem (good decision and closure properties)

The class ΣQSO(Σ1[FO]) is closed under sum, multiplication and

subtraction by one. Moreover, ΣQSO(Σ1[FO]) ⊆ TotP and

every function in ΣQSO(Σ1[FO]) has an FPRAS.

Page 99: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

The class ΣQSO(Σ1[FO])

Consider the following fragment of FO:

Σ1[FO] = { ϕ ∈ FO ∣ ϕ = ∃x . θ(x) and θ can contain

atomic formulae of the form

u = v , X(u) and ϕ(u) ∈ FO }

Theorem (good decision and closure properties)

The class ΣQSO(Σ1[FO]) is closed under sum, multiplication and

subtraction by one.

Moreover, ΣQSO(Σ1[FO]) ⊆ TotP and

every function in ΣQSO(Σ1[FO]) has an FPRAS.

Page 100: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

The class ΣQSO(Σ1[FO])

Consider the following fragment of FO:

Σ1[FO] = { ϕ ∈ FO ∣ ϕ = ∃x . θ(x) and θ can contain

atomic formulae of the form

u = v , X(u) and ϕ(u) ∈ FO }

Theorem (good decision and closure properties)

The class ΣQSO(Σ1[FO]) is closed under sum, multiplication and

subtraction by one. Moreover, ΣQSO(Σ1[FO]) ⊆ TotP

and

every function in ΣQSO(Σ1[FO]) has an FPRAS.

Page 101: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

The class ΣQSO(Σ1[FO])

Consider the following fragment of FO:

Σ1[FO] = { ϕ ∈ FO ∣ ϕ = ∃x . θ(x) and θ can contain

atomic formulae of the form

u = v , X(u) and ϕ(u) ∈ FO }

Theorem (good decision and closure properties)

The class ΣQSO(Σ1[FO]) is closed under sum, multiplication and

subtraction by one. Moreover, ΣQSO(Σ1[FO]) ⊆ TotP and

every function in ΣQSO(Σ1[FO]) has an FPRAS.

Page 102: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

ΣQSO(Σ1[FO]) is closed under subtraction by one

We focus on the case where α ∈ ΣQSO(Σ1[FO]) is of the form:

α = ΣX .Σx .∃y . ϕ(X , x , y)

We construct a formula min-ϕFO(x) that identifies the lexicographically

minimal assignment σ to x that satisfies ∃X . ∃y . ϕ(X , x , y).

Then we use min-ϕFO(x) to define a formula ψ(X , x) that filters out the

minimal assignment to X for that σ.

Lastly, we define a formula that counts one assignment less for (X , x):

α′ = ΣX .Σx .∃y . ϕ(X , x , y) ∧ ψ(X , x)

In this setting, the existence of a small witness (in this case σ)

is essential to have closure by subtraction by one.

(proof sketch)

Page 103: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

ΣQSO(Σ1[FO]) is closed under subtraction by one

We focus on the case where α ∈ ΣQSO(Σ1[FO]) is of the form:

α = ΣX .Σx .∃y . ϕ(X , x , y)

We construct a formula min-ϕFO(x) that identifies the lexicographically

minimal assignment σ to x that satisfies ∃X . ∃y . ϕ(X , x , y).

Then we use min-ϕFO(x) to define a formula ψ(X , x) that filters out the

minimal assignment to X for that σ.

Lastly, we define a formula that counts one assignment less for (X , x):

α′ = ΣX .Σx .∃y . ϕ(X , x , y) ∧ ψ(X , x)

In this setting, the existence of a small witness (in this case σ)

is essential to have closure by subtraction by one.

(proof sketch)

Page 104: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

ΣQSO(Σ1[FO]) is closed under subtraction by one

We focus on the case where α ∈ ΣQSO(Σ1[FO]) is of the form:

α = ΣX .Σx .∃y . ϕ(X , x , y)

We construct a formula min-ϕFO(x) that identifies the lexicographically

minimal assignment σ to x that satisfies ∃X . ∃y . ϕ(X , x , y).

Then we use min-ϕFO(x) to define a formula ψ(X , x) that filters out the

minimal assignment to X for that σ.

Lastly, we define a formula that counts one assignment less for (X , x):

α′ = ΣX .Σx .∃y . ϕ(X , x , y) ∧ ψ(X , x)

In this setting, the existence of a small witness (in this case σ)

is essential to have closure by subtraction by one.

(proof sketch)

Page 105: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

ΣQSO(Σ1[FO]) is closed under subtraction by one

We focus on the case where α ∈ ΣQSO(Σ1[FO]) is of the form:

α = ΣX .Σx .∃y . ϕ(X , x , y)

We construct a formula min-ϕFO(x) that identifies the lexicographically

minimal assignment σ to x that satisfies ∃X . ∃y . ϕ(X , x , y).

Then we use min-ϕFO(x) to define a formula ψ(X , x) that filters out the

minimal assignment to X for that σ.

Lastly, we define a formula that counts one assignment less for (X , x):

α′ = ΣX .Σx .∃y . ϕ(X , x , y) ∧ ψ(X , x)

In this setting, the existence of a small witness (in this case σ)

is essential to have closure by subtraction by one.

(proof sketch)

Page 106: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

ΣQSO(Σ1[FO]) is closed under subtraction by one

We focus on the case where α ∈ ΣQSO(Σ1[FO]) is of the form:

α = ΣX .Σx .∃y . ϕ(X , x , y)

We construct a formula min-ϕFO(x) that identifies the lexicographically

minimal assignment σ to x that satisfies ∃X . ∃y . ϕ(X , x , y).

Then we use min-ϕFO(x) to define a formula ψ(X , x) that filters out the

minimal assignment to X for that σ.

Lastly, we define a formula that counts one assignment less for (X , x):

α′ = ΣX .Σx .∃y . ϕ(X , x , y) ∧ ψ(X , x)

In this setting, the existence of a small witness (in this case σ)

is essential to have closure by subtraction by one.

(proof sketch)

Page 107: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

ΣQSO(Σ1[FO]) is closed under subtraction by one

We focus on the case where α ∈ ΣQSO(Σ1[FO]) is of the form:

α = ΣX .Σx .∃y . ϕ(X , x , y)

We construct a formula min-ϕFO(x) that identifies the lexicographically

minimal assignment σ to x that satisfies ∃X . ∃y . ϕ(X , x , y).

Then we use min-ϕFO(x) to define a formula ψ(X , x) that filters out the

minimal assignment to X for that σ.

Lastly, we define a formula that counts one assignment less for (X , x):

α′ = ΣX .Σx .∃y . ϕ(X , x , y) ∧ ψ(X , x)

In this setting, the existence of a small witness (in this case σ)

is essential to have closure by subtraction by one.

(proof sketch)

Page 108: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Extend QSO to capture complexity classes beyond QSO

We extend QFO with recursion:

RQFO = QFO with quantitative recursion.

TQFO = QFO with quantitative transitive closure.

Theorem

1. RQFO(FO) captures FP over the class of ordered structures.

2. TQFO(FO) captures #L over the class of ordered structures.

Page 109: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Extend QSO to capture complexity classes beyond QSO

We extend QFO with recursion:

RQFO = QFO with quantitative recursion.

TQFO = QFO with quantitative transitive closure.

Theorem

1. RQFO(FO) captures FP over the class of ordered structures.

2. TQFO(FO) captures #L over the class of ordered structures.

Page 110: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Extend QSO to capture complexity classes beyond QSO

We extend QFO with recursion:

RQFO = QFO with quantitative recursion.

TQFO = QFO with quantitative transitive closure.

Theorem

1. RQFO(FO) captures FP over the class of ordered structures.

2. TQFO(FO) captures #L over the class of ordered structures.

Page 111: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Extend QSO to capture complexity classes beyond QSO

We extend QFO with recursion:

RQFO = QFO with quantitative recursion.

TQFO = QFO with quantitative transitive closure.

Theorem

1. RQFO(FO) captures FP over the class of ordered structures.

2. TQFO(FO) captures #L over the class of ordered structures.

Page 112: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Extend QSO to capture complexity classes beyond QSO

We extend QFO with recursion:

RQFO = QFO with quantitative recursion.

TQFO = QFO with quantitative transitive closure.

Theorem

1. RQFO(FO) captures FP over the class of ordered structures.

2. TQFO(FO) captures #L over the class of ordered structures.

Page 113: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Conclusions and future work

“We believe that quantitative logics are the right framework for

Descriptive complexity of counting complexity classes.”

Plenty of open problems here . . .

1. Logical characterization of classes like TotP,SpanL, . . .

2. Compl. characterization of subfragments like QSO(FO),QFO(FO), . . .

3. Use quantitative logic to find complexity classes with good properties.

4. Understand the expressiveness of QSO and their subfragments.

Thanks! Questions?

Page 114: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Conclusions and future work

“We believe that quantitative logics are the right framework for

Descriptive complexity of counting complexity classes.”

Plenty of open problems here . . .

1. Logical characterization of classes like TotP,SpanL, . . .

2. Compl. characterization of subfragments like QSO(FO),QFO(FO), . . .

3. Use quantitative logic to find complexity classes with good properties.

4. Understand the expressiveness of QSO and their subfragments.

Thanks! Questions?

Page 115: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Conclusions and future work

“We believe that quantitative logics are the right framework for

Descriptive complexity of counting complexity classes.”

Plenty of open problems here . . .

1. Logical characterization of classes like TotP,SpanL, . . .

2. Compl. characterization of subfragments like QSO(FO),QFO(FO), . . .

3. Use quantitative logic to find complexity classes with good properties.

4. Understand the expressiveness of QSO and their subfragments.

Thanks! Questions?

Page 116: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Conclusions and future work

“We believe that quantitative logics are the right framework for

Descriptive complexity of counting complexity classes.”

Plenty of open problems here . . .

1. Logical characterization of classes like TotP,SpanL, . . .

2. Compl. characterization of subfragments like QSO(FO),QFO(FO), . . .

3. Use quantitative logic to find complexity classes with good properties.

4. Understand the expressiveness of QSO and their subfragments.

Thanks! Questions?

Page 117: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Conclusions and future work

“We believe that quantitative logics are the right framework for

Descriptive complexity of counting complexity classes.”

Plenty of open problems here . . .

1. Logical characterization of classes like TotP,SpanL, . . .

2. Compl. characterization of subfragments like QSO(FO),QFO(FO), . . .

3. Use quantitative logic to find complexity classes with good properties.

4. Understand the expressiveness of QSO and their subfragments.

Thanks! Questions?

Page 118: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Conclusions and future work

“We believe that quantitative logics are the right framework for

Descriptive complexity of counting complexity classes.”

Plenty of open problems here . . .

1. Logical characterization of classes like TotP,SpanL, . . .

2. Compl. characterization of subfragments like QSO(FO),QFO(FO), . . .

3. Use quantitative logic to find complexity classes with good properties.

4. Understand the expressiveness of QSO and their subfragments.

Thanks! Questions?

Page 119: Descriptive complexity for counting complexity classes · Descriptive complexity for counting complexity classes Mart n Munoz~ PUC Chile - IMFD Joint work with Marcelo Arenas and

Conclusions and future work

“We believe that quantitative logics are the right framework for

Descriptive complexity of counting complexity classes.”

Plenty of open problems here . . .

1. Logical characterization of classes like TotP,SpanL, . . .

2. Compl. characterization of subfragments like QSO(FO),QFO(FO), . . .

3. Use quantitative logic to find complexity classes with good properties.

4. Understand the expressiveness of QSO and their subfragments.

Thanks! Questions?