Skip to content

Backtracking Sequential Coloring #52

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

Merged
merged 21 commits into from
Jul 29, 2019
Merged

Conversation

pkj-m
Copy link
Contributor

@pkj-m pkj-m commented Jul 19, 2019

BSC is a coloring algorithm which gives a complete tight coloring of the graph using minimum number of colors possible ( x(G) , the chromatic number of graph G)
Currently I am using this paper as a reference.

Unit tests for only those functions which are not immediately obvious have been added, and tests for the main function will be added once the function starts working as intended.

#29

@pkj-m pkj-m changed the title [WIP] Backtracking Sequential Coloring Backtracking Sequential Coloring Jul 20, 2019
index = i
break
end
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible that index=-1 after the loop?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Since x is a vertex in the graph, we can be sure that it'll be present in vector A as well. So index would always lie between [1, nv(g)] once that code block executes.

Copy link
Contributor

@matbesancon matbesancon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, @ChrisRackauckas I think this can be merged

Project.toml Outdated
@@ -12,6 +12,7 @@ LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SparsityDetection = "684fba80-ace3-11e9-3d08-3bc7ed6f96df"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need SparsityDetection? And why in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for pointing it out. I added it at some point because I thought its absence was breaking my tests (it wasn't) and forgot to remove it from the list of dependencies afterward.
Fixed.

@pkj-m
Copy link
Contributor Author

pkj-m commented Jul 29, 2019

@ChrisRackauckas Can we merge this now? I want to start pushing the code for the next coloring algorithm so it'd be nice if we can close this.

@ChrisRackauckas
Copy link
Member

Looks great! The latest email was still saying WIP for some reason so I just ignored it since I'm behind from JuliaCon work.

@ChrisRackauckas ChrisRackauckas merged commit bf44735 into JuliaDiff:master Jul 29, 2019
@pkj-m pkj-m deleted the bsc branch July 29, 2019 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants