A Little More on
Streaming Algorithms
Streaming Algorithms
01011101
Streaming algorithms differ from
DFAs in several significant ways:
1. Streaming algorithms can output
more than one bit
2. The memory or space of a
streaming algorithm can (slowly)
increa
1/22/2013
CS 154
Finite Automata vs
Regular Expressions,
Non-Regular Languages
Regular Languages are closed
under all of the following operations:
Union: A B = cfw_ w | w A or w B
Intersection: A B = cfw_ w | w A and w B
Complement: A = cfw_ w * | w A
1/16/2013
CS154
Minimizing DFAs
and the Myhill-Nerode Theorem
Does this DFA have a
minimal number of states?
NO
0
1
1
1
1
0
0
0
1
1/16/2013
Is this minimal?
0
1
1
0
0
1
1
0
0
1
1
1
1
0
0
0
2
1/16/2013
Theorem
For every regular language L, there is a
uniqu
1/23/2013
CS154
The Myhill-Nerode Theorem
and Streaming Algorithms
CS154
Please
(Take cs154) XOR (Take another class at the same time)
1
1/23/2013
Theorem
For every regular language L, there is a
unique (up to re-labeling of the states)
minimal-state DFA
1/9/2013
CS 154
Nondeterminism,
Finite Automata,
Regular Expressions
Read string left to right
0
0
1
0111
11
1
111
1
The DFA accepts a string if the process
ends in a double circle
1
1/9/2013
A DFA is a 5-tuple M = (Q, , , q0, F)
Q is the set of states (f
1/7/2013
CS 154
Introduction to Automata and
Complexity Theory
http:/stanford.edu/~rrwill/cs154-2013/
INSTRUCTORS & TAs
Ryan Williams
Kevin Lewi
Lilian Tran
1
1/7/2013
Grades
Homework
Final
Midterm
Homework
Homework will be assigned every Wednesday
(excep
Over- and Underapproximations in
Program Analysis
Profs. Aiken, Barrett & Dill
CS357
Lecture 17
1
A Possible Problem
f(a) cfw_
x = unknown();
if (x = 0)
Value of x is unknown
but predicates involving x will accumulate
Profs. Aiken, Barrett & Dill
Lect
Data-Driven Techniques
for
Invariant Inference
Profs. Aiken, Barrett & Dill
CS 357
Lecture 18
1
Invariant Inference
An old problem
A different approach with two ideas:
1. Separate invariant inference from the rest of the
verification problem
Profs. Aike
Context Sensitivity
Lecture 19
Profs. Aiken< Barrett & Dill CS 357
Lecture 19
1
Monomorphic Analysis
f(x) = x
g() = f(1)
h() = f(2)
What will a monomorphic analysis report about
the possible return values of g and h?
Profs. Aiken< Barrett & Dill CS 357
Le
Invariants
Simplest and (by far) most common verification
problem is to prove an invariant property (AG
property).
Start with concrete state graph
CS357 : Abstraction, and CounterExample Guided
Abstraction/Refinement (CEGAR)
I(x) x is an initial state.