Monday, June 20, 2011

cs402 4th Assignment No:4 Spring 2011

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

No comments:

Post a Comment

Solution Available for following Subjects

BBA, B.Com & BS Assignments Discussion
BA All Subjects Assignment Discussion
ACC501 - Business Finance
CS001 - Computer Proficiency License
CS101 - Introduction to Computing
CS201 - Introduction to Programming
CS304 - Object Oriented Programming
ECO401 - Economics
ECO402 - Microeconomics
ECO403 - Macroeconomics
ENG101 - English Comprehension
ENG201 - Business and Technical English Writing
ENG301 - Business Communication
ETH201 - Ethics (for Non-Muslims)
ISL201 - Islamic Studies
IT430 - E-Commerce
MCM101 - Introduction to Mass Communication
MCM301 - Communication skills
MCM304 - Mass Media in Pakistan
MCM310 - Journalistic Writing
MGMT611 - Human Relations (alt. code=HRM611)
MGT101 - Financial Accounting
MGT111 - Introduction to Public Administration
MGT211 - Introduction To Business
MGT301 - Principles of Marketing
MGT401 - Financial Accounting II
MGT501 - Human Resource Management
MGT502 - Organizational Behaviour
MGT503 - Principles of Management
MGT603 - Strategic Management
MTH302 - Business Mathematics & Statistics
PAK301 - Pakistan Studies
STA301 - Statistics and Probability
PSY101 - Introduction to Psychology
PSY403 - Social Psychology
PSY502 - History & Systems of Psychology
SOC101 - Introduction to Sociology
B.Com All Subjects Assignment Discussion
ACC311 - Fundamentals of Auditing
ACC501 - Business Finance
CS101 - Introduction to Computing
ECO402 - Microeconomics
ECO403 - Macroeconomics
ENG101 - English Comprehension
ENG201 - Business and Technical English Writing
ETH201 - Ethics (for Non-Muslims)
FIN611 - Advanced Financial Accounting
FIN623 - Taxation Management
ISL201 - Islamic Studies
MCM301 - Communication skills
MGT101 - Financial Accounting
MGT211 - Introduction To Business
MGT401 - Financial Accounting II
MGT402 - Cost & Management Accounting
MGT411 - Money & Banking
MGT503 - Principles of Management
MGT611 - Business & Labor Law
MTH302 - Business Mathematics & Statistics
PAK301 - Pakistan Studies
STA301 - Statistics and Probability
B.Sc (Computer Science)
CS101 - Introduction to Computing
CS201 - Introduction to Programming
CS301 - Data Structures
CS302 - Digital Logic Design
CS304 - Object Oriented Programming
CS401 - Computer Architecture and Assembly Language Programming
CS403 - Database Management Systems
CS504 - Software Engineering - I
CS601 - Data Communication
CS610 - Computer Network)
ECO401 - Economics
ENG101 - English Comprehension
ENG201 - Business and Technical English Writing
ETH201 - Ethics (for Non-Muslims)
ISL201 - Islamic Studies
MGT101 - Financial Accounting
MGT301 - Principles of Marketing
MTH101 - Calculus And Analytical Geometry
MTH202 - Discrete Mathematics
MTH301 - Calculus II
MTH401 - Differential Equations
MTH501 - Linear Algebra
PAK301 - Pakistan Studies
PHY101 - Physics
PHY301 - Circuit Theory
STA301 - Statistics and Probability
BS Other subjects Assignments Discussion
MBA, MCS, MIT Assignment Discussion
MBA Compulsory/Required All Subjects
ACC501 - Business Finance
CS001 - VU-Computer Proficiency License
CS101 - Introduction to Computing
CS507 - Information Systems
ECO401 - Economics
ENG301 - Business Communication
MCM301 - Communication skills
MGT101 - Financial Accounting
MGT201 - Financial Management
MGT211 - Introduction To Business
MGT301 - Principles of Marketing
MGT401 - Financial Accounting II
MGT402 - Cost & Management Accounting
MGT411 - Money & Banking
MGT501 - Human Resource Management
MGT502 - Organizational Behaviour
MGT503 - Principles of Management
MGT510 - Total Quality Management (alt. code=MGMT510)
MGT601 - SME Management
MGT602 - Entrepreneurship
MGT603 - Strategic Management
MGT610 - Business Ethics
MGT613 - Production / Operations Management
MKT501 - Marketing Management
MTH001 - Elementary Mathematics
MTH302 - Business Mathematics & Statistics
STA301 - Statistics and Probability
STA630 - Research Methods
IT430 - E-Commerce
MBA All Specializations
Marketing Specialization
MKT610 - Customer Relationship Management
MKT621 - Advertising & Promotion
MKT624 - Brand Management
MKT630 - International Marketing
Finance Specialization
FIN621 - Financial Statement Analysis
FIN622 - Corporate Finance
FIN623 - Taxation Management
FIN630 - Investment Analysis & Portfolio Management
HRM Specialization
MGMT611 - Human Relations (alt. code=HRM611)
HRM624 - Conflict Management
HRM627 - Human Resource Development
MGMT628 - Organizational Development (alt. code=HRM628)
Information Technology Specialization
CS201 - Introduction to Programming
CS403 - Database Management Systems
CS610 - Computer Network
CS615 - Software Project Management
Management Specialization
MGMT623 - Leadership & Team Management (alt. code=HRM623)
MGMT625 - Change Management (alt. code=HRM625 )
MGMT629 - Crisis Management
MGMT630 - Knowledge Management
Banking Specialization
BNK601 - Banking Laws & Practices
BNK603 - Consumer Banking
MGT604 - Management of Financial Institutions (alt. code=BNK604)
FIN625 - Credit & Risk Management
MCS all Semesters Assignments Discussion
CS201 - Introduction to Programming
CS301 - Data Structures
CS302 - Digital Logic Design
CS304 - Object Oriented Programming
CS401 - Computer Architecture and Assembly Language Programming
CS402 - Theory of Automata
CS403 - Database Management Systems
CS501 - Advance Computer Architecture
CS502 - Fundamentals of Algorithms
CS504 - Software Engineering - I
CS506 - Web Design and Development
CS601 - Data Communication
CS604 - Operating Systems
CS605 - Software EngineeringII
CS607 - Artificial Intelligence
CS609 - System Programming
CS610 - Computer Network
CS614 - Data Warehousing
ENG201 - Business and Technical English Writing
MTH202 - Discrete Mathematics
MTH603 - Numerical Analysis
STA301 - Statistics and Probability
MIT All Semesters Subjects Assignments Discussion
CS201 - Introduction to Programming
CS301 - Data Structures
CS304 - Object Oriented Programming
CS401 - Computer Architecture and Assembly Language Programming
CS403 - Database Management Systems
CS408 - Human Computer Interaction
CS410 - Visual Programming
CS502 - Fundamentals of Algorithms
CS504 - Software Engineering - I
CS506 - Web Design and Development
CS601 - Data Communication
CS604 - Operating Systems
CS610 - Computer Network
CS614 - Data Warehousing
CS615 - Software Project Management
ENG201 - Business and Technical English Writing
MGT101 - Financial Accounting
MGT301 - Principles of Marketing
MGT501 - Human Resource Management
MGT502 - Organizational Behaviour
MGT503 - Principles of Management
MGT602 - Entrepreneurship
Proposals, Projects,Internship Reports and Past Papers
Sample Projects & Proposals
General Discussion About proposals & Project
InternShip Repots
Sample Internship Reports
Past & Current Papers
MID TERM Current Papers {May.-2011 Spring}
FINAL TERM Past Papers and pattern {Feb.-2011 Fall}
MID TERM Past Papers and pattern {Dec.-2010 Fall}
FINAL TERM Past Papers and pattern {Aug-2010 Spring}
MID TERM Past Papers and pattern {May-2010 Spring}
FINAL TERM Past Papers and pattern {Feb.-2010 Fall}
MID TERM Past Papers and pattern {Dec.-2009 Fall}
FINAL TERM Past Papers and pattern {JULY-2009 Spring}
MID TERM Past Papers and pattern {April-2009 Spring}
FINAL TERM Past Papers and pattern {Feb-2009 Fall}
MID TERM Past Papers and pattern {Dec.-2008 Fall}
Past Papers and Pattern {2004 to 2007}