O(1)upper bound for monoids
Theorem
The dynamic word problem forcommutative monoidsis inO(1) Algorithm:
• Countthe numbernmof occurrences of each elementmofMinw
• Maintainthe countsnm under updates
• Evaluatethe product asQ
m∈MmnminO(1)
Lemma (Closure under monoid variety operations)
Thesubmonoids,direct products,quotientsof tractable monoids are also tractable
O(1)upper bound for monoids
Theorem
The dynamic word problem forcommutative monoidsis inO(1) Algorithm:
• Countthe numbernmof occurrences of each elementmofMinw
• Maintainthe countsnm under updates
• Evaluatethe product asQ
m∈MmnminO(1) Lemma (Closure under monoid variety operations)
Thesubmonoids,direct products,quotientsof tractable monoids are also tractable
9/18
O(1)upper bound for monoids (cont’d)
Theorem
The monoidsS1where we add an identity to anilpotent semigroupSare inO(1) Idea of the proof:considere∗ae∗be∗
• Preprocessing: prepare adoubly-linked listLof the positions containinga’s andb’s
• Maintainthe (unsorted) list whena’s andb’s are added/removed
• Evaluation:
• If there are not exactly two positions inL, answerno
• Otherwise, check that thesmallest positionof these two is anaand thelargest is ab
This technique applies to monoids where we intuitively need to tracka constant number of non-neutral elements
O(1)upper bound for monoids (cont’d)
Theorem
The monoidsS1where we add an identity to anilpotent semigroupSare inO(1) Idea of the proof:considere∗ae∗be∗
• Preprocessing: prepare adoubly-linked listLof the positions containinga’s andb’s
• Maintainthe (unsorted) list whena’s andb’s are added/removed
• Evaluation:
• If there are not exactly two positions inL, answerno
• Otherwise, check that thesmallest positionof these two is anaand thelargest is ab
This technique applies to monoids where we intuitively need to tracka constant number of non-neutral elements
10/18
O(1)upper bound for monoids (cont’d)
Theorem
The monoidsS1where we add an identity to anilpotent semigroupSare inO(1) Idea of the proof:considere∗ae∗be∗
• Preprocessing: prepare adoubly-linked listLof the positions containinga’s andb’s
• Maintainthe (unsorted) list whena’s andb’s are added/removed
• Evaluation:
• If there are not exactly two positions inL, answerno
• Otherwise, check that thesmallest positionof these two is anaand thelargest is ab
This technique applies to monoids where we intuitively need to tracka constant number of non-neutral elements
O(1)upper bound for monoids (end)
CallZGthe variety of monoids satisfyingxω+1y=yxω+1 for allx,y
→ Elements of the formxω+1are those belonging to asubgroupof the monoid
→ This includes in particular allidempotents(xx=x)
→ Thexω+1 arecentral: they commute with all other elements
Lemma
ZGis exactly the monoids obtainable fromcommutative monoidsandmonoids of the form S1 for a nilpotent semigroupSvia themonoid variety operators
Theorem
The dynamic word problem for monoids inZGisin O(1)
11/18
O(1)upper bound for monoids (end)
CallZGthe variety of monoids satisfyingxω+1y=yxω+1 for allx,y
→ Elements of the formxω+1are those belonging to asubgroupof the monoid
→ This includes in particular allidempotents(xx=x)
→ Thexω+1 arecentral: they commute with all other elements Lemma
ZGis exactly the monoids obtainable fromcommutative monoidsandmonoids of the form S1 for a nilpotent semigroupSvia themonoid variety operators
Theorem
The dynamic word problem for monoids inZGisin O(1)
O(log logn)upper bound for monoids
CallSGthe variety of monoids satisfyingxω+1yxω=xωyxω+1for allx,y
→ Intuition:we canswapthe elements of any given subgroup of the monoid Examples:
• AllZGmonoids(where elementsxω+1 commute with everything)
• Allgroup-free monoids(where subgroups are trivial)
• ProductsofZGmonoids and group-free monoids
Theorem
The dynamic word problem for monoids inSGis inO(log logn)
Tools:induction onJ-classes, Rees-Sushkevich theorem, Van Emde Boas trees
12/18
O(log logn)upper bound for monoids
CallSGthe variety of monoids satisfyingxω+1yxω=xωyxω+1for allx,y
→ Intuition:we canswapthe elements of any given subgroup of the monoid Examples:
• AllZGmonoids(where elementsxω+1 commute with everything)
• Allgroup-free monoids(where subgroups are trivial)
• ProductsofZGmonoids and group-free monoids Theorem
The dynamic word problem for monoids inSGis inO(log logn)
Tools:induction onJ-classes, Rees-Sushkevich theorem, Van Emde Boas trees
Lower bounds
All lower bounds reduce from theprefix problemfor some languageL:
• Maintain a word undersubstitution updates
• Answer queries asking if agiven prefixof the current word is inL
Specifically:
• Prefix-Zd: forΣ ={0, . . . ,d−1}, does the input prefixsum to 0 modulod?
→ Knownlower boundofΩ(logn/log logn)
• Prefix-U1:forΣ ={0,1}, does the queried prefixcontain a 0?
→ Weconjecturethat this cannot be done inO(1) Theorem (Lower bounds on a monoidM)
• IfMisnot inSG, then for somed∈NthePrefix-Zdproblem reduces to the dynamic word problem forM
• IfMisinSG\ZG, thenPrefix-U1reduces to the dynamic word problem forM
13/18
Lower bounds
All lower bounds reduce from theprefix problemfor some languageL:
• Maintain a word undersubstitution updates
• Answer queries asking if agiven prefixof the current word is inL Specifically:
• Prefix-Zd: forΣ ={0, . . . ,d−1}, does the input prefixsum to 0 modulod?
→ Knownlower boundofΩ(logn/log logn)
• Prefix-U1:forΣ ={0,1}, does the queried prefixcontain a 0?
→ Weconjecturethat this cannot be done inO(1)
Theorem (Lower bounds on a monoidM)
• IfMisnot inSG, then for somed∈NthePrefix-Zdproblem reduces to the dynamic word problem forM
• IfMisinSG\ZG, thenPrefix-U1reduces to the dynamic word problem forM
Lower bounds
All lower bounds reduce from theprefix problemfor some languageL:
• Maintain a word undersubstitution updates
• Answer queries asking if agiven prefixof the current word is inL Specifically:
• Prefix-Zd: forΣ ={0, . . . ,d−1}, does the input prefixsum to 0 modulod?
→ Knownlower boundofΩ(logn/log logn)
• Prefix-U1:forΣ ={0,1}, does the queried prefixcontain a 0?
→ Weconjecturethat this cannot be done inO(1) Theorem (Lower bounds on a monoidM)
• IfMisnot inSG, then for somed∈NthePrefix-Zdproblem reduces to the dynamic word problem forM
• IfMisinSG\ZG, thenPrefix-U1reduces to the dynamic word problem forM
13/18