梦到牙齿掉了是什么意思| 骨结核是什么病| 低钾是什么原因引起的| 蚂蚁长什么样子| 什么鸡没有翅膀| 高反是什么意思| 4月1号是什么星座| 门槛什么意思| 发烧是什么感觉| 梦见头发长长了是什么意思| 儿童支原体感染吃什么药| 跳蛋是什么感觉| 32周岁属什么生肖| 男人为什么喜欢吸奶| dmdm乙内酰脲是什么| 猫奴是什么意思| 牛叉是什么意思| 什么牌子| 司法警察是做什么的| 阿罗裤是什么意思| 慢性咽喉炎吃什么药好| 儿童看小鸡挂什么科| 躺下就头晕是什么原因| 橘子是什么季节的水果| 什么药可降尿酸| 瞽叟是什么意思| 氯雷他定片是什么药| 615是什么星座| 盆腔炎用什么药好| 先锋霉素又叫什么| 米线用什么做的| 间接胆红素偏高什么意思| 肿瘤和囊肿有什么区别| 为什么总是做噩梦| 意守丹田是什么意思| 七宗罪是什么| 肌张力是什么意思| 香港代购什么东西好| 检查怀孕要做什么检查| 杜仲有什么作用| 怀孕的脉搏和正常脉搏有什么区别| 处心积虑是什么意思| 叉烧是什么肉| 曹操的小名叫什么| 测怀孕什么时候最准| 兴渠是什么菜| 厄警失痣是什么意思| 老爹鞋配什么裤子| 感冒怕冷吃什么药| 为什么睡觉会流口水| 受虐倾向是什么| 抗核小体抗体阳性说明什么| naomi什么意思| 肺炎是什么原因引起的| 土地兼并是什么意思| apm是什么品牌| 花洒不出水什么原因| 腰疼吃什么| 听调不听宣什么意思| 吃什么下火| 日进斗金什么意思| 什么是高原反应| 飞行模式是什么意思| 爱出油的人身体缺什么| 梦见自己尿裤子了是什么意思| 乳房发痒什么原因| 成吉思汗属什么生肖| 失眠吃什么中药| 什么是肠梗阻| 经期喝什么补气血| 什么朝天| 气是什么| 梦见包饺子是什么征兆| 逃出生天什么意思| 背债是什么意思| 什么是微循环| eva是什么材料| 兰花用什么肥料最好| 什么叫慢性非萎缩性胃炎| 乙肝核心抗体偏高是什么意思| 血糖高什么东西不能吃| 情人总分分合合是什么歌| 捐肾对身体有什么影响| 蒂芙尼算什么档次| 辣椒炭疽病用什么药| 小孩爱吃手指头是什么原因| hankook是什么轮胎| 浑身酸痛什么原因| 什么样的泥土| 什么叫韵母| 放炮是什么意思| 滴虫性阴道炎用什么药好| 内脂是什么| 佝偻病是什么症状| 筛窦炎吃什么药| 相貌是什么意思| 朱雀玄武是什么意思| 尿路感染是什么原因| 有且仅有什么意思| 什么的坐着| 痛风买什么药| 低压高吃什么药最有效| 气管痉挛是什么症状| 一切尽在不言中什么意思| 食用棕榈油是什么油| 黄鳝吃什么| 半夏是什么意思| 便黑色大便是什么情况| iq什么意思| 525什么星座| 黑头是什么| 尿的是白色米汤是什么病| 胸口堵得慌是什么原因| 1月4号是什么星座| 女人山根低代表什么| 痹症是什么意思| 斯字五行属什么| 咽干是什么原因| 急于求成是什么意思| 农历六月十七是什么星座| 庸人自扰什么意思| 有什么有什么| 骨头疼是什么原因| 骞字五行属什么| 钻石和锆石有什么区别| 女人吃秋葵有什么好处| 无头鱼是什么鱼| 跖疣去医院挂什么科室| 容易水肿是什么原因| 牙齿咬不动东西是什么原因| 老年人吃什么好| 大拇指抖动是什么原因引起的| 送人礼物送什么好| 吲哚美辛是什么药| 益生菌不能和什么一起吃| 培根是什么肉做的| Preparing什么意思| 息肉样病变是什么意思| 夏天适合种什么植物| 海带排骨汤海带什么时候放| 什么时间最容易怀孕| dsd是什么意思| 低密度脂蛋白胆固醇是什么意思| 血热吃什么| 低头族是什么意思| 属牛的和什么属相最配| 连翘败毒丸的功效与作用是什么| 麒麟到了北极会变成什么| 撒西不理是什么意思| 梦到杀人是什么意思| 作曲是什么意思| 梦见掉了一颗牙齿是什么征兆| cindy是什么意思| 胎盘厚有什么影响| 什么是梅尼埃综合症| 7月17号什么星座| 天青色等烟雨是什么意思| 减肥吃什么菜最好| 堪称什么意思| 沙发客是什么意思| 孕妇梦见坟墓是什么预兆| 什么是牙线| 奇的多音字是什么| 女生肚子大是什么原因| 气血虚吃什么补最快女人| 燕窝适合什么人吃| mk是什么牌子| 钠低会出现什么症状| 梦见仙鹤是什么意思| 病人是什么生肖| 耳朵发烧是什么原因| 孕妇羊水少吃什么补的快| 男人吃什么壮阳| 脚底痒是什么原因| 腰间盘突出压迫神经什么症状| 长期腹泻是什么病| 脑供血不足吃点什么药| 什么是双规| 为什么有的人招蚊子| 寒热错杂吃什么中成药| 检测毛囊去什么医院| 什么品牌的沙发好| 佛爷是什么意思| 尿发黄什么原因| 汽车abs是什么意思| 头上两个旋代表什么| 狐媚子是什么意思| 百年老枞属于什么茶| d g是什么牌子| 怀孕有褐色分泌物是什么原因| 吃什么降尿酸最有效| lalpina是什么牌子| 气结是什么意思| mi是什么| 狗和什么属相最配| 二氧化碳是什么气体| 私处变黑是什么原因| 什么药降尿酸最好| 口舌是非是什么意思| md是什么意思| 监制是干什么的| 心脏杂音是什么意思| 夜尿增多是什么原因| 性生活出血是什么原因| 为什么男生喜欢女生的脚| ts是什么| 过门是什么意思| joeone是什么牌子| 脸为什么容易红| 经常流鼻涕是什么原因引起的| 什么季节减肥效果最快最好| 秉承是什么意思| 蟑螂幼虫长什么样| 脾大吃什么药能缩小| 出生医学证明有什么用| 夏天摆摊适合卖什么| 天什么地| 尿浑浊是什么病的前兆| 锦衣夜行什么意思| 0l是什么意思| 现在有什么好的创业项目| 十月份是什么星座的| 双鱼座是什么星座| 做小月子要注意什么| 今天过生日是什么星座| 早上六点半是什么时辰| 黑色车牌是什么车| 什么是射频消融术| 什么的樱桃| 导乐是什么意思| 老年人口苦是什么原因| 骨折一个月能恢复到什么程度| 辄的意思是什么| 什么是桥本病| 香港有什么好吃的| 减肥用什么好| 该说不说的是什么意思| 早上醒来嘴苦是什么原因| 脂肪瘤看什么科| 出岫是什么意思| 平衡液是什么| 高圆圆老公叫什么名字| 脸上长痘痘去医院挂什么科| 宫外孕和宫内孕有什么区别| 1987是什么年| lym是什么意思| 属鸡的什么命| 焦虑症吃什么药效果好| 什么叫碳水化合物| 颈部淋巴结挂什么科| 儿童个子矮小看什么科| 为宜是什么意思| 什么是根| 开飞机什么意思| 多多益善的益是什么意思| 耳朵堵塞感是什么原因| 吃稀饭配什么菜好吃| 结石吃什么药好| 去侍庙有什么禁忌| 什么是双向抑郁| 脑供血不足挂什么科室| 人中长代表什么| 胃出血大便是什么颜色| 过敏性紫癜有什么症状| 百度Jump to content

戊午五行属什么

From Wikipedia, the free encyclopedia
Combinational logicFinite-state machinePushdown automatonTuring machineAutomata theory
Classes of automata
(Clicking on each layer gets an article on that subject)
百度 北京时间3月14日18点,2018赛季亚冠小组赛第四轮继续进行,广州恒大客场迎战济州联队,此役,阿兰又进球了,巴西前锋已经连续5场比赛破门。

In the theory of computation, a branch of theoretical computer science, a pushdown automaton (PDA) is a type of automaton that employs a stack.

Pushdown automata are used in theories about what can be computed by machines. They are more capable than finite-state machines but less capable than Turing machines (see below). Deterministic pushdown automata can recognize all deterministic context-free languages while nondeterministic ones can recognize all context-free languages, with the former often used in parser design.

The term "pushdown" refers to the fact that the stack can be regarded as being "pushed down" like a tray dispenser at a cafeteria, since the operations never work on elements other than the top element. A stack automaton, by contrast, does allow access to and operations on deeper elements. Stack automata can recognize a strictly larger set of languages than pushdown automata.[1] A nested stack automaton allows full access, and also allows stacked values to be entire sub-stacks rather than just single finite symbols.

Informal description

[edit]
A diagram of a pushdown automaton

A finite-state machine only considers the input signal and the current state: it has no stack to work with and therefore is unable to access previous values of the input. It can only choose a new state, the result of following the transition. A pushdown automaton (PDA) differs from a finite state machine in two ways:

  1. It can use the top of the stack to decide which transition to take.
  2. It can manipulate the stack as part of performing a transition.

A pushdown automaton reads a given input string from left to right. In each step, it chooses a transition by indexing a table by input symbol, current state, and the symbol at the top of the stack. A pushdown automaton can also manipulate the stack, as part of performing a transition. The manipulation can be to push a particular symbol to the top of the stack, or to pop off the top of the stack. The automaton can alternatively ignore the stack, and leave it as it is.

Put together: Given an input symbol, current state, and stack symbol, the automaton can follow a transition to another state, and optionally manipulate (push or pop) the stack.

If, in every situation, at most one such transition action is possible, then the automaton is called a deterministic pushdown automaton (DPDA). In general, if several actions are possible, then the automaton is called a general, or nondeterministic, PDA. A given input string may drive a nondeterministic pushdown automaton to one of several configuration sequences; if one of them leads to an accepting configuration after reading the complete input string, the latter is said to belong to the language accepted by the automaton.

Formal definition

[edit]

We use standard formal language notation: denotes the set of finite-length strings over alphabet and denotes the empty string.

A PDA is formally defined as a 7-tuple:

where

  • is a finite set of states
  • is a finite set which is called the input alphabet
  • is a finite set which is called the stack alphabet
  • is a finite subset of , the transition relation
  • is the start state
  • is the initial stack symbol
  • is the set of accepting states

An element is a transition of . It has the intended meaning that , in state , on the input and with as topmost stack symbol, may read , change the state to , pop , replacing it by pushing . The component of the transition relation is used to formalize that the PDA can either read a letter from the input, or proceed leaving the input untouched.[citation needed]

In many texts[2] the transition relation is replaced by an (equivalent) formalization, where

  • is the transition function, mapping into finite subsets of

Here contains all possible actions in state with on the stack, while reading on the input. One writes for example precisely when because . Note that finite in this definition is essential.

Computations

[edit]
a step of the pushdown automaton

In order to formalize the semantics of the pushdown automaton a description of the current situation is introduced. Any 3-tuple is called an instantaneous description (ID) of , which includes the current state, the part of the input tape that has not been read, and the contents of the stack (topmost symbol written first). The transition relation defines the step-relation of on instantaneous descriptions. For instruction there exists a step , for every and every .

In general pushdown automata are nondeterministic meaning that in a given instantaneous description there may be several possible steps. Any of these steps can be chosen in a computation. With the above definition in each step always a single symbol (top of the stack) is popped, replacing it with as many symbols as necessary. As a consequence no step is defined when the stack is empty.

Computations of the pushdown automaton are sequences of steps. The computation starts in the initial state with the initial stack symbol on the stack, and a string on the input tape, thus with initial description . There are two modes of accepting. The pushdown automaton either accepts by final state, which means after reading its input the automaton reaches an accepting state (in ), or it accepts by empty stack (), which means after reading its input the automaton empties its stack. The first acceptance mode uses the internal memory (state), the second the external memory (stack).

Formally one defines

  1. with and (final state)
  2. with (empty stack)

Here represents the reflexive and transitive closure of the step relation meaning any number of consecutive steps (zero, one or more).

For each single pushdown automaton these two languages need to have no relation: they may be equal but usually this is not the case. A specification of the automaton should also include the intended mode of acceptance. Taken over all pushdown automata both acceptance conditions define the same family of languages.

Theorem. For each pushdown automaton one may construct a pushdown automaton such that , and vice versa, for each pushdown automaton one may construct a pushdown automaton such that

Example

[edit]

The following is the formal description of the PDA which recognizes the language by final state:

PDA for
(by final state)

, where

  • states:
  • input alphabet:
  • stack alphabet:
  • start state:
  • start stack symbol: Z
  • accepting states:

The transition relation consists of the following six instructions:

,
,
,
,
, and
.

In words, the first two instructions say that in state p any time the symbol 0 is read, one A is pushed onto the stack. Pushing symbol A on top of another A is formalized as replacing top A by AA (and similarly for pushing symbol A on top of a Z).

The third and fourth instructions say that, at any moment the automaton may move from state p to state q.

The fifth instruction says that in state q, for each symbol 1 read, one A is popped.

Finally, the sixth instruction says that the machine may move from state q to accepting state r only when the stack consists of a single Z.

There seems to be no generally used representation for PDA. Here we have depicted the instruction by an edge from state p to state q labelled by (read a; replace A by ).

Explanation

[edit]
accepting computation for 0011

The following illustrates how the above PDA computes on different input strings. The subscript M from the step symbol is here omitted.

  1. Input string = 0011. There are various computations, depending on the moment the move from state p to state q is made. Only one of these is accepting.

    1. The final state is accepting, but the input is not accepted this way as it has not been read.

    2. No further steps possible.

    3. Accepting computation: ends in accepting state, while complete input has been read.
  2. Input string = 00111. Again there are various computations. None of these is accepting.

    1. The final state is accepting, but the input is not accepted this way as it has not been read.

    2. No further steps possible.

    3. The final state is accepting, but the input is not accepted this way as it has not been (completely) read.

Context-free languages

[edit]

Every context-free grammar can be transformed into an equivalent nondeterministic pushdown automaton. The derivation process of the grammar is simulated in a leftmost way. Where the grammar rewrites a nonterminal, the PDA takes the topmost nonterminal from its stack and replaces it by the right-hand part of a grammatical rule (expand). Where the grammar generates a terminal symbol, the PDA reads a symbol from input when it is the topmost symbol on the stack (match). In a sense the stack of the PDA contains the unprocessed data of the grammar, corresponding to a pre-order traversal of a derivation tree.

Technically, given a context-free grammar, the PDA has a single state, 1, and its transition relation is constructed as follows.

  1. for each rule (expand)
  2. for each terminal symbol (match)

The PDA accepts by empty stack. Its initial stack symbol is the grammar's start symbol.[3]

For a context-free grammar in Greibach normal form, defining (1,γ) ∈ δ(1,a,A) for each grammar rule Aaγ also yields an equivalent nondeterministic pushdown automaton.[4]

The converse, finding a grammar for a given PDA, is not that easy. The trick is to code two states of the PDA into the nonterminals of the grammar.

Theorem. For each pushdown automaton one may construct a context-free grammar such that .[5]

The language of strings accepted by a deterministic pushdown automaton (DPDA) is called a deterministic context-free language. Not all context-free languages are deterministic.[a] As a consequence, the DPDA is a strictly weaker variant of the PDA. Even for regular languages, there is a size explosion problem: for any recursive function and for arbitrarily large integers , there is a PDA of size describing a regular language whose smallest DPDA has at least states.[b] For many non-regular PDAs, any equivalent DPDA would require an unbounded number of states.

A finite automaton with access to two stacks is a more powerful device, equivalent in power to a Turing machine.[8] A linear bounded automaton is a device which is more powerful than a pushdown automaton but less so than a Turing machine.[c]

Turing machines

[edit]

A pushdown automaton is computationally equivalent to a "restricted" Turing Machine (TM) with two tapes which is restricted in the following manner- On the first tape, the TM can only read the input and move from left to right (it cannot make changes). On the second tape, it can only "push" and "pop" data. Or equivalently, it can read, write and move left and right with the restriction that the only action it can perform at each step is to either delete the left-most character in the string (pop) or add an extra character left to the left-most character in the string (push).

That a PDA is weaker than a TM can be brought down to the fact that the procedure "pop" deletes some data. In order to make a PDA as strong as a TM, we need to save somewhere the data lost through "pop". We can achieve this by introducing a second stack. In the TM model of PDA of last paragraph, this is equivalent to a TM with 3 tapes, where the first tape is the read-only input tape, and the 2nd and the 3rd tape are the "push and pop" (stack) tapes. In order for such a PDA to simulate any given TM, we give the input of the PDA to the first tape, while keeping both the stacks empty. It then goes on to push all the input from the input tape to the first stack. When the entire input is transferred to the 1st stack, now we proceed like a normal TM, where moving right on the tape is the same as popping a symbol from the 1st stack and pushing a (possibly updated) symbol into the second stack, and moving left corresponds to popping a symbol from the 2nd stack and pushing a (possibly updated) symbol into the first stack. We hence have a PDA with 2 stacks that can simulate any TM.

Generalization

[edit]

A generalized pushdown automaton (GPDA) is a PDA that writes an entire string of some known length to the stack or removes an entire string from the stack in one step.

A GPDA is formally defined as a 6-tuple:

where , and ?? are defined the same way as a PDA.

:

is the transition function.

Computation rules for a GPDA are the same as a PDA except that the 's and 's are now strings instead of symbols.

GPDA's and PDA's are equivalent in that if a language is recognized by a PDA, it is also recognized by a GPDA and vice versa.

One can formulate an analytic proof for the equivalence of GPDA's and PDA's using the following simulation:

Let be a transition of the GPDA

where .

Construct the following transitions for the PDA:

Stack automata

[edit]

As a generalization of pushdown automata, Ginsburg, Greibach, and Harrison (1967) investigated stack automata, which may additionally step left or right in the input string (surrounded by special endmarker symbols to prevent slipping out), and step up or down in the stack in read-only mode.[11][12] A stack automaton is called nonerasing if it never pops from the stack. The class of languages accepted by nondeterministic, nonerasing stack automata is NSPACE(n2), which is a superset of the context-sensitive languages.[1] The class of languages accepted by deterministic, nonerasing stack automata is DSPACE(n?log(n)).[1]

Alternating pushdown automata

[edit]

An alternating pushdown automaton (APDA) is a pushdown automaton with a state set

  • where .

States in and are called existential resp. universal. In an existential state an APDA nondeterministically chooses the next state and accepts if at least one of the resulting computations accepts. In a universal state APDA moves to all next states and accepts if all the resulting computations accept.

The model was introduced by Chandra, Kozen and Stockmeyer.[13] Ladner, Lipton and Stockmeyer[14] proved that this model is equivalent to EXPTIME i.e. a language is accepted by some APDA if, and only if, it can be decided by an exponential-time algorithm.

Aizikowitz and Kaminski[15] introduced synchronized alternating pushdown automata (SAPDA) that are equivalent to conjunctive grammars in the same way as nondeterministic PDA are equivalent to context-free grammars.

See also

[edit]

Citations

[edit]

Notes

[edit]
  1. ^ The set of even-length palindromes of bits can't be recognized by a deterministic PDA, but is a context-free language, with the grammar .[6]
  2. ^ This follows from the quoted [22, Proposition 7] and the stated observation that any deterministic pushdown automaton can be converted into an equivalent finite automaton[clarify] of at most doubly-exponential size.[7]
  3. ^ Linear bounded automata are acceptors for the class of context-sensitive languages,[9] which is a proper superclass of the context-free languages, and a proper subclass of Turing-recognizable (i.e. recursively enumerable) languages.[10]

Footnotes

[edit]
  1. ^ a b c John E. Hopcroft; Jeffrey D. Ullman (1967). "Nonerasing Stack Automata". Journal of Computer and System Sciences. 1 (2): 166–186. doi:10.1016/s0022-0000(67)80013-8.
  2. ^ Hopcroft & Ullman 1979, p. 110.
  3. ^ "Pushdown Automata". www.cs.odu.edu. Retrieved 2025-08-05.
  4. ^ Hopcroft & Ullman 1979, p. 115.
  5. ^ Hopcroft & Ullman 1979, p. 116.
  6. ^ Hopcroft, Motwani & Ullman 2006, §6.4.3, p. 249.
  7. ^ Holzer, Markus; Kutrib, Martin (2019). "Non-Recursive Trade-Offs Are "Almost Everywhere"". Computing with Foresight and Industry. Lecture Notes in Computer Science. Vol. 11558. pp. 25–36. doi:10.1007/978-3-030-22996-2_3. ISBN 978-3-030-22995-5.
  8. ^ Hopcroft & Ullman 1979, p. 171.
  9. ^ Hopcroft & Ullman 1979, p. 225.
  10. ^ Hopcroft & Ullman 1979, p. 228.
  11. ^ Seymour Ginsburg, Sheila A. Greibach and Michael A. Harrison (1967). "Stack Automata and Compiling". J. ACM. 14 (1): 172–201. doi:10.1145/321371.321385.
  12. ^ Seymour Ginsburg, Sheila A. Greibach and Michael A. Harrison (1967). "One-Way Stack Automata". J. ACM. 14 (2): 389–418. doi:10.1145/321386.321403.
  13. ^ Chandra, Ashok K.; Kozen, Dexter C.; Stockmeyer, Larry J. (1981). "Alternation". Journal of the ACM. 28 (1): 114–133. doi:10.1145/322234.322243. ISSN 0004-5411.
  14. ^ Ladner, Richard E.; Lipton, Richard J.; Stockmeyer, Larry J. (1984). "Alternating Pushdown and Stack Automata". SIAM Journal on Computing. 13 (1): 135–155. doi:10.1137/0213010. ISSN 0097-5397.
  15. ^ Aizikowitz, Tamar; Kaminski, Michael (2011). "LR(0) Conjunctive Grammars and Deterministic Synchronized Alternating Pushdown Automata". Computer Science – Theory and Applications. Lecture Notes in Computer Science. Vol. 6651. pp. 345–358. doi:10.1007/978-3-642-20712-9_27. ISBN 978-3-642-20711-2. ISSN 0302-9743.

Works cited

[edit]

Further reading

[edit]
[edit]
  • JFLAP, simulator for several types of automata including nondeterministic pushdown automata
  • CoAn, another simulator for several machine types including nondeterministic pushdown automata (C++, Windows, Linux, MacOS)
气胸吃什么药 生米煮成熟饭是什么意思 客厅挂钟放在什么位置好 五行土克什么 物是人非什么意思
一个入一个肉念什么 莫欺少年穷是什么意思 高铁上不能带什么 脾胃科主要看什么 生殖疱疹用什么药效果好
鸭蛋炒什么好吃 梦见蝉是什么意思 背部毛孔粗大是什么原因 午时银花露有什么功效 人为什么要日b
腰间盘突出挂什么科室 人工周期是什么意思 同甘共苦什么意思 考教师资格证需要什么条件 金字旁加各念什么
西乐葆是什么药hcv7jop9ns1r.cn 有白带发黄是什么原因hcv9jop1ns4r.cn 奥地利讲什么语言hcv9jop7ns3r.cn 回迁房是什么意思onlinewuye.com 7年之痒是什么意思hcv9jop2ns1r.cn
指甲分层是什么原因hcv8jop0ns8r.cn 高血压吃什么药效果好hcv9jop5ns5r.cn 用盐水洗脸有什么效果wzqsfys.com 接盘侠什么意思hcv9jop0ns4r.cn 什么牌子的洗衣机好hcv9jop6ns0r.cn
狗生小狗前有什么征兆helloaicloud.com 唠嗑是什么意思qingzhougame.com 甲鱼吃什么的hcv8jop7ns6r.cn 什么的成长hcv9jop3ns7r.cn 生肖龙和什么生肖最配hcv8jop4ns5r.cn
都有什么大学hcv8jop9ns7r.cn 叶酸片什么时候吃合适hcv9jop5ns3r.cn 房中术是什么意思qingzhougame.com hisense什么牌子hcv8jop9ns5r.cn 93年的属什么hcv7jop9ns2r.cn
百度