πŸŽ“ Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

πŸ“‘

University Syllabi

AKTU & AICTE aligned semester guidelines.

πŸ“

Exam Question Papers

Previous 5 years solved university papers.

πŸ’‘

Lab Manuals & Viva

Practical codes with outputs & interview Qs.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

Viewing All Lectures

PDA to CFG Conversion

Algorithm to find CFG corresponding to a given PDA

Input βˆ’ A CFG, G = (V, T, P, S)

Output βˆ’ Equivalent PDA, P = (Q, βˆ‘, S, Ξ΄, q0, I, F) such that the non- terminals of the grammar G will be {Xwx | w,x ∈ Q} and the start state will be Aq0,F.

Step 1 βˆ’ For every w, x, y, z ∈ Q, m ∈ S and a, b ∈ βˆ‘, if Ξ΄ (w, a, Ξ΅) contains (y, m) and (z, b, m) contains (x, Ξ΅), add the production rule Xwx β†’ a Xyzb in grammar G.

Step 2 βˆ’ For every w, x, y, z ∈ Q, add the production rule Xwx β†’ XwyXyx in grammar G.

Step 3 βˆ’ For w ∈ Q, add the production rule Xww β†’ Ξ΅ in grammar G

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>