简体   繁体   English

两个DFA的交集,有多少个州? 最终状态?

[英]Intersection of two DFA, how many states? Final States?

Consider the following languages over = {0, 1}, 在= {0,1}中考虑以下语言,

A = {2 : w contains 011 as a substring} B = the language matched by the regular expression 0(0 + 1)*1 A = {2:w包含011作为子字符串} B =与正则表达式0(0 + 1)* 1匹配的语言

Let M(B) be the DFA obtained by converting N(B) using the subset construction with all unnecessary states removed. 令M(B)为通过使用子集结构转换N(B)并去除所有不必要状态而获得的DFA。 Let ¬M(B) be the DFA obtained by swapping the final and non-final states of MB. 令¬M(B)为通过交换MB的最终状态和非最终状态而获得的DFA。 Let M be the product of M(A) and ¬M(B) with all unnecessary state removed. 令M为M(A)和¬M(B)的乘积,并删除所有不必要的状态。

How many states would M have? M将拥有几个州? How many final states would M have? M将拥有几个最终状态? How many states does M(B) have? M(B)有多少个状态? This question has been boggling me, I have spent a few hours on jFlap putting together the intersection of these two DFA, for A and ¬B. 这个问题一直困扰着我,我在jFlap上花了几个小时,将这两个DFA的交集放在一起,用于A和¬B。 No success. 没有成功 Thank you. 谢谢。

The language M has to satisfy 2 conditions, 语言M必须满足2个条件,

1) M(A) - has to have a substring 011 1)M(A)-必须具有子字符串011

2) ¬M(B) - should not start with 0 and end with 1 2)¬M(B)-不应以0开头并以1结束

You can solve this by breaking the language M into 2 parts, 您可以通过将语言M分为两部分来解决此问题,

1) that starts with 0 but does not end with 1 and having substring 001 1)以0开头但不以1结尾并且具有子字符串001

2) and another that starts with 1 and having substring 001 2)和另一个以1开头并具有子字符串001字符串

Therefore the DFA for M would be something like this 因此,M的DFA将是这样的

DFA

The states from 2-5 takes care of part 1, and states from 6-9 takes care of part 2 2-5的状态负责第1部分,而6-9的状态负责第2部分

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM