The Art Of Computer Programming: 1.1
The Art Of Computer Programming: 1.1
*/-->
div.org-src-container {
font-size: 85%;
font-family: monospace;
}
pre.src {
background-color:#2e3436;
color:#fefffe;
}
p {font-size: 15px}
li {font-size: 15px}
Table of Contents
1 Algorithm
1.1 算法的特性
算法除了是一套有限的规则 (Being a finite set of rules) 之外,还有如下的五个特性:
- 有限性 (Finiteness) :需要在有限的步骤内收敛结束。
- 可定义性 (Definieness) :算法中的每一步骤必要要有精确的定义。
- 输入 (input) :有 0 或者多数输入
- 输出 (output) :有 1 或者多个输出
- 有效性 (Effectiveness) :算法通常是有效的。
1.2 例子

Figure 1: Euclid's alrogithm
Lisp code:
(defun ea (m n)
"Euclid's algorithm"
(interactive)
(let ((r (% m n)))
(if (= r 0)
n
(ea n r))))
(转载请注明出处,
使用许可:署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议 。)
The Art Of Computer Programming: 1.1的更多相关文章
- The Art of Computer Programming
<计算机程序设计艺术>即<The Art of Computer Programming>是计算机领域里颠峰级的里程碑,加上国外人士对它的推崇,所以提起它的大名简直就象法律书籍 ...
- K老在拿图灵奖时的发言:Computer Programming as an Art
很多话说得很透彻,把一些觉比较精彩的摘抄一下. ... It seems to me that if the authors I studied were writing today, they wo ...
- The art of multipropcessor programming 读书笔记-硬件基础1
本系列是 The art of multipropcessor programming 的读书笔记,在原版图书的基础上,结合 OpenJDK 11 以上的版本的代码进行理解和实现.并根据个人的查资料以 ...
- The Art of Multiprocessor Programming读书笔记 (更新至第3章)
这份笔记是我2013年下半年以来读“The Art of Multiprocessor Programming”这本书的读书笔记.目前有关共享内存并发同步相关的书籍并不多,但是学术文献却不少,跨越的时 ...
- 类型检查和鸭子类型 Duck typing in computer programming is an application of the duck test 鸭子测试 鸭子类型 指示编译器将类的类型检查安排在运行时而不是编译时 type checking can be specified to occur at run time rather than compile time.
Go所提供的面向对象功能十分简洁,但却兼具了类型检查和鸭子类型两者的有点,这是何等优秀的设计啊! Duck typing in computer programming is an applicati ...
- The art of multipropcessor programming 读书笔记-硬件基础2
本系列是 The art of multipropcessor programming 的读书笔记,在原版图书的基础上,结合 OpenJDK 11 以上的版本的代码进行理解和实现.并根据个人的查资料以 ...
- The art of multipropcessor programming 读书笔记-3. 自旋锁与争用(2)
本系列是 The art of multipropcessor programming 的读书笔记,在原版图书的基础上,结合 OpenJDK 11 以上的版本的代码进行理解和实现.并根据个人的查资料以 ...
- Reflection (computer programming) -反射-自身结构信息
n computer science, reflection is the ability of a computer program to examine, introspect, and modi ...
- Computer Science: the Big Picture
1.课程PPTMIT OpenCourseWarehttp://ocw.mit.edu/courses/; Courses Stanfordhttp://cs.stanford.edu/course ...
随机推荐
- 团体程序设计天梯赛 L3-012. 水果忍者
/*对于一条满足条件的直线,向下移,直到触碰一条线段的下端点,仍然经过其它线段,该直线仍然满足条件 即以一条线段的下(上)端点作为直线上的一点,求为了经过一条线段的最小.最大斜率值(mink,maxk ...
- C++ strcat(template版本)
template<unsigned N, unsigned M> inline std::shared_ptr<char> strcat(const char (&p1 ...
- Java入门:基础算法之检查奇偶性
本程序检查一个数是奇数还是偶数. import java.util.Scanner; class CheckEvenOdd { public static void main(String args[ ...
- python中高阶函数与装饰器(2)
函数返回值为内置函数名: def sum(*args): def sum_in(): ax = 0 for n in args: ax = ax ...
- day21 数据库(DataBase)
1.数据库由多张表组成,一张表就是一个实体. 2.表的列就是属性的值,行就是一个个具体的对象的属性值. primary key主键:1.非空.2.不能修改(定好不变).3.业务无关. 作用:在表中具体 ...
- 视音频数据处理入门:RGB、YUV像素数据处理
===================================================== 视音频数据处理入门系列文章: 视音频数据处理入门:RGB.YUV像素数据处理 视音频数据处理 ...
- MinGW安装设置
From:http://www.cnblogs.com/killerlegend/p/3746504.html Author:KillerLegend Date:2014.5.22 不得不吐槽一下学校 ...
- 批量更新demo
因为批量更新数据库的时候,如果数据量太多,就会报错,这时候可以通过逻辑,批量更新,demo如下 @Test public void testbatch() { /** * 批量的值 */ int ma ...
- 2017 清北济南考前刷题Day 6 afternoon
期望得分:100+100+30=230 实际得分: 正解: 枚举最高的位,这一位m是1但实际用了0 然后剩余的低位肯定是 正数就用1,负数用0 考场思路:数位DP #include<cstdio ...
- Android 利用广播接收器启动服务
public class MainActivity extends Activity { private Button bt ; protected void onCreate(Bundle save ...