0 votes 0 votes https://gateoverflow.in/?qa=blob&qa_blobid=5516250407315106757 My question is how these two are different...according to my both will generate (a+b)* ROHIT SHARMA 5 asked Jul 9, 2018 ROHIT SHARMA 5 432 views answer comment Share Follow See all 9 Comments See all 9 9 Comments reply Shubham Shukla 6 commented Jul 9, 2018 reply Follow Share i think you are correct both look same to me too.. 0 votes 0 votes MiNiPanda commented Jul 9, 2018 reply Follow Share The second string is ((a+b)3)* which can be expanded as ((a+b)(a+b)(a+b))*=((aa+ab+ba+bb)(a+b))* =(aaa+aab+aba+abb+baa+bab+bba+bbb)* Can this generate any string of length 1 or 2? 0 votes 0 votes Shubham Shukla 6 commented Jul 9, 2018 reply Follow Share ((a+b)^3)* will generate always string of multiple of 3 in length....by taking this as empty you can generate length 0,1,2 from this (epsilon+(a+b)+(a+b)^2) 0 votes 0 votes ROHIT SHARMA 5 commented Jul 9, 2018 reply Follow Share According to me actually first one is not MOD machine...because there is no remainder left (0 1 2 all get accepted)..so basically in this case all state are Final state and get optimize to single final state as accepting all (a+b)*....am i right? 1 votes 1 votes Shaik Masthan commented Jul 9, 2018 reply Follow Share yes, ROHIT those two regular expressions are equal and your explanation is obviously right. 0 votes 0 votes Shubham Shukla 6 commented Jul 9, 2018 reply Follow Share so thats only the qsn naa length of string mod3 <=2,in this every string in(a+b)* get accepted because doing mod 3 on any length string will give 0,1,2 only so (a+b)*.. in second you are doing the same only 0 votes 0 votes ROHIT SHARMA 5 commented Jul 9, 2018 reply Follow Share Thank you all 0 votes 0 votes Prashant. commented Jul 10, 2018 reply Follow Share L= [(a+b)3]* is language genrating strings multiple of 3. not mod 3. Ok p= (a+b)3 , now [p3]* will not generate string with length 1,2. 1 votes 1 votes MiNiPanda commented Jul 10, 2018 reply Follow Share Thank you Prashant Sir 0 votes 0 votes Please log in or register to add a comment.