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

exemples of many to many

Write a method (belonging to the TermStructure class) that takes a pointer to an array of bonds and an integer, representing the number of bonds in the array as arguments, and esti

Variable Declaration This declaration of variables in the C language is permitted only in the starting of their block, prior to executable program statements. In C++ declaratio

The Malt Shop restaurant charges $2.99 for burgers, $1.29 for fries, and $1.25 for sodas.  Write a program that allows a restaurant employee to enter an order (the number of bur

Create a mathematical number guessing game. Have the user prompt for the number of games that they want to play. Then each game consists of the following rules. a. The computer

Aim: To implement a program for dynamic data structure(linked list). Code:                       class node {             int data;             node *next;

You have to write a subroutine (assembly language code using NASM) for the following equation.

C Programming and Data Structures 1. Define and explain flow chart with an example. 2. Write an algorithm to print all even numbers in descending order and draw the flowcha

Project Description: Need to develop an expert advisor base on sthocastic oscilator with my own setting.. Very basic touch line OB/OS only but on my setting n condition Skill