SlideShare a Scribd company logo
1 of 26
Download to read offline
演習 3(小林研) 第 2 回
奥村真司
April 21, 2020
1 / 26
• 読んだ資料
▶ Languages, Automata, and Logic. Thomas W. (1997)
• 今回の発表
▶ Chapter1 Introduction
▶ Chapter2 Models and Formulas
▶ Chapter3 Automata and MSO-Logic on Finite Words and Trees
2 / 26
Table of contents
1 Words, Trees, Graphs as Models
2 First-Order Logic
3 Monadic Second-Order Logic
4 Automata and MSO-Logic on finite words and trees
3 / 26
Words, Trees, Graphs as Models
Table of contents
1 Words, Trees, Graphs as Models
2 First-Order Logic
3 Monadic Second-Order Logic
4 Automata and MSO-Logic on finite words and trees
4 / 26
Words, Trees, Graphs as Models
Word model
A : finite alphabet
w = a0 · · · an−1 : word over A (∀i. ai ∈ A)
Word model
w = (dom(w), Sw
, <w
, (Qw
a )a∈A)
• dom(w) = {0, 1, · · · , n − 1}
• (i, i + 1) ∈ Sw (0 ≤ i < n − 1)
• <w : natural order
• Qw
a = {i ∈ dom(w) | ai = a}
5 / 26
Words, Trees, Graphs as Models
ω-word model
α = a0a1 · · · : ω-word over A
ω word model
α = (ω, Sα
, <α
, (Qα
a )a∈A)
• ω = {0, 1, 2, · · · }
6 / 26
Words, Trees, Graphs as Models
Tree model
t : proper binary tree over A
Tree model
t = (dom(t), St
0, St
1, <t
, (Qt
a)a∈A)
• node of tree : finite words over the alphabet {0, 1} (0 : branch left, 1 : branch right)
• (w, w0) ∈ St
0 (for w, w0 ∈ dom(t))
• <t : the proper prefix relation
7 / 26
Words, Trees, Graphs as Models
Graph model
G : edge-labelled directed graph
A : the alphabet of vertex label
B : the alphabet of edge label
Graph model
G = (V, (EG
b )b∈B, (QG
a )a∈A)
Word, Tree models are special case of Graph models
8 / 26
First-Order Logic
Table of contents
1 Words, Trees, Graphs as Models
2 First-Order Logic
3 Monadic Second-Order Logic
4 Automata and MSO-Logic on finite words and trees
9 / 26
First-Order Logic
Signature
• Variables x, y, . . .
• Connectives ¬, ∧, ∨, →, ↔
• Atomic formulas
x = y, S(x, y), x < y, Qa(x)
10 / 26
First-Order Logic
Example formulae (first-order logic)
A = {a, b, c}
• a の後ろに b は続かない
¬∃x∃y(S(x, y) ∧ Qa(x) ∧ Qb(y))
• b の次は a
∀x(Qb(x) → ∃y(S(x, y) ∧ Qa(y)))
• 最後の文字は a
∃x(¬∃yS(x, y) ∧ Qa(x))
11 / 26
First-Order Logic
Notations
• φ(x1, . . . , xn)
▶ φ has at most n free variables
▶ If n = 0, φ is sentence
• (w, p1, . . . , pn) |= φ(x1, . . . , xn)
▶ φ is satisfied in w when S, <, Qa, x1, . . . , xn are interpreted by Sw
, <w
, Qw
a , p1, . . . , pn
• L(φ) = {w ∈ A∗ | w |= φ}
▶ The language defined by the sentence φ
12 / 26
First-Order Logic
Definability
• A language L is FO[S, <]-definable if a first-order sentence φ exists with L(φ) = L
• FO[S]-definability
▶ No use is made of < in φ
• For finite word, S can be expressed in terms of <
▶ x < y ∧ ¬∃z(x < z ∧ z < y)
13 / 26
First-Order Logic
Prenex normal form
• ∃x1∀x2 . . . ∃/∀xnφ0(x1, x2, . . . , xn)
▶ φ0 is quantifier-free
▶ Σ0
n-formula
14 / 26
Monadic Second-Order Logic
Table of contents
1 Words, Trees, Graphs as Models
2 First-Order Logic
3 Monadic Second-Order Logic
4 Automata and MSO-Logic on finite words and trees
15 / 26
Monadic Second-Order Logic
Monadic Second-Order Logic
• Extend first-order logic
• Second-order variables X, Y, . . . (⊆ dom)
• Additional atomic formulas
X(x), Y (y), . . .
16 / 26
Monadic Second-Order Logic
Prenex normal form for second-order formula
• Shift all second-order quantifiers in front of first-order quantifiers
Example
∀x∃Y φ(x, Y )
can be rewritten as
∀X∃Y ∀u∀v∀x((X(u) ∧ X(v) → u = v) ∧ (X(x) → φ(x, Y )))
• Σ1
n-formula
• Σ1
1-formula is also called EMSO-formula
17 / 26
Monadic Second-Order Logic
MSO0-Logic
• Second-order variables only
• Atomic formulas
X ⊆ Y, Sing(X), Suc(X, Y ), X ⊆ Qa
• Same expressive power as MSO-logic
Example
∀x(Qa(x) → ∃y(S(x, y) ∧ Z(y)))
can be rewritten as
∀X(Sing(X) ∧ X ⊆ Qa → ∃Y (Sing(Y ) ∧ Suc(X, Y ) ∧ Y ⊆ Z))
18 / 26
Automata and MSO-Logic on finite words and trees
Table of contents
1 Words, Trees, Graphs as Models
2 First-Order Logic
3 Monadic Second-Order Logic
4 Automata and MSO-Logic on finite words and trees
19 / 26
Automata and MSO-Logic on finite words and trees
MSO-Logic on words
Theorem 3.1(B¨uchi,Elgot)
A language of finite words is recognizable by a finite automaton if and only if it is
MSO[S]-definable, and both conversions, from autoamata to formulas and vice versa, are
effective
(⇒)
• Automaton accepts the nonempty word w iff
w |= ∃X0 . . . ∃Xk(
∧
i̸=j
∀x¬(Xi(x) ∧ Xj(x)) (pairwise disjoint)
∧ ∀x(¬∃yS(y, x) → X0(x)) (initial state)
∧ ∀x∀y(S(x, y) →
∨
(i,a,j)∈∆
(Xi(x) ∧ Qa(x) ∧ Xj(y)) (transition)
∧ ∀x(¬∃yS(x, y) →
∨
∃j∈F:(i,a,j)∈∆
(Xi(x) ∧ Qa(x)))) (final state)
20 / 26
Automata and MSO-Logic on finite words and trees
MSO-Logic on words
(⇐)
• By induction on the MSO0-formulas
• Consider connectives and quantifier only ¬, ∨, ∃
• Construct a finite automaton for any given formula φ(X1, . . . , Xn)
▶ φ(X1, . . . , Xn) is interpreted in a word model with P1, . . . , Pn
▶ such a model represents a word over the expanded alphabet A′
= A × {0, 1}n
• There are automata recognizing the sets defined by atomic formulas
Xj ⊆ Xk, Sing(Xj), Suc(Xj, Xk), Xj ⊆ Qa
▶ base case
▶ check additional bit
21 / 26
Automata and MSO-Logic on finite words and trees
MSO-logic on words
(⇐)
• Inductive step
• Easy for ¬, ∨
▶ well-known closure property
• Assume the language defined by the formula ψ(X1, . . . , Xn) over the alphabet
A × {0, 1}n is recognized by the automaton A
• Construct an automaton corresponding to φ(X1, . . . , Xn−1) = ∃Xnψ(X1, . . . , Xn)
▶ over alphabet A × {0, 1}n−1
▶ guess n-th bit by nondeterminism
22 / 26
Automata and MSO-Logic on finite words and trees
MSO-logic on words
Corollary 3.2
Any MSO[S]-formula can be written as an EMSO[S]-formula
w |= ∃X0 . . . ∃Xk(
∧
i̸=j
∀x¬(Xi(x) ∧ Xj(x)) (pairwise disjoint)
∧ ∀x(¬∃yS(y, x) → X0(x)) (initial state)
∧ ∀x∀y(S(x, y) →
∨
(i,a,j)∈∆
(Xi(x) ∧ Qa(x) ∧ Xj(y)) (transition)
∧ ∀x(¬∃yS(x, y) →
∨
∃j∈F:(i,a,j)∈∆
(Xi(x) ∧ Qa(x)))) (final state)
• Automata normal form
23 / 26
Automata and MSO-Logic on finite words and trees
MSO-logic on words
• Deterministic vs. Nondeterministic
▶ complement and projection
• It is shown that the time complexity of any algorithm converting MSO-formulas to
equivalent automata cannot be bounded by an elementary function
• Application of theorem 3.1
▶ The decidability of weak monadic second-order theory of one successor
▶ The decidability of Presburger arithmetic
24 / 26
Automata and MSO-Logic on finite words and trees
Tree automaton
Definition 3.7 Tree automaton
A = (Q, A, q0, ∆, F)
q0 ∈ Q, F ⊆ Q, ∆ ⊆ Q × A × Q × Q
• transition (q, a, q′, q′′) allows to proceed from q′, q′′ at
the successor nodes of a node u to state q at u while
reading letter a as label of u
• Example
▶ ∆ = {(q1, a, q0, q0), (q3, a, q1, q2), (q2, b, q0, q0)}
F = {q3}
▶ A successful run of A : ρ(ϵ) = q3, ρ(0) = q1, ρ(1) = q2
25 / 26
Automata and MSO-Logic on finite words and trees
MSO-Logic on trees
Theorem 3.8 (Thatcher and Wright, Doner)
A set of finite trees is recognizable by a finite tree automaton if and only if it is MSO-definable
• the nondeterministic and the deterministic tree automaton model are equivalent
26 / 26

More Related Content

What's hot

[4] num integration
[4] num integration[4] num integration
[4] num integration
ikhulsys
 

What's hot (20)

Thesis oral defense
Thesis oral defenseThesis oral defense
Thesis oral defense
 
Supporting Vector Machine
Supporting Vector MachineSupporting Vector Machine
Supporting Vector Machine
 
Ch05 4
Ch05 4Ch05 4
Ch05 4
 
Solve ODE - BVP through the Least Squares Method
Solve ODE - BVP through the Least Squares MethodSolve ODE - BVP through the Least Squares Method
Solve ODE - BVP through the Least Squares Method
 
Interpolation and Extrapolation
Interpolation and ExtrapolationInterpolation and Extrapolation
Interpolation and Extrapolation
 
Rational points on elliptic curves
Rational points on elliptic curvesRational points on elliptic curves
Rational points on elliptic curves
 
Eighan values and diagonalization
Eighan values and diagonalization Eighan values and diagonalization
Eighan values and diagonalization
 
Ch05 3
Ch05 3Ch05 3
Ch05 3
 
Common fixed point theorems with continuously subcompatible mappings in fuzz...
 Common fixed point theorems with continuously subcompatible mappings in fuzz... Common fixed point theorems with continuously subcompatible mappings in fuzz...
Common fixed point theorems with continuously subcompatible mappings in fuzz...
 
Some Other Properties of Fuzzy Filters on Lattice Implication Algebras
Some Other Properties of Fuzzy Filters on Lattice Implication AlgebrasSome Other Properties of Fuzzy Filters on Lattice Implication Algebras
Some Other Properties of Fuzzy Filters on Lattice Implication Algebras
 
Discrete Sets
Discrete  SetsDiscrete  Sets
Discrete Sets
 
[4] num integration
[4] num integration[4] num integration
[4] num integration
 
Common fixed point and weak commuting mappings
Common fixed point and weak commuting mappingsCommon fixed point and weak commuting mappings
Common fixed point and weak commuting mappings
 
Gwt sdm public
Gwt sdm publicGwt sdm public
Gwt sdm public
 
Runge Kutta Method
Runge Kutta Method Runge Kutta Method
Runge Kutta Method
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functions
 
Iq3514961502
Iq3514961502Iq3514961502
Iq3514961502
 
Eigenvalue problems .ppt
Eigenvalue problems .pptEigenvalue problems .ppt
Eigenvalue problems .ppt
 
Common fixed point for two weakly compatible pairs ...
Common fixed point for two weakly compatible pairs                           ...Common fixed point for two weakly compatible pairs                           ...
Common fixed point for two weakly compatible pairs ...
 
Eigenvalues and eigenvectors
Eigenvalues and eigenvectorsEigenvalues and eigenvectors
Eigenvalues and eigenvectors
 

Similar to Monadic second-order logic

Similar to Monadic second-order logic (20)

(α ψ)- Construction with q- function for coupled fixed point
(α   ψ)-  Construction with q- function for coupled fixed point(α   ψ)-  Construction with q- function for coupled fixed point
(α ψ)- Construction with q- function for coupled fixed point
 
Ch02 fuzzyrelation
Ch02 fuzzyrelationCh02 fuzzyrelation
Ch02 fuzzyrelation
 
SASA 2016
SASA 2016SASA 2016
SASA 2016
 
Maximum likelihood estimation of regularisation parameters in inverse problem...
Maximum likelihood estimation of regularisation parameters in inverse problem...Maximum likelihood estimation of regularisation parameters in inverse problem...
Maximum likelihood estimation of regularisation parameters in inverse problem...
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - Introduction
 
Bayesian Criteria based on Universal Measures
Bayesian Criteria based on Universal MeasuresBayesian Criteria based on Universal Measures
Bayesian Criteria based on Universal Measures
 
WEEK-1.pdf
WEEK-1.pdfWEEK-1.pdf
WEEK-1.pdf
 
block-mdp-masters-defense.pdf
block-mdp-masters-defense.pdfblock-mdp-masters-defense.pdf
block-mdp-masters-defense.pdf
 
fuzzy-sbk-150311135852-conversion-gate01.pptx
fuzzy-sbk-150311135852-conversion-gate01.pptxfuzzy-sbk-150311135852-conversion-gate01.pptx
fuzzy-sbk-150311135852-conversion-gate01.pptx
 
Hyperfunction method for numerical integration and Fredholm integral equation...
Hyperfunction method for numerical integration and Fredholm integral equation...Hyperfunction method for numerical integration and Fredholm integral equation...
Hyperfunction method for numerical integration and Fredholm integral equation...
 
On the Family of Concept Forming Operators in Polyadic FCA
On the Family of Concept Forming Operators in Polyadic FCAOn the Family of Concept Forming Operators in Polyadic FCA
On the Family of Concept Forming Operators in Polyadic FCA
 
MCMC and likelihood-free methods
MCMC and likelihood-free methodsMCMC and likelihood-free methods
MCMC and likelihood-free methods
 
MUMS Opening Workshop - Panel Discussion: Facts About Some Statisitcal Models...
MUMS Opening Workshop - Panel Discussion: Facts About Some Statisitcal Models...MUMS Opening Workshop - Panel Discussion: Facts About Some Statisitcal Models...
MUMS Opening Workshop - Panel Discussion: Facts About Some Statisitcal Models...
 
Optimization using soft computing
Optimization using soft computingOptimization using soft computing
Optimization using soft computing
 
ma112011id535
ma112011id535ma112011id535
ma112011id535
 
590-Article Text.pdf
590-Article Text.pdf590-Article Text.pdf
590-Article Text.pdf
 
590-Article Text.pdf
590-Article Text.pdf590-Article Text.pdf
590-Article Text.pdf
 
Higher-Order (F, α, β, ρ, d) –Convexity for Multiobjective Programming Problem
Higher-Order (F, α, β, ρ, d) –Convexity for Multiobjective Programming ProblemHigher-Order (F, α, β, ρ, d) –Convexity for Multiobjective Programming Problem
Higher-Order (F, α, β, ρ, d) –Convexity for Multiobjective Programming Problem
 
Concentration inequality in Machine Learning
Concentration inequality in Machine LearningConcentration inequality in Machine Learning
Concentration inequality in Machine Learning
 
QMC: Operator Splitting Workshop, Boundedness of the Sequence if Iterates Gen...
QMC: Operator Splitting Workshop, Boundedness of the Sequence if Iterates Gen...QMC: Operator Splitting Workshop, Boundedness of the Sequence if Iterates Gen...
QMC: Operator Splitting Workshop, Boundedness of the Sequence if Iterates Gen...
 

More from okuraofvegetable (9)

パタヘネゼミ 第6章
パタヘネゼミ 第6章パタヘネゼミ 第6章
パタヘネゼミ 第6章
 
パタヘネゼミ 第2回
パタヘネゼミ 第2回パタヘネゼミ 第2回
パタヘネゼミ 第2回
 
直交領域探索
直交領域探索直交領域探索
直交領域探索
 
グレブナー基底
グレブナー基底グレブナー基底
グレブナー基底
 
NPCA summer 2014
NPCA summer 2014NPCA summer 2014
NPCA summer 2014
 
JOI summer seminar 2014
JOI summer seminar 2014JOI summer seminar 2014
JOI summer seminar 2014
 
Lecture2
Lecture2Lecture2
Lecture2
 
LT
LTLT
LT
 
Wrapping potato chips is fun
Wrapping potato chips is funWrapping potato chips is fun
Wrapping potato chips is fun
 

Recently uploaded

notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Recently uploaded (20)

(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 

Monadic second-order logic

  • 1. 演習 3(小林研) 第 2 回 奥村真司 April 21, 2020 1 / 26
  • 2. • 読んだ資料 ▶ Languages, Automata, and Logic. Thomas W. (1997) • 今回の発表 ▶ Chapter1 Introduction ▶ Chapter2 Models and Formulas ▶ Chapter3 Automata and MSO-Logic on Finite Words and Trees 2 / 26
  • 3. Table of contents 1 Words, Trees, Graphs as Models 2 First-Order Logic 3 Monadic Second-Order Logic 4 Automata and MSO-Logic on finite words and trees 3 / 26
  • 4. Words, Trees, Graphs as Models Table of contents 1 Words, Trees, Graphs as Models 2 First-Order Logic 3 Monadic Second-Order Logic 4 Automata and MSO-Logic on finite words and trees 4 / 26
  • 5. Words, Trees, Graphs as Models Word model A : finite alphabet w = a0 · · · an−1 : word over A (∀i. ai ∈ A) Word model w = (dom(w), Sw , <w , (Qw a )a∈A) • dom(w) = {0, 1, · · · , n − 1} • (i, i + 1) ∈ Sw (0 ≤ i < n − 1) • <w : natural order • Qw a = {i ∈ dom(w) | ai = a} 5 / 26
  • 6. Words, Trees, Graphs as Models ω-word model α = a0a1 · · · : ω-word over A ω word model α = (ω, Sα , <α , (Qα a )a∈A) • ω = {0, 1, 2, · · · } 6 / 26
  • 7. Words, Trees, Graphs as Models Tree model t : proper binary tree over A Tree model t = (dom(t), St 0, St 1, <t , (Qt a)a∈A) • node of tree : finite words over the alphabet {0, 1} (0 : branch left, 1 : branch right) • (w, w0) ∈ St 0 (for w, w0 ∈ dom(t)) • <t : the proper prefix relation 7 / 26
  • 8. Words, Trees, Graphs as Models Graph model G : edge-labelled directed graph A : the alphabet of vertex label B : the alphabet of edge label Graph model G = (V, (EG b )b∈B, (QG a )a∈A) Word, Tree models are special case of Graph models 8 / 26
  • 9. First-Order Logic Table of contents 1 Words, Trees, Graphs as Models 2 First-Order Logic 3 Monadic Second-Order Logic 4 Automata and MSO-Logic on finite words and trees 9 / 26
  • 10. First-Order Logic Signature • Variables x, y, . . . • Connectives ¬, ∧, ∨, →, ↔ • Atomic formulas x = y, S(x, y), x < y, Qa(x) 10 / 26
  • 11. First-Order Logic Example formulae (first-order logic) A = {a, b, c} • a の後ろに b は続かない ¬∃x∃y(S(x, y) ∧ Qa(x) ∧ Qb(y)) • b の次は a ∀x(Qb(x) → ∃y(S(x, y) ∧ Qa(y))) • 最後の文字は a ∃x(¬∃yS(x, y) ∧ Qa(x)) 11 / 26
  • 12. First-Order Logic Notations • φ(x1, . . . , xn) ▶ φ has at most n free variables ▶ If n = 0, φ is sentence • (w, p1, . . . , pn) |= φ(x1, . . . , xn) ▶ φ is satisfied in w when S, <, Qa, x1, . . . , xn are interpreted by Sw , <w , Qw a , p1, . . . , pn • L(φ) = {w ∈ A∗ | w |= φ} ▶ The language defined by the sentence φ 12 / 26
  • 13. First-Order Logic Definability • A language L is FO[S, <]-definable if a first-order sentence φ exists with L(φ) = L • FO[S]-definability ▶ No use is made of < in φ • For finite word, S can be expressed in terms of < ▶ x < y ∧ ¬∃z(x < z ∧ z < y) 13 / 26
  • 14. First-Order Logic Prenex normal form • ∃x1∀x2 . . . ∃/∀xnφ0(x1, x2, . . . , xn) ▶ φ0 is quantifier-free ▶ Σ0 n-formula 14 / 26
  • 15. Monadic Second-Order Logic Table of contents 1 Words, Trees, Graphs as Models 2 First-Order Logic 3 Monadic Second-Order Logic 4 Automata and MSO-Logic on finite words and trees 15 / 26
  • 16. Monadic Second-Order Logic Monadic Second-Order Logic • Extend first-order logic • Second-order variables X, Y, . . . (⊆ dom) • Additional atomic formulas X(x), Y (y), . . . 16 / 26
  • 17. Monadic Second-Order Logic Prenex normal form for second-order formula • Shift all second-order quantifiers in front of first-order quantifiers Example ∀x∃Y φ(x, Y ) can be rewritten as ∀X∃Y ∀u∀v∀x((X(u) ∧ X(v) → u = v) ∧ (X(x) → φ(x, Y ))) • Σ1 n-formula • Σ1 1-formula is also called EMSO-formula 17 / 26
  • 18. Monadic Second-Order Logic MSO0-Logic • Second-order variables only • Atomic formulas X ⊆ Y, Sing(X), Suc(X, Y ), X ⊆ Qa • Same expressive power as MSO-logic Example ∀x(Qa(x) → ∃y(S(x, y) ∧ Z(y))) can be rewritten as ∀X(Sing(X) ∧ X ⊆ Qa → ∃Y (Sing(Y ) ∧ Suc(X, Y ) ∧ Y ⊆ Z)) 18 / 26
  • 19. Automata and MSO-Logic on finite words and trees Table of contents 1 Words, Trees, Graphs as Models 2 First-Order Logic 3 Monadic Second-Order Logic 4 Automata and MSO-Logic on finite words and trees 19 / 26
  • 20. Automata and MSO-Logic on finite words and trees MSO-Logic on words Theorem 3.1(B¨uchi,Elgot) A language of finite words is recognizable by a finite automaton if and only if it is MSO[S]-definable, and both conversions, from autoamata to formulas and vice versa, are effective (⇒) • Automaton accepts the nonempty word w iff w |= ∃X0 . . . ∃Xk( ∧ i̸=j ∀x¬(Xi(x) ∧ Xj(x)) (pairwise disjoint) ∧ ∀x(¬∃yS(y, x) → X0(x)) (initial state) ∧ ∀x∀y(S(x, y) → ∨ (i,a,j)∈∆ (Xi(x) ∧ Qa(x) ∧ Xj(y)) (transition) ∧ ∀x(¬∃yS(x, y) → ∨ ∃j∈F:(i,a,j)∈∆ (Xi(x) ∧ Qa(x)))) (final state) 20 / 26
  • 21. Automata and MSO-Logic on finite words and trees MSO-Logic on words (⇐) • By induction on the MSO0-formulas • Consider connectives and quantifier only ¬, ∨, ∃ • Construct a finite automaton for any given formula φ(X1, . . . , Xn) ▶ φ(X1, . . . , Xn) is interpreted in a word model with P1, . . . , Pn ▶ such a model represents a word over the expanded alphabet A′ = A × {0, 1}n • There are automata recognizing the sets defined by atomic formulas Xj ⊆ Xk, Sing(Xj), Suc(Xj, Xk), Xj ⊆ Qa ▶ base case ▶ check additional bit 21 / 26
  • 22. Automata and MSO-Logic on finite words and trees MSO-logic on words (⇐) • Inductive step • Easy for ¬, ∨ ▶ well-known closure property • Assume the language defined by the formula ψ(X1, . . . , Xn) over the alphabet A × {0, 1}n is recognized by the automaton A • Construct an automaton corresponding to φ(X1, . . . , Xn−1) = ∃Xnψ(X1, . . . , Xn) ▶ over alphabet A × {0, 1}n−1 ▶ guess n-th bit by nondeterminism 22 / 26
  • 23. Automata and MSO-Logic on finite words and trees MSO-logic on words Corollary 3.2 Any MSO[S]-formula can be written as an EMSO[S]-formula w |= ∃X0 . . . ∃Xk( ∧ i̸=j ∀x¬(Xi(x) ∧ Xj(x)) (pairwise disjoint) ∧ ∀x(¬∃yS(y, x) → X0(x)) (initial state) ∧ ∀x∀y(S(x, y) → ∨ (i,a,j)∈∆ (Xi(x) ∧ Qa(x) ∧ Xj(y)) (transition) ∧ ∀x(¬∃yS(x, y) → ∨ ∃j∈F:(i,a,j)∈∆ (Xi(x) ∧ Qa(x)))) (final state) • Automata normal form 23 / 26
  • 24. Automata and MSO-Logic on finite words and trees MSO-logic on words • Deterministic vs. Nondeterministic ▶ complement and projection • It is shown that the time complexity of any algorithm converting MSO-formulas to equivalent automata cannot be bounded by an elementary function • Application of theorem 3.1 ▶ The decidability of weak monadic second-order theory of one successor ▶ The decidability of Presburger arithmetic 24 / 26
  • 25. Automata and MSO-Logic on finite words and trees Tree automaton Definition 3.7 Tree automaton A = (Q, A, q0, ∆, F) q0 ∈ Q, F ⊆ Q, ∆ ⊆ Q × A × Q × Q • transition (q, a, q′, q′′) allows to proceed from q′, q′′ at the successor nodes of a node u to state q at u while reading letter a as label of u • Example ▶ ∆ = {(q1, a, q0, q0), (q3, a, q1, q2), (q2, b, q0, q0)} F = {q3} ▶ A successful run of A : ρ(ϵ) = q3, ρ(0) = q1, ρ(1) = q2 25 / 26
  • 26. Automata and MSO-Logic on finite words and trees MSO-Logic on trees Theorem 3.8 (Thatcher and Wright, Doner) A set of finite trees is recognizable by a finite tree automaton if and only if it is MSO-definable • the nondeterministic and the deterministic tree automaton model are equivalent 26 / 26