Download
computation n.
Skip this Video
Loading SlideShow in 5 Seconds..
Computation PowerPoint Presentation
Download Presentation
Computation

Computation

210 Views Download Presentation
Download Presentation

Computation

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Computation

  2. Binary Numbers • Decimal numbers • Binary numbers 905 1110001001

  3. Counting in Binary http://www.youtube.com/watch?v=zELAfmp3fXY

  4. Binary Numbers http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/nav2tool.html

  5. Text Computers have revolutionized our world. They have changed the course of our daily lives, the way we do science, the way we entertain ourselves, the way that business is conducted, and the way we protect our security.

  6. Text Computers have revolutionized our world. They have changed the course of our daily lives, the way we do science, the way we entertain ourselves, the way that business is conducted, and the way we protect our security. Les ordinateurs ont révolutionné notre monde. Ils ont changé le cours de notre vie quotidienne, notre façon de faire la science, la façon dont nous nous divertissons, la façon dont les affaires sont menées, et la façon dont nous protégeons notre sécurité.

  7. Text Computers have revolutionized our world. They have changed the course of our daily lives, the way we do science, the way we entertain ourselves, the way that business is conducted, and the way we protect our security. Les ordinateurs ont révolutionné notre monde. Ils ont changé le cours de notre vie quotidienne, notre façon de faire la science, la façon dont nous nous divertissons, la façon dont les affaires sont menées, et la façon dont nous protégeons notre sécurité. 計算機已經徹底改變我們的世界。當然,他們已經改變了我們的日常生活中,我們這樣做科研,我們自娛自樂的方式,經營的方式進行的方式,以及我們保護我們的安全。

  8. Representing Text • Decide how many characters we need to represent. • Determine the required number of bits. • Ascii: 7 bits. Can encode 27 = 128 different symbols.

  9. Ascii http://www.krisl.net/cgi-bin/ascbin.pl

  10. Representing Text F o u r 01000110 01101111 01110101 01110010

  11. Representing Text T h e n u m b e r i s 1 7 . 54 68 65 20 6E 75 6D 62 65 72 20 69 73 20 31 37 2E

  12. When We Need More Characters What about things like: 简体字

  13. When We Need More Characters What about things like: 简体字 Answer: Unicode: 32 bits. Over 4 million characters. http://www.unicode.org/charts/ A conversion applet: http://www.pinyin.info/tools/converter/chars2uninumbers.html

  14. But What Do Symbols Look Like? Computers have revolutionized our world. Computers have revolutionized our world. Computers have revolutionized our world. Computers have revolutionized our world. Computers have revolutionized our world.

  15. The Basic Idea results = google(text, query)

  16. The Basic Idea results = google(text, query) if word_count(text) > 5000: return(“Done!!”) else: return(“No sleep yet.”)

  17. The Basic Idea results = google(text, query) if word_count(text) > 5000: return(“Done!!”) else: return(“No sleep yet.” display = render(text, font)

  18. The Basic Idea Computers have revolutionized our world.

  19. Digital Images

  20. Pixels

  21. Pixels Now we must turn this 2-dimensional bit matrix into a string of bits.

  22. Pixels 0000110000 0001111000 0011111100 0111111110 0111111110 0111111110 0111001110 0111001110 0111001110 0111001110

  23. Digital Images

  24. Two Color Models

  25. RGB The red channel

  26. RGB The green channel

  27. RGB Red Green Blue

  28. Experimenting with RGB http://www.jgiesen.de/ColorTheory/RGBColorApplet/rgbcolorapplet.html

  29. Representing Sounds

  30. Digitizing Sound

  31. Video

  32. Representing Programs public static TreeMap<String, Integer> create() throws IOException public static TreeMap<String, Integer> create() throws IOException { Integer freq; String word; TreeMap<String, Integer> result = new TreeMap<String, Integer>(); JFileChooser c = new JFileChooser(); int retval = c.showOpenDialog(null); if (retval == JFileChooser.APPROVE_OPTION) { Scanner s = new Scanner( c.getSelectedFile()); while( s.hasNext() ) { word = s.next().toLowerCase(); freq = result.get(word); result.put(word, (freq == null ? 1 : freq + 1)); } } return result; } }

  33. Chess Boards Forsythe-Edwards Notation rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 http://en.wikipedia.org/wiki/Forsyth-Edwards_Notation

  34. Molecules It’s just a string: AUGACGGAGCUUCGGAGCUAG

  35. The Roots of Modern Technology 1834 Charles Babbage’s Analytical Engine Ada writes of the engine, “The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform.” The picture is of a model built in the late 1800s by Babbage’s son from Babbage’s drawings.

  36. Using Logic • TaiShanHasTail • SmokyHasTail • PuffyHasTail • ChumpyHasTail • SnowflakeHasTail

  37. Using Logic • TaiShanHasTail • SmokyHasTail • PuffyHasTail • ChumpyHasTail • SnowflakeHasTail

  38. Using Logic • Panda(TaiShan). • Bear(Smoky). • x (Panda(x) Bear(x). • x (Bear(x) HasPart(x, Tail)). • x (Bear(x) Animal(x)). • x (Animal(x) Bear(x)). • x (Animal(x) y (Mother-of(y, x))). • x ((Animal(x) Dead(x)) Alive(x)). Does TaiShan have a tail?

  39. Search Start state Goal state http://www.javaonthebrain.com/java/puzz15/

  40. What is a Heuristic?

  41. What is a Heuristic? The word heuristic comes from the Greek word  (heuriskein), meaning “to discover”, which is also the origin of eureka, derived from Archimedes’ reputed exclamation, heurika (“I have found”), uttered when he had discovered that the volume of water displaced in the bath equals the volume of whatever (him) got put in the water. This could be used as a method for determining the purity of gold.

  42. What is a Heuristic? The word heuristic comes from the Greek word  (heuriskein), meaning “to discover”, which is also the origin of eureka, derived from Archimedes’ reputed exclamation, heurika (“I have found”), uttered when he had discovered that the volume of water displaced in the bath equals the volume of whatever (him) got put in the water. This could be used as a method for determining the purity of gold. A heuristic is a rule that helps us find something.

  43. An Aside on Checking Facts on the Web Who invented the 15-puzzle? Sam Loyd did: (http://www.jimloy.com/puzz/15.htm) Did he or didn’t he: (http://www.archimedes-lab.org/game_slide15/slide15_puzzle.html) No he didn’t: (http://www.cut-the-knot.org/pythagoras/fifteen.shtml)

  44. Breadth-First Search Is this a good idea?

  45. Depth-First Search

  46. More Interesting Problems The 20 legal initial moves

  47. Scalability Solving hard problems requires search in a large space. To play master-level chess requires searching about 8 ply deep. So about 358 or 21012 nodes must be examined.

  48. Growth Rates of Functions

  49. Scalability

  50. Yet This Exists How?