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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
