1 / 67

Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop

Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop July 23, 2009. And kinesthetic computer science activities. Lynn Lambert Christopher Newport University Newport News, Virginia. Author: Tim Bell (not pictured: Ian Witten and Mike Fellows).

Download Presentation

Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop July 23, 2009 And kinesthetic computer science activities Lynn Lambert Christopher Newport University Newport News, Virginia

  2. Author: Tim Bell (not pictured: Ian Witten and Mike Fellows)

  3. Global project New Zealand Sweden United Kingdom Korea Japan China Haiti Even USA (CSTA, Peter Denning, Carnegie-Mellon, SIGCSE, AP Reading, NECC)

  4. What is Unplugged How to teach important computer topics without using computers at all! • Have Fun! • www.csunplugged.org

  5. Magic Trick Magic Make a 5x5 grid with colored squares, some with one color, some the other.

  6. Parity Checking • Even parity • Can detect a bit that was corrupt • ISBN detects adjacent swapped digits or a single incorrect digit • X10 = (1x1 + 2x2 + 3x3 + 4x4 + 5x5 + 6x6 + 7x7 + 8x8 + 9x9) mod 11 • Harry Potter and The Deathly Hallows: 0-545-01022-5 • (0*1 + 5*2 + 4*3 + 5*4 + 0*5 + 1*6 + 0*7 + 2*8 + 2*9 ) • (0 + 10 + 12 + 20 + 0 + 6 + 0 + 16 + 18) = 82 • 82 mod 11 = 5

  7. Binary Digits

  8. BINARY NUMBERS Daniel Radcliffe turns 20 HAPPY BIRTHDAY, Daniel Radcliffe ! 0 0 1 0 1 0 0 Born July 23, 1989

  9. Characters in Binary 1 2 3 4 5 E A B C D E 01000 H 6 7 8 9 10 00101 E E F G H I J 01100 L 15 11 12 14 13 01100 L E L M O K N 01111 O 16 17 18 19 20 E Q R S T P 25 23 24 26 22 21 E E U V W X Y Z

  10. “ASCII” Modem Characters and Sound Represented in Binary

  11. Each pixel is a bit Image Representation(black and white) 1440 * 900 = 1,296,000 pixels/bits

  12. Each pixel is a bit 00001111111111100 for first row etc. Image Representation(black and white)

  13. Image CompressionRun Length Encoding 4, 11, 2 4, 9, 2, 1, 1 4, 9, 2, 1, 1 4, 11, 2 4, 9, 4 4, 9, 4 5, 7, 5 0, 17 1, 15, 1

  14. Each pixel is a bit Still 1,296,000 pixels Now, each pixel is Image Representation(Color) 32 bits

  15. Color Images • RGB color 0 0 255 for blue 00000000 00000000 11111111 Microsoft Office Color

  16. 204/102/0 196/198/0 226/113/0 226/113/0 180/90/0 204/102/0 226/113/0 141/105/101 179/102/38 204/102/0 240/240/255 230/206/158 218/218/200 232/238/228 217/187/63 141/105/101

  17. Routing and Deadlock • Orange Game

  18. TREASURE HUNT: Finite State Automata (FSA) • FSA are theoretical state models • Unplugged uses a treasure hunt. • Others: • letters to accept particular words • a metro map for getting to a particular location

  19. TREASURE HUNT What is the quickest route? Finite State Automata

  20. “Yesterday” by The BeatlesL-Z Compression Yesterday love was such an easy game to play Now I need a place to hide away Oh, I believe in yesterday. Why she had to go I don’t know, she wouldn’t say. I said something wrong Now I long for yesterday.

  21. MARCHING ORDERSProgramming Languages • One of the most frustrating things about programming is that computers always obey the instructions to the letter, even if they produce a crazy result.

  22. CS Unplugged in High School (by Scott Fletcher) • Perfect: Binary Numbers, Programming Languages ("first day exercise“).  • Image Representation to introduce computer graphics to the students.  • Text Compression (used a popular song that the kids would recognize) • Used briefly to introduce a topic: Twenty Guesses or the Card Flip Trick • Sorting Networks Algorithm, Minimal Spanning Trees, Treasure Hunt could have been more challenging • Did not use: • Battleships (pretty involved) • Lightest and Heaviest (too much equipment) • Orange Game (but should have)

  23. Have you used Unplugged? How?

  24. Sorting and Searching • In the book • Battleship (Searching) • Lightest and Heaviest (Sorting) • Sorting Network • Your ideas

  25. BATTLESHIPS: Search Method 1 GAME 1: Ships are in random order. FIND SHIP # 9264

  26. BATTLESHIPS GAME 2: Ships are in increasing order. 33 183 730 911 1927 1943 2200 2215 3451 3519 4055 5548 5655 5785 5897 5905 6118 6296 6625 6771 6831 7151 7806 8077 9024 9328 FIND SHIP # 5905

  27. BATTLESHIPS GAME 3: Ships are ordered into 10 groups based onthe sum of the digits of the ship modulo 10. 9308 1478 8417 9434 3121 9503 1114 7019 6519 2469 5105 1524 8112 2000 9050 1265 5711 4200 7153 6028 2385 5832 1917 1990 2502 4135 FIND SHIP # 9503

  28. BATTLESHIPS • These three games illustrate • linear search • binary search • hashing • What is the maximum number of guesses required for each of these search techniques for n battleships?

  29. LIGHTEST & HEAVIEST • Start with a few (6 or 8) containers with different amounts of sand or water inside. Seal tightly. • Children are only allowed to use the scales to compare the relative weights of two containers. • Only two containers can be compared at a time.

  30. LIGHTEST & HEAVIEST:Method 1: Selection Sort • Find the lightest of the containers using the weights they have been given, using only the balance scales. • Now compare that with another, keeping the lighter from the comparison. Repeat until all the objects have been used.

  31. LIGHTEST & HEAVIESTMETHOD 2: Quick Sort • Choose one of the objects at random. • Compare each of the remaining objects with it, and put them in one of two groups. Put those that are lighter on the left of the object in the middle, and those that are heavier on the right (there may be no objects in one of the groups). • Repeat this procedure on each of the groups—that is, use the balance to divide the groups into subgroups. Keep repeating on the remaining groups until no group has more than one object in it. The objects will be in ascending order.

  32. Sorting network < Left > Right

  33. Sorting and Searching • In the book • Battleship (Searching) • Lightest and Heaviest (Sorting) • Sorting Network • Your ideas

  34. Non CSUnplugged Activities • Andy Begel, Steve Wolfman, Dan Garcia KLA (Kinesthetic Learning Activities), http://ws.cs.ubc.ca/~kla/, • Binary Tree • Recursion • cons, car, cdr • AP Reading Toy Night with Robert Duvall • Internet, Sorting, Searching • AP list, CSTA

  35. THE MUDDY CITY • Our society is linked by many networks: telephone, utilities, roads • For a particular network, there is usually some choice about where the links can be placed. • This exercise examines a complete network to determine the links necessary to connect all the components of the network at minimal cost.

  36. THE MUDDY CITY

  37. 5 3 3 3 4 2 5 3 4 4 2 4 4 3 2 3 3 2 4 4 THE MUDDY CITY a graph

  38. 5 3 3 3 4 2 5 3 4 4 2 4 4 3 2 3 3 2 4 4 THE MUDDY CITY a graph

  39. THE MUDDY CITY • This exercise illustrates how to build what we call the “minimal spanning tree”. • A tree does not have any cycles where you can get back to where you were before. • This exercise does not give us the shortest path from one location to another. • But there is another algorithm for that!

  40. Peruvian coin toss • Try for a fair coin toss over the phone

  41. Information Theory • Can you read the following sentence? Ths sntnce hs th vwls mssng. • You probably can, because there is not much "information" in the vowels. • This activity introduces a way of measuring information content.

  42. Shannon theory • Twenty questions • Guess a number

  43. Shannon theory • Guess a letter • Guess a sentence • Probability and information

  44. Your Turn Break up into groups, and answer at least one of the following: • What unplugged or unplugged-like activities have you done in your classroom? What worked/didn’t work? • Create an activity that you and others can use in a classroom.

  45. Example mappings • What unplugged or unplugged-like activities have you done in your classroom? What worked/didn’t work? • Create an activity that you and others can use in a classroom. • Props you can use • Cards • two sides, choice, combinations, permutations • Cups, containers, buckets • hidden information, two states, variable, limited contents • Stickers, marker pen • commit, label, colour, user input • Chalk on pavement/ tape on floor • transitions, paths, target • Board game • paths, chance, rules • Food • competition, humour, colour, sharing, size • String • Connection, communication, length, network

More Related