上下文无关文法(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
Suck Wrappers are a set of UNIX script files that sets up inn, an NNTP server, on a local machine so that suck can communicate with a News server supplied by an ISP . It also installs a set of wrapper scripts (based on the sample scripts provided with the suck tar ball) that call suck with the correct settings to communicate with an ISP on a linux machine. (Tested on Redhat 7.2 and 9).
标签: Wrappers machine script server
上传时间: 2015-11-07
上传用户:tedo811
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
The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical) of any level of nesting to XML format and vice versa. For example, >> project.name = MyProject >> project.id = 1234 >> project.param.a = 3.1415 >> project.param.b = 42 becomes with str=xml_format(project, off ) "<project> <name>MyProject</name> <id>1234</id> <param> <a>3.1415</a> <b>42</b> </param> </project>" On the other hand, if an XML string XStr is given, this can be converted easily to a MATLAB data type or structure V with the command V=xml_parse(XStr).
标签: converts Toolbox complex logical
上传时间: 2016-02-12
上传用户:a673761058
计算器程序,c++语言实现,利用栈,可执行复杂的4则运算如8-1+(2-1)*9/3,vc++6编译通过
上传时间: 2014-01-17
上传用户:叶山豪
增加系统功能调用,在Red-Flag5.0下编译内核,注意内核版本应该是2.6.0~2.6.9,之后版本内核的编译方式有变化!
标签:
上传时间: 2016-12-02
上传用户:JIUSHICHEN
动态规划算法的应用 数塔问题 给定一个数塔,其存储形式为如下所示的下三角矩阵。在此数塔中,从顶部出发,在每一节点可以选择向下走还是向右走,一直走到底层。请找出一条路径,使路径上的数值和最大。 输入样例(数塔): 9 15 10 6 8 2 18 9 5 19 7 10 4 16 输出样例(最大路径和): 59
上传时间: 2013-12-19
上传用户:坏坏的华仔
最新rtlinux内核源码,包括2.6.9内核补丁
上传时间: 2016-12-22
上传用户:zhangjinzj
内存注册机masm源码,内存注册机的工作原理及masm源码 [编程工具]masm32(9.00)+RadAsm2.2.0.9 [调试工具]OD1.10 [调试平台]WinXP/SP2
上传时间: 2013-12-25
上传用户:gtzj
一套linux glib源代码,2.12.9版本,gz压缩格式。
上传时间: 2014-01-05
上传用户:iswlkje