Root tree enumeration and Its Application in LSI analysis and identification and Program Arrangement simplification
(Enumeration problemsCompleted by a student as a graduation thesis. I wrote the Application Section)
Root tree Enumeration
Requirement: write a program that includes {n} and {Non-standard root tree} A 1-1 correspondence is established between all elements.
|
The following table lists natural numbers.N = 1... 18Corresponding18Non-standard root tree imagesG (N)For reference.
|
|
Points (k) |
Corresponding root tree graph G (N) |
Branch (B) |
Depth (d) |
String description |
1 |
1 |
0 |
0 |
0 |
2 |
2 |
1 |
1 |
1 |
3 |
3 |
1 + 1 |
1 |
1 + 1 |
4 |
3 |
2 + 0 |
2 |
2 + 0 |
5 |
4 |
1 + 1 + 1 |
1 |
1 + 1 + 1 |
6 |
4 |
2 + 1 + 0 |
2 |
2 + 1 + 0 |
7 |
4 |
3 + 0 + 0 |
2 |
|
8 |
4 |
3 + 0 + 0 |
3 |
|
9 |
5 |
1 + 1 + 1 + 1 |
1 |
|
10 |
5 |
2 + 1 + 1 + 0 |
2 |
|
11 |
5 |
2 + 2 + 0 + 0 |
2 |
|
12 |
5 |
3 + 1 + 0 + 0 |
2 |
|
13 |
5 |
3 + 1 + 0 + 0 |
3 |
|
14 |
5 |
4 + 0 + 0 + 0 |
2 |
|
15 |
5 |
4 + 0 + 0 + 0 |
3 |
|
16 |
5 |
4 + 0 + 0 + 0 |
3 |
|
17 |
5 |
4 + 0 + 0 + 0 |
4 |
|
18 |
6 |
? |
1 + 1 + 1 + 1 + 1 |
1 |
|
19 |
6 |
? |
? |
? |
|
Root Tree Graph G (n) Branch (B) depth (d) corresponding to the number of natural numbers (n) nodes (k) string Description: 1100022111331 + 111 + 1432 + 022 + 0541 + 1 + 111 + 1 + 1642 + 1 + 022 + 1 + 0743 + 0 + 02 843 + 0 + 03 951 + 1 + 1 + 11 1052 + 1 + 1 + 02 1152 + 2 + 0 + 02 1253 + 1 + 0 + 02 1353 + 1 + 0 + 03 1454 + 0 + 0 + 02 1554 + 0 + 0 + 03 1654 + 0 + 0 + 03 1754 + 0 + 0 + 04 186? 1 + 1 + 1 + 1 + 11 196 ??? [NOTE 1]
[NOTE 1] given that the root tree is not calibrated, only one tree that can be symmetric and overlapped after the left and right sides is considered. Therefore, the number of nodes in the left branches of all the root trees is always greater than or equal to that on the right. |
[NOTE 2] You can determine the 1-1 encoding to use. The adopted encoding rules are as follows: * The larger the number of nodes in the tree, the larger the tree corresponds. * If the number of nodes is the same, the larger the depth of the tree, the larger the encoding. * If the number of knots is the same as the depth, the code of multiple deep nodes is large. |
[NOTE 3] If you can solve the enumeration of the calibrated root tree, you can also participate in the discussion. |
|
Reply to me |
Natural Number (N) |
Number of nodes (k) |
Corresponding root tree graph G (N) |
Branch (B) |
Depth (d) |
String description |
1 |
1 |
|
0 |
0 |
0 |
2 |
2 |
|
1 |
1 |
1 |
3 |
3 |
|
1 + 1 |
1 |
1 + 1 |
4 |
3 |
|
2 + 0 |
2 |
2 + 0 |
5 |
4 |
|
1 + 1 + 1 |
1 |
1 + 1 + 1 |
6 |
4 |
|
2 + 1 + 0 |
2 |
2 + 1 + 0 |
7 |
4 |
|
3 + 0 + 0 |
2 |
|
8 |
4 |
|
3 + 0 + 0 |
3 |
|
9 |
5 |
|
1 + 1 + 1 + 1 |
1 |
|
10 |
5 |
|
2 + 1 + 1 + 0 |
2 |
|
11 |
5 |
|
2 + 2 + 0 + 0 |
2 |
|
12 |
5 |
|
3 + 1 + 0 + 0 |
2 |
|
13 |
5 |
|
3 + 1 + 0 + 0 |
3 |
|
14 |
5 |
|
4 + 0 + 0 + 0 |
2 |
|
15 |
5 |
|
4 + 0 + 0 + 0 |
3 |
|
16 |
5 |
|
4 + 0 + 0 + 0 |
3 |
|
17 |
5 |
|
4 + 0 + 0 + 0 |
4 |
|
18 |
6 |
? |
1 + 1 + 1 + 1 + 1 |
1 |
|
19 |
6 |
? |
? |
? |
|
[NOTE 1]