This document discusses context-free grammars and pushdown automata. It begins by defining a context-free grammar and its components. It then explains derivation, sentential forms, parse trees, ambiguity in grammars, and pushdown automata. Pushdown automata are described as having an input tape, finite control, stack, and transition function. Examples are provided of pushdown automata defining languages such as {anbn| n>=1} and {anb2n| n>=1}. The limitations of finite automata for certain languages are also discussed.
Syntax-Directed Translation: Syntax-Directed Definitions, Evaluation Orders for SDD's, Applications of Syntax-Directed Translation, Syntax-Directed Translation Schemes, and Implementing L-Attributed SDD's. Intermediate-Code Generation: Variants of Syntax Trees, Three-Address Code, Types and Declarations, Type Checking, Control Flow, Back patching, Switch-Statements
This slide is prepared By these following Students of Dept. of CSE JnU, Dhaka. Thanks To: Nusrat Jahan, Arifatun Nesa, Fatema Akter, Maleka Khatun, Tamanna Tabassum.
Syntax-Directed Translation: Syntax-Directed Definitions, Evaluation Orders for SDD's, Applications of Syntax-Directed Translation, Syntax-Directed Translation Schemes, and Implementing L-Attributed SDD's. Intermediate-Code Generation: Variants of Syntax Trees, Three-Address Code, Types and Declarations, Type Checking, Control Flow, Back patching, Switch-Statements
This slide is prepared By these following Students of Dept. of CSE JnU, Dhaka. Thanks To: Nusrat Jahan, Arifatun Nesa, Fatema Akter, Maleka Khatun, Tamanna Tabassum.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
We have compiled the most important slides from each speaker's presentation. This year’s compilation, available for free, captures the key insights and contributions shared during the DfMAy 2024 conference.
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...ssuser7dcef0
Power plants release a large amount of water vapor into the
atmosphere through the stack. The flue gas can be a potential
source for obtaining much needed cooling water for a power
plant. If a power plant could recover and reuse a portion of this
moisture, it could reduce its total cooling water intake
requirement. One of the most practical way to recover water
from flue gas is to use a condensing heat exchanger. The power
plant could also recover latent heat due to condensation as well
as sensible heat due to lowering the flue gas exit temperature.
Additionally, harmful acids released from the stack can be
reduced in a condensing heat exchanger by acid condensation. reduced in a condensing heat exchanger by acid condensation.
Condensation of vapors in flue gas is a complicated
phenomenon since heat and mass transfer of water vapor and
various acids simultaneously occur in the presence of noncondensable
gases such as nitrogen and oxygen. Design of a
condenser depends on the knowledge and understanding of the
heat and mass transfer processes. A computer program for
numerical simulations of water (H2O) and sulfuric acid (H2SO4)
condensation in a flue gas condensing heat exchanger was
developed using MATLAB. Governing equations based on
mass and energy balances for the system were derived to
predict variables such as flue gas exit temperature, cooling
water outlet temperature, mole fraction and condensation rates
of water and sulfuric acid vapors. The equations were solved
using an iterative solution technique with calculations of heat
and mass transfer coefficients and physical properties.
ACEP Magazine edition 4th launched on 05.06.2024Rahul
This document provides information about the third edition of the magazine "Sthapatya" published by the Association of Civil Engineers (Practicing) Aurangabad. It includes messages from current and past presidents of ACEP, memories and photos from past ACEP events, information on life time achievement awards given by ACEP, and a technical article on concrete maintenance, repairs and strengthening. The document highlights activities of ACEP and provides a technical educational article for members.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesChristina Lin
Traditionally, dealing with real-time data pipelines has involved significant overhead, even for straightforward tasks like data transformation or masking. However, in this talk, we’ll venture into the dynamic realm of WebAssembly (WASM) and discover how it can revolutionize the creation of stateless streaming pipelines within a Kafka (Redpanda) broker. These pipelines are adept at managing low-latency, high-data-volume scenarios.
A review on techniques and modelling methodologies used for checking electrom...nooriasukmaningtyas
The proper function of the integrated circuit (IC) in an inhibiting electromagnetic environment has always been a serious concern throughout the decades of revolution in the world of electronics, from disjunct devices to today’s integrated circuit technology, where billions of transistors are combined on a single chip. The automotive industry and smart vehicles in particular, are confronting design issues such as being prone to electromagnetic interference (EMI). Electronic control devices calculate incorrect outputs because of EMI and sensors give misleading values which can prove fatal in case of automotives. In this paper, the authors have non exhaustively tried to review research work concerned with the investigation of EMI in ICs and prediction of this EMI using various modelling methodologies and measurement setups.
A review on techniques and modelling methodologies used for checking electrom...
Theory of Computation Unit 3
1. UNIT III
CONTEXT FREE GRAMMAR &
LANGUAGE
Mrs.D.Jena Catherine Bel,
Assistant Professor,CSE,
Velammal Engineering College.
2. CONTEXT FREE
GRAMMAR & LANGUAGE
CFG – Parse Trees – Ambiguity in Grammars and Languages – Definition of the
Pushdown Automata – Languages of a Pushdown Automata – Equivalence of
Pushdown Automata and CFG, Deterministic Pushdown Automata.
4. CONTEXT FREE GRAMMAR
• A CFG is a way of describing languages by recursive rules
called productions
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
4
5. CFG – Formal Definition
A context-free grammar (CFG) consisting of a finite
set of grammar rules is a quadruple (V, T, P, S)
where
• V is a set of non-terminal symbols.
• T is a set of terminals where V ∩ T = NULL.
• P is a set of rules, P: V → (V ∪ T)*, i.e., the left-
hand side of the production rule P does have any
right context or left context.
• S is the start symbol.
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
5
6. Derivation
• Beginning with the start symbol, derive the terminal strings by
repeatedly replacing the variable by the body of some
production with that variable in the head
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
6
7. Derivation
• Leftmost derivation:
• In each step of derivation, if the leftmost variable is replaced then
it is called leftmost derivation
• Rightmost derivation:
• In each step of derivation, if the rightmost variable is replaced
then it is called rightmost derivation
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
7
8. • Sentential Forms
• Any step in a derivation is a string of variables and or terminals.
Such strings are called sentential forms.
• If the derivation is leftmost then the string is a left sentential
form
• If the derivation is rightmost then the string is a right sentential
form
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
8
9. Parse Tree
• Tree representation of derivation is called parse tree or
derivation tree
• Interior nodes are labelled with variables and leaf nodes are
labelled with terminal or ε
• For each interior node, there must be a production such that
the head of the production is the label of the node and the
label of its children read from left to right form the body of
the production
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
9
11. Derivation / yield of a tree
The derivation or the yield of a parse tree is the final string
obtained by concatenating the labels of the leaves of the tree
from left to right, ignoring the Nulls. However, if all the leaves are
Null, derivation is Null.
Example
Let a CFG {N,T,P,S} be
N = {S}, T = {a, b}, Starting symbol = S, P = S → SS | aSb | ε
One derivation from the above CFG is “abaabb”
S → SS → aSbS → abS → abaSb → abaaSbb → abaabb
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
11
14. Ambiguous grammar
• If a context free grammar G has more than one derivation tree
for some string w ∈ L(G), it is called an ambiguous grammar.
There exist multiple right-most or left-most derivations for
some string generated from that grammar.
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
14
16. Why PDA
Design FA for accepting a language {an | n>=1}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
16
17. Why PDA
Design FA for accepting a language {an | n>=1}
L = {a, aa, aaa, aaaa, ......}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
17
18. Why PDA
Design FA for accepting a language {an | n>=1}
L = {a, aa aaa, aaaa, ......}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
18
19. Why PDA
Design FA for accepting a language {anbm | m,n>=0}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
19
20. Why PDA
Design FA for accepting a language {anbm | m,n>=0}
L= {ε,a,b,ab,aa,bb,aaa,aab,abb,bbb,aabb,aaabbb,aaaabbbb,
......}
Constraints/limitations
1. a followed by b
2. N >=0
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
20
21. Why PDA
Design FA for accepting a language {anbm | m,n>=0}
L = {ε, a, b,ab,aa, bb , aaa, aab, abb,bbb,..aabb, aaabbb,
aaaabbbb, ......}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
21
22. Why PDA
Design FA for accepting a language {an | n>=1}
L = {a, aa aaa, aaaa, ......}
Design FA for accepting a language {anbm | m,n>=0}
L = {ε, a, b,ab,aa, bb , aaa, aab, abb,bbb,..aabb, aaabbb,
aaaabbbb, ......}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
22
23. Why PDA
Design FA for accepting a language {anbn | n>=1}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
23
24. why
Design FA for accepting a language {anbn | n>=1}
L = {ab, aabb, aaabbb, aaaabbbb, ......}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
24
25. why
Design FA for accepting a language {anbn | n>=1}
L = {ab, aabb, aaabbb, aaaabbbb, ......}
Constraints/limitations
1. a followed by b
2. N >=0
3.
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
25
26. why
Design FA for accepting a language {anbn | n>=1}
L = {ab, aabb, aaabbb, aaaabbbb, ......}
Constraints/limitations
1. a followed by b
2. N >0
3. Number of (a ) == Number of (b)
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
26
28. Why PDA
is it Possible
Design FA for accepting a language {anbn | n>=1}
Design FA for accepting a language {anb2n | n>=1}
Design FA for accepting a language {anbm cn|m. n>=1}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
28
30. PDA Components
Input tape: The input tape is divided in many cells or symbols. The input head is read-only and may only move from left to right,
one symbol at a time.
Finite control: The finite control has some pointer which points the current symbol which is to be read.
Stack: The stack is a structure in which we can push and remove the items from one end only. It has an infinite size. In PDA, the
stack is used to store the items temporarily.
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
30
35. Representation of State
Transition
Delta Function ( ) is the transition function, the use of which will become more clear by
taking a closer look at the Three Major operations done on Stack :-
1. Push
2. Pop
3. Skip /No operation
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
35
41. Moves of PDA
Pop Skip/ no operation
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
41
42. Pushdown Automata
Define the pushdown automata for language {anbn |
n>=1}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
42
43. Pushdown Automata
Define the pushdown automata for language {anbn | n>=1}
L = {ab, aabb, aaabbb, aaaabbbb, ......}
Constraints/limitations
1. a followed by b
2. N >0
3. Number of (a ) == Number of (b)
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
43
44. Pushdown Automata
Define the pushdown automata for language {anbn | n>=1}
L = {ab, aabb, aaabbb, aaaabbbb, ......}
1. While (a)
Push a;
While (b)
Pop ;
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
44
46. Pushdown Automata
Define the pushdown automata for language {anbn | n>=1}
L = {ab, aabb, aaabbb, aaaabbbb, ......}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
46
47. Pushdown Automata
Define the pushdown automata for language {anbn | n>=1}
L = {ab, aabb, aaabbb, aaaabbbb, ......}
1. While (a)
Push a;
While (b)
Pop ;
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
47
48. PDA for the Language {anbn | n>=1}
PDA = ({q0, q1, qf}, {a, b}, {a, Z}, δ, q0, Z, {qf})
δ:
δ(q0, a, Z) = (q0, aZ)
δ(q0, a, a) = (q0, aa)
δ(q0, b, a) = (q1, ε)
δ(q1, b, a) = (q1, ε)
δ(q1, ε, Z) = (qf, ε)
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
48
49. Pushdown Automata
2. Design PDA for accepting a language {anb2n | n>=1}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
49
50. Pushdown Automata
Problem – Design a PDA for accepting the language L = { anb2n | n>=1}, i.e.,
L = {abb, aabbbb, aaabbbbbb, aaaabbbbbbbb, ......}
Constraints/limitations
1. a followed by b
2. N >0
3. Number of (b ) == 2 * Number of (a)
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
50
51. Pushdown Automata
Problem – Design a PDA for accepting the language L = { anb2n | n>=1}, i.e.,
L = {abb, aabbbb, aaabbbbbb, aaaabbbbbbbb, ......}
1. While (a)
push(aa);
While(b)
Pop ;
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
51
52. Pushdown Automata
Problem – Design a PDA for accepting the language L = { anb2n | n>=1}, i.e.,
L = {abb, aabbbb, aaabbbbbb, aaaabbbbbbbb, ......}
Logic 1:
While (a)
push(aa);
While(b)
Pop ;
Logic 2:
While (a)
push(a);
While(bb)
Pop;
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
52
53. PDA for the Language {anb2n | n>=1}
Logic 1:
PDA = ({q0, q1, q2}, {a, b}, {a, Z}, δ, q0, Z, {q2})
δ:
δ(q0, a, Z) = (q0, aaZ)
δ(q0, a, a) = (q0, aaa)
δ(q0, b, a) = (q1, ε)
δ(q1, b, a) = (q1, ε)
δ(q2, ε, z) = (q2, ε)
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
53
55. PDA for the Language {anb2n | n>=1}
Logic 2:
PDA = ({q0, q1, q2, qf}, {a, b}, {a, Z}, δ, q0, Z, {qf})
δ:
δ(q0, a, Z) = (q0, aZ)
δ(q0, a, a) = (q0, aa)
δ(q0, b, a) = (q1, a)
δ(q1, b, a) = (q2, ε)
δ(q2, b, a) = (q1, a)
δ(q2, ε, Z) = (qf, Z)
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
55
56. PDA foracceptingalanguage {0n1m0n |m,n>=1}
3. Design a PDA for accepting a language {0n1m0n | m, n>=1}.
L = { 010, 0110, 01110, 001100, 0001000, 00001110000, ...... }
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
56
57. PDAfor acceptingalanguage {0n1m0n |m,n>=1}
Design a PDA for accepting a language {0n1m0n | m, n>=1}.
L = { 010, 0110, 01110, 001100, 0001000, 00001110000, ...... }
• Push all 0's onto the stack on encountering first 0's.
• read 1, just do nothing.
• read 0, and on each read of 0, pop one 0 from the stack.
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
57
60. Instantaneous Description (ID)
A ID is a triple (q, w, α), where:
1. q is the current state.
2. w is the remaining input.
3.α is the stack contents, top at the left.
(p, b, T) ⊢ (q, w, α)
⊢ sign describes the turnstile notation and represents one move.
⊢* sign describes a sequence of moves.
Problem – Design a non deterministic
PDA for accepting the language L = { anb2n
: m>=1}, i.e.,
L = {abb, aabbbb, aaabbbbbb, aaaabbbbbbbb, ......}
δ(q0, aaabbbbbb, Z) ⊢ δ(q0, aabbbbbb, aaZ)
⊢ δ(q0, abbbbbb, aaaaZ)
⊢ δ(q0, bbbbbb, aaaaaaZ)
⊢ δ(q1, bbbbb, aaaaaZ)
⊢ δ(q1, bbbb, aaaaZ)
⊢ δ(q1, bbb, aaaZ)
⊢ δ(q1, bb, aaZ)
⊢ δ(q1, b, aZ)
⊢ δ(q1, ε, Z)
⊢ δ(q2, ε)
ACCEPT
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
60
62. PushDown Automata
Find the language accepted by PDA
PDA for accepting the language L = { anb m+n cm|| m,n ≥ 1}
The strings of given lanugage will be: L = {abbc, abbbcc, abbbcc, aabbbbcc, ......}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
62
63. PDA for the Language {anbn | n>=1}
PDA = ({q0, q1, qf}, {a, b}, {a, Z}, δ, q0, Z, {qf})
δ:
δ(q0, a, Z) = (q0, aZ)
δ(q0, a, a) = (q0, aa)
δ(q0, b, a) = (q1, ε)
δ(q1, b, a) = (q1, ε)
δ(q1, ε, Z) = (qf, ε)
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
63
64. PDA for the Language {anbn | n>=1}
PDA = ({q0, q1, qf}, {a, b}, {a, Z}, δ, q0, Z, {qf})
δ:
δ(q0, a, Z) = (q0, aZ)
δ(q0, a, a) = (q0, aa)
δ(q0, b, a) = (q1, ε)
δ(q1, b, a) = (q1, ε)
δ(q1, ε, Z) = (qf, ε)
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
64
67. L={w?{a,b}*}
Problem – Design a non deterministic PDA for accepting the language L ={w?{a,b}* | w contains equal no. of
a’s and b’s}, i.e.,
L = {ε,ab, aabb, abba, aababb, bbabaa, baaababb, .......}
If ‘a’ comes first then push it in stack and if again ‘a’ comes then also push it.
Similarly, if ‘b’ comes first (‘a’ did not comes yet) then push it into the stack and if
again ‘b’ comes then also push it.
Now, if ‘a’ is present in the top of the stack and ‘b’ comes then pop the ‘a’ from the
stack. And if ‘b’ present in the top of the stack and ‘a’ comes then pop the ‘b’ from
the stack.
So, at the end if the stack becomes empty then we can say that the string is accepted
by the PDA.
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
67
69. Deterministic pushdown
Automata
Construct a PDA for language L = {wcw’ | w={0, 1}*}
where w’ is the reverse of w
L = {1c1, 0c0, 01c10, 001c100, 010c010 ......}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
69
70. Non Deterministic pushdown Automata
Design a non deterministic PDA for
accepting the language L = {wwR w ∈
(a, b)*},
i.e.,
L = {aa, bb, abba, aabbaa, abaaba,
......}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
70
73. PDA–Applications
● For designing the parsing phase of a compiler (Syntax
Analysis).
● For implementation of stack applications.
● For evaluating the arithmetic expressions.
● For solving the Tower of Hanoi Problem.
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
73
74. S.NO PUSHDOWN AUTOMATA FINITE AUTOMATA
1.
For Type-2 grammar we
can design pushdown
automata.
For Type-3 grammar we
can design finite
automata.
2.
Non – Deterministic
pushdown automata has
more powerful than
Deterministic pushdown
automata.
Non-Deterministic Finite
Automata has same
powers as in
Deterministic Finite
Automata.
3.
Not every Non-
Deterministic pushdown
automata is transformed
into its equivalent
Deterministic pushdown
Every Non-Deterministic
Finite Automata is
transformed into an
equivalent Deterministic
Finite Automata
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
74
75. Construct a PDA
Construct a PDA for language L = {0n1m| n >= 1, m >= 1, m > n+2}
● Step-1: On receiving 0 push it onto stack. On receiving 1, ignore it and goto next state
● Step-2: On receiving 1, ignore it and goto next state
● Step-3: On receiving 1, pop a 0 from top of stack and go to next state
● Step-4: On receiving 1, pop a 0 from top of stack. If stack is empty, on receiving 1 ingore it and
goto next state
● Step-5: On receiving 1 ignore it. If input is finished then goto last state
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
75
80. Exercises
• NPDA for accepting the language L = {am b(2m) | m>=1}
• NPDA for accepting the language L = {ambncn | m,n ≥ 1}
• NPDA for accepting the language L = {amb(m+n)cn | m,n ≥ 1}
• NPDA for accepting the language L = {am bn cp dq | m+n=p+q ; m,n,p,q>=1}
• NPDA for accepting the language L = {a(m+n)bmcn | m,n ≥ 1}
• NPDA for accepting the language L = {anb(2n) | n>=1} U {anbn | n>=1}
• NPDA for accepting the language L = {aibjckdl | i==k or j==l,i>=1,j>=1}
• NPDA for accepting the language L = {anbm | n,m ≥ 1 and n ≠ m}
• NPDA for accepting the language L = {amb(2m+1) | m ≥ 1}
• NPDA for accepting the language L = {an bn | n>=1}
• NPDA for accepting the language L = {a2mb3m | m ≥ 1}
• NPDA for accepting the language L = {an bn cm | m,n>=1}
• NPDA for accepting the language L = {ambnc(m+n) | m,n ≥ 1}
• NPDA for accepting the language L = {wwR | w ∈ (a,b)*}
• DFA for accepting the language L = {an bm | n+m=odd}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
80
87. Definition
Alphabet
● Definition: An alphabet is any finite set of symbols.,
● Example: Σ = {a, b, c, d} is an alphabet set where ‘a’, ‘b’, ‘c’, and ‘d’ are symbols.,
String
1. Definition: A string is a finite sequence of symbols taken from Σ.,
2. Example: ‘cabcad’ is a valid string on the alphabet set Σ = {a, b, c, d}
Length of a String
1. Definition : It is the number of symbols present in a string. (Denoted by |S|).,
2. Examples:,
3. If S=‘cabcad’, |S|= 6
If |S|= 0, it is called an empty string (Denoted by λ or ε)
Kleene Star
1. Definition: The Kleene star, Σ* , is a unary operator on a set of symbols or strings, Σ, that gives the
infinite set of all possible strings of all possible lengths over Σ including λ.
2. Representation: Σ* = Σ0 U Σ1 U Σ2 U……. where Σp is the set of all possible strings of length p.
3. Example: If Σ = {a, b}, Σ*= {λ, a, b, aa, ab, ba, bb,………..}
4. Kleene Closure / Plus
1. Definition: The set Σ+ is the infinite set of all possible strings of all possible lengths over Σ excluding
λ.
2. Representation: Σ+ = Σ1 U Σ2 U Σ3 U……. Σ+ = Σ* − { λ }
3. Example: If Σ = { a, b } , Σ+ ={ a, b, aa, ab, ba, bb,………..}
5. Language
1. Definition : A language is a subset of Σ* for some alphabet Σ. It can be finite or infinite.
2. Example : If the language takes all possible strings of length 2 over Σ = {a, b}, then L = { ab, bb, ba, bb}
Mrs.D.Jena
Catherine
Bel,AP/CSE,
VEC
87