Ask Question

Write a regular expression of the language havingstrings that either start or end with "00" and have nomore zeroes. Where the alphabet is {0,1}.

+5
Answers (1)
  1. 14 August, 14:39
    0
    001*|1*00

    Explanation:

    The language consists of strings in {0,1} that either start with 00 or end with 00 and have no more zeros.

    The requirement can be divided into two parts:

    1) Strings that start with 00 and have no more zeros

    2) Strings that end with 00 and have no more zeros

    Generating regular expressions for these parts:

    1) 001 * - starts with two zeros and can have zero or more 1s later

    2) 1*00 - starts with zero or more 1s and ends with two zeros

    So on combining with the or operator (|), the overall regular expression for the strings in the language becomes:

    001*|1*00
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a regular expression of the language havingstrings that either start or end with "00" and have nomore zeroes. Where the alphabet is ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers