If ๐ฟ is a regular language over ฮฃ = {๐‘Ž, ๐‘}, which one of the following languages is NOT regular ?

Q. If ๐ฟ is a regular language over ฮฃ = {๐‘Ž, ๐‘}, which one of the following languages is NOT regular ?

(A) ๐ฟ โ‹… ๐ฟ๐‘… = {๐‘ฅ๐‘ฆ | ๐‘ฅ โˆˆ ๐ฟ, ๐‘ฆ๐‘… โˆˆ ๐ฟ}

(B) {๐‘ค๐‘ค๐‘… | ๐‘ค โˆˆ ๐ฟ}

(C) Prefix (๐ฟ) = {๐‘ฅ โˆˆ ๐›ดโˆ—|โˆƒ๐‘ฆ โˆˆ ๐›ดโˆ— such that ๐‘ฅ๐‘ฆ โˆˆ ๐ฟ}

(D) Suffix (๐ฟ) = {๐‘ฆ โˆˆ ๐›ดโˆ—|โˆƒ๐‘ฅ โˆˆ ๐›ดโˆ— such that ๐‘ฅ๐‘ฆ โˆˆ ๐ฟ}

Ans:{๐‘ค๐‘ค๐‘… | ๐‘ค โˆˆ ๐ฟ}

Solution:

language L = {wwR โ w โˆˆ L} is infinite and not regular because it involves string matching and we can increase in length indefinitely and then finite automata will run out of memory, so it require stack. Hence, it is context-free but not regular.

Take Mock Tests

Government Schemes Mock Test Start Test!
Political Science Mock Test โ€“ 42 Start Test
History Test โ€“ 190 Start Test
Quantitative Aptitude Test Start Test!
Data Interpretation - Mock Test Start Test!
General Awareness - Mock Test Start Test!
Reasoning Ability - Mock Test Start Test!
We will be happy to hear your thoughts

Leave a reply

Gkseries.com
Logo
Register New Account