INF421
文章平均质量分 94
SuperFeHanHan
人生得意须尽憨!
展开
-
INF421 Quiz 6 整理
Q1:If G is a tree, then the distances from a vertex s to all other vertices can be computed easily in time O(m) (where m is the number of edges).Sol:True因为树没有Cycle,所以只要遍历到了就可以。我们可以对s用BFS,并对于没有遍历到的顶点,我们用已经遍历到的节点u来更新它的距离:用d(s,v) = d(s,u) + w(u,v).Q2:I原创 2021-01-11 22:10:38 · 94 阅读 · 0 评论 -
INF421 - Amphi 1 Stable Mariage
INF421 - Amphi 10. 课程介绍:1. The Stable Marriage Problem问题描述:Formal Definition:2.找到一个算法的步骤:待解决问题是一个已知问题(Known Problem)的另一种表述(Reformulation)利用Generic Algorithm Design Principles看看简单的例子Deeper Understanding of the Problem???? Ordered Iterative Improvement: Defe原创 2020-11-23 04:09:09 · 527 阅读 · 0 评论 -
INF421 - Amphi 2 Divide and Conquer
INF421 - Amphi 20.Quizz回顾在数组中同时寻找最大和最小元素Big-Oh Notation (Landau Symbols)1. Introduction to Divide and ConquerMergesortAnalysis of MergeSort (对Recursive algs的分析)求解Reccurence 的方法1:Guess & Check2. ????Master TheoremRecursion TreeMaster Theorem❓3. 例子:大数乘法与原创 2020-12-28 19:09:50 · 324 阅读 · 0 评论 -
INF421 - Amphi 3: Dynamic Programming
Amphi 3 Dynamic Programming重点1. Introduction to Dynamic Programming区分 Divide&Conquer 和 DP例子:Cutting a Bar into Pieces2. Dynamic Programming (Method)Cutting a Bar into Pieces的具体实现:Sol1: 单纯的RecursiveSol2:重点1. Introduction to Dynamic Programming区分 Divi原创 2020-12-12 17:55:06 · 615 阅读 · 0 评论 -
INF421 - Amphi 4: Greedy Algorithms
INF421 - Amphi 21. Introduction to Greedy Algorithms and SchedulingDef: Scheduling第一个问题:Interval SchedulingGreedy Algorithms利用Greedy Alg写Interval Scheduling问题的模版利用上面的模版给出问题的算法: Shortest-first利用上面的模版给出问题的算法: Earliest-First利用上面的模版给出问题的算法: Earliest-End证明 Earl原创 2020-12-13 19:47:25 · 478 阅读 · 0 评论 -
INF421 - Amphi 5: Graph
INF421 - Amphi 5: Graph1. Graphs and Their Representation1.1 Undirected Graph 基本概念1. 2 存储Graphs的两种方法:2. Graphs Are Everywhere !2.1 例1: Interval Scheduling2.2 例2:Assignment Problem2.2.1 Simple Greedy Algorithm:2.2.2 Optimal Greedy Algorithm3. Minimum Spanni原创 2020-12-29 06:31:54 · 184 阅读 · 0 评论 -
INF421 - Amphi 6: Graph [最短路径:Dijkstra,Bellman-Ford,Floyd]
INF421 - Amphi 6: Graph1. Shortest Path Problem1.0 基本概念1.1 Shortest Paths Problems:SSSP: Single-Source shortest pathASPS: All-Pair Shortest Paths1.2 ???? Exchange Property2. Dijkastra Algorithm2.0 问题描述: Connected Graph, Non-Negative Edge Weights SSSP2.1 Ke原创 2021-01-10 05:08:50 · 598 阅读 · 1 评论