VU Answer Provide Latest CS402 Assignment 1 Solution Fall 2021. Easy to See Complete Perfect CS402 New Assignment 1 Solution 2021 and Download PDF File.
CS402 ASSIGNMENT 1 SOLUTION FALL 2021
Provide by VU Answer
Due Date: 14 Dec 2021
Total Marks: 20
Topic Covered:
The objective of this assignment is to assess the understanding of students about:
Languages
Regular Expression
Finite automata
Question 1:
Part a:
Determine which of the following sets have valid/invalid alphabets:
Σ1={ a, ab, b, d, ae}
Σ2={a, ba, c, d}
Solution:
Part b:
Consider Σ={ ab, baa, c, db} to find the length of the string s=abbaaabdbbaa by tokenizing. Give its reverse Rev (s).
Solution:
s = abbaaabdbbaa
Tokenized = (ab) (baa) (ab) (db) (baa)
Length = 5
Rev (s) = (baa) (db) (ab) (baa) (ab)
Rev (s) = baabdabbaaab
Question 2:
Part a:
Give the regular expression RE over Σ={a,b} for the language of all words having b as a second letter.
Solution:
(a + b) b + (a + b) *
Part b:
What will be the Finite Automata for the above language?
Solution:
Diagram Solution File Given Below in PDF File.
PLEASE NOTE:
Don't copy-paste the same answer.
Make sure you can make some changes to your solution file before submitting copy-paste solution will be marked zero.
If you found any mistake then correct yourself and inform me.
Before submitting an assignment check your assignment requirement file.
If you need some help and question about file and solutions.
0 Comments