Theory Of Computation (2160704)

BE | Semester-7   Winter-2018 | 27/11/2018

Q3) (b)

Find a regular expression corresponding to each of the following subsets of {0, 1}*

  1. All string begins or ends with 00 or 11
    • Strings : 00101, 10100,110,01011...
    • R.E. = (00|11)(0 | 1) * | (0|1)*(00|11)
  2. String starts with 1 and ends with 0
    • Strings : 10,100,110,1000,1100...
    • R.E. = 1(0 | 1) * 0