2

Having trouble figuring out how to show this approximation, hoping someone could lend some advice. I'm quite new to approximation (especially with randomization) and having trouble figuring out how to narrow this down.

The problem:

Suppose we have a graph G = (V,E), each edge with a weight w.

We want to color the graph with 2 colors, red and blue. We want to maximize the edge weight from each vertex from red to blue.

We randomly mark each vertex with either red or blue with probably 1/2 for each. The coloring is done independently of every vertex.

I need to show that this color assignment randomization algorithm is a 4-approximaton. However, not entirely sure where to start. Anyone have any ideas?

zvonimir
  • 79
  • 7
  • I think it's fairly easy to find a counter-example that disproves your conjecture. So perhaps I don't understand your conjecture. A sample graph would help clarify the question. – user3386109 Dec 09 '21 at 04:43
  • Hmm, it shouldn't be possible because I need to show its a 4-approximation. Basically, we want to split the graph into subsets with the coloring for Red and Blue, and then maximize the edge weights going from Red to Blue. This randomized coloring is what I need to show is 4 approximate. – zvonimir Dec 09 '21 at 05:01
  • 1
    Are edge weights required to be non-negative? This problem gets more complicated with negative weights. – ldog Dec 09 '21 at 05:51
  • 1
    Why are you bothering with this? It is obviously a very bad approximation which could be greatly improved by considering the edge weights when assigning the colors. – ravenspoint Dec 09 '21 at 14:48
  • @Idog no, no negative edge weights :) – zvonimir Dec 09 '21 at 18:47
  • 1
    @ravenspoint it is a great question, my later tasks involve improving on this however I think the main motivation is actually showing why this approximation is so bad :) – zvonimir Dec 09 '21 at 18:48
  • I doubt that anyone who needs to be shown why the random assignment approximation is bad will not be convinced by some involved mathematical argument. I suggest keeping things simple for whoever you are trying to convince. Code the two algorithms ( they are very simple, an hour's work should be sufficient ) run them against a dozen or more randomly generated graphs and compare the results. You will be done sooner and can move on to solving some real problems. – ravenspoint Dec 09 '21 at 19:03
  • @ravenspoint thanks for the input. The question is really weird but I think they actually conversely do want a mathematical "proof". I think if we add the randomization of 1/2 + 1/2 we get 1/4 somehow, however not too sure how to structure that. – zvonimir Dec 09 '21 at 19:14
  • I’m voting to close this question because CS theory is off-topic – Zoe Dec 12 '21 at 09:27
  • @Zoe if a question is about CS theory, shouldn't it be moved to https://cs.stackexchange.com rather than closed? – Stef Dec 12 '21 at 12:03

1 Answers1

0

Even the simplest greedy algorithm will produce better approximations than randomly assigning colors.

Like this:

Mark all nodes uncolored
Mark all edges unprocessed
Sort edges into decreasing weight
LOOP until all edges processed
   Select heaviest unprocessed edge
   IF both nodes uncoloured
        color nodes on edge opposite colors
   IF one node uncolored
        color node opposite color to its partner
   mark edge processed
   ENDLOOP
ravenspoint
  • 19,093
  • 6
  • 57
  • 103
  • Although this might be true, I think the OP's goal is to calculate (and prove) the approximation factors of given algorithms, rather than imagine new algorithms. – Stef Dec 09 '21 at 15:09
  • But why spend time and energy proving anything, or spending any time at all, on such a poor algorithm? That's what puzzles me. – ravenspoint Dec 09 '21 at 15:24
  • @ravenspoint unfortunately that's not up to me haha – zvonimir Dec 09 '21 at 18:48