Page 1 of 3
Problem 090
Posted: Wed Aug 20, 2008 10:48 pm
by Frisker
So im stuck at problem 90 and I dont know what im doing wrong.
I'm currently trying to with a recursion loop through all the possible combinations of the first cube and taking into account that six also counts as a nine (without having any equivalents), then I do the same thing to the second cube then to check if the two cubes can form every square below a hundred. Im pretty sure that my code gets the right result but that I havn't fully understood the problem.
Some examples of what my program counts as distinct cubes that can form all squares below 100:
{0,1,2,3,4,5} , {0,1,2,3,6,8}
{0,1,2,3,6,8} , {0,1,2,3,4,5}
{0,1,2,3,4,7} , {0,2,5,6,7,8}
{0,1,4,5,8,9} , {0,2,3,4,8,9}
{1,4,5,7,8,9} , {0,2,3,7,8,9}
Anyways, I get the answer to xxxx. Am I anywhere close and does anyone got any idea about what im doing wrong?
Thanks in advance!
Re: P90 help
Posted: Thu Aug 21, 2008 2:21 am
by rayfil
As a start, you should know better that your first two examples are not distinct, i.e.
{0,1,2,3,4,5} , {0,1,2,3,6,8}
{0,1,2,3,6,8} , {0,1,2,3,4,5}
Re: P90 help
Posted: Thu Aug 21, 2008 2:24 am
by JohnMorris
From your examples, the first:
{0,1,2,3,4,5} , {0,1,2,3,6,8}
is the same as the second:
{0,1,2,3,6,8} , {0,1,2,3,4,5}
Re: P90 help
Posted: Thu Aug 21, 2008 2:25 am
by JohnMorris
rayfil wrote:As a start, you should know better that your first two examples are not distinct, i.e.
{0,1,2,3,4,5} , {0,1,2,3,6,8}
{0,1,2,3,6,8} , {0,1,2,3,4,5}
Argh! Yet again, beaten to the punch! I must learn to type faster

Re: P90 help
Posted: Thu Aug 21, 2008 1:23 pm
by Frisker
rayfil wrote:As a start, you should know better that your first two examples are not distinct, i.e.
{0,1,2,3,4,5} , {0,1,2,3,6,8}
{0,1,2,3,6,8} , {0,1,2,3,4,5}
Ah, I found the problem now, thanks for the help!
Edit: one quick question, on problem 98 can I replace a letters with a numbers greater than 9?
Re: P90 help
Posted: Thu Aug 21, 2008 1:41 pm
by daniel.is.fischer
No, only base 10 digits, numbers from 0 to 9.
Re: Problem 090
Posted: Mon Jan 19, 2009 10:38 am
by DNS
Could one digit appear more than once at one cube?
For example,
{0, 1, 2, 3, 4, 8} - {0, 1, 2, 5, 6, 5}
{0, 1, 2, 3, 4, 8} - {0, 1, 2, 5, 6, 2}
{0, 1, 2, 3, 4, 8} - {0, 1, 2, 5, 6, 1}
Re: Problem 090
Posted: Mon Jan 19, 2009 11:00 am
by DNS
Sorry, see that NO
Re: Problem 090
Posted: Tue Aug 18, 2009 9:55 am
by Scorpi0
Hi,
I have a problem with this one, and I don't understand where is my error.
Could anyone give me a hint if I send my python code ?
Here are my first and last results of what I count as a solution :
[[0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 6, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 1, 2, 4, 6, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 1, 2, 5, 6, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 1, 2, 6, 7, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 1, 2, 6, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 1, 3, 5, 6, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 1, 4, 5, 6, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 1, 5, 6, 7, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 1, 5, 6, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 2, 3, 4, 6, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 2, 3, 5, 6, 8, 9]]
[[0, 1, 2, 3, 4, 5], [0, 2, 3, 6, 7, 8, 9]]
[...]
[[0, 4, 5, 6, 8, 9], [1, 2, 3, 4, 6, 9]]
[[0, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 9]]
[[0, 5, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 9]]
[[0, 5, 6, 7, 8, 9], [1, 2, 3, 4, 6, 8, 9]]
[[0, 5, 6, 7, 8, 9], [1, 2, 3, 4, 6, 9]]
Am I misunderstand something about the 6-9 rules ?
Thank you !
Re: Problem 090
Posted: Tue Aug 18, 2009 3:22 pm
by daniel.is.fischer
Didn't see anything wrong with the examples, so I could look at the code (if you explain what you're doing in comments).
Re: Problem 090
Posted: Fri Mar 26, 2010 3:47 pm
by vasilyev
I have problem with this one, as well. I've implemented two independent solutions to the problem (one recursive, another one brute-force), they give me the same answer, but the website rejects it. Here are a few answers (69 refers to either 6 or 9; two 69's in a row means 6 and 9):
0 1 2 3 4 5; 0 1 2 3 8 69
0 1 2 3 4 5; 0 1 2 4 8 69
0 1 2 3 4 5; 0 1 2 5 8 69
0 1 2 3 4 5; 0 1 2 7 8 69
0 1 2 3 4 5; 0 1 2 8 69 69
0 1 2 3 4 5; 0 1 3 5 8 69
0 1 2 3 4 5; 0 1 4 5 8 69
0 1 2 3 4 5; 0 1 5 7 8 69
0 1 2 3 4 5; 0 1 5 8 69 69
0 1 2 3 4 5; 0 2 3 4 8 69
0 1 2 3 4 5; 0 2 3 5 8 69
0 1 2 3 4 5; 0 2 3 7 8 69
0 1 2 3 4 5; 0 2 3 8 69 69
...
0 1 2 5 69 69; 1 3 4 5 8 69
0 1 2 7 8 69; 0 1 3 4 5 7
0 1 2 7 8 69; 0 1 3 4 5 8
0 1 2 7 8 69; 0 1 3 4 5 69
0 1 2 7 8 69; 0 3 4 5 8 69
0 1 2 7 8 69; 1 2 3 4 5 69
0 1 2 7 8 69; 1 3 4 5 7 69
0 1 2 7 8 69; 1 3 4 5 8 69
0 1 2 7 8 69; 1 3 4 5 69 69
0 1 2 7 69 69; 0 1 3 4 5 8
0 1 2 7 69 69; 0 3 4 5 8 69
0 1 2 7 69 69; 1 3 4 5 8 69
0 1 2 8 69 69; 0 1 3 4 5 7
0 1 2 8 69 69; 0 1 3 4 5 8
0 1 2 8 69 69; 0 1 3 4 5 69
0 1 2 8 69 69; 0 3 4 5 8 69
...
0 3 5 8 69 69; 1 2 3 4 7 69
0 3 5 8 69 69; 1 2 3 4 8 69
0 3 5 8 69 69; 1 2 3 4 69 69
0 3 5 8 69 69; 1 2 4 5 7 69
0 3 5 8 69 69; 1 2 4 5 8 69
0 3 5 8 69 69; 1 2 4 5 69 69
0 3 5 8 69 69; 1 2 4 7 8 69
0 3 5 8 69 69; 1 2 4 7 69 69
0 3 5 8 69 69; 1 2 4 8 69 69
0 4 5 7 8 69; 1 2 3 4 5 69
0 4 5 7 8 69; 1 2 3 4 7 69
0 4 5 7 8 69; 1 2 3 4 8 69
0 4 5 7 8 69; 1 2 3 4 69 69
0 4 5 8 69 69; 1 2 3 4 5 69
0 4 5 8 69 69; 1 2 3 4 7 69
0 4 5 8 69 69; 1 2 3 4 8 69
0 4 5 8 69 69; 1 2 3 4 69 69
0 5 7 8 69 69; 1 2 3 4 5 69
0 5 7 8 69 69; 1 2 3 4 7 69
0 5 7 8 69 69; 1 2 3 4 8 69
0 5 7 8 69 69; 1 2 3 4 69 69
I know that neither of these sequences repeat, none of the first cubes are swapped with the second in the resulting answer... In my solution I ignore the constraint 8^2=64, because 7^2=49 is equivalent to it...
Re: Problem 090
Posted: Fri Mar 26, 2010 8:58 pm
by TripleM
The problem specifically states {1,2,3,4,5,6} is distinct from {1,2,3,4,5,9} - are you handling this? It sounds like you are treating each line you wrote above as one solution, where it could easily be more.
Re: Problem 090
Posted: Mon Mar 29, 2010 7:48 pm
by vasilyev
Thank you very much! I suspected that I just understand this problem not correctly, and it turned out to be the case.
Re: Problem 090
Posted: Thu Sep 29, 2011 4:47 pm
by mynameisalreadytaken
I'm having a Problem with understanding how the extended sets work.
Do these Solutions count as 3 distinct arrangements?
{0, 5, 6, 7, 8, 9}, {1, 2, 3, 4, 8, 9}
{0, 5, 6, 7, 8, 9}, {1, 2, 3, 4, 6, 8}
{0, 5, 6, 7, 8, 9}, {1, 2, 3, 4, 6, 8, 9}
Edit: No, they don't. My code just had a bug.
Re: Problem 090
Posted: Thu Sep 29, 2011 5:07 pm
by jaap
mynameisalreadytaken wrote:I'm having a Problem with understanding how the extended sets work.
Do these Solutions count as 3 distinct arrangements?
{0, 5, 6, 7, 8, 9}, {1, 2, 3, 4, 8, 9}
{0, 5, 6, 7, 8, 9}, {1, 2, 3, 4, 6, 8}
{0, 5, 6, 7, 8, 9}, {1, 2, 3, 4, 6, 8, 9}
The extended set mentioned is only a bit trying to explain which numbers can be formed. What is being counted is the arrangements of the numbers, not extended sets. So the first two arrangements you name are distinct, the third is not an arrangement.
Re: Problem 090
Posted: Mon Oct 24, 2011 3:34 pm
by EnDorphin
I need a clarification. In the problem it states that,
Each of the six faces on a cube has a different digit (0 to 9) written on it
This statement states that each faces simply has to have digits written on it. It does not specify that all the digits from 0 to 9 has to be used. So for example, the digit 7 does not necessarily have to be written on any of the faces as it is not required to form a square.
So is this correct or do all the digits have to be used?
Re: Problem 090
Posted: Mon Oct 24, 2011 5:02 pm
by mynameisalreadytaken
You don't have to use every digit in every arrangement.
Re: Problem 090
Posted: Tue Oct 25, 2011 6:30 am
by EnDorphin
So are these all distinct valid arrangements?
{0,0,0,2,6,8},{0,1,3,4,5,9}
{0,0,0,2,6,8},{1,1,3,4,5,9}
{0,0,0,2,6,8},{1,2,3,4,5,9}
{0,0,0,2,6,8},{1,3,3,4,5,9}
{0,0,0,2,6,8},{1,3,4,4,5,9}
{0,0,0,2,6,8},{1,3,4,5,5,9}
{0,0,0,2,6,8},{1,3,4,5,6,9}
{0,0,0,2,6,8},{1,3,4,5,7,9}
{0,0,0,2,6,8},{1,3,4,5,8,9}
{0,0,0,2,6,8},{1,3,4,5,9,9}
Re: Problem 090
Posted: Tue Oct 25, 2011 2:40 pm
by Fogmeister
I would say not as the first cube has the digit 0 on 3 sides which goes against the first line...
"Each of the six faces on a cube has a different digit (0 to 9) written on it"
I would interpret that as meaning each side of a dice has to be different from every other side of that dice.
Re: Problem 090
Posted: Wed Oct 26, 2011 2:12 am
by EnDorphin
Ah... I see. That was the problem.
Thanks.