s: ☿ ♁ ♃ ♄ ♅ ♆ ♇ E(s): 000 001 010 011 100 101 110
E(♁ ♄ ♃ ♁ ♇) = 000011010000110
E 0.28 A 0.18 I 0.15 S 0.13 D 0.10 U 0.06 C 0.05 P 0.04
E 01 A 11 I 001 S 100 D 101 U 0001 C 00001 P 00000
(0.27 + 0.17)2 + (0.15 + 0.13 + 0.10)3 + 0.06*4 + (0.05 + 0.04)5 = 0.44*2 + 0.38*3 + 0.06*4 + 0.9*5 = 0.88 + 1.14 + 0.24 + 0.45 = 2.71 bits/symbol
| E | A | I | S | D | U | C | P |
| 0.28 | 0.18 | 0.15 | 0.13 | 0.11 | 0.06 | 0.05 | 0.04 |
| E | A | I | S | D | CP | U | |
| 0.28 | 0.18 | 0.15 | 0.13 | 0.11 | 0.09 | 0.06 | |
| E | A | I | CPU | S | D | ||
| 0.28 | 0.18 | 0.15 | 0.15 | 0.13 | 0.11 | ||
| E | SD | A | I | CPU | |||
| 0.28 | 0.24 | 0.18 | 0.15 | 0.15 | |||
| ICPU | E | SD | A | ||||
| 0.30 | 0.28 | 0.24 | 0.18 | ||||
| SDA | ICPU | E | |||||
| 0.42 | 0.30 | 0.28 | |||||
| ICPUE | SDA | ||||||
| 0.58 | 0.42 | ||||||
| ICPUESDA | |||||||
| 1.00 |
|
|
|
|
|
|
|
|
|
set consolidate-simple(towns)
schools = { }
for t in towns
if not covered(t, schools)
schools ∪= { t }
return schools

set consolidate-uncovered(towns)
schools = { }
for towns uncovered
t = unpicked town with largest number
of uncovered neighbors
schools ∪= { t }
return schools


consolidate-simple(), but pick any road connecting two
uncovered towns.
set consolidate-paired(towns)
schools = { }
for towns uncovered
r = a road connecting uncovered
t1 and t2
schools ∪= { t1, t2 }
return schools
consolidation-simple() and consolidation-uncovered()
solutions are at most O(log n) away from optimal.
consolidation-pair() solutions are at most 2 away from optimal.