隽读什么| 天蝎什么象| 维生素B6有什么功效| 2008年什么年| 歆字五行属什么| 压马路是什么意思| 肚子长痘痘是什么原因| 磁共振和核磁共振有什么区别| 足是什么结构| ect是什么意思| 做美甲有什么危害| 媾什么意思| 肝火旺喝什么茶| 观音菩萨代表什么生肖| 什么牌子的耳机音质效果最好| 对应是什么意思| TB是什么缩写| 吃什么解酒| 僵尸为什么怕糯米| 白芷有什么功效| 什么是功能性子宫出血| 看鼻子挂什么科| 指桑骂槐是什么生肖| 婴儿游泳有什么好处和坏处| naprogesic是什么药| 多巴胺是什么意思| 周星驰什么星座| 口腔溃疡一直不好是什么原因| 一劳永逸什么意思| 羽毛球拍什么材质的好| 小米不能和什么一起吃| 拔智齿挂什么科| 秋天能干什么| 什么鸡蛋营养价值最高| 肉桂是什么茶| 为什么总是做噩梦| 开市是什么意思| 手老是出汗是什么原因| 异型增生是什么意思啊| 平均红细胞体积偏高是什么意思| 什么原因导致月经量少| 敞开心扉是什么意思| 7月30日是什么星座| 阴血是什么| 初秋的天冰冷的夜是什么歌| 什么是肺结节| r值是什么意思| 摆地摊卖什么最赚钱而且很受欢迎| 不放屁是什么原因| bp在医学上是什么意思| 力挽狂澜是什么意思| 认栽是什么意思| 胆囊炎吃什么水果好| 妊娠状态是什么意思| 弥勒佛为什么是未来佛| 梦见狗咬别人是什么意思| 毕业礼物送什么| 鸭肫是鸭的什么部位| 增强ct是什么意思| 2157是什么意思| 紧迫感是什么意思| 霸王硬上弓是什么意思| 大便变细是什么原因| 脸上长水泡似的痘痘是什么原因| 什么光会给人带来痛苦| 缩阳是什么意思| 42是什么生肖| 荣耀是什么品牌| 欧是什么意思| 一个巾一个童读什么| 大云是什么烟| 什么是百慕大三角| 淋巴滤泡形成什么意思| 8月6号是什么星座| 女性尿道出血是什么原因引起的| 急性扁桃体化脓是什么原因引起的| 耍朋友是什么意思| 手上的三条线分别代表什么| 精神病是什么意思| 白细胞wbc偏高是什么意思| 使用年限是什么意思| 曲水流觞是什么意思| 一听是什么意思| 三丧日是什么意思| 什么是太岁| 黄皮果什么味道| 熟啤酒是什么意思| 赘婿是什么意思| 一个车一个罔是什么字| 易蒙停是什么药| 全国政协常委什么级别| 科学家是干什么的| 隐形眼镜半年抛是什么意思| 短pr间期是什么意思| 轰20什么时候首飞| 米米是什么意思| bottle什么意思| 老是拉肚子什么原因| 吃什么健脾| 什么的小虾| 三个大是什么字| 那敢情好是什么意思| 什么不生四字成语| 紫苏是什么植物| 胰腺在人体起什么作用| tf是什么| 无伤大雅是什么意思| 金族念什么| 便秘吃什么水果| 便溏是什么原因引起的| 微信什么时候推出的| single是什么意思| ggdb是什么牌子| 什么叫环比| 煎牛排用什么锅| 什么茶不能喝| 凉皮是什么材料做的| 吃什么会变胖| 欢天喜地是什么生肖| 白带过氧化氢阳性是什么意思| ct挂什么科| 榴莲补什么| 更年期是什么时候| 牙龈翻瓣术是什么意思| 吃的多拉的少是什么原因| nt什么时候做| bodywash是什么意思| 股票除权是什么意思| 备孕前需要做什么检查| 上焦火旺什么症状| 舟可是什么字| 1960属什么生肖| 肺大泡用什么药| 偏头痛吃什么药效果好| 97年属什么今年多大| 羊水什么颜色| 牙龈肿痛是什么原因| 淋巴结炎吃什么药| 孕晚期为什么会脚肿| 高血压吃什么好| 一千年前是什么朝代| 未央什么意思| 萎缩性胃炎是什么原因引起的| 联通查流量发什么短信| 宫颈ecc是什么意思| 无赖不还钱最怕什么| 两败俱伤是什么意思| 安抚奶嘴什么时候开始用| 八月二十六是什么星座| 熟地黄是什么| 什么什么之财| 抽烟为什么会上瘾| jj是什么意思| 一什么地毯| 胎儿左心室灶状强回声是什么意思| 偏头痛是什么原因| 正月初八是什么星座| 风疹病毒抗体阳性是什么意思| 临床医学是什么意思| touch是什么牌子| 9月1号什么星座| 月经来了头疼是什么原因导致的| 六月初三是什么日子| 内什么外什么成语| 脑萎缩吃什么药最好| 夏天不出汗是什么原因| 什么情况下能吃脑络通| 自身免疫性疾病是什么意思| 缺维生素b吃什么食物| 不安腿综合征吃什么药| 牙痛吃什么药好得快| 总恶心是什么原因| 看灰指甲挂什么科| 大拇指疼痛什么原因引起的| 宝宝干呕是什么原因| 补位是什么意思| 过敏性皮炎用什么药| 蛇床子是什么| 糜米是什么米| 男人割了皮包什么样子| 棋逢对手下一句是什么| 颈椎反曲是什么意思| 梦见别人穿红衣服是什么意思| 马女和什么属相最配| 巨蟹座与什么星座最配| 子宫有问题有什么症状| 鸡胗是鸡的什么部位| 燕麦长什么样子图片| 劲爆是什么意思| 残骸是什么意思| 垢是什么意思| 饣与什么有关| 发烧呕吐吃什么药| 三生石是什么意思| 大黄和芒硝混合外敷有什么作用| 流水生财是什么意思| 宝刀未老的意思是什么| 满江红属于什么植物| 覆盖的意思是什么| 脚冷是什么原因| 7月11号什么星座| 为什么会晕血| 三点水弘读什么| 尿出血是什么原因| 为什么大拇指只有两节| 孩子脾胃虚弱吃什么药| 西布曲明的危害及副作用分别是什么| 普洱茶什么牌子好| 突然视力模糊是什么原因引起的| 三个龙念什么| 董小姐是什么意思| 颅骨早闭合有什么症状| 关节痛挂号挂什么科| 房性期前收缩是什么意思| 近亲结婚有什么危害| 呼吸短促是什么原因| 12月9号是什么星座| 什么是糖类抗原| 靶身高是什么意思| gap是什么牌子的衣服| 头晕耳鸣是什么原因引起的| 沙特用什么货币| 宫后是牛身上什么部位| vave是什么意思| 健康证挂什么科| 一只眼睛充血是什么原因| pp材质是什么材料| 头皮很痒是什么原因| 猴子尾巴的作用是什么| 孕妇缺碘吃什么补最快| 月令是什么意思| 欲拒还迎什么意思| 贵州有什么| 崩漏是什么意思| 阴险是什么意思| 1978属什么| 郭富城什么星座| 快递什么时候上班| 车加尿素起什么作用| 璀璨人生是什么意思| 水手服是什么| 龙冲什么生肖| 寅时五行属什么| 结扎挂什么科| 哈根达斯是什么| 流虚汗是什么原因| 为什么叫夺命大乌苏| venus是什么星球| 脑供血不足吃什么药好| 什么变什么化| 植物神经紊乱吃什么中成药| 心如止水是什么意思| 右手无名指戴戒指什么意思| 什么的城市| hpv16阳性有什么症状| 大麦茶有什么功效| 排卵期身体有什么症状表现吗| 同房为什么会出血| 胃复安是什么药| 轴向是什么意思| 气促是什么意思| 常吃猪油有什么好处和坏处| 萝卜喝醉了会变成什么| 转氨酶异常是什么意思| 百度

《中华大典·生物学典·植物分典》面世 736万字巨制传承考据绝学

百度 (作者是北京学者)

Matching ordinary regular expresions can be done in polynomial time, proportional to MN, where M is the length of the regular expression and N is the length of the string to be matched. The usual method for this is: Parse the regular expression and construct an equivalent finite automaton (FA), which will have O(M) states; then simulate the action of the FA on the input, which takes O(MN) time. My Regex.pm module demonstrates this.

However, adding backreferences to regular expressions complicates them so that the usual FA construction does not work. Perl can handle these extended regexes, but it sometimes takes a long time to find out if there is a match or not. For example, Perl takes exponential time (in the length of the string to be matched) to check whether or not a string matches the regex /^(?:(\d+)|::)*$/.

One is tempted to wonder whether this difficulty is inherent, or whether there might be a clever way of speeding up the matching algorithm. The answer is that there is probably no clever way to speed up the algorithm, and that the exponential running time of the matching algorithm is probably unavoidable. We show below that regex matching is NP-hard when regexes are allowed to have backreferences.

The usual method of showing that a problem P is NP-hard is by showing that some other NP-hard problem, Q, could be solved efficiently if P could be also. I showed that instances of the GRAPH 3-COLORABILITY problem can be reduced to instances of regex matching. Abigail showed that instances of the 3CNF-SAT problem can be reduced to instances of regex matching. Greg Bacon showed that instances of the CLIQUE problem can be reduced to instances of regex matching.


Some Notes About NP-Completeness

This page used to say "Regex Matching is NP-Complete". That may not be correct. I've been meaning to fix it for years, but I never got around to it before. To show that regex matching is NP-complete, we need to show two things. First, we need to show that it is NP-hard; the proofs on this page do that. Second, we need to show that regex matching is in NP. The proofs don't do that.


Return to: Universe of Discourse main page | What's new page | Perl Paraphernalia

mjd-perl-npc@plover.com

蛋白质被消化成什么 instagram是什么 羊字五行属什么 尿路感染吃什么药好得快 什么肠小道成语
坐月子吃什么补气血 胚胎是什么 晚上12点是什么时辰 肾结石吃什么水果 三餐两点什么意思
糟卤是什么 梦见着火是什么预兆 什么样的孕妇容易翻盘 梦见理发是什么意思 jimmy是什么意思
作奸犯科是什么意思 什么病不能吃空心菜 loves是什么意思 西游记告诉我们什么道理 81年属鸡的是什么命
健康管理师是干什么的hcv8jop2ns2r.cn 初遇是什么意思hcv9jop4ns6r.cn 头发汗多是什么原因hcv8jop9ns9r.cn 小甲鱼吃什么zhongyiyatai.com 皮肤溃烂用什么药治愈最快gysmod.com
翡翠什么样的好hcv9jop0ns0r.cn 亲友是什么意思hcv7jop7ns4r.cn 沮丧是什么意思gysmod.com 不知道干什么hcv9jop3ns0r.cn 什么是hcv7jop6ns7r.cn
口腔溃疡是缺什么维生素hanqikai.com 36d什么意思hcv8jop8ns9r.cn 活水是什么意思hcv7jop6ns1r.cn 扁桃体肿大吃什么药hcv8jop4ns9r.cn 一代明君功千秋是什么生肖hcv8jop7ns4r.cn
做梦梦到别人死了是什么征兆chuanglingweilai.com 黄连治什么病最好hcv7jop9ns3r.cn 狗狗胰腺炎有什么症状hcv8jop1ns5r.cn 拉血是什么病baiqunet.com SEX是什么hcv9jop4ns4r.cn
百度