Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Technology
CSC 397
Theory of Computation
Assignment No: 02
Report on: Program of PDA to recognize w#𝑤 𝑅
Prepared For:
Course Instructor
Prepared By:
Suvrho Mojumder
ID: 14303040
Section: D
Fall 2017
Submission Date
27/11/2017
State diagram for w#𝒘𝑹 :
W, εW W, 𝑤 𝑅 ε
ε ,ε $ #, ε ε ε ,$ ε
The formal definition of PDA for the given pattern is given below:
P = {Q, ∑,Г, δ, q0, F}, where
∑ = {a, b, c, d},
Г = {0, $}
F = {q4}
Program:
# include <stdio.h>
int main()
scanf("%s",str);
while(1)
else
else
else
else
break;
else
return 0;
}
Output: