Regular Language
Regular Language
TOPIC 4 , 5
TURNSTILE
The machine above can know what state it is currently in, on Inserting a coin into a turnstile will unlock it, and after the turnstile
or off, but it doesn't know what the history of flips was to get has been pushed, it locks again. Inserting a coin into an unlocked
it to where it is (i.e. it doesn't know how many times the turnstile, or pushing against a locked turnstile will not change its
● The students will be able to understand the need for the regular language
along with its operations and analyse the regular expression for different finite
state automaton
SPECIFIC OBJECTIVE
● The students will be able
2. To interpret how to translate between Regular Languages, Finite Automata, and Regular
Expressions (U/C)
4. To justify the operations of regular expressions for different set of Finite State Automaton.
(An/P)
REGULAR LANGUAGE
● A language is a set of strings which are made up of characters from a specified alphabet, or set
of symbols.
○ The Language
● A finite state machine, M, describes a given language, L. M is said to accept a string w if the
machine starts in a start state, undergoes some series of state transitions, and ends up in an
accepting state.
● We say that the machine M recognizes the language L if M accepts all strings w that are in L.
CONCATENATION
● It is an operation that combines two symbols, sets, or languages. There are two main ways to write a concatenation.
X∘Y and XY both mean “X concatenated with Y.” Languages can also be concatenated: L1 ∘L2means strings from L1
UNION
● It is an operation where a finite state machine can make one choice or another at any step (this can also be thought of as
an “or” operation).
● For example, there could be a finite state machine that can choose between concatenating X with Y or concatenating X
with Z. Or is written with a vertical bar, and the expression from the previous sentence looks like this: (X ∘Y ∣X ∘Z)
KLEENE STAR
● The Kleene star is an operation denoted by an asterisk * that basically represents repeated self-concatenation
● The Kleene star can repeat the symbol it operates on any number of times.
● The regular language X∘Y∣Z * represents strings of the form “X concatenated with Y or Z repeated any number of
times.”
● Formally, the Kleene star is defined as follows: A * ={x1x2...xk∣k≥0 and each xi∈A} The Kleene star is a unary
operation since it operates only on one thing instead of two (unlike union and concatenation, which are binary
operations).
● Because kkk can be 000, xxx can be repeated 000 times. This means that the empty string is always a member of A
LANGUAGE NOTATION
● The pattern often resembles something like this 0n1n, where the exponent actually represents
A. 101
B. 100110
C. 1000001
D. 1110001
FA - 2
What regular expression is represented by the finite state machines shown
below? (S0is the starting state).
A. (ab)*
B. ab*
C. ab
D. a*b
FA - 3
What is the regular expression that describes this finite state machine?
FA - 4
game can do: stand, run, and jump. The buttons that a
STAND STAND
player can use to control this particular character are “A”
Pr
es
“UP”
sN
oth
“UP” “A”
ngi
Using the state diagram for the video game character above, STAND
describe how a player can control their character to go from
standing to running to jumping.
“UP”
MIND MAP