-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## 2021-2022 大三上学期 算法设计与分析 | ||
|
||
* 计算题全部押中,爽死。 | ||
* 题目大多是英文的,有的关键词有汉语翻译,基本上都能读懂,不用担心。 | ||
* 考完之后问的老师,老师说题都是新出的,找到往年题也没用。(但其实思想是关键的,理解思想而不是死记硬背往年题,达到举一反三触类旁通,则可集大成也) | ||
* 这门课在计科这边是16级开的,也就是到我们(19级)才是第四年,同时老师上课说每年都会出新题,所以切忌死记硬背往年题,理解思想最重要。相信随着时间的延伸,更多的回忆版和往年题会出现,也希望大家注意甄别的同时,好好理解算法思想和证明思路。 | ||
|
||
#### 一、计算题(35分 = 10+10+15) | ||
|
||
* 给一个有向加权图 | ||
* 画出广度优先搜索树 | ||
* 标出对图进行深度优先搜索后,图上的边的种类(树边、前向边、返回边、交叉边那些) | ||
* 给一个有向图,从Floyd和矩阵乘算法里选一个,来画出算法运行过程中的距离矩阵矩阵(实际上有几个点,k就=几,就画几个矩阵) | ||
* 最大流和最小割。给一个有向图,包括源点s和汇点t,画出此过程中的剩余网络和增广路(题目就是这么写的,我觉得应该还需要画最小割) | ||
|
||
#### 二、证明题(20分 = 10 * 2) | ||
|
||
* 一个有向图中,存在一个包含源点s的负环,证明在多次松弛操作 后,在负环中仍存在一点v(i+1),d[v(i+1)]>d[v(i)]+w(v(i),v(i+1))。(实际就是Bellman-Ford算法的思想) | ||
* 一个有向图中,如果边e=(u,v)不在任何一棵最小生成树中,证明:这个有向图存在一个环,e在环中是唯一的权值最大的边。(反证应该就能解决) | ||
|
||
#### 三、辨析题(20分 = 10 * 2) | ||
|
||
* 一个割(X,Y),穿过该割的边集为E(X,Y),问下面两个说法,哪个对哪个错,如果对,给出证明;如果错,举一个反例。(这个应该是第二个是对的) | ||
* 对图G的每一棵最小生成树,有且仅有E(X,Y)中的一条边 | ||
* 对图G的每一棵最小生成树,至少有E(X,Y)中的一条边 | ||
* 图上有x、y两个点,在某次松弛操作后,有x = π(y)。下面两个说法,哪个对哪个错,如果对,给出证明;如果错,举一个反例。(这个应该是第一个是对的) | ||
* δ(s,y) ≤ δ(s,x) + w(x,y) (三角不等式啊) | ||
* d[s,y] = d[s,x] + w(x,y) | ||
|
||
#### 四、算法设计题(25分 = 12 + 13) | ||
|
||
* 给一个有向图,有源点s和汇点t,图上的顶点可能有三种颜色中的一种,设计一种DP算法。 | ||
* 给出变量定义,并解释是什么意思 | ||
* 写出递推公式 | ||
* 根据上面设计的算法来解决题目中的问题(实际就是跑过样例,跑出来结果) | ||
* 有向图中任意一个顶点对u和v之间,满足u到v有且仅有一条简单路,且v到u也有且仅有一条简单路,我们说这个有向图是完全单连通的。 | ||
* 设计一个算法,判断一个图是否是单连通,给出算法描述 | ||
* 证明上面算法的正确性 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
计算:3道35分,用来及格的。必须都做对 | ||
- 用于考察算法的使用 | ||
- 证明:2道20分 | ||
- 例如:证明白色路径定理、括号定理、有向无环图没有返回边、为什么强联通分支DFS后都是大的指向小的、证明路径的松弛的收敛性、一定存在最小生成树不包含最大权重的边。 | ||
- 不会考大定理的证明,例如dijkstra的正确性。 | ||
- 一般不考最大流、动态规划的证明(且动态规划也是不需要证明的。) | ||
- 辨析:2道20分 | ||
- 如果正确,给出证明;如果错误,给出反例。 | ||
- 如果是错的,但是你说对,然后又给了证明,那就得一半分-1分。 | ||
- 如果是对的,写错的,还举反例,那就一半分-2分。 | ||
- 这种题一般不会得0分。 | ||
- 算法设计与证明25分 | ||
- 动态规划:一定要给出定义的变量的意义、递推关系式(必须简洁,否则不得分)。 | ||
- 会给出测试样例。只要能给例子跑出来,就能拿到1/3的分。剩下2/3是证明。 | ||
- 难度不会比“半联通图”算法难。 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- 请先看2021-2022年那个回忆版,里面有一些本应出现在README中的话,但我懒得copy过来了。 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.