1 how do i write a regular expression for the languages


For each of the languages L1, L2, L3, L4 described below:

(1)  How do I write a regular expression for the languages below.

(2)  Define a finite state machine (FSM) that recognizes words in the language (input alphabet, states, start state, state transition table, and accept states). Include a state digraph for the FSM.

L1: For alphabet {a,b}, all strings that contain an odd number of a's and exactly one b.

L2: For alphabet {0,1}, all strings of length 3 or less that have more 0's than 1's.

L3: For alphabet {x,y,z}, all strings that contain xyx or zyz.

L4: For alphabet {p,q,r}, all strings that contain the substring rqr or end with pp.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: 1 how do i write a regular expression for the languages
Reference No:- TGS02397903

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)