Dept. Computer Science, P.J. af rik Univerzity Ko ice, Slovakia - - PowerPoint PPT Presentation

dept computer science p j af rik univerzity ko ice
SMART_READER_LITE
LIVE PREVIEW

Dept. Computer Science, P.J. af rik Univerzity Ko ice, Slovakia - - PowerPoint PPT Presentation

Viliam Geffert Zuzana Bednrov Dept. Computer Science, P.J. af rik Univerzity Ko ice, Slovakia Nondeterministic pushdown automata input tape A = ( Q, ,,H,q I ,F ) . . . x 1 x 2 x 3 x n Q -- finite set of states, -- input


slide-1
SLIDE 1

Viliam Geffert Zuzana Bednárová

  • Dept. Computer Science, P.J.Šafárik Univerzity

Košice, Slovakia

slide-2
SLIDE 2

A = ( Q,Σ,Γ,H,qI,F ) Q

  • - finite set of states,

Σ

  • - input alphabet,

Γ

  • - pushdown alphabet,

qI

  • - the initial state,

F

  • - accepting states,

H

  • - transitions

(handling input and pushdown separately)

Nondeterministic pushdown automata

input tape x1 x2 x3 xn

q

. . . pushdown

slide-3
SLIDE 3

A = ( Q,Σ,Γ,H,qI,F,h ) h ≥ 0

  • - an ordinary NPDA

with an additional limit on the height

  • f the pushdown

Constant height NPDA

x1 x2 x3 xn

q

. . . pushdown

h

TOP

input tape

slide-4
SLIDE 4

input tape

TOP

pushdown overflow: if adding on TOP results in pushdown overflow, ABORT

Constant height NPDA

x1 x2 x3 xn

q

. . . pushdown

h

slide-5
SLIDE 5

₵ ₵ ₵ ₵ ₵ ₵

. . .

y1

R

q

X I x1

. . . pushdown state

input tape

TOP

h

Two Way PDA

. . .

├ ┤ yr

R

y2

R

x2 xs $ right

push pop

slide-6
SLIDE 6

₵ ₵ ₵ ₵ ₵ ₵

. . .

y1

R

q

X I

. . .

x1

. . . pushdown state

input tape

TOP

h

Two Way PDA

. . .

├ ┤ yr

R

y2

R

x2 xs $ left

push pop

slide-7
SLIDE 7

Descriptional complexity measure:

  • the number of finite control states |Q|
  • the size of the pushdown alphabet |Γ |
  • the height of the pushdown store h

Descriptional complexity

slide-8
SLIDE 8

lin

  • nondet. PDA union

poly det. PDA complement exp nondet. det. PDA intersection, det. PDA union 2exp nondet. PDA det. PDA Known facts about h-PDAs

slide-9
SLIDE 9

lin

  • nondet. PDA union

poly det. PDA complement exp nondet. det. PDA intersection, det. PDA union 2exp nondet. PDA det. PDA Known facts about h-PDAs

  • exp. . . 2exp nondet. PDA complement

2 det. PDA 1 det. PDA 2 nondet. PDA 1 nondet. PDA

?

Open

slide-10
SLIDE 10
  • exp. . . 2exp nondet. PDA complement

2 det. PDA 1 det. PDA 2 nondet. PDA 1 nondet. PDA lin

  • nondet. PDA union

poly det. PDA complement exp nondet. det. PDA intersection, det. PDA union 2exp nondet. PDA det. PDA Known facts about h-PDAs

?

slide-11
SLIDE 11

For each constant height NPDA

NPDA  NFA

Lem.:

. . . xi

xn Z1

q

Zj

. . .

x1

. . .

h

pushdown

state

input tape

TOP

slide-12
SLIDE 12

For each constant height NPDA there exists an equivalent NFA with | Q’ | ≤ |Q | . |Γ ≤ h|

NPDA  NFA

Lem.:

. . . xi

xn Z1

q

Zj

. . .

x1

. . .

q’ϵ Q ’ Q ’  Q x Γ ≤ h h

pushdown

state

input tape

TOP

slide-13
SLIDE 13

For each constant height NPDA there exists an equivalent NFA with | Q’ | ≤ |Q | . |Γ ≤ h|

Lem.:

2NPDA  2NFA

. . . xi

xn Z1

q

Zj

. . .

x1

. . .

q’ϵ Q ’ h

pushdown

state

input tape

TOP

Q ’  Q x Γ ≤ h

slide-14
SLIDE 14

For each constant height 2NPDA there exists an equivalent 1NFA with | Q’’ | ≤ 4| Q | . |Γ ≤ h |

2NPDA  2NFA  1NFA

Thm.:

Q’’  4 Q x Γ ≤ h

. . . xi

xn Z1

q

Zj

. . .

x1

. . .

q’ϵ Q ’ h

pushdown

state

input tape

TOP

Q ’  Q x Γ ≤ h

slide-15
SLIDE 15

For each constant height 2NPDA there exists an equivalent 1NFA with | Q’’ | ≤ 4| Q | . |Γ ≤ h |

2NPDA  1NPDA – upper bound

Thm.:

Q’’  4 Q x Γ ≤ h

. . . xi

xn Z1

q

Zj

. . .

x1

. . .

q’ϵ Q ’ h

pushdown

state

input tape

TOP

Q ’  Q x Γ ≤ h

slide-16
SLIDE 16

For any constant height NPDA A = ( Q, Σ, Γ, H, qI, F, h ) there exists a constant height NPDA B accepting L(B) = L(A)c, with at most

2| Q | . | Γ ≤ h | states

Thm.:

Complement – upper bound

slide-17
SLIDE 17

NPDA A

QA , ΓA , hA L

Complement – upper bound

slide-18
SLIDE 18

NPDA A NFA A’

QA’  QA x ΓA

≤ hA

QA , ΓA , hA L

Complement – upper bound

slide-19
SLIDE 19

double exponential NPDA A NFA A’ DFA A’’

QA’  QA x ΓA

≤ hA

QA , ΓA , hA

QA’’  2QA x ΓA≤hA

L

Complement – upper bound

slide-20
SLIDE 20

NPDA A NFA A’ DFA A’’ DFA B

QA’  QA x ΓA

≤ hA

QA , ΓA , hA

QA’’  2QA x ΓA≤hA

L LC

Complement – upper bound

Accept Reject

slide-21
SLIDE 21

NPDA A NFA A’ NPDA B DFA A’’ DFA B

Accept Reject

QA’  QA x ΓA

≤ hA

QA , ΓA , hA

QA’’  2QA x ΓA≤hA

hB = 0 L LC

Complement – upper bound

slide-22
SLIDE 22

Lower bounds - triangular lemma

Lem.:

For each finite sets A, B: |A|, |B| ≥ 2 and each C A x B: |C| ≥ |A|+|B|-1

A x B

C A B

slide-23
SLIDE 23

Lower bounds - triangular lemma

Lem.:

For each finite sets A, B: |A|, |B| ≥ 2 and each C A x B: |C| ≥ |A|+|B|-1 there exist elements a1  a2 , b1  b2

A x B

a1

C

a2 b1 b2

A B

slide-24
SLIDE 24

Lower bounds - triangular lemma

Lem.:

For each finite sets A, B: |A|, |B| ≥ 2 and each C A x B: |C| ≥ |A|+|B|-1 there exist elements a1  a2 , b1  b2 such that

[a1,b1], [a1, b2], [a2, b1] ∈ C A x B

a1

C

a2 b1 b2

[a1,b1] [a2,b1] [a1,b2]

A B

slide-25
SLIDE 25

For a fixed alphabet  and n > 0, a string ϕ is well formed, if: xi , yj  n Witness language

₵ ₵ ₵ ₵ ₵ ₵

. . .

y1

R

x1

. . . yr

R

y2

R

x2 xs

$ ϕ =

slide-26
SLIDE 26

LC consists of: I s t s

  • ill formed strings ϕ , plus
  • well formed strings ϕ

Witness language ∃ xi = yj

₵ ₵ ₵ ₵ ₵ ₵

. . .

y1

R

x1

. . . yr

R

y2

R

x2 xs $

ϕ =

slide-27
SLIDE 27

LC consists of:

ill formed strings ϕ

  • well formed strings ϕ

Witness language

₵ ₵ ₵ ₵ ₵ ₵

. . .

y1

R

x1

. . . yr

R

y2

R

x2 xs $

ϕ = ∃ xi = yj

slide-28
SLIDE 28

For each  and n > 0, the language L

I n p u t p u s h d

  • w

n

h

. . . y1

R

x1

$ Witness language – upper bound

x2

xs

₵ ₵ y2

R

₵ . . . ₵

yr

R

Thm.:

slide-29
SLIDE 29

For each  and n > 0, the language L can be accepted by NPDA with linear cost.

e r a p m

  • c

l

  • a

d

I n p u t p u s h d

  • w

n

h

s c a n s c a n

|Q| = n + O(| |) h = n Γ = 

. . . y1

R

x1

$

x2

xs

₵ ₵ y2

R

₵ . . . ₵

yr

R

s c a n Thm.:

Witness language – upper bound

slide-30
SLIDE 30

For each alphabet Σ and n>3, each constant height NPDA accepting L C must have

  • either the number of states |Q|,
  • or pushdown height h

above

2|Σ|n-O(1)

Witness language – lower bound

Thm.:

slide-31
SLIDE 31

Witness language – lower bound By contradiction if |Q|, h < 2|Σ|n-O(1) we fool A: We construct δ ∈ L C such that A accepts δ

slide-32
SLIDE 32

Witness language – lower bound We define sets of blocks:

U W xi< 1/2 |Σ|n xi ≥ 1/2 |Σ|n

X = Σn It is easy to see: | X X |=|U|+|W| |X|= | Σ|n |U|= 1/2 | Σ|n |W|= 1/2 | Σ|n

slide-33
SLIDE 33

Witness language – lower bound Now define sets of strings: = {x1₵ … xs₵: x1 < … < xs , x1, … xs ∈ X } X0 U0 W0 = {u1₵ … us₵: u1 < … < us , u1, …us ∈ U } = {w1₵ … ws₵: w1 < … < ws , w1, …ws ∈ W }

slide-34
SLIDE 34

Witness language – lower bound

For x1 < x2 < . . . < xs , xi ∊ X U0 ∋ x1 ₵ x2 ₵ . . . xi ₵ xi+1 ₵ xi+2 ₵. . . xs ₵ ∊ W0

u w

X0 = U0 .W0

slide-35
SLIDE 35

Witness language – lower bound

|X0 | = 2 | Σ |n |U0 | = 2 1/2 | Σ |n |W0 | = 2 1/2 | Σ |n For x1 < x2 < . . . < xs , xi ∊ X U0 ∋ x1 ₵ x2 ₵ . . . xi ₵ xi+1 ₵ xi+2 ₵. . . xs ₵ ∊ W0

u w

X0 = U0 .W0

slide-36
SLIDE 36

Witness language – lower bound u = u1 ₵ u2 ₵ . . . ui ₵ . . . us ₵ uCR = u1

R ₵ u2 R ₵ . . . ui R ₵ . . . ur R ₵

such that

ui ∈ u iff ui

R ∉ uCR

intuitively: U U – { ui ∈ u } = { uj : uj

R ∈ uCR }

slide-37
SLIDE 37

Witness language – lower bound

w h

$ u CR

wCR u

uw$uCRwCR  LC

slide-38
SLIDE 38

w $ u CR

Witness language – lower bound ql

h yl wCR u

slide-39
SLIDE 39

Witness language – lower bound ql

xl w  uw h

$

yl u CR wCR u CASE 1

slide-40
SLIDE 40

Witness language – lower bound ql

xl w  uw h

$

yl u CR wCR u CASE 2

slide-41
SLIDE 41

Witness language – lower bound ql

xl w  uw h

$

yl u CR wCR xk qk u CASE 1

slide-42
SLIDE 42

Witness language – lower bound for each uw ∈ X0 we have some [ yl

l , ql l , xl l , yk , q k ]

X0

slide-43
SLIDE 43

Witness language – lower bound Pigeonhole argument

X1= strings uw ∈ X0 sharing

the same [ yl

l , ql l , xl l , yk , qk ]

X1 X0

slide-44
SLIDE 44

X1 Witness language – lower bound

u1w1, u1w2, u2w1 ∈ X1

share the same [ yl

l , ql l , xl l , yk , qk ]

X1 ⊆ U0 .W0 |X1| ≥ |U0|+|W0|-1 Lemma

u1w1

u1w2

u2w1

X0

+

w1 , w2 ∈ W0 w1 ≠ w2 u1 , u2 ∈ U0 u1 ≠ u2

slide-45
SLIDE 45

X1 Witness language – lower bound

u1w1, u1w2, u2w1 ∈ X1

share the same [ yl

l , ql l , xl l , yk , qk ]

X1 ⊆ U0 .W0 |X1| ≥ |U0|+|W0|-1 Lemma

u1w1

u1w2

u2w1

X0

+

w1 , w2 ∈ W0 w1 ≠ w2 u1 , u2 ∈ U0 u1 ≠ u2

slide-46
SLIDE 46

Witness language – lower bound ql

xl w1  u’ h

$

yl u1

CR

w1

CR

xk qk u1 CASE 1

slide-47
SLIDE 47

Witness language – lower bound ql

xl h  u’’

$

yl u2

CR

xk qk u2 CASE 1 w1 w1

CR

slide-48
SLIDE 48

Witness language – lower bound

u1 , u2 ∈ U0 u1 ≠ u2

∃ui : ui ∈ u1 & ui

∉ u2

slide-49
SLIDE 49

Witness language – lower bound

u1 , u2 ∈ U0 u1 ≠ u2

∃ui : ui ∈ u1 & ui

∉ u2

∃ui : ui

∉ u1

C & ui

∈ u2

C

slide-50
SLIDE 50

Witness language – lower bound

u1 , u2 ∈ U0 u1 ≠ u2

∃ui : ui ∈ u1 & ui

∉ u2

∃ui : ui

∉ u1

C & ui

∈ u2

C

u1 w1 $ u2

CR w1 CR ∉ LC

slide-51
SLIDE 51

Witness language – lower bound ql

xl  u’ h

$

yl u2

CR

xk qk u1 CASE 1 w1 w1

CR

slide-52
SLIDE 52

Witness language – lower bound ql

xl  u’ h

$

yl u2

CR

xk qk u1 CASE 1 w1 w1

CR

u1 w1 $ u2

CR w1 CR ∉ LC

slide-53
SLIDE 53

ql

yl

Witness language – lower bound

xl  u’ h

$

u2

CR

xk qk u1 CASE 1 w1 w1

CR

u1 w1 $ u2

CR w1 CR ∉ LC

slide-54
SLIDE 54

For L , we have NPDA with n + O(|Σ|) states n pushdown height |Σ| pushdown symbols Summing up: each NPDA for LC requires at least

2|Σ|n-O(1)

states pushdown height

  • r

On the other hand,

slide-55
SLIDE 55

Lem.:

Witness language by two-way machine For each Σ and n≥1, language LC can be accepted by constant height 2DPDA using

n + 6|Σ|+21 states n + 1

pushdown height

|Σ|+1

pushdown symbols

slide-56
SLIDE 56

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

X I

. . . pushdown state

TOP

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Well formed input?

Witness language by two-way machine

slide-57
SLIDE 57

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

X I

. . . pushdown state

TOP

├ ┤

$

1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Well formed input? (Exactly one “$” ?)

Witness language by two-way machine

slide-58
SLIDE 58

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Well formed input? X I

pushdown

TOP

$ Witness language by two-way machine

slide-59
SLIDE 59

₵ ₵ ₵ ₵ ₵ ₵ ₵

q0

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Well formed input? (All blocks of equal length?) X I

pushdown

TOP

Witness language by two-way machine

slide-60
SLIDE 60

₵ ₵ ₵ ₵ ₵ ₵ ₵

q1

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Well formed input? X I

pushdown

TOP

Witness language by two-way machine

slide-61
SLIDE 61

₵ ₵ ₵ ₵ ₵ ₵ ₵

q2

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Well formed input? X I

pushdown

TOP

Witness language by two-way machine

slide-62
SLIDE 62

₵ ₵ ₵ ₵ ₵ ₵ ₵

q3

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Well formed input? X I

pushdown

TOP

Witness language by two-way machine

slide-63
SLIDE 63

₵ ₵ ₵ ₵ ₵ ₵ ₵

q4

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1

0 1 0 0

Well formed input? X I

pushdown

TOP

Witness language by two-way machine

slide-64
SLIDE 64

₵ ₵ ₵ ₵ ₵ ₵ ₵

q0

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Well formed input? X I

pushdown

TOP

. . .

4

Witness language by two-way machine

slide-65
SLIDE 65

₵ ₵ ₵ ₵ ₵ ₵ ₵

q0

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Well formed input? X I

pushdown

TOP

Witness language by two-way machine

slide-66
SLIDE 66

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Well formed input?

. . .

X I

pushdown

TOP

4

Witness language by two-way machine

slide-67
SLIDE 67

₵ ₵ ₵ ₵ ₵ ₵ ₵

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

Well formed input?

. . .

4 X I

pushdown

TOP

YES

n + O(1) states Witness language by two-way machine

slide-68
SLIDE 68

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0

1 0 1 1

0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Idea

pushdown

TOP

1 1 1 X I

Z

? ∃ Z : Witness language by two-way machine xi = Z = yj

R

slide-69
SLIDE 69

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0

1 0 1 1

0 0 0 1 1 0 1 0

1 1 0 1

0 1 0 0 Idea

pushdown

TOP

1 1 1 X I

Z

? ∃ Z : Witness language by two-way machine xi = Z = yj

R

slide-70
SLIDE 70

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

4

TOP

X I Initialize PD memory

Witness language by two-way machine

slide-71
SLIDE 71

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

4 X I Initialize PD memory

Witness language by two-way machine

slide-72
SLIDE 72

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $

1 0 0

0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

4 X I Initialize PD memory

Witness language by two-way machine

slide-73
SLIDE 73

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

4 X I Initialize PD memory

Witness language by two-way machine

slide-74
SLIDE 74

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

4 X I Initialize PD memory

Z

Witness language by two-way machine

slide-75
SLIDE 75

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Initialize PD memory X I

pushdown

TOP

O(1) states

4

Z

Witness language by two-way machine

slide-76
SLIDE 76

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Left Part

pushdown

TOP

X I

Z

= Z ? Witness language by two-way machine

slide-77
SLIDE 77

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

X I Left Part

Z

= Z ? Witness language by two-way machine

slide-78
SLIDE 78

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

├ ┤ $

1 0 0

0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

Difference

X I Left Part

Z

= Z ? Witness language by two-way machine

slide-79
SLIDE 79

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

X I Left Part

Z

Witness language by two-way machine

slide-80
SLIDE 80

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

X I Left Part

Z

Witness language by two-way machine

slide-81
SLIDE 81

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

X I Left Part

Z

= Z ? Witness language by two-way machine

slide-82
SLIDE 82

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

Difference

X I Left Part

Z

= Z ? Witness language by two-way machine

slide-83
SLIDE 83

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0

0 1 1 0

1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

X I Left Part

Z

Witness language by two-way machine

slide-84
SLIDE 84

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

X I Left Part

Z

Witness language by two-way machine

slide-85
SLIDE 85

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

├ ┤ $ 1 0 0 0 1 1 0

1

0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

Difference

X I Left Part

Z

= Z ? Witness language by two-way machine

slide-86
SLIDE 86

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

X I Left Part

Z

Witness language by two-way machine

slide-87
SLIDE 87

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤

$

1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

X I Left Part

Z

Witness language by two-way machine

slide-88
SLIDE 88

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0

pushdown

TOP

X I Left Part

Z

Witness language by two-way machine

. . .

slide-89
SLIDE 89

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Left Part

pushdown

TOP

1

X I

Witness language by two-way machine

Z := Z + 1

slide-90
SLIDE 90

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Left Part

pushdown

TOP

1 X I

Z

= Z ? Witness language by two-way machine

slide-91
SLIDE 91

X I

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

├ ┤ $

1 0 0

0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Left Part

pushdown

TOP

1

YES

Z

= Z ? Witness language by two-way machine

slide-92
SLIDE 92

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

1 X I

Z

Z= ? Witness language by two-way machine

slide-93
SLIDE 93

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

1 X I

Z

Z= ? Witness language by two-way machine

slide-94
SLIDE 94

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

X I

1

Difference

1

Z

Z= ? Witness language by two-way machine

slide-95
SLIDE 95

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

X I 1

Z

Witness language by two-way machine

slide-96
SLIDE 96

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

X I 1

Z

Witness language by two-way machine

slide-97
SLIDE 97

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

1 X I

Z

Z= ? Witness language by two-way machine

slide-98
SLIDE 98

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

1 X I

Z

Z= ? Witness language by two-way machine

slide-99
SLIDE 99

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

1 X I

Z

Z= ? Witness language by two-way machine

slide-100
SLIDE 100

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤

$

1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

1 X I

No match Z

Witness language by two-way machine

slide-101
SLIDE 101

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Left Part

pushdown

TOP

X I 1

Z

Witness language by two-way machine

slide-102
SLIDE 102

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Left Part

pushdown

TOP

1 X I

. . .

Z := Z + 1

Witness language by two-way machine

slide-103
SLIDE 103

X I

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Left Part

pushdown

TOP

1 1 1

. . .

Z

= Z ? Witness language by two-way machine

slide-104
SLIDE 104

X I

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Left Part

pushdown

TOP

1 1 1

Z

= Z ? Witness language by two-way machine

slide-105
SLIDE 105

X I

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Left Part

pushdown

TOP

1 1 1

= Z

Z

Witness language by two-way machine

1 0 1 1

slide-106
SLIDE 106

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

1 1 1 X I

Z

Z= ? Witness language by two-way machine

1 0 1 1

slide-107
SLIDE 107

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 Right Part

pushdown

TOP

1 1 1 X I

Z

Z= ? Witness language by two-way machine

1 0 1 1

slide-108
SLIDE 108

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

state

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 0 1 0 0 Right Part

pushdown

TOP

1 1 1 X I

Z =

q

REJECT

Z

Witness language by two-way machine

1 0 1 1 1 1 0 1

slide-109
SLIDE 109

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0

pushdown

TOP

1 1 1 1 X I 1 0 1 1

q Z

ACCEPT ∃ Z: X = Z & Z = Y Witness language by two-way machine

slide-110
SLIDE 110

₵ ₵ ₵ ₵ ₵ ₵ ₵

q

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0 Right Part

pushdown

TOP

1 1 1 1 X I 1 0 1 1

q Z

ACCEPT ∃ Z: X = Z & Z = Y

Left Part

3|Σ|+ O(1) states 2|Σ|+ O(1) states

Witness language by two-way machine

slide-111
SLIDE 111

X I

q

state

PD Memory

pushdown

TOP

1 1 1

₵ ₵ ₵ ₵ ₵ ₵ ₵

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1 1

Witness language by two-way machine

? Z := Z + 1

slide-112
SLIDE 112

X I

q

state

PD Memory

pushdown

1 1

TOP

₵ ₵ ₵ ₵ ₵ ₵ ₵

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1

Witness language by two-way machine

slide-113
SLIDE 113

X I

q

state

PD Memory

pushdown

1

TOP

₵ ₵ ₵ ₵ ₵ ₵ ₵

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1

Witness language by two-way machine

slide-114
SLIDE 114

X I

q

state

PD Memory

pushdown

1

TOP

₵ ₵ ₵ ₵ ₵ ₵ ₵

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1

Witness language by two-way machine

slide-115
SLIDE 115

X I

q

state

PD Memory

pushdown

1 1

TOP

₵ ₵ ₵ ₵ ₵ ₵ ₵

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1

Witness language by two-way machine

slide-116
SLIDE 116

X I

q

state

PD Memory

pushdown

1 1

TOP

₵ ₵ ₵ ₵ ₵ ₵ ₵

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1

Witness language by two-way machine

slide-117
SLIDE 117

X I

q

state

PD Memory

pushdown

TOP

1 1

Z:=Z+1

₵ ₵ ₵ ₵ ₵ ₵ ₵

├ ┤ $ 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1

|Σ|+ O(1) states

Witness language by two-way machine

slide-118
SLIDE 118

PD Memory Right Part Left Part Initialize PD memory Well formed input?

n + 6|Σ|+ O(1)

TOTAL

Witness language by two-way machine

n + +|Σ|+ O(1) n + 3|Σ|+ O(1) n + 2|Σ|+ O(1) n + 3|Σ| +O(1) n + 3|Σ|+ O(1)

slide-119
SLIDE 119

For LC , we have 2DPDA with n + O(|Σ|) states n + 1 pushdown height |Σ|+1 pushdown symbols Summing up: each 1NPDA for LC requires at least

2|Σ|n-O(1)

states pushdown height

  • r

On the other hand,

slide-120
SLIDE 120

The following operations require double-exp blow up: Summary 1 DPDA 1 NPDA 2 NPDA 1 NPDA 2 DPDA 1 DPDA 1 NPDA complement

new new

slide-121
SLIDE 121

The following operations require double-exp blow up: Summary 1 DPDA 1 NPDA 2 NPDA 1 NPDA 2 DPDA 1 DPDA 1 NPDA complement

new new

slide-122
SLIDE 122

The following operations require double-exp blow up: Summary 1 DPDA 1 NPDA 2 NPDA 1 NPDA 2 DPDA 1 DPDA 1 NPDA complement

new new

slide-123
SLIDE 123

The following operations require double-exp blow up: Summary 1 DPDA 1 NPDA 2 NPDA 1 NPDA 2 DPDA 1 DPDA 1 NPDA complement Other operations with 2NPDA, DPDA (union, intersection, complement, homomorphism, …) OPEN

slide-124
SLIDE 124