• Aucun résultat trouvé

Dynamic Membership for Regular Languages

N/A
N/A
Protected

Academic year: 2022

Partager "Dynamic Membership for Regular Languages"

Copied!
20
0
0

Texte intégral

(1)

Dynamic Membership for Regular Languages

Antoine Amarilli1, Louis Jachiet1, Charles Paperman2 July14141414141414141414,14141414141414 2021

1T ´el ´ecom Paris

2Universit ´e de Lille

(2)

Problem: dynamic membership for regular languages

• Fix a regular language L

→ E.g.,L= (ab)

• Read an input word w with n :=

|w|

→ E.g.,w=abbbab

• Preprocess it in O(n)

→ E.g., we havew∈/L

• Maintain the membership of w to L under substitution updates

→ E.g., replace character at position 3 witha: we now havewL

• Model: RAM model with Θ(log n) cell size and unit-cost arithmetics

(3)

Problem: dynamic membership for regular languages

• Fix a regular language L

→ E.g.,L= (ab)

• Read an input word w with n :=

|w|

→ E.g.,w=abbbab

• Preprocess it in O(n)

→ E.g., we havew∈/L

• Maintain the membership of w to L under substitution updates

→ E.g., replace character at position 3 witha: we now havewL

• Model: RAM model with Θ(log n) cell size and unit-cost arithmetics

(4)

Problem: dynamic membership for regular languages

• Fix a regular language L

→ E.g.,L= (ab)

• Read an input word w with n :=

|w|

→ E.g.,w=abbbab

• Preprocess it in O(n)

→ E.g., we havew∈/ L

• Maintain the membership of w to L under substitution updates

→ E.g., replace character at position 3 witha: we now havewL

• Model: RAM model with Θ(log n) cell size and unit-cost arithmetics

(5)

Problem: dynamic membership for regular languages

• Fix a regular language L

→ E.g.,L= (ab)

• Read an input word w with n :=

|w|

→ E.g.,w=abbbab

• Preprocess it in O(n)

→ E.g., we havew∈/ L

• Maintain the membership of w to L under substitution updates

→ E.g., replace character at position 3 witha: we now havewL

• Model: RAM model with Θ(log n) cell size and unit-cost arithmetics

(6)

Problem: dynamic membership for regular languages

• Fix a regular language L

→ E.g.,L= (ab)

• Read an input word w with n :=

|w|

→ E.g.,w=abbbab

• Preprocess it in O(n)

→ E.g., we havew∈/ L

• Maintain the membership of w to L under substitution updates

→ E.g., replace character at position 3 witha: we now havewL

• Model: RAM model with Θ(log n) cell size and unit-cost arithmetics

(7)

What is the complexity of the problem?

• Naive algorithm in

O(n):

test the whole word again after each update

• General-purpose algorithm in

O(logn):

• Build acomplete binary treeon the input word

• Label the nodes with thesyntactic monoid element achieved by the subtree rooted at that node

• When updating a leaf,recomputelabels upwards

→ Can be improved toO(logn/log logn)via RAM tricks

a b b b a b

• • •

• •

• Specific

O(1)

algorithm for some languages:

→ E.g., the languagea: count the number ofa’s

→ E.g., the language(ab)can also be maintained inO(1)

What is the complexity of dynamic membership , depending on the language?

(8)

What is the complexity of the problem?

• Naive algorithm in

O(n):

test the whole word again after each update

• General-purpose algorithm in

O(logn):

• Build acomplete binary treeon the input word

• Label the nodes with thesyntactic monoid element achieved by the subtree rooted at that node

• When updating a leaf,recomputelabels upwards

→ Can be improved toO(logn/log logn)via RAM tricks

a b b b a b

• • •

• •

• Specific

O(1)

algorithm for some languages:

→ E.g., the languagea: count the number ofa’s

→ E.g., the language(ab)can also be maintained inO(1)

What is the complexity of dynamic membership , depending on the language?

(9)

What is the complexity of the problem?

• Naive algorithm in

O(n):

test the whole word again after each update

• General-purpose algorithm in

O(logn):

• Build acomplete binary treeon the input word

• Label the nodes with thesyntactic monoid element achieved by the subtree rooted at that node

• When updating a leaf,recomputelabels upwards

→ Can be improved toO(logn/log logn)via RAM tricks

a b b b a b

• • •

• •

• Specific

O(1)

algorithm for some languages:

→ E.g., the languagea: count the number ofa’s

→ E.g., the language(ab)can also be maintained inO(1)

What is the complexity of dynamic membership , depending on the language?

(10)

What is the complexity of the problem?

• Naive algorithm in

O(n):

test the whole word again after each update

• General-purpose algorithm in

O(logn):

• Build acomplete binary treeon the input word

• Label the nodes with thesyntactic monoid element achieved by the subtree rooted at that node

• When updating a leaf,recomputelabels upwards

→ Can be improved toO(logn/log logn)via RAM tricks

a b b b a b

• • •

• •

• Specific

O(1)

algorithm for some languages:

→ E.g., the languagea: count the number ofa’s

→ E.g., the language(ab)can also be maintained inO(1)

What is the complexity of dynamic membership , depending on the language?

(11)

Problem 2: Dynamic word problem for monoids

• Dynamic word problem for a fixed monoid M : maintain the product of a word of elements of M under substitution updates

• This is a special case of dynamic membership for regular languages

• E.g., it assumes that there is aneutral element

• Partial results in [Skovbjerg Frandsen et al., 1997]:

→ inO(1)forcommutative monoids

→ inO(log logn)forgroup-free monoids

→ inΘ(logn/log logn)for a certain monoid class

(12)

Problem 2: Dynamic word problem for monoids

• Dynamic word problem for a fixed monoid M : maintain the product of a word of elements of M under substitution updates

• This is a special case of dynamic membership for regular languages

• E.g., it assumes that there is aneutral element

• Partial results in [Skovbjerg Frandsen et al., 1997]:

→ inO(1)forcommutative monoids

→ inO(log logn)forgroup-free monoids

→ inΘ(logn/log logn)for a certain monoid class

(13)

Problem 2: Dynamic word problem for monoids

• Dynamic word problem for a fixed monoid M : maintain the product of a word of elements of M under substitution updates

• This is a special case of dynamic membership for regular languages

• E.g., it assumes that there is aneutral element

• Partial results in [Skovbjerg Frandsen et al., 1997]:

→ inO(1)forcommutative monoids

→ inO(log logn)forgroup-free monoids

→ inΘ(logn/log logn)for a certain monoid class

(14)

Results (1/2): dynamic word problem for monoids

ZG

: in O(1)

not in O(1) ?

• We identify the class

ZG

satisfying x

ω+1

y = yx

ω+1

:

• For any monoidinZG, the problem isinO(1)

• For any monoidnot inZG, we can reduce from a problem that weconjecture is not inO(1)

• We identify the class

SG

satisfying x

ω+1

yx

ω

= x

ω

yx

ω+1

• For any monoidinSG, the problem isinO(log logn)

• For any monoidnot inSG, it isinΩ(logn/log logn) (lower bound of Skovbjerg Frandsen et al.)

(15)

Results (1/2): dynamic word problem for monoids

ZG

: in O(1)

SG

: in O(log log n) not in O(1) ?

All

: in Θ(log n/ log log n)

• We identify the class

ZG

satisfying x

ω+1

y = yx

ω+1

:

• For any monoidinZG, the problem isinO(1)

• For any monoidnot inZG, we can reduce from a problem that weconjecture is not inO(1)

• We identify the class

SG

satisfying x

ω+1

yx

ω

= x

ω

yx

ω+1

• For any monoidinSG, the problem isinO(log logn)

• For any monoidnot inSG, it isinΩ(logn/log logn) (lower bound of Skovbjerg Frandsen et al.)

(16)

Results (2/2): dynamic membership for regular languages

QLZG

: in O(1)

QSG

: in O(log log n) not in O(1) ?

All

: in Θ(log n/ log log n)

• Our results extend to regular language classes called

QLZG

and

QSG

Qmeans: thestable semigroupof the language

Lmeans: “all submonoids of this semigroup”

This yields a conditional trichotomy on the dynamic membership problem

Open problems:

• Make itunconditional?

• Identifyintermediate casesbetweenQLZGandQSG?

Thanks for your attention!

(17)

Results (2/2): dynamic membership for regular languages

QLZG

: in O(1)

QSG

: in O(log log n) not in O(1) ?

All

: in Θ(log n/ log log n)

• Our results extend to regular language classes called

QLZG

and

QSG

Qmeans: thestable semigroupof the language

Lmeans: “all submonoids of this semigroup”

This yields a conditional trichotomy on the dynamic membership problem

Open problems:

• Make itunconditional?

• Identifyintermediate casesbetweenQLZGandQSG?

Thanks for your attention!

(18)

Results (2/2): dynamic membership for regular languages

QLZG

: in O(1)

QSG

: in O(log log n) not in O(1) ?

All

: in Θ(log n/ log log n)

• Our results extend to regular language classes called

QLZG

and

QSG

Qmeans: thestable semigroupof the language

Lmeans: “all submonoids of this semigroup”

This yields a conditional trichotomy on the dynamic membership problem

Open problems:

• Make itunconditional?

• Identifyintermediate casesbetweenQLZGandQSG?

Thanks for your attention!

(19)

Results (2/2): dynamic membership for regular languages

QLZG

: in O(1)

QSG

: in O(log log n) not in O(1) ?

All

: in Θ(log n/ log log n)

• Our results extend to regular language classes called

QLZG

and

QSG

Qmeans: thestable semigroupof the language

Lmeans: “all submonoids of this semigroup”

This yields a conditional trichotomy on the dynamic membership problem

Open problems:

• Make itunconditional?

• Identifyintermediate casesbetweenQLZGandQSG?

(20)

References

Fredman, M. and Saks, M. (1989).

The cell probe complexity of dynamic data structures.

InSTOC, pages 345–354.

Patrascu, M. (2008).

Lower bound techniques for data structures.

PhD thesis, Massachusetts Institute of Technology.

Skovbjerg Frandsen, G., Miltersen, P. B., and Skyum, S. (1997).

Dynamic word problems.

JACM, 44(2):257–271.

Références

Documents relatifs

The GVCP consists in finding the minimum number of colors (or equivalently the minimum number of subsets), called chromatic number χ(G), required to color (or equivalently to

This paper derives lower bounds for the mean square errors of pa- rameter estimators in the case of Poisson distributed data subjected to multiple abrupt changes.. Since both

Specifically, the thesis explicitly recognises that any test of the APT is a joint hypothesis between the properties of the APT and first, the structure of the return

[r]

Example 1.1. Recall that languages of unranked trees can be specified by means of DTDs, that is, by sets of rules of the form a → L a , where L a is a regular language describing

Since the results (see Chapter 3) suggested that ILK protein is involved in regulation of trophoblast migration and the pattern of expression in human placenta

Most of the lowest energy emission can travel across the atmosphere reaching the ground (see Figure 2.1). However, this is not the case for the gamma rays, whose interaction with

Réversible automata form a natural class of automata with links to artificial intelligence [1], and to biprefix codes [4], Moreover réversible automata are used to study