Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimal proper coloring, chromatic number, fractional chromatic number #156

Closed
dstahlke opened this issue Jul 17, 2022 · 5 comments
Closed
Labels
enhancement New feature or request

Comments

@dstahlke
Copy link

Graphs.jl has greedy_color, which returns a proper coloring that may not be optimal. It lacks any function that can generate a coloring using the minimum number of colors (the chromatic number). I have a simple implementation of this, but it requires the PicoSAT solver. Could this be added to Graphs.jl, or should this live in some other package? There is SimpleGraphAlgorithms.jl, but this is incompatible with the graphs from Graphs.jl (it is possible to convert the graph type, but it'd be great to have something that works natively).

Along similar lines, I could create a function to compute the fractional chromatic number. This again would require a dependency: a linear programming solver. I'm most familiar with Convex.jl, but GLPK would be a smaller dependency.

@gdalle
Copy link
Member

gdalle commented Jul 21, 2022

The philosophy behind Graphs.jl is to keep dependencies minmal in the core package, and move algorithms that require external solver to satellite packages. There was a proposal to gather all LP-based algorithms (like flows and matchings) within GraphsOptim.jl, but at the moment I don't have time to work on this. Feel free to add a PR there that uses JuMP to model coloring problems!

@dstahlke
Copy link
Author

Thanks. I've opened an issue for GraphsOptim.jl: JuliaGraphs/GraphsOptim.jl#5

To help others finding this via google, in case none of this goes into any package, here is the chromatic number implementation: https://gist.github.com/dstahlke/8e4fd40fa845e792ff7cd3f6b4ccb124

PS: what is github.nowall.world? GraphsOptim.jl seems to be listed both there and at github.com. This is the first I've seen of this, and can't find any information on it.

@gdalle
Copy link
Member

gdalle commented Aug 16, 2022

PS: what is github.nowall.world? GraphsOptim.jl seems to be listed both there and at github.com. This is the first I've seen of this, and can't find any information on it.

Probably a random mirror?

@gdalle
Copy link
Member

gdalle commented Aug 16, 2022

Also mentioning https://github.com/somacdivad/GraphInvariants.jl/

@gdalle gdalle added the enhancement New feature or request label Nov 20, 2022
@gdalle
Copy link
Member

gdalle commented Jun 28, 2023

Closing to follow up in GraphsOptim

@gdalle gdalle closed this as completed Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants