Skip to content

Instantly share code, notes, and snippets.

@t3t5u
Last active November 5, 2015 14:11
Show Gist options
  • Save t3t5u/d0c1f87c7bc6f3bf8965 to your computer and use it in GitHub Desktop.
Save t3t5u/d0c1f87c7bc6f3bf8965 to your computer and use it in GitHub Desktop.
Tree (After)
Root| Node| EagerPeers| LazyPeers
----+-----+-------------------------------------+-------------------------------------------
1| 1| [ 11, 12, 111, 112]| [1111, 1122, 1211, 1222]
| 11| [ 1, 1112]| [ 111, 121, 122, 1111, 1122, 1211]
| 12| [ 1, 1121, 1122, 1211, 1212]| [ 112, 122, 1111]
| 111| [ 1, 1221, 1222]| [ 11, 112, 1112, 1121, 1211]
| 112| [ 1, 121]| [ 12, 111, 1112, 1212, 1221]
| 121| [ 112]| [ 11, 122, 1111, 1112, 1121, 1122, 1212]
| 122| [1212]| [ 11, 12, 121, 1112, 1122, 1211, 1221]
| 1111| [1212]| [ 1, 11, 12, 121, 1121, 1222]
| 1112| [ 11]| [ 111, 112, 121, 122, 1111, 1121, 1221]
| 1121| [ 12]| [ 111, 121, 1111, 1112, 1122, 1221]
| 1122| [ 12]| [ 121, 122, 1121, 1211, 1212, 1221, 1222]
| 1211| [ 12]| [ 1, 11, 111, 122, 1122, 1221, 1222]
| 1212| [ 12, 122, 1111]| [ 112, 121, 1122, 1211, 1222]
| 1221| [ 111]| [ 122, 1111, 1112, 1121, 1122, 1211, 1222]
| 1222| [ 111]| [ 1, 1111, 1122, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [ 12, 111, 112, 1222]| [ 11, 1111, 1122, 1211]
11| 11| [ 121, 122, 1111, 1112, 1122]| [ 1, 111, 1211]
| 12| [ 1]| [ 112, 122, 1111, 1121, 1122, 1211, 1212]
| 111| [ 1]| [ 11, 112, 1112, 1121, 1211, 1221, 1222]
| 112| [ 1]| [ 12, 111, 121, 1112, 1212, 1221]
| 121| [ 11, 1121]| [ 112, 122, 1111, 1112, 1122, 1212]
| 122| [ 11]| [ 121, 1112, 1122, 1211, 1212, 1221]
| 1111| [ 11]| [ 1, 12, 121, 1121, 1212, 1222]
| 1112| [ 11]| [ 111, 112, 121, 122, 1111, 1121, 1221]
| 1121| [ 121]| [ 12, 111, 1111, 1112, 1122, 1221]
| 1122| [ 11, 1211, 1212, 1221, 1222]| [ 12, 121, 122, 1121]
| 1211| [1122]| [ 1, 11, 12, 111, 122, 1221, 1222]
| 1212| [1122]| [ 12, 112, 121, 122, 1111, 1211, 1222]
| 1221| [1122]| [ 111, 122, 1111, 1112, 1121, 1211, 1222]
| 1222| [ 1, 1122]| [ 111, 1111, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [1222]| [ 11, 12, 111, 112, 1111, 1122, 1211]
| 11| [1211]| [ 1, 111, 121, 122, 1111, 1112, 1122]
12| 12| [1121, 1122, 1211, 1212]| [ 1, 112, 122, 1111]
| 111| [ 112]| [ 1, 11, 1112, 1121, 1211, 1221, 1222]
| 112| [ 111, 1212]| [ 1, 12, 121, 1112, 1221]
| 121| [1112, 1212]| [ 11, 112, 122, 1111, 1121, 1122]
| 122| [1212]| [ 11, 121, 1112, 1122, 1211, 1221]
| 1111| [1212]| [ 1, 11, 12, 121, 1121, 1222]
| 1112| [ 121]| [ 11, 111, 112, 122, 1111, 1121, 1221]
| 1121| [ 12]| [ 111, 121, 1111, 1112, 1122, 1221]
| 1122| [ 12, 1221, 1222]| [ 121, 122, 1121, 1211, 1212]
| 1211| [ 11, 12]| [ 1, 111, 122, 1122, 1221, 1222]
| 1212| [ 12, 112, 121, 122, 1111]| [1122, 1211, 1222]
| 1221| [1122]| [ 111, 122, 1111, 1112, 1121, 1211, 1222]
| 1222| [ 1, 1122]| [ 111, 1111, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [ 12, 111, 112]| [ 11, 1111, 1122, 1211, 1222]
| 11| [ 111, 122, 1111, 1112]| [ 1, 121, 1122, 1211]
| 12| [ 1]| [ 112, 122, 1111, 1121, 1122, 1211, 1212]
111| 111| [ 1, 11, 1221, 1222]| [ 112, 1112, 1121, 1211]
| 112| [ 1, 121]| [ 12, 111, 1112, 1212, 1221]
| 121| [ 112]| [ 11, 122, 1111, 1112, 1121, 1122, 1212]
| 122| [ 11]| [ 121, 1112, 1122, 1211, 1212, 1221]
| 1111| [ 11]| [ 1, 12, 121, 1121, 1212, 1222]
| 1112| [ 11]| [ 111, 112, 121, 122, 1111, 1121, 1221]
| 1121| [1221]| [ 12, 111, 121, 1111, 1112, 1122]
| 1122| [1221]| [ 12, 121, 122, 1121, 1211, 1212, 1222]
| 1211| [1221]| [ 1, 11, 12, 111, 122, 1122, 1222]
| 1212| [1222]| [ 12, 112, 121, 122, 1111, 1122, 1211]
| 1221| [ 111, 1121, 1122, 1211]| [ 122, 1111, 1112, 1222]
| 1222| [ 111, 1212]| [ 1, 1111, 1122, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [ 111]| [ 11, 12, 112, 1111, 1122, 1211, 1222]
| 11| [ 111]| [ 1, 121, 122, 1111, 1112, 1122, 1211]
| 12| [ 112]| [ 1, 122, 1111, 1121, 1122, 1211, 1212]
| 111| [ 1, 11, 112, 1221, 1222]| [1112, 1121, 1211]
112| 112| [ 12, 111, 121]| [ 1, 1112, 1212, 1221]
| 121| [ 112, 122, 1111, 1112, 1121]| [ 11, 1122, 1212]
| 122| [ 121, 1122, 1212]| [ 11, 1112, 1211, 1221]
| 1111| [ 121]| [ 1, 11, 12, 1121, 1212, 1222]
| 1112| [ 121]| [ 11, 111, 112, 122, 1111, 1121, 1221]
| 1121| [ 121]| [ 12, 111, 1111, 1112, 1122, 1221]
| 1122| [ 122]| [ 12, 121, 1121, 1211, 1212, 1221, 1222]
| 1211| [1221]| [ 1, 11, 12, 111, 122, 1122, 1222]
| 1212| [ 122]| [ 12, 112, 121, 1111, 1122, 1211, 1222]
| 1221| [ 111, 1211]| [ 122, 1111, 1112, 1121, 1122, 1222]
| 1222| [ 111]| [ 1, 1111, 1122, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [ 112, 1111]| [ 11, 12, 111, 1122, 1211, 1222]
| 11| [1111]| [ 1, 111, 121, 122, 1112, 1122, 1211]
| 12| [1111]| [ 1, 112, 122, 1121, 1122, 1211, 1212]
| 111| [ 112]| [ 1, 11, 1112, 1121, 1211, 1221, 1222]
| 112| [ 1, 111]| [ 12, 121, 1112, 1212, 1221]
121| 121| [ 122, 1111, 1112, 1121]| [ 11, 112, 1122, 1212]
| 122| [ 121, 1122, 1211]| [ 11, 1112, 1212, 1221]
| 1111| [ 1, 11, 12, 121, 1222]| [1121, 1212]
| 1112| [ 121]| [ 11, 111, 112, 122, 1111, 1121, 1221]
| 1121| [ 121]| [ 12, 111, 1111, 1112, 1122, 1221]
| 1122| [ 122]| [ 12, 121, 1121, 1211, 1212, 1221, 1222]
| 1211| [ 122]| [ 1, 11, 12, 111, 1122, 1221, 1222]
| 1212| [1222]| [ 12, 112, 121, 122, 1111, 1122, 1211]
| 1221| [1222]| [ 111, 122, 1111, 1112, 1121, 1122, 1211]
| 1222| [1111, 1212, 1221]| [ 1, 111, 1122]
----+-----+-------------------------------------+-------------------------------------------
| 1| [1211]| [ 11, 12, 111, 112, 1111, 1122, 1222]
| 11| [1211]| [ 1, 111, 121, 122, 1111, 1112, 1122]
| 12| [1211]| [ 1, 112, 122, 1111, 1121, 1122, 1212]
| 111| [ 112, 1222]| [ 1, 11, 1112, 1121, 1211, 1221]
| 112| [ 111, 1212]| [ 1, 12, 121, 1112, 1221]
| 121| [1212]| [ 11, 112, 122, 1111, 1112, 1121, 1122]
122| 122| [1122, 1211, 1212, 1221]| [ 11, 121, 1112]
| 1111| [1212]| [ 1, 11, 12, 121, 1121, 1222]
| 1112| [1221]| [ 11, 111, 112, 121, 122, 1111, 1121]
| 1121| [1221]| [ 12, 111, 121, 1111, 1112, 1122]
| 1122| [ 122]| [ 12, 121, 1121, 1211, 1212, 1221, 1222]
| 1211| [ 1, 11, 12, 122]| [ 111, 1122, 1221, 1222]
| 1212| [ 112, 121, 122, 1111]| [ 12, 1122, 1211, 1222]
| 1221| [ 122, 1112, 1121]| [ 111, 1111, 1122, 1211, 1222]
| 1222| [ 111]| [ 1, 1111, 1122, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [ 111, 112, 1111]| [ 11, 12, 1122, 1211, 1222]
| 11| [ 122, 1111, 1112]| [ 1, 111, 121, 1122, 1211]
| 12| [1111]| [ 1, 112, 122, 1121, 1122, 1211, 1212]
| 111| [ 1, 1221]| [ 11, 112, 1112, 1121, 1211, 1222]
| 112| [ 1, 121]| [ 12, 111, 1112, 1212, 1221]
| 121| [ 112]| [ 11, 122, 1111, 1112, 1121, 1122, 1212]
| 122| [ 11, 1212]| [ 121, 1112, 1122, 1211, 1221]
1111| 1111| [ 1, 11, 12, 1222]| [ 121, 1121, 1212]
| 1112| [ 11]| [ 111, 112, 121, 122, 1111, 1121, 1221]
| 1121| [1221]| [ 12, 111, 121, 1111, 1112, 1122]
| 1122| [1221]| [ 12, 121, 122, 1121, 1211, 1212, 1222]
| 1211| [1221]| [ 1, 11, 12, 111, 122, 1122, 1222]
| 1212| [ 122]| [ 12, 112, 121, 1111, 1122, 1211, 1222]
| 1221| [ 111, 1121, 1122, 1211]| [ 122, 1111, 1112, 1222]
| 1222| [1111]| [ 1, 111, 1122, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [ 12, 111]| [ 11, 112, 1111, 1122, 1211, 1222]
| 11| [ 111, 1111]| [ 1, 121, 122, 1112, 1122, 1211]
| 12| [ 1]| [ 112, 122, 1111, 1121, 1122, 1211, 1212]
| 111| [ 1, 11, 1112, 1221, 1222]| [ 112, 1121, 1211]
| 112| [1112]| [ 1, 12, 111, 121, 1212, 1221]
| 121| [1112]| [ 11, 112, 122, 1111, 1121, 1122, 1212]
| 122| [1112]| [ 11, 121, 1122, 1211, 1212, 1221]
| 1111| [ 11]| [ 1, 12, 121, 1121, 1212, 1222]
1112| 1112| [ 111, 112, 121, 122]| [ 11, 1111, 1121, 1221]
| 1121| [1221]| [ 12, 111, 121, 1111, 1112, 1122]
| 1122| [1221]| [ 12, 121, 122, 1121, 1211, 1212, 1222]
| 1211| [1221]| [ 1, 11, 12, 111, 122, 1122, 1222]
| 1212| [1222]| [ 12, 112, 121, 122, 1111, 1122, 1211]
| 1221| [ 111, 1121, 1122, 1211]| [ 122, 1111, 1112, 1222]
| 1222| [ 111, 1212]| [ 1, 1111, 1122, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [1211]| [ 11, 12, 111, 112, 1111, 1122, 1222]
| 11| [1211]| [ 1, 111, 121, 122, 1111, 1112, 1122]
| 12| [1211]| [ 1, 112, 122, 1111, 1121, 1122, 1212]
| 111| [1211]| [ 1, 11, 112, 1112, 1121, 1221, 1222]
| 112| [1212]| [ 1, 12, 111, 121, 1112, 1221]
| 121| [ 122, 1122]| [ 11, 112, 1111, 1112, 1121, 1212]
| 122| [ 121]| [ 11, 1112, 1122, 1211, 1212, 1221]
| 1111| [1121]| [ 1, 11, 12, 121, 1212, 1222]
| 1112| [1121]| [ 11, 111, 112, 121, 122, 1111, 1221]
1121| 1121| [1111, 1112, 1122]| [ 12, 111, 121, 1221]
| 1122| [ 121, 1121, 1211, 1212, 1221, 1222]| [ 12, 122]
| 1211| [ 1, 11, 12, 111, 1122]| [ 122, 1221, 1222]
| 1212| [ 112, 1122]| [ 12, 121, 122, 1111, 1211, 1222]
| 1221| [1122]| [ 111, 122, 1111, 1112, 1121, 1211, 1222]
| 1222| [1122]| [ 1, 111, 1111, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [ 11, 12, 111, 1222]| [ 112, 1111, 1122, 1211]
| 11| [ 1]| [ 111, 121, 122, 1111, 1112, 1122, 1211]
| 12| [ 1]| [ 112, 122, 1111, 1121, 1122, 1211, 1212]
| 111| [ 1]| [ 11, 112, 1112, 1121, 1211, 1221, 1222]
| 112| [1212]| [ 1, 12, 111, 121, 1112, 1221]
| 121| [1112, 1121, 1212]| [ 11, 112, 122, 1111, 1122]
| 122| [1212]| [ 11, 121, 1112, 1122, 1211, 1221]
| 1111| [1212]| [ 1, 11, 12, 121, 1121, 1222]
| 1112| [ 121]| [ 11, 111, 112, 122, 1111, 1121, 1221]
| 1121| [ 121]| [ 12, 111, 1111, 1112, 1122, 1221]
1122| 1122| [1211, 1212, 1221, 1222]| [ 12, 121, 122, 1121]
| 1211| [1122]| [ 1, 11, 12, 111, 122, 1221, 1222]
| 1212| [ 112, 121, 122, 1111, 1122]| [ 12, 1211, 1222]
| 1221| [1122]| [ 111, 122, 1111, 1112, 1121, 1211, 1222]
| 1222| [ 1, 1122]| [ 111, 1111, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [ 112, 1211]| [ 11, 12, 111, 1111, 1122, 1222]
| 11| [ 121, 122, 1111, 1112, 1211]| [ 1, 111, 1122]
| 12| [1211]| [ 1, 112, 122, 1111, 1121, 1122, 1212]
| 111| [1211, 1221, 1222]| [ 1, 11, 112, 1112, 1121]
| 112| [ 1]| [ 12, 111, 121, 1112, 1212, 1221]
| 121| [ 11, 1121]| [ 112, 122, 1111, 1112, 1122, 1212]
| 122| [ 11, 1122, 1212]| [ 121, 1112, 1211, 1221]
| 1111| [ 11]| [ 1, 12, 121, 1121, 1212, 1222]
| 1112| [ 11]| [ 111, 112, 121, 122, 1111, 1121, 1221]
| 1121| [ 121]| [ 12, 111, 1111, 1112, 1122, 1221]
| 1122| [ 122]| [ 12, 121, 1121, 1211, 1212, 1221, 1222]
1211| 1211| [ 1, 11, 12, 111]| [ 122, 1122, 1221, 1222]
| 1212| [ 122]| [ 12, 112, 121, 1111, 1122, 1211, 1222]
| 1221| [ 111]| [ 122, 1111, 1112, 1121, 1122, 1211, 1222]
| 1222| [ 111]| [ 1, 1111, 1122, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [1222]| [ 11, 12, 111, 112, 1111, 1122, 1211]
| 11| [1111]| [ 1, 111, 121, 122, 1112, 1122, 1211]
| 12| [ 112]| [ 1, 122, 1111, 1121, 1122, 1211, 1212]
| 111| [ 112]| [ 1, 11, 1112, 1121, 1211, 1221, 1222]
| 112| [ 12, 111, 1212]| [ 1, 121, 1112, 1221]
| 121| [1111, 1112, 1121, 1212]| [ 11, 112, 122, 1122]
| 122| [1122, 1211, 1212, 1221]| [ 11, 121, 1112]
| 1111| [ 11, 121]| [ 1, 12, 1121, 1212, 1222]
| 1112| [ 121]| [ 11, 111, 112, 122, 1111, 1121, 1221]
| 1121| [ 121]| [ 12, 111, 1111, 1112, 1122, 1221]
| 1122| [ 122, 1222]| [ 12, 121, 1121, 1211, 1212, 1221]
| 1211| [ 122]| [ 1, 11, 12, 111, 1122, 1221, 1222]
1212| 1212| [ 112, 121, 122]| [ 12, 1111, 1122, 1211, 1222]
| 1221| [ 122]| [ 111, 1111, 1112, 1121, 1122, 1211, 1222]
| 1222| [ 1, 1122]| [ 111, 1111, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [1211]| [ 11, 12, 111, 112, 1111, 1122, 1222]
| 11| [1111]| [ 1, 111, 121, 122, 1112, 1122, 1211]
| 12| [1211]| [ 1, 112, 122, 1111, 1121, 1122, 1212]
| 111| [1112, 1222]| [ 1, 11, 112, 1121, 1211, 1221]
| 112| [1112]| [ 1, 12, 111, 121, 1212, 1221]
| 121| [1112]| [ 11, 112, 122, 1111, 1121, 1122, 1212]
| 122| [1112]| [ 11, 121, 1122, 1211, 1212, 1221]
| 1111| [ 11, 1121]| [ 1, 12, 121, 1212, 1222]
| 1112| [ 111, 112, 121, 122, 1221]| [ 11, 1111, 1121]
| 1121| [1111, 1221]| [ 12, 111, 121, 1112, 1122]
| 1122| [1212, 1221]| [ 12, 121, 122, 1121, 1211, 1222]
| 1211| [ 1, 12, 1221]| [ 11, 111, 122, 1122, 1222]
| 1212| [1122]| [ 12, 112, 121, 122, 1111, 1211, 1222]
1221| 1221| [1112, 1121, 1122, 1211]| [ 111, 122, 1111, 1222]
| 1222| [ 111]| [ 1, 1111, 1122, 1212, 1221]
----+-----+-------------------------------------+-------------------------------------------
| 1| [ 11, 12, 111, 112, 1222]| [1111, 1122, 1211]
| 11| [ 1]| [ 111, 121, 122, 1111, 1112, 1122, 1211]
| 12| [ 1]| [ 112, 122, 1111, 1121, 1122, 1211, 1212]
| 111| [ 1]| [ 11, 112, 1112, 1121, 1211, 1221, 1222]
| 112| [ 1]| [ 12, 111, 121, 1112, 1212, 1221]
| 121| [1112]| [ 11, 112, 122, 1111, 1121, 1122, 1212]
| 122| [1212]| [ 11, 121, 1112, 1122, 1211, 1221]
| 1111| [1212]| [ 1, 11, 12, 121, 1121, 1222]
| 1112| [ 121, 1221]| [ 11, 111, 112, 122, 1111, 1121]
| 1121| [1221]| [ 12, 111, 121, 1111, 1112, 1122]
| 1122| [1221]| [ 12, 121, 122, 1121, 1211, 1212, 1222]
| 1211| [1221]| [ 1, 11, 12, 111, 122, 1122, 1222]
| 1212| [ 122, 1111, 1222]| [ 12, 112, 121, 1122, 1211]
| 1221| [1112, 1121, 1122, 1211, 1222]| [ 111, 122, 1111]
1222| 1222| [ 1, 1212, 1221]| [ 111, 1111, 1122]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment