Professional Documents
Culture Documents
ITdiapositivas4 (19 1)
ITdiapositivas4 (19 1)
Andrés A. Aristizábal P.
aaaristizabal@icesi.edu.co
2019-1
1 / 34
Agenda
2 Finite-state machines
Presentation of next topic
2 / 34
Equivalence relations and countable and uncountable sets Aims
Agenda
2 Finite-state machines
Presentation of next topic
3 / 34
Equivalence relations and countable and uncountable sets Aims
Aims
4 / 34
Equivalence relations and countable and uncountable sets Discussion and exercises
Agenda
2 Finite-state machines
Presentation of next topic
5 / 34
Equivalence relations and countable and uncountable sets Discussion and exercises
6 / 34
Equivalence relations and countable and uncountable sets Discussion and exercises
Exercises
Exercise
Which of these collections of subsets are partitions of the set of bit strings of length 8?
a) the set of bit strings that begin with 1, the set of bit strings that begin with 00, and the set of
bit strings that begin with 01
b) the set of bit strings that contain the string 00, the set of bit strings that contain the string 01,
the set of bit strings that contain the string 10, and the set of bit strings that contain the string
11
c) the set of bit strings that end with 00, the set of bit strings that end with 01, the set of bit
strings that end with 10, and the set of bit strings that end with 11
d) the set of bit strings that end with 111, the set of bit strings that end with 011, and the set of
bit strings that end with 00
e) the set of bit strings that contain 3k ones for some nonnegative integer k ; the set of bit strings
that contain 3k + 1 ones for some nonnegative integer k ; and the set of bit strings that
contain 3k + 2 ones for some nonnegative integer k .
7 / 34
Equivalence relations and countable and uncountable sets Discussion and exercises
Exercises
Exercise
8 / 34
Equivalence relations and countable and uncountable sets Discussion and exercises
Exercises
Exercise
Which of these are partitions of the set of real numbers?
a) the negative real numbers, {0}, the positive real numbers
b) the set of irrational numbers, the set of rational numbers
c) the set of intervals [k , k + 1], k = ..., −2, −1, 0, 1, 2, ...
d) the set of intervals (k , k + 1), k = ..., −2, −1, 0, 1, 2, ...
e) the set of intervals (k , k + 1], k = ..., −2, −1, 0, 1, 2, ...
f) the sets {x + n | n ∈ Z} for all x ∈ [0, 1).
9 / 34
Equivalence relations and countable and uncountable sets Discussion and exercises
Exercises
Exercise
List the ordered pairs in the equivalence relations produced by these
partitions of {a, b, c, d, e, f , g}.
a) {a, b}, {c, d}, {e, f , g}
b) {a}, {b}, {c, d}, {e, f }, {g}
c) {a, b, c, d}, {e, f , g}
d) {a, c, e, g}, {b, d}, {f }
10 / 34
Equivalence relations and countable and uncountable sets Discussion and exercises
Exercises
Exercise
A partition P1 is called a refinement of the partition P2 if every set in P1
is a subset of one of the sets in P2 . Show that the partition formed from
congruence classes modulo 6 is a refinement of the partition formed
from congruence classes modulo 3.
11 / 34
Equivalence relations and countable and uncountable sets Discussion and exercises
Exercises
Exercise
Determine whether each of these sets is finite, countably infinite, or
uncountable. For those that are countably infinite, exhibit a one-to-one
correspondence between the set of positive integers and that set.
a) the negative integers
b) the even integers
c) the real numbers between 0 and 1/2
d) the integers that are multiples of 7.
12 / 34
Equivalence relations and countable and uncountable sets Discussion and exercises
Exercises
Exercise
Show that a subset of a countable set is also countable.
13 / 34
Equivalence relations and countable and uncountable sets Discussion and exercises
Exercises
Exercise
Show that if A and B are sets, A is uncountable, and A ⊆ B, then B is
uncountable.
14 / 34
Finite-state machines Presentation of next topic
Agenda
2 Finite-state machines
Presentation of next topic
15 / 34
Finite-state machines Presentation of next topic
Finite-state machines
16 / 34
Finite-state machines Presentation of next topic
Finite-state machines
16 / 34
Finite-state machines Presentation of next topic
Finite-state machines
16 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Finiteness.
16 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Finiteness.
Discreteness.
16 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Finiteness.
Discreteness.
Sequential action.
16 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Finiteness.
Discreteness.
Sequential action.
Determinism.
16 / 34
Finite-state machines Presentation of next topic
Finite-state machines
17 / 34
Finite-state machines Presentation of next topic
Finite-state machines
17 / 34
Finite-state machines Presentation of next topic
Finite-state machines
17 / 34
Finite-state machines Presentation of next topic
Finite-state machines
17 / 34
Finite-state machines Presentation of next topic
Finite-state machines
17 / 34
Finite-state machines Presentation of next topic
Finite-state machines
17 / 34
Finite-state machines Presentation of next topic
Finite-state machines
17 / 34
Finite-state machines Presentation of next topic
Finite-state machines
17 / 34
Finite-state machines Presentation of next topic
Finite-state machines
18 / 34
Finite-state machines Presentation of next topic
Finite-state machines
18 / 34
Finite-state machines Presentation of next topic
Finite-state machines
18 / 34
Finite-state machines Presentation of next topic
Finite-state machines
18 / 34
Finite-state machines Presentation of next topic
Finite-state machines
18 / 34
Finite-state machines Presentation of next topic
Finite-state machines
18 / 34
Finite-state machines Presentation of next topic
Finite-state machines
The sequence of input symbols is known as the stimulus and the output
sequence of symbols as the response.
19 / 34
Finite-state machines Presentation of next topic
Finite-state machines
The sequence of input symbols is known as the stimulus and the output
sequence of symbols as the response.
Its behavior is determined only by the stimulus.
19 / 34
Finite-state machines Presentation of next topic
Finite-state machines
The sequence of input symbols is known as the stimulus and the output
sequence of symbols as the response.
Its behavior is determined only by the stimulus.
Its behavior takes it through a sequence of states, where each state belongs to a
set of states.
19 / 34
Finite-state machines Presentation of next topic
Finite-state machines
The sequence of input symbols is known as the stimulus and the output
sequence of symbols as the response.
Its behavior is determined only by the stimulus.
Its behavior takes it through a sequence of states, where each state belongs to a
set of states.
It has an initial state which describes the condition of its parts just before
receiving the stimulus.
19 / 34
Finite-state machines Presentation of next topic
Finite-state machines
The sequence of input symbols is known as the stimulus and the output
sequence of symbols as the response.
Its behavior is determined only by the stimulus.
Its behavior takes it through a sequence of states, where each state belongs to a
set of states.
It has an initial state which describes the condition of its parts just before
receiving the stimulus.
The total state of the machine at moment t is the n-tuple
q(t) = (q (1) (t), q (2) (t), ..., q (n) (t)) where n is the number of parts and q (n) (t) is
the state assumed by the ith−part at time t.
19 / 34
Finite-state machines Presentation of next topic
Finite-state machines
20 / 34
Finite-state machines Presentation of next topic
Finite-state machines
20 / 34
Finite-state machines Presentation of next topic
Finite-state machines
20 / 34
Finite-state machines Presentation of next topic
Finite-state machines
20 / 34
Finite-state machines Presentation of next topic
Finite-state machines
20 / 34
Finite-state machines Presentation of next topic
Finite-state machines
21 / 34
Finite-state machines Presentation of next topic
Finite-state machines
22 / 34
Finite-state machines Presentation of next topic
Finite-state machines
22 / 34
Finite-state machines Presentation of next topic
Finite-state machines
23 / 34
Finite-state machines Presentation of next topic
Finite-state machines
23 / 34
Finite-state machines Presentation of next topic
Example
Design a finite-state machine M whose output tells the number of input
symbols, modulo 3, that have been applied.
24 / 34
Finite-state machines Presentation of next topic
Example
Design a finite-state machine M whose output tells the number of input
symbols, modulo 3, that have been applied.
Solution
S = {a}
24 / 34
Finite-state machines Presentation of next topic
Example
Design a finite-state machine M whose output tells the number of input
symbols, modulo 3, that have been applied.
Solution
S = {a}
Q = {A, B, C}
24 / 34
Finite-state machines Presentation of next topic
Example
Design a finite-state machine M whose output tells the number of input
symbols, modulo 3, that have been applied.
Solution
S = {a}
Q = {A, B, C}
R = {0, 1, 2}
24 / 34
Finite-state machines Presentation of next topic
Example
Design a finite-state machine M whose output tells the number of input
symbols, modulo 3, that have been applied.
Solution
S = {a}
Q = {A, B, C}
R = {0, 1, 2}
Let t be the moment at which the last symbol of a stimulus ω is
presented to M. Then the state q(t) will interpreted as follows:
24 / 34
Finite-state machines Presentation of next topic
Example
Design a finite-state machine M whose output tells the number of input
symbols, modulo 3, that have been applied.
Solution
S = {a}
Q = {A, B, C}
R = {0, 1, 2}
Let t be the moment at which the last symbol of a stimulus ω is
presented to M. Then the state q(t) will interpreted as follows:
q(t) = A means |ω| mod 3 = 0
24 / 34
Finite-state machines Presentation of next topic
Example
Design a finite-state machine M whose output tells the number of input
symbols, modulo 3, that have been applied.
Solution
S = {a}
Q = {A, B, C}
R = {0, 1, 2}
Let t be the moment at which the last symbol of a stimulus ω is
presented to M. Then the state q(t) will interpreted as follows:
q(t) = A means |ω| mod 3 = 0
B means |ω| mod 3 = 1
24 / 34
Finite-state machines Presentation of next topic
Example
Design a finite-state machine M whose output tells the number of input
symbols, modulo 3, that have been applied.
Solution
S = {a}
Q = {A, B, C}
R = {0, 1, 2}
Let t be the moment at which the last symbol of a stimulus ω is
presented to M. Then the state q(t) will interpreted as follows:
q(t) = A means |ω| mod 3 = 0
B means |ω| mod 3 = 1
C means |ω| mod 3 = 2
24 / 34
Finite-state machines Presentation of next topic
Solution
State table State diagram
25 / 34
Finite-state machines Presentation of next topic
Finite-state machines
26 / 34
Finite-state machines Presentation of next topic
Finite-state machines
26 / 34
Finite-state machines Presentation of next topic
Finite-state machines
27 / 34
Finite-state machines Presentation of next topic
Finite-state machines
27 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Example
Design a finite-state machine M that accepts a bit string if and only if it begins with a 1
and contains exactly one 0
28 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Example
Design a finite-state machine M that accepts a bit string if and only if it begins with a 1
and contains exactly one 0
Solution
S = {s | s is a bit string }
28 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Example
Design a finite-state machine M that accepts a bit string if and only if it begins with a 1
and contains exactly one 0
Solution
S = {s | s is a bit string }
Q = {A, B, C, D}
28 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Example
Design a finite-state machine M that accepts a bit string if and only if it begins with a 1
and contains exactly one 0
Solution
S = {s | s is a bit string }
Q = {A, B, C, D}
R = {0, 1}
28 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Solution
29 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Machine complexity
It is interesting to understand the relationship between the number of
states of a machine M and its number of physical components.
Suppose that M is built of n parts, each of which can assume either of
two states.
30 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Machine complexity
It is interesting to understand the relationship between the number of
states of a machine M and its number of physical components.
Suppose that M is built of n parts, each of which can assume either of
two states. Then each total state of M is an n−tuple
q = (q (1) , q (2) , ..., q (n) ) in which q (i) represents the state of the ith-part.
30 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Machine complexity
It is interesting to understand the relationship between the number of
states of a machine M and its number of physical components.
Suppose that M is built of n parts, each of which can assume either of
two states. Then each total state of M is an n−tuple
q = (q (1) , q (2) , ..., q (n) ) in which q (i) represents the state of the ith-part.
The number of total states is 2n .
30 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Machine complexity
It is interesting to understand the relationship between the number of
states of a machine M and its number of physical components.
Suppose that M is built of n parts, each of which can assume either of
two states. Then each total state of M is an n−tuple
q = (q (1) , q (2) , ..., q (n) ) in which q (i) represents the state of the ith-part.
The number of total states is 2n . Therefore, (number of parts) ∼ log2
(number of states).
30 / 34
Finite-state machines Presentation of next topic
Finite-state machines
State sequences
31 / 34
Finite-state machines Presentation of next topic
Finite-state machines
State sequences
Definition
s
Si f (q, s) = q 0 , we say that q 0 is the s−successor of state q and write q −→ q 0 .
31 / 34
Finite-state machines Presentation of next topic
Finite-state machines
State sequences
Definition
s
Si f (q, s) = q 0 , we say that q 0 is the s−successor of state q and write q −→ q 0 .
Definition
If a string of input symbols ω = s(1)s(2)...s(t) takes M from state q = q(0) to state
q 0 = q(t),
31 / 34
Finite-state machines Presentation of next topic
Finite-state machines
State sequences
Definition
s
Si f (q, s) = q 0 , we say that q 0 is the s−successor of state q and write q −→ q 0 .
Definition
If a string of input symbols ω = s(1)s(2)...s(t) takes M from state q = q(0) to state
s(1) s(2) s(t)
q 0 = q(t), that is, if q(0) −→ q(1) −→ ... −→ q(t)
31 / 34
Finite-state machines Presentation of next topic
Finite-state machines
State sequences
Definition
s
Si f (q, s) = q 0 , we say that q 0 is the s−successor of state q and write q −→ q 0 .
Definition
If a string of input symbols ω = s(1)s(2)...s(t) takes M from state q = q(0) to state
s(1) s(2) s(t)
q 0 = q(t), that is, if q(0) −→ q(1) −→ ... −→ q(t) we say that state q 0 is the
ω
ω−successor of state q and write q =⇒ q 0 .
31 / 34
Finite-state machines Presentation of next topic
Finite-state machines
State sequences
Definition
s
Si f (q, s) = q 0 , we say that q 0 is the s−successor of state q and write q −→ q 0 .
Definition
If a string of input symbols ω = s(1)s(2)...s(t) takes M from state q = q(0) to state
s(1) s(2) s(t)
q 0 = q(t), that is, if q(0) −→ q(1) −→ ... −→ q(t) we say that state q 0 is the
ω
ω−successor of state q and write q =⇒ q 0 . Under these conditions q(0)q(1)...q(t) is
called an admissible state sequence for ω.
31 / 34
Finite-state machines Presentation of next topic
Finite-state machines
State sequences
32 / 34
Finite-state machines Presentation of next topic
Finite-state machines
State sequences
32 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Automata equivalence
33 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Automata equivalence
Definition
Two automata M1 and M2 are equivalent if and only if
33 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Automata equivalence
Definition
Two automata M1 and M2 are equivalent if and only if
1 Their input and output alphabets are the same: S1 = S2 , R1 = R2
33 / 34
Finite-state machines Presentation of next topic
Finite-state machines
Automata equivalence
Definition
Two automata M1 and M2 are equivalent if and only if
1 Their input and output alphabets are the same: S1 = S2 , R1 = R2
2 For each stimulus, M1 y M2 produce identical responses. That is, if
s1 (t) = s2 (t), t ≥ 1, then r1 (t) = r2 (t), t ≥ 1.
33 / 34
Finite-state machines Presentation of next topic
Next class
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
11T MHIA017-Rosen-v5.cls May 13, 2011 10:24
2.5 Cardinality of Se
1 2 3 4 5 ...
1 1 1 1 1
Terms not circled
are not listed 1 2 3 4 5 ...
2 2 2 2 2
because they
repeat previously
listed terms
1 2 3 4 5 ...
3 3 3 3 3
1 2 3 4 5 ...
4 4 4 4 4
1 2 3 4 5 ...
5 5 5 5 5
...
...
...
...
FIGURE 3 ...
The Positive Rational Numbers Are Countable.
arrange the positive rational numbers by listing those with denominator q = 1 in the fir
those with denominator q = 2 in the second row, and so on, as displayed in Figure 3.
The key to listing the rational numbers in a sequence is to first list the positive r
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
34 / 34
Finite-state machines Presentation of next topic
We will represent the decimal parts of these numbers in the following way:
34 / 34
candidate for an uncountable set? The first place we might look is the
Finite-state machines
Presentation of next topic
Example 5 we use an important proof method, introduced in 1879 by G
as the Cantor diagonalization argument, to prove that the set of real n
Cantor diagonalization argument
This proof method is used extensively in mathematical logic and in the
EXAMPLE 5 Show that the set of real numbers is an uncountable set.
34 / 34
candidate for an uncountable set? The first place we might look is the
Finite-state machines
Presentation of next topic
Example 5 we use an important proof method, introduced in 1879 by G
as the Cantor diagonalization argument, to prove that the set of real n
Cantor diagonalization argument
This proof method is used extensively in mathematical logic and in the
EXAMPLE 5 Show that the set of real numbers is an uncountable set.
34 / 34
Finite-state machines Presentation of next topic
Now we form a new real number with a decimal expression 0, d1 d2 d3 d4 ... where the
decimals are determined by the following formula:
34 / 34
Finite-state machines Presentation of next topic
Exercises
Exercise
Show that the union of a countable number of countable sets is
countable.
34 / 34
Finite-state machines Presentation of next topic
Exercises
Exercise
Show that the set of all finite bit strings is countable.
34 / 34