1.1 Randomized Algorithms

1 Different Categories of Algorithms

1.1 Different Categories of Algorithms distinguished by design paradigm

  • Divide and conquer algorithms
    • quicksort algorithm
    • divide the problem to smaller problems and tackle them separately
    • 分而治之,大化小,然后一个个解决。
  • Dynamic programming algorithms
  • Mathematical programming algorithms
    • linear programming for certain optimisation problem
  • Search and enumeration algorithms
    • Brute force algorithms, enumerating all possible candidate solutions and check 把所有可能列出来然后逐个check
    • Improved brute force algorithms, e.g. branch and bound algorithms
    • Heuristic algorithm
      • deterministic algorithms (Local search), e.g. greedy search
      • Randomized algorithms, which include Evolutionary Computation

📒 Heuristic algorithm在搜索和列举算法下,包括deterministic (比如local search)和Randomized。Randomized里面包括EV。
📒 Heuristic代表‘I found something’

1.2 Heuristic Algorithms

Definition

  • a (usually simple) algorithm that produces a good enough solution for a problem in a reasonable time frame

Features

  • Heuristic: ‘find’ or ‘discover’
  • solutions: (usually) not optimal but satisfactory
  • compared to brute force, it is faster
  • there exists a trade off among optimality, completeness, accuracy, or precision for speed
  • target problem: difficult for other algorithms, e.g. brute force algorithms
  • members: deterministic (local search) and randomised algorithms

2 Randomized Algorithms

Definition

  • Anhrutistic algorithm that makes random choices during execution to produce a result

Two different ways

  • Use some random number generators to make random choices
  • Some external disturbances lead to some executions or behaviors can form different ways of doing things

Randomized vs deterministic algorithm

  • structure: input -> algorithm -> output
  • randomized algorithm adds ‘random number’ to the algorithm

Two categories of randomized algorithms

  • Using random numbers to help find a solution to a problem
    Las Vegas algorithm 在这里插入图片描述
    Monte Carlo algorithm: 对比Las Vegas多了一个maximum length of trials
    在这里插入图片描述
  • Using random numbers to improve a solution to a problem

Monte Carlo vs Las Vegas

  • Las Vegas always gives correct results, but need to think about the running time. it won’t stop until the correct results are found.
  • Monte Carlo的running time是deterministic的,its results may be incorrect with a certain (typically small) probability. it runs in a fixed number of steps.

📒 Monte Carlo最明显的标志就是,除了常规结束条件,还有一个counter

Advantages/disadvantages of randomized algorithms
Advantages

  • Simplicity: easy to implement
  • Performance: produce near-optimum solutions with high probability (usually)

Disadvantages

  • getting incorrect answer with a finite probability
  • find a better solution by repeating the algorithm
  • running time is difficult to analyse
  • exists a probability of getting an incorrectsolution
  • getting truly random numbers is impossible

1.5 Further reading

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值