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
Call by reference: Arguments to a function can be passed in two way; one by call by value and other by call by reference.  Call by value is passed either through a constant

Write a program to illustrate array of structures? struct customer { int id; char name[15]; }; struct customer c[100]; . In the above instance, the array of Structures is

Write C code for a program that implements a digital clock (HH:MM:SS). The clock includes a two-digit hour indicator HH (00-23), a two-digit minute indicator MM (00-59), and a t

What is the difference between an external iterator and an internal iterator? Ans) An internal iterator is executed with member functions of the class that has items to step th

what is the purpose of pointer ? what is the syntax? how it works?

Project Description: I want someone to create and install a keylogger on a chrome browser. This could be a relatively simple job, please have experience with this type of work.

Assignment:  write a C program and a MASM procedure.  The C program calls the MASM procedure to perform letter case conversion. Text sections covered:  12.1 to 12.3.1 Write a


Is it possible to pass an entire structure to functions? Yes, it's possible to pass an entire structure to a function in a call by method style. Some programmers prefer to decl

.Develop a two dimensional interactive game with the following features: 1. Use OpenGL (any version you find convenient) 2. The game can either be two player or one player with the