

Re: CS606 Assignment 3 Solution and Discussion
Assignment No. 3Semester: Spring 2020
CS606 – Compiler Construction
Total Marks: 20Due Date:
July 27, 2020
Instructions
Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:o Assignment is submitted after due date.
o Submitted assignment does not open or file is corrupt.
o Assignment is copied (From internet/ to from students).Software (s) Used to develop Assignment
MS Word MS PaintAssignment Submission Instructions
Microsoft Word file is required to submit on LMS.Assignment Marks 20
Question:S > A S  y S  E
A > B  C w  v B
B > x C
C > zThe symbols S, A, B and C are nonterminals with S as the start symbol while v, w, x, y, z are terminal symbols.
Use the contextfree grammar given above to answer the following questions.
a) Give the FOLLOW and FIRST sets for each nonterminal symbol in above grammar
b) Construct the parsing table for a nonrecursive predictive parser for above grammar.Deadline:
Your assignment must be uploaded on or before the due date. We shall not accept your solution through email after the due date. 
Re: CS606 Assignment 2 Solution and Discussion
Assignment No. 2Semester: Spring 2020
CS606 – Compiler Construction
Total Marks: 20Due Date:
June 15, 2020
Instructions
Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:o Assignment is submitted after due date.
o Submitted assignment does not open or file is corrupt.
o Assignment is copied (From internet/ to from students).Software (s) Used to develop Assignment
MS Word MS PaintAssignment Submission Instructions
Microsoft Word file is required to submit on LMS.Assignment Marks 20
Question:X > aZ
X > c
Y > bX
Z > Ya
Z > XbYa) Find First sets for above grammar. (10 Marks)
b) Find Follow sets for above grammar. (10 Marks)
Deadline:
Your assignment must be uploaded on or before the due date. We shall not accept your solution through email after the due date. 
Re: CS606 Assignment 1 Solution and Discussion
Assignment No. 1Semester: Spring 2020
CS606 – Compiler Construction
Total Marks: 20Due Date:
June 01, 2020
Instructions
Please read the following instructions carefully before submitting assignment:
It should be clear that your assignment will not get any credit if:o Assignment is submitted after due date.
o Submitted assignment does not open or file is corrupt.
o Assignment is copied (From internet/ to from students).Software (s) Used to develop Assignment
MS Word MS PaintAssignment Submission Instructions
Microsoft Word file is required to submit on LMS.Assignment Marks 20
Task 1:For regular expression below, construct an NFA using Thompson’s construction. (10 Marks)
R.E. = (y* xy* x)* y*Task 2:
Use Subset Construction algorithm to find DFA for the NFA constructed in Task 1. (10 Marks)
Deadline:
Your assignment must be uploaded on or before the due date. We shall not accept your solution through email after the due date. 

CS606 – Compiler Construction
Assignment # 03
Fall 2019
Total marks = 20Deadline Date
22nd January, 2020Please carefully read the following instructions before attempting assignment.
RULES FOR MARKING
It should be clear that your assignment would not get any credit if:
The assignment is submitted after the due date.
The submitted assignment does not open or file is corrupt.
Strict action will be taken if submitted solution is copied from any other student or from the internet.You should consult the recommended books to clarify your concepts as handouts are not enough.
You are supposed to submit your assignment in .doc or docx format.
Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted.OBJECTIVE
Objective of this assignment is to increase the learning capabilities of the students about
• ContextFree Grammars
• LL(1) Table constructions
• Follow SetsNOTE
No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.
If you find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard.
For any query, feel free to email at:
[email protected]Questions No 01 12+8=20 Marks
Consider the grammar given below:
S → XaXb
S → Yb
X → €
Y → €Where € (epsilon) is empty string.
a) Find First and Follow sets for above grammar. [12]
b) Construct LL (1) parsing table. [8]Good Luck!

CS606 – Compiler Construction
Assignment # 02
Fall 2019
Total marks = 20Deadline Date
2nd December, 2019Please carefully read the following instructions before attempting assignment.
RULES FOR MARKING
It should be clear that your assignment would not get any credit if:
The assignment is submitted after the due date.
The submitted assignment does not open or file is corrupt.
Strict action will be taken if submitted solution is copied from any other student or from the internet.You should consult the recommended books to clarify your concepts as handouts are not enough.
You are supposed to submit your assignment in .doc or docx format.
Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted.OBJECTIVE
Objective of this assignment is to increase the learning capabilities of the students about
• ContextFree Grammars
• Ambiguous Grammars
• Unambiguous GrammarsNOTE
No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.
If you find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard.
For any query, feel free to email at:
[email protected]Questions No 01 10 marks
Consider the grammar given below:
NP > Adj NP
NP > NP Conj NP
NP > Adj N
NP > N
Adj > Young
Conj > and
N > Boys  GirlsWhere “Young, and, boys, Girls “ are terminals and “NP, N, Adj, Conj” are nonterminals.
Prove or disprove that the grammar given above is ambiguous.Questions No 02 10 marks
Consider the grammar given below:
S > S + S  S / S  10  11  12  13  14  15  16  17  18  19Prove that above given grammar is ambiguous.
Good Luck!

CS606 – Compiler Construction
Assignment # 01
Fall 2019
Total marks = 20Deadline Date
14th Nov 2019Please carefully read the following instructions before attempting assignment.
RULES FOR MARKING
It should be clear that your assignment would not get any credit if:
The assignment is submitted after the due date.
The submitted assignment does not open or file is corrupt.
Strict action will be taken if submitted solution is copied from any other student or from the internet.You should consult the recommended books to clarify your concepts as handouts are not enough.
You are supposed to submit your assignment in .doc or docx format.
Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted.Objective:
Objective of this assignment is to increase the learning capabilities of the students about
• Deterministic Finite Automaton (DFA)
• Nondeterministic Finite Automaton (NFA)
• Thompson’s Construction AlgorithmNOTE
No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.
If you find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard.
For any query, feel free to email at:
[email protected]Questions No 01 10 marks
For regular expression below, construct an NFA using Thompson’s construction.
R.E. = ((v + x)*y) + zQuestions No 02 10 marks
Use Subset Construction algorithm to find DFA for the NFA constructed in Task 1.Good Luck!
SOLVED CS606 Assignment 1 Solution and Discussion

CS606 – Compiler Construction
Assignment # 01
Fall 2019
Total marks = 20Deadline Date
14th Nov 2019Please carefully read the following instructions before attempting assignment.
RULES FOR MARKING
It should be clear that your assignment would not get any credit if:
The assignment is submitted after the due date.
The submitted assignment does not open or file is corrupt.
Strict action will be taken if submitted solution is copied from any other student or from the internet.You should consult the recommended books to clarify your concepts as handouts are not enough.
You are supposed to submit your assignment in .doc or docx format.
Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted.Objective:
Objective of this assignment is to increase the learning capabilities of the students about
• Deterministic Finite Automaton (DFA)
• Nondeterministic Finite Automaton (NFA)
• Thompson’s Construction AlgorithmNOTE
No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.
If you find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard.
For any query, feel free to email at:
[email protected]Questions No 01 10 marks
For regular expression below, construct an NFA using Thompson’s construction.
R.E. = ((v + x)*y) + zQuestions No 02 10 marks
Use Subset Construction algorithm to find DFA for the NFA constructed in Task 1.Good Luck!

@zareen said in CS606 Assignment 1 Solution and Discussion:
Use Subset Construction algorithm to find DFA for the NFA constructed in Task 1.
The resulting DFA is

@zareen said in CS606 Assignment 1 Solution and Discussion:
For regular expression below, construct an NFA using Thompson’s construction.
R.E. = ((v + x)*y) + z