last day (16 days later) » 

4:11 AM
hi mdc
:)
 
hi
anyone else to add to this room?
 
I'm not sure how useful the author would be..
but they may be willing to discuss
 
I'll add them then
have you talked to them in another room about this?
 
yep
Green Llama
 
ah
 
4:13 AM
notice the update in the question
"we can do better..."
 
yeah... I'm working on a flowchart-type thing to see what I can do
I don't even know how to approach it though
 
someone was bruteforcing it in code..
 
that's a bit lame
 
and someone was scouring oeis for the pattern
 
either of them work?
 
4:14 AM
well for 12 coins it was taking was too long
*way
not that I know of...
 
what did they get for 6?
 
I check oeis too and found nothing
I don't know
I'll look at the transcript - I believe they said
 
I can't add author to the room for some reason
 
"Sp3000: I expect 4 for 6"
didn't say definitely
 
That's what I think...
 
4:18 AM
why?
so with 1 more weighing... we can do 2 more coins :O
 
6 in 5 seems inefficient, at least the way I've found it
Total switch in my method though
 
4 in 3 means that 6 in 5 is trivial
just weight the other 2 alone :p
 
Yeah
 
I said 4 seemed arbitrary.. author said "yes, just put more on".
approximately
 
But extending the method like I did gives you 6 in 5
 
4:19 AM
maybe one of those steps is ending up redundant..
oh, so how does it sound for 6 using your method?
 
it just extends it, and at the end you can measure 3 coins in 1 move but with 1 extra move
bad explanation, my bad
last move of my current solution lets you weigh 2 coins in 1 move
last move of the new one weighs 3 in 1 move, but you need an extra step to get there
 
ah i see
hey mdc... in your method everything is unknown till the very last weighing... this will probably be the case for the generalisation as well
 
yeah
hang on I'm in the middle of a 6 in 4 solution... give me like 5-10 minutes
 
4:52 AM
crap
didn't work
 
lol :p
what did you try?
 
weighing 3 coins then switching 2 of them
it might actually work i just got really stuck in one spot
 
5
A: Fewest possible weightings to determine which ball is heavier/lighter

klm123You can not do it in 2 weightings. Let's prove it step by step. Initially you have 8 possible combinations: 1st ball is heavier, 1st ball is lighter, 2nd ball is heavier, .., 4th ball is lighter. So you must be able to set correspondence between outcomes or 2 weightings and 8 combinations. Ea...

2
Q: $N_{max}$ balls in 3 weightings

klm123This is a small generalization of well known 12 balls puzzle: You are given two-sided scale and some number of balls. All balls have the same weight but one. It is of a different weight, although you don't know whether it's lighter or heavier. You are allowed to do only 3 weighings to determi...

going by those old questions... maybe the solution will be something like... there is a certain way to do weighings with some pattern of 6 at a time
 
except these are two sided scales which makes it harder
i think
 
I would've thought it'd be easier :p
well we know that the solution for 12... with a balancing scale.. is 8 weighings
 
5:01 AM
how is that accomplished
 
i.e. when we're trying to determine the weights of all the coin
 
never mind i found it
 
not just finding one which is odd
 
ah... so we do have to incorporate all 12 coins in one process
 
possibly
why do you think that?
 
5:05 AM
sort of unrelated, but i think we need to because the author wouldn't have posted it as 12 if we only needed to do a solution for 4 coins 3 separate times
unless he wanted it to be like the 12 balls problem
 
could just be a red herring..
like 6 in 4
twice might be acceptible
 
yeah which would really suck
 
I don't think we can tell
 
has he told you the minimum amount of moves?
 
you reckon we can do 12 in 7 or something?
 
5:07 AM
no probably not
cutting out 5 moves seems like a stretch
 
then 4 in 6... and thus 12 in 8 should be fine?
I mean... 6 in 4
 
hopefully
one thing i have figured out is how I managed to get rid of one move in the 4 in 3 solution
 
n =12 -> 8
well I mapped it out a little bit
01 = 1 ambiguous
10 = 1 ambiguous
0 1 = 1 ambiguous (but c_2 = c_3)
1 0 = 1 ambiguous (but c_2 = c_3)
000 = 0 unique
001 = 1 unique
110 = 2 unique
111 = 3 unique
 
yeah
the last move we know that c_2 and c_3 are the same, so we have a group of c2 and c3, then a group of c4
it turns into a binary sort of grouping
if we could extend it, maybe we could have a group of c1, then c2 and c3, then c4, c5, c6, and c7
 
yep, but doing it for 6 isolate first might be less soul killing
 
5:12 AM
yeah definitely
just curious what time zone are you in?
 
+10 GMT
4pm here
 
oh its 11pm where I am
 
USA?
 
yeah
you in australia?
 
yep :)
what do you think about weighing some arrangement of 3 coins... for the 4 weighings and deducing something from that?
this just reminds me heavily of that "schedule" method from the balance scales method
000 = 0 unique
001 = 1 unique
110 = 2 unique
111 = 3 unique
that is the interesting part about your solution
 
5:16 AM
yeah
if we could get this along with 3 other coins found in just 3 moves, then our last move could give us 6 in 4
 
5:40 AM
alright, i have to go to bed
11:40 here... i can work on this more tomorrow
 
ok mate
@mdc32 till next time!
 
 
10 hours later…
3:49 PM
Whoa. That last answer... I think I understand what you're saying, but it went a bit over my head
 
4:02 PM
hi mdc :)
@mdc32 are you around?
I'd be happy to walk through it
but it will probably be useless with actually solving it :p
 
4:25 PM
type @d'alar'cop when you want me to see it, see you later mate :)
 
5:21 PM
@d'alar'cop
I'm on now, i have like an hour or so
 
hi mdc
 
hi
 
ok
what's on your mind..
 
so i'm still confused about your answer
i don't really know most of the symbols you're using... I'm only in 9th grade
 
oh ok, well you're doing fantastically then
you solved the problem :)
so which symbols?
 
5:23 PM
well, not really symbols
i understand hamming weight and base 13, but i don't see what this helps with for the problem
like i don't understand the connection
 
right
well you get encoding the weights as 0 or 1
 
yeah
 
so 12 coins means..
a binary number that's 12 symbols long
they are all unique and they each describe one of the arrangement that we are trying to crack
 
i got that
 
ok
so now the largest subset you can get from them is all of them..
and the greatest weight it can have is 12
so to express the possible weights for that subset..
you need from 0-12. i.e. base-13
 
5:26 PM
ah
 
so, now we have 4 (for the case of 6)
 
so it helps give each possible hamming weight a unique symbol, so we need base 13
 
yes
now we can weigh 3 times.. and all we get is a weight... nothing else
so with 4 weighings... we have 4 hamming distances for those subsets we picked
let's say we weight them all... and they are all 20 grams..
 
yes
 
6666
useless... but that's how it works.. same idea for 12
 
5:28 PM
ok
 
so.. what I'm saying is that that encoding needs to give us something that we can use to deduce what all the weights are
and we do that by mapping these results to the possible binary numbers
 
so its more of a good way to test possible answers
 
it's just a formal description to the problem.. and possibly would help with coding it up
it's a problem specification really
 
i could probably whip up some program, but i don't even know what i would test
 
yes, I wouldn't worry about a program..
in fact, the useful thing about that whole thing... is really that we are looking for a sequence of weighings that would give unique reesults..
test it with your own 3 for 4 example
in the last one... the last hamming weight can be 0 1 2 or 3
and that's the disambiguator that makes the whole thing clear and map to a specific combination
 
5:31 PM
yes
because there are distinct outcomes if the weight is 0 1 2 or
3*
 
yep, although the previous ones may not be unique (they are not)
e.g. 11X ...
could still be anything
 
so to get 6 in 4, we either need two places where the hamming weight produces 4 outcomes, or 1 case where it produces 6
 
in the first weighing... we weighed the subset.. coin 1 and 2
it probably will never need to be 6
like we only get up to 3 in yours
 
yeah
 
yet we have 4 coins.. it's clear that every coin needs to go on at least once
we probably end up throwing the last 3 or 4 on in the case of 6
 
5:34 PM
yes
 
it'll be the disambiguator
 
but we can't have two unknown coins in the last weighing
 
maybe we should do all the easy cases first... like where we weigh 2 and they're all equal
exactly :)
 
which means the first 3 weighings contain 5 or 6 of the coins
 
5 of them
and the last will use the 6th..
(*probably)
 
5:36 PM
that's actually pretty useful
 
now it would be easier to code actually... we've (you've really) found quite a lot of optimisations
 
code as in program,?
 
yes
but I think we can get it now..
 
that should be easy, but i can't think of a way to test it efficiently
 
well you'd need to try all the possible weights of 6 coins
 
5:38 PM
oh thats only 64
 
from 0 to 2^6
 
that's not too bad
 
yeah
but you need to test all the possible subsets...
 
subsets of what?
 
which is powerset of 6... 2^6 (only 64 again)
because when you put some coins on the scale.. we are taking a subset
 
5:39 PM
yeah... that would be quite a bit harder
 
so in the first weighing... we can try 2^6 weighing... then we need to do 3 more... so it's actually (2^6)^4
not so easy actually
 
thats a lo
lot*
 
* we can try 2^6 possible subsets to weigh...
yes
 
ill see if I can figure something out... i have to leave soon for about a half hour
 
ok
well we can eliminate certain possible subsets of the coins to weigh
all 6... 0... 1...
that's only 8 in total :p
 
5:42 PM
are reversed subsets necessary>
like 000111 and 111000
 
yes
 
crap
so now we're still at how many subsets
 
because that's coin 1, 2 and 3 all weigh 10 and 4,5,6 weigh 20.... and the other is 1,2,3 weigh 20... and 4,5,6 weigh 10
2^6 - 8
 
so 56
wait what are the 8 we removed?
 
well we won't weigh just 1 coin
 
5:44 PM
oh
 
that's 6 ways to do that... we won't weigh 1 or all 6...
*0 or all 6... =2
Actually yeah, sorry, 000111 and 111000 are not the subsets.. they are the possible combinations of weights
 
so 56^4 now
well actually not 56^4... its 56P4
 
almost 10 million :p
 
yeah
i don't have a good enough computer for that
 
hmmm... yeah 10,000,000 is not that bad..
however... we need to do that for every single one of the 64 possible combinations of the coin weights...
640,000,000 :O forget it
 
5:47 PM
yup
well its more like 620,000,000 because all 0s or all 1s don't matter
 
so the strategy would be: for every single combination of weights... go through all the possible subsets for each of the 4 weighings and when the pattern gives a unique way to identify the coin weighs... we keep it... then do the next combination of weights and keep the weighing patterns which we identified earlier...
no wait... scratch all that
the outer-most loop is the possible subsets...
then we can abandon if we find a set of subsets which handle all the possible coin-weight combinations
 
outer loop is possible subsets of what? coin weights or coins to weigh?
like 2^6 or 2^6-8
 
coins to weigh
yes, but it'll be 4 loops on the outside... each one has (2^6)-8
for each of the possible subsets of the coins to try in on the scale
the outer-most one of the 4 will represent the first use of the scale... and so forth
then inside the 4.... we need to try all the 64 possible weight-patterns of the coins
if the weights for all the coin weigh-patterns are all unique under the subsets represented by the 4 loops then we win :D
 
ok I think that's more manageable
i mean not really it'll be slow as ever but I could code it
 
yep... I might do it too
now that the strategy is so clear :p
 
5:56 PM
what languages can you code in?
 
Java.. C++... JS... PHP...
 
i know java and js so we could probably do some js work
 
I think JS is probably too slow for this
 
yeah
 
C, C++ or Java are probably ideal
 
5:58 PM
thats what I was thinking
 
if we both do Java then we can swap code :)
 
ok that works
I'll be back in like half an hour, and I can write something then
 
ok cool
see you later mate
again, make sure to use @ if you want me to see it
 
 
4 hours later…
10:30 PM
it doesn't currently work.. it seems to be implying that there is no solution for 6 in 4...
 

  last day (16 days later) »