Question
1) Construct FSM for the following scenarios. Input: non empty binary sequence I) output: Should end in a final state if the input stream has
1)
Construct FSM for the following scenarios. Input: non empty binary sequence I) output: Should end in a final state if the input stream has a 1. So your automaton should mimic OR operation. ii) output: Should end in a final state only if the input stream has only a sequence of 1 and no 0. So your automaton should mimic AND operation.
2)
Write a regular expression for the following language: L = {w {0, 1}* | w contains an equal number of occurrences of the substring 01 and 10}
(Eg. 010 L because 010 contains a single 01 and a single 10 as substrings; but 01101 doesnt belong to L because 01101 contains two 01 s and one 10.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started