-
September 14th, 2010, 04:51 PM
#1
Algorithm solution
Hi all,
I got a problem to solve - hope anyone can help...
We have 6 circles. Each circle splited into 8 slices. Each slice has its own color.
I should build a peramide in the following structure:
o
oo
ooo
With the following condition:
The color of touching slices must be identical
The output should be arrangment according to the root colors (it changes when I rotate the root).
Thanks!
-
September 14th, 2010, 04:54 PM
#2
Re: Algorithm solution
The pyramid structure should be (ignore the dash):
---o
--oo
-ooo
-
September 14th, 2010, 04:56 PM
#3
Re: Algorithm solution
Last chance...
---0
--00
-000
-
September 14th, 2010, 04:57 PM
#4
-
September 15th, 2010, 06:53 AM
#5
Re: Algorithm solution
Originally Posted by liel2010
We have 6 circles. Each circle splited into 8 slices. Each slice has its own color.
With the following condition:
The color of touching slices must be identical
The output should be arrangment according to the root colors (it changes when I rotate the root).
Seems trivial if each slice has a unique color.
Look into graph coloring algorithms. You can represent the pyramid as a graph where each slice is a vertex and adjacent slices are connected by an edge. Your exact problem seems somewhat different from graph coloring, but it is quite similar.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|