Repository navigation
Fixes approximate dominating set greedy choice. - #1566
Conversation
There was a problem hiding this comment.
I'm fine if we want to move to having a blank line after section headings, but we should do so consistently. Can you make this docstring self-consistent, or clue me in if there is a different rationale?
There was a problem hiding this comment.
Oh, sorry, I keep forgetting that. I'll fix it.
Before, the greedy algorithm for approximate dominating set chose each node based on the sum of the weights in the closed neighborhood of the node. Now it just uses the weight of the node. This fixes an issue that causes, for example, the return value for a star graph to be all nodes other than the center node.
feccdf7 to
1388437
Compare
Fixes approximate dominating set greedy choice.
|
I have now implemented the post processing improvement described in a paper by Tal Grossman and Avishai Wool. It can be disabled with an argument. I found a small test case where it improves the result over the basic greedy algorithm, which does not (in this case) even give a minimal set. -Bill Edited to remove large code block, now at https://gist.github.com/jfinkels/9ea6ef5cb50789328c42. |
|
@bbphd Thanks for the suggestions. If you're not comfortable with using GitHub to create a pull request, it's probably best to just put code into a Gist and provide a link to it, as the code is not displayed well in comments left on GitHub issues. I can do that for you and create a new issue and pull request on your behalf. |
|
Thanks! I'll try that in the future. |
|
I have some questions that I'll post on the other issue that I created for your suggested postprocessing change. |
Before, the greedy algorithm for approximate dominating set chose each
node based on the sum of the weights in the closed neighborhood of the
node. Now it just uses the weight of the node. This fixes an issue that
causes, for example, the return value for a star graph to be all nodes
other than the center node.
Fixes issue #1527.