Computer Science 3050H Winter 2023 ass2
代做Algorithm | assignment – 这个题目属于一个Algorithm的代写任务, 是比较典型的Algorithm等代写方向, 这是值得参考的assignment代写的题目
Computer Science 3050H
Winter 2023
assignment 2
-
Consider the following two languages over the alphabet = {a, b}: L 1 is the language of all words with an odd number of a s and L 2 is the language of all words that begins with the substring ba. a) Using the trial and effort method we demonstrated in lecture, draw FA 1 : a machine that L 1 and FA 2 : a machine that accepts L 2. b) Using the Algorithm providing by Kleenes Theorem, construct the FA machine that accepts L 1 + L 2.
-
Draw a Moore Machine to count the occurrences of the substrings bab or aba in words over the alphabet S={a ,b}. As discussed in Module 2, Finite Automata with Output, simply output a 1 at the end position of the desired substrings from the input string. For example, the input string abaababa would output 000100011.
-
Convert the following Moore Machine into a Mealy Machine.
-
Convert the following Mealy Machine into a Moore Machine.
-
Consider the following languages over the alphabet S={a ,b}: L 1 is the language of all words that end with the substring ab while L 2 is the language of all words with an odd number of letters. Draw finite automata for L 1 and L 2 and using one of the two algorithms we discussed in Module 3, Regular Languages, construct the finite automata that accepts L 1 L 2.
-
Are the languages accepted by the following FAs equivalent? Using the algorithm discussed in Module 3, Decidability Problems to prove your answer (show all the intermediate steps).
-
Use the pumping lemma to prove the following language is nonregular: L = {a^2 nbn} = {aab, aaaabb, aaaaaabbb, …}
-
Find CFGs that for these regular languages over the alphabet = {a, b}. Draw a Finite Automata first and use this to create the CFG. (a) The language of all words that does not contain any double letters ( aa or bb ). (b) The set of all words that begin with the letter a and contains an odd number of a s or begin with the letter b and contains an even number of b s.