COMPUTING IN CONTEXT
WILLIAM MONGAN
June 29, 2022
1
THINGS WE’LL NEED
A quarter
A deck of cards
A phone book
Printouts from these slides
Strips of paper
Post-it notes (labeled by color) and Poster Board, or the digital Pixel
Pandemonium link
Mail-merged instruction sheets for post-it notes (or a link to a PDF)
2
ESTABLISHING TRUST
“IT IS AN EQUAL FAILING TO TRUST EVERYBODY, AND TO TRUST NOBODY.
ENGLISH PROVERB
“WHO DO I TRUST? ME!”
-TONY MONTANA, SCARFACE
3
HOW DO WE ESTABLISH MUTUAL TRUST ON THE
INTERNET?
Do you trust me? How can you be sure?
4
HOW DO WE ESTABLISH MUTUAL TRUST ON THE
INTERNET?
Do you trust me? How can you be sure?
… Do I trust YOU?
5
HOW DO WE ESTABLISH MUTUAL TRUST ON THE
INTERNET?
Do you trust me? How can you be sure?
… Do I trust YOU?
What happens when you need to trust someone, while also establishing that
they can trust you?
What are some examples of this?
6
HOW DO WE ESTABLISH MUTUAL TRUST ON THE
INTERNET?
Let’s flip a coin: how do you guess correctly when you can’t see me flip the
coin?
7
http://www.garland1965.com/garl
and1965/Photo_album/Memorabili
a/Directories/PhoneFeb52/2009-
06-04_143416_Steve_Rhodes.jpg
8
HOW DO WE ESTABLISH MUTUAL TRUST ON THE
INTERNET?
Let’s flip a coin: how do you guess correctly when you can’t see me flip the
coin?
One-Way Functions:
Give out a phone number corresponding to a name beginning with “H” or “T,”
corresponding to the coin flip.
Take the guess from the other party.
Reveal the name corresponding with that phone number, and allow the other party to
verify the name corresponding to the coin flip result.
9
ERROR CORRECTION
POSITIVE, ADJ.: MISTAKEN AT THE TOP OF ONE’S VOICE.”
- AMBROSE BIERCE, THE UNABRIDGED DEVIL’S DICTIONARY
“BUT THE GAME NEVER ENDS WHEN YOUR WHOLE WORLD DEPENDS ON THE TURN OF A
FRIENDLY CARD”
- THE ALAN PARSONS PROJECT, THE TURN OF A FRIENDLY CARD
10
https://upload.wikimedia.org/wikipedia/commons/5/55/Atlasnye_playing_cards_deck.svg
https://publicdomainvectors.org/en/free-clipart/Grid-red-playing-card-vector-image/9068.html
Deal out a 5x5 grid of cards with a random
pattern of face-up and face-down cards, like
this.
11
Deal out a 5x5 grid of cards with a random
pattern of face-up and face-down cards, like
this.
Now, we add an additional row and column
to the grid…
Then, introduce an “error” into this “binary”
code by flipping a card over (it doesn’t
matter whether the card is face-up or face-
down).
12
Deal out a 5x5 grid of cards with a random
pattern of face-up and face-down cards, like
this.
Now, we add an additional row and column
to the grid…
Then, introduce an “error” into this “binary”
code by flipping a card over (it doesn’t
matter whether the card is face-up or face-
down).
Which card?
13
Deal out a 5x5 grid of cards with a random
pattern of face-up and face-down cards, like
this.
Now, we add an additional row and column
to the grid…
Then, introduce an “error” into this “binary”
code by flipping a card over (it doesn’t
matter whether the card is face-up or face-
down).
Which card?
What was special about the “extra” row and column?
Does this always work?
14
Deal out a 5x5 grid of cards with a random
pattern of face-up and face-down cards, like
this.
Now, we add an additional row and column
to the grid…
Then, introduce an “error” into this “binary”
code by flipping a card over (it doesn’t
matter whether the card is face-up or face-
down).
Which card?
What was special about the “extra” row and column?
Parity: The number of face up cards is always a multiple of 2
Does this always work?
If you flip multiple cards in the same row, you might miss it
15
TAKE OUT A CREDIT CARD!
“…LEND IT RATHER TO THINE ENEMY, WHO, IF HE BREAK, THOU MAYST WITH BETTER FACE
EXACT THE PENALTY.”
-ANTONIO, SHAKESPEARE’S MERCHANT OF VENICE
16
CHECKSUM ERROR DETECTION:
CREDIT CARD CHECK-10
Given a credit card number (4314 0675 3252 8034)
Double every other digit, skipping the last one (starting with the second digit)
4618 0(12)78 3454 803X
http://card-generator.com/q_credit-card-picture-
generator.htm
17
CHECKSUM ERROR DETECTION:
CREDIT CARD CHECK-10
Given a credit card number (4314 0675 3252 8034)
Double every other digit, skipping the last one (starting with the second digit)
4618 0(12)78 3454 803X
Add all those digits together
4+6+1+8+0+1+2+7+8+3+4+5+4+8+0+3 = 64
http://card-generator.com/q_credit-card-picture-
generator.htm
18
CHECKSUM ERROR DETECTION:
CREDIT CARD CHECK-10
Given a credit card number (4314 0675 3252 8034)
Double every other digit, skipping the last one (starting with the second digit)
4618 0(12)78 3454 803X
Add all those digits together
4+6+1+8+0+1+2+7+8+3+4+5+4+8+0+3 = 64
The last digit (4) is the “check 10” digit:
64 mod 10 = 4
http://card-generator.com/q_credit-card-picture-
generator.htm
19
PUBLIC KEY CRYPTOGRAPHY
”FEW FALSE IDEAS HAVE MORE FIRMLY GRIPPED THE MINDS OF SO MANY INTELLIGENT MEN THAN
THE ONE THAT, IF THEY JUST TRIED, THEY COULD INVENT A CIPHER THAT NO ONE COULD BREAK.”
DAVID KAHN, THE CODEBREAKERS: THE STORY OF SECRET WRITING
20
CRYPTOGRAPHY AS DIFFICULT-TO-REVERSE FUNCTIONS /
NONDETERMINISTICALLY POLYNOMIAL ALGORITHMS
Our partner gives us the graph on the left.
Choose a number that we want to send
”secretly” to our partner.
Let’s say 100.
Break up the number 100 into 10 numbers
that sum to 100.
We use 10 numbers because there are 10
vertices on this graph.
https://classic.csunplugged.org/wp-
content/uploads/2014/12/unplugged-18-
public_key_encryption_0.pdf
21
CRYPTOGRAPHY AS DIFFICULT-TO-REVERSE FUNCTIONS /
NONDETERMINISTICALLY POLYNOMIAL ALGORITHMS
Our partner gives us the graph on the left.
Choose a number that we want to send
”secretly” to our partner.
Let’s say 100.
Break up the number 100 into 10 numbers
that sum to 100.
We use 10 numbers because there are 10
vertices on this graph.
https://classic.csunplugged.org/wp-
content/uploads/2014/12/unplugged-18-
public_key_encryption_0.pdf
8
12
6
15 4
18
5
7
11
14
22
CRYPTOGRAPHY AS DIFFICULT-TO-REVERSE FUNCTIONS /
NONDETERMINISTICALLY POLYNOMIAL ALGORITHMS
Our partner gives us the graph on the left.
Choose a number that we want to send
”secretly” to our partner.
Let’s say 100.
Break up the number 100 into 10 numbers
that sum to 100.
We use 10 numbers because there are 10
vertices on this graph.
Now, replace each vertex with the sum of
itself plus all neighboring vertices.
https://classic.csunplugged.org/wp-
content/uploads/2014/12/unplugged-18-
public_key_encryption_0.pdf
8
12
6
15 4
18
5
7
11
14
40
34
33
51
25
37
33
41
38
30
23
CRYPTOGRAPHY AS DIFFICULT-TO-REVERSE FUNCTIONS /
NONDETERMINISTICALLY POLYNOMIAL ALGORITHMS
Our partner gives us the graph on the left.
Choose a number that we want to send
”secretly” to our partner.
Let’s say 100.
Break up the number 100 into 10 numbers
that sum to 100.
We use 10 numbers because there are 10
vertices on this graph.
Now, replace each vertex with the sum of
itself plus all neighboring vertices.
Remove the original values.
https://classic.csunplugged.org/wp-
content/uploads/2014/12/unplugged-18-
public_key_encryption_0.pdf
40
34
33
51
25
37
33
41
38
30
24
CRYPTOGRAPHY AS DIFFICULT-TO-REVERSE FUNCTIONS /
NONDETERMINISTICALLY POLYNOMIAL ALGORITHMS
The three vertices highlighted in bold will
sum to 100.
They form the solution to the vertex-cover
problem, an NP-Complete problem that can
only be solved by brute force or
approximation, unless we learn that P=NP
and that a polynomial-time solution is
possible.
So, it’s a very hard problem to solve for large
graphs, for the moment.
… but not so hard to create!
https://classic.csunplugged.org/wp-
content/uploads/2014/12/unplugged-18-
public_key_encryption_0.pdf
40
34
33
51
25
37
33
41
38
30
25
CRYPTOGRAPHY AS DIFFICULT-TO-REVERSE FUNCTIONS /
NONDETERMINISTICALLY POLYNOMIAL ALGORITHMS
Typically, one encrypts a message using
someone’s public key. Only the person with
the private key can decrypt that message,
while others “cannot” even in possession of
the public key.
When might one encrypt with their own
private key for decryption by all with the
public key?
What can you be sure of?
https://classic.csunplugged.org/wp-
content/uploads/2014/12/unplugged-18-
public_key_encryption_0.pdf
40
34
33
51
25
37
33
41
38
30
26
DIGITAL REPRESENTATION OF COMPUTER
GRAPHICS
- SALVADOR DALÍ, THE PERSISTENCE OF MEMORY
https://upload.wikimedia.org/wikipedia/en/d/dd/The_Persistence_of_Memory.jpg
27
PIXELS, POST-ITS, AND CS PRINCIPLES
Jeff Popyack developed a fun and engaging
unplugged activity of his own, demonstrating image
representation and compression.
https://www.billmongan.com/Ursinus-CS173/DrawingCanvas
https://tinyurl.com/MonganPostIt
https://www.cs.drexel.edu/~jpopyack/Post-It/index.html
28
SO WHAT?
“I BELIEVE THAT EVERYTHING HAPPENS FOR A REASON.”
- MARILYN MONROE
29
SO WHAT?
Computer Science, like STEM, is not a “subject.” It is a mindset that
permeates other disciplines and our society.
It’s not “programming” – rather, it is something that people develop and use
collaboratively to solve practical problems in society.
You don’t need a computer to do computer science – the foundational
principles at the intersection of STEM make computers possible.
… and anyone can learn about them.
These are a few examples I’ve adapted or used from others to develop inter-relating
ideas they are conversation starters to provide context to the underlying
mathematics and theory that follows. 30
DESCRIPTION
This class will explore and demonstrate applied learning methods for introducing
Computer Science principles, focusing on putting those principles into relatable
contexts. We will conduct group activities and experiments that reveal that computer
science is a mindset that permeates society and solves big problems in ways that
computers can be built to exploit. We will then apply these principles using
programming in the Python language and using micro:bit devices. Students will be
encouraged to propose and complete a small "hackathon" project with their
classmates, to be presented on the last day.
31
32
33