some books describe pumping lemma as this:

Let L be a regular language. Then there exists an integer p ≥ 1 depending only on L such that every string w in L of length at least p (p is called the "pumping length"[4]) can be written as w = xyz (i.e., w can be divided into three substrings), satisfying the following conditions:

  1. |y| ≥ 1;
  2. |xy| ≤ p
  3. for all i ≥ 0, xyiz ∈ L

Copied from Wikipedia.

However, please note that actually pumping lemma can only be used for infinite regular language.

Some people on stackoverflow also answers this problem:

"You are right - we cannot allow "pumping" words of a finite L. The thing you are missing is that the lemma says there exists a number p, but does not tell us the number.

All words longer than p can be pumped, by the lemma. For a finite L, it happens so that p is larger than the length of the longest word in L. Thus, the lemma only holds vacuously, and cannot be applied to any word in L, i.e., any word in L does not satisfy the condition of "having length at least p" as the lemma requires.

A corollary: if L has pumping length p, and there exists some word w∈L of length at least p, then L is infinite."

pumping lemma for finite regular language?的更多相关文章

  1. 证明与计算(7): 有限状态机(Finite State Machine)

    什么是有限状态机(Finite State Machine)? 什么是确定性有限状态机(deterministic finite automaton, DFA )? 什么是非确定性有限状态机(nond ...

  2. 编译系统中的 NFA/DFA算法理解

    1.问题概述 NFA 和 DFA浅析---要深入了解正则表达式,必须首先理解有穷自动机. 有穷自动机(Finite Automate)是用来模拟实物系统的数学模型,它包括如下五个部分: 有穷状态集St ...

  3. Compiler Theory(编译原理)、词法/语法/AST/中间代码优化在Webshell检测上的应用

    catalog . 引论 . 构建一个编译器的相关科学 . 程序设计语言基础 . 一个简单的语法制导翻译器 . 简单表达式的翻译器(源代码示例) . 词法分析 . 生成中间代码 . 词法分析器的实现 ...

  4. HDU 5487 Difference of Languages

    Difference of Languages Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on HDU. ...

  5. 4.2 Context-Free Grammars

    4.2 Context-Free Grammars Grammars were introduced in Section 2.2 to systematically describe the syn ...

  6. Boyer-Moore algorithm

    http://www-igm.univ-mlv.fr/~lecroq/string/node14.html Main features performs the comparisons from ri ...

  7. 软件推荐-有限元开发软件FELAC

    首页:http://yuanjisuan.cn/ 有限元语言及其编译器(Finite Element Language And it’s Compiler),以下简称FELAC是中国科学院数学与系统科 ...

  8. CMUSphinx Learn - Basic concepts of speech

    Basic concepts of speech Speech is a complex phenomenon. People rarely understand how is it produced ...

  9. CodeForces 1110H. Modest Substrings

    题目简述:给定$1 \leq l \leq r \leq 10^{800}$,求一个长度为$n \leq 2000$的数字串$s$,其含有最多的[好]子串.一个串$s$是[好]的,如果将其看做数字时无 ...

随机推荐

  1. C# lock关键词/lock语句块、线程锁

    一.lock关键词说明 1. lock 关键字将语句块标记为临界区,方法是获取给定对象的互斥锁,执行语句,然后释放该锁. 2. lock 语句块锁定,功能等同于 Monitor.Enter(obj): ...

  2. vb.net 结束进程

    Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click ...

  3. magento中对获取的数据在前台进行分页显示

    1.数据加载类class Bf170_Bf170Logistics_Block_Inquiry_Index extends Mage_Core_Block_Template {        publ ...

  4. Egret 学习之 从HelloWorld项目开始 (二)

    1,创建新项目HelloWorld ,可以在界面上点击文件->新建,也可以在命令行使用create: 2,src 目录,存放我们的代码.我们编写的代码都放在src目录下面. bin-debug ...

  5. C# Oracle insert 中文乱码

    问题描述: 在PL SQL中insert 中文数据,显示不乱码,通过后台insert的中文数据,显示问号. 解决分三步: 1.Select userenv('language') from dual; ...

  6. python 3.5构建WINDOWS推送服务

    import ConfigParser import os import sys cf = ConfigParser.ConfigParser() #绝对路径获取 ABSPATH=os.path.ab ...

  7. C#+ArcEngine中com对象的释放问题

    1.问题描述 最近在写C#下AE的开发,在循环获取数据并修改时碰到了两个问题"超出系统资源"和"超出打开游标最大数":在网上看了一些资料,发现都是说在循环中没有 ...

  8. C#拾遗(二、函数)

    1. 参数数组.C#的特色,允许函数参数的最后指定一个参数数组,可以使用个数不定的参数调用,用params关键字定义 static double SumVals(params double[] val ...

  9. IO流数据读写总结

    1.用java自带的IO读写方法 官方API网站:http://docs.oracle.com/javase/7/docs/api/ 2.Apache的Commons-io-2.4.jar中的方法,参 ...

  10. php分类

    <?php /* * PHP分页类 * @package Page * @Created 2013-03-27 * @Modify 2013-03-27 * @link http://www.6 ...