mit 计算机科学及编程导论(12)

words:

introspective , swallow your pride , latency , saw , symptom , haste , ramification ,  dust , raisin , tidy , revert , directory , anal , sermon , polemic , formulate , optimize , dual ,  constraint , bin , van , align , backpack , blanket ,  inventory ,  polynomial , burglar ,  grape , the periodic table , pour , dessert , thereof , discrete , stuff , trial , incarcerate , augment , dramatic 

notes:

sth added to debug:

1. experienced programmer will have their own module to debug , they will list some bugs they usually made and guess them first.

2. keep record of what you've tried to be systematic 

3. get help , try to explain to someone else or take a break

4.haste makes waste : don't fix when the thought first comes into your mind but to think will it fix all the symptoms (bug-free program)

5. make sure you can revert , save the old version


optimization problem :  a function to maximize or minimize & a set of constraints

1. continuous knapsack problem : greedy algorithm --- always do the best choices

2. discrete problem : 0/1 knapsack problem .  greedy algorithm doesn't work anymore , since local optimal decisions do not always lead to global optimal decisions. But greedy algorithm is fast and easy to capture .  Brute force can get the right answer but it's order of growth is exponential. So how we can optimize the brute force .  We must first figure out themath formulation of the problem in order to compute. Then we usedecision tree to analyze , and program . And we ascertain we can usememorization to optimize .

ps: 

the professor use optimization problem to show us how to formulate problem into math form and then use computer to compute . This is the main theme in this course.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值