Upload
penelope-richard
View
222
Download
0
Embed Size (px)
Citation preview
Solving Systems of Equations over Finite Semigroups:a Case Study for CSPs
Pascal TessonUniversité Laval (Quebec City)
P.Tesson Systems of eqns over finite semigroups & CSPs 2
Outline
1. Decision problem2. Using semigroups to define new
classes of tractable problems3. Counting the number of solutions
P.Tesson Systems of eqns over finite semigroups & CSPs 3
Systems of equations over finite semigroups
Fix a semigroup S. Consider CSPs defined as a system of equations over S.
xs = s
xt = t
x1 xs = y1
y1 x2 = y2
xt x3 = y2
x3 x4 = y3
x3 x1 = y3
x3 xs = y4
xs x2 = y4
x1 s x2 = t x3
x3 x4 = x3 x1
x3 s = s x2
P.Tesson Systems of eqns over finite semigroups & CSPs 4
Fix a semigroup S. Consider CSPs defined as a system of equations over S.
• EQN*S: problem of deciding if a system over S has a solution.
• EQN*S is equivalent to CSP(ES) where ES contains the unary relations {s} for s S and the ternary relation
R = {(x,y,z): xy = z}.
• Obviously, the complexity of EQN*S depends on the structure of S. Can we prove a dichotomy?
Systems of equations over finite semigroups
P.Tesson Systems of eqns over finite semigroups & CSPs 5
Theorem: [Klíma, T., Thérien]If M is a finite monoid then EQN*M is tractable if M is commutative and every element of M generates a subgroup. Otherwise, EQN*M is NP-complete.
Alternatively, EQN*M is tractable iff M is a factor of the direct product of a semilattice with an abelian group.
Dichotomy for EQN* over monoids
P.Tesson Systems of eqns over finite semigroups & CSPs 6
Connection with the dual algebra
Lemma: [Larose, Zádori] [Nordh, Jonsson]Let S be a semigroup. Then f: Sk S is apolymorphism of ES iff 1. f is idempotent
f(x, ..., x) = x2. f commutes with S
f(x1y1, ..., xkyk) = f(x1, ..., xk) f(y1, ..., yk)
Def’n: The dual algebra D(S) of S consists of idempotent operations commuting with S.
Pf: Idempotency necessary and sufficient for being polymorphism of x = s for all s S.Commuting with S necessary and sufficient for being polymorphism of xy = z.
P.Tesson Systems of eqns over finite semigroups & CSPs 7
Connection with the dual algebra
f is a polymorphism of xy = z iff
x1 y1 = z1
=
xk yk = zk
f ff
iff f commutes with s.
f(x1, ...,xk) f(y1,...,yk) = f(z1,...,zk) = f(x1y1,...,xkyk)
P.Tesson Systems of eqns over finite semigroups & CSPs 8
A sufficient criterion for hardness
Theorem: [Bulatov, Krokhin, Jeavons]If Pol() contains no Taylor term then CSP() is
NP-complete.
t: Sk S is a Taylor term if for each i {1,...,k} it satisfies an identity in {x,y}
t(a1, ..., ai-1, x, ai+1, ..., ak) = t(b1, ..., bi-1, y, bi+1, ..., bk)
with ar, br {x,y}.
P.Tesson Systems of eqns over finite semigroups & CSPs 9
EQN* is hard for non-commutative monoids
Theorem: [Bulatov, Krokhin, Jeavons]If Pol() contains no Taylor term then CSP() is
NP-complete.
Lemma: [Larose, Zádori ‘06]If a monoid M commutes with an idempotent
Taylor term then M is commutative.
Corollary: [Klíma, T., Thérien 05]If M is a non-commutative monoid then EQN*M
is NP-complete.
P.Tesson Systems of eqns over finite semigroups & CSPs 10
Pf by example. Suppose f is 4-ary such that f(x,y,y,x) = f(x,x,x,y) and f(y,x,y,x) = f(x,x,y,y).
Now, for any a,b M:
= f(a,a,a,a) f(b,b,b,b) = f(a,a,a,1) f(1,1,1,a) f(b,b,b,b) = f(a,a,a,1) f(1,1,1,a) f(b,1,b,1) f(1,b,1,b)= f(a,a,a,1) f(b,1,b,1) f(1,1,1,a) f(1,b,1,b)= f(a,a,a,1) f(b,1,b,1) f(1,1,1,a) f(b,b,1,1)= f(a,a,a,1) f(b,1,b,1) f(b,b,1,1) f(1,1,1,a)= f(a,a,a,1) f(b,b,b,b) f(1,1,1,a)= f(a,a,1,1) f(1,1,a,1) f(b,b,b,b) f(1,1,1,a)= f(b,b,b,b) f(a,a,a,a) = ba
EQN* is hard for non-commutative monoids
ab
P.Tesson Systems of eqns over finite semigroups & CSPs 11
Theorem:If M is a finite monoid then EQN*M is tractable if M is commutative and every element of M generates a subgroup. Otherwise, EQN*M is NP-complete.
Alternatively, EQN*M is tractable iff M is a factor of the direct product of a semilattice with an abelian group.
Dichotomy for EQN* over monoids
P.Tesson Systems of eqns over finite semigroups & CSPs 12
Upper bounds
• Let S be a semilattice. The operation of S is idempotent and commutes with itself. So EQN*S is tractable.
0
Straightforward algorithm
1. Set every non-constant variable to 0 and maintain lower bound to any solution.
2. If some equation xy = z is unsatisfied, set these variables to the smallest upper bound of {x,y,z}.
yx
z
P.Tesson Systems of eqns over finite semigroups & CSPs 13
Upper bounds
• Let G be an abelian group. The operation m(x,y,z) = xy-1z is a polymorphism of EG.
m(x1,y1,z1) m(x2,y2,z2) = (x1y1-1z1) (x2y2
-1z2)
= x3y3-1z3 = m(x3,y3,z3)
In fact, elementary linear algebra is sufficient to show EQN* is tractable over abelian groups.
x1 x2 = x3
y1 y2 = y3
z1 z2 = z3
x1x2 (y1y2)-1 z1z2 = x3y3-1z3
P.Tesson Systems of eqns over finite semigroups & CSPs 14
...and so we are done?
• So EQN* is tractable over the direct product of a semilattice and an abelian group.
• Intuitively, an efficient algorithm for solving systems of equations over a semigroup S, yields efficient algorithms for any subsemigroup or any morphic image of S.
• Unfortunately, this is provably wrong for semigroups in general.
P.Tesson Systems of eqns over finite semigroups & CSPs 15
... back to the drawing board...
We can still salvage the previous ideas. Let M be a factor of E G for a semilattice E and an abelian group G.
G7
G4 G5 G6
G3G2
G1
Algorithm works in two steps.
1. Find the minimal solution of the system projected into the semilattice. This allows us to associate each variable x in the system to a maximal subgroup Gx such that the system has a solution iff it has one in which each x lies in Gx.
2. We end up with a multi-sorted CSP in which the constraint language is coset-generating.
P.Tesson Systems of eqns over finite semigroups & CSPs 16
What about semigroups in general?
Theorem: [KTT]For every constraint language , there exists a
semigroup S such that CSP() is poly-time equivalent to EQN*S
.
Tedious to prove but not conceptually difficult. Each S constructed in this proof is in fact a normal band, i.e. it satisfies x2 = x and xyz = yxz. Surprisingly, the EQN^* problem over the free k-generated normal band is solvable in Ptime.
P.Tesson Systems of eqns over finite semigroups & CSPs 17
Target equations
T-EQN*S denotes the restriction of EQN*
S where the right-hand side of the equations are constants.
Theorem: [KTT]If S is a monoid then T-EQN*
S is in P if S is in the variety generated by Abelian groups and regular bands (x2 = x; xyxzx = xyzx) and is NP-complete otherwise.
P.Tesson Systems of eqns over finite semigroups & CSPs 18
Outline
1. Decision problem2. Using semigroups to define new
classes of tractable problems3. Counting the number of solutions
P.Tesson Systems of eqns over finite semigroups & CSPs 19
Tractability of and from semigroups
Theorem: [Jeavons, Cohen, Gyssens] If Pol() contains a semilattice operation then CSP() is
tractable. Any semilattice is a tractable algebra.
Theorem: [Bulatov, Jeavons, Volkov]If S is a semigroup then S is tractable if S is a block-group and is NP-complete otherwise.
Theorem: [Feder & Vardi]If is a coset-generating set of relations over a group G such that every k-ary R in is a coset of a subgroup of G then CSP() is tractable.Equivalently, if Pol() contains the polymorphism m(x,y,z) = xy-1z then CSP() is tractable.
P.Tesson Systems of eqns over finite semigroups & CSPs 20
A new island of tractability
Direction for future progress on tractable CSPs: combining existing tractable cases.
In particular, the algorithm sketched for solving EQN* over sufficiently simple monoids combines a local consistency algorithm (semilattices) and a linear algebra algorithm.
P.Tesson Systems of eqns over finite semigroups & CSPs 21
A new island of tractability
Theorem: [Dalmau, Gavaldà, T. & Thérien]If S is a block-group and is such that Pol()
contains the ternary operation t defined by t(x,y,z) = x y-1 z
then CSP() is tractable.
Block-groups are semigroups which do not contain any two-element subsemigroup {e,f} with ef=f and fe = e or ef = e and fe = f. In particular, semigroups which are the direct product of a group and a semilattice are block-groups.
is the smallest integer such that s s = s
for all s S.
P.Tesson Systems of eqns over finite semigroups & CSPs 22
A new island of tractability
Notes:• If S is a factor of the direct product of a
semilattice and an Abelian group, then relations defined by equations over a semigroup are invariant under t.
• If G is a group, then t is the standard Mal’tsev term.
• If is invariant under the product of a block-group S then is also invariant under t. In particular, block-groups are tractable algebras. ([Bulatov, Jeavons, Volkov 04])
P.Tesson Systems of eqns over finite semigroups & CSPs 23
Structure theorem
Let S be a factor of the direct product of a group G and a semilattice E. Then there exist groups {Ge}e E and homomorphisms
e,f: Ge Gf
for all e,f E with ef= f such that S = E Ge and if x Ge and y Gf we have xy Gef and in fact
xy = e,ef(x)f,ef(y).
P.Tesson Systems of eqns over finite semigroups & CSPs 24
What’s the algorithm?
Instance I of CSP()
Impose arc-consistency
If I is inconsistent it is unsatisfiable.If I is consistent then we can assign every variable xi to a subgroup Gi of S such that if I has a solution then it has one where each xi takes a value in Gi.
Original constraints (x1,x2,x3) R in I have implicitely become (x1,x2,x3) RG1,G2,G3
where
RG1,G2,G3 G1G2G3. Since Pol() contains xy-
1z this new relation is a coset of G1G2G3.
Use the tractability of coset-generating relations.
Bingo!
P.Tesson Systems of eqns over finite semigroups & CSPs 25
Open questions
Over a domain S equipped with a semigroup operation, consider clones in which every operation f(x1,...,xt) is idempotent and can be written as a term over S (such as xy-1z).
1. Classify all clones of the above type.2. Conjecture: every tractable clones of
polynomials over a group contains a Mal’tsev operation.
P.Tesson Systems of eqns over finite semigroups & CSPs 26
Outline
1. Decision problem2. Using semigroups to define new
classes of tractable problems3. Counting the number of solutions
P.Tesson Systems of eqns over finite semigroups & CSPs 27
The algebraic approach to #CSP
Def’n: #CSP() is the problem of counting the number of solutions to a given set of -constraints.
Thm: [Bul.Dal.’03] If Pol(1) Pol(2) then #CSP(2) is Turing-reducible to #CSP(1).
Thm: [Bul.Dal.’03] • If Pol() contains no Mal’tsev term then #CSP() is #P-
complete. • If Pol() contains a Mal’tsev term and is uniform then #CSP()
is solvable in polynomial time.
Pol() is said to be uniform if each congruence of a subalgebra of Pol() has blocks of the same size. In that paper: conjectured that the presence of a Mal’tsev term in Pol() is necessary and sufficient for tractability.
P.Tesson Systems of eqns over finite semigroups & CSPs 28
#CSP(,)
For , equivalence relations over D, let M, be the integer matrix with rows indexed by the -classes, columns by the -classes and s.t. the (i,j) entry is |[i] [j]|.
Theorem:[Bul.Gro.’04] If M, is positive then #CSP({,}) is tractable if M, has rank 1 and is #P-complete otherwise.
Corollary:
Mal’tsev polymorphisms do not guarantee tractability!
P.Tesson Systems of eqns over finite semigroups & CSPs 29
The #CSP dichotomy conjecture
Conjecture: (apparently now theorem [Bulatov 07])• If is a constraint language s.t.
1. Pol() contains a Mal’tsev term.2. For any pair of congruences , of an algebra in the
variety generated by Pol() is such that M, has rank 1 if it is positive.
then #CSP() is tractable. Otherwise, #CSP() is #P-complete.
Note: The conjecture has been verified for some special cases: domains of size 2 [Cre-Her’96], a pair of equivalence relations [Bul-Gro’04], a binary acyclic relation.
P.Tesson Systems of eqns over finite semigroups & CSPs 30
Dual algebras with a Mal’tsev term
Note: is such that for all x S, x = xx.
Theorem: D(S) contains a Mal’tsev iff wxyz = wyxz and xyz = xz for all w,x,y,z S.
Pf: Suppose S commutes with m.
xez = m(xez, xez, xez)(idempotency of m)
= m(x,xe,xe) m(ez,ez,z)(S and m commute and e = e2)
= xz (Since m Mal’tsev)
P.Tesson Systems of eqns over finite semigroups & CSPs 31
(cont’d) wxyz = m(wxyz, wxyz, wxyz)
= m(wxyxxz, wxxx yz, wxxxyz)(inserting x at will)
= m(w,w,w) m(x,x,x) m(y,x,x) m(x,x,x) m(x,y,y)
m(z,z,z)(commutativity with S)
= wxyxxz(m is Mal’tsev)
= wyxz
P.Tesson Systems of eqns over finite semigroups & CSPs 32
Dual algebras with a Mal’tsev term
Def’n: S is said to be a left-zero band (resp. right-zero) if xy = x (resp. xy = y) for all x,y S.
Direct products of Abelian groups and right- and left-zero bands all satisfy wxyz = wyxz and xyz = xz.
Def’n: The semigroup S is an inflation of its subsemigroup T if for each g S-T, there exists a unique tg T s.t. for all x S:
1. gx, xg T and 2. tgx = gx and xtg = xg.
In such a case, g is said to be a ghost of tg. If each t T has the same number of ghosts, then S is a uniform inflation of T.
P.Tesson Systems of eqns over finite semigroups & CSPs 33
Dual algebras with a Mal’tsev term
Theorem: D(S) contains a Mal’tsev term iff wxyz = wzyx and xyz = xz iff S is the inflation of the direct product of a left-zero band, a right-zero band and an Abelian group.
Corollary: If S is not such an inflation #EQN*
S is #P-complete.
P.Tesson Systems of eqns over finite semigroups & CSPs 34
Uniform Mal’tsev algebras
Theorem: D(S) contains a Mal’tsev term and is uniform iff S is a uniform inflation of the product L R A of a left-zero band, a right-zero band and an Abelian group.
Corollary: #EQN*
S is solvable in poly-time for such semigroups.
P.Tesson Systems of eqns over finite semigroups & CSPs 35
A key example
• Let C2 be the two-element group {0,1} and C2’ be the inflation of C2 where 1’ is a ghost of 1.
Theorem: #EQN*C2’ is #P-complete.
Smallest example (in terms of domain size) of a such that Pol() contains a Mal’tsev term but #CSP() is #P-complete.
P.Tesson Systems of eqns over finite semigroups & CSPs 36
#P-completeness for #EQN*C2’
• Recall: if A is an n n {0,1} matrix,
Perm(A) = Sn i ai (i).
Perm is #P-complete. [Valiant]
• First step: Perm reduces to computing for a system over the group C2 the number of solutions with i 1’s.
• Second step: that problem reduces to #EQN*C2’.
• For each matrix entry aij, create a variable xij and introduce equations – for each i the equation j aijxij = 1 and – for each j the equation i aijxij = 1.
• The number of solutions with exactly n of the xij set to 1 is Perm(A).
P.Tesson Systems of eqns over finite semigroups & CSPs 37
From number of sol’ns with n 1’s to #EQN*
C2
Want to count sol’ns with n 1’s and n2-n 0’s for system E over C2 by a reduction to #EQN*
C2’.
Note: over C2’: x+x+x = 0 if x = 0 and x+x+x = 1 if x {1,1’}.
Create E’ over C2’ by – xi 3xi – n “weak” copies of each variable.
Each sol’n over C2 with i 1’s gives rise to 2ni sol’ns in E’.
# soln’s with n 1’s can be read off the #EQN*C2’ result.
x1 + x2 = x5
x2 + x4 = x3
3x1 + 3x2 = 3x5
3x2 + 3x4 = 3x3
3xi = 3xi2 = ... = 3xin (for each i)
3x1 + 3x2 = 3x5
3x2 + 3x4 = 3x3
E (over C2) E’ (over C2’)
P.Tesson Systems of eqns over finite semigroups & CSPs 38
The case of groups
Theorem:If S is a non-uniform inflation of the abelian group G, there exist congruences , D(S)3 such that M, is positive with rank > 1.
Proof: = {((a,b,c),(a’,b’,c’)): a+b+c = a’+b’+c’} = {((a,b,c),(a’,b’,c’)): b,b’ and c,c’ ghosts of
same element.} has |G| blocks, has |G|2 blocks. Suppose g
G has k ghosts but 0 has only one. Then columns corresponding to 0,0 and 0,g are not multiples of each other.
P.Tesson Systems of eqns over finite semigroups & CSPs 39
Full classification theorem
Theorem: If S is the direct product of an inflation of a left-zero band, an inflation of a right-zero band and a uniform inflation of an Abelian group then #EQN*
S is solvable in polynomial time.Otherwise #EQN*
S is #P-complete.
Classification matches exactly the conjectured frontier separating the tractable and #P-complete cases of #CSP.
P.Tesson Systems of eqns over finite semigroups & CSPs 40
Hardness through peeling
S not an inflation of LRA then D(S) not Mal’tsev #EQN*
S is hard.
Otherwise, in L R A one has (l1,r1,a1) (l2,r2,a2) = (l1,r2,a1a2)
Fix e LRA and let = {(x,y): xe = ye} and = {ex = ey}.
• has |L| blocks and has |RA| blocks. If M, has rank > 1, then #EQN*S is hard.
• Otherwise, S is direct product of inflation of L and inflation of RA.
P.Tesson Systems of eqns over finite semigroups & CSPs 41
Explicit upper bounds
1. If S is an inflation of T then counting solutions to a system over S is equivalent to a weighted version of #EQN*
T.
In a system E over S, any constant c S-T either appears in an equation of the form xi = c (delete those) or can be replaced by some appropriate value in T. The resulting system E’ is over T.
For a solution x = (x1, ..., xn) of E, define weight(x) = i (# of ghosts of xi)
Summing the weights of all solutions to E’ is essentially equivalent to counting the solutions of E.
When S is a uniform inflation of T then #EQN*S and
#EQN*T are Turing-equivalent.
P.Tesson Systems of eqns over finite semigroups & CSPs 42
Explicit upper bounds (cont’d)
2. Simple linear algebra allows counting solutions to systems over Abelian groups. (or uniform inflations of them)
3. Equations over left-zero band L are either x = y or x = s
for some s L. System over L is simply defining an
equivalence relation on variables and constants so weighted problem is easy to compute.
P.Tesson Systems of eqns over finite semigroups & CSPs 43
Conclusion
Systems of equations over semigroups provide an interesting case study.
• Smooth connection to the algebraic approach through the dual algebra.
• Simple enough to convey decent intuition yet sometimes rich enough to require fine CSP technology.– Nordh: problem of testing if two systems are equivalent or
isomorphic. – Russell: Max-EQN* over Abelian groups.
• Larose & Zádori:Consider the problem of solving systems over arbitrary finite algebras dichotomies for rings, lattices, quasigroups for the decision problem. Here also the structure of the dual algebra can be put to good use.
• The problem of solving a single equation has also been studied [Seif, Szabo, Goldmann, Russell, BMMTT]. Open conjecture: the problem is tractable for any solvable group.
P.Tesson Systems of eqns over finite semigroups & CSPs 44
Bibliography
The talk is primarily based on• O. Klíma, P. Tesson, D. Thérien: Dichotomies in the Complexity
of Solving Systems of Equations over Finite Semigroups, Theory of Computing systems, 2006.
• V. Dalmau, R. Gavaldà, P. Tesson, D. Thérien: Tractable Clones of Polynomials over Semigroups, CP’05.
These are available from the electronic colloquium on computational complexity (ECCC).
Other references:• G. Nordh, P. Jonsson: The Complexity of Counting Solutions to
Systems of Equations over Finite Semigroups, COCOON’04.• G. Nordh, The Complexity of Equivalence and Isomorphism of
Systems of Equations over Finite Groups, MFCS’04.• B. Larose, L. Zadori: Taylor terms, constraint satisfaction and
the complexity of polynomial equations over finite algebras, available on B. Larose’s webpage.