Build a PM that accepts the language MOREA (all words with more a's than b's) by using

Question:

Build a PM that accepts the language MOREA (all words with more a's than b's) by using the following algorithm :
Step 1 On one pass through the data, look for a pair of consecutive letters that are unequal and cancel them both.
Step 2 Repeat the operation above until there are no letters to cancel.
Step 3 If there is an a left, accept the word.
Run this machine on the following input strings:

(i) aabb
(ii) aaabb
(iii) ababa
(iv) ababab

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: