You are on page 1of 3

WORLD UNIVERSITY OF BANGLADESH

Case Study On
Course Title: Formal System
Course Code: CSE 904

Submitted To Submitted By
Supriya Sarker Sanzida Islam
Lecturer REG: WUB03/18/42/2610
Department of CSE Batch: 42/A
World University of Bangladesh Department of CSE
World University of Bangladesh
Answer to the question No: 01
Using Pumping Lemma proof that the language 𝐴 = {𝑦𝑦|𝑦 ∈ {0, 1} ∗} is not a regular language.

Proof:
Assume A is regular and pumping length P
S = 0p10p1 [Let S = 0000000100000001 where P=7]
Divide S into x y z i.e., 0000000100000001

x y z
i
xy z = 00000000000100000001 [assume i=2, so y is repeated 2 times]

Now, xyi z = 00000000000100000001 = xy2 z ∉ A

|y| > 0
|xy|=7 which does not satisfy the 3rd condition |xy|≤ p

∴ A is not a regular language.

Answer to the question No: 02


Given,

𝐿 = {𝑎𝑥𝑏𝑦 𝑐𝑎𝑥+𝑦}
Let G be the grammar with production
S → aSca | B
B → bBca | λ
Claim: L(G) = L
Proof: Consider the following derivation:
S → * ax Scax
→ axBcax
→ * axby B cay cax
→ * axby cax+y
Where the first →* applies S
→ aSca x times

Second B→ bBca y times since all words in L(G) must follow thispattern in their derivations, it
is clear that L(G) ⸦ L.
Consider W € L, W = axby cax+y for some x,y ≥ 0
The derivations,
S → * ax Scax
→ axBcax
→ * axby B cay cax
→ * axby cax+y
Clear produces W for any x,y

∴ 𝐿 ⸦ L(G)

∴ 𝐿 ⸦ L(G)

∴ G is CFG for L

You might also like