0% found this document useful (0 votes)
25 views3 pages

Assignment-1 - Theory of Automata and Formal Languages

This document outlines Assignment 1 for the CS352 course at the National University of Sciences & Technology, focusing on finite automata and formal languages. It includes a series of questions requiring students to solve problems related to DFAs, NFAs, regular expressions, and their applications in computational theory. The assignment is due on March 15, 2025, and must be submitted in groups of two as a single PDF document.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views3 pages

Assignment-1 - Theory of Automata and Formal Languages

This document outlines Assignment 1 for the CS352 course at the National University of Sciences & Technology, focusing on finite automata and formal languages. It includes a series of questions requiring students to solve problems related to DFAs, NFAs, regular expressions, and their applications in computational theory. The assignment is due on March 15, 2025, and must be submitted in groups of two as a single PDF document.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

National University of Sciences & Technology

School of Electrical Engineering and Computer Science

Department of Computing

CS352 Theory of Automata and Formal Languages: BSCS13(CDE), Spring 2025

Assignment 1

CLO1: Understand the salient features and limitations of computational models.

Marks: 50 Instructor: Dr. Fatima Abdullah

Announcement Date: March 8, 2025 Due Date: March 15, 2025 (11:59 pm)

Part-1: Solve the following Questions by utilizing the knowledge of


Finite Automata, NFA-DFA equivalence, and regular expressions.
Q.1: Let D = {w| w contains an even number of a’s and an odd number of b’s and does
not contain the substring ab}. Give a DFA with five states that recognizes D.

Q.2: Convert the following nondeterministic finite automata to equivalent deterministic


finite automata.

Q.3: Convert the following finite automata to regular expressions.


Q.4: Minimize the given DFA using Myhill-Nerode Theorem.

Q.5: Write the regular expressions of the following.


1. Regular expression for all strings over {0,1} that contain at least two occurrences of
the substring "101" but do not contain the substring "000".

2. Regular expression for all strings over {a, b, c} that do not contain the substring "abc"
or "cba".

3. Regular expression for all binary strings over {0,1} where the number of 1s is at most
twice the number of 0s.
4. Regular expression for all binary strings over {0,1} that contain exactly two 1s and
any number of 0s.​

5. Regular expression for all strings over {a, b} where every occurrence of "a" is
immediately followed by at least one "b".

Part-2: Explain the following questions.

1.​ Explain the significance of finite automata in computational theory. Discuss its
practical applications in modern computing.
2.​ Discuss the role of finite automata in lexical analysis in programming languages.
How does it contribute to the design of compilers?
3.​ Compare and contrast deterministic finite automata (DFA) and nondeterministic
finite automata (NFA). Provide a theoretical discussion on why NFAs and DFAs
are equivalent in expressive power.
4.​ Identify and explain the fundamental limitations of finite automata in recognizing
certain languages. Provide examples of problems that cannot be solved using
finite automata alone.
5.​ Regular expressions and finite automata are two equivalent representations of
regular languages. Discuss the conversion process between regular expressions
and finite automata, explaining why they are considered equivalent.
6.​ Consider a modern search engine like Google. Explain how finite automata and
regular expressions might be used in search query optimization and text
processing.

Submission Guidelines:

●​ The assignment should be completed in groups of two, with only one submission
per group required on the LMS. (Ensure all group members' names are included
in the submission document). Submission Folder Name must be entitled with
all group members' names followed with Section name.
●​ Submit a single PDF document of the assignment.

You might also like