Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Coloring graph with prolog.

Status
Not open for further replies.

Cordell

IS-IT--Management
Dec 13, 2002
1
US
I have this assignment. I have some facts:
p(a,[b,d,e]).
p(b,[a,c,d]).
p(c,[b,d]).
p(e,[a]).
This is graph. There are 5 'points', and each point is connetceted with some another(like facts shows). I have to write a program, that calculates minimum number of color for this graph.
Could anyone help me with this?
Thank you so much!
By
Cordell
 


If you go to this site you will find a very useful program with which you can salvage some of the useful code from, it works on the same basis as the project that you describe, by calculating all the possible permutations and selecting the one with the least number of nodes used.....

There are some errors in the code but i'm sure you will be able to debug them yourself....

Understanding the code is the most important thing, prolog is a very simple language if you know what u are doing...

Good Luck.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top