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

3 . Write a ‘C’ program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.

Q: How can one encourage his (older) compiler to check new to see automatically if it returns NULL?       A: His compiler eventually will. If he contain an old compiler wh

draw the flow chart to print the fibonacci series upto n th terms


Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Write in a file: void main() { int i,j,k,l,list[1000]; FILE *fp; char any[8];   cout cin >> any;   fp = fopen(any,"wb");     for(j=0;j     {

padovan string generation till 40

Pointers to Objects Passing and returning of objects is, though, not very efficient since it includes passing and returning a copy of the data members. This problem can be elim

implement two stacks in one array A[1...n] in such a way that neither stack overflows unless the total number of elements in both stacks together is n. For this you need to produce