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

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

by Tom Stuart
November 2017
Beginner to intermediate
344 pages
7h 2m
Chinese
GoTop Information, Inc.
Content preview from 深入理解運算原理|從簡單的機器到無所不能的程式
292
|
8
hello_world?
改而傳回
false
,這就是因為
hello_world_program
永遠到不了最後一行,
所以
#halts?
傳回
false
,表示
evaluate(program, input)
會永無止盡的循環。
我們
#halts?
的新實作物示範了停機問題可以
簡化
成檢查程式是否印出
hello world
問題。也就是說,我們可以將任何運算
#prints_hello_world?
的演算法,修改成可以運
#halts?
的演算法。
我們已經知道運作中的
#halts?
不能存在,所以明顯的結論就是
#prints_hello_world?
的完整實作物也不能存在。且若不可能實作,邱奇 - 圖靈論題認為這並沒有演算法,所
以『這個程式能印出
hello world?
』就是另一個無法決定的問題。
實際上,沒有人會關心自動檢測程式是否能印出特定字串,但是這種無法決定性證據的
結構指向某些更大更一般的東西。只要其他某個程式停止,並且這足以呈現無法決定
性,我們就只需要構建能展示『印出
hello world
』特性的程式。什麼會阻止我們對
程式行為的特性重新使用這項論證,包括我們實際關心的特性嗎?
嗯,沒有。這是
萊斯定理
Rice's theorem
):程式行為的任何非顯然特性是無法決定的,
因為停機問題總是可以簡化成決定該特性是否為真的問題;如果能創造出用在決定該特
性的演算法,我們就可以用它來建置另一個決定停機問題的演算法,而這並不可能。
大致來說,『非顯然的特性』和程式做了
什麼
有關,而不是它 ...
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