<p>The central insight is that you can use two $2$-variable clauses to make sure two variables have the same value. Let me abbreviate $(x \vee \neg y) \wedge (y \vee \neg x)$ with $x=y$.
This allows the following reduction from 3SAT.</p>

<p>Given a 3SAT formula, copy the clauses to your reduction one by one. If you encounter a clause with a variable $x$ you've already seen twice, write the clause with a new variable $y$ instead of $x$ and add two $2$-variable clauses for $x=y$. Call the resulting formula $\phi$.</p>

<p>Formula $\phi$ satisfies requirements 1) and 2). Next, employ the same technique 
to ensure requirement 3). Walk through each pair of $3$-variable clauses of $\phi$ and for each pair which shares two variables $x$ and $y$, keep $x$ in one clause and in the other clause, change $x$ to $z$, and add $x=z$. An example:</p>

<p>$(x\vee y\vee h) \wedge (\neg x \vee \neg y \vee h) \mapsto (x\vee y\vee h) \wedge (\neg x \vee \neg z \vee h) \wedge (y=z)$</p>

<p>The resulting formula has as many $3$-variable clauses as the original and two $2$-variable clauses for each third or later repetition of a variable and then some more to satisfy requirement 3). Because the $2$-variable clauses ensure that $x=y$ so that your substitutions work, the resulting formula is satisfiable exactly when the original 3SAT formula was satisfiable. Its length is at most quadratic in the number of clauses of the original formula, so your problem is <strong>NP</strong>-Complete.</p>

<p>EDIT: I notice I interpreted your question to mean, <em>a variable cannot appear in more than two $3$-variable clauses</em>. The way it is formulated now, requirements 2) and 3) are equivalent. I hope you're not mad.</p>

CC BY-SA 4.0
2019-10-18T09:47:59.373Z
It is interesting to see that even when we demand the formula to be MONOTONE (ie, each clause is either +ve or -ve), the problem is NP-complete using basically the same trick (we will introduce $x\vee y$ and $\bar{x}\vee \bar{y}$ to make a copy of $x$)
Cyriac Antony
CC BY-SA 4.0
2019-10-18T10:44:01.887Z
@CyriacAntony Good observation. That's interesting.
Lieuwe Vinkhuijzen
CC BY-SA 3.0
2016-07-01T13:30:46.913Z
2016-07-02T00:23:58.197Z
2016-07-02T00:23:58.197Z
Lieuwe Vinkhuijzen
<p>Consider the variant of the 3SAT problem with the following restrictions:</p>

<ol>
<li><p>Each clause has 2 or 3 literals.</p></li>
<li><p>Each pair of 3-literal clauses have at most one common variable.</p></li>
</ol>

<p>What is the complexity of this SAT problem?</p>

CC BY-SA 3.0
2016-06-30T17:36:25.237Z
Okay. Property 3 seems to be a restatement of property 2 -- am I wrong in saying that? I'm also not sure is meant by "after some manipulation of the clauses."
gdmclellan
CC BY-SA 3.0
2016-06-30T17:44:03.750Z
Q+N=1
P+Q+R=1
M+N+R=1

can also be written as:

Q+N=1
P+Q+R=1
M+~Q+R=1

The first and second set of clauses are same but after the replacement, second set fails 2. Where as the first set seems to pass 2. 

Hence 3: Any such possible replacements also must not violatate 2. for any pair of clauses. (perhaps not very properly stated, but this is the idea).
TheoryQuest1
CC BY-SA 3.0
2016-06-30T18:12:02.760Z
The two systems in your example don't appear to be equivalent. Take for example N = P = 1, all other vars 0.

You should also probably clarify your what kinds of manipulations count as "some manipulation of the clauses" (e.g. can new variables and/or clauses be introduced?), and you should use a more commonplace notation (e.g. the clauses in your first system would be written $Q \vee N, P \vee Q \vee R, M \vee N \vee R$) unless you actually intend formulae that are composed of operations outside of the typical SAT connectives (e.g. if + is the exclusive-or operator).
gdmclellan
<cc.complexity-theory><sat>
Complexity of 3SAT where each pair of 3-clauses share at most one variable
TheoryQuest1
# Complexity of 3SAT where each pair of 3-clauses share at most one variable

(Asked by: username_0 on 2016-06-30)

Consider the variant of the 3SAT problem with the following restrictions:

1. Each clause has 2 or 3 literals.
2. Each pair of 3-literal clauses have at most one common variable.

What is the complexity of this SAT problem?

**Tags:** cc.complexity-theory, sat
> **Comments:**
> **username_1**: Okay. Property 3 seems to be a restatement of property 2 -- am I wrong in saying that? I'm also not sure is meant by "after some manipulation of the clauses."  
> **username_0**: Q+N=1 P+Q+R=1 M+N+R=1  can also be written as:  Q+N=1 P+Q+R=1 M+~Q+R=1  The first and second set of clauses are same but after the replacement, second set fails 2. Where as the first set seems to pass 2.   Hence 3: Any such possible replacements also must not violatate 2. for any pair of clauses. (perhaps not very properly stated, but this is the idea).  
> **username_1**: The two systems in your example don't appear to be equivalent. Take for example N = P = 1, all other vars 0.  You should also probably clarify your what kinds of manipulations count as "some manipulation of the clauses" (e.g. can new variables and/or clauses be introduced?), and you should use a more commonplace notation (e.g. the clauses in your first system would be written $Q \vee N, P \vee Q \vee R, M \vee N \vee R$) unless you actually intend formulae that are composed of operations outside of the typical SAT connectives (e.g. if + is the exclusive-or operator).  

---

## 1 answers

### Answer by username_2 on 2016-07-01. Score: 9

The central insight is that you can use two $2$-variable clauses to make sure two variables have the same value. Let me abbreviate $(x \vee \neg y) \wedge (y \vee \neg x)$ with $x=y$.
This allows the following reduction from 3SAT.

Given a 3SAT formula, copy the clauses to your reduction one by one. If you encounter a clause with a variable $x$ you've already seen twice, write the clause with a new variable $y$ instead of $x$ and add two $2$-variable clauses for $x=y$. Call the resulting formula $\phi$.

Formula $\phi$ satisfies requirements 1) and 2). Next, employ the same technique
to ensure requirement 3). Walk through each pair of $3$-variable clauses of $\phi$ and for each pair which shares two variables $x$ and $y$, keep $x$ in one clause and in the other clause, change $x$ to $z$, and add $x=z$. An example:

$(x\vee y\vee h) \wedge (\neg x \vee \neg y \vee h) \mapsto (x\vee y\vee h) \wedge (\neg x \vee \neg z \vee h) \wedge (y=z)$

The resulting formula has as many $3$-variable clauses as the original and two $2$-variable clauses for each third or later repetition of a variable and then some more to satisfy requirement 3). Because the $2$-variable clauses ensure that $x=y$ so that your substitutions work, the resulting formula is satisfiable exactly when the original 3SAT formula was satisfiable. Its length is at most quadratic in the number of clauses of the original formula, so your problem is **NP**-Complete.

EDIT: I notice I interpreted your question to mean, *a variable cannot appear in more than two $3$-variable clauses*. The way it is formulated now, requirements 2) and 3) are equivalent. I hope you're not mad.

> **Comments:**
> **username_3**: It is interesting to see that even when we demand the formula to be MONOTONE (ie, each clause is either +ve or -ve), the problem is NP-complete using basically the same trick (we will introduce $x\vee y$ and $\bar{x}\vee \bar{y}$ to make a copy of $x$)  
> **username_2**: @CyriacAntony Good observation. That's interesting.  

---

