meljun cortes automata theory 20
TRANSCRIPT
-
8/13/2019 MELJUN CORTES Automata Theory 20
1/21
-
8/13/2019 MELJUN CORTES Automata Theory 20
2/21
Why do we care about undecidability?
decidableundecidable
... pretty much everything else
L= {0n1n: n> 0}
-
8/13/2019 MELJUN CORTES Automata Theory 20
3/21
Decidable problems
L
= {0
n
1
n
:n
> 0}On input x:n:= |x|
if nis odd reject
for i:= 0to n/2:
if xi 0or xn-i 1rejectotherwise accept
IsP
a valid java program?
Can you get from pointA
to point Bin 100steps?
Option 1: Try all derivations
Option 2: CYK algorithm
Option 3: LR(1) algorithm
8
6 10 14
14
3
3
9
8 4
25
5
9A
B
For all paths out of pointA
of length at most 100:Try this pathIf path reaches B, accept
Otherwise, reject
-
8/13/2019 MELJUN CORTES Automata Theory 20
4/21
-
8/13/2019 MELJUN CORTES Automata Theory 20
5/21
Scheduling algorithm
For every possible assignment
of colors to vertices:
Try this assignment
If every edge has endpoints
of different colors, accept
If all colorings failed, reject
Task: Assign one of kcolors to the verticesso that no edge has both endpoints of same color
CSC 3230 CSC 2110
CSC 3160CSC 3130
...
-
8/13/2019 MELJUN CORTES Automata Theory 20
6/21
-
8/13/2019 MELJUN CORTES Automata Theory 20
7/21
Shades of decidability
L= {0n
1n
: n> 0}
Sure, we can writea computer program...
...but what happens when we runit?
-
8/13/2019 MELJUN CORTES Automata Theory 20
8/21
How fast?
L
= {0
n
1
n
:n
> 0}On input x:n:= |x|
if nis odd reject
for i:= 0to n/2:
if xi 0or xn-i 1rejectotherwise accept
Is Pa valid java program?
Can you get from pointA
to point Bin 100steps?
Option 1: Try all derivations
Option 2: CYK algorithm
Option 3: LR(1) algorithm
8
6 10 14
14
3
3
9
8 4
25
5
9
A
B
For all paths out of pointA
of length at most 100:Try this pathIf path reaches B, accept
Otherwise, reject
-
8/13/2019 MELJUN CORTES Automata Theory 20
9/21
How fast?
the lifetime of the universe
P= 100 line java programIs Pa valid java program?
Option 1: Try all derivations
Option 2: CYK algorithm
Option 3: LR(1) algorithm
1week
a few milliseconds
-
8/13/2019 MELJUN CORTES Automata Theory 20
10/21
Finding paths
Can you get from pointA
to point Bin 1000steps?
8
610 14
14
3
3
9
8 4
25
5
9
A
B
For all paths out of pointA
of length at most 1000:
Try this pathIf path reaches B, accept
Otherwise, reject
Is there a better wayto do this?
Yes! Dijkstras algorithm
Edsger Dijkstra(1930-2002)
-
8/13/2019 MELJUN CORTES Automata Theory 20
11/21
Matching
For every possible pairing:If each pair is happy, accept
If all pairings failed, reject
Can we do better?
Yes! Edmonds algorithm
Jack Edmonds
-
8/13/2019 MELJUN CORTES Automata Theory 20
12/21
Scheduling algorithm
For every possible assignment
of colors to vertices:
Try this assignment
If every edge has endpoints
of different colors, accept
If all colorings failed, reject
Task: Assign one of kcolors to the verticesso that no edge has both endpoints of same color
CSC 3230 CSC 2110
CSC 3160CSC 3130
100vertices, 10colors
10100assignmentsCan we do better?
-
8/13/2019 MELJUN CORTES Automata Theory 20
13/21
Some history
first electronic computer
UNIVAC
1950s
integrated circuits
-
8/13/2019 MELJUN CORTES Automata Theory 20
14/21
The need for optimization
routing problems
how to route calls throughthe phone network?
packing problems
how many trucks do youneed to fit all the boxes?
-
8/13/2019 MELJUN CORTES Automata Theory 20
15/21
The need for optimization
scheduling problems
how do you schedule jobsto complete them
as soon as possible?
constraint satisfaction
can you satisfy a systemof local constraints?
30 min
40 min
45 min
50 min
50 min
0 min
-
8/13/2019 MELJUN CORTES Automata Theory 20
16/21
Fast algorithms
shortest
paths1956
matchings
1965and a few more
-
8/13/2019 MELJUN CORTES Automata Theory 20
17/21
Proving theorems
Kurt Gdel
J. von Neumann
Princeton, 20 March 1956
Dear Mr. von Neumann:
With the greatest sorrow I have learned of your
illness. []
Since you now, as I hear, are feeling stronger, I
would like to allow myself to write you about a
mathematical problem: [] This would haveconsequences of the greatest importance. It
would obviously mean that in spite of the
undecidability of the Entscheidungsproblem,the mental work of a mathematician concerning
Yes-or-No questions could be completely
replaced by a machine.
-
8/13/2019 MELJUN CORTES Automata Theory 20
18/21
Proving theorems
We know some true statements are not provable
But lets forget about those.
Can you get a computer to find the
proof reasonably quickly?
Better than try all possible proofs?
52 years later, we still dont know!
-
8/13/2019 MELJUN CORTES Automata Theory 20
19/21
Optimization versus proofs
If we can find proofs quickly, then we can alsooptimize quickly!
Question: Can we color Gwith so there are no
conflicts?
Proof: We can, set
v1 v2
v3 v4
v1 v2 v3 v4
(v1,R), (v2,Y), (v3,R), (v4,Y)
-
8/13/2019 MELJUN CORTES Automata Theory 20
20/21
The Cook-Levin Theorem
However,
Constraint satisfaction is no harder thanfinding proofs quickly
It is no easier, either
Stephen Cook Leonid Levin
Cook 1971, Levin 1973
-
8/13/2019 MELJUN CORTES Automata Theory 20
21/21
Equivalence of optimization problems
constraint
satisfaction
scheduling packing
coveringrouting
are all as hard asone another!
theorem-proving
Richard Karp
Q: So are they all easy or all hard?
A: We dont know, but we suspect
all hard
(1972)