Board Coloring , C/C++ Programming

In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color.
Fill the other elements in the board, such that none of the adjacent elements (vertically, horizontally and diagonally) should be of the same color.
Find out the minimum number of colors that should be used to fill the blank spaces in the board, so that the above condition is met.
Color representation is -: 0, 1, 2, 3, 4, 5, 6, 7…………………….
There is sample board:

For Example:
Given Board :

Matrix representation of board is :
[ _ 1 _ _ ]
[ 2 _ _ _ ]
[ _ _ 2 _ ]
[ 2 _ _ _ ]
here blank space is represented by ''_'' .
Minimum colors to fill this board (given in the picture)is 4.
Posted Date: 8/30/2012 5:23:08 AM | Location : United States







Related Discussions:- Board Coloring , Assignment Help, Ask Question on Board Coloring , Get Answer, Expert's Help, Board Coloring Discussions

Write discussion on Board Coloring
Your posts are moderated
Related Questions
How to write a global inline function First, let's get away from member functions for a moment and consider a global function.  To make a request that this function be in line:

Bit-wise Operators Some applications require operations to be done on dissimilar bits of a byte separately. Bit-wise operators offer a facility to do just that. There are vario

Program is to perform all the functions that are performed in a super bazaar: class stock   {   private:     int itno;     char itname[20];     char brname[20];

Draw a flowchart for a program that allows the user to enter 20 names along with their ages and their Social Security Numbers in three parallel arrays. Programs shou

This assignment document will be distributed from Blackboard assignment folder. Some parts of the assignments will require you to research answers from your text book (you must rea

algorithm to find whether a given number is prime number or not? using pseudo code and flowchart

What is Namespace and Explicit container Namespace - Namespaces are used to group entities such as objects, classes and functions under a name. Explicit container.

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

write a program to calculate the cuboid

Compiler Design - Limit In The Method Instructions