Question: Let = {0, 1}. Prove that the following languages are not regular. (a) The set of strings that are palindromes. Note that a string
Let = {0, 1}. Prove that the following languages are not regular. (a) The set of strings that are palindromes. Note that a string is a palindrome if it reads the same both forwards and backwards. For instance, the strings 0, 010, 1001 are palindromes, while the strings 01, 100 are not. (b) {01 | the greatest common divisor of i and j is 1 }.
Step by Step Solution
3.36 Rating (159 Votes )
There are 3 Steps involved in it
To prove that the given languages are not regular we will use the Pumping Lemma for Regular Languages Language a The set of binary palindromes Statement Let L w in 01 mid w wR the set of all palindromes over 01 Proof Using Pumping Lemma Assume L is regular Then by the Pumping Lemma there exists a pumping length p such that any string s in L with s geq p can be written as s xyz with the following conditions xy leq p y 0 xyiz in L for all i geq 0 Choose the string s 0p10p This is a palindrome and s 2p 1 geq p By the lemma split s xyz where xy leq p so y consists only of 0s from the first block of 0p Let x 0a y 0b with b 0 z 0pab10p Pumped string xy0z 0a000pab10p 0pb10p This is not a palindrome asymmetry around the middle 1 Conclusion Contradiction L is not regular Language ... View full answer
Get step-by-step solutions from verified subject matter experts
