Consider to use the minimum number of color to color the following western states of the United States, and make sure that the neighboring states not colored in the same color. Alaska, Arizona, California, Colorado, Hawaii, Idaho, Montana, Nevada, New Mexico, Oregon, Utah, Washington, Wyoming A. How many colors you have used? B. Use Prolog facts to represent the neighboring relationship and the color of the states. Note, Alaska and Hawaii have no neighboring states, and two states are neighboring if they share an edge of border, not a point of border. C. Write the adjacent rule
PLEASE USE GNU PROLOG. PLEASE DO NOT COPY CODE FROM OTHER SOURCES. THANK YOU.
Consider to use the minimum number of color to color the following western states of the
United States, and make sure that the neighboring states not colored in the same color.
Alaska, Arizona, California, Colorado, Hawaii, Idaho, Montana, Nevada, New Mexico,
Oregon, Utah, Washington, Wyoming
A. How many colors you have used?
B. Use Prolog facts to represent the neighboring relationship and the color of the states. Note,
Alaska and Hawaii have no neighboring states, and two states are neighboring if they share
an edge of border, not a point of border.
C. Write the adjacent rule
D. Write the miscolor rule to make sure that the neighboring states not colored in the same color
E. Write a rule called q :- condition. When testing, typing q will test your miscolor rule
Trending now
This is a popular solution!
Step by step
Solved in 3 steps