Basic Terminologies
●Foralphabet{a,b}withlengthn,numberofstringscanbegenerated=2
n
●Generalcase:IfthenumberofsymbolsinthealphabetΣisrepresentedby|Σ|,
thenanumberofstringsoflengthn,possibleoverΣis|Σ|
n
Basic Terminologies
●ClosureRepresentation
○L
+
: It is a Positive Closurethat represents a set of all strings
except Null or ε-strings.
Basic Terminologies
●ClosureRepresentation
○L
*
: It is “Kleene Closure”, that represents the occurrence of certain
alphabets for given language alphabets from zero to the infinite
number of times.
Regular Expression
●Regular Expressions are patterns that are used to denote
languages.
●An expression is regular if:
○ɸis a regular expression for regular language ɸ.
○ɛis a regular expression for regular language {ɛ}.
○If a∈Σ, a is regular expression with language {a}.
Regular Expression
●An expression is regular if:
○If a and b are regular expression, a + b is also a regular
expression with language {a,b}.
○If a and b are regular expression, ab (concatenation of a
and b) is also regular.
○If a is regular expression, a* (0 or more times a) is also
regular.
Regular Expression
●Write the regular expression for strings starting with a in the
alphabet set {a,b}
Regular Expression
●Write the regular expression for strings end with b in the
alphabet set {a,b}
Regular Expression
●Write the regular expression for strings start with a and end
with b in the alphabet set {a,b}
Regular Expression
●Write the regular expression for strings start with a or end
with b in the alphabet set {a,b}
Regular Expression
●Write the regular expression for strings contain a substring
abbin the alphabet set {a,b}
Regular Expression
●Find the language obtained from regular express 1*01*.
Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(A) The set of all strings containing the substring 00.
(B) The set of all strings containing at most two 0’s.
(C) The set of all strings containing at least two 0’s.
(D) The set of all strings that begin and end with either 0 or 1.
Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(A) The set of all strings containing the substring 00.
Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(B) The set of all strings containing at most two 0’s.
Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(D) The set of all strings that begin and end with either 0 or 1.
Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(C) The set of all strings containing at least two 0’s.
Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(A) The set of all strings containing the substring 00.
(B) The set of all strings containing at most two 0’s.
(C) The set of all strings containing at least two 0’s.
(D) The set of all strings that begin and end with either 0 or 1.