How to tell your iPhone application that location services are required
CSS Used by This Blog

The Art Of Computer Programming: 1.1

tubo posted @ 2014年9月03日 00:15 in 未分类 , 934 阅读
The Art Of Computer Programming: 1.1

Table of Contents

1 Algorithm

1.1 算法的特性

算法除了是一套有限的规则 (Being a finite set of rules) 之外,还有如下的五个特性:

  • 有限性 (Finiteness) :需要在有限的步骤内收敛结束。
  • 可定义性 (Definieness) :算法中的每一步骤必要要有精确的定义。
  • 输入 (input) :有 0 或者多数输入
  • 输出 (output) :有 1 或者多个输出
  • 有效性 (Effectiveness) :算法通常是有效的。

1.2 例子

ea.png

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))))
is ukessays legit 说:
2019年7月17日 13:26

Being a workaholic person,I still find sometime out for my family and friends.Apart from my job hours as a blogger ,I make sure to make some travelling plans as I just love it.

Alyssa 说:
2023年1月04日 02:59

The art of computer programming is the process of designing and implementing algorithms that enable computers to solve certain problems. It is a highly creative and challenging field Binge-Worthy Series that requires a deep understanding of both computer science and mathematics. great programmers are not only skilled in coding, but also possess strong problem-solving and analytical skills.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter