Compressed Membership for NFA (DFA) with Compressed Labels is in NP - - PowerPoint PPT Presentation

compressed membership for nfa dfa with compressed labels
SMART_READER_LITE
LIVE PREVIEW

Compressed Membership for NFA (DFA) with Compressed Labels is in NP - - PowerPoint PPT Presentation

Compressed Membership for NFA (DFA) with Compressed Labels is in NP (P) Artur Je Wrocaw, Poland 7 September 2011 Compressed membership for NFA 7 September 2011 1 / 25 Artur Je Straight Line Programms SLPs Definition (Straight Line


slide-1
SLIDE 1

Compressed Membership for NFA (DFA) with Compressed Labels is in NP (P)

Artur Jeż

Wrocław, Poland

7 September 2011

Artur Jeż Compressed membership for NFA 7 September 2011 1 / 25

slide-2
SLIDE 2

Straight Line Programms SLPs

Definition (Straight Line Programms (SLP))

Context free grammar defining a single word. (Chomsky normal form).

Artur Jeż Compressed membership for NFA 7 September 2011 2 / 25

slide-3
SLIDE 3

Straight Line Programms SLPs

Definition (Straight Line Programms (SLP))

Context free grammar defining a single word. (Chomsky normal form). Much smaller, than the word. Word an: grammar size O(log n) A1 → a A2 → A1A1 . . . Aℓ+1 → AℓAℓ A → Aℓ0Aℓ1 . . .

Artur Jeż Compressed membership for NFA 7 September 2011 2 / 25

slide-4
SLIDE 4

Straight Line Programms SLPs

Definition (Straight Line Programms (SLP))

Context free grammar defining a single word. (Chomsky normal form). Much smaller, than the word. Word an: grammar size O(log n) A1 → a A2 → A1A1 . . . Aℓ+1 → AℓAℓ A → Aℓ0Aℓ1 . . .

SLPs as a compression model

application (LZ, logarithmic transformation) theory (formal languages) up to exponential compression preserves/captures word properties

Artur Jeż Compressed membership for NFA 7 September 2011 2 / 25

slide-5
SLIDE 5

Usage and work on SLP

Theory

word equations (Plandowski: satisfiability in PSPACE)

Artur Jeż Compressed membership for NFA 7 September 2011 3 / 25

slide-6
SLIDE 6

Usage and work on SLP

Theory

word equations (Plandowski: satisfiability in PSPACE)

String algorithms

equality pattern matching

Artur Jeż Compressed membership for NFA 7 September 2011 3 / 25

slide-7
SLIDE 7

Usage and work on SLP

Theory

word equations (Plandowski: satisfiability in PSPACE)

String algorithms

equality pattern matching

LZW/LZ dealing algorithms

O(n log n) pattern matching for LZ compressed text O(n) pattern matching for fully LZW compressed text

Artur Jeż Compressed membership for NFA 7 September 2011 3 / 25

slide-8
SLIDE 8

Usage and work on SLP

Theory

word equations (Plandowski: satisfiability in PSPACE)

String algorithms

equality pattern matching

LZW/LZ dealing algorithms

O(n log n) pattern matching for LZ compressed text O(n) pattern matching for fully LZW compressed text

Independent interest

indexing structure for SLP

Artur Jeż Compressed membership for NFA 7 September 2011 3 / 25

slide-9
SLIDE 9

Compressed membership

SLPs are used membership problem develop tools/gain understanding

Artur Jeż Compressed membership for NFA 7 September 2011 4 / 25

slide-10
SLIDE 10

Compressed membership

SLPs are used membership problem develop tools/gain understanding

Compressed membership [Plandowski & Rytter; Jewels are forever 1999]

In membership problems, words are given as SLPs.

Artur Jeż Compressed membership for NFA 7 September 2011 4 / 25

slide-11
SLIDE 11

Compressed membership

SLPs are used membership problem develop tools/gain understanding

Compressed membership [Plandowski & Rytter; Jewels are forever 1999]

In membership problems, words are given as SLPs.

Known results

RE, CFG, Conjunctive grammars . . .

Artur Jeż Compressed membership for NFA 7 September 2011 4 / 25

slide-12
SLIDE 12

Compressed membership

SLPs are used membership problem develop tools/gain understanding

Compressed membership [Plandowski & Rytter; Jewels are forever 1999]

In membership problems, words are given as SLPs.

Known results

RE, CFG, Conjunctive grammars . . .

Open questions

Posted in Jewels are forever some solved Compressed membership for NFA

Artur Jeż Compressed membership for NFA 7 September 2011 4 / 25

slide-13
SLIDE 13

Compressed membership for NFA

Input: SLP, NFA N Output: Yes/No

Artur Jeż Compressed membership for NFA 7 September 2011 5 / 25

slide-14
SLIDE 14

Compressed membership for NFA

Input: SLP, NFA N Output: Yes/No Simple dynamic algorithm: for Xi calculate {(p, q) | δ(p, word(Xi), q)}

Artur Jeż Compressed membership for NFA 7 September 2011 5 / 25

slide-15
SLIDE 15

Compressed membership for NFA

Input: SLP, NFA N Output: Yes/No Simple dynamic algorithm: for Xi calculate {(p, q) | δ(p, word(Xi), q)} Where is the hardness?

Artur Jeż Compressed membership for NFA 7 September 2011 5 / 25

slide-16
SLIDE 16

Compressed membership for NFA

Input: SLP, NFA N Output: Yes/No Simple dynamic algorithm: for Xi calculate {(p, q) | δ(p, word(Xi), q)} Where is the hardness? Compress N as well: allow transition by words.

Artur Jeż Compressed membership for NFA 7 September 2011 5 / 25

slide-17
SLIDE 17

Compressed membership for NFA

Input: SLP, NFA N Output: Yes/No Simple dynamic algorithm: for Xi calculate {(p, q) | δ(p, word(Xi), q)} Where is the hardness? Compress N as well: allow transition by words. Fully compressed NFA membership SLP for w NFA N, compressed transitions

Artur Jeż Compressed membership for NFA 7 September 2011 5 / 25

slide-18
SLIDE 18

Compressed membership for NFA

Input: SLP, NFA N Output: Yes/No Simple dynamic algorithm: for Xi calculate {(p, q) | δ(p, word(Xi), q)} Where is the hardness? Compress N as well: allow transition by words. Fully compressed NFA membership SLP for w NFA N, compressed transitions

a X Y b A X

Artur Jeż Compressed membership for NFA 7 September 2011 5 / 25

slide-19
SLIDE 19

Compressed membership for NFA: complexity

Complexity

NP-hardness (subsum), already for

◮ acyclic NFA ◮ unary alphabet

in PSPACE: enough to store positions inside decompressed words

Artur Jeż Compressed membership for NFA 7 September 2011 6 / 25

slide-20
SLIDE 20

Compressed membership for NFA: complexity

Complexity

NP-hardness (subsum), already for

◮ acyclic NFA ◮ unary alphabet

in PSPACE: enough to store positions inside decompressed words

Conjecture

In NP.

Partial results

Plandowski & Rytter (unary in NP) Lohrey & Mathissen (highly periodic in NP, highly aperiodic in P)

Artur Jeż Compressed membership for NFA 7 September 2011 6 / 25

slide-21
SLIDE 21

New results

Theorem

Fully compressed membership for NFA is in NP.

Theorem

Fully compressed membership for DFA is in P.

Artur Jeż Compressed membership for NFA 7 September 2011 7 / 25

slide-22
SLIDE 22

New results

Theorem

Fully compressed membership for NFA is in NP.

Theorem

Fully compressed membership for DFA is in P.

New technique

New, interesting technique.

Artur Jeż Compressed membership for NFA 7 September 2011 7 / 25

slide-23
SLIDE 23

Convention

Convention

SLPs given as a single grammar Xi → XjXk, implies i > j, i > k input word: Xn word(Xi)

Artur Jeż Compressed membership for NFA 7 September 2011 8 / 25

slide-24
SLIDE 24

Idea: Recompression

Difficulty: the words are long. Shorten them.

Artur Jeż Compressed membership for NFA 7 September 2011 9 / 25

slide-25
SLIDE 25

Idea: Recompression

Difficulty: the words are long. Shorten them. a b c a a b

Artur Jeż Compressed membership for NFA 7 September 2011 9 / 25

slide-26
SLIDE 26

Idea: Recompression

Difficulty: the words are long. Shorten them. d c a d

Artur Jeż Compressed membership for NFA 7 September 2011 9 / 25

slide-27
SLIDE 27

Idea: Recompression

Difficulty: the words are long. Shorten them. d c a d

Deeper understanding

New production: d → ab. Building new SLP (recompression). SLP problems: hard, as SLP are different. Building canonical SLP for the instance.

Artur Jeż Compressed membership for NFA 7 September 2011 9 / 25

slide-28
SLIDE 28

Idea: Recompression

Difficulty: the words are long. Shorten them. d c a d

Deeper understanding

New production: d → ab. Building new SLP (recompression). SLP problems: hard, as SLP are different. Building canonical SLP for the instance. What to do with an? a a c a a a

Artur Jeż Compressed membership for NFA 7 September 2011 9 / 25

slide-29
SLIDE 29

Idea: Recompression

Difficulty: the words are long. Shorten them. d c a d

Deeper understanding

New production: d → ab. Building new SLP (recompression). SLP problems: hard, as SLP are different. Building canonical SLP for the instance. What to do with an? Replace each non-extendible an by a single symbol. a2 c a3

Artur Jeż Compressed membership for NFA 7 September 2011 9 / 25

slide-30
SLIDE 30

Idea: Recompression

Difficulty: the words are long. Shorten them. d c a d

Deeper understanding

New production: d → ab. Building new SLP (recompression). SLP problems: hard, as SLP are different. Building canonical SLP for the instance. What to do with an? Replace each non-extendible an by a single symbol. a2 c a3

Problems

easy for text, what about grammar? what to do with the NFA?

Artur Jeż Compressed membership for NFA 7 September 2011 9 / 25

slide-31
SLIDE 31

Local decompression

Re-compression

decompressed text: easy; size: large, compressed text: hard; size: small.

Artur Jeż Compressed membership for NFA 7 September 2011 10 / 25

slide-32
SLIDE 32

Local decompression

Re-compression

decompressed text: easy; size: large, compressed text: hard; size: small.

Local decompression

Decompress locally the SLP: X → uYvZ u, v: blocks of letters, linear size Y , Z: nonterminals recompression inside u, v

Artur Jeż Compressed membership for NFA 7 September 2011 10 / 25

slide-33
SLIDE 33

Outline

Outline of the algorithm

while | word(Xn) > n| do LΣ ← list of letters, LP ← list of pairs for ab ∈ LP do compress pair ab, modify N accordingly for a ∈ LΣ do compress a non-extendible appearances, modify N accordingly Decompress the word and solve the problem naively.

Artur Jeż Compressed membership for NFA 7 September 2011 11 / 25

slide-34
SLIDE 34

Outline

Outline of the algorithm

while | word(Xn) > n| do LΣ ← list of letters, LP ← list of pairs for ab ∈ LP do compress pair ab, modify N accordingly for a ∈ LΣ do compress a non-extendible appearances, modify N accordingly Decompress the word and solve the problem naively.

Theorem

There are O(log word(Xn)) iterations.

Proof.

Consider two consecutive letters ab. One of them is compressed. So word shortens by a constant factor.

Artur Jeż Compressed membership for NFA 7 September 2011 11 / 25

slide-35
SLIDE 35

Formalisation

New symbols: letters.

Artur Jeż Compressed membership for NFA 7 September 2011 12 / 25

slide-36
SLIDE 36

Formalisation

New symbols: letters.

Grammar invariants

the set of nonterminals is {Xn, . . . , X1} (the input ones) the productions are of the form Xi → uXjvXk

  • r

Xi → uXjv

  • r

Xi → u, for Xi → uXjvXk, the input had a production Xi → XjXk

Artur Jeż Compressed membership for NFA 7 September 2011 12 / 25

slide-37
SLIDE 37

Formalisation

New symbols: letters.

Grammar invariants

the set of nonterminals is {Xn, . . . , X1} (the input ones) the productions are of the form Xi → uXjvXk

  • r

Xi → uXjv

  • r

Xi → u, for Xi → uXjvXk, the input had a production Xi → XjXk In this way the grammar does not blow up (the skeleton is the same).

Artur Jeż Compressed membership for NFA 7 September 2011 12 / 25

slide-38
SLIDE 38

NFA invariants

NFA cannot blow up either.

Artur Jeż Compressed membership for NFA 7 September 2011 13 / 25

slide-39
SLIDE 39

NFA invariants

NFA cannot blow up either.

NFA invariants

transitions of N: letter transitions labelled by a single letter nonterminal transition labelled by nonterminal nonterminal transition have counterparts in the input NFA

◮ the same nonterminal ◮ corresponding start and end ◮ the same multiplicity Artur Jeż Compressed membership for NFA 7 September 2011 13 / 25

slide-40
SLIDE 40

NFA invariants

NFA cannot blow up either.

NFA invariants

transitions of N: letter transitions labelled by a single letter nonterminal transition labelled by nonterminal nonterminal transition have counterparts in the input NFA

◮ the same nonterminal ◮ corresponding start and end ◮ the same multiplicity

The nonterminal part is ‘the same’ (of size n).

Artur Jeż Compressed membership for NFA 7 September 2011 13 / 25

slide-41
SLIDE 41

What is hard, what is easy

What is hard to compress, what easy?

Artur Jeż Compressed membership for NFA 7 September 2011 14 / 25

slide-42
SLIDE 42

What is hard, what is easy

What is hard to compress, what easy?

Hard

a letter a is outer, if it is the first or last letter of some word(Xi) a pair ab is crossing if

◮ Xi → uaXjvXk, where word(Xj) = b . . . ◮ ab spreads over transitions

at least one nonterminal a b

Artur Jeż Compressed membership for NFA 7 September 2011 14 / 25

slide-43
SLIDE 43

What is hard, what is easy

What is hard to compress, what easy?

Hard

a letter a is outer, if it is the first or last letter of some word(Xi) a pair ab is crossing if

◮ Xi → uaXjvXk, where word(Xj) = b . . . ◮ ab spreads over transitions

at least one nonterminal a b

Easy

a letter a is inner otherwise a pair ab is non-crossing otherwise

Artur Jeż Compressed membership for NFA 7 September 2011 14 / 25

slide-44
SLIDE 44

A little detailed outline

Detailed outline

while | word(Xn) > n| do while possible do for a: inner letter do compress appearances of a for non-crossing pair ab in word(Xn) do compress ab

Artur Jeż Compressed membership for NFA 7 September 2011 15 / 25

slide-45
SLIDE 45

A little detailed outline

Detailed outline

while | word(Xn) > n| do while possible do for a: inner letter do compress appearances of a for non-crossing pair ab in word(Xn) do compress ab L ← list of all outer letters for a ∈ L do compress appearances of a for each akb in word(Xn) do compress akb

Artur Jeż Compressed membership for NFA 7 September 2011 15 / 25

slide-46
SLIDE 46

A little detailed outline

Detailed outline

while | word(Xn) > n| do while possible do for a: inner letter do compress appearances of a for non-crossing pair ab in word(Xn) do compress ab L ← list of all outer letters for a ∈ L do compress appearances of a for each akb in word(Xn) do compress akb Decompress Xn and solve the problem naively.

Artur Jeż Compressed membership for NFA 7 September 2011 15 / 25

slide-47
SLIDE 47

Non-crossing pair compression

Non-crossing pair compression

for each production Xi → uXjvXk do replace each ab in u, v by c

Artur Jeż Compressed membership for NFA 7 September 2011 16 / 25

slide-48
SLIDE 48

Non-crossing pair compression

Non-crossing pair compression

for each production Xi → uXjvXk do replace each ab in u, v by c for states p, q do if δN(p, ab, q) then put a transition δN(p, c, q)

Artur Jeż Compressed membership for NFA 7 September 2011 16 / 25

slide-49
SLIDE 49

Non-crossing pair compression

Non-crossing pair compression

for each production Xi → uXjvXk do replace each ab in u, v by c for states p, q do if δN(p, ab, q) then put a transition δN(p, c, q)

a b c

Artur Jeż Compressed membership for NFA 7 September 2011 16 / 25

slide-50
SLIDE 50

Non-crossing pair compression

Non-crossing pair compression

for each production Xi → uXjvXk do replace each ab in u, v by c for states p, q do if δN(p, ab, q) then put a transition δN(p, c, q)

a b c

Lemma

It works.

Proof.

The pair is non-crossing: it always appears inside production.

Artur Jeż Compressed membership for NFA 7 September 2011 16 / 25

slide-51
SLIDE 51

Inner letter compression

Appearance compression for and inner letter a

compute the lengths ℓ1, . . . , ℓk of a’s non-extendible appearance for each aℓm do for each production Xi → uXjvXk do replace non-extendible aℓm in in u, v by aℓm

Artur Jeż Compressed membership for NFA 7 September 2011 17 / 25

slide-52
SLIDE 52

Inner letter compression

Appearance compression for and inner letter a

compute the lengths ℓ1, . . . , ℓk of a’s non-extendible appearance for each aℓm do for each production Xi → uXjvXk do replace non-extendible aℓm in in u, v by aℓm for states p, q in N do guess, whether δN(p, aℓm, q) if guess is positive then verify the guess put a transition δN′(p, aℓm, q)

Artur Jeż Compressed membership for NFA 7 September 2011 17 / 25

slide-53
SLIDE 53

Inner letter compression

Appearance compression for and inner letter a

compute the lengths ℓ1, . . . , ℓk of a’s non-extendible appearance for each aℓm do for each production Xi → uXjvXk do replace non-extendible aℓm in in u, v by aℓm for states p, q in N do guess, whether δN(p, aℓm, q) if guess is positive then verify the guess put a transition δN′(p, aℓm, q)

a a a a a a2 a

Artur Jeż Compressed membership for NFA 7 September 2011 17 / 25

slide-54
SLIDE 54

Inner letter compression

Appearance compression for and inner letter a

compute the lengths ℓ1, . . . , ℓk of a’s non-extendible appearance for each aℓm do for each production Xi → uXjvXk do replace non-extendible aℓm in in u, v by aℓm for states p, q in N do guess, whether δN(p, aℓm, q) if guess is positive then verify the guess put a transition δN′(p, aℓm, q)

a a a a a a2 a a4

Artur Jeż Compressed membership for NFA 7 September 2011 17 / 25

slide-55
SLIDE 55

Inner letter compression

Appearance compression for and inner letter a

compute the lengths ℓ1, . . . , ℓk of a’s non-extendible appearance for each aℓm do for each production Xi → uXjvXk do replace non-extendible aℓm in in u, v by aℓm for states p, q in N do guess, whether δN(p, aℓm, q) if guess is positive then verify the guess put a transition δN′(p, aℓm, q)

a a a a a a2 a a4

Lemma

It works. how many lengths: inner letter verification: Plandowski & Rytter result

Artur Jeż Compressed membership for NFA 7 September 2011 17 / 25

slide-56
SLIDE 56

Crossing pairs and outer letters

Lemma

O(n) outer letters and O(n2) crossing pairs appearing in word(Xn)

Artur Jeż Compressed membership for NFA 7 September 2011 18 / 25

slide-57
SLIDE 57

Crossing pairs and outer letters

Lemma

O(n) outer letters and O(n2) crossing pairs appearing in word(Xn)

Proof.

charge outer letter to the non-terminal

Artur Jeż Compressed membership for NFA 7 September 2011 18 / 25

slide-58
SLIDE 58

Crossing pairs and outer letters

Lemma

O(n) outer letters and O(n2) crossing pairs appearing in word(Xn)

Proof.

charge outer letter to the non-terminal pairs in word(Xn):

◮ appears is some explicit word uXjvXk, total size O(n2). ◮ spreads over u word(Xj),

charged to a production Xi → uXjvXk, total size O(n).

Artur Jeż Compressed membership for NFA 7 September 2011 18 / 25

slide-59
SLIDE 59

Convert hard to easy

Convert outer letters to inner, crossing pairs to non-crossing (Sequentially).

Artur Jeż Compressed membership for NFA 7 September 2011 19 / 25

slide-60
SLIDE 60

Convert hard to easy

Convert outer letters to inner, crossing pairs to non-crossing (Sequentially). fix an outer letter a convert it to inner compress a appearances make each pair of the form aℓb non-crossing compress each such pair

Artur Jeż Compressed membership for NFA 7 September 2011 19 / 25

slide-61
SLIDE 61

Turning a into an inner letter

Cut a-prefix and a-suffix from each nonterminal. Represent word(Xi) as aℓiwari, turn it into w.

◮ Xi → uXjvXk ◮ word(Xi) = u word(Xj)v word(Xk) Artur Jeż Compressed membership for NFA 7 September 2011 20 / 25

slide-62
SLIDE 62

Turning a into an inner letter

Cut a-prefix and a-suffix from each nonterminal. Represent word(Xi) as aℓiwari, turn it into w.

◮ Xi → uXjvXk ◮ word(Xi) = u word(Xj)v word(Xk)

Changing an outer letter a to an inner one

for i = 1 . . n do let Xi → uXjvXk replace Xi → uaℓjX ′

j arjvaℓkX ′ kark

calculate the a-prefix aℓi and a-suffix ari, remove them

Artur Jeż Compressed membership for NFA 7 September 2011 20 / 25

slide-63
SLIDE 63

Turning a into an inner letter

Cut a-prefix and a-suffix from each nonterminal. Represent word(Xi) as aℓiwari, turn it into w.

◮ Xi → uXjvXk ◮ word(Xi) = u word(Xj)v word(Xk)

Changing an outer letter a to an inner one

for i = 1 . . n do let Xi → uXjvXk replace Xi → uaℓjX ′

j arjvaℓkX ′ kark

calculate the a-prefix aℓi and a-suffix ari, remove them

Lemma

The algorithm makes a an inner letter.

Artur Jeż Compressed membership for NFA 7 September 2011 20 / 25

slide-64
SLIDE 64

Adjusting the NFA

Adjust the transitions δ(p, Xi, q)

Xi Xi aℓi ari

Artur Jeż Compressed membership for NFA 7 September 2011 21 / 25

slide-65
SLIDE 65

Adjusting the NFA

Adjust the transitions δ(p, Xi, q)

Xi Xi aℓi ari

Lemma

This adjusts the NFA properly.

Artur Jeż Compressed membership for NFA 7 September 2011 21 / 25

slide-66
SLIDE 66

Adjusting the NFA

Adjust the transitions δ(p, Xi, q)

Xi Xi aℓi ari

Lemma

This adjusts the NFA properly.

aℓ

aℓ in NFA and grammar.

Artur Jeż Compressed membership for NFA 7 September 2011 21 / 25

slide-67
SLIDE 67

Adjusting the NFA

Adjust the transitions δ(p, Xi, q)

Xi Xi aℓi ari

Lemma

This adjusts the NFA properly.

aℓ

aℓ in NFA and grammar.

Appearance compression

guess and verify, whether δN(p, aℓ, q) by Plandowski & Rytter result (unary case in NP)

Artur Jeż Compressed membership for NFA 7 September 2011 21 / 25

slide-68
SLIDE 68

Crossing to non-crossing

Turn pairs aℓb into non-crossing.

Artur Jeż Compressed membership for NFA 7 September 2011 22 / 25

slide-69
SLIDE 69

Crossing to non-crossing

Turn pairs aℓb into non-crossing. aℓ is inner ‘pop’ first letter of each non-terminal replace: word(Xi) = bu → word(Xi) = u

a b Xi

Artur Jeż Compressed membership for NFA 7 September 2011 22 / 25

slide-70
SLIDE 70

Crossing to non-crossing

Turn pairs aℓb into non-crossing. aℓ is inner ‘pop’ first letter of each non-terminal replace: word(Xi) = bu → word(Xi) = u

a b Xi

Lemma

After popping letters, no pair aℓb is crossing.

Proof.

Easy, but goes into details.

Artur Jeż Compressed membership for NFA 7 September 2011 22 / 25

slide-71
SLIDE 71

Sizes and running time

Running time

All algorithms run in time npoly(n, |G|, |Σ|, |N|).

Artur Jeż Compressed membership for NFA 7 September 2011 23 / 25

slide-72
SLIDE 72

Sizes and running time

Running time

All algorithms run in time npoly(n, |G|, |Σ|, |N|).

Size of G

abbbcceaXjaddfeaaf Xk In each iteration

Artur Jeż Compressed membership for NFA 7 September 2011 23 / 25

slide-73
SLIDE 73

Sizes and running time

Running time

All algorithms run in time npoly(n, |G|, |Σ|, |N|).

Size of G

abbbcceabhaXjabaddfeaaf cdaXk In each iteration O(n) new letters

Artur Jeż Compressed membership for NFA 7 September 2011 23 / 25

slide-74
SLIDE 74

Sizes and running time

Running time

All algorithms run in time npoly(n, |G|, |Σ|, |N|).

Size of G

abbbcceabhaXjabaddfeaaf cdaXk In each iteration O(n) new letters shrinking by a constant factor

Artur Jeż Compressed membership for NFA 7 September 2011 23 / 25

slide-75
SLIDE 75

Sizes and running time

Running time

All algorithms run in time npoly(n, |G|, |Σ|, |N|).

Size of G

uvbhaXjabxyzcdaXk In each iteration O(n) new letters shrinking by a constant factor

Artur Jeż Compressed membership for NFA 7 September 2011 23 / 25

slide-76
SLIDE 76

Sizes and running time

Running time

All algorithms run in time npoly(n, |G|, |Σ|, |N|).

Size of G

uvbhaXjabxyzcdaXk In each iteration O(n) new letters shrinking by a constant factor

New letters (|Σ|)

noncrossing pairs, inner letters appearance compression (shrinks |G|)

  • uter letters and crossing pairs:

there are O(n) outer letters and O(n2) pairs in word(Xn)

Artur Jeż Compressed membership for NFA 7 September 2011 23 / 25

slide-77
SLIDE 77

Proof end

NFA size

size O(|Q| · |Σ| + n) new states: replacing nonterminal transitions by chains, (for outer letters, poly(n))

Artur Jeż Compressed membership for NFA 7 September 2011 24 / 25

slide-78
SLIDE 78

Proof end

NFA size

size O(|Q| · |Σ| + n) new states: replacing nonterminal transitions by chains, (for outer letters, poly(n)) And this is it.

Artur Jeż Compressed membership for NFA 7 September 2011 24 / 25

slide-79
SLIDE 79

DFA

DFA vs NFA

Non-determinism: guessing and verifying transitions δ(p, aℓ, q). for DFA: easy

  • perations preserve determinism of DFA

Artur Jeż Compressed membership for NFA 7 September 2011 25 / 25