1

I have been told (generic explanation) that 3SAT could be converted to unary 2DFA with endmarkers (assuming each variable of 3SAT as a prime number and then for each clause creating a cycle in unary 2DFA).

Can someone please provide an example of the above with explanation of the process (a small example, say 3-4 clauses would be fine). Tried it but have not background in unary 2DFA.

TheoryQuest1
  • 725
  • 3
  • 13
  • 1
    You can use the reduction you got at https://cs.stackexchange.com/a/72566 . It is straightforward to implement AN2 (with integers given in unary) by a 2DFA using a $b_i$-cycle of states for each $i$. – Emil Jeřábek Jun 13 '17 at 17:26
  • Thank you. To be clear we assume a=2, b=3, c=5, e=7 and so on. Now we add constraint loops one per clause (serially from left to right b/w L and R endmarker edges alternatively) such that the size of each loop is equal to a value which gives a residue 1/0 w.r.t. each variable in clause (depending upon if variable is in normal or complement form). And after the last such loop an accept state. Is this correct? – TheoryQuest1 Jun 13 '17 at 17:48
  • @EmilJeřábek I am sorry but I am still confused. The constraints the https://cs.stackexchange.com/a/72566 are not equal to or for non acceptance. But for a 2DFA we require a constraint such that they are for acceptance. Can you please provide a small example consisting of 3 clauses to unary 2DFA. [Eg: (1) ~a+b+~c=1; (2) a+~b+d=1; (3) ~b+c+~d=1] – TheoryQuest1 Jun 14 '17 at 06:53
  • I’m sorry, but I have no idea what is “not equal to or for non acceptance” supposed to mean. – Emil Jeřábek Jun 14 '17 at 11:24
  • The constraints are of the form $x \not\equiv a \pmod{p_ip_jp_k}$ but if i am correct in our case we require $\equiv a$. I got the generic concept but not how to implement a 3SAT clause. (example of clauses above) – TheoryQuest1 Jun 14 '17 at 11:35
  • 1
    With the cycle, you can test $x\not\equiv a\pmod b$ just the same as $x\equiv a\pmod b$, or indeed $(x\bmod b)\in S$ for an arbitrary set $S$ of residues modulo $b$. It’s just a matter of choosing which right-edge transitions go to the next cycle, and which to a rejecting state. In your example, the clause $\neg a\lor b\lor\neg c$ would correspond to a cycle of 30 states with cyclic transitions on the regular character, going right; with transitions on the right-edge marker from states $0,1,6,10,14,15,25$ (corresponding to the 7 satisfying assignments of the clause) to the start of the cycle.. – Emil Jeřábek Jun 14 '17 at 13:26
  • 1
    ...for the next clause; and transitions on the right-edge marker from the remaining 23 states to a catch-all rejecting state. – Emil Jeřábek Jun 14 '17 at 13:27

0 Answers0