Models of Computation: Pumping Lemma for Regular Languages and Context-Free Languages

Q1: Closure Properties

For all integers 𝑝, π‘ž and π‘Ÿ, the language
{π‘Žπ‘›π‘
π‘š ∣ 𝑛, π‘š β‰₯ 0, 𝑛𝑝 + π‘šπ‘ž = π‘Ÿ}
5
is context-free. Using this fact and the closure properties of context-free languages, prove that
𝐿 = {π‘Žπ‘›π‘
π‘š ∣ 𝑛, π‘š β‰₯ 0}
is also context-free. In your proof, do not use any languages other than these
or those derived from these using closure properties. (Proofs violating this
requirement will receive 0 marks.)

Q2 Pumping Lemma for Regular Languages

Using the pumping lemma for regular languages, prove that
𝐿 = {π‘Žπ‘›π‘
π‘šπ‘
π‘˜
∣ 𝑛, π‘š, π‘˜ β‰₯ 0, π‘›π‘š = 2π‘˜}
is not regular.

Q3 Pumping Lemma for Context-Free Languages
Let Ξ£ = {π‘Ž, 𝑏} and
𝐿 = {𝑀 ∈ Ξ£βˆ—
∣ for all nonempty 𝑠 ∈ Ξ£βˆ—
, the string 𝑠𝑠𝑠 does not occur in 𝑀}.
The language 𝐿 is infinite. Using this fact and the pumping lemma for contextfree languages, prove that 𝐿 is not context-free. 

Are you struggling with your paper? Let us handle it - WE ARE EXPERTS!

Whatever paper you need - we will help you write it

Get started

Starts at $9 /page

How our paper writing service works

It's very simple!

  • Fill out the order form

    Complete the order form by providing as much information as possible, and then click the submit button.

  • Choose writer

    Select your preferred writer for the project, or let us assign the best writer for you.

  • Add funds

    Allocate funds to your wallet. You can release these funds to the writer incrementally, after each section is completed and meets your expected quality.

  • Ready

    Download the finished work. Review the paper and request free edits if needed. Optionally, rate the writer and leave a review.