The given problem is in $\mathsf {FL}$:
- Solve if it is satisfiable. Let the result be number $s$. Can be done in logarithmic space.
- Set $t=0$.
- Count the number of clauses of form $(a\oplus \overline a)$ where $a$ does not appear in any other clause except clauses identical to that one. For each such clause increase $t$ by $1$.
Step 3 can be performed in log space as follows:
for every i in V:
flagIndependent = true
flagAppears = false
for every j in C:
if C_j isIdentical(`(x_i xor not(x_i))`):
flagAppears = true
elseif C_j contains(`x_i`):
flagIndependent = false
t += flagAppears * flagIndependent
Two variables i
and j
take space $\log(|V|)$ and $\log(|C|)$ respectively. Variables flagIndependent
and flagAppears
take $1$ bit each. Functions checking clauses also require $O(\log(n))$ space at most. Therefore the total space used is logarithmic.
The answer is $s2^t$.