## What Can You Do With This: The Door Lock

April 21st, 2009 by Dan Meyer

Download high quality here. Here’s the pilot but I need to modify the prompt somewhat. Every math teacher reading this likely sees the mathematical potential in this image. Most could come up with a question right now like, “If this is a four-number combination lock, then how many combinations will you have to try to break in?”

Lately in these threads I get lists of those questions, which is great, but questions don’t constitute a lesson plan. So consider this the new prompt: what is the lesson plan? what will the students *do*? what is the best plan to provoke sustained, rigorous inquiry?

Let’s push this forward.

**BTW:** My lesson plan.

on 21 Apr 2009 at 9:22 pm1 David CoxI like the idea of pushing this forward, but in order to create an inquiry based lesson, doesn’t the teacher need all the information? Are you holding anything out on us?

on 21 Apr 2009 at 9:23 pm2 Morgante PellThough its not a plan, I think this is a better question: “How long will it take you to break in?”

Students will have to think about how long it takes to enter each code, but also about the probability of getting it right. You have to computer the possibility of getting it right on each try (first try is even possible.)

How could you work out a more efficient order, by starting with “likely” numbers. Would someone ever use the same digit in multiple places? 0000? Do we favor certain numbers for starting or ending?

Suppose you don’t even say its a 4 number combo. How can we test for different combination in a timely fashion?

Have the students develop a plan for how they would actually test the combinations (order + timing). The students with the plan which would reach your chosen combo first win.

on 21 Apr 2009 at 9:29 pm3 Guy SrinivasanYou can go pretty deep down the rabbit hole, too, if anyone mentions the possibility that 12345 might test 1234 and 2345. :)

on 22 Apr 2009 at 4:17 am4 Dr. McNutt, certified teacherThe window looks like it wouldn’t take too much of an effort to smash it. Also, the wood on the door looks like it wouldn’t take too much crowbar work to just break the thing open. Yeah, I was one of THOSE students.

on 22 Apr 2009 at 5:11 am5 AlexI like Morgante’s suggestion of asking how long it would take to break in. Ask the students how long they think it would take (on average) to pick the code if it were 1 digit, 2 digits, 3 digits etc.

If students want to test the time required to pick different length codes you can probably program the calculators to produce a random (number) string of length N and set the program to count the tries before the student enters the correct string.

Have students calculate the number of possible codes with 1 digit, 2 digit etc. and have them decide how many digits should be in a secure code. If students suggest codes that are 9 digits long you can ask about the trade off for the owner. The longer the code the more secure the lock but the more annoying it is for the owner each time he/she needs to put in the code while holding a bag full of groceries or when hurrying to meet nature’s call.

From Dr. McNutt’s point of view what is the trade off for the burglar in choosing between 1) taking a long but silent time picking the lock and 2) quickly and loudly smashing in the window. What’s the chance that the house also has an alarm in addition to this lock?

Often number locks will allow codes where 2 digits are pressed at once, how does that change the number of possible combos?

Often online passwords are required to be 6-8 digits long sometimes including letters, numbers, dashes, capitals etc. Is this for security that you need an 8 digit password where each digit could be any of 70 possible characters? Is this because gmail has enough subscribers that they require this many passwords to give everyone a unique password? Is this because without the rules people are prone to pick real words that have significance to them and can easily be hacked “psychologically”?

on 22 Apr 2009 at 6:15 am6 Dan MeyerMorgante‘s framing device of “how long?” works for me too but no one’s laid out a lesson plan with any precision, which is the failing of this WCYDWT? series I’d most like to address here. What does the teacher do? What do the students do?Is this the lesson plan y’all have in mind?

TEACHER: projects image, asks, “how long would it take you to break in?”

STUDENTS: ask, “How long is the combination?”

TEACHER: “Four digits.”

STUDENTS: calculate the permutations 10 * 10 * 10 * 10 and multiply that by their estimate of how long it would take them to punch in a combination.

The end. We should ask some of

Alex’sinteresting follow-up questions but the sustained, rigorous stuff is over. Fade out.Is that all we can do here?

on 22 Apr 2009 at 6:23 am7 SueWell, first I’d ask the students to do what you’ve asked us to do: What questions does this picture get you thinking about?

Some of them may think the numbers have to be different, so you could use this to discuss permutations.

I especially like figuring out how long based on varying lengths of passcode, so they can decide which lock to buy after their house has been broken into.

Sustained and rigorous, hmm…

on 22 Apr 2009 at 7:20 am8 Morgante PellDan: Actually, I don’t think you should answer “How long is the combination?” They should figure it out. Also, the student who says it would take 10^4 is definitely wrong, since thats

nothow long it would take to do on average.Teacher: “What is the quickest way to find this combination?”

Students: “Guess all the numbers?”

Teacher: “Starting where? How long will it take? Figure out a plan to guess the combo, including how long each step would take you. The most efficient plan wins.”

Students: “How do we know the most efficient?”

Teacher: “The one which would get to my combo first.”

Students: “How long is the combo?”

Teacher: “You need to find out.”

I also like Alex’s idea for a program. If the class has programming knowledge, you could make the competition even more real/fun.

Teacher: “We’re going to have a contest to write the most efficient program. Write a program to guess this combo.”

Student: “Who wins?”

Teacher: “The program which guesses the combo first.”

Student: “How does the program test for the matching combo?”

Teacher: “Use the variable C. I’ll put it in later.”

After they finish the programs, collect them. Put in a combo as C at the top of the program and start all the programs.

on 22 Apr 2009 at 7:44 am9 Dan MeyerSorry about that. The “how long” abbreviates “how long will it take you to guess the combination?” If the combination is four digits long, then there are 10^4 possible combinations. Multiply that by the time elapsed per combination, etc.

I like the plan. Particularly the use of a dummy variable C for the combination. That’s fun. It isn’t particularly well-scaffolded, though, which most advanced students won’t mind but which will frustrate novices. I think it would be helpful to have novices write a program that will crack a 1-number combination, a 2-number combination, etc., building up to the general case. That might drive the advanced student nuts, however, which is why they call it differentiation.

I like the programming exercise, though it doesn’t use the image for much more than a visual hook or an inspiration. (Not that it needs to do anything more than that.) I’d like to see a definitive lesson plan for math and I’d

reallylike the participants to think about they could modifythe imageto push the lesson forward.on 22 Apr 2009 at 8:42 am10 Robert JonesHats off to you Dan – you have asked the question that has been on my mind since this WCYWDT appeared here, but I didn’t ask because I thought it would seem too critical.

What does the lesson actually look like?

What do we actually mean when we say “ask the students…”? How are they supposed to answer? By replying to you? In which case only one student at a time has a chance to speak and every thing they say is filtered by your response (including tone of voice and body language).

I don’t have a lesson plan, but I would definitely start by saying “take 2 minutes to consider in silence how long it would take to break in. Make notes.” Then say “Now take another 5 minutes to discuss in groups of 4 the same question. Prepare questions you would like to ask me at the end of the 5 minutes if you feel you need clarification.”

Not sure where it would go next :-)

on 22 Apr 2009 at 8:44 am11 tiredoldclicheIn line with the new Prompt from Dan, how about this:

Starter…

a few games of the old “mastermind” puzzle – show them the lock and tell the you are thinking of a 3 digit code. let them guess what it is, you just tell them how many digits are correct, and if they are in the right/wrong place

(eg. If i’m thinking 216 but they guess 613, i tell them they’ve got two correct, *but* one in the wrong place)

Use this to experiment, maybe keep a record of how many guesses we take. Play as a class or in pairs.

Work out our average number of guesses.

Main…

Determine from my simple game how many possible combinations there could be (depending on whether that last key is a “C” or a “0”, 9^3 or 10^3) Assume our average number of guesses is 12, what is the probability of getting it right within 12 guesses? 1% ish – how did we beat these ridiculous odds to get it right so quickly? Talk about logical deductions they made which took the element of chance out of the activity after a few guesses.

Offer them data on different sets of fictional guesses,

eg GpA guessed a 5 digit code right in 60 guesses,

group B guessed a 4 digit code right in 20 guesses –

who was better?

Finish…

Offer them a fake job where a Gang is offering $1,000,000 for an expert code cracker for a bank job. They need to be able to beat odds of 1%. The bank vault has a keypad [1-6] with a 10 digit code – would they hire someone who needed 1,000 guesses? 3,000?

how many guesses would you be able to have to get the job?

Homework: break into your dad’s safe, steal his stash of expensive cigars and bring them to teacher asap.

Thoughts?

on 22 Apr 2009 at 9:09 am12 Dan Meyer@

tiredoldcliche, love this bit:The lack of iterative practice is my fundamental gripe with the lesson plans so far. The students need to be immersed in several different-but-similar situations to practice the skills they’ve learned. Your plan addresses that.

@

Robert, this seems to me like a problem endemic, not just to WCYDWT? prompts, but to lecture-based pedagogy in general.I can’t say I have the solution figured out, but whenever I deploy these media in class, I make it a goal to give each student (or groups of students) something tangible to manipulate, draw on, or work through on their own. Which helps.

on 22 Apr 2009 at 9:12 am13 Michael1) Would it be faster to pick the lock or guess the combination? (assuming you don’t need both to unlock the door)

2) Wouldn’t it be easier and faster to break the window? Or are we assuming the window doesn’t exist?

3) Can you come up with an algorithm of guessing that does not use every combination but gets to “the one” faster than straight brute force method?

Personally, I think that this particular image lacks opportunities for inquiry. Perhaps it was presented with other kinds of door locks leading students to come up with and answer the question, “which is the most secure lock?”

What if a lock recognized 2-5-3-6 as also any of its permutations? Would this be a better lock? In other words suppose the combination was 2-5-3-6 but I input the sequence as 3-2-6-5 and the lock still unlocks. Does this make the electronic lock better or worse and why?

on 22 Apr 2009 at 2:43 pm14 EdthoughtsI was into this, but I teach social studies. Feel free to skip this if it throws off the flow of conversation… :)

Looking at this as a social studies question, I started with “Why would someone want this lock?”

Students: To keep people from jacking my stuff.

Teacher: Yeah, but aren’t people born as good human beings?

Students: Mostly no, a few yes.

Teacher: Insert discussion about Hobbes and Locke here.

Or if learning about the Bill of Rights:

Teacher: Can anyone break this down?

One Student: Yeah I could in a heartbeat.

Teacher: Ok, besides_____ who would want to break this down?

Students: Cops

Teacher: Why?

Students: Stop a crime… search…

Teacher: Doesn’t the person who owns this door want it to stay shut? Wouldn’t the framers of the constitution want it to stay shut?

Students: Yeah but…

Teacher: But what?

Students: What if they did something?

And begin discussion about 4th Amendment rights to privacy.

on 22 Apr 2009 at 2:59 pm15 Steve PhelpsI was curious about this lock, so I went to the Schlage Locks web site to see what they said about this lock.

-Code Control, easily programmed at the keypad (19 user code capacity, with 10,000 possible user code combinations)

Is this claim true? 10,000 possible user code combinations?

on 22 Apr 2009 at 5:34 pm16 KateSome of this points to the conclusion that these would be REALLY AWESOME if they came with video of the lesson being conducted in a live classroom. Like, here’s my writeup of my awesome lesson, etc etc, and now watch me deliver it. It would garner much more relevant critiques, too.

on 23 Apr 2009 at 8:22 pm17 dy/dan » Blog Archive » My Lesson Plan: The Door Lock[…] Iterate this with two and three buttons until they have generalized permutations. Then maybe you iterate the entire thing with another keypad lock. Then maybe you dip into the comments of the original WCYDWT? post and help yourself to some very-interesting follow-up questions. I recommend Alex’s. […]

on 27 Apr 2009 at 10:36 am18 » State of the Art Here’s What I Think[…] classroom. The posts I’ve read have been extraordinarily useful… his ideas for a math lesson based on a photo of a door lock, for instance, are […]