上下文无关文法(Context-Free Grammar, CFG)是一个4元组G=(V, T, S, P),其中,V和T是不相交的有限集,S∈V,P是一组有限的产生式规则集,形如A→α,其中A∈V,且α∈(V∪T)*。V的元素称为非终结符,T的元素称为终结符,S是一个特殊的非终结符,称为文法开始符。 设G=(V, T, S, P)是一个CFG,则G产生的语言是所有可由G产生的字符串组成的集合,即L(G)={x∈T* | Sx}。一个语言L是上下文无关语言(Context-Free Language, CFL),当且仅当存在一个CFG G,使得L=L(G)。 *⇒ 例如,设文法G:S→AB A→aA|a B→bB|b 则L(G)={a^nb^m | n,m>=1} 其中非终结符都是大写字母,开始符都是S,终结符都是小写字母。
标签: Context-Free Grammar CFG
上传时间: 2013-12-10
上传用户:gaojiao1999
We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.
标签: represented integers group items
上传时间: 2016-01-17
上传用户:jeffery
菲斯卡尔908无刷电机控制程序,c语言编写,该程序主要用于洗衣机马达驱动。
上传时间: 2016-02-12
上传用户:yzhl1988
本系统以高效率D类功率放大器为核心,输出开关管以采用高速MOSFET管,连接成互补对称H桥式结构。
上传时间: 2013-12-18
上传用户:trepb001
在win2000sp4 + VM6基本稳定。 原理不多说了,自己看代码吧,我也早就发过了驱动的代码了,现在的就是一个完整的应用。希望能够对大家有一点帮助,但是不要用在不该用的场所。 使用方法将: dd1压缩包里面是驱动源码 console压缩包里面是控制台源码 hide.exe是最终产品 使用方法: 1、将hide.exe复制到系统目录 2、运行cmd 3、hide -h 查看帮助 hide -i 安装驱动 hide -u 卸载驱动 hide -f -a filename 添加一个隐藏文件
上传时间: 2013-12-12
上传用户:liglechongchong
microchip控制器的motor control 程序,6014做主控制器,4012作为马达驱动芯片
标签: microchip control motor 控制器
上传时间: 2013-12-11
上传用户:标点符号
大功率音频放大器的设计,基于低通滤波器,H桥PWM技术
上传时间: 2014-01-27
上传用户:lili123
掌握在uC/OS-II 操作系统下使用ZLG/GUI的基本方法。 1. 启动 ADS 1.2,使用 ARM Executable Image for UCOSII(for lpc22xx)工程模板建立一 个工程 gui_ucos,工程存储在 uCOS-II 目录下。 说明:在 uCOS-II 目录下要保存有 uCOS-II 的移植代码和内核源代码。 2. 建立 C 源文件 Test .c,编写实验程序,保存到 gui_ucos\src 目录下,然后添加到工程 的 user组中。 3. 复制 ZLG/GUI 文件。把 ZLG_GUI 整个目录及文件复制到 gui_ucos\SRC 目录下。 4. 添加 ZLG/GUI 文件。在工程管理窗口中新建一个组 ZLG/GUI,然后在这个组内添 加 gui_ucos\SRC\ZLG_GUI下的所有 C 源程序文件和 GUI_CONFIG.H配置文件。 5. 新建驱动程序,在工程管理窗口中新建一个组 lcd_drive,并将驱动程序添加到工程 的 lcd_drive组中。驱动程序文件名比如:LCDDRIVE.c、LCDDRIVE.H,可以保存 在 gui_ucos\SRC 目录下。 6. 修改 CONFIG.H,增加包含 LCDDRIVE.H 头文件和 ZLG/GUI 的所有头文件,如程 序清单 1.3 所示。
上传时间: 2013-12-21
上传用户:wyc199288
用义隆IC编写的一个玩具,具体波形和源代码都已通过验证。并已经量产,适合做马达驱动类的网友观阅!同时希望大家赐教其中的不足之处!谢谢!
上传时间: 2014-01-01
上传用户:cooran
汉诺塔!!! Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation eg. if n = 2 A→B A→C B→C if n = 3 A→C A→B C→B A→C B→A B→C A→C
标签: the animation Simulate movement
上传时间: 2017-02-11
上传用户:waizhang