Code Lock Pow - 3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Name: __________

POW #3 - Code Lock Riddle

Problem Statement:
We are given a 3 digit lock, each entry that someone could make can be between 0 and 9 and the
numbers can repeat. We must find how many different combinations we are able to make with
the 3 digit lock.
Honors Problem Statement:
For the honors problem we must use all of the same information from the original problem, but
now we must find how many combinations are possible with a 4 digit lock.

Process/Work:
My first step, a step that I do in almost all of my POWs, was to find a pattern that could show me
the whole picture. To do this, and on John’s advice, I started by trying to find a pattern with a
two-combination lock, which effectively simplified the problem. To solve for a two-digit
combination I started by writing all of the combinations of two digits from 0-9, getting 90
different combinations. However, this was not my final answer because I neglected to remove all
of the doubles in the possible combinations. At first, I had things like 02 and 03 and 20 and 30,
but because of the rules of this POW, 02 is the same as 20. Because of this, I had to go back and
remove all of the doubles I had written out, leaving me with now only 55 possible combinations.
I believed that I had discovered a pattern with the combinations too: every group of numbers,
like all of the combinations that began with a zero, would have n+1 number of combinations in
that group (group 0 had 1 combination, and group 1 had 2 combinations).
After solving for just a 2-digit combination I felt that I had a better understanding of what
I was going up against in the problem. I also felt that the pattern I had found in the 2-digit
problem could help me find a pattern in the 3-digit combination problem. To visualize the
problem I created a google spreadsheet and began typing out all of the possible combinations up
to the groups that started with 3(ex: 333, 334, 355, etc.) without repeating any of the
combinations, as that was my mistake when I was solving for the 2 digit combination lock.
The google spreadsheet I used to organize the groups 0-3 and their corresponding nCr equations and
number of combinations in each row(dark green).
To prevent any repeats I started each group( groups are recognized by the number each
combination starts with) with just a combination that included that starting number. For example,
in group 2 I started with the combination 222 instead of 211 or 221 as those combinations had
already been shown in group 1.
Once I had finished typing out all of the combinations up until group 4 I could see a
pattern forming. This pattern was that each group's number of combinations decreased by one
less than the previous group had decreased from its previous group starting at 10 combinations.
For example, in group 0 there were 55 combinations, in group 1 there were 45 combinations,
and in group 2 there were 36 combinations. Using this pattern I was able to find all of the
possible combinations in each group and add them together to get 220.
The top row is the number of combinations per each group, the row below shows the group of
combinations. This is how I added all of the combinations together to get the solution.

Now, I had solved the problem, but I wanted to be able to apply what we had learned in
class about combinations and permutations to this problem as John had alluded that it would be
possible to solve the problem with combinations and a few of my peers were talking about how
they solved this POW with the combination’s equation. So I set out to accomplish this as well. I
first began the process by trying to determine what each section(the section had to do with the
second number of each combination, ex. 334 and 354 are in different sections) of each group’s
combination equation would be. In section 0 of group 0 there were 10 possible overall
combinations from 000 to 009, so that became the n. However, because combinations can't solve
for repeating patterns like 000 (here we are only looking at 00 because the beginning 0 will be
the same throughout the entire group) there are only 9 possible combinations (ex:01, 02, 03…),
so 9 became the r in the equation. I used the same rationale for each section of each group, where
in section 1 of group 0 I excluded the combination 011 because it repeated. Using these
equations I was able to create this monstrous equations that I had to put into desmos: (nCr(10,9)
+ nCr(9,8) + nCr(8, 7) + nCr(7,6) + nCr(6,5) + nCr(5,4) + nCr(4,3) + nCr(3,2) + nCr(2,1) +
nCr(1,0)) + (nCr(9,8) + nCr(8, 7) + nCr(7,6) + nCr(6,5) + nCr(5,4) + nCr(4,3) + nCr(3,2) +
nCr(2,1) + nCr(1,0)) + (nCr(8, 7) + nCr(7,6) + nCr(6,5) + nCr(5,4) + nCr(4,3) + nCr(3,2) +
nCr(2,1) + nCr(1,0)) + (nCr(7,6) + nCr(6,5) + nCr(5,4) + nCr(4,3) + nCr(3,2) + nCr(2,1) +
nCr(1,0)) + (nCr(6,5) + nCr(5,4) + nCr(4,3) + nCr(3,2) + nCr(2,1) + nCr(1,0)) + (nCr(5,4) +
nCr(4,3) + nCr(3,2) + nCr(2,1) + nCr(1,0)) + (nCr(4,3) + nCr(3,2) + nCr(2,1) + nCr(1,0)) +
(nCr(3,2) + nCr(2,1) + nCr(1,0)) + ( nCr(2,1) + nCr(1,0)) + nCr(1,0) = 220. At first, this
equation did not result in the same answer, but I suspected that because there were so many
digits that I had mistyped something, so I retyped everything and the second time it resuted in the
correct answer.

Honors Process/Work:
Once I had solved the first part of the problem I was ready to move on to the much more
difficult part: finding all of the possible combinations of a four-digit combination lock. Now, I
had hoped that I could just tweak that nasty equation that I had come up with in the first part to
solve this problem. I thought that because I was only adding one more digit to each group that
what I had just come up with would be multiplied by 10 because each group from 0 to 9 would
then be repeated 10 times, each repetition adding 0 through 9 to the front of the combinations.
This resulted in 2200 combinations, which I felt was way too large, and after talking to people
who had solved the problem I knew that this result was way off. I was going to try to buckle
down and write out all of the combinations for at least groups 0 and 1, but that would have been
an insane amount of work. I had the feeling that there had to be a more efficient solution so I
asked Shea what he had done to solve the problem. He began his explanation by showing me
how he had solved the 3-digit combination lock. He had used the equation for finding
combinations three different times, one for each kind of combination there was. So he had n=10
because there are 10 different numbers to make each combination from. He had r= 1 for every
combination that repeated the same number, like the combination 000. He then had r=2, for
every combination that used two different numbers, like 001. And finally, he had r=3 or every
combination that used three different digits, like 012. However, he showed me how the equation
for just r=2 is incorrect because a combination made up of 2 of the same digits could look like
110 or 001. These two combinations are not the same, but the r=2 equation doesn't account for
the difference, so you have to multiply the answer by 2 to get the actual number of combinations
in r=2. Shea then showed me how he added up all of the answers to get the total number of
combinations in a 3-digit lock, which was 220!
Once he had given me the background information about how to solve the problem, he
showed me how to solve a four-digit combination lock, although, at this point, I probably could
have figured this out on my own. To solve for the four-digit combination lock you practically do
the same thing as before, but now you have n=10, r=1, r=2, r=3, and r=4. The same rules as
before apply to r=1, but now the other three rs get a bit funky. There are now three possible
different types of combinations for a combination with 2 different digits. For example, you could
have 0001, 0011, or 0111, and all of these are not the same combination because there are
different amounts of the same two digits. So now you must multiply the answer for r=2 by 3. For
r=3 you must now multiply the product by 3 as well because there are three different possibilities
for combinations with the same three digits: 0012, 0112, and 0122. And finally, for a
combination that has 4 different digits involved, r=4, there is the only use of each number once
in those combinations. After finding the answer for all of the different nCr equations and
multiplying them by whatever they needed to be multiplied by you can add the products to get
715 different combinations in a 4-digit lock.
After showing me his much more efficient method, Shea showed me something else that
is really interesting: the problem’s connection to Pascal's triangle. We learned about the very
useful triangle briefly last year for another POW. This time around the triangle was useful
because it could tell us what you would multiply each r(ex: r=1, r=2, r=3, r=4, r=5, etc.) by to get
the actual number of combinations for each r. Each row going down on Pascal’s triangle
corresponds to how many digits you have in the combination lock. For example, the fourth row
of the triangle reads 1 3 3 1. We multiplied r=1 by 1, r=2 by 3, r=3 by 3, and r=4 by 1. This
weirdly amazing triangle can tell us what to multiply each r by up to a 9-digit lock (which for the
record would be 48620 combinations)
Pascal’s triangle: amazingly useful in the most unexpected of situations. Each row of the triangle
correlates to a combination with the same amount of digits as the row.

Solution:
The number of combinations that a three digit combination lock could have is 220.
Honors Solution:
The number of combinations that a four digit combination lock could have is 715.

Evaluation:
The biggest thing that I learned from working on this POW is that working in teams to
get multiple perspectives on a problem is a very valuable tool. I may have solved the first part of
the POW on my own, and I’m sure that if I had forced my nose to the grindstone a while longer I
would have eventually found a solution for the second part of the problem in a similar way that I
found the first solution. However, I mostly worked on my own for the entire POW, up until I
reached out for advice for the honors problem. The only time I sought out other people's
perspectives on the first part of the problem was to check if my answer was on track. Even this
small amount of cooperation helped me not go down the completely wrong path. I even helped
Llew in a similar way when they began solving the problem. I played a sort of ‘hot and cold
game’ with them, telling them if their answer was completely off or if they were getting closer to
the solution. Overall, it was extremely helpful for me to see what Shea’s problem-solving process
was because I could then make sense of what he did, make connections between what we were
doing, and redirect what I was doing so I stayed on a more sensical path. I am a bit disappointed
that I didn't discover the method that he used on my own, and I wish that he had stopped
explaining after he explained how he solved a three-digit combination lock because I could have
figured out the rest on my own. But overall, I am satisfied with at least understanding the
problem now and learning about how the ever-connected Pascal’s triangle fits into the problem.
Rubric:

Self-Grade Points
Problem Statement: The problem statement should be a condensed version of
what the problem says in your own words. You should be able to give this to
/2
another teacher and they should have an idea of what you are trying to solve.
This should also include some sort of mathematical language.
Process/Work: This section is the bulk of the write up. This should clearly
describe all of the methods that you tried in detail. If a method was
unsuccessful, what did you learn from it and how did it shape your approach?
This should show your method from the start to finish whether or not you
were able to find a solution. If you received assistance, describe how it helped /4
(or didn’t help) you and what ideas or methods resulted from this assistance.
This is for you to show me your thinking and the direction that you went with
the problem. Does not need to include who you got assistance from, exactly
what you did, but should be mathematically what you solved and why.
Solution: Clearly state your answer. State your solution as a sentence that
/2
states what you solved and what the answer is.
Evaluation: Describe your work on the POW. What did you learn about while
/2
working through this POW.
/10

You might also like