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))))

The Art Of Computer Programming: 1.1的更多相关文章

  1. The Art of Computer Programming

    <计算机程序设计艺术>即<The Art of Computer Programming>是计算机领域里颠峰级的里程碑,加上国外人士对它的推崇,所以提起它的大名简直就象法律书籍 ...

  2. K老在拿图灵奖时的发言:Computer Programming as an Art

    很多话说得很透彻,把一些觉比较精彩的摘抄一下. ... It seems to me that if the authors I studied were writing today, they wo ...

  3. The art of multipropcessor programming 读书笔记-硬件基础1

    本系列是 The art of multipropcessor programming 的读书笔记,在原版图书的基础上,结合 OpenJDK 11 以上的版本的代码进行理解和实现.并根据个人的查资料以 ...

  4. The Art of Multiprocessor Programming读书笔记 (更新至第3章)

    这份笔记是我2013年下半年以来读“The Art of Multiprocessor Programming”这本书的读书笔记.目前有关共享内存并发同步相关的书籍并不多,但是学术文献却不少,跨越的时 ...

  5. 类型检查和鸭子类型 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 ...

  6. The art of multipropcessor programming 读书笔记-硬件基础2

    本系列是 The art of multipropcessor programming 的读书笔记,在原版图书的基础上,结合 OpenJDK 11 以上的版本的代码进行理解和实现.并根据个人的查资料以 ...

  7. The art of multipropcessor programming 读书笔记-3. 自旋锁与争用(2)

    本系列是 The art of multipropcessor programming 的读书笔记,在原版图书的基础上,结合 OpenJDK 11 以上的版本的代码进行理解和实现.并根据个人的查资料以 ...

  8. Reflection (computer programming) -反射-自身结构信息

    n computer science, reflection is the ability of a computer program to examine, introspect, and modi ...

  9. Computer Science: the Big Picture

    1.课程PPTMIT OpenCourseWarehttp://ocw.mit.edu/courses/; Courses  Stanfordhttp://cs.stanford.edu/course ...

随机推荐

  1. 使用EntitysCodeGenerate

    http://bbs.csdn.net/topics/360256700 public DataSet xxx(DateTime start, DateTime end, string type)   ...

  2. jquery如何实现点击LI标签和下面的LI互换顺序? 超简单代码

    转: jquery如何实现点击LI标签和下面的LI互换顺序? 上面的效果涉及jquery的两个方法: next()  :  获得匹配元素集合中每个元素紧邻的下一个同胞元素. after() :在被选元 ...

  3. 三、java面向对象编程_1

    目录 一.对象和类的概念 二.对象和引用 1.对象 2.成员变量 3.引用 三.java类的定义 四.构造函数(构造方法) 五.内存分析 一.对象和类的概念 1.对象 对象用计算机语言对应问题域中事物 ...

  4. Python 函数01

    Python 函数 函数是组织好的,可重复使用的,用来实现单一,或相关联功能的代码段. 函数能提高应用的模块性,和代码的重复利用率.你已经知道Python提供了许多内建函数,比如print().但你也 ...

  5. vue 项目代码初始化

    1. <meta>补充 <head> <meta charset="utf-8"> <meta name="viewport&q ...

  6. lvm--pv丢失后恢复

    [root@db-backup ~]# vgcfgrestore vg_backup  Couldn't find device with uuid JgYDQu-R1AG-wrD2-AHpX-A14 ...

  7. 监控redis数据库应用状态:python,tornado实现

    公司里最近redis服务器压力越来越大,其大概情况,只能从操作系统层面看,并不详尽,故同事在网上找了一个叫做 redis-live的开源项目,我配合部署了一下,还真有点意思,并解决了其中部分小debu ...

  8. soj1166. Computer Transformat(dp + 大数相加)

    1166. Computer Transformat Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description A sequenc ...

  9. laravel更新某一个或几个字段

    //更新会员状态status $ary_where = array(); $ary_where[] = ['id', '=', $int_id]; $result = $this->obj_ad ...

  10. C语言实现线性表

    #include <stdio.h> #include <stdlib.h> //提供malloc()原型 /* 线性表需要的方法: 1. List MakeEmpty():初 ...