0% found this document useful (0 votes)
23 views2 pages

Assignment 1

This document outlines the instructions and problems for CSE331 Assignment 1, due on July 9, 2025. It includes guidelines for submission, academic integrity, and a series of problems related to language recognition using DFAs. The assignment consists of five problems, with specific points assigned to each, including bonus questions.

Uploaded by

ASHFAQ ANONYMOUS
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)
23 views2 pages

Assignment 1

This document outlines the instructions and problems for CSE331 Assignment 1, due on July 9, 2025. It includes guidelines for submission, academic integrity, and a series of problems related to language recognition using DFAs. The assignment consists of five problems, with specific points assigned to each, including bonus questions.

Uploaded by

ASHFAQ ANONYMOUS
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/ 2

CSE331 Section 9, Assignment 1

Atonu Roy Chowdhury, [email protected]

Summer 2025

1 Instructions
1. The deadline is 9 July 2025, 11:59PM. There will be no deadline extension. Hence,
don’t wait for the last minute to submit. If you finish early, submit it early.

2. Please start the assignment as soon as possible. If you start it just a day before the
deadline, you might not be able to complete it.

3. You’ll need to submit in the Google Classroom. Please make sure to turn in after you
upload your file.

4. You have to scan your handwritten solutions, and upload the PDF file. Uploading images
(JPG, JPEG, PNG, SVG, etc.) are not allowed.

5. If you take help from your friend (even if your friend is from a different section), or if you
use ChatGPT to help you understand the material, you have to mention it on top of the
first page of your assignment. Failing to do so will be considered as plagiarism and will
have consequences as per the plagiarism policy.

6. Copying AI-generated answers without understanding or attribution will be treated as


academic misconduct.

7. The total mark of this assignment is 50. However, there are 2 bonus questions that are
worth 5 points in total. Attempt the bonus questions only after you have solved all the
other problems. If you get more than 50, then the extra points will be adjusted with other
assignments.

8. Please feel free to reach out to me if you have any questions.

2 Problems
∗
Problem 1 (2 points). Find all language L (over any alphabet Σ) such that L∗ = L .

Problem 2 (5 × 7 = 35 points). Draw the state diagram of a DFA that recognizes the following
languages over Σ = {0, 1}.

(a) L = {w ∈ Σ∗ : w starts and ends with the same symbol}.

(b) L = {w ∈ Σ∗ : w ̸= ε, and the characters of w alternate between 0s and 1s}.

1
(c) L = {w ∈ Σ∗ : number of 1s in w is 2 more than a multiple of 4}.

(d) L = {w ∈ Σ∗ : w ends with 011}.

(e) L = {w ∈ Σ∗ : w interpreted as a binary number is divisible by 5}.

(f) L = {w ∈ Σ∗ : the difference of the number of 0s and the number of 1s in w is divisible by 3}.

(g) L = {0m 1n : m, n ≥ 0 and m + n is odd}

Problem 3 (2 + 2 + 2 + 1 + 3 = 10 points). The symmetric difference of the languages L1 and


L2 , denoted by L1 △L2 , is defined in the following way:

L1 △L2 = {w : w is in exactly one of L1 and L2 }

Let Σ = {0, 1}. Consider the following languages over Σ.

A = {w : the length of w is greater than or equal to 3 but less than or equal to 5}


B = {w : the length of w is greater than or equal to 2 but less than or equal to 4}
C = {w : the length of w is odd}

(a) (2 points) Give the state diagram for a DFA that recognizes A.

(b) (2 points) Give the state diagram for a DFA that recognizes B.

(c) (2 points) Give the state diagram for a DFA that recognizes A△B.

(d) (1 point) If you use the construction from class to get a DFA for the language (A△B) ∪ C,
how many states will it have?

(e) (3 points) Give a 5-state DFA that recognizes (A△B) ∪ C.

Problem 4. Let Σ = {0, 1}

(a) (3 points) Draw the state diagram of a DFA that recognizes the language L = {11, 101, 010, 0110}.

(b) (Bonus, 3 points) If L is a finite language, then is it always true that L is regular? In
other words, is there a DFA that recognizes L?

Problem 5 (Bonus, 2 points). Let Σ = {0, 1}. Find all strings x ∈ Σ∗ such that x011 = 011x.

You might also like