知识卡片
决策树表示比较过程
比较排序的决策树用内部节点表示一次元素比较,用左右分支表示结果,用叶子表示最终排列。一次执行对应根到叶的一条路径;最长可达路径的长度就是最坏比较次数。它抽去搬移和控制细节,只保留排序所需的次序信息。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第8章 线性时间排序 · 查看原书依据
The execution of the comparison sorting algorithm corresponds to tracing a simple path from the root of the decision tree down to a leaf.
参考来源
- 位置:《算法导论(第4版)》第 8 章 8.1 节(`OEBPS/chapter008.xhtml`,文本字符 [0, 6000);图 8.1/Art_P323)。
- 结论依据:原文逐项定义内部节点、叶子和执行路径,并以三元素插入排序示例展示。
- 原始内容:The execution of the comparison sorting algorithm corresponds to tracing a simple path from the root of the decision tree down to a leaf.