preface magic in the stone
play

Preface: Magic in the Stone CS105: Great Insights in Computer - PowerPoint PPT Presentation

Preface: Magic in the Stone CS105: Great Insights in Computer Science Welcome! John Robert Yaros (Bobby) yaros@cs.rutgers.edu Office: Hill Center 410 Office hours by appointment Welcome!


  1. Preface: Magic in the Stone CS105: Great Insights in Computer Science

  2. Welcome! • John Robert Yaros (“Bobby”) • yaros@cs.rutgers.edu • Office: Hill Center 410 • Office hours by appointment

  3. Welcome! • http://paul.rutgers.edu/~yaros/cs105/f11 • no credit toward a CS major! • TAs: - Vignesh Radhakrishnan - Jing Zhang

  4. Course Goals • Cool facts, cool ideas behind everyday interactions with computers. • Separate computer science from computers “Computer Science is no more about computers than astronomy is about telescopes” -Edsger Dijkstra

  5. Introduction to CS101s • What do I need to know about computing technology? - In General: CS110 – Introduction to Computers and Their Application - For Engineers/Scientists : CS107 – Computing for Math and Sciences - For Business: CS170 – Computer Application for Business

  6. Introduction to CS101s • I want to be a computer scientist, I think I will be programming in my career, or I plan on computer science as my major. - CS111 – Introduction to Computer Science

  7. Introduction to CS101s • What impact have computers had on the world? - CS 405 – Seminar in Computers and Society • What are the insights that make computer science its own academic discipline? - CS 105 – Great Insights in Computer Science

  8. Course Goals: Questions • What is Computer Science? • Why is it fun/interesting? • How is it different from software engineering? • What are the insights that make computer science its own academic discipline?

  9. Survey Answers • Good Expectations: - “I expect to learn a bit about the history/fundaments of how computers work (processor architecture?) and spend a lot of time learning about some of the theory behind certain programs - why they are the way they are - and design a few basic programs.”

  10. Survey Answers • Unfulfilled Expectations: - “I would like to understand more about Microsoft office applications (excel, word, etc) and some insight for MatLab and SPSS” - “I hope to learn Java.”

  11. Warnings • This class will be “mathy” • You must be Proactive - There are resources for help. Use them.

  12. Textbook • Not a typical textbook • Not too daunting or detailed • Course follows book order • More examples and details will be added in class

  13. Clickers • Available at several • we’ll use the sub bookstores. frequency DB • Can keep them (most • for answering questions, popular clicker at Rutgers) set it to DB or sell them back. • We’ll use them for attendance, reading comprehension quizzes, straw polls. http://www.iclicker.com/

  14. Classes • Mostly lecture. • Clicker Questions. - previous lectures - current lecture • Demos/videos. • Programming in Scratch. • CS105’s got talent!

  15. Other Resources • Lecture slides/audio. • Office hours. • Scratch: http://scratch.mit.edu/ • Programs for out-of-class interaction • Music Videos

  16. Grading • 25%: Class participation • 25%: Homework • 25%: Midterm (in class) • 25%: Final

  17. Class Participation • Each lecture, roughly 5 multiple choice questions, you can answer by using your iClicker. • For each lecture, questions are worth 10 points total, 8 out of 10 if you get them all wrong, 10 out of 10 if you get them all right • May also download lecture audio and use Sakai. • If you answer on Sakai, all wrong becomes 0 points and all right becomes 7 points out of 10 • This should encourage you to come to lecture

  18. Class Participation • Clicking for other students is not permitted • Attendance may be called at a random time during the semester and anyone who has clicked but is not present in class will lose all participation points throughout the semester up to that day.

  19. Homework • On Sakai, under “Tests and Quizzes” • Very similar to clicker questions • Some homeworks will have programming assignments • You will have 1-2 weeks to work on them • Lowest grade will be dropped

  20. Exams • Midterm exam (mid-October) - in class • Final exam, 3 hours. - Noon – 3 PM, Dec 23 rd • Exam questions are modeled after homework questions.

  21. My Goal Today • I would like to give you a feel about what this class is about • Expectations?

  22. Syllabus Preface: Magic in the Stone What does the title mean? Chapter 1: Nuts and Bolts From physics to bits. Chapter 2: Universal Building Blocks From logic gates to a computer.

  23. Syllabus Chapter 3: Programming Giving the computer instructions. Chapter 4: How Universal Are Turing Machines? How many kinds of computation are there? Chapter 5: Algorithms and Heuristics Solving some (hard?) problems.

  24. Syllabus Chapter 6: Memory: Information and Secret Codes Bits as messages. Chapter 7: Speed: Parallel Computers Computers working together.

  25. Syllabus Chapter 8: Computers That Learn and Adapt Can computers exceed their programming? Chapter 9: Beyond Engineering Programs that evolve.

  26. They Are Everywhere! 1977: “There is no reason for any individual to have a computer in his home.” – Ken Olsen Today: Cell phone? PDA? Computers at home? Laptop? Video games? Digital camera?

  27. Previously Unthinkable

  28. Life After Death

  29. One-Word Summary • If I had to summarize the intellectual contribution of computer science in one word, it would be “ reduction ”. • Computer scientists solve problems by reducing them to simpler problems.

  30. Levels of Complexity • Computing : • Networking (OSI application, high-level Layers): application, language, machine presentation, session, language, logic blocks, transport, network, logic gates, physical. data link, physical. • Storage hierarchy : • Vision (Marr): offline-storage, hard computational, disk, RAM, cache, algorithmic, registers. implementation.

  31. Bar Codes • See http://en.wikipedia.org/wiki/Barcode . • Many different styles of barcodes. • Most common is UPC-A, in use in most North American retail stores. • I will describe the UPC encoding. • Many of the same ideas apply to other codes: checks, photostamps, IR remotes

  32. Universal Product Codes • First scanned product, Wrigley’s gum (1974). • Method of identifying products at point of sale by 12-digit numbers. • Method of encoding digit sequences so they can be read quickly and easily by machine.

  33. Why Do We Need Them? • Imagine you were a cashier...

  34. Why Do We Need Them? • Imagine you were a cashier... • store with 5 things

  35. Why Do We Need Them? • Imagine you were a cashier... • 100 things

  36. Why Do We Need Them? • Imagine you were a cashier... • 1500 things?

  37. Reduction Idea • Each level uses an encoding to translate to the next level. - Patterns of ink. - Sequence of 95 zeros and ones (“bits”). - Sequence of 12 digits. - Sequence of 11 digits. - Name/type/manufacturer of product.

  38. Product Name • Ponds Dry Skin Cream - 3.9 oz (110g) - Unilever Home and Personal Care USA • Name Badge Labels ( Size 2 3/16" x 3 3/8") - 100 Labels - Avery Dennison/Avery Division

  39. Encode Name By 11 Digits • First digit, product category: - 0 , 1 , 6 , 7 , 8 , or 9 : most products - 2 : store’s use, for variable-weight items - 3 : drugs by National Drug Code number • For most products - Next 5 digits: Manufacturer - Last 5 digits: Manufacturer-assigned product ID

  40. Examples • Ponds: 3-05210-04300 - 3 = drug code - 05210 = Unilever - 04300 = National Drug Code for this product • Badge Labels: 0-72782-05144 - 0 = general product - 72782 = Avery - 05144 = Avery’s code for this product

  41. 12-Digit Number • The UPC folks decided to include another digit for error checking. Example: - 01660000070 Roses Lime Juice (12 oz) - 04660000070 Eckrich Franks, Jumbo (16 oz) - 05660000070 Reese PB/Choc Egg (34 g) - 08660000070 Bumble Bee Salmon (14.75 OZ) • Misread digit #2 and you turn sweet to sour.

  42. Check Digit 1. Add the digits in the odd-numbered positions (first, third, fifth, etc.) together and multiply by three. 2. Add the digits in the even-numbered positions (second, fourth, sixth, etc.) to the result. 3. Subtract the result from the next-higher multiple of ten. The result is the check digit.

  43. Code and Example set evensum to d2+d4+d6+d8+d10 set oddsum to d1+d3+d5+d7+d9+d11 set checkdigit to (0-(3*oddsum+evensum)) mod 10 01660000070 01660000070 odd-digit sum: 0+6+0+0+0+0=6 even-digit sum: 1+6+0+0+7=14 odd*3+even = 6*3+14=32 subtract from mult of 10=40-32=8 • Lime juice: 01660000070→01660000070 8 all are two • Franks: 04660000070→04660000070 5 digits different • Choc Egg: 05660000070→05660000070 4 now • Salmon: 08660000070→08660000070 1

  44. Some (Mod) Math • 3 x S odd + S even = 0 mod 10 • The sum of the odd-position digits (times 3) plus the sum of the even position digits (including the check digit) is 0 mod 10. • Modulo math is just like regular math, except things wrap around (like an odometer). Mod 10 means we only pay attention to the last digit in the number. • Divide by 10 and only keep the remainder.

Recommend


More recommend