1
1
mirror of https://github.com/ParkMoonJ/KaoYan.git synced 2026-06-18 09:47:19 +08:00
This commit is contained in:
ParkMoonJ
2021-04-15 09:46:01 +08:00
parent 82b157f0ba
commit af1b1b3ea6
6 changed files with 80 additions and 22 deletions

View File

@@ -42,22 +42,7 @@
### 6.1① 已知一棵树边的集合为 $\{ <I, M>, <I, N>, <E, I>, <B, E>, <B, D>, <A, B>, <G, J>, <G, K>, <C, G>, <C, F>, <H, L>, <C, H>, <A, C> \}$,请画出这棵树,并回答下列问题:
```mermaid
graph TB
A --- B
A --- C
B --- D
B --- E
C --- F
C --- G
C --- H
E --- I
G --- J
G --- K
H --- L
I --- M
I --- N
```
<img src="assets/6.19.png">
#### 1哪个是根结点
@@ -158,8 +143,8 @@ $$
| :-------------: | :---------------: | :---------------: | :---------------: |
| $n$ 在 $m$ 左方 | 1 | 1 | 1 |
| $n$ 在 $m$ 右方 | 0 | 0 | 0 |
| $n$ 是 $m$ 祖先 | 1 | φ | φ |
| $n$ 是 $m$ 子孙 | 1 | φ | φ |
| $n$ 是 $m$ 祖先 | 1 | φ | 0 |
| $n$ 是 $m$ 子孙 | 0 | φ | 1 |
> 注:如果 ① 离 a 和 b 最近的共同祖先 p 存在,且 ② a 在 p 的左子树中b 在 p 的右子树中,则称 a 在 b 的左方(即 b 在 a 的右方)。
@@ -167,10 +152,7 @@ $$
#### a它们在先序遍历和中序遍历时得到的结点访问序列相同
```mermaid
graph TB
1(1)
```
<img src="assets/6.14.a.png">
#### b它们在后序遍历和中序遍历时得到的结点访问序列相同

View File

@@ -0,0 +1,11 @@
graph a {
splines="FALSE";
/* Entities */
1[shape = circle]
/* Relationships */
1
/* Ranks */
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,36 @@
graph 6.19 {
splines="FALSE";
/* Entities */
A [shape = circle]
B [shape = circle]
C [shape = circle]
D [shape = circle]
E [shape = circle]
F [shape = circle]
G [shape = circle]
H [shape = circle]
I [shape = circle]
J [shape = circle]
K [shape = circle]
L [shape = circle]
M [shape = circle]
N [shape = circle]
/* Relationships */
A -- B
A -- C
B -- D
B -- E
C -- F
C -- G
C -- H
E -- I
G -- J
G -- K
H -- L
I -- M
I -- N
/* Ranks */
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,29 @@
graph 6.3 {
subgraph A {
subgraph Aa{
Aa1[label = "", shape = circle]
Aa2[label = "", shape = circle]
Aa3[label = "", shape = circle]
Aa1--Aa2--Aa3
}
subgraph Ab{
Ab1[label = "", shape = circle]
Ab2[label = "", shape = circle]
Ab3[label = "", shape = circle]
Ab1--Ab2
Ab1--Ab3
}
}
subgraph B {
subgraph Ba{
Ba1[label = "", shape = circle]
Ba1[label = "", shape = circle]
Ba2[label = "", shape = circle]
Ba3[label = "", shape = circle]
Ba1--Ba2--Ba3
}
}
}