算法设计怎么写( 四 )


策略是对全局的一个探索,一个构筑通向目标路径的指导框架 。战略则是用来解决通向大目标过程的较小的问题 。
如果你对关于如何对付所面临的问题没有一个全局的策略,那关心战略是不得要领的,予事无补的 。在解题领域,不断修正思维的层次(thinking on the right level)是很重要战略 。
(--莱布尼兹曾经将人的解题思考过程比喻成晃筛子,把脑袋里面的东西都给抖落出来,然后正在搜索的注意力会抓住一切细微的、与问题有关的东西 。事实上,要做到能够令注意力抓住这些有关的东西,就必须时刻将问题放在注意力层面,否则即使关键的东西抖落出来了也可能没注意到 。)
An example of a strategic question is, ``How best can I model my application as a graph algorithm problem?'' A tactical question might be, ``Should I use an adjacency邻接 list or adjacency matrix data structure to represent my graph?'' Of course, such tactical decisions are critical to the ultimate quality of the solution, but they can be properly evaluated only in light of a successful strategy. 一个策略问题的例子是:“我如何才能更好地把我的问题建模成图问题?” 。而一个战略问题可能是这样:“我是用邻接列表还是邻接矩阵来实现我的图结构?” 。
当然,这种战略选择是对解决方案的最终质量起着重要作用;不过战略价值的体现还是基于正确的策略的选择 。When faced with a design problem, too many people freeze up in their thinking. After reading or hearing the problem, they sit down and realize that they don't know what to do next. They stare(凝视) into space, then panic(惊惶),and finally end up settling 。
【算法设计怎么写】

算法设计怎么写

文章插图