计算理论 形式语言与自动机

Pushdown Automaton (PDA) is a kind of Automaton which comes under the theory of Computation that appoints stack. The word Pushdown stands due to the fact that the stack can be pushed down as operations can only work on the elements which are on the top of the stack. A PDA can store an infinite amount of information. It is used to identify Context-free languages.

下推式自动机(Pushdown Automaton,PDA)是一种基于计算理论的自动机,它指定堆栈。 之所以使用Pushdown一词,是因为可以将堆栈向下推,因为操作只能在堆栈顶部的元素上进行。 PDA可以存储无限量的信息。 它用于识别上下文无关的语言。

The following equation will help you to understand Pushdown Automaton (PDA),

以下等式将帮助您了解下推自动机(PDA)

"Pushdown Automation" = "Finite State Machine" + "Stack"

“下推式自动化” =“有限状态机” +“堆栈”

A finite state machine does not employ any stack and only bothers about the input signal and the current state that does not work in the case of context free grammar. Push Down Automata is different from finite state machine because,

有限状态机不使用任何堆栈,而只关心输入信号和当前状态,这在上下文无关文法的情况下不起作用。 下推自动机与有限状态机不同,因为,

  1. It uses top of the stack for deciding which transition is to be taken.

    它使用堆栈的顶部来决定要进行的过渡。

  2. While performing the transition, it can handle or manipulate the stack.

    在执行过渡时,它可以处理或操纵堆栈。

Pushdown Automaton (PDA) reads the provided string from left to right direction. The current state, input symbol and the symbol at TOS (Top of the Stack) are being indexed in the table and helps in choosing a transition, this happens at each step. While performing a transition, PDA can manipulate stack in two ways, either it can push a symbol at the top of the stack or can pop out a symbol from the stack.

下推式自动机(PDA)从左到右读取提供的字符串。 在表中为当前状态,输入符号和TOS(堆栈顶部)上的符号建立索引,并有助于选择过渡,这在每个步骤中都会发生。 在执行转换时,PDA可以通过两种方式操纵堆栈,既可以将符号推入堆栈的顶部,也可以从堆栈弹出符号。

Formal definition of PDA,

PDA的正式定义,

PDA can be betokened formally by a 7-tuple (Q, ∑, S, δ, q0, I, F) where,

PDA可以由7个元组(Q,∑,S,δ,q0,I,F)正式标记,其中,

  1. Q is the number of states. It is finite.

    Q是状态数。 这是有限的。

  2. is an input alphabet. It is a finite set.

    Σ是输入字母。 这是一个有限集。

  3. S stands for stack symbols.(which can be pushed and popped from the stack).

    S代表堆栈符号(可以从堆栈中压入和弹出)。

  4. δ is the transition function which is Q × (∑ ∪ {ε}) × S × Q × S*. It is a finite subset.

    δ是转移函数Q×(∑ε{ε})×S×Q×S * 。 它是一个有限子集。

  5. q0 is the start or initial or beginning state (q0 ∈ Q).

    q0是开始或初始或开始状态(q0∈Q)

  6. I is the initial stack top symbol (I ∈ S).

    I是初始堆栈顶部符号(I∈S)

  7. F is the set of accepting states (F ∈ Q).

    F是一组接受状态(F∈Q)

In a specified state, PDA will read the symbol which is at the top of the stack and the input signal and move to a new state after changing the symbol of the stack.

在指定状态下, PDA将读取堆栈顶部的符号和输入信号,并在更改堆栈符号后移至新状态。

Consider the following diagram which demonstrates transition in a PDA, from State q1 to state q2 described as x, y->z.

考虑下图,该图演示了PDA从状态q1到状态q2的过渡,描述为x,y-> z

In the above scenario, you can observe that if the current state of machine is q1, The input symbol is 'x' and 'y' is at the Top of Stack symbol then we can carry out push and pop operation by popping 'y' and pushing 'z' on the top of the stack and can proceed to state q2.

在上述情况下,您可以观察到,如果计算机的当前状态为q1 ,输入符号为'x'并且'y'在堆栈顶部符号中,那么我们可以通过弹出'y'来执行推入和弹出操作并将'z'推入堆栈的顶部,然后可以进入状态q2

Some important points of PDA:

PDA的一些要点:

  • A PDA is used to check whether a given grammar is context free grammar or not.

    PDA用于检查给定的语法是否为上下文无关的语法。

  • A grammar is accepted if it reaches the end state on using of all its input symbols.

    如果语法在使用所有输入符号时都达到结束状态,则该语法被接受。

  • There are some other notations of the PDA that are used. They are:

    使用了PDA的其他一些符号。 他们是:

    1. Instantaneous Description: For a PDA, instantaneous description is given by,即时描述 :对于PDA,即时描述由,
    2.     triplet (q,w,s), where
      q is the current state of the machine
      w is the set of input symbols that are remaining
      s is the stack.
      
      
    3. Turnstile Notation: It defines the moves of PDA based on ID notation. Transition is defined as 旋转记号 :它根据ID记号定义PDA的移动。 过渡定义为'⊢'“⊢”

翻译自: https://www.includehelp.com/toc/pushdown-automaton-pda-theory-of-computation.aspx

计算理论 形式语言与自动机

计算理论 形式语言与自动机_下推式自动机(PDA)| 计算理论相关推荐

  1. 请给出计算231-1的python表达式_【填空题】计算2 32 -1的Python表达式可以书写为____...

    [填空题]计算2 32 -1的Python表达式可以书写为____ 更多相关问题 [判断题]军队和国防建设指导思想实行战略转变的实质是:从立足于早打.大打.打核战争的临战准备状况,转到和平时期建设的轨 ...

  2. c++中计算2得n次方_生物高考常考计算题型归纳与答题公式

    生物计算题对于生物来说属于偏难题了,因此很多小伙伴容易在这上面丢分,但只要掌握好了计算方法,实则也是非常简单的.为此,货哥就给大家整理了生物计算题的常考题型与计算方法.(电子版见文末)题型一:有关光合 ...

  3. 和量子计算有什么区别 并发_到底什么是量子计算?

    简言之,量子计算机是一类遵循量子力学规律进行高速数学和逻辑运算.存储及处理量子信息的物理装置.当某个装置处理和计算的是量子信息.运行的是量子算法时,它就是量子计算机. 对于现代计算机而言,通过控制晶体 ...

  4. 心电图计算心率2个公式_心电图上用来计算心率的时间是()

    达立公司会议室里,徐总经理.人力资源部蔡经理和新进公司的技术人员正在进行对话. 徐总经理一脸诚恳:"听说你们要集体辞职,能把你们的想法告诉我吗?"没人回答.徐总经理接着说:&quo ...

  5. python计算汽车的平均油耗_聊聊汽车油耗怎么计算

    随着油价的上涨,有车的朋友越来越关注爱车的实际耗油量.油耗是跟我们用车养车息息相关的数据,它不仅可以帮助车主了解车辆的实际油耗,跑个远门就能更好规划到哪里加油,而且还更利于车主用户全方位了解车辆油耗情 ...

  6. python 计算面积 比计算几何慢_利用ArcGIS和Python计算中国各省路网密度

    ArcGIS 相交 利用ArcGIS里面的相交工具,每个省把路标识了. 计算几何 分别计算路网的长度和各省的面积. Python 利用Python对属性数据进行处理 导入相关模块 ## 导入相关模块 ...

  7. 成就动机理论由谁提出_什么是心理学的成就动机理论?

    成就动机是指人们希望从事对个体有重要意义的,具有挑战性的活动,并且在活动中超过别人,取得优异成绩的动机. (个人理解:成就动机高的人在生活中往往表现得十分努力上进,对于他们来说,解决太过容易的问题没有 ...

  8. 截流式合流制设计流量计算_截流式合流制管道系统的设计说明

    第一章 概念及理论 . ........................................................... 2 1.1 排水体制 . ............... ...

  9. python解题教学设计的理解_面向计算思维培养的初中 Python 项目式学习教学设计流程构建...

    2006 年, 美国卡内基梅隆大学的周以真教授提出了计算思维的概念.计算思维是利用计算机科学的基本理念解决问题.设计系统和理解人类行为的一种方法,并指出计算思维的本质是抽象(Abstraction)和 ...

最新文章

  1. Spring中的这些坑,99%的程序员都踩过
  2. 微服务等于Spring Cloud?了解微服务架构和框架
  3. 那些《西游记》中你不知道的野史,信不信由你
  4. c语言程序设计 第三版 哈工大,c语言程序设计 哈工大 苏小红 第三章习题
  5. 呕心沥血 JavaScript知识点梳理大全,超详细 建议收藏!!!
  6. 从开源开发者身上学到的 5 种品质
  7. 基于c语言中调试工具的用法汇总(不包含gdb)【转】
  8. 替换过的mysql能找回来_MySQL 误操作后数据恢复(update,delete忘加where条件)
  9. Atitit 编程语言语言规范总结 语法部分 目录 1. 语言规范 3 2. Types 3 2.1.1. Primitive types 3 2.1.2. Compound types 4 3.
  10. 动态路由下的导航守卫--(to,from,next)
  11. 我是如何从大三开始实现财务自由的
  12. Vue + Echarts 实现中国地图的绘制
  13. 微信小程序开发——websocket(socket在线测试服务器,或本地socket服务器)
  14. 铁血战士 (美国2018年沙恩·布莱克执导电影)
  15. Eclipse中导入项目前有红叉提示但是项目内容不报错解决办法
  16. 《德鲁克管理思想精要》读书笔记1 - 管理是什么?
  17. 解决电脑插耳机声音外放
  18. 编写程序,由键盘输入三个整数分别存入变量num1,num2,num3中,对它们进行排序, 使用if-else结构,并按从小到大的顺序输出
  19. 论软件自动化测试中 QR_Code 的登录的逻辑
  20. 《基于AI+大数据的医疗大健康最佳实践》---- AI 赋能临床试验受试者招募助力企业药物研发

热门文章

  1. fifo页面置换算法设计思路_千万级并发!如何设计一个多级缓存系统?
  2. 浙江大学计算机保研条件_【如何将保研成功率提至100%】来自取得浙大等五所顶尖院校保研资格学长的干货分享(联系导师章节已更)...
  3. 戴尔电脑好还是华为好_华硕和戴尔笔记本哪种好 华硕和戴尔优缺点分析【详解】...
  4. 【SpringBoot 2】(六)配置文件 web开发相关
  5. mysql安装、导入数据脚本
  6. 制作windows启动盘-大于4GB镜像
  7. X86和X86_64和AMD64的由来
  8. zookeeper基本操作
  9. snort的详细配置
  10. 飞凌 ok6410 按键驱动源码及测试代码