發新話題
打印

12 Balls

12 Balls

There are 12 balls . One of them is of different weight as others(heaviier or lighter) and other 11 have the same weight

How to use a balance to determine the different ball in 3 times?

Please list your solution

TOP

this question is stupid... any average 10 years old kid could answer this....

I just wanna point out that... the constraints in this problem are not tight,
that's mean if I add one more ball into your problem (13 balls instead of 12),
this problem is still solvable....

pls post in chinese next time....

TOP

SO FUNNY

TOP

Sure I can, but I'll skip on this one...

I've already pointed out that I could solve this problem with 13 balls,
by the way, do you think the 13 balls problem is unsolvable ???
if no, how could you still not believe that I am able to solve the 12 balls problem...  

I could even prove that a 14 balls problem is unsolvable using simple mathematics...

TOP

abcdefghijkl

abcd vs efgh
第一次:一樣重,即有8個真 abcdefgh unknown:ijkl
第二次:abc vs ijk, 一樣重即 l 假, ijk 重或輕即ijk假, 但已知假重或輕
第三次:i vs j, 一樣重即k假, i或j 輕重就睇第二次時假重或輕

第一次:不一樣,即abcd(假設為重邊), efgh(假設為輕邊)加ijkl四個真
第二次:abe vs cdg, 如abe重, 即a,b,g可能假, 如cdg重,即c,d,或e可能假 現假設abe重
第三次: a vs b, 一樣重則e假, a 或 b重則重為假

TOP

13個BALL的確都可以做到

TOP

第一次磅完只有3種結果
對於每個第一次的結果,第二次磅又有3種結果
...
共3^n 種結果, n=次數,可表示3^n 種情況

-m個波有2m種可能性

(以下︰ 結果=重平重.....;可能性=A重/A輕/B重.....)

-可否將同一個波重和輕的可能性用 1 種結果代表︰只可以用在1個身上
若果要知道係邊個波而又磅過佢,就一定知到埋佢係輕左定重左,咁即係會用左2種結果來表示佢係答案;
除了唔磅佢,就可以用1個結果來表示佢,而最多只可以唔磅1個
所以3^n種結果可以表示3^n+1種可能性,3^n +1>=2m

-可否每一次磅都將可能性平分成3種︰第一次不能
因為第一次磅左右兩邊要同樣數目的波 k,若左邊重則表示可能左邊一個波重或右邊一個波輕,共2k種可能性,理想是3^(n-1)種;
最多︰
左重: 3^(n-1)-1種,右重︰3^(n-1)-1種,平︰3^(n-1)+1 種 (因有一個波輕和波重可以用一個結果代表)
共可表示3^n -1 種可能
所以3^n-1>=2m
n=3的話,m<=13
(如一開始加多一個已知不輕不重的波就可以免了這個限制,使m<=14;也因如此,第1次磅完以後也不受此限)
(如要知道埋輕定重,m<=(3^n-2)/2,加多一個"真"波︰m<=(3^n)/2)

-要找方法磅,只要確保磅完後各輕、重、等的可能性(<)=可能的結果 就很好找到

TOP

發新話題