Examples Of Removing Unreachable Productions

By: Prof. Fazal Rehman Shamil

Examples of REMOVING UNREACHABLE PRODUCTIONS

Example 1

REMOVE UNREACHABLE PRODUCTIONS S-> aXY

X->b

Y->G

G->m

N->m

P->m

After removal of UNREACHABLE PRODUCTIONS

S-> aXY

X->b

Y->G

G->m

Example 2

REMOVE UNREACHABLE PRODUCTIONS S-> XaYZ

X->b

Y->G

G->Z

Z->e

J->m

T->m

After removal of UNREACHABLE PRODUCTIONS

S-> XaYZ

X->b

Y->G

G->Z

Z->e

Example 3

REMOVE UNREACHABLE PRODUCTIONS S-> TQbZoz

T->b

G->Z

Z->e

J->m

Q->G

After removal of UNREACHABLE PRODUCTIONS

S-> TQbZoz

T->b

Z->e

Q->G

Example 4

REMOVE UNREACHABLE PRODUCTIONS S-> aUA
X->n
G->A
A->e
J->m
T->d
U->G

After removal of UNREACHABLE PRODUCTIONS

S-> aUA
G->A
A->e
U->G

 

Prof. Fazal Rehman Shamil
Latest posts by Prof. Fazal Rehman Shamil (see all)