Question: 1 . Write a regular expression for each of the following: Note: Intuitive Reading of Regular Expressions Concatenation = = is followed by | =
Write a regular expression for each of the following:
Note: Intuitive Reading of Regular Expressions
Concatenation is followed by
or
zero or more occurrences
or or
Answer:
all strings over ab that start with an a
Answer: aab
only s
all binary strings
all binary strings except empty string
all strings over the alphabet that begin with end with
all strings over the alphabet that end with
all strings over the alphabet that contain at least three s
all strings over the alphabet that contain at least three consecutive s
all strings over the alphabet that contain the substring
all strings over the alphabet that don't contain the substring
Answer:
all strings over the alphabet that contain at least two s but not
consecutive s
all strings over the alphabet that have at least characters, and the third
character is
Answer:
all strings over the alphabet that the number of s is a multiple of
all strings over the alphabet that start and end with the same character
odd length
all strings over the alphabet a b with ab as substring
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
