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. JDK各版本新增的主要特性

    JDK1.5新特性: 1.自动装箱与拆箱: 2.枚举 3.静态导入,如:import staticjava.lang.System.out 4.可变参数(Varargs) 5.内省(Introspec ...

  2. Unity人工智能学习—确定性AI算法之追踪算法一

    转自http://blog.csdn.net/zhangxiao13627093203/article/details/47451063 尽管随机运动可能完全不可预知,它还是相当无趣的,因为它完全是以 ...

  3. 前端tab页实例

    <div class="tabbable"> <ul class="nav nav-tabs padding-16"> <c:fo ...

  4. iOS消息推送相关

    远程推送 iOS开发之实现App消息推送:http://blog.csdn.net/shenjie12345678/article/details/41120637 国内90%以上的iOS开发者,对A ...

  5. HttpRequestMessage

    mvc4中的WEBAPI,发现接收参数不是很方便,跟传统的request.querystring和request.form有很大区别,在网上搜了一大圈,各种方案都有,但不是太详细,于是跟踪Action ...

  6. JavaScript基本类型比较

    我们都知道js的基本类型有undefined,null,boolean,number,string; 当我们在进行基本数据类型的运算和比较时数据类型会根据运算符号和左右两边值的不同作如下转换: +   ...

  7. 清理SharePoint 2010的SQL Server 2008 R2日志数据库的方法!

    //来源:http://www.cnblogs.com/nbpowerboy/p/3380079.html 公司用SharePoint 2010已有三年多的时间了,上BPM项目也有2年多的时间,之前供 ...

  8. drupal7 sql接口笔记

    1.查询: execute() ->fetch():从结果集中取出一行作为一个对象 execute() ->fetchField():获取单个值 execute() ->fetchA ...

  9. laravel 日志

    laravel学院的 http://laravelacademy.org/post/195.html 他人博客的 http://www.cnblogs.com/yjf512/p/4173261.htm ...

  10. Android中的eventBus传值

    第一步:在build.gradle中添加依赖dependencies { compile 'org.greenrobot:eventbus:3.0.0'} 第二步:创建一个 Event类: 注意:en ...