Question: Generate an appropriate regular expression for each situation, without using the +or ? operators. a. All binary strings that have an odd number of 1's
Generate an appropriate regular expression for each situation, without using the +or ? operators. a. All binary strings that have an odd number of 1's Example: 1,111,10101,0001 b. All binary strings that contain the substring 011 c. All strings over the alphabet (ab,c) containing at least one a and one b. Example: ababcaaccbb,cacbcabc d. All binary strings with at most one pair of consecutive 1's. Example: ,0,11,0110,10101010101,01101010 e. All binary strings that have an even number of 1's and O's Example: E,11,00,1100,0011,10101010 f. A NFA that accepts all binary strings with even parity. Example:8,0,00,11,1001,1010101
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
