Lecture 1-2

2019-01-15  本文已影响0人  zju_dream

P19.Optimizing and heuristic algorithms


相关知识点

最优解和启发式的区别

P20.Why heuristics?

为什么要选择启发式

  1. 得到最优解要消耗大量计算资源
    • An optimizing algorithm might consume too much resources.
  2. 输入可能不是很准确,而启发式算法有较强的鲁棒性,能够找到一个不错的解
    • Input to algorithm might be inaccurate and a heuristically good solution might be good enough.
  3. 启发式算法更容易理解
    • For a non-expert, it might be easier to uderstand a heuristic rather than an optimizing algorithm.

P22.Constructive heuristics(建设性启发式)

定义

怎么构建

结束条件

用途

P24.Greedy algorithm

构造启发式的一种自然且常见的类型是贪婪算法

P26-.Huffman’s algorithm

P29.Graph

图的定义

P31.Binary tree

什么是树

什么是二叉树

P35.Tries(prefix trees)

什么是Tries

P36.Definition - Prefix

什么是前缀、后缀

举例:zhuyun的前缀
zhuyun
zhuyu
zhuy
zhu
zh
z

什么是前缀码

给出字符串、能够写出前缀后缀、注意不止一个、是有一系列的前缀(上方的举例中有)

P42-.Huffmans’s algorithm

给一个例子,然后画出过程,构建huffman🎄

P58.Neighborhood search

用来求解背包问题(18年新题目)、把背包问题描述成数学的形式、自己写一遍算法、写出计算步骤


x(0) = [0 0 1 0]T      Z = 5

N(x(0))  [1 0 1 0]T      Z = 9

            [0 1 1 0]T      infeasible

            [0 0 0 0]T      Z = 0

            [0 0 1 1]T      Z = 13

x(1) = [0 0 1 1]T

N(x(1))  [1 0 1 1]T     infeasible

            [0 1 1 1]T      infeasible

            [0 0 0 1]T      Z = 8

            [0 0 1 0]T      Z = 5

break

x(1) is local optimal

P89.Tabu search (不确定会考)

x(0) = [0 0 1 0]T      Z = 5               tabu:None

N(x(0))  [1 0 1 0]T      Z = 9

            [0 1 1 0]T      infeasible

            [0 0 0 0]T      Z = 0

            [0 0 1 1]T      Z = 13

x(1) = [0 0 1 1]T                             tabu: x(0)

N(x(1))  [1 0 1 1]T     infeasible

            [0 1 1 1]T      infeasible

            [0 0 0 1]T      Z = 8

            [0 0 1 0]T      Z = 5 (不选,this is tabu)



x(2) = [0 0 0 1]                                tabu:x(1)

N(x(2))  [1 0 0 1]   Z = 12

             [0 1 0 1]   infeasible

             [0 0 1 1]   tabu

             [0 0 0 0]    Z = 0

...


P108.Recursion

定义

举例

递归的基本规则

P119.Mergesort

分治divide-and- conquer

P133.Dynamic Programming

P138

上一篇下一篇

猜你喜欢

热点阅读