|
First column |
Second column |
Third column |
Fourth column |
Fifth Column |
Sixth column |
Seventh column |
Eighth column |
Nineth column |
Tenth column |
11th column |
...... |
| First line |
First space
|
Second space |
A third space |
Fourth space |
Fifth space
|
1 |
|
|
|
|
|
|
| Second line |
First space
|
Second space
|
A third space |
Fourth space
|
1 |
|
1 |
|
|
|
|
|
| Third line |
First space
|
Second space
|
A third space |
1 |
|
2 |
|
1 |
|
|
|
|
| Line Four |
First space
|
Second space
|
1 |
|
3 |
|
3 |
|
1 |
|
|
|
| Line Five |
A third space
|
1 |
|
4 |
|
6 |
|
4 |
|
1 |
|
|
| Line Six |
1 |
|
5 |
|
10 |
|
10 |
|
5 |
|
1 |
|
| ...... |
|
|
|
|
|
|
|
|
|
|
|
|
1. Overview of the Yang Hui Triangle
premise: The number of endpoints and endings per line is 1.
- Each number equals two of the sum above it.
- Each line of numbers is symmetrical, starting from 1 to become larger.
- The number of the nth row has n items.
- The nth row number and 2n-1.
- The number of m in the nth row can be expressed as C (n-1,m-1), which is the number of combinations of m-1 elements taken from n-1 different elements.
- The number of the nth row is equal to the number of n-m+1 and is one of the combinatorial number properties.
- Each number equals the sum of the left and right two digits of the previous line.
2. Java implementation of the Yang Hui Triangle
Java Foundation------Yang Hui Triangle (recursive implementation)