山东大学 Design and Analysis of Algorithm 2019年 期末考试

本博客为即将参加期末考试的学生提供了一份算法速成攻略,涵盖了图论算法、最短路径、动态规划、最大流等核心主题,包括《Introduction to Algorithm》一书的精选解答和关键知识点。适合突击复习。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Summary of Course

如题,后天上午期末考试,因课表冲突不得不突击复习,以下内容包括教材信息以及重点分析 (本科学过图论算法,简单的概念和证明以及本人熟悉的部分一带而过)
刚刚考完,附上回忆版试题

Textbook

Introduction to Algorithm (Third Edition)》by Thomas H. Cormen,Charles E. Leiserson, Ronald L. Rivest and Clifford Stein
Temporary Link:download PDF

Selected Solutions for《Introduction to Algorithm
Temporary Link:download PDF

Key Points

Chapter 22 Basic Graph Algorithm
  1. Graph Basics
    Graph (Edge&Vertex)
    Undirected Graph&Directed Graph
    Adjacency
    Repeated edge, Self-loop & Simple graph
    Degree, Isolated vertex
    Cycle, Sub-graph,
    Connected (connected component, strongly connected, strongly connected component)
    Special Graph (complete, bipartite, forest, tree, sparse, dense)


    Theorem 1.1
    Given an undirected graph G = ( V , E ) G = (V, E) G=(V,E), ∑ v ∈ V d ( v ) = 2 ∣ E ∣ \sum_{v\in V}d(v)=2\lvert E\rvert vVd(v)=2E

    Copollary 1.2
    Given an undirected graph G = ( V , E ) G = (V, E) G=(V,E), the number of vertices with odd degrees is even.
  2. Representations of graphs
    图G
    For an undirected graph G = ( V , E ) G = (V, E) G=(V,E)
  • Adjacency-list:
    邻接链表
    Advantage:
       When the graph is sparse, uses only O( ∣ V ∣ + ∣ E ∣ |V|+|E| V+E) memory.
    Disvantage:
       No quicker way to determine if a given edge ( u , v ) (u, v) (u,v) is present in the graph than to search for v in the adjacency list A d j [ u ] Adj[u] Adj[u]. O( ∣ V ∣ | V | V)

  • Adjacency matrix
    在这里插入图片描述
    Advantage:
       Easily or quickly to determine if an edge is in the graph or not. O(1)
    Disvantage:
       Uses more memory to store a graph. O( ∣ V ∣ | V | V2)

  1. Elementary graph algorithms
  • BFS(Breadth-First Search)
    在这里插入图片描述

  • DFS(Deep-First Search)
    在这里插入图片描述

  • White Path Theorem
    在这里插入图片描述

  • Topological Sort
    在这里插入图片描述

  • Strongly connected components
    在这里插入图片描述

Chapter 23 Minimum spanning tree
  • Kruskal algorithm
  • Prim algorithm
Chapter 24 Single-Source Shortest Path
  • Bellman-Ford algorithm
  • Dijkstra Algorithm
  • Proof of Dijkstra algorithm
Chapter 15 Dynamic programming
  • Shortest path in DAGs
  • Knapsack problem
  • Bellman-Ford algorithm
Chapter 26 Maximum Flow
  • Capacity-scaling algorithm
  • Bipartite matching

试题(回忆版)

1.证明BFS生成的是最短路径树
2.证明一个图上的两颗最小生成树的边集的递增序列相同
3.设计O(VE)算法判断有向图是否有负圈,若没有,输出每个顶点的最短可达距离
(顶点v的最短可达距离:对于任意定点u∈V,dis=min{δ(u,v)}) 并证明算法正确性
4.设计DP算法,对于树T=(V,E),去掉最少的点,使得没有边剩下
5.证明在ford-fulkerson算法求s→t最大流时,在残留网络求增广路径时,对于任意u,v∈V,s到u的最短路径长度都不比上一次短,v到t也是
6.形式化描述最大独立集和最小顶点覆盖问题,并证明其等价

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值