cfw_s3 on input of 1. The start state is
cfw_s0, and the set of final states are all
those that include s0 or s4. Exercises
1. Let A = cfw_0, 11 and B = cfw_00, 01. Find
each of these sets. a) AB b) BA c) A2 d)
B3 2. Show that if A is a set of strings,
th

the process of removing programming
errors. In 1946, when the Navy told her
that she was too old for active service,
Hopper chose to remain at Harvard as
a civilian research fellow. In 1949 she
left Harvard to join the EckertMauchly
Computer Corporation,

states, it is not hard to show that L(G) =
L(M). We leave the details as an
exercise for the reader. Example 5
illustrates the construction used to
produce a grammar from an
automaton that generates the language
recognized by this automaton.
EXAMPLE 5 Fin

method for showing that certain sets
are not regular. EXAMPLE 6 Show that
the set cfw_0n1n | n = 0, 1, 2,., made up
of all strings consisting of a block of 0s
followed by a block of an equal number
of 1s, is not regular. Solution: Suppose
that this set we

inductive hypothesis, each of these two
polygons has two triangles that have
two sides that border their exterior, and
in each case only one of these triangles
can fail to be a triangle that has two
sides that border the exterior of the
original polygon.

(1)is true because 11 = 0
multiplications are required to find the
product of x1, a product with only one
factor. Suppose that P (k) is true for 1
k n. The last multiplication used to
find the product of the n + 1 distinct
real numbers x1, x2,.,xn, xn+1

powerful models of computation, such
as pushdown automata and Turing
machines, at the end of this section.
The regular sets are those P1: 1 CH137T Rosen-2311T MHIA017-Rosenv5.cls May 13, 2011 10:27 13.4
Language Recognition 879 that can be
formed using th

recognized by a finite-state automaton.
To do this, all we need is an automaton
that recognizes , the null string, but
not any other string. This can be done
by making the start state s0 a final
state and having no transitions, so that
no other string tak

a final state when the second string in
A has been read, and so on. Figure 2(c)
illustrates the construction we used. A
nondeterministic finite-state
automaton can be constructed for any
regular set using the procedure
described in this proof. We illustra

Automaton Recognizing L(G). s0 Start 1
0 s1 s2 0 1 1 0 FIGURE 5 A Finite-State
Automaton. We now complete the
proof of Theorem 2. Proof: We now
show that if a set is regular, then there
is a regular grammar that generates it.
Suppose that M is a finite-st

later divorced and did not have
children. Hopper was a mathematics
professor at Vassar from 1931 until
1943, earning a Ph.D. from Yale in
1934. After the attack on Pearl Harbor,
Hopper, coming from a family with
strong military traditions, decided to
leav

automaton is regular, is left as an
exercise for the reader. Proof: Recall
that a regular set is defined in terms of
regular expressions, which are defined
recursively. We can prove that every
regular set is recognized by a finitestate automaton if we can

a1 + b1 max(a1, a2) + max(b1, b2).
Therefore, max(a1+b1, a2+b2) = a1+b1
max(a1, a2)+max(b1, b2). The case
with a1 + b1 < a2 + b2 is similar.
Inductive step: Assume that the result is
true for k. Then max(a1 + b1, a2 + b2,. ,
ak + bk, ak+1 + bk+1) = max(m

s0, and a subset F of S consisting of the
final states. We can represent
nondeterministic finite-state automata
using state tables or state diagrams.
When we use a state table, for each
pair of state and input value we give a
list of possible next states.

first removed; removing these does not
change the language recognized.
GRACE BREWSTER MURRAY HOPPER
(19061992) Grace Hopper, born in
NewYork City, displayed an intense
curiosity as a child with how things
worked.At the age of seven, she
disassembled alarm

Navy recalled her from retirement to
help standardize high-level naval
computer languages. In 1983 she was
promoted to the rank of Commodore
by special Presidential appointment,
and in 1985 she was elevated to the
rank of Rear Admiral. Her retirement
from

each of these strings is recognized by
the deterministic finite-state
automaton in Figure 1. a) 111 b) 0011
c) 1010111 d) 011011011 12.
Determine whether each of these
strings is recognized by the
deterministic finite-state automaton in
Figure 1. a) 010 b

transitions in MAB include all those
in MA and in MB. Also, for each
transition from sA to a state s on input
i we include a transition from sAB to
s on input i, and for each transition
from sB to a state s on input i we
include a transition from sAB to s

there is no finite-state automaton that
recognizes the set of bit strings
containing an equal number of 0s and
1s. In Exercises 5862 we introduce a
technique for constructing a
deterministic finite-state machine
equivalent to a given deterministic
finite-

equivalence classes of final states of M.
60. a) Show that s and t are 0equivalent if and only if either both s
and t are final states or neither s nor t
is a final state. Conclude that each final
state of M, which is an R-equivalence
class, contains only

should take the combined machine
from sB to a final state of the combined
machine. Consequently, we make the
following construction. Let SAB be SA
SB. [Note that we can assume that SA
and SB are disjoint.] The starting state
sAB is the same as sA. The se

sets represented by A and by B; (A B)
represents the union of the sets
represented by A and by B; A
represents the Kleene closure of the
set represented by A. Sets represented
by regular expressions are called
regular sets. Henceforth regular
expressions

xuR for x , u . 37. w0 = and
wn+1 = wwn. 39. When the string
consists of n 0s followed by n 1s for
some non- negative integer n 41. Let P
(i) be l(wi ) = i l(w). P (0) is true
because l(w0) = 0 = 0 l(w). Assume P
(i) is true. Then l(wi+1) = l(wwi ) = l(w)

A(m + 1,l) = 2 and A(m + 1, k) = A(m,
A(m + 1, k 1), with A(m + 1, k 1) 2.
Hence, by the inductive hypothesis, A(m,
A(m + 1, k 1) A(m, 2) > A(m, 1) = 2.
Inductive step: Assume that A(m + 1, r)
> A(m + 1, s) for all r > s, s = 0, 1,.,l.
Then if k +1 > l +1

are all the subsets of S, the set of states
of M0, that are obtained in this way
starting with s0. (There are as many as
2n states in the deterministic machine,
where n is the number of states in the
nondeterministic machine, because all
subsets may occur

positive integer, then s and k are also
(k 1)-equivalent d) Show that the
equivalence classes of Rk are a
refinement of the equivalence classes
of Rk1 if k is a positive integer. (The
refinement of a partition of a set is
defined in the preamble to Exerci

a production, and a transition from sA
to sB on input of a is included if A aB
is a production. The set of final states
includes sF and also includes s0 if S
is a production in G. It is not hard to
show that the language recognized by
M equals the langua

Machines with No Output 877 39.
Explain how you can change the
deterministic finite-state automaton M
so that the changed automaton
recognizes the set I L(M). 40. Use
Exercise 39 and finite-state automata
constructed in Example 6 to find
deterministic fin

+ 2, 3), which is in S by one application
of the recursive definition. For a sum
greater than 7, either a 3, or P1: 1
ANS Rosen-2311T MHIA017-Rosenv5.cls May 13, 2011 10:29 S-36 Answers
to Odd-Numbered Exercises a 2 and b
9, in which case either (a 2, b)

11. Because s0 and s4 are the only final
states, the language recognized by the
machine is cfw_0n, 0n01, 0n11 | n 0.
One important fact is that a language
recognized by a nondeterministic
finite-state automaton is also
recognized by a deterministic finit