6 - 2 For a b(It 1'53.3 review of regular languages 7...

• Notes
• 2

This preview shows page 1 - 2 out of 2 pages. Subscribe to view the full document. Unformatted text preview: 2) For a) b) (It 1'53 .3 review of regular languages. 7' “r *9 "r = raj-owing languages L, state whether or not L is regular. Prove your answer: =" * : 31': where x, y e { O, 1}* and ixl-ly! as 0}. (Let - mean integer multiplication). -i_l._l oi _.'_\o H» Regular. For {.15 - 5:; to be divisible by 5, either lx| or [vi (or both) must be divisible by 5. So L is deﬁned by the thieving regtﬂar expression: - .e i a, green u 1)* u (0 u 1)*#((D L) 1)5)*, where (O u if is simply a shorthand for writing (0 u 1) ﬁve times in a row. {W 5 {a b}* ; w : W23 m 2 b4 : izg, andz : x with every a replaced by b and every b replaced by a}. Example: abbbabbaa e L, withx= abb,y= bab, andz : baa. Not regular, which we’ll show-by pumping. Let w m akakbk. This string is in L since 3: = all, y = a’i and z = y (from the pumping theorem) 2 a" for some nonzero p. Let g = 2 (ie, we pump in once); lfp is not dhisfble by 3, then the resulting string is not in L because it cannot be divided into three equal length segments. pr = 31' for integer i, then, when we divide the resulting string into three segments of equal length, each segment gets longer by 1' characters. The ﬁrst segment is still all a’s, so the last segment must remain all b’s. But it doesn’t. It grows by absorbing a’s ﬁom the second segment Thus 2 no longer e x with every a replaced by b and every b replaced by a. So the resulting string is not in L. ' ‘r‘ 3.; {w e {1}* : wis,for semen 2 1,theunaryencoding of 10"}. (SOL: {1111111111, 1100, 11900, ...}.) Not regular, which we can prove by pumping. Let w = l‘, where t is the smallest integer that is a power of ten and is greater than k. y must be 1” for some nonzero p. Clearly, p can be at most t. Let g = 2 (i.e., pump in once). The-length of the resulting suing s is zit-most 21‘. But the next power of 10 is 10f. Thus 3 cannot be in L. - each of the following claims, state whether it is T rue or False. Prove your answer. IfL = L; L2 and L is regular then L1 and L2 must be regular. False. Leif, regular. (“1(ﬁL) is regular) e (L is regular). 2 {aP: 2 Sp andp is prime}. Let L2: 31*. L ={a1’1p 2 2}, which is regular. But L1 is not True, since —.(—.L) = L. (L1 — L2 is regular) —> (L1 is regular). False. ABEII ’- AliBn = 25. :13 is regular) e (L is regular). True. since the regular languages are closed under reverse and reverse is a self inverse. So, if LR is regular ien so is (L55. which is L. ' . :7 :j; 11,1 1) {a”b” : a 2 0} must not regular. 3) False. Let L I a*b*. L U {a”b" : n 2 0} = a*b*, which is regular. Given any Ianguage L, it cannot be true 111th » {a"b" : n 2 O} is regular. False. LetL = {5330" : i2 2'0}. '13 - {a”b" : n 2 O} ‘—" 25, which is regular. The ﬁnite languages are closed under Kleene star. False; Counterexample: 3 Lia-tic1 __= {61}. L1 is ﬁnite. _ L- ~—'— Lﬁ; L : a*, which is inﬁnite. ...
View Full Document

• Spring '08
• Rich

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern