Construct a DFA that recognises balanced sequences of parenthesis with a maximal nesting depth of 3, e.g., ε, ()(), XXXXXXXXXXor XXXXXXXXXXbut not XXXXXXXXXXor (()(()(()))).  Given that binary number...


Construct a DFA that recognises balanced sequences of parenthesis


with a maximal nesting depth of 3, e.g., ε, ()(), (()(())) or (()())()() but not (((()))) or


(()(()(()))).


 Given that binary number strings are read with the most significant


bit first and may have leading zeroes, construct DFAs for each of the following


languages:


a) Binary number strings that represent numbers that are multiples of 4, e.g., 0,


100 and 10100.


b) Binary number strings that represent numbers that are multiples of 5, e.g., 0,


101, 10100 and 11001.


Hint: Make a state for each possible remainder after division by 5 and then add


a state to avoid accepting the empty string.


c) Given a number n, what is the minimal number of states needed in a DFA that


recognises binary numbers that are multiples of n? Hint: write n as a ∗ 2b, where


a is odd.



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here