Coloring a tree with a minimal sum of colors

The task is to color the vertices of the tree with natural numbers so that the sum of the numbers (colors) assigned to the vertices is minimal.

Can I limit the number of colors?

+3
source share
5 answers

I think three colors are enough for this. How to prove it?

This is not true. We describe the root tree algebraically as follows. V- a tree with one node tree. E(t1, t2)is a tree consisting of t1and t2and an edge from root t1to root t2, root to root t2. The next tree t3requires four colors to reach a minimum of 156.

t3 = E(t2, E(t2, E(t2, E(t2, t2))))
t2 = E(t1, E(t1, E(t1, E(t1, t1))))
t1 = E(t0, E(t0, E(t0, E(t0, t0))))
t0 = V

, , , , , .

d & ge; k & ge; 3, T (d, k) k . T (d, 1) . i > 1 T (d, i) - d , T (d, - 1).

k. k = 3 - , , , 3 . k > 3 T (d, k), k - 1 . , k . - 1, , k d > k - 1 1. 1, , 1, 1. , 1, > 1. , T (d, k - 1), .


data Tree = V | E Tree Tree
    deriving (Eq, Show)

otherMinimums [x, y] = [y, x]
otherMinimums (x:xs) = minimum xs : map (min x) (otherMinimums xs)

color m V = [1..m]
color m (E t1 t2) = let
    c1 = color m t1
    c2 = color m t2 in
    zipWith (+) (otherMinimums c1) c2

t3 = E t2 $ E t2 $ E t2 $ E t2 $ t2
t2 = E t1 $ E t1 $ E t1 $ E t1 $ t1
t1 = E t0 $ E t0 $ E t0 $ E t0 $ t0
t0 = V

:

> color 3 t3
[157,158,163]
> color 4 t3
[157,158,159,156]
+3

-, . , .

-, 2-. . node. , - ..

-, , : node 0, 1, .

+2

2 : .

EDIT: , .

Wobble, .

0
0

2 {0,1} , O (n).

3 {0,1,2} , O (log * (n))

: log * (n)

log * (n) - "log Star n" ,

log * (n) = log (log (log (..... (log * (n))))

log * (n) .

:

1) * (n) = 5 n =

2) Search for the Delaney triangulation of the set of points that know the Euclidean minimal spanning tree: randomized time O (n log * n).

-1
source

All Articles