yes ok i will try
Theory of Automata (CS402)View more random threads:
- CS401 Computer Architecture and Assembly Language...
- CS403 Assignment No. 03 Solution 23rd January 2016
- CS410 Visual Programming Assignment#01 Solution &...
- cs703 assignment no 3 Solution 20th January 2016
- CS709 Formal Methods for Software Engineering Assignment No...
- cs507 idea solution second assignment fall 2010
- CS614 Data Warehousing VU Assignment No 4 Spring June 2012...
- CS604 Assignment 02 Solution spring April 2012 due date...
- cs506 assignment no 3 fall Semester December 2011-2012
- CS 610 Computer Networks Assignment # 05 Fall 2010 solution
Assignment No.4
Deadline
Your assignment must be uploaded before or on 23rd June 2011.
Rules for Marking
It should be clear that your assignment will not get any credit if:
• The assignment is submitted after due date
• The assignment is copied
Objectives
Objective of this assignment is to make students able to understand the following
concepts,
• Pumping Lemma Version I and II
• Defining Context Free Grammars for Different Languages
• Null and Null-able Transitions and Regular Context Free Grammars
Question No.1 Pumping Lemma Version I and II
a. Suppose we have a language defined below,
anbm Where m = n! (n-factorial) and n = 1, 2, 3 …
Some strings belonging to this language are,
ab , aabb , aaabbbbbb , aaaabbbbbbbbbbbbbbbbbbbbbbbb , …
[a1b1 ,a2b2 ,a3b6 ,a4b24 , …]
Try to prove that this language is non-regular by Applying Pumping Lemma Version I
and II on this language separately [by taking some example strings]
b. Can we say using PUMPING LEMMA I AND II for sure that a given language is
regular or NOT.
[Hint: Part b is somewhat tricky you need to be go through definition of pumping lemma
thoroughly to give answer of this part]
Question No.2 Defining Context Free Grammars
a. Consider the languages EVEN and ODD defined as language having strings of
even and odd lengths respectively, their RE’s are
Even Length Language:
((a+b)(a+b))* = (aa + ab + ba + bb)*
Odd Length Language:
((a+b)(a+b))* (a+b) = (aa + ab + ba + bb)* (a+b)
Give Context Free Grammars for these two languages separately.
b. Let us define a Language MULTIPLE OF THREE PALINDROME having all
those strings of PALINDROME which have length multiple of three, some
words belonging to this language are,
^ , aaa , aba , bab , bbb , aaaaaa , aabbaa , abaaba , abbbba , baaaaab ,
babbab , bbaabb
bbbbbb, ….
[Null string is included considering zero is also multiple of three as 0 x 3 = 0]
i. Give CFG for this language.
ii. Modify your CFG for MULTIPLE OF THREE PALINDROME for
two languages below,
• EVEN MULTIPLE OF THREE PALINDROME
• ODD MULTIPLE OF THREE PALINDROME
HINT: See appendix to see definition of palindrome, even palindrome and odd
palindrome
Question No.3 Null and Nullable Transitions, Regular
Context Free Grammars
Consider the two CFG’s given below,
S ---- > aAA | bBB | Є
A --- > bB | Є
B --- > aA | Є
S ---- > aAA | bBB | Є
A --- > bB | Z
B --- > aA | Є
Z--- > Є
[Here Є means null string, In CFG’s we generally use Є for indicating null string instead
of ^ sign]
a. Find null and null-able transitions (if any) separately in these two CFG’s
b. Remove null transitions from these CFG’s and give new CFG’s for both cases without
null transitions
Important Note:
While attempting any question always remember the following points:
o Where OR is used in the description of a language it means that expressions on
both sides of ‘OR’ are parts of the language.
o Where NOT is used in the description of the language it means that language
includes all strings except described in the ‘NOT’ condition, for example
language NOT starting with a, means all strings not having a in the start (you
have to evaluate yourself what kinds of strings are these).
Appendix
i. PALINDROME [already given in handouts]
S --------- > aSa | bSb | a | b | Є
ii. EVEN PALINDROME
S --------- > aSa | bSb | Є
iii. ODD PALINDROME
S --------- > aSa | bSb | a | b
Assignment Uploading Instructions:
Upload single word file in word 2003 format having solutions for all questions.
Sponsored Links
yes ok i will try
only few hours available
moon shaib itnay mushkil subjects kyon rakahay howay han.
Urgent call: 03455242488. | Virtual University Assignments
Virtual University GDBs | Virtual University Papers | Vu Projects | Vu Handouts
About Expert
A little mistake
i also need this.can u solve it?
i guess it is for paid....
Urgent call: 03455242488. | Virtual University Assignments
Virtual University GDBs | Virtual University Papers | Vu Projects | Vu Handouts
About Expert
very good it is very good business to cash the difficulties of others
There are currently 1 users browsing this thread. (0 members and 1 guests)