Brain Teaser

Author: ethang5

Posts

Total: 89
ethang5
ethang5's avatar
Debates: 1
Posts: 5,875
3
3
6
ethang5's avatar
ethang5
3
3
6
1. Can you write a 6 digit number where...

2. Digits cannot all be in ascending order ex. (134579)

3. Digits cannot all be in descending order ex. (964321)

4. No digit can be zero.

5. No digit can be a multiple of a digit beside it. ex. (374852) 4 and 8 are side by side, and 4 is a multiple of 8.

6. No digit can be used more than once. ex. (375594) 5 is used twice.

7. No digit can be 1 more or 1 less than the digit before or after it. ex. (253894) 9 is one more than 8.

8. No digits beside each other can share a multiple. ex. (386947) 8 and 6 are beside each other, and 2 is a multiple of both. 6 and 9 are beside each other, and 3 is a multiple of both.

9. The six digit number cannot have more than 3 consecutive odd numbers.
ex. (495372) 953 and 7 are all consecutive and all odd numbers.

10. Finally, neither the first or last 3 digits of your 6 digit number should have a sum of more than 15
(352947) 9+4+7=20
------------------------------------------
Can you do it?

Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
914725

If you are a stickler for the rules this may technically break rule 5 because the number one is technically a multiple of all other digits. This would mean that the number one cannot be used at all however so I chose to interpret rule number 5 as not applying to the digit one.

Methodology:

Choose a completely random digit to type. List all digits that may follow without breaking any rules. Select one at random to use as next digit. If all possible next digits break some rule then start over.

Time taken: About 15 minutes

Notes:

The first idea that came to mind was to select digits non-randomly from lowest to highest and upon entering a fail state simply going back one digit and choosing the next higher possible digit (rather than starting over completely). This idea was discarded after reading rule 10 because rule 10 would likely cause a lower-to-higher trend to result in a lot of fail states at the last one or two digits. Rule 10 encourages even distribution of high and low numbers thus making random selection probably better than non-random selection (I never did actually try the non-random selection method though so that might be incorrect).
ethang5
ethang5's avatar
Debates: 1
Posts: 5,875
3
3
6
ethang5's avatar
ethang5
3
3
6
-->
@Discipulus_Didicit
Good work. Your method was impressive too. I'm not surprised it was you first.

But 1 does break rule 5 as it is a multiple of every whole number.

So kudos for an impressive try, and for being so quick, but 914725 violates rule #5. Try again?


Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
-->
@ethang5
But 1 does break rule 5 as it is a multiple of every whole number.

Okay fine by me. I'll give it another shot tonight maybe.
Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
Actually this just popped into my head a minute or two after I said "I will look at it later" and I wish to post it now so I do not forget.

So, firstly there is a sort of hidden rule that we can... interpret I guess, for lack of a better word... from rule 10. I will call this 'rule 11' and it says "All six digits together must add up to 30 or less"

Because we cannot use 0 or 1 we can use rule 11 to vastly narrow the possible options because 2+3+4+5+6+7=27, very close to 30.

I will use this as a first stepping stone when I come back to the problem later but now I really must be going to do other things.

I am no longer certain that this problem is solveable but even if it is not solveable I should be able to use this as a starting point for constructing a proof of that fact.
ethang5
ethang5's avatar
Debates: 1
Posts: 5,875
3
3
6
ethang5's avatar
ethang5
3
3
6
-->
@Discipulus_Didicit
My, you are bright!

I am pretty certain you will solve it. I was taken aback by how many correct numbers there were. I'm still trying to figure out the relationship between them.
zedvictor4
zedvictor4's avatar
Debates: 22
Posts: 12,067
3
3
6
zedvictor4's avatar
zedvictor4
3
3
6
-->
@ethang5
473852
ethang5
ethang5's avatar
Debates: 1
Posts: 5,875
3
3
6
ethang5's avatar
ethang5
3
3
6
-->
@zedvictor4
Correct! How did you arrive at it? And how long did it take you?

You get extra kudos because answers with three even numbers including 4 and 8 are the hardest to figure out. Good work!

Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
-->
@ethang5
My, you are bright!

Thanks.
Vader
Vader's avatar
Debates: 30
Posts: 14,984
5
8
11
Vader's avatar
Vader
5
8
11
352749
Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
You get extra kudos because answers with three even numbers including 4 and 8 are the hardest to figure out. Good work!

 While working on this I thought I had a proof worked out that no solution could contain a 9 but this statement is making me doubt this (after eliminating all possible sets containing a 9 I was left with only sets that had three even numbers including a 4 and 8). I am having trouble finding any flaw in my proof though. Can you confirm whether any solutions contain a 9 and if so provide an example? This would help me identify the flaw in my reasoning if there is any.
Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
-->
@Vader
Breaks rule 10
Vader
Vader's avatar
Debates: 30
Posts: 14,984
5
8
11
Vader's avatar
Vader
5
8
11
-->
@Discipulus_Didicit
947253
Vader
Vader's avatar
Debates: 30
Posts: 14,984
5
8
11
Vader's avatar
Vader
5
8
11
385927

Vader
Vader's avatar
Debates: 30
Posts: 14,984
5
8
11
Vader's avatar
Vader
5
8
11
295834
Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
Using just rules 6 and 11 we see all solutions are some combination of the following sets:

234567
234568
234569
234578
234579
234589
234678

However a little basic arithmetic reveals that it is impossible to have any number higher than 5 on the same 'side' of the solution*

That leaves us with:

234567
234568
234569
234578
234579

We can further rule out any solution containing a 9*

Thus our possibilities are narrowed to:

234567
234568
234578

My hope was that by sufficiently limiting the sets I would be able to churn out solutions easily by simply rearranging digits from the limited sets at random until a solution was found. After doing this for about five minutes however I was unable to come up with any solutions. Back to the drawing board, let's see if we can eliminate any more sets.

And it turns out that we can actually eliminate set 234567*

This may in part explain my failure from a moment ago since that was naturally the set I worked with most during those five minutes since it was at the top of the list.

This means that unless I screwed something up (not at all unlikely, see post 11) the only possible sets for solutions are:

234568
234578

The only confirmed solution in this thread is a combination of one of these sets so that is promising. I am now ready to try brute force on one of these sets.

Annnd presto, after about two minutes of executing the non-random method described in my first post using only numbers of this limited sequence I am finally able to find a solution (though it took well over two minutes to narrow the possibilities down to these two sets... Nearly an hour and a half working on and off. Call it about an hour).

257438

*Explanation for any of these claims available upon request.
Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
-->
@Vader
All three of those break rule 10 lol
Vader
Vader's avatar
Debates: 30
Posts: 14,984
5
8
11
Vader's avatar
Vader
5
8
11
-->
@Discipulus_Didicit
Oh shoot I thought it was 20
Vader
Vader's avatar
Debates: 30
Posts: 14,984
5
8
11
Vader's avatar
Vader
5
8
11
947253
Vader
Vader's avatar
Debates: 30
Posts: 14,984
5
8
11
Vader's avatar
Vader
5
8
11
OH WAIT FIRST 3 TOO
Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
-->
@Vader
That also breaks rule 10.

9 plus 7 alone equals more than 15

You are just typing random answers at this point lol.
Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
Supa supa supa... Lmao
Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
-->
@Vader
Read my long ass post for a few tips and if you have any questions ask. I have a lot of weaknesses but math and logic is not one of them.
Vader
Vader's avatar
Debates: 30
Posts: 14,984
5
8
11
Vader's avatar
Vader
5
8
11
492735

Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
-->
@Vader
LMAO

Rule 9.
Vader
Vader's avatar
Debates: 30
Posts: 14,984
5
8
11
Vader's avatar
Vader
5
8
11
-->
@Discipulus_Didicit

Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
-->
@Vader
Supa: 0
DD: 1
ethang5
ethang5's avatar
Debates: 1
Posts: 5,875
3
3
6
ethang5's avatar
ethang5
3
3
6
-->
@Vader
@zedvictor4
@Discipulus_Didicit
DD was first, but was called on a technicality by using 1.

DD, in your post #16, your answer (257438) violates rules 7 and 10.
And you're forgetting rule 8 in your other musings.

We can further rule out any solution containing a 9*
Are you sure? 

Zed is on board as being the first with a correct answer.

Supa, your answers in post #13 & #14 break rule 10. Your answer in #15 has a 3 next to a 4. A violation of rule 7. But you get kudos for persistence.




Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
-->
@ethang5
DD, in your post #16, your answer (257438) violates rules 7 and 10.
And you're forgetting rule 8.

Ah shit you are right about rule 7. I don't see the violation of 8 or 10 though.
Discipulus_Didicit
Discipulus_Didicit's avatar
Debates: 9
Posts: 5,758
3
4
10
Discipulus_Didicit's avatar
Discipulus_Didicit
3
4
10
-->
@Vader
Supa: 0
DD: 0