• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Code puzzle thread +_+

I did come by a case that is a multiple of 11, but was not looking for that, instead hoping it'd lead to a reductio ad absurdum and it did not. So I will keep it in mind when I have worked an actual proof that allows it. Of course it may be wrong anyway, just a multiple of 11.
 
WIP, just to keep note of my reasoning this time.

Spoiler :

Using the spoiler, so no repeats.
"6"+"7" : 2 is the same spot, can't be both in the right spot and in the wrong spot => 2 is incorrect.
One down, four to go.

Nothing seems obvious at that point, so time to work hypotheses.
Digit 5 appears in all clues, that's suspicious. Let's start from there.
Assume 5 is correct.
So from "6", we can eliminate 4 6 7 in addition to 2. Only one left to eliminate.
From "5" we get that only one of 1 or 9 is correct, the other incorrect.
Thus from "8" we get that 8 is correct.
And from "7" that it implies "0" to be incorrect.
We've eliminated 6 digits, that's one too many. => so 5 is incorrect.

From "7" we now know that two of 7 8 0 are correct.
Same line of reasoning gets us to the conclusion that 7 is incorrect too.

So we have _ 8 _ _ 0.

Next one to work on should be digit 6, but no more time for now...
 
Is the correct answer
Spoiler :
38598
?

@a pen-dragon

If so, I will post my proof. There can be an issue with the uniqueness of the solution, however
Spoiler :
58531
so it can be wrong.
If it is wrong, I'd like to establish whether
Spoiler :
85 is true and one of 91 is true
is wrong.

I can't find any fault in my reasoning steps to arrive at those numbers being true, (reasoning in the spoiler)

Spoiler :
1722624998847.png

but if I am correct then the claim there is one unique solution would be wrong=> We need to verify with pen-dragon if the puzzle has a wrong statement or not :)
 
Last edited:
WIP, just to keep note of my reasoning this time.

Spoiler :

Using the spoiler, so no repeats.
"6"+"7" : 2 is the same spot, can't be both in the right spot and in the wrong spot => 2 is incorrect.
One down, four to go.

Nothing seems obvious at that point, so time to work hypotheses.
Digit 5 appears in all clues, that's suspicious. Let's start from there.
Assume 5 is correct.
So from "6", we can eliminate 4 6 7 in addition to 2. Only one left to eliminate.
From "5" we get that only one of 1 or 9 is correct, the other incorrect.
Thus from "8" we get that 8 is correct.
And from "7" that it implies "0" to be incorrect.
We've eliminated 6 digits, that's one too many. => so 5 is incorrect.

From "7" we now know that two of 7 8 0 are correct.
Same line of reasoning gets us to the conclusion that 7 is incorrect too.

So we have _ 8 _ _ 0.

Next one to work on should be digit 6, but no more time for now...

Ok, think I got it.

Spoiler :

Resuming where I left.

Clue 6 tells us that either 4 or 6 is correct.
If we assume 4 to be correct, then both 1 and 9 are correct (clue 5).
Clue 5 also tells 1 then that 9 is the correct position (since we already have 0 in last position).
So _ 8 _ 9 0.
Clue "6" tells us that 4 can't lead, so the only possibilty is 1 8 4 9 0.
Bad feelings about that since it means clue "2" isn't needed... and indeed that number isn't a multiple of 11.
=> 4 is incorrect, 6 is correct.

Clues 5 and 8 tell us the same thing : one of 1 or 9 is correct, and thus the last unused digit (3) has to be correct.

Assume 9 is correct, the only possibilities are
68930
38690
Neither is a multiple of 11.
=> 9 is incorrect, 1 is correct.

Has to start with 6 (clues 5 + 7), can't have 1 in the middle (clue 8), so
6 8 3 1 0
which is a multiple of 11.
 
My result is the same as the one from @Thrasybulos .

@Kyriakos your solution is not a multiple of 11. In your solution there is a mistake in C:
Spoiler :
(5) states that 65791 has two correct digits, with only one in the correct place. This does not allow your conclusion, that out of 97610 at most two digits can be true.
Spoiler Assuming you meant 38599 instead of 38598 ... :
... this can be excluded, since the hints do not permit distinguishing between that and 98593, thus not resulting in a unique solution.

Spoiler In my solution, concerning 85 ... :
... I exclude 85 both being true due to this not leading to a unique solution



As for my solution:
Spoiler my solution :

To check if a number is a multiple of eleven: Check if the alternating sum of digits is a multiple of 11.
The correct code is 68310.
Spoiler proof, using uniqueness :

(6) + (7): excludes 2 due to (7) having only correctly placed digits and (6) only incorrectly placed ones.
(5) + (8): (5) has two correct out of 65917, (8) has three correct out of 65198. The only change of 7 -> 8 adds one correct digit, thus 8 is included, 7 is excluded.
(7) fixes the found 8 to x8xxx
(5) + (6): out of 6591 two are correct, and out of 456 one is correct, thus at most one of 56 is correct.

two possibilities:
1. none out of 56 correct: 4 has to be correct, 91 have to be correct. (7) implies that 0 is correct, thus x8xx0. (5) has to have one correctly placed digit. Since the last digit is already fixed it has to be x8x90. With 4 and 1 other digits this cannot be a multiple of 11. (4-8+1-9+0=-12)
2. one out of 56 is correct. As a result 4 is excluded. Now one out of 56 is true and one out of 91 is true. We have excluded 2,4,7

If 5 is true, 6 is excluded. Also (7) fixes it to x85xx and excludes 0.
Now (5) requires the one out of 91 that is true to be correctly placed.
If 9 is true, 1 is excluded and the code is a859b with 0,1,2,4,6,7 excluded. For it to be a multiple of 11 a-8+5-9+b = a+b-12 must be a multiple of 11. This is fulfilled by a+b=1 and a+b=12. a+b=1 can not be fulfilled. a+b=12 is fulfilled by 3 and 9. 4 and 8, 5 and 7, 6 and 6 all are excluded. The hints do not offer further constraints for the digits 3 and 9, thus not leading to a unique solution.
If 1 is true, 9 is excluded and the code is a85b1 with 0,2,4,6,7,9 excluded. For it to be a multiple of 11, a-b=2 has to hold. There are the two possibilities a=3, b=1 and x=a, y=b, again not offering a unique solution.

Thus 5 is excluded, 6 is correct. (7) then requires the code to look like x8xx0. 2,4,5,7 are excluded.
If 9 is true, then (5) forces either 689a0, which is excluded, since for it to be a multiple of 11 a has to be 5, or a8690, which contradicts (6).
Thus 9 is excluded and 1 is true. (5) forces the code to be 68ab0, with a-b=2 and one of these being 1. Thus only 68310 remains.

 
My result is the same as the one from @Thrasybulos .

@Kyriakos your solution is not a multiple of 11.
38598, as well as 58531 are multiples of 11; they add to 33 and 22 respectively. Edit... Wait, you meant that the entire number is a multiple of 11... I thought it was the sum of its parts :S

But I still wonder about this:
In your solution there is a mistake in C:
(5) states that 65791 has two correct digits, with only one in the correct place. This does not allow your conclusion, that out of 97610 at most two digits can be true.

C' was an assumption, meant to show that if we assumed there is only one correct number in 85, it follows that there are two correct numbers in 916 (due to set8) and one true number in 70 (due to set 7). That there aren't three correct numbers in 91670, as would be required from the assumption, means the assumption is wrong, and since already in B' it is shown that there cannot be no true numbers in 85, it follows that both of 85 are true. What part is wrong? (note that this is entirely unrelated to being a multiple of 11)

Regardless, it was a cool puzzle :thumbsup: I wish it could be established if/where I made an error in my reasoning regarding 85 needing to have both numbers be true.
Anyway, looking forward to the next puzzle :)
 
Last edited:
I'll pass, someone else find one. :)

Devising a good puzzle is hard, and especially checking it properly when you know the answer is iffy at best. Won't have the time for it. :(
 
C' was an assumption, meant to show that if we assumed there is only one correct number in 85, it follows that there are two correct numbers in 916 (due to set8) and one true number in 70 (due to set 7). That there aren't three correct numbers in 91670, as would be required from the assumption, means the assumption is wrong, and since already in B' it is shown that there cannot be no true numbers in 85, it follows that both of 85 are true. What part is wrong?
It is possible for there to be three correct digits in 91670.
(5) states that in 65791 there are two correct digits. If there are 3 correct digits in 91670 this means that 5 is excluded and 0 is true, due to this being the only exchanged digit. This is consistent with 8 being true and 5 false, which is consistent with only one correct digit in 85. Thus this is not excluded.
 
Spoiler for answer :
1 and 3 are wrong
=> One from 794 is right
=> 5 and either 7 or 9 are correct
==> If 5 is correct, 9 can't be
==> 4 and 9 are wrong
==> 6 is right
===> 13490 are wrong, thus 25678 are right
===> 576--

A+B+C+D+E = D*10 + E
=> A+B+C = D*9
=> 5+7+6 = 18
57628
 
Spoiler for answer :
1 and 3 are wrong
=> One from 794 is right
=> 5 and either 7 or 9 are correct
==> If 5 is correct, 9 can't be
==> 4 and 9 are wrong
==> 6 is right
===> 13490 are wrong, thus 25678 are right
===> 576--

A+B+C+D+E = D*10 + E
=> A+B+C = D*9
=> 5+7+6 = 18
57628
Got to the same result.
Spoiler :

"1"+"3" => 4 can't be correct as there's be only 5 left correct in "3".
=> 1 & 3 can't be correct (cannot be both in the right and wrong position)
=> 5 is correct since we know now only one of 7 9 is correct.
=> 5 _ _ _ _
+"2" => the other correct number from "2" has to be in the correct position. Thus can't be 9.
=> 7 is correct ("1" or "3")
=> 6 is correct ("2")
=> 5 7 6 _ _

No repeat and no 0 means the only numbers not considered, 2 & 8 are correct.
The sum of 5 figures can't be 80+, so :
5 7 6 2 8

And indeed, 5+7+6+2+8 = 28.
 
It's the correct answer :yup:

Originally this puzzle was posted in reddit, but the creator didn't include the limitations. Without them the last digit can be any of 0,2,8.
 
Until somebody gets one, here's a little something.

"Crap, a 3-digit combination lock. Wasn't supposed to be there."
"Yes it was. Don't worry, I've seen it, I've taken note, there, take this."
"x36 ? What's that supposed to mean?"
"The product of the digits is 36".
"Oh, and this is the sum, then, I take it. But wait, that's it? You know that a combination is supposed to be entered in a specific order, don't you? Not that this is enough to even know the correct digits!"
"Damned, sorry man. I thought I was clever taking notes past them that way. All I can remember is that the smallest digit was in the middle, but that doesn't help, does it?"
"Don't worry man, it's okay. It does help. I've got the code now, actually."

Do you ?
 
Edited.
Solution in the spoiler.
Spoiler :

There are more than one combinations of the 2(2)(3)(3) with 9 being the highest digit:
4-3-3 and 3-3-4 (smallest also in the middle), sums up to 10
2-2-9 and 9-2-2 (same), sums up to 13
4-1-9 and 9-1-4, sums up to 14
6-2-3 and 3-2-6, sums up to 11
6-1-6, sums up to 13.
So the sum was 13=>I suppose you discount a number from being the smallest in the middle if it is also there in other positions=> the code is 6-1-6.
 
Last edited:
Back
Top Bottom