Ask Question
10 December, 15:40

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. 10 December, 15:51
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers