Notes On Mathematical and Algorithmic Problems: 1 1in3SAT (Updated Mar. 3, 2014)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Notes on Mathematical and Algorithmic

Problems
Chao Wang
March 3, 2014

1 1in3SAT (updated Mar. 3, 2014)


1.1 Problem
Given a collection of clauses, c1 , c2 , . . . , cm , each is a disjunction of at most
three literals. 1in3SAT problem asks, is there a through assignment, which
set exactly one literal to true in each clause, that makes the conjunction of
those clauses, c1 ∧ c2 ∧ . . . ∧ cm , true? Prove that this problem is in NP-
complete.

1.2 Proof
We prove this by reducing 3SAT to 1in3SAT .

The transformation is: for each of the ci = {xi1 , xi2 , xi3 }, we add 4 new
variables ai , bi , ci , di and produce three new clauses:

{x̄i1 , ai , bi }, {xi2 , bi , ci }, {x̄i3 , ci , di }

Suppose the original c1 ∧ c2 ∧ . . . ∧ cm has n variables and k clauses, our trans-


formation will produce an instance of n + 4k variables and 3k clauses. This
transformation is obviously carried out in polynomial time. Then, we need
to prove that our transformed instance will have a solution under 1in3SAT
condition iff the original instance does under 3SAT condition.

Firstly, suppose our transformed instance has a solution, which means


exactly one literal per clause is set to true, we want to show that the original
instance will have a solution, too.

1
Suppose in the original instance clause ci , xi1 , xi2 , xi3 are all set to false.
This means that in the second clause we produce, either bi or ci (but not
both) must be true, otherwise it’s a contradiction to exactly one literal has
to be true. So either in the first or the third transformed clause, there will
be at least two variables set to true (either x̄i1 and bi or x̄i3 and ci , but
not both). This is a contradiction to our 1in3SAT condition. Thus, in the
original clause ci , at least one of three literals has to be true. Therefore, the
original instance must have a solution under 3SAT condition.

Secondly, suppose the original instance c1 ∧ c2 ∧ . . . ∧ cm has a solution,


there must be at least one literal set to be true in each clause.

Suppose in clause ci ,
(a) xi2 is set to true, we can set bi and ci to false in the second transformed
clause and set ai = xi1 and di = xi3 .
(b) xi2 is set to false and both xi1 and xi3 are set to true, we can set ai to
true, bi to false, ci to true, and di to false.
(c) only xi1 is set to true, we can set bi to true, and ai , ci and di to false.
(d) only xi3 is set to true, we can set ci to true, and ai , bi and di to false.

In all these cases, the three transformed clauses corresponding to ci will


have exactly one literal set to true in each clause. Therefore, the transformed
instance will have a solution under 1in3SAT condition.

2 Division (updated Sept. 9, 2013)


2.1 Problem

Define series {xi } recursively. x1 = 1, and xn+1 = 3xn + [ 5xn ].
Prove that 2n−2 |xn when n ≥ 2.

2.2 Proof
A more strict representation will be proved that

xn = 2n−2 · F2n+1

when n ≥ 2, where F2n+1 is the 2n + 1th Fibonacci number that


√ √
1 1 + 5 2n+1 1 1 − 5 2n+1
F2n+1 = √ ( ) −√ ( )
5 2 5 2

2
The basic idea is induction for n.
When n = 2,

x2 = 3 · x1 + [ 5 · x1 ]

= 3 · 1 + [ 5 · 1]
= 5

On the other hand,

x2 = 22−2 · F2n+1
√ √
1 1+ 5 5 1 1− 5 5
= √ ( ) −√ ( )
5 2 5 2
√ √ √
1 1 + 10 · 5 + 5 · 52 + 52 5 + 10 · 5 5 + 5 · 5
= √ ·
5 32
2 2
√ √ √
1 1 + 10 · 5 + 5 · 5 − 5 5 − 10 · 5 5 − 5 · 5
− √ ·
5 32
2
√ √ √
2 5 5 + 10 · 5 5 + 5 · 5
= √ ·
5 32
= 5

Thus, the equality holds when n = 2.


Assume that when n = k the equality holds, yet
√ √
k−2 1 1 + 5 2k+1 k−2 1 1 − 5 2k+1
xk = 2 ·√ ( ) −2 ·√ ( )
5 2 5 2
Thus,
√ √
k−1 1 1 + 5 2k+3 k−1 1 1 − 5 2k+3
2 ·√ ( ) −2 ·√ ( )
5 2 5 2
√ √
1 + 5 2 k−2 1 1 + 5 2k+1
= 2·( ) ·2 ·√ ( )
2 5 2
√ √
1 − 5 2 k−2 1 1 − 5 2k+1
− 2·( ) ·2 ·√ ( )
2 5 2
√ √
k−2 1 1 + 5 2k+1 k−2 1 1 − 5 2k+1
= 3·2 ·√ ( ) −3·2 ·√ ( )
5 2 5 2
√ √
1 + 5 1 − 5 2k+1
+ 2k−2 · ( )2k+1 + 2k−2 · ( )
2 √ 2 √
k−2 1 + 5 2k+1 k−2 1 − 5 2k+1
= 3xk + 2 ·( ) −2 ·( )
2 2

3

k−1 1 − 5 2k+1
+ 2 ·( )
2 √
√ k−1 1 − 5 2k+1
= 3xk + 5xk + 2 ·( )
√ 2
√ 5−1 1 √
= 3xk + 5xk − · · (3 − 5)k
√ 2 2
= 3xk + [ 5xk ]
= xk+1
The equality holds when n = k + 1, also.
Under mathematical inductive principle, xn = 2n−2 ·F2n+1 holds for all n ≥ 2.

3 Basel Problem (updated Jul. 7, 2011)


Recall the Taylor series expansion for the sine function, we have
x3 x5 x7
sin(x) = x − + − + ...
3! 5! 7!
Dividing through by x, we have
sin(x) x2 x4 x6
=1− + − + ...
x 3! 5! 7!
Now, the roots of sin(x)/x occur precisely at x = nπ where n = ±1, ±2, . . .,
so we can assume that
sin(x) x x x x x x
= (1 − )(1 + )(1 − )(1 + )(1 − )(1 + )...
x π π 2π 2π 3π 3π
x2 x2 x2
= (1 − 2 )(1 − 2 )(1 − 2 ) . . .
π 4π 9π

If we formally multiply out this product and collect all the x2 terms, we can
see
1 1 X ∞
1
− =− 2
6 π n=1 n2
yet
X

1 π2
=
n=1 n2 6
Further more, if we collect all the x4 terms, we can see
1 1 1 1 1 1 1
= {(− 2 − 2 − 2 − . . .)2 − [(− 2 )2 + (− 2 )2 + (− 2 )2 + . . .]}/2
5! π 4π 9π π 4π 9π

4
yet
1 1 1 1 1
= ( )2 − 4 (1 + 4 + 4 + . . .)
60 6 π 2 3
4
Now we get the sum of the x series,
X

1 π4
= ≈ 1.082323234
n=1 n4 90

Further more, how to calculate the exact value of the xk series when k is
an odd number based upon the fact that when k > 1,
X

1
n=1 nk

is convergent?

You might also like