前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Master Theorem

Master Theorem

作者头像
mathor
发布2021-05-12 09:52:50
7800
发布2021-05-12 09:52:50
举报
文章被收录于专栏:mathor
Master Theorem

$$ T(n) = aT( rac{n}{b})+f(n) $$

where a≥1,b≥1 be constant and f(n) be a function

Let T(n) is defined on non-negative integers by the recurrence

  • n is the size of the problem
  • a is the number of sub problems in the recursion
  • rac{n}{b} is the size of each sub problem (Here it is assumed that all sub problems are essentially the same size)
  • f(n) is the time to create the sub problems and combine their results in the above procedure

There are following three cases:

  1. If f(n)=Theta(n^c) where c < log_bacolor{red}{T(n)=Theta(n^{log_ba})}
  2. If f(n)=Theta(n^c) where c=log_ba then color{red}{T(n)=Theta(n^clogn)}
  3. If f(n)=Theta(n^c) where c>log_bacolor{red}{T(n)=Theta(f(n))}
Indamissible equations

$$ T(n)=color{red}{2^n}T( rac{n}{2}) + n $$

a is not constant. The number of subproblems should be fixed


$$ T(n)=color{red}{0.5}{T( rac{n}{2})+n} $$

a< 1


$$ T(n)=16T( rac{n}{2})color{red}{-n^2} $$

f(n) which is the combination time is not positive

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021-03-12,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Master Theorem
  • Indamissible equations
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档