regular language - Using Closure Properties to prove Regularity -


here's homework problem:

is l_4 regular? let l_4 = l*, l={0^i1^i | i>=1}. 

i know l non-regular , know kleene star closed operation, assumption l_4 non-regular.

however professor provided example of above in l = {0^p | p prime}, said regular proving l* equal l(000* + e) saying each subset of 1 (e in case means empty word).

so method involved forming regex of 0^p, how can when have 1 already?

regular languages closed under kleene star. is, if language r regular, r*.

but reasoning doesn't work in other direction: there nonregular languages p p* regular.

you mentioned 1 such p in question: set of strings 0^p p prime.

it easy use pumping lemmas regular , context-free languages show p @ least context-sensitive. however, p* equivalent language 0^q, q sum of 0 or more primes. true q=0 (the empty string) , q>=2, p* can recognized 3-state dfa, though p not regular.

so l being context-free has no bearing on whether l_4 = l* regular or not. if can construct dfa recognizes l_4, did p* above, it's regular. in process of trying find dfa works, you'll see pattern emerge can used basis pumping argument. myhill-nerode theorem approach proving language non-regular, , useful if language lends analysis of prefixes , distinguishing extensions. if language can decomposed finite set of equivalence classes under relation, can recognized dfa containing many states.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -