final exam review
play

Final Exam Review Andrew Speers April 6, 2011 NATS 1930 The - PowerPoint PPT Presentation

Final Exam Review Andrew Speers April 6, 2011 NATS 1930 The Science of Computation Week 19 - Analysis of Algorithms and Complexity Computational complexity: attempts to define/bound the worst-case run/computation times of an algorithm


  1. Final Exam Review Andrew Speers April 6, 2011 NATS 1930 The Science of Computation

  2. Week 19 - Analysis of Algorithms and Complexity Computational complexity: attempts to define/bound the worst-case run/computation times of an algorithm Computationally intractable: algorithms exist to solve the problem but can take extremely long amounts of time to solve NATS 1930 The Science of Computation

  3. Week 19 - Analysis of Algorithms and Complexity Big-Oh notation: specify the growth rate in computation time in terms of input size (n) Linear search = O(n) - search through a list from beginning to end, worst case look at every item once Binary search = O(logn) - every item looked at cuts the possible items to search in half, items must already be sorted NATS 1930 The Science of Computation

  4. Week 20 - Building Intelligent Machines. Chess Jeopardy (Watson) Hexapawn Graphical algorithm to prune acceptable moves Guess the animal (20 Questions) Tree representation, approach to search and add new animals to the program NATS 1930 The Science of Computation

  5. Week 22 - Complexity and Fundamental Limits. Growth rates: constant < logarithmic < linear < polynomial < exponential (for large enough input size) Moore’s law: number of transistors and resistors on a chip doubles every 24 months (i.e. processor speed doubles) Singularity: once machines surpass humans (at building machines) there will be a sudden surge to superintelligence P vs. NP NATS 1930 The Science of Computation

  6. Week 23 - Parallelism, Networks and the World-Wide Web. Flynn’s taxonomy: SISD, SIMD, MISD, MIMD (today’s typical computer) Amdahl’s law: small portion of program that cannot be parallelized (limit the speed-up to some upper bound no matter how many processors you have) Synchronization, race conditions, deadlock and livelock (hint: apply them to the Dining Philosophers problem) Distributed computing: share computational resources over some network medium (cloud computing, internet, etc) NATS 1930 The Science of Computation

  7. Week 24 - Planning, Searching and Robots. Bug Algorithms Bug-0 Algorithm (won’t always work) (1) Head toward the goal (2) Follow the obstacle’s boundary (toward the left) until heading toward the goal is possible again (3) Continue toward the goal NATS 1930 The Science of Computation

  8. Week 24 - Planning, Searching and Robots. Bug-1 Algorithm (1) Head toward the goal (2) If contact is made with an obstacle then circumnavigate it, remember the closest point Li to the goal, and return to this point by the shortest wall- following path (3) Continue toward the goal NATS 1930 The Science of Computation

  9. Week 24 - Planning, Searching and Robots. Bug-2 Algorithm (1) Head toward the goal along the goal-line (2) If an obstacle is in the way, follow it until you encounter the goal-line again and closer to the goal (3) Leave the obstacle and continue toward the goal NATS 1930 The Science of Computation

  10. Week 24 - Planning, Searching and Robots. Roadmap Algorithms Graph-based methods Visibility graph (VG) vs probabilistic roadmap (PRM) NATS 1930 The Science of Computation

  11. Week 25 - Multiple Robots. Problems with multiple robots Coordination: how do you coordinate teams of multiple robots Planning: how do you distribute plans among multiple robots Sensing: how do you distribute sensing among multiple robots NATS 1930 The Science of Computation

  12. Week 25 - Multiple Robots. Issues with communication between robots/nodes. Communications not guaranteed. Flocking Leaders in swarms Planning: centralized vs. decentralized NATS 1930 The Science of Computation

  13. Week 26 - Special topics in robotics. Locomotion, Sensing, Communication & Control, Reasoning Aquatic: AUV, ASV Most of our labs research Underwater many things become more difficult Land, Space, Military, etc Sensing application: SLAM NATS 1930 The Science of Computation

  14. Labs NATS 1930 The Science of Computation 14

  15. Lab 2 - DFA’s, NFA’s and Mealy Machines NATS 1930 The Science of Computation

  16. Lab 3 - Eliza. Eliza programs attempt to carry on realistic conversations but typically will fall into repeatable patterns which give them away as computers Use regular expressions to program responses NATS 1930 The Science of Computation

  17. Lab 3 - Eliza. * more than one word ? one word exactly word numbering for responses start at 0 (e.g. matching “i like *” with response “why do you like 2” results in replacing the 2 in the response with whatever word(s) were matched by the * in the input) pronoun map makes responses sound like they are not just a regurgitation (e.g. from before “i like you” could respond in “why do you like me” if the pronoun map exchanged you for me regular expressions higher up the match list get matched first (unless they match the exact same expression then they are randomly selected) NATS 1930 The Science of Computation

  18. Lab 4 - Turing Machines. NATS 1930 The Science of Computation

  19. Lab 6 - Logical Structures. if . . . else . . . while . . . NATS 1930 The Science of Computation

  20. Lab 7 - Linear vs. Binary Search. Understand different search patterns/rules Binary search is faster but needs sorted input O(n) vs. O(logn) NATS 1930 The Science of Computation

  21. Lab 8 - Dining Philosophers. A collection of philosophers sit around a circular table. Between each philosopher there is a utensil (chopstick). In order to eat the food a philosopher requires two utensils. The problem comes in the fact that there arent enough utensils for everyone to eat at the same time (i.e. they must share). Philosophers either eat or think. After thinking for a bit each philosopher would like to eat. NATS 1930 The Science of Computation

  22. Lab 8 - Dining Philosophers. brings up issues present in modern computer systems in how to deal with shared resources failure modes: deadlock: philosophers try to acquire the resources they need to eat in such a way that the system becomes stuck and cannot become unstuck starvation: some of the philosophers may never get to eat live lock: the system does not get stuck but rather runs through a sequence of states that repeats but is not stuck dead as in dead lock NATS 1930 The Science of Computation

  23. Lab 9 - Animal 20 Questions. understand pattern for search and new-rule insertion understand tree and table structure for the program understand restrictions that a tree places on certain questions/animals given what is above it NATS 1930 The Science of Computation

  24. Lab 9 - Animal 20 Questions. Tabular Description Index Question yes no 0 1 2 3 4 5 6 NATS 1930 The Science of Computation

  25. Lab 10 - Bug Algorithms. Algorithms described earlier Understand limitations of algorithms (when they get stuck) and consequences for using algorithms (Bug 1 more reliable but slower than Bug 0) NATS 1930 The Science of Computation

  26. Questions I’ve been sent NATS 1930 The Science of Computation 26

  27. Halting Problem Explain the Halting Problem . . . Briefly, it’s answering the question “Does a given TM halt when started on a given input?” This problem cannot be solved by any TM NATS 1930 The Science of Computation

  28. Keyword Blasting Undecidability: some problems can’t be solved by any TM (i.e. Halting problem) TM-recognized: a TM recognizes a language consisting of the set of all strings it accepts. if a given language can be recognized by a TM it is called TM- recognized If a TM M always halts on all inputs, M is a decider and it’s language is called a decidable language TM is always a recognizer of some language Conversely, that language is a TM-recognizable language If the TM always halts for inputs it doesn’t accept the TM is a decider as well Conversely, that language is a decidable language NATS 1930 The Science of Computation

  29. Cantor’s Theorem Attempted to show that the number of languages > number of TM’s = size of the set of natural numbers = number of strings over {a,b} => not countably infinite Uses Diagonalization to construct a language that is not TM-recogizable =>size of set of all languages is > size of N => not countably infinite NATS 1930 The Science of Computation

  30. Cantor’s Theorem NATS 1930 The Science of Computation

  31. Universal Turing Machine (U) Given a TM machine code (M) and an input string (w) on the tape of U, the TM can simulate input w on M => thus making it able to “act” like any conceivable TM Simulation take symbol at tape head and copy over next to current state search through M for transition matching current state and scanned symbol update U’s representation of M’s state, scanned symbol and head position on M’s tape repeat until no transition of M applies (M accepts if it halts and current state is q1) NATS 1930 The Science of Computation Some cleanup cases (see notes)

  32. Taxonomy of Computational Models DFA NFA -> DFA with more than one possible transition out of a given state for some input symbol Mealy Machine -> DFA with some output on a state transition Moore Machine -> DFA with some output when entering a state (regardless of a transition) Turing Machine -> Mealy Machine with memory (output describes write action of tape head and movement of tape head) NATS 1930 The Science of Computation

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend