MELJUN CORTES Automata Theory (Automata20)

  • 59 views
Uploaded on

MELJUN CORTES Automata Theory (Automata20)

MELJUN CORTES Automata Theory (Automata20)

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
59
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. MELJUN P. CORTES, MBA,MPA,BSCS,ACS CSC 3130: Automata theory and formal languages Efficient computation MELJUN CORTES
  • 2. Why do we care about undecidability? TM M a ut w ccepts a ll inputs ts inp FG G is ambiguous C ccep Ma TM blem ondence Pro Post Corresp tA undecidable decidable m poin o u get fr steps? Can yo 00 t B in 1 to poin L = {0n1n: n > 0} final exams ule n you sched Ca cts? am? re no confli ea Is P a valid java progr so that ther you pair up people Can anything yo ppy? u can write at every pair is ha so th a computer program fo ... pretty much everything else r
  • 3. Decidable problems Is P a valid java program? L = {0n1n: n > 0} Option 1: Try all derivations On input x: n := |x| if n is odd reject for i := 0 to n/2: if xi ≠ 0 or xn-i ≠ 1 reject otherwise accept 6 Can you get from point A to point B in 100 steps? 14 8 A Option 2: CYK algorithm Option 3: LR(1) algorithm 10 9 14 3 9 8 2 3 4 5 5 B For all paths out of point A of length at most 100: Try this path If path reaches B, accept Otherwise, reject
  • 4. Scheduling Can you schedule final exams so that there are no conflicts? CSC 3230 CSC 2110 Say we have n exams, k slots (maybe n = 200, k = 10) Exams → vertices Conflicts → edges Slots → colors CSC 3130 CSC 3160 ... Task: Assign one of k colors to the vertices so that no edge has both endpoints of same color
  • 5. Scheduling algorithm Task: Assign one of k colors to the vertices so that no edge has both endpoints of same color 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 CSC 3230 CSC 2110 CSC 3130 CSC 3160 ...
  • 6. Matching Can you pair up people so that every pair is happy? People → vertices Happy together → edges Pairing → matching For every possible pairing: If each pair is happy, accept If all pairings failed, reject
  • 7. Shades of decidability Sure, we can write a computer program... point A get from teps? u Can yo in 100 s s L = {0n1n: n > 0} to point B le final exam du an you sche ts? ? C at there are no conflic Is P a valid java program so th eople Can you pair up p y? every pair is happ so that ...but what happens when we run it?
  • 8. How fast? Is P a valid java program? L = {0n1n: n > 0} Option 1: Try all derivations On input x: n := |x| if n is odd reject for i := 0 to n/2: if xi ≠ 0 or xn-i ≠ 1 reject otherwise accept 6 Can you get from point A to point B in 100 steps? 14 8 A Option 2: CYK algorithm Option 3: LR(1) algorithm 10 9 14 3 9 8 2 3 4 5 5 B For all paths out of point A of length at most 100: Try this path If path reaches B, accept Otherwise, reject
  • 9. How fast? Is P a valid java program? P = 100 line java program Option 1: Try all derivations the lifetime of the universe efficient? inefficient very Option 2: CYK algorithm 1 week Option 3: LR(1) algorithm a few milliseconds
  • 10. Finding paths 14 8 A 6 10 9 14 3 9 8 Is there a better way to do this? 2 3 5 5 4 B Yes! Dijkstra’s algorithm Can you get from point A to point B in 1000 steps? For all paths out of point A of length at most 1000: Try this path If path reaches B, accept Otherwise, reject Edsger Dijkstra (1930-2002)
  • 11. 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
  • 12. Scheduling algorithm Task: Assign one of k colors to the vertices so that no edge has both endpoints of same color 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 CSC 3230 CSC 3130 CSC 2110 CSC 3160 100 vertices, 10 colors 10100 assignments Can we do better?
  • 13. Some history UNIVAC first electronic computer integrated circuits 1950s
  • 14. The need for optimization routing problems packing problems how to route calls through the phone network? how many trucks do you need to fit all the boxes?
  • 15. The need for optimization 30 min 45 min 50 min 40 min 50 min 0 min scheduling problems constraint satisfaction how do you schedule jobs to complete them as soon as possible? can you satisfy a system of local constraints?
  • 16. Fast algorithms shortest paths matchings 1956 1965 and a few more…
  • 17. Proving theorems 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 Kurt Gödel would like to allow myself to write you about a mathematical problem: […] This would have consequences 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 J. von Neumann replaced by a machine.
  • 18. Proving theorems • We know some true statements are not provable • But let’s 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 don’t know!
  • 19. Optimization versus proofs • If we can find proofs quickly, then we can also optimize quickly! v1 • Question: Can we color G with so there are no conflicts? • Proof: We can, set v1 v2 v2 v3 v4 v3 v4 (v1,R), (v2,Y), (v3,R), (v4,Y)
  • 20. The Cook-Levin Theorem Constraint satisfaction is no harder than finding proofs quickly • However, It is no easier, either Cook 1971, Levin 1973 Stephen Cook Leonid Levin
  • 21. Equivalence of optimization problems constraint routing covering satisfaction scheduling packing theorem-proving are all as hard as one another! Q: So are they all easy or all hard? A: We don’t know, but we suspect all hard Richard Karp (1972)