计算机概论05,计算机科学概论 课件Chap 05.pdf

计算机科学概论 课件Chap 05.pdf

Chapter 5: Algorithms

5-1

Chapter 5: Algorithms 算法

• 5.1 The Concept of an Algorithm

• 5.2 Algorithm Representation

• 5.3 Algorithm Discovery

• 5.4 Iterative Structures

• 5.5 Recursive Structures

• 5.6 Efficiency and Correctness

5-2

5.1 The Concept of an Algorithm

算法的概念

Definition of Algorithm 算法的定义

An algorithm is an ordered set of

unambiguous, executable steps

that defines a terminating process.

算法是定义一个可终止进程的一组有

序的、无歧义的、可执行的步骤的集

5-3

• Algorithm算法vs.Program程序vs.Process进程

– algorithm :an ordered set of unambiguous,

executable steps that defines a terminating

process.

–program :a formal representation of an

algorithm designed for computer application

–process :the activity of executing a program

鸡兔同笼问题。

大约在1500年前, 《孙子算经》中记载了这个有

趣的问题: “今有雉兔同笼,上有三十五头,

下有九十四足,问雉兔各几何?”

5-4

5.3 Algorithm Discovery算法的发现

• The development of a program consists of

two activities:

– discovering the underlying algorithm (most

challenging)

– representing that algorithm as a program.

• Polya’s Problem Solving Steps

– 1. Understand the problem.

– 2. Devise a plan for solving the problem.

– 3. Carry out the plan.

– 4. Evaluate the solution for accuracy and its

potential as a tool for solving other problems.

5-5

• The basic principles for problem-solving

1. Understand the problem.

2. Get an idea as to how an algorithmic procedure

might solve the problem.

3. Formulate the algorit

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值