** SYSU-2018-zzz老师算法课知识点汇总 **
Course Progress
- Introduction
- Data structures, NP-completeness
- Greedy algorithms
- Divide-and-conquer
- Dynamic programming
- Graph algorithms
- Search algorithms
- Heuristic algorithms
- Network flows
chapter1-Introduction
-
时空复杂度
-
算法必须满足下列条件
- Input(输入)
- Output(输出)
- Definiteness(确定性)
- Finiteness(有穷性)
- Effectiveness(有效性)
-
设计和分析过程
- What is the problem we have to solve?
- Does a solution exist?
- Can we find a solution(algorithm), and is there more than one solution?
- Is the algorithm correct?
- How efficient is the algorithm?
-
基本时间复杂度排序
-
时间复杂度的基本运算
斐波那契数列
- 循环
- 递归
- 矩阵
chapter2-Recap of Data Structures
- 基本数据结构
- set
- linear:Arrays、Lists
- tree:Binary trees、Heap、Multiway trees
- graph
- 抽象数据类型(Abstract Data Type-ADT)
- Stacks:LIFO
- Queues:FIFO
- Lists
- 搜索
- Sequential search
- Binary search
- 排序
- 哈希
- Open addressing(开发地址):线性探索、二次探索
- Chaining(链地址法或拉链法)
- 树
- Binary Trees 二叉树
- Preorder 前序遍历
- Inorder 中序遍历
- Postorder 后序遍历
- Level-by-level 层次遍历
- Binary Search Trees 二叉搜索树
- AVL树:注意旋转
- General Trees and Forests
- Trie 单词查找树
- Forest Traverse 森林遍历
- Disjoint set 不相交集
- Huffman Tree 哈夫曼树(最优二叉树)
- Binary Trees 二叉树
- 图
- 表示方法:邻接矩阵、邻接链表
- 遍历:深搜、广搜
- 存在问题和最优化问题
- 最优化问题转化为存在问题
- Halting problem 停机问题,不可转化为存在问题
- 归约(Reducibility)
- 一个问题A可以归约为问题B的含义是,可以用问题B的解法解决问题A,或者说,问题A可以“变成”问题B。
- “问题A可归约为问题B”有一个重要的直观意义:B的时间复杂度高于或者等于A的时间复杂度。也就是说,问题A不比问题B难。
- 归约具有传递性,如果问题A可归约为问题B,问题B可归约为问题C,则问题A可归约为问题C。
类型 | 定义 | 举例 |
---|---|---|
P问题 | 有多项式时间的解决方法 | 最短路问题 最下生成树问题 分数背包问题 高斯消去问题 |
NP问题 | 不确定是否有多项式时间的解决方法,但是可以在多项式时间内验证 一个解是否正确 |
布尔可满足性问题 汉密尔顿回路 旅行商问题 顶点覆盖问题 |
NPC问题 | 存在这样一个NP问题,所有的NP问题都可以约化成它,属于NP问题, 且属于NP-hard问题。 |
布尔可满足性问题 汉密尔顿回路 旅行商问题 顶点覆盖问题 |
NPH问题 | 比NP问题都要难的问题。所有的NP问题都能约化 |