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. CodeForces 687B Remainders Game

    数论. 如果$x$不唯一,假设存在两个解,较大的为${x_1}$,较小的为${x_2}$. 那么, $\left\{ {\begin{array}{*{20}{c}}{{x_1}\% {c_i} = ...

  2. HC-05与HC-06的AT指令的区别

    蓝牙HC-05与HC-06对比指令集 高电平->AT命令响应工作状态     低电平->蓝牙常规工作状态 <重新上电表示完成复位> HC-05 可以主从切换模式,但是HC-06 ...

  3. [SQL基础教程] 2-2 算数运算符和比较运算符

    [SQL基础教程] 2-2 算数运算符和比较运算符 算数运算符 四则运算 运算符 含义 + - * / SELECT col_1*2 AS col_new FROM table; 注意 所有包含NUL ...

  4. 浙大pat1050题解

    1050. String Subtraction (20) 时间限制 10 ms 内存限制 32000 kB 代码长度限制 16000 B 判题程序 Standard Given two string ...

  5. Ubantu安装mysql

    在Linux下MySQL的安装,我一直觉得挺麻烦的,因为之前安装时就是由于复杂的配置导致有点晕.今天,需要在Linux下用Qt连接MySQL.遂安装配置了一把. 1)首先检查系统中是否已经安装了MyS ...

  6. scala 访问权限详解

    private/protected [包名/类名/this] 即可指定变量的作用域.(this代表只有当前实例(即对象)可以访问) 伴生类和伴生对象中的成员可以相互访问. class PackageO ...

  7. 转:IIS虚拟目录实现与文件服务器网络驱动器映射共享

    这篇文章转载别人,想原创作者致敬! 我本人也遇到同样的问题,故转载记录. 本文重点描述如何使用IIS访问共享资源来架设站点或执行 ASP.Net 等脚本. 通常情况下,拥有多台服务器的朋友在使用IIS ...

  8. Python--三元运算与lambda表达式

    三元运算: if 1 ==1: name = 'Tim' else: name = 'SB' 利用三元运算来完成上述4句语句任务: name = 'Tim' if 1==1 else 'SB' lam ...

  9. 信息存储——当值X是2的非负整数n次幂时,如何表示成十六进制

    十六进制表示法              当值X是2的非负整数n次幂时,很容易将X写成十六进制形式,只要记住X的二进制表示就是1后面跟n个0.十六进制数字0代表4个二进制0.所以当n表示成i+4j的形 ...

  10. iOS7之后的文本高度封装

    #import "NSString+Util.h" @implementation NSString (Util) +(CGFloat)changeStationWidth:(NS ...