Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CS182 - Foundations of Computer Science Homework 10 (50 points) Problem 1. (3*10=30 points) Consider the alphabet = {a, b}. Show that the following languages
CS182 - Foundations of Computer Science Homework 10 (50 points) Problem 1. (3*10=30 points) Consider the alphabet = {a, b}. Show that the following languages are regular (give the finite automata, either deterministic or non-deterministic, that accept the languages): Problem 2. L1 = {abn a, n 0} L2 = L3 = {w : w and |w| mod 4 = 0} {a, ab} (2*10=20 points) 1. Prove that if L1 and L2 are regular languages, then L1 L2 is a regular language. 2. Prove that if L is a regular language, then L is a regular language. 1 Pr oof : Thi si sequi v al entt ot hest at ement i fal anguageLi si nf i ni t e, t heni tcont ai nsasubsett hati sar egul arl anguage. Thepumpi ngl emmaf orr egul arl anguagesst at est hat" t her eexi st sal engt hL*sucht hati fawor d wi nt hel anguagei sl ongert hanl , t hent her eexi stt hr eewor dsx, y , zsucht hatyi snonempt y , xy z ==wandev er yxy ^ nzi si nt hel anguage" . I fal anguagei si nf i ni t eandr egul ar ,t heni tcont ai nsawor dl ongert hananygi v enl engt h.Thus, t her eneccessar i l yexi stt hr eewor dsx, y , zsucht hatev er yxy ^ nzi si nt hel anguage. Now,ev er ypr opersubsetof{ xy ^ nz;ni nN}i sapr opersubsetofL* .Now,t her edef i ni t el yexi st pr opersubset sofxy ^ nzt hatar enotr egul ar * .Thus,ev er yr egul ari nf i ni t el anguagehasapr oper subsett hati snotr egul ar . I fal anguagei si nf i ni t eandnotr egul ar ,t henconsi deranyofi t spr operi nf i ni t esubset s.I ft he subseti snotr egul ar ,t hent hel anguagei snotacount er exampl e.I ft hesubseti sr egul ar ,t hen uset hepr ev i ouspar agr apht of i ndapr opersubsett hati snotr egul ar .Si ncebei ngapr oper subseti st r ansi t i v e,t hi ssubseti sapr opersubsetoft heor i gi nall anguage,andt hel anguagei s notacount er exampl e. Thus, ev er yi nf i ni t el anguagehasapr opersubsett hati snotr egul ar . Thus, i fev er ypr opersubsetofal anguagei sr egul ar , t hent hel anguagei sf i ni t e( andt husr egul ar ) . Hencei fLi sar egul arl anguage, t henLi sar egul arl anguage. Pr oof : Thi si sequi v al entt ot hest at ement i fal anguageLi si nf i ni t e, t heni tcont ai nsasubsett hati sar egul arl anguage. Thepumpi ngl emmaf orr egul arl anguagesst at est hat" t her eexi st sal engt hL*sucht hati fawor d wi nt hel anguagei sl ongert hanl , t hent her eexi stt hr eewor dsx, y , zsucht hatyi snonempt y , xy z ==wandev er yxy ^ nzi si nt hel anguage" . I fal anguagei si nf i ni t eandr egul ar ,t heni tcont ai nsawor dl ongert hananygi v enl engt h.Thus, t her eneccessar i l yexi stt hr eewor dsx, y , zsucht hatev er yxy ^ nzi si nt hel anguage. Now,ev er ypr opersubsetof{ xy ^ nz;ni nN}i sapr opersubsetofL* .Now,t her edef i ni t el yexi st pr opersubset sofxy ^ nzt hatar enotr egul ar * .Thus,ev er yr egul ari nf i ni t el anguagehasapr oper subsett hati snotr egul ar . I fal anguagei si nf i ni t eandnotr egul ar ,t henconsi deranyofi t spr operi nf i ni t esubset s.I ft he subseti snotr egul ar ,t hent hel anguagei snotacount er exampl e.I ft hesubseti sr egul ar ,t hen uset hepr ev i ouspar agr apht of i ndapr opersubsett hati snotr egul ar .Si ncebei ngapr oper subseti st r ansi t i v e,t hi ssubseti sapr opersubsetoft heor i gi nall anguage,andt hel anguagei s notacount er exampl e. Thus, ev er yi nf i ni t el anguagehasapr opersubsett hati snotr egul ar . Thus, i fev er ypr opersubsetofal anguagei sr egul ar , t hent hel anguagei sf i ni t e( andt husr egul ar ) . Hencei fLi sar egul arl anguage, t henLi sar egul arl anguage
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started