Question

In: Computer Science

Do not use Pumping Lemma for Regular Expression to prove the following. You may think of...

Do not use Pumping Lemma for Regular Expression to prove the following. You may think of Closure Properties of Regular Languages

1. Fix an alphabet. For any string w with |w| ≥ 2, let middle(w) be the string obtained by removing the first and last symbols of w. That is, Given L, a regular language on Σ, prove that f1(L) is regular, where

f1(L) = {w : middle(w) ∈ L}

Solutions

Expert Solution

Let, suppose that the alphabet is a. = {a}

So , the language L is given by { , a ,aa, aaa, aaaa, ..........................................} which is a regular language.


Now,

f1(L) represents the language whose words are formed by taking each word from L (length>=2) and stripping its first and last letters.

The first two words in L { , a } are not candidates to form a word in f1(L) because length is < 2.

The following words after are all candidates:

{ aa, aaa, aaaa, ..........................................}.

Now we begin forming the language f1(L) by taking input words from above and applying (stripping) operation

{ , a ,aa, ..........................................}

Note aa --->  ,  aaa ----> a, aaaa ----> aa and so on

Since this is an infinite series , the words formed are already present and same as in langugae L. So both the languages are actually same .

Since L is already proved to be regular, hence f1(L) is also regular.


Related Solutions

1. Pumping Lemma: a. Is the following language a regular language? (Use pumping lemma in proof.)...
1. Pumping Lemma: a. Is the following language a regular language? (Use pumping lemma in proof.) L = {0n 1n 2n | n ≥ 0} b. What is (i.e., define) the CFL pumping lemma?
Prove that {anbamba2m+n:n,m≥1} is not regular using pumping lemma
Prove that {anbamba2m+n:n,m≥1} is not regular using pumping lemma
Use the pumping lemma to show that the following languages are not regular. A a. A1={0^n...
Use the pumping lemma to show that the following languages are not regular. A a. A1={0^n 1^n 2^n | n≥0} b. A2 = {www | w ∈ {a,b}∗} A c. A3 ={a^2^n | n≥0} (Here, a^2^n means a string of 2^n a’s.) A ={a3n |n > 0 }
Use the pumping lemma to show that the following languages are not regular (c) (5 pts)...
Use the pumping lemma to show that the following languages are not regular (c) (5 pts) Let Σ = {0, 1, −, =} and SUB = {x = y − z | x, y, z are binary integers, and x is the result of the subtraction of z from y}. For example: 1 = 1 − 0, 10 = 11 − 01 are strings in SUB but not 1 = 1 − 1 or 11 = 11 − 10.
Using the pumping lemma, prove that the language {1^n | n is a prime number} is...
Using the pumping lemma, prove that the language {1^n | n is a prime number} is not regular.
let sigma = {a,b,c}. Use the Pumping Lemma to show that the language L defined below...
let sigma = {a,b,c}. Use the Pumping Lemma to show that the language L defined below is not regular. L={ a^p c(bb)^q : q > p >1}
Prove that √3 is irrational using contradiction. You can use problem 4 as a lemma for...
Prove that √3 is irrational using contradiction. You can use problem 4 as a lemma for this. Problem 4, for context is Prove that if n2 is divisible by 3, then n is divisible by 3.
a.) Prove the following: Lemma. Let a and b be integers. If both a and b...
a.) Prove the following: Lemma. Let a and b be integers. If both a and b have the form 4k+1 (where k is an integer), then ab also has the form 4k+1. b.)The lemma from part a generalizes two products of integers of the form 4k+1. State and prove the generalized lemma. c.) Prove that any natural number of the form 4k+3 has a prime factor of the form 4k+3.
Unix / Linux 16. Regular Expression: Given the following regular expression, provide a description of the...
Unix / Linux 16. Regular Expression: Given the following regular expression, provide a description of the intended match. ^[^A-Z] 17. Regular Expression: Given the following regular expression, provide a description of the intended match. [^^!] 18. Regular Expression: Given the following regular expression, provide a description of the intended match. ^.\{72\}$ 19. Regular Expression: Given the following regular expression, provide a description of the intended match. [A-Za-z0-9] 20. Regular Expression: Given the following regular expression, provide a description of the...
Regular Expressions Assignment Write a regular expression for each of the following. Can you show output...
Regular Expressions Assignment Write a regular expression for each of the following. Can you show output please. A blank line (may contain spaces) Postal abbreviation (2 letters) for State followed by a space and then the 5-digit zip code A KU student username (Ex. lpork247) A “valid” email address (also explain how you defined “valid”) A SSN pattern (ddd-dd-dddd)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT