Git Product home page Git Product logo

chromnum's Introduction

chromnum

Authors: Abhirup Bandyopadhyay, Amit Kumar Dhar and Sankar Basu *

* Author for all correspondence

(c) Indian Copyright filed, Diary Number. 4955/2018-CO/SW, Filed. April, 2018

Funding: The work was supported by the Department of Science and Technology – Science and Engineering Research Board (DST-SERB research grant PDF/2015/001079)

Cite: Bandyopadhyay, A.; Dhar, A.K. Basu, S.; Graph coloring: a novel heuristic based on trailing path — properties, perspective and applications in structured networks. Soft Computing, 2019, https://doi.org/10.1007/s00500-019-04278-8

Requires: Octave or MATLAB (version R2016a or higher)

Installation

git clone https://github.com/nemo8130/Chromnum
cd Chromnum
run the script chromnum.m / chromnum_octave.m in MATLAB command window / chromnum_octave.m in Octave as a function with a single input argument
which is the filename (with full path / locally from the current directory) containing the adjacency matrix
% Chromnum computes the chromatic number of a graph 
% Chromatic Number of a graph is the minimum number of colors by whcih 
% All nodes of the graph could be exhaustively mapped so that no two adjacent nodes share the same color. 
% Chromnum implements a novel trailing path meta-heuristic approximation algorithm
% The function takes the 1-0 adjacency matrix stored in a text file as its sole input argument
% And returns the chromatic number of the corresponding graph

Usage: crn = chromnum('examples/adj.inp')

Usage: crn = chromnum_octave('examples/adj.inp')

Run the command 'help chromnum' or 'help chromnum_octave' to get familiarized with the different options:: The default mode is Graphical. But the user can also turn-off the graphics (in case of say, batch jobs) and also controll the number of finite iterations (particularly helpful for higher dimensional regular graphs)

% It also generates one color map for the graph and tabulates the same 
% Please note that this color map could be degenerate but the chromatic
% number should be identical 
% Furthermore it also returns the order at which the nodes have been
% colored. Again this may have degenerate solutions.
%
% Example adjacency matrix file :
% (Each row should contain the adjacencies of one node in the graph)
% (The matrix entries should be separated by a single white-space)
%
% 0 1 1 0 1
% 1 0 0 1 1
% 1 0 0 0 1
% 0 1 0 0 1
% 1 1 1 1 0
% 
% OUTPUT:
% Number of Nodes in the given undirected graph : 5
% Number of edges : 7 
% Chromatic Number : 3 

% Proposed Colormap:
% ------------------
% Node-1 : color-3
% Node-2 : color-2
% Node-3 : color-2
% Node-4 : color-3
% Node-5 : color-1
%


chromnum's People

Contributors

nemo8130 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.