0

suppose we have a weighted grid graph and our problem is to find maximum independent set. There is a greedy algorithm that each time choose the heaviest node and remove it and its neighbors until all nodes of G have been chosen or removed. we want to prove that W(s) >= 1/4 W(T) where S is our greedy result and T is the OPT solution.

let S be the result of our greedy algorithm and T be an arbitrary independent set which can be the OPT. We know that for any T for any node v which belongs to T-S there exist a node v' in S which is neighbor of v and w(v) <= w(v').

Is there any idea to how prove that?

user3070752
  • 694
  • 4
  • 23

2 Answers2

2

Just use your last statement, and consider T as the maximum independent set and you have this two results :

  1. for every node in T-S like v there exist a node like u in S were W(v) <= W(u).
  2. each node like u in S is at most neighbor of 4 nodes in T.

now use them :)

Lrrr
  • 4,755
  • 5
  • 41
  • 63
  • I consider W(s) = A + B where A is sum of weights of those nodes that are in both S and T and B is sum of weights of nodes that are only in S. and W(T) = A + C and in therefore inequality A >= (C-4B)/3 must be held. in the first result you should say every node v in T-S not in T – user3070752 Jan 06 '15 at 10:30
  • @amirveyseh I replaced T with T-S – Lrrr Jan 06 '15 at 10:34
1

The desired result can be obtained with the following proof.

Let S be the set generated by the greedy algorithm, let T be an independent set of maximal weight. We will stepwise transform T into S and bound the loss for each transformation step.

Choose v in T\S with maximal weight. By the statement included in the question above, there exists v' in S such that w(v') >= w(v); choose such a v'. Let N be the neighbourhood of v' in T; N contains v and at most 4 vertices (as we have a grid graph). As v was chosen with maximal weight and w(v')>=w(v), we obtain w(v')>=w(N)/4. We set T':=(T\N) and add v' to it. By construction, T' remains an independent set and we have w(T') >= w(T) - (3/4)w(N).

In total, for each exchange step, vertices from T\S get eliminated, but a node from S is added such that the added total weight is at least one quarter of the lost total weight. Furthermore, the constructed sets N in each step are disjoint, which means that in each step, at least one quarter of w(N) is preserved. In total, as we have constructed S, andS has weight at least (1/4)w(T).

Note that the input graph is not required to be a grid graph but maximum degree 4 is sufficient; furthermore, the proof can be generalized by permitting an abitrary graph, replacing 4 by the maximum degree Δ yielding an approximation ratio of 1/Δ.

Codor
  • 17,447
  • 9
  • 29
  • 56
  • thanks for your great solution.But I can't understand why you say W(T') >= W(T) - (3/4)W(v) ? can you explain a bit? I think we should say W(T') >= W(T) - (3/4)W(N) – user3070752 Jan 06 '15 at 17:16
  • You are right. I added more details, but I am not really satisfied with the presentation. However, a nice discussion! Was it homework indeed? – Codor Jan 06 '15 at 19:54
  • yeah...nice & informative discussion!and again thanks for your help.indeed it was but is it incorrect to discuss difficulties in solving such problems? excuse me if i'm in wrong way I'm new to SO – user3070752 Jan 06 '15 at 22:29
  • 1
    I don't think it's incorrect. I just deleted my comments as they were confusing; after the comment-and-edit cycle most of them made no sense anymore. – Codor Jan 06 '15 at 22:31
  • @AliAmiri I did not mean to "steal your answer" as you state above. Although the question was finally put on hold, homework questions are not discouraged as such to my understanding. – Codor Jan 07 '15 at 07:23
  • @Codor just take a look at your third edit. You completely change your answer to a explanation of points that I made, i'm not saying that I'm so clever and no one see what I've see, because it was too obvious in my opinion. I'm sorry about "stole" word, but I was angry and cant edit my comment now(so I delete my comment). But I really didnt appreciate the fact that when my answer exist, you completely change your answer to just explain a homework for some lazy student how dont want to do his work. I really could explain my answer, but I dont want do peoples homework for reputations like you do – Lrrr Jan 07 '15 at 07:32
  • Sorry for all the fuzz. In fact, I didn't totally understand the matter from your explanation at first read, although the necessary key arguments are contained. To be honest, I could not let go of the problem described in the question, as I found it interesting myself. Retrospectively, you clearly understood the solution much quicker than me. For homework, would you consider giving just hints better than a detailed explanation? It's difficult to tell. – Codor Jan 07 '15 at 07:42
  • @Codor it is not difficult at all, dont do peoples homework for them!Let them at least pay you, helping people is nice(with giving them clues), but solving their homework is cheating and wrong because of other classmates works maybe not considered. Also OP will never learn to think as there is proverb "give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime" – Lrrr Jan 07 '15 at 08:06
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/68324/discussion-between-codor-and-ali-amiri). – Codor Jan 07 '15 at 08:10