center for embedded networked sensing university of california, los angeles cs4hs workshop

67
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

Upload: tyrone-mooney

Post on 03-Jan-2016

34 views

Category:

Documents


1 download

DESCRIPTION

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). - PowerPoint PPT Presentation

TRANSCRIPT

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

Center for Embedded Networked SensingUniversity of California, Los AngelesCS4HS WorkshopJuly 23, 2009

And kinesthetic computer science activities

Lynn LambertChristopher Newport UniversityNewport News, Virginia

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

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

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

Global projectNew Zealand

SwedenUnited Kingdom

KoreaJapanChinaHaiti

Even USA (CSTA, Peter Denning, Carnegie-Mellon, SIGCSE, AP

Reading, NECC)

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

What is UnpluggedHow to teach important

computer topics without using computers at all!

Have Fun!

www.csunplugged.org

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

Magic Trick

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

Magic

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

Even parityCan detect a bit that was corrupt

ISBN detects adjacent swapped digits or a single incorrect digitX10 = (1x1 + 2x2 + 3x3 + 4x4 + 5x5 + 6x6 + 7x7 + 8x8 + 9x9) mod 11Harry 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

Parity Checking

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

Binary Digits

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

BINARY NUMBERSHAPPY BIRTHDAY, Daniel Radcliffe !

Born July 23, 1989

Daniel Radcliffe turns 20

0 0 1 0 1 0 0

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

Characters in Binary

0010101100

01000

0110001111

HELL O

1 2 3 4

A B C D5

EE6 7 8 9

F G H I10

EJ11 12 13 14

L M N

15

EO16 17 18 19

P Q R S20

ET21 22 23 24

U V W X25

EY

K

26

EZ

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

Characters and Sound Represented in Binary

“ASCII”Modem

1 2 3 4 5 6 7 8 9 10 11 12 13

A B C D E F G H I J K L M14 15 16 17 18 19 20 21 22 23 24 25 26

N O P Q R S T U V W X Y Z

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

Each pixel is a bit

Image Representation(black and white)

1440 * 900 = 1,296,000 pixels/bits

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

Each pixel is a bit00001111111111100 for first rowetc.

Image Representation(black and white)

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

Image CompressionRun Length Encoding

4, 11, 24, 9, 2, 1, 14, 9, 2, 1, 14, 11, 24, 9, 44, 9, 45, 7, 50, 171, 15, 1

Page 14: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop
Page 15: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop
Page 16: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop

Each pixel is a bitStill 1,296,000 pixelsNow, each pixel is

Image Representation(Color)

32 bits

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

Color Images

RGB color 0 0 255 for blue00000000 0000000011111111

Microsoft Office Color

Page 18: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop
Page 19: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop
Page 20: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop
Page 21: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop

204/102/0

204/102/0

226/113/0180/90/0141/105/101

240/240/255 230/206/158 179/102/38

141/105/101232/238/228218/218/200 217/187/63

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

Routing and Deadlock

Orange Game

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

TREASURE HUNT: Finite State Automata (FSA)

FSA are theoretical state modelsUnplugged uses a treasure hunt. Others:

letters to accept particular wordsa metro map for getting to a particular location

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

TREASURE HUNT

What is thequickestroute?

Finite State Automata

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

“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.

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

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.

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

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 TrickSorting Networks Algorithm, Minimal Spanning Trees, Treasure Hunt could have been more challengingDid not use:

Battleships (pretty involved) Lightest and Heaviest (too much equipment)Orange Game (but should have)

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

Have you used Unplugged? How?

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

Sorting and Searching

In the bookBattleship (Searching)Lightest and Heaviest (Sorting)Sorting NetworkYour ideas

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

FIND SHIP # 9264

BATTLESHIPS: Search Method 1

GAME 1: Ships are in random order.

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

BATTLESHIPS

GAME 2: Ships are in increasing order.

FIND SHIP # 5905

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

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

BATTLESHIPS

GAME 3: Ships are ordered into 10 groups based onthe sum of the digits of the ship modulo 10.

FIND SHIP # 9503

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

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

BATTLESHIPS

These three games illustratelinear searchbinary searchhashing

What is the maximum number of guesses required for each of these search techniques for n battleships?

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

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.

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

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.

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

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.

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

Sorting network

<

>Right

Left

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

Sorting and Searching

In the bookBattleship (Searching)Lightest and Heaviest (Sorting)Sorting Network

Your ideas

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

Non CSUnplugged Activities

Andy Begel, Steve Wolfman, Dan Garcia KLA (Kinesthetic Learning Activities), http://ws.cs.ubc.ca/~kla/,

Binary TreeRecursioncons, car, cdr

AP Reading Toy Night with Robert DuvallInternet, Sorting, SearchingAP list, CSTA

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

THE MUDDY CITY

Our society is linked by many networks: telephone, utilities, roadsFor 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.

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

THE MUDDY CITY

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

THE MUDDY CITY

5

2

43 3

2

5 2

3

44

2

4

3

4

4

4

3

3

3

a graph

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

5

2

43 3

2

5 2

3

44

2

4

3

4

4

4

3

3

3

THE MUDDY CITY

a graph

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

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!

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

Peruvian coin toss

Try for a fair coin toss over the phone

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

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.

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

Shannon theory

Twenty questionsGuess a number

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

Shannon theory

Guess a letterGuess a sentenceProbability and information

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

Your Turn

Break up into groups, and answer at least one of the following:

1. What unplugged or unplugged-like activities have you done in your classroom? What worked/didn’t work?

2. Create an activity that you and others can use in a classroom.

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

Example mappings1. What unplugged or unplugged-like activities have you

done in your classroom? What worked/didn’t work?2. Create an activity that you and others can use in a

classroom.

Props you can useCardstwo sides, choice, combinations, permutations

Cups, containers, bucketshidden information, two states, variable, limited contents

Stickers, marker pencommit, label, colour, user input

Chalk on pavement/ tape on floortransitions, paths, target

Board gamepaths, chance, rules

Foodcompetition, humour, colour, sharing, size

StringConnection, communication, length, network

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

Your Turn Reporting

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

Cryptography

Public/Private KeyOne Way Functions

Send Information

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

One way function

Both have the same telephone bookPick a function

Odd/even length of nameName begins with H/T

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

Select name

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

Record phone number

332-6308

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

Presenter guesses: H or T?

332-6308

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

Presenter tries to find name

332-6308

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

Human-Computer Interaction

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

Stop the computer...

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

Stop the computer...

Page 61: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop
Page 62: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop
Page 63: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop
Page 64: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop
Page 65: Center for Embedded Networked Sensing University of California, Los Angeles CS4HS Workshop

HCI

Works sheetsAffordances for doorsLayout of ovens

Dumb interfacesSystem is machine plus user

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

CS Unplugged wants your ideas:Designing an activity

What are the key elements?e.g. bits, states, compare, relationships

What games/puzzles/toys use similar elements?Turn it into a challenge

To find (best) solutionCompare speed (of groups or methods)Team?Impediments?

EvaluateSimplicity, engagement, cost, novelty

RefineShow to lots of kids/teachers/profsPublish

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

Questions?