Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Graphical Spellbreaker cubes game

3 views
Skip to first unread message

Russell Glasser

unread,
Nov 25, 2009, 12:05:26 PM11/25/09
to
I made this for fun.
http://www.apollowebworks.com/russell/java/cubes.html
Thought it might stir up a little nostalgia. Feeback is welcome.

--
Russell Glasser
Are you a geek? Love the internet, games, and artificial
intelligence? Check out my professional blog at
http://castlesofair.blogspot.com

Captain Mikee

unread,
Dec 8, 2009, 11:25:46 AM12/8/09
to
On Nov 25, 12:05 pm, Russell Glasser <rglas...@apollowebworks.com>
wrote:
> I made this for fun.http://www.apollowebworks.com/russell/java/cubes.html

I love it!

Daniel Giaimo

unread,
Jan 4, 2010, 9:50:57 PM1/4/10
to

Any chance you could provide a hint as to how to solve this? I have a
solution which works 75% of the time, but I can't seem to find one which
works all the time. Here it is in case you can give a hint as to what I
am doing wrong.

<SPOILER SPACE>


First I split the cubes into four groups of three: Group A is 1,2,3;
group B is 4,5,6; group C is 7,8,9; and group D is 10,11,12. I then
compare A with B and A with C. Depending on the outcome of these
comparisons, the bad group is identified. If the bad group is one of A,
B, or C this also tells us whether the bad cube is more or less magical
than the others. In this case we simply compare any two of the three
potentially bad cubes which then tells us which one is the bad cube.
Unfortunately, if the bad group is D, then we can't tell with a single
comparison which cube is the bad one, so the solution falls apart in
this case. If we knew the bad cube was more magical, then we would have
a solution in this case as well. Any thoughts as to what I'm doing wrong?

--
Dan Giaimo

Gene Wirchenko

unread,
Jan 5, 2010, 12:52:09 AM1/5/10
to
On Mon, 04 Jan 2010 21:50:57 -0500, Daniel Giaimo <dgi...@gmail.com>
wrote:

This is a variation of an old coins problem. Try groups of four,
and do not assume that each cube has to be in the measurements the
same number of times.

Sincerely,

Gene Wirchenko

Captain Mikee

unread,
Jan 5, 2010, 1:43:09 PM1/5/10
to
The trick with this problem is that there are THREE possible outcomes
of each weighing, not just two. So you want to get useful information
out of any of those three outcomes every time.

Gene Wirchenko

unread,
Jan 5, 2010, 9:10:07 PM1/5/10
to

I know. I have solved it myself. From an assignment in the math
course I took last semester:


a. You have 9 coins, one of which is counterfeit and either heavier
or lighter (you don't know which) than a real coin. Determine the
counterfeit and whether it is heavier or lighter in three weighings
using a balance scale.

(redacted)

5. (Classic)

b. Now do the same thing with 12 coins.


I had seen this problem before, but I did not remember it all.
I did take a look at a Website that had a number of answers. There
were no explanations. I remembered enough that I could have explained
an answer, but I decided to try to reconstruct an answer. Once again,
Jon Noel and I teamed up.

The Part I Came Up With

This is what I had worked out prior to teaming up.

Each weighing can have three possible results: left side low,
balanced, and right side low. With three weighings, there are 27
possibilities. If 24 of these could be mapped one-to-one to the 24
possibilities of coin 1 to 12 either lighter or heavier, this would
give a solution.

Let "/" indicate left side low, "-" indicate balance, and "\"
indicate right side low. If the counterfeit coin being heavier would
give a certain result, say "\-/", then the coin being lighter would
give the opposite result "/-\". The transformation is:
\ to /
/ to \
- to -
Each of the 27 possibilities has an opposite except for "---" (which
is useless anyway since it gives no data about lighter or heavier).

I tried to solve this assuming that each coin should appear in
the same number of weighings. There is no distinguished coin at the
start, so this is a reasonable assumption. It is also wrong. It only
generates those possibilities having exactly two weighings with "/" or
"\". Since there are only twelve of these, this approach does not
work.

The Part that Jon Came Up With

Jon got the idea of starting from the desired result and
working backwards. Let the coins be named A to J. This set of
weighings will work:
ABCD EHIL
ACFI BGHK
ADEJ BCFG
Jon got this particular arrangement empirically, and I verified it.

The mapping of the results is:

Counterfeit Result If Result If
Coin Heavier Lighter
A /// \\\
B /\\ \//
C //\ \\/
D /-/ \-\
E \-/ /-\
F -/\ -\/
G -\\ -//
H \\- //-
I \/- /\-
J --/ --\
K -\- -/-
L \-- /--

The arrangement is such that there are four "\"s, four "-"s,
and four "/"s for each weighing for each of heavier and for lighter.
This reflects that each weighing has four coins on each side with four
not being weighed.

Further Analysis

This is all my work done after the fact.

"column" refers to the Result If Heavier column or the Result
If Lighter column.

There must be 24 "\"s and "/"s in total for each result
column. There are thirteen pairs to select twelve from with a total
of 27. The one pair that is eliminated must be one with no "-"s in
it.

I suspect that it does not matter which one of the four no "-"
pairs is eliminated, but I have not verified this in detail.
Apparently, whatever the difference in "\" and "/" count, it can be
adjusted by reversing the columns for one or two of the one "/" or "\"
in a column pairs or one of the two "/" or "\" in a column pairs.

There are four ways to select the pairs to use. There are 12!
ways to map the selected pairs to coins. There are a number of ways
to transform a solution to another solution by swapping pairs'
elements while keeping the counts the same. I did not try to
determine this value. With the just first two factors considered,
this problem has 1,916,006,400 solutions.

Sincerely,

Gene Wirchenko

0 new messages