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

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

by Tom Stuart
November 2017
Beginner to intermediate
344 pages
7h 2m
Chinese
GoTop Information, Inc.
Content preview from 深入理解運算原理|從簡單的機器到無所不能的程式
114
|
4
狀態 接受與否? 堆疊內容 剩下的輸入 動作
1 (()(()())) 讀取 (, 推入 b, 進入狀態 2
2 b ()(()())) 讀取 (, 推入 b
2 bb )(()())) 讀取 ), 推入 b
2 b (()())) 讀取 (, 推入 b
2 bb ()())) 讀取 (, 推入 b
2 bbb )())) 讀取 ), 提出 b
2 bb ())) 讀取 (, 推入 b
2 bbb ))) 讀取 ), 提出 b
2 bb )) 讀取 ), 提出 b
2 b ) 讀取 ), 提出 b
2 進入狀態 1
1
規則
DPDA 括號對稱背後的概念其實相當直覺,但在我們實際建置它之前,有一些瑣碎的技
術細節要先完成。首先,我們必須確定下推自動機的規則應該如何運作。這裡有幾項設
計的議題:
每條規則是否必須更改堆疊、讀取輸入或修改狀態,或者以上皆是?
是不是應該針對推入和提出而有兩種不同的規則?
當堆疊為空的時候,我們需要改變狀態的特殊規則嗎?
可以就像 NFA 裡的自由移動,也就是不讀取輸入就改變狀態嗎?
如果 DPDA 可以像這樣自行改變狀態,那麼『決定論』的意義為何?
選擇一種彈性大到足以支援我們所需一切的規則風格,我們就能回答這所有的問題。我
們將 PDA 規則分成 5 個部分:
機器的目前狀態
必須從輸入讀取的字元(非強制)
機器的下一個狀態
必須從堆疊提出的字元
提出頂端字元之後再推入堆疊的字元 ...
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