Presentation is loading. Please wait.

Presentation is loading. Please wait.

Solving Systems of Equations over Finite Semigroups: a Case Study for CSPs Pascal Tesson Université Laval (Quebec City)

Similar presentations


Presentation on theme: "Solving Systems of Equations over Finite Semigroups: a Case Study for CSPs Pascal Tesson Université Laval (Quebec City)"— Presentation transcript:

1 Solving Systems of Equations over Finite Semigroups: a Case Study for CSPs Pascal Tesson Université Laval (Quebec City)

2 P.Tesson Systems of eqns over finite semigroups & CSPs 2 Outline 1.Decision problem 2.Using semigroups to define new classes of tractable problems 3.Counting the number of solutions

3 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. xsxs =s xtxt =t x 1 x s =y1y1 y 1 x 2 =y2y2 x t x 3 =y2y2 x 3 x 4 =y3y3 x 3 x 1 =y3y3 x 3 x s =y4y4 x s x 2 =y4y4 x 1 s x 2 =t x 3 x 3 x 4 =x 3 x 1 x 3 s=s x 2

4 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(E S ) where E S 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

5 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

6 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: S k  S is a polymorphism of E S iff 1.f is idempotent f(x,..., x) = x 2.f commutes with S f(x 1 y 1,..., x k y k ) = f(x 1,..., x k ) f(y 1,..., y k ) 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.

7 P.Tesson Systems of eqns over finite semigroups & CSPs 7 Connection with the dual algebra f is a polymorphism of xy = z iff x1x1 y1y1 =z1z1  =  xkxk ykyk =zkzk fff iff f commutes with s. f(x 1,...,x k )f(y 1,...,y k )=f(z 1,...,z k ) = f(x 1 y 1,...,x k y k )

8 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: S k  S is a Taylor term if for each i  {1,...,k} it satisfies an identity in {x,y} t(a 1,..., a i-1, x, a i+1,..., a k ) = t(b 1,..., b i-1, y, b i+1,..., b k ) with a r, b r  {x,y}.

9 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.

10 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

11 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

12 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

13 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 -1 z is a polymorphism of E G. m(x 1,y 1,z 1 ) m(x 2,y 2,z 2 ) = (x 1 y 1 -1 z 1 ) (x 2 y 2 -1 z 2 ) = x 3 y 3 -1 z 3 = m(x 3,y 3,z 3 ) In fact, elementary linear algebra is sufficient to show EQN* is tractable over abelian groups. x 1 x 2 = x 3 y 1 y 2 = y 3 z 1 z 2 = z 3 x 1 x 2 (y 1 y 2 ) -1 z 1 z 2 = x 3 y 3 -1 z 3

14 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.

15 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. G7G7 G4G4 G5G5 G6G6 G3G3 G2G2 G1G1 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 G x such that the system has a solution iff it has one in which each x lies in G x. 2.We end up with a multi-sorted CSP in which the constraint language is coset- generating.

16 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 x 2 = x and xyz = yxz. Surprisingly, the EQN^* problem over the free k- generated normal band is solvable in Ptime.

17 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 (x 2 = x; xyxzx = xyzx) and is NP-complete otherwise.

18 P.Tesson Systems of eqns over finite semigroups & CSPs 18 Outline 1.Decision problem 2.Using semigroups to define new classes of tractable problems 3.Counting the number of solutions

19 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 -1 z then CSP(  ) is tractable.

20 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.

21 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.

22 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])

23 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 {G e } e  E and homomorphisms  e,f : G e  G f for all e,f  E with ef= f such that S =  E G e and if x  G e and y  G f we have xy  G ef and in fact xy =  e,ef (x)  f,ef (y).

24 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 x i to a subgroup G i of S such that if I has a solution then it has one where each x i takes a value in G i. Original constraints (x 1,x 2,x 3 )  R in I have implicitely become (x 1,x 2,x 3 )  R G 1,G 2,G 3 where R G 1,G 2,G 3  G 1  G 2  G 3. Since Pol(  ) contains xy -1 z this new relation is a coset of G 1  G 2  G 3. Use the tractability of coset- generating relations. Bingo!

25 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(x 1,...,x t ) is idempotent and can be written as a term over S (such as xy  -1 z). 1.Classify all clones of the above type. 2.Conjecture: every tractable clones of polynomials over a group contains a Mal’tsev operation.

26 P.Tesson Systems of eqns over finite semigroups & CSPs 26 Outline 1.Decision problem 2.Using semigroups to define new classes of tractable problems 3.Counting the number of solutions

27 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.

28 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!

29 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.

30 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  = x  x . Theorem: D (S) contains a Mal’tsev iff wxyz = wyxz and xy  z = 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 = e 2 ) = xz (Since m Mal’tsev)

31 P.Tesson Systems of eqns over finite semigroups & CSPs 31  (cont’d) wxyz = m(wxyz, wxyz, wxyz) = m(wxyx  x  z, wxx  x  yz, wx  x  xyz) (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) = wx  yxx  z (m is Mal’tsev) = wyxz

32 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 xy  z = xz. Def’n: The semigroup S is an inflation of its subsemigroup T if for each g  S-T, there exists a unique t g  T s.t. for all x  S: 1.gx, xg  T and 2.t g x = gx and xt g = xg. In such a case, g is said to be a ghost of t g. If each t  T has the same number of ghosts, then S is a uniform inflation of T.

33 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 xy  z = 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.

34 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.

35 P.Tesson Systems of eqns over finite semigroups & CSPs 35 A key example Let C 2 be the two-element group {0,1} and C 2 ’ be the inflation of C 2 where 1’ is a ghost of 1. Theorem: #EQN * C 2 ’ 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.

36 P.Tesson Systems of eqns over finite semigroups & CSPs 36 #P-completeness for #EQN * C 2 ’ Recall: if A is an n  n {0,1} matrix, Perm(A) =    S n  i a i  (i). Perm is #P-complete. [Valiant] First step: Perm reduces to computing for a system over the group C 2 the number of solutions with i 1’s. Second step: that problem reduces to #EQN * C 2 ’. For each matrix entry a ij, create a variable x ij and introduce equations –for each i the equation  j a ij x ij = 1 and –for each j the equation  i a ij x ij = 1. The number of solutions with exactly n of the x ij set to 1 is Perm(A).

37 P.Tesson Systems of eqns over finite semigroups & CSPs 37 From number of sol’ns with n 1’s to #EQN * C 2 Want to count sol’ns with n 1’s and n 2 -n 0’s for system E over C 2 by a reduction to #EQN * C 2 ’. Note: over C 2 ’: x+x+x = 0 if x = 0 and x+x+x = 1 if x  {1,1’}. Create E ’ over C 2 ’ by –x i  3x i –n “weak” copies of each variable. Each sol’n over C 2 with i 1’s gives rise to 2 ni sol’ns in E ’.  # soln’s with n 1’s can be read off the #EQN * C 2 ’ result. x 1 + x 2 = x 5  x2 + x4 = x3 3x 1 + 3x 2 = 3x 5  3x 2 + 3x 4 = 3x 3 3x i = 3x i2 =... = 3x in (for each i) 3x 1 + 3x 2 = 3x 5  3x 2 + 3x 4 = 3x 3 E (over C 2 )E’ (over C 2 ’)

38 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.

39 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.

40 P.Tesson Systems of eqns over finite semigroups & CSPs 40 Hardness through peeling S not an inflation of L  R  A then D (S) not Mal’tsev  #EQN * S is hard. Otherwise, in L  R  A one has (l 1,r 1,a 1 )  (l 2,r 2,a 2 ) = (l 1,r 2,a 1 a 2 ) Fix e  L  R  A and let  = {(x,y): x  e = y  e} and  = {ex = ey}.  has |L| blocks and  has |R  A| blocks. If M ,  has rank > 1, then #EQN* S is hard. Otherwise, S is direct product of inflation of L and inflation of R  A.

41 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 x i = c (delete those) or can be replaced by some appropriate value in T. The resulting system E ’ is over T. For a solution x = (x 1,..., x n ) of E, define weight(x) =  i (# of ghosts of x i ) 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.

42 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.

43 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.

44 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.


Download ppt "Solving Systems of Equations over Finite Semigroups: a Case Study for CSPs Pascal Tesson Université Laval (Quebec City)"

Similar presentations


Ads by Google