Skip to content

An Ant-colony optimisation metaheuristic graph colouring function. #2249

@professorcode1

Description

@professorcode1

A function that takes undirected graphs and performs graph colouring using the Ant-colony optimisation meta-heuristic. It will take as argument

  1. The undirected graph
  2. Optionally it can take a list of list of nodes where for each list: the nodes inside the list must have consecutive colours i.e.
    [
    [1,2,6],
    [7,8]
    ] the 1,2 and 6 must have consecutive colours and 7 and 8 must have consecutive colours.
  3. Optionally it can take a map that maps a node to a list of colours, such that the node cannot take any value inside the list as a colour. i.e
    {
    1 => [5,7]
    2 => [1,2,3]
    }
    Then for all attempted colouring's, 5,7 will not be assigned to node 1 as colours.
  4. Optional argument K, the number of colours to attempt to colour the graph with. If not provided the algorithm will start with K = K_start and attempt to reduce K to a smaller value till valid colouring's can be found for that K.
  5. Optional argument K_start, if not provided will be equal to the number of nodes in the graph.

Uses

This function would be useful as without any of the optional arguments it can be used to estimate the chromatic number of the graph, and with the optional arguments it can be used to perform scheduling.

References

I have already implemented this function (all be it poorly) for a college project
https://github.com/professorcode1/College-Time-Table-Scheduler
using the following paper
https://www.researchgate.net/publication/249906915_A_New_Ant_Algorithm_for_Graph_Coloring
Please accept this feature request and assign it to me as I would like to add it to the library with proper code.

Metadata

Metadata

Labels

wishlistFeature request that has not been chosen for implementation yet; vote or comment to prioritize it!

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions