Extracting semi-Dyck words from fsa using the CYK algorithm Thomas Ruprecht November 30, 2018
Outline Motivation Finding appropriate restrictions CYK algorithm for extraction of semi-Dyck words
βΆ goal: extract semi-Dyck words from reg. language π β© β β1 (π₯) βΆ ChoSchΓΌ parsing [Hul11]: βΆ def. of π and πΈ using grammar imply βΆ bijection between π β© πΈ and derivation trees βΆ bijection between π β© πΈ β© β β1 (π₯) and derivation trees for π₯ Motivation: Chomsky-SchΓΌtzenberger parsing such that π = β(π β© πΈ) βΆ ChoSchΓΌ theorem [CS63]: decompose context-free language into βΆ reg. language π βΆ alph. string homomorphism β βΆ semi-Dyck language D
βΆ goal: extract semi-Dyck words from reg. language π β© β β1 (π₯) Motivation: Chomsky-SchΓΌtzenberger parsing such that π = β(π β© πΈ) βΆ ChoSchΓΌ theorem [CS63]: decompose context-free language into βΆ reg. language π βΆ alph. string homomorphism β βΆ semi-Dyck language D βΆ ChoSchΓΌ parsing [Hul11]: βΆ def. of π and πΈ using grammar imply βΆ bijection between π β© πΈ and derivation trees βΆ bijection between π β© πΈ β© β β1 (π₯) and derivation trees for π₯
Motivation: Chomsky-SchΓΌtzenberger parsing such that π = β(π β© πΈ) βΆ ChoSchΓΌ theorem [CS63]: decompose context-free language into βΆ reg. language π βΆ alph. string homomorphism β βΆ semi-Dyck language D βΆ ChoSchΓΌ parsing [Hul11]: βΆ def. of π and πΈ using grammar imply βΆ bijection between π β© πΈ and derivation trees βΆ bijection between π β© πΈ β© β β1 (π₯) and derivation trees for π₯ βΆ goal: extract semi-Dyck words from reg. language π β© β β1 (π₯)
βΆ relies on recursive structure of Dyck words: concatenation and bracketing βΆ dynamic programming: store intermediate results (backlinks) for state βΆ backlinks are equivalent to reduct grammar [BPS61] if (π, π) = (π init , π fjn ) then yield π€ π΅ βͺ= {(π, ππ€π, π ) β£ (π, π, π), (π, π, π ) β π} β π· 8: π΅ βͺ= {(π, π£π€, π) β£ (π, π£, π) β π·} β π· 7: π΅ βͺ= {(π, π€π₯, π ) β£ (π, π₯, π ) β π·} β π· 6: Motivation: existing algorithm to extract Dyck words [Hul11] Require: fjnite state automaton π = (π , π΅ βͺ π΅, π init , π fjn , π) π΅ β= {(π, π€, π)}; π· βͺ= {(π, π€, π)} 4: for (π, π€, π) β π΅ do 3: π΅, π· βΆ= {π€ β£ (π, π, π), (π, π, π ) β π}, β 2: 1: procedure extractDyck ( π ) Ensure: enumerate words in L (π) β© D (π΅) 5:
βΆ dynamic programming: store intermediate results (backlinks) for state βΆ backlinks are equivalent to reduct grammar [BPS61] if (π, π) = (π init , π fjn ) then yield π€ π΅ βͺ= {(π, ππ€π, π ) β£ (π, π, π), (π, π, π ) β π} β π· 8: π΅ βͺ= {(π, π£π€, π) β£ (π, π£, π) β π·} β π· 7: π΅ βͺ= {(π, π€π₯, π ) β£ (π, π₯, π ) β π·} β π· 6: Motivation: existing algorithm to extract Dyck words [Hul11] Require: fjnite state automaton π = (π , π΅ βͺ π΅, π init , π fjn , π) π΅ β= {(π, π€, π)}; π· βͺ= {(π, π€, π)} 4: for (π, π€, π) β π΅ do 3: π΅, π· βΆ= {π€ β£ (π, π, π), (π, π, π ) β π}, β 2: 1: procedure extractDyck ( π ) Ensure: enumerate words in L (π) β© D (π΅) 5: βΆ relies on recursive structure of Dyck words: concatenation and bracketing
βΆ backlinks are equivalent to reduct grammar [BPS61] Require: fjnite state automaton π = (π , π΅ βͺ π΅, π init , π fjn , π) π΅ βͺ= {(π, ππ€π, π ) β£ (π, π, π), (π, π, π ) β π} β π· 8: π΅ βͺ= {(π, π£π€, π) β£ (π, π£, π) β π·} β π· 7: π΅ βͺ= {(π, π€π₯, π ) β£ (π, π₯, π ) β π·} β π· 6: if (π, π) = (π init , π fjn ) then yield π€ Motivation: existing algorithm to extract Dyck words [Hul11] π΅ β= {(π, π€, π)}; π· βͺ= {(π, π€, π)} 4: for (π, π€, π) β π΅ do 3: π΅, π· βΆ= {π€ β£ (π, π, π), (π, π, π ) β π}, β 2: 1: procedure extractDyck ( π ) Ensure: enumerate words in L (π) β© D (π΅) 5: βΆ relies on recursive structure of Dyck words: concatenation and bracketing βΆ dynamic programming: store intermediate results (backlinks) for state
Motivation: existing algorithm to extract Dyck words [Hul11] Require: fjnite state automaton π = (π , π΅ βͺ π΅, π init , π fjn , π) π΅ βͺ= {(π, ππ€π, π ) β£ (π, π, π), (π, π, π ) β π} β π· 8: π΅ βͺ= {(π, π£π€, π) β£ (π, π£, π) β π·} β π· 7: π΅ βͺ= {(π, π€π₯, π ) β£ (π, π₯, π ) β π·} β π· 6: if (π, π) = (π init , π fjn ) then yield π€ 5: π΅ β= {(π, π€, π)}; π· βͺ= {(π, π€, π)} 4: for (π, π€, π) β π΅ do 3: π΅, π· βΆ= {π€ β£ (π, π, π), (π, π, π ) β π}, β 2: 1: procedure extractDyck ( π ) Ensure: enumerate words in L (π) β© D (π΅) βΆ relies on recursive structure of Dyck words: concatenation and bracketing βΆ dynamic programming: store intermediate results (backlinks) for state βΆ backlinks are equivalent to reduct grammar [BPS61]
Outline Motivation Finding appropriate restrictions CYK algorithm for extraction of semi-Dyck words
βΆ π -centered semi-Dyck word o.t.f. π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π where β β π΅ β βΆ π₯ π β π΅ βΆ π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π β D (π΅) βΆ C (π΅, π) β D (π΅) βΆ C (π΅, β€π) = β π β² β€π C (π΅, π β² ) βΆ C (π΅, β€β) = β π β² ββ C (π΅, π β² ) = D (π΅) π -centered semi-Dyck languages [()]{([ ]β¦{}β§)} is 3 -centered βΆ example
βΆ π -centered semi-Dyck word o.t.f. π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π where β β π΅ β βΆ π₯ π β π΅ βΆ π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π β D (π΅) βΆ C (π΅, π) β D (π΅) βΆ C (π΅, β€π) = β π β² β€π C (π΅, π β² ) βΆ C (π΅, β€β) = β π β² ββ C (π΅, π β² ) = D (π΅) π -centered semi-Dyck languages [()]{([ ]β¦{}β§)} is 3 -centered βΆ example
βΆ π -centered semi-Dyck word o.t.f. π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π where β β π΅ β βΆ π₯ π β π΅ βΆ π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π β D (π΅) βΆ C (π΅, π) β D (π΅) βΆ C (π΅, β€π) = β π β² β€π C (π΅, π β² ) βΆ C (π΅, β€β) = β π β² ββ C (π΅, π β² ) = D (π΅) π -centered semi-Dyck languages [()]{([ ]β¦{}β§)} is 3 -centered βΆ example
βΆ π -centered semi-Dyck word o.t.f. π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π where β β π΅ β βΆ π₯ π β π΅ βΆ π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π β D (π΅) βΆ C (π΅, π) β D (π΅) βΆ C (π΅, β€π) = β π β² β€π C (π΅, π β² ) βΆ C (π΅, β€β) = β π β² ββ C (π΅, π β² ) = D (π΅) π -centered semi-Dyck languages [()]{([ ]β¦{}β§)} is 3 -centered βΆ example
βΆ π -centered semi-Dyck word o.t.f. π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π where β β π΅ β βΆ π₯ π β π΅ βΆ π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π β D (π΅) βΆ C (π΅, π) β D (π΅) βΆ C (π΅, β€π) = β π β² β€π C (π΅, π β² ) βΆ C (π΅, β€β) = β π β² ββ C (π΅, π β² ) = D (π΅) π -centered semi-Dyck languages [()]{([ ]β¦{}β§)} is 3 -centered βΆ example
βΆ π -centered semi-Dyck word o.t.f. π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π where β β π΅ β βΆ π₯ π β π΅ βΆ π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π β D (π΅) βΆ C (π΅, π) β D (π΅) βΆ C (π΅, β€π) = β π β² β€π C (π΅, π β² ) βΆ C (π΅, β€β) = β π β² ββ C (π΅, π β² ) = D (π΅) π -centered semi-Dyck languages [()]{([ ]β¦{}β§)} is 3 -centered βΆ example
βΆ C (π΅, π) β D (π΅) βΆ C (π΅, β€π) = β π β² β€π C (π΅, π β² ) βΆ C (π΅, β€β) = β π β² ββ C (π΅, π β² ) = D (π΅) π -centered semi-Dyck languages [()]{([ ]β¦{}β§)} is 3 -centered βΆ example βΆ π -centered semi-Dyck word o.t.f. π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π where β β π΅ β βΆ π₯ π β π΅ βΆ π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π β D (π΅)
βΆ C (π΅, β€π) = β π β² β€π C (π΅, π β² ) βΆ C (π΅, β€β) = β π β² ββ C (π΅, π β² ) = D (π΅) π -centered semi-Dyck languages [()]{([ ]β¦{}β§)} is 3 -centered βΆ example βΆ π -centered semi-Dyck word o.t.f. π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π where β β π΅ β βΆ π₯ π β π΅ βΆ π₯ 0 ( 1 ) 1 π₯ 1 β¦( π ) π π₯ π β D (π΅) βΆ C (π΅, π) β D (π΅)
Recommend
More recommend