0


Note: You don't have to understand Approximation Algorithms to answer this

Hello.
I need to prove an algorithm approximation by using expectation.
The algorithm takes x_i \in {0,1,2} such that i\in 1,...n+2 and there are constants c_i \in 0,1,2 such that i\in 1,...,n and would like to find an assignment to the variables such that x_i +x_(i+1)+x_(i+2) != 0 \mod(3) for all i such that the number of indexes such that x_i +x_(i+2) = c_i \mod(3) is maximized.
it does the following:
choose x_1 , x_2 \in 0,1,2 independently and uniformly at random and then
for each i\in 3,...,n+2 given the values of x_(i-2),x_(i-1) assign to x_i one of two values in {b\in 0,1,2 | x_(i-1)+x_(i-2)+b != 0 \mod(3)} uniformly at random.
the assignment to each x_i is independent for all x_j such the j<i-2.

I need to prove this algorithm gives a 1/3 approximation to the problem described, using expectation(meaning proving that for some X random variable that we assign to this question, E[X]=1/3)
I am struggling with defining such X and calculating this, I keep getting 2\3 instead of 1\3.
can anyone help with the calculation?

Tai
  • 59
  • 5

1 Answers1

1

You can prove that each x_i is uniformly distributed over {0, 1, 2} and pairwise independent by induction. The base case (n=2) is immediate, and the induction step follows from the fact you're given x_i being independent from x_j (with j < i-2), and a simple enumeration of cases.

The result follows immediately, since P(x_i + x_{i+2} = c_i) is 1/3, and by linearity of expectation, E[X] = n/3.

Clarifying the last statement: Let V_i be a random variable such that V_i is 1, if x_i + x_{i+2} = c_i. Otherwise, V_i is 0. Then X = sum(V_i i=1..n), and E[X] = sum(E[V_i] i=1..n) by linearity of expectation. However, E[V_i] = P(x_i + x_{i+2} = c_i) = 1/3.

Hyu
  • 31
  • 3
Paul Hankin
  • 54,811
  • 11
  • 92
  • 118
  • why does X= sum(V_i) ? – Tai Apr 26 '15 at 07:49
  • I took "X is the RV that we assign to this question" to mean that it's the RV that's the number of times that x_i + x_{i+2} == c_i. The V_i are indicators for each of the individual cases, and X is their sum. – Paul Hankin Apr 26 '15 at 07:51
  • but how come? like where the condition for which x_i +x_(i+1)+x_(i+2)!= 0 \mod(3) – Tai Apr 26 '15 at 07:53