A numeric lock has three digits key,
there are five hints which are provided for your reference. Will you crack the code?
Try it yourself first, type in your answers in the comment section below. Now
let me solve the puzzle for you, so this is the development environment which I
have setup to crack the 3-digit numeric lock. On the right side, we have
all the five conditions which have been given to us. Below that, we have two lists
one is correct solution list and other is confirmed solution list. Correct
solution list will contain the digits which can possible be correct code for
the lock, on the other hand confirmed solution list will contain the digits
which are confirmed to be correct code for the lock. On the left hand side, we
have the solution area where we will solve the puzzle. So, let us take the
first condition into the solution area. First condition says, out of 6, 8,
2, there is one number which is correct and well placed. So, we will add 6, 8,
and 2 to the correct solution list. Let us clear the solution area, now we have
6, 8 and 2 in the correct solution list and our confirmed solution
list is still empty. Now, we have added the second condition in the solution
area, which says, out of 6,1 and 4, one number is correct but wrongly placed.
Now, according to the second condition we will add 1 and 4 to the correct
solution list, 6 is already there, so, no need to add it again. Now we have 6,
8, 2, 1 and 4 in the correct solution list and our confirmed solution
list is still empty. Now taking both conditions one and two in the solution
area in both conditions digit 6 is common, according to the first condition
one number is correct and well placed and according to the second condition
one number is correct but wrongly placed, so if we take the digit 6 as
the number which is correct and well-placed in condition one which will
contradicts the condition two so 6 should not be in our solution set.
Now removing 6 from the correct solution list. Now clearing the solution area and
updating the correct solution list. Now adding condition three to the solution
area which says that two numbers are correct but wrongly placed. Now according
to the condition one and two we have already declared that the number 6
should not be in our correct solution list so with this condition three we can
tell that 2 and 0 are the two numbers which are correct and which are
wrongly placed so now we will add 2 and 0 in our confirm solution list and we
will add 0 to a correct solution list because 2 is already there in the
correct solution list. Now taking the condition four into the solution area
which says that nothing is correct so the digits 7, 3 and 8 should not be
in our solution set. So, we will remove 7, 3 and 8 from all the conditions and
all the list, we have correct solution list and confirmed
solution list we will remove 7, 3 and 8 and also from the condition one and two
we have found that 6 should not be in our solution set. So, removing 6, 7, 3
and 8 from everywhere. Now, we will update the correct solution list as 8
is removed from the correct solution list. Now in the correct solution list, we
have 2, 0, 1 & 4 and in the confirmed solution list, we have 0 & 2.
Now, we will add all the five conditions in our solution area and we will also
add the code which we need to find in our solution area. Now taking condition one
into consideration which says one number is correct and well-placed.
6 & 8 digits are already not in our solution set, so only digit
we have left with is digit 2. So, it is the number which is correct and
well-placed, so at our code which is of three digits at the third place it
should be 2. So the third digit of our code is 2 which is confirmed.
Now taking the conditions three and five into
consideration the condition five says that one number is correct but wrongly
placed and in fifth condition the number 7 and 8 are not in our solution
set, so the only digit we have left with is 0, so it should be in our confirmed
solution list so taking the condition three
also into the consideration which says two numbers are correct but wrongly
placed we have already provided the location to digit 2, so according
to the condition three and condition five, digit 0 should be at the first location of our
code. Now we will take the condition two into the consideration which says one
number is correct but wrongly placed so if we take the number 1 as the number
which is correct but wrong place. So it will contradict
our code in which if only the middle position is left so that number which
can be in that middle position is number 4 which fulfills the condition two,
which says that one number (i.e 4) is correct but it is
wrongly placed. So we will fix the position two into our code for the
digit 4 so we have successfully cracked the code
so the code which will open the lock is 042. Let me put, 042
in the code. So, this puzzle is solved! The code is 042
which is the solution of this puzzle. Hope you like this video, do give
it a thumbs up, Please Subscribe to my youtube channel. Thanks and bye! bye!