Skip to Content
深入理解運算原理|從簡單的機器到無所不能的程式
book

深入理解運算原理|從簡單的機器到無所不能的程式

by Tom Stuart
November 2017
Beginner to intermediate
344 pages
7h 2m
Chinese
GoTop Information, Inc.
Content preview from 深入理解運算原理|從簡單的機器到無所不能的程式
266
|
8
生命的事實
這些都是相當嚴重且重要的問題,所以在試著處理這些問題之前,先讓我們快速的瞭解
運算世界的一些重要事實。其中的部分事實相當顯而易見,其他的就不是那麼明顯,但
它們全都是思考運算機器功能和限制的重要必要條件。
通用系統可以執行演算法
我們通常可以用諸如圖靈機、lambda 演算、部分遞迴函式等通用系統做什麼?如果我
們能正確瞭解這些系統的功能,那麼我們就能鑽研他們的限制。
運算機器的實際目的是執行
演算法
algorithm
);演算法是一成串的指示,這些指示描
述了將輸入值轉換成輸出值的某些過程,而這些指示應該要滿足某些準則:
有限
指令的數量有限。
簡單
每條指令簡單的足以由人以紙、筆執行,而不需動腦筋。
終止
遵循指令的人將根據任何輸入在數量有限的步驟完成。
正確
遵循指令的人將根據任何輸入產生正確的答案。
舉例來說,西元前 300 年左右的歐幾里德演算法是最古老的演算法之一,它需要兩個正
整數,並且會傳回將它們兩個都整除的最大整數,也就是它們的
最大公因數
greatest
common divisor
)。以下是它的指令:
1.
x
y
指定給這兩個數作為名稱。
2. 決定
x
y
何者為大數。
3. 以大數減小數(如果
x
是大數,就以
x
y
,並以此作為
x
的新值;如果
y
為大
數,就反過來執行)。
4. 重複步驟 2 3,一直到
x
等於
y
5.
x
等於
y
的時候,它們的值就是原來兩個數值的最大公因數。
不可能的程式
|
267
我們很高興將這認定為演算法,因為它似乎符合基本準則。它只包含一些說明,而且它 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JSON實務手冊

JSON實務手冊

Tom Marrs

Publisher Resources

ISBN: 9789864766000