|
Algorithm 1 Coding tree with height k via structural entropy minimization. |
Input: a graph , a positive integer
Output: a coding tree T with height k
-
1:
Generate a coding tree T with a root node and all nodes in as leaf nodes;
-
2:
// Stage 1: Bottom to top construction;
-
3:
whiledo
-
4:
Select and from , conditioned on
;
-
5:
;
-
6:
end while
-
7:
// Stage 2: Compress T to the certain height k;
-
8:
while do
-
9:
Select from T, conditioned on
;
-
10:
;
-
11:
end while
-
12:
// Stage 3: Fill T to avoid cross-layer links;
-
13:
for do
-
14:
if
then
-
15:
insert a new node between and ;
-
16:
end if
-
17:
end for
-
18:
return T;
|