SlideShare a Scribd company logo
1 of 40
1
Context-Free Languages &
Grammars
(CFLs & CFGs)
Reading: Chapter 5
Not all languages are regular
 So what happens to the languages
which are not regular?
 Can we still come up with a language
recognizer?
 i.e., something that will accept (or reject)
strings that belong (or do not belong) to the
language?
2
3
Context-Free Languages
 A language class larger than the class of regular
languages
 Supports natural, recursive notation called “context-
free grammar”
 Applications:
 Parse trees, compilers
 XML
Regular
(FA/RE)
Context-
free
(PDA/CFG)
4
An Example
 A palindrome is a word that reads identical from both
ends
 E.g., madam, redivider, malayalam, 010010010
 Let L = { w | w is a binary palindrome}
 Is L regular?
 No.
 Proof:
 Let w=0N10N (assuming N to be the p/l constant)
 By Pumping lemma, w can be rewritten as xyz, such that xykz is also L
(for any k≥0)
 But |xy|≤N and y≠
 ==> y=0+
 ==> xykz will NOT be in L for k=0
 ==> Contradiction
5
But the language of
palindromes…
is a CFL, because it supports recursive
substitution (in the form of a CFG)
 This is because we can construct a
“grammar” like this:
1. A ==> 
2. A ==> 0
3. A ==> 1
4. A ==> 0A0
5. A ==> 1A1
Terminal
Productions
Variable or non-terminal
How does this grammar work?
Same as:
A => 0A0 | 1A1 | 0 | 1 | 
How does the CFG for
palindromes work?
An input string belongs to the language (i.e.,
accepted) iff it can be generated by the CFG
 Example: w=01110
 G can generate w as follows:
1. A => 0A0
2. => 01A10
3. => 01110
6
G:
A => 0A0 | 1A1 | 0 | 1 | 
Generating a string from a grammar:
1. Pick and choose a sequence
of productions that would
allow us to generate the
string.
2. At every step, substitute one variable
with one of its productions.
7
Context-Free Grammar:
Definition
 A context-free grammar G=(V,T,P,S), where:
 V: set of variables or non-terminals
 T: set of terminals (= alphabet U {})
 P: set of productions, each of which is of the form
V ==> 1 | 2 | …
 Where each i is an arbitrary string of variables and
terminals
 S ==> start variable
CFG for the language of binary palindromes:
G=({A},{0,1},P,A)
P: A ==> 0 A 0 | 1 A 1 | 0 | 1 | 
8
More examples
 Parenthesis matching in code
 Syntax checking
 In scenarios where there is a general need
for:
 Matching a symbol with another symbol, or
 Matching a count of one symbol with that of
another symbol, or
 Recursively substituting one symbol with a string
of other symbols
9
Example #2
 Language of balanced paranthesis
e.g., ()(((())))((()))….
 CFG?
G:
S => (S) | SS | 
How would you “interpret” the string “(((()))()())” using this grammar?
10
Example #3
 A grammar for L = {0m1n | m≥n}
 CFG? G:
S => 0S1 | A
A => 0A | 
How would you interpret the string “00000111”
using this grammar?
11
Example #4
A program containing if-then(-else) statements
if Condition then Statement else Statement
(Or)
if Condition then Statement
CFG?
More examples
 L1 = {0n | n≥0 }
 L2 = {0n | n≥1 }
 L3={0i1j2k | i=j or j=k, where i,j,k≥0}
 L4={0i1j2k | i=j or i=k, where i,j,k≥1}
12
13
Applications of CFLs & CFGs
 Compilers use parsers for syntactic checking
 Parsers can be expressed as CFGs
1. Balancing paranthesis:
 B ==> BB | (B) | Statement
 Statement ==> …
2. If-then-else:
 S ==> SS | if Condition then Statement else Statement | if Condition
then Statement | Statement
 Condition ==> …
 Statement ==> …
3. C paranthesis matching { … }
4. Pascal begin-end matching
5. YACC (Yet Another Compiler-Compiler)
14
More applications
 Markup languages
 Nested Tag Matching
 HTML
 <html> …<p> … <a href=…> … </a> </p> … </html>
 XML
 <PC> … <MODEL> … </MODEL> .. <RAM> …
</RAM> … </PC>
15
Tag-Markup Languages
Roll ==> <ROLL> Class Students </ROLL>
Class ==> <CLASS> Text </CLASS>
Text ==> Char Text | Char
Char ==> a | b | … | z | A | B | .. | Z
Students ==> Student Students | 
Student ==> <STUD> Text </STUD>
Here, the left hand side of each production denotes one non-terminals
(e.g., “Roll”, “Class”, etc.)
Those symbols on the right hand side for which no productions (i.e.,
substitutions) are defined are terminals (e.g., ‘a’, ‘b’, ‘|’, ‘<‘, ‘>’, “ROLL”,
etc.)
16
Structure of a production
A =======> 1 | 2 | … | k
head body
derivation
1. A ==> 1
2. A ==> 2
3. A ==> 3
…
K. A ==> k
The above is same as:
17
CFG conventions
 Terminal symbols <== a, b, c…
 Non-terminal symbols <== A,B,C, …
 Terminal or non-terminal symbols <== X,Y,Z
 Terminal strings <== w, x, y, z
 Arbitrary strings of terminals and non-
terminals <== , , , ..
18
Syntactic Expressions in
Programming Languages
result = a*b + score + 10 * distance + c
Regular languages have only terminals
 Reg expression = [a-z][a-z0-1]*
 If we allow only letters a & b, and 0 & 1 for
constants (for simplification)
 Regular expression = (a+b)(a+b+0+1)*
terminals variables Operators are also
terminals
19
String membership
How to say if a string belong to the language
defined by a CFG?
1. Derivation
 Head to body
2. Recursive inference
 Body to head
Example:
 w = 01110
 Is w a palindrome?
Both are equivalent forms
G:
A => 0A0 | 1A1 | 0 | 1 | 
A => 0A0
=> 01A10
=> 01110
20
Simple Expressions…
 We can write a CFG for accepting simple
expressions
 G = (V,T,P,S)
 V = {E,F}
 T = {0,1,a,b,+,*,(,)}
 S = {E}
 P:
 E ==> E+E | E*E | (E) | F
 F ==> aF | bF | 0F | 1F | a | b | 0 | 1
21
Generalization of derivation
 Derivation is head ==> body
 A==>X (A derives X in a single step)
 A ==>*G X (A derives X in a multiple steps)
 Transitivity:
IFA ==>*GB, and B ==>*GC, THEN A ==>*G C
22
Context-Free Language
 The language of a CFG, G=(V,T,P,S),
denoted by L(G), is the set of terminal
strings that have a derivation from the
start variable S.
 L(G) = { w in T* | S ==>*G w }
23
Left-most & Right-most
Derivation Styles
Derive the string a*(ab+10) from G:
E
==> E * E
==> F * E
==> aF * E
==> a * E
==> a * (E)
==> a * (E + E)
==> a * (F + E)
==> a * (aF + E)
==> a * (abF + E)
==> a * (ab + E)
==> a * (ab + F)
==> a * (ab + 1F)
==> a * (ab + 10F)
==> a * (ab + 10)
E =*=>G a*(ab+10)
Left-most
derivation:
E
==> E * E
==> E * (E)
==> E * (E + E)
==> E * (E + F)
==> E * (E + 1F)
==> E * (E + 10F)
==> E * (E + 10)
==> E * (F + 10)
==> E * (aF + 10)
==> E * (abF + 0)
==> E * (ab + 10)
==> F * (ab + 10)
==> aF * (ab + 10)
==> a * (ab + 10)
Right-most
derivation:
G:
E => E+E | E*E | (E) | F
F => aF | bF | 0F | 1F | 
Always
substitute
leftmost
variable
Always
substitute
rightmost
variable
24
Leftmost vs. Rightmost
derivations
Q1) For every leftmost derivation, there is a rightmost
derivation, and vice versa. True or False?
Q2) Does every word generated by a CFG have a
leftmost and a rightmost derivation?
Q3) Could there be words which have more than one
leftmost (or rightmost) derivation?
True - will use parse trees to prove this
Yes – easy to prove (reverse direction)
Yes – depending on the grammar
How to prove that your CFGs
are correct?
(using induction)
25
26
CFG & CFL
 Theorem: A string w in (0+1)* is in
L(Gpal), if and only if, w is a palindrome.
 Proof:
 Use induction
 on string length for the IF part
 On length of derivation for the ONLY IF part
Gpal:
A => 0A0 | 1A1 | 0 | 1 | 
Parse trees
27
28
Parse Trees
 Each CFG can be represented using a parse tree:
 Each internal node is labeled by a variable in V
 Each leaf is terminal symbol
 For a production, A==>X1X2…Xk, then any internal node
labeled A has k children which are labeled from X1,X2,…Xk
from left to right
A
X1 Xi Xk
… …
Parse tree for production and all other subsequent productions:
A ==> X1..Xi..Xk
29
Examples
E
E + E
F F
a 1
Parse tree for a + 1
A
0 A 0
1 1
A

Parse tree for 0110
Recursive
inference
Derivation
G:
E => E+E | E*E | (E) | F
F => aF | bF | 0F | 1F | 0 | 1 | a | b
G:
A => 0A0 | 1A1 | 0 | 1 | 
30
Parse Trees, Derivations, and
Recursive Inferences
A
X1 Xi Xk
… …
Recursive
inference
Derivation
Production:
A ==> X1..Xi..Xk
Parse tree
Left-most
derivation
Right-most
derivation
Derivation
Recursive
inference
31
Interchangeability of different
CFG representations
 Parse tree ==> left-most derivation
 DFS left to right
 Parse tree ==> right-most derivation
 DFS right to left
 ==> left-most derivation == right-most
derivation
 Derivation ==> Recursive inference
 Reverse the order of productions
 Recursive inference ==> Parse trees
 bottom-up traversal of parse tree
Connection between CFLs
and RLs
32
33
CFLs & Regular Languages
 A CFG is said to be right-linear if all the
productions are one of the following two
forms: A ==> wB (or) A ==> w
 Theorem 1: Every right-linear CFG generates
a regular language
 Theorem 2: Every regular language has a
right-linear grammar
 Theorem 3: Left-linear CFGs also represent
RLs
Where:
• A & B are variables,
• w is a string of terminals
What kind of grammars result for regular languages?
Some Examples
34
A B C
0
1 0
1 0,1
A B C
0
1 0
1
1
0
A => 01B | C
B => 11B | 0C | 1A
C => 1A | 0 | 1
Right linear CFG? Right linear CFG? Finite Automaton?
Ambiguity in CFGs and CFLs
35
36
Ambiguity in CFGs
 A CFG is said to be ambiguous if there
exists a string which has more than one
left-most derivation
LM derivation #1:
S => AS
=> 0A1S
=>0A11S
=> 00111S
=> 00111
Example:
S ==> AS | 
A ==> A1 | 0A1 | 01
Input string: 00111
Can be derived in two ways
LM derivation #2:
S => AS
=> A1S
=> 0A11S
=> 00111S
=> 00111
37
Why does ambiguity matter?
string = a * b + c
E ==> E + E | E * E | (E) | a | b | c | 0 | 1
• LM derivation #1:
•E => E + E => E * E + E
==>* a * b + c
• LM derivation #2
•E => E * E => a * E =>
a * E + E ==>* a * b + c
E
E + E
E * E
a b
c
(a*b)+c
E
E * E
E
+
E
a
b c
a*(b+c)
Values are
different !!!
The calculated value depends on which
of the two parse trees is actually used.
38
Removing Ambiguity in
Expression Evaluations
 It MAY be possible to remove ambiguity for
some CFLs
 E.g.,, in a CFG for expression evaluation by
imposing rules & restrictions such as precedence
 This would imply rewrite of the grammar
 Precedence: (), * , +
How will this avoid ambiguity?
E => E + T | T
T => T * F | F
F => I | (E)
I => a | b | c | 0 | 1
Modified unambiguous version:
Ambiguous version:
E ==> E + E | E * E | (E) | a | b | c | 0 | 1
39
Inherently Ambiguous CFLs
 However, for some languages, it may not be
possible to remove ambiguity
 A CFL is said to be inherently ambiguous if
every CFG that describes it is ambiguous
Example:
 L = { anbncmdm | n,m≥ 1} U {anbmcmdn | n,m≥ 1}
 L is inherently ambiguous
 Why?
Input string: anbncndn
40
Summary
 Context-free grammars
 Context-free languages
 Productions, derivations, recursive inference,
parse trees
 Left-most & right-most derivations
 Ambiguous grammars
 Removing ambiguity
 CFL/CFG applications
 parsers, markup languages

More Related Content

What's hot

Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingMatlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingDr. Manjunatha. P
 
Cấu trúc dữ liệu động
Cấu trúc dữ liệu động Cấu trúc dữ liệu động
Cấu trúc dữ liệu động kikihoho
 
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkMATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkreddyprasad reddyvari
 
Dts x dicoding #4 memulai pemrograman kotlin
Dts x dicoding #4 memulai pemrograman kotlinDts x dicoding #4 memulai pemrograman kotlin
Dts x dicoding #4 memulai pemrograman kotlinAhmad Arif Faizin
 
Tugas imk chapter 2
Tugas imk chapter 2Tugas imk chapter 2
Tugas imk chapter 2adevandy
 
Teori bahasa formal dan Otomata
Teori bahasa formal dan OtomataTeori bahasa formal dan Otomata
Teori bahasa formal dan OtomataRisal Fahmi
 
Bai tap lon xlnntn
Bai tap lon xlnntnBai tap lon xlnntn
Bai tap lon xlnntnNguyễn Anh
 
Tích phân hàm phân thức luyện thi đại học
Tích phân hàm phân thức luyện thi đại họcTích phân hàm phân thức luyện thi đại học
Tích phân hàm phân thức luyện thi đại họcGia sư Đức Trí
 
Modul Praktikum Pemrograman Berorientasi Objek (Chap.7)
Modul Praktikum Pemrograman Berorientasi Objek (Chap.7)Modul Praktikum Pemrograman Berorientasi Objek (Chap.7)
Modul Praktikum Pemrograman Berorientasi Objek (Chap.7)Debby Ummul
 
2 matlab ly-thuyet_laptrinh_hamtoanhoc_
2 matlab ly-thuyet_laptrinh_hamtoanhoc_2 matlab ly-thuyet_laptrinh_hamtoanhoc_
2 matlab ly-thuyet_laptrinh_hamtoanhoc_Thân Văn Ngọc
 
Functional Error Handling with Cats
Functional Error Handling with CatsFunctional Error Handling with Cats
Functional Error Handling with CatsMark Canlas
 
Data Structures in javaScript 2015
Data Structures in javaScript 2015Data Structures in javaScript 2015
Data Structures in javaScript 2015Nir Kaufman
 
Giải số bằng mathlab
Giải số bằng mathlabGiải số bằng mathlab
Giải số bằng mathlabdvt1996
 
Pertemuan 6 - Struktur Perulangan
Pertemuan 6 - Struktur PerulanganPertemuan 6 - Struktur Perulangan
Pertemuan 6 - Struktur PerulanganAchmad Solichin
 
175 thuc-hanh-matlab-[dh-khoa-hoc-tu-nhien-hcm]
175 thuc-hanh-matlab-[dh-khoa-hoc-tu-nhien-hcm]175 thuc-hanh-matlab-[dh-khoa-hoc-tu-nhien-hcm]
175 thuc-hanh-matlab-[dh-khoa-hoc-tu-nhien-hcm]Vinh Phan
 

What's hot (20)

Python functions
Python functionsPython functions
Python functions
 
Matlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processingMatlab for beginners, Introduction, signal processing
Matlab for beginners, Introduction, signal processing
 
Fundamentals of matlab
Fundamentals of matlabFundamentals of matlab
Fundamentals of matlab
 
Luận văn: Giải bài toán bất đẳng thức biến phân giả đơn điệu, 9đ
Luận văn: Giải bài toán bất đẳng thức biến phân giả đơn điệu, 9đLuận văn: Giải bài toán bất đẳng thức biến phân giả đơn điệu, 9đ
Luận văn: Giải bài toán bất đẳng thức biến phân giả đơn điệu, 9đ
 
Tichchap
TichchapTichchap
Tichchap
 
Cấu trúc dữ liệu động
Cấu trúc dữ liệu động Cấu trúc dữ liệu động
Cấu trúc dữ liệu động
 
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkMATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
 
Dts x dicoding #4 memulai pemrograman kotlin
Dts x dicoding #4 memulai pemrograman kotlinDts x dicoding #4 memulai pemrograman kotlin
Dts x dicoding #4 memulai pemrograman kotlin
 
Tugas imk chapter 2
Tugas imk chapter 2Tugas imk chapter 2
Tugas imk chapter 2
 
Teori bahasa formal dan Otomata
Teori bahasa formal dan OtomataTeori bahasa formal dan Otomata
Teori bahasa formal dan Otomata
 
Bai tap lon xlnntn
Bai tap lon xlnntnBai tap lon xlnntn
Bai tap lon xlnntn
 
Tích phân hàm phân thức luyện thi đại học
Tích phân hàm phân thức luyện thi đại họcTích phân hàm phân thức luyện thi đại học
Tích phân hàm phân thức luyện thi đại học
 
Modul Praktikum Pemrograman Berorientasi Objek (Chap.7)
Modul Praktikum Pemrograman Berorientasi Objek (Chap.7)Modul Praktikum Pemrograman Berorientasi Objek (Chap.7)
Modul Praktikum Pemrograman Berorientasi Objek (Chap.7)
 
2 matlab ly-thuyet_laptrinh_hamtoanhoc_
2 matlab ly-thuyet_laptrinh_hamtoanhoc_2 matlab ly-thuyet_laptrinh_hamtoanhoc_
2 matlab ly-thuyet_laptrinh_hamtoanhoc_
 
Functional Error Handling with Cats
Functional Error Handling with CatsFunctional Error Handling with Cats
Functional Error Handling with Cats
 
Data Structures in javaScript 2015
Data Structures in javaScript 2015Data Structures in javaScript 2015
Data Structures in javaScript 2015
 
Giải số bằng mathlab
Giải số bằng mathlabGiải số bằng mathlab
Giải số bằng mathlab
 
Pertemuan 6 - Struktur Perulangan
Pertemuan 6 - Struktur PerulanganPertemuan 6 - Struktur Perulangan
Pertemuan 6 - Struktur Perulangan
 
Materi 7. array
Materi 7. arrayMateri 7. array
Materi 7. array
 
175 thuc-hanh-matlab-[dh-khoa-hoc-tu-nhien-hcm]
175 thuc-hanh-matlab-[dh-khoa-hoc-tu-nhien-hcm]175 thuc-hanh-matlab-[dh-khoa-hoc-tu-nhien-hcm]
175 thuc-hanh-matlab-[dh-khoa-hoc-tu-nhien-hcm]
 

Similar to ContextFreeGrammars.pptx

RegularExpressions.pdf
RegularExpressions.pdfRegularExpressions.pdf
RegularExpressions.pdfImranBhatti58
 
Automata
AutomataAutomata
AutomataGaditek
 
Automata
AutomataAutomata
AutomataGaditek
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxRaviAr5
 
02. chapter 3 lexical analysis
02. chapter 3   lexical analysis02. chapter 3   lexical analysis
02. chapter 3 lexical analysisraosir123
 
a7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptx
a7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptxa7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptx
a7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptxpivap22198
 
L11 context-free grammers 2.pptx parse tree
L11 context-free grammers 2.pptx parse treeL11 context-free grammers 2.pptx parse tree
L11 context-free grammers 2.pptx parse treesunitachalageri1
 
Context free languages
Context free languagesContext free languages
Context free languagesJahurul Islam
 
Context free languages
Context free languagesContext free languages
Context free languagesJahurul Islam
 
Conteext-free Grammer
Conteext-free GrammerConteext-free Grammer
Conteext-free GrammerHASHIR RAZA
 
TOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfTOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfAdiseshaK
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfAdiseshaK
 
Theory of computing presentation
Theory of computing presentationTheory of computing presentation
Theory of computing presentationMd. Touhidur Rahman
 
Theory of computing
Theory of computingTheory of computing
Theory of computingRanjan Kumar
 

Similar to ContextFreeGrammars.pptx (20)

Context free grammer.ppt
Context free grammer.pptContext free grammer.ppt
Context free grammer.ppt
 
RegularExpressions.pdf
RegularExpressions.pdfRegularExpressions.pdf
RegularExpressions.pdf
 
Automata
AutomataAutomata
Automata
 
Automata
AutomataAutomata
Automata
 
TOC question bank.pdf
TOC question bank.pdfTOC question bank.pdf
TOC question bank.pdf
 
Mod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptxMod 2_RegularExpressions.pptx
Mod 2_RegularExpressions.pptx
 
02. chapter 3 lexical analysis
02. chapter 3   lexical analysis02. chapter 3   lexical analysis
02. chapter 3 lexical analysis
 
a7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptx
a7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptxa7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptx
a7f0bc7785844884c4de624f61ce5978_MIT18_404f20_lec4.pptx
 
L11 context-free grammers 2.pptx parse tree
L11 context-free grammers 2.pptx parse treeL11 context-free grammers 2.pptx parse tree
L11 context-free grammers 2.pptx parse tree
 
Context free languages
Context free languagesContext free languages
Context free languages
 
Context free languages
Context free languagesContext free languages
Context free languages
 
QB104541.pdf
QB104541.pdfQB104541.pdf
QB104541.pdf
 
Ch03
Ch03Ch03
Ch03
 
Conteext-free Grammer
Conteext-free GrammerConteext-free Grammer
Conteext-free Grammer
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
 
TOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfTOC Solutions-Adi.pdf
TOC Solutions-Adi.pdf
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
Theory of computing presentation
Theory of computing presentationTheory of computing presentation
Theory of computing presentation
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 

Recently uploaded

Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Recently uploaded (20)

DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

ContextFreeGrammars.pptx

  • 1. 1 Context-Free Languages & Grammars (CFLs & CFGs) Reading: Chapter 5
  • 2. Not all languages are regular  So what happens to the languages which are not regular?  Can we still come up with a language recognizer?  i.e., something that will accept (or reject) strings that belong (or do not belong) to the language? 2
  • 3. 3 Context-Free Languages  A language class larger than the class of regular languages  Supports natural, recursive notation called “context- free grammar”  Applications:  Parse trees, compilers  XML Regular (FA/RE) Context- free (PDA/CFG)
  • 4. 4 An Example  A palindrome is a word that reads identical from both ends  E.g., madam, redivider, malayalam, 010010010  Let L = { w | w is a binary palindrome}  Is L regular?  No.  Proof:  Let w=0N10N (assuming N to be the p/l constant)  By Pumping lemma, w can be rewritten as xyz, such that xykz is also L (for any k≥0)  But |xy|≤N and y≠  ==> y=0+  ==> xykz will NOT be in L for k=0  ==> Contradiction
  • 5. 5 But the language of palindromes… is a CFL, because it supports recursive substitution (in the form of a CFG)  This is because we can construct a “grammar” like this: 1. A ==>  2. A ==> 0 3. A ==> 1 4. A ==> 0A0 5. A ==> 1A1 Terminal Productions Variable or non-terminal How does this grammar work? Same as: A => 0A0 | 1A1 | 0 | 1 | 
  • 6. How does the CFG for palindromes work? An input string belongs to the language (i.e., accepted) iff it can be generated by the CFG  Example: w=01110  G can generate w as follows: 1. A => 0A0 2. => 01A10 3. => 01110 6 G: A => 0A0 | 1A1 | 0 | 1 |  Generating a string from a grammar: 1. Pick and choose a sequence of productions that would allow us to generate the string. 2. At every step, substitute one variable with one of its productions.
  • 7. 7 Context-Free Grammar: Definition  A context-free grammar G=(V,T,P,S), where:  V: set of variables or non-terminals  T: set of terminals (= alphabet U {})  P: set of productions, each of which is of the form V ==> 1 | 2 | …  Where each i is an arbitrary string of variables and terminals  S ==> start variable CFG for the language of binary palindromes: G=({A},{0,1},P,A) P: A ==> 0 A 0 | 1 A 1 | 0 | 1 | 
  • 8. 8 More examples  Parenthesis matching in code  Syntax checking  In scenarios where there is a general need for:  Matching a symbol with another symbol, or  Matching a count of one symbol with that of another symbol, or  Recursively substituting one symbol with a string of other symbols
  • 9. 9 Example #2  Language of balanced paranthesis e.g., ()(((())))((()))….  CFG? G: S => (S) | SS |  How would you “interpret” the string “(((()))()())” using this grammar?
  • 10. 10 Example #3  A grammar for L = {0m1n | m≥n}  CFG? G: S => 0S1 | A A => 0A |  How would you interpret the string “00000111” using this grammar?
  • 11. 11 Example #4 A program containing if-then(-else) statements if Condition then Statement else Statement (Or) if Condition then Statement CFG?
  • 12. More examples  L1 = {0n | n≥0 }  L2 = {0n | n≥1 }  L3={0i1j2k | i=j or j=k, where i,j,k≥0}  L4={0i1j2k | i=j or i=k, where i,j,k≥1} 12
  • 13. 13 Applications of CFLs & CFGs  Compilers use parsers for syntactic checking  Parsers can be expressed as CFGs 1. Balancing paranthesis:  B ==> BB | (B) | Statement  Statement ==> … 2. If-then-else:  S ==> SS | if Condition then Statement else Statement | if Condition then Statement | Statement  Condition ==> …  Statement ==> … 3. C paranthesis matching { … } 4. Pascal begin-end matching 5. YACC (Yet Another Compiler-Compiler)
  • 14. 14 More applications  Markup languages  Nested Tag Matching  HTML  <html> …<p> … <a href=…> … </a> </p> … </html>  XML  <PC> … <MODEL> … </MODEL> .. <RAM> … </RAM> … </PC>
  • 15. 15 Tag-Markup Languages Roll ==> <ROLL> Class Students </ROLL> Class ==> <CLASS> Text </CLASS> Text ==> Char Text | Char Char ==> a | b | … | z | A | B | .. | Z Students ==> Student Students |  Student ==> <STUD> Text </STUD> Here, the left hand side of each production denotes one non-terminals (e.g., “Roll”, “Class”, etc.) Those symbols on the right hand side for which no productions (i.e., substitutions) are defined are terminals (e.g., ‘a’, ‘b’, ‘|’, ‘<‘, ‘>’, “ROLL”, etc.)
  • 16. 16 Structure of a production A =======> 1 | 2 | … | k head body derivation 1. A ==> 1 2. A ==> 2 3. A ==> 3 … K. A ==> k The above is same as:
  • 17. 17 CFG conventions  Terminal symbols <== a, b, c…  Non-terminal symbols <== A,B,C, …  Terminal or non-terminal symbols <== X,Y,Z  Terminal strings <== w, x, y, z  Arbitrary strings of terminals and non- terminals <== , , , ..
  • 18. 18 Syntactic Expressions in Programming Languages result = a*b + score + 10 * distance + c Regular languages have only terminals  Reg expression = [a-z][a-z0-1]*  If we allow only letters a & b, and 0 & 1 for constants (for simplification)  Regular expression = (a+b)(a+b+0+1)* terminals variables Operators are also terminals
  • 19. 19 String membership How to say if a string belong to the language defined by a CFG? 1. Derivation  Head to body 2. Recursive inference  Body to head Example:  w = 01110  Is w a palindrome? Both are equivalent forms G: A => 0A0 | 1A1 | 0 | 1 |  A => 0A0 => 01A10 => 01110
  • 20. 20 Simple Expressions…  We can write a CFG for accepting simple expressions  G = (V,T,P,S)  V = {E,F}  T = {0,1,a,b,+,*,(,)}  S = {E}  P:  E ==> E+E | E*E | (E) | F  F ==> aF | bF | 0F | 1F | a | b | 0 | 1
  • 21. 21 Generalization of derivation  Derivation is head ==> body  A==>X (A derives X in a single step)  A ==>*G X (A derives X in a multiple steps)  Transitivity: IFA ==>*GB, and B ==>*GC, THEN A ==>*G C
  • 22. 22 Context-Free Language  The language of a CFG, G=(V,T,P,S), denoted by L(G), is the set of terminal strings that have a derivation from the start variable S.  L(G) = { w in T* | S ==>*G w }
  • 23. 23 Left-most & Right-most Derivation Styles Derive the string a*(ab+10) from G: E ==> E * E ==> F * E ==> aF * E ==> a * E ==> a * (E) ==> a * (E + E) ==> a * (F + E) ==> a * (aF + E) ==> a * (abF + E) ==> a * (ab + E) ==> a * (ab + F) ==> a * (ab + 1F) ==> a * (ab + 10F) ==> a * (ab + 10) E =*=>G a*(ab+10) Left-most derivation: E ==> E * E ==> E * (E) ==> E * (E + E) ==> E * (E + F) ==> E * (E + 1F) ==> E * (E + 10F) ==> E * (E + 10) ==> E * (F + 10) ==> E * (aF + 10) ==> E * (abF + 0) ==> E * (ab + 10) ==> F * (ab + 10) ==> aF * (ab + 10) ==> a * (ab + 10) Right-most derivation: G: E => E+E | E*E | (E) | F F => aF | bF | 0F | 1F |  Always substitute leftmost variable Always substitute rightmost variable
  • 24. 24 Leftmost vs. Rightmost derivations Q1) For every leftmost derivation, there is a rightmost derivation, and vice versa. True or False? Q2) Does every word generated by a CFG have a leftmost and a rightmost derivation? Q3) Could there be words which have more than one leftmost (or rightmost) derivation? True - will use parse trees to prove this Yes – easy to prove (reverse direction) Yes – depending on the grammar
  • 25. How to prove that your CFGs are correct? (using induction) 25
  • 26. 26 CFG & CFL  Theorem: A string w in (0+1)* is in L(Gpal), if and only if, w is a palindrome.  Proof:  Use induction  on string length for the IF part  On length of derivation for the ONLY IF part Gpal: A => 0A0 | 1A1 | 0 | 1 | 
  • 28. 28 Parse Trees  Each CFG can be represented using a parse tree:  Each internal node is labeled by a variable in V  Each leaf is terminal symbol  For a production, A==>X1X2…Xk, then any internal node labeled A has k children which are labeled from X1,X2,…Xk from left to right A X1 Xi Xk … … Parse tree for production and all other subsequent productions: A ==> X1..Xi..Xk
  • 29. 29 Examples E E + E F F a 1 Parse tree for a + 1 A 0 A 0 1 1 A  Parse tree for 0110 Recursive inference Derivation G: E => E+E | E*E | (E) | F F => aF | bF | 0F | 1F | 0 | 1 | a | b G: A => 0A0 | 1A1 | 0 | 1 | 
  • 30. 30 Parse Trees, Derivations, and Recursive Inferences A X1 Xi Xk … … Recursive inference Derivation Production: A ==> X1..Xi..Xk Parse tree Left-most derivation Right-most derivation Derivation Recursive inference
  • 31. 31 Interchangeability of different CFG representations  Parse tree ==> left-most derivation  DFS left to right  Parse tree ==> right-most derivation  DFS right to left  ==> left-most derivation == right-most derivation  Derivation ==> Recursive inference  Reverse the order of productions  Recursive inference ==> Parse trees  bottom-up traversal of parse tree
  • 33. 33 CFLs & Regular Languages  A CFG is said to be right-linear if all the productions are one of the following two forms: A ==> wB (or) A ==> w  Theorem 1: Every right-linear CFG generates a regular language  Theorem 2: Every regular language has a right-linear grammar  Theorem 3: Left-linear CFGs also represent RLs Where: • A & B are variables, • w is a string of terminals What kind of grammars result for regular languages?
  • 34. Some Examples 34 A B C 0 1 0 1 0,1 A B C 0 1 0 1 1 0 A => 01B | C B => 11B | 0C | 1A C => 1A | 0 | 1 Right linear CFG? Right linear CFG? Finite Automaton?
  • 35. Ambiguity in CFGs and CFLs 35
  • 36. 36 Ambiguity in CFGs  A CFG is said to be ambiguous if there exists a string which has more than one left-most derivation LM derivation #1: S => AS => 0A1S =>0A11S => 00111S => 00111 Example: S ==> AS |  A ==> A1 | 0A1 | 01 Input string: 00111 Can be derived in two ways LM derivation #2: S => AS => A1S => 0A11S => 00111S => 00111
  • 37. 37 Why does ambiguity matter? string = a * b + c E ==> E + E | E * E | (E) | a | b | c | 0 | 1 • LM derivation #1: •E => E + E => E * E + E ==>* a * b + c • LM derivation #2 •E => E * E => a * E => a * E + E ==>* a * b + c E E + E E * E a b c (a*b)+c E E * E E + E a b c a*(b+c) Values are different !!! The calculated value depends on which of the two parse trees is actually used.
  • 38. 38 Removing Ambiguity in Expression Evaluations  It MAY be possible to remove ambiguity for some CFLs  E.g.,, in a CFG for expression evaluation by imposing rules & restrictions such as precedence  This would imply rewrite of the grammar  Precedence: (), * , + How will this avoid ambiguity? E => E + T | T T => T * F | F F => I | (E) I => a | b | c | 0 | 1 Modified unambiguous version: Ambiguous version: E ==> E + E | E * E | (E) | a | b | c | 0 | 1
  • 39. 39 Inherently Ambiguous CFLs  However, for some languages, it may not be possible to remove ambiguity  A CFL is said to be inherently ambiguous if every CFG that describes it is ambiguous Example:  L = { anbncmdm | n,m≥ 1} U {anbmcmdn | n,m≥ 1}  L is inherently ambiguous  Why? Input string: anbncndn
  • 40. 40 Summary  Context-free grammars  Context-free languages  Productions, derivations, recursive inference, parse trees  Left-most & right-most derivations  Ambiguous grammars  Removing ambiguity  CFL/CFG applications  parsers, markup languages

Editor's Notes

  1. School of EECS, WSU
  2. School of EECS, WSU
  3. School of EECS, WSU
  4. School of EECS, WSU
  5. School of EECS, WSU
  6. School of EECS, WSU
  7. School of EECS, WSU
  8. School of EECS, WSU
  9. School of EECS, WSU
  10. School of EECS, WSU
  11. School of EECS, WSU
  12. School of EECS, WSU
  13. School of EECS, WSU
  14. School of EECS, WSU
  15. School of EECS, WSU
  16. School of EECS, WSU
  17. School of EECS, WSU
  18. School of EECS, WSU
  19. School of EECS, WSU
  20. School of EECS, WSU
  21. School of EECS, WSU
  22. School of EECS, WSU
  23. School of EECS, WSU
  24. School of EECS, WSU
  25. School of EECS, WSU
  26. School of EECS, WSU
  27. School of EECS, WSU
  28. School of EECS, WSU
  29. School of EECS, WSU
  30. School of EECS, WSU
  31. School of EECS, WSU
  32. School of EECS, WSU