MISC
Anonymous feedback Homework 1 LaTeX
Tuesday, September 15, 2009
Claim: In any set of n hats, all are the same color. Proof by induction: Base case: If n = 1, all hats are the same color. Inductive case: Assume that the claim holds for all n ! k. Examine any set of n = k+1 hats. Remove one hat from the set; the remaining set has k hats and thus is of a single color. Replace the hat and remove a different hat from the set; the resulting set has k hats and thus is of a single color. The two sets overlap, thus they must be of the same color. Therefore, all k+1 hats are the same color.
Claim: In any set of n hats, all are the same color. Proof by induction: Base case: If n = 1, all hats are the same color. Inductive case: Assume that the claim holds for all n ! k. Examine any set of n = k+1 hats. Remove one hat from the set; the remaining set has k hats and thus is of a single color. Replace the hat and remove a different hat from the set; the resulting set has k hats and thus is of a single color. The two sets overlap, thus they must be of the same color. Therefore, all k+1 hats are the same color.
Deterministic
Finite
Automata
Tuesday, September 15, 2009
An organism or an automaton receives stimuli via its sensory receptor organs, and performs actions via its effector organs. To say that certain actions are a response to certain stimuli means, in the simplest case, that the actions are performed when and only when those stimuli occur... So we ask what kind of events are capable of being represented in the state of an automaton. -- Kleene, Representation of events in nerve nets and nite automata (1956)
1 1 2, 3 1
2 2 3
3 3
1, 2
Elevator Automaton
Tuesday, September 15, 2009
set of states
:QQ
q0 Q
start state
:QQ
q0 Q F Q
1 1 2, 3 1
2 2 3
3 3
1, 2
1 1 2, 3 1
2 2 3
3 3
1, 2
1, 2, 3} Q = {
1 1 2, 3 1
2 2 3
3 3
1, 2
1, 2, 3} Q = {
= {1, 2, 3}
1 1 2, 3 1
2 2 3
3 3
1, 2
= {1, 2, 3} 3} 1 F = { q0 =
1, 2, 3} Q = {
1 1 2, 3 1
2 2 3
3 3
1, 2
States
1 2 3
1 1 1 2
2 2 2 2
3 2 3 3
Inputs
0, 1 A 0, 1 B
0, 1 A 0, 1 B
L = { }
Tuesday, September 15, 2009
0 A 1
0 B 1
0 C 1
0, 1 D
0 A 1
0 B 1
0 C 1
0, 1 D
?
Tuesday, September 15, 2009
0 A 1 0
a) b) c) d)
1 B 1 C 0
0, 1 D
0 A 1 0 B 1
1 C 0
0, 1 D
0 A 1 0
a) b) c) d)
1 B 1 C 0
0, 1 D
0 A 1 0
a) b) c) d)
1 B 1 C 0
0, 1 D
0 A 1 0
a) b) c) d)
1 B 1 C 0
0, 1 D
0 A 1 0
a) b) c) d)
1 B 1 C 0
0, 1 D
A 1 C
0 0, 1 0, 1
1 A 0 C 0, 1
L = {w | w = or every odd position of w is a 1}
Tuesday, September 15, 2009
0, 1
?
Tuesday, September 15, 2009
1 0
B 0
1 0 E
1 0, 1
0, 1
Denition
1. A language L is regular if some DFA recognizes it. 2. The language L(A) recognized by a DFA A is regular.
Tuesday, September 15, 2009
L3 = L1 L2
Tuesday, September 15, 2009
A1 1 C1
A2 0 C2 0, 1
Tuesday, September 15, 2009
0 0, 1
B1
L1 = {w | |w| is odd and begins with 0 or is even and begins with 1 } 0, 1
1 0, 1 B2
L3 = L1 L2
Q = {(r1 , r2 ) | r1 Q1 and r2 Q2 }
Q = {(r1 , r2 ) | r1 Q1 and r2 Q2 }
= 1 2
= 1 2
= 1 2
= 1 2
A1 1 C1
0 0, 1 0, 1
B1
1 A2 0 C2 0, 1 0, 1 B2
A1 A2 0 B1 A2 0, 1 C1 B2
Tuesday, September 15, 2009
1 1 0
B1 C2 0, 1 0, 1
C1 C2
?
Tuesday, September 15, 2009
WHAT
AUTOMATON RECOGNIZES
L = {w | w = }
?
Tuesday, September 15, 2009