- --- In speedsolvingrubikscube@yahoogroups.com, Richard Patterson

<richy_jr_2000@y...> wrote:> With over 43 quintillion different combinations, does

I had some fun learning how to use Java's BigDecimal class, here's the

> anyone know the actual odds of solving it by accident?

> Say, 1000 random turns...can that be figured out?

result (number of turns vs. probability to accidentally solve). I used

1000 digits precision.

10^0 : 0.0000000000000000000231203163

10^1 : 0.0000000000000000002312031638

10^2 : 0.0000000000000000023120316385

10^3 : 0.0000000000000000231203163852

10^4 : 0.0000000000000002312031638520

10^5 : 0.0000000000000023120316385202

10^6 : 0.0000000000000231203163852017

10^7 : 0.0000000000002312031638519936

10^8 : 0.0000000000023120316385175310

10^9 : 0.0000000000231203163849347630

10^10 : 0.0000000002312031638252929242

10^11 : 0.0000000023120316358474586107

10^12 : 0.0000000231203161179275247580

10^13 : 0.0000002312031371245709479730

10^14 : 0.0000023120289657771148207966

10^15 : 0.0000231200491127469735292260

10^16 : 0.0002311764384602375115896654

10^17 : 0.0023093609520051823138659937

10^18 : 0.0228550898430060057068061681

10^19 : 0.2064217767522700322187135016

10^20 : 0.9009402067081038970925219248

10^21 : 0.9999999999090140835069998078

10^22 : 0.9999999999999999999999999999

Isn't it funny how the numbers look very similar for a long time? And

here are the reciprocal values:

10^0 : 43252003274489856000.000000000

10^1 : 4325200327448985600.4500000000

10^2 : 432520032744898560.49500000000

10^3 : 43252003274489856.499500000000

10^4 : 4325200327448986.0999500000000

10^5 : 432520032744899.05999500000000

10^6 : 43252003274490.355999500000001

10^7 : 4325200327449.4855999500000192

10^8 : 432520032745.39855999500019266

10^9 : 43252003274.989855999501926693

10^10 : 4325200327.9489855999692669303

10^11 : 432520033.24489856018766930321

10^12 : 43252003.774489857926193032100

10^13 : 4325200.8274490048668803210016

10^14 : 432520.53274509122929820999981

10^15 : 43252.503276416549031583004599

10^16 : 4325.7003467159159037864998179

10^17 : 433.02022541418460481598214744

10^18 : 43.753929950356976451685197428

10^19 : 4.8444501143894109135381508565

10^20 : 1.1099515734277697062526475446

10^21 : 1.0000000000909859165012786291

10^22 : 1.0000000000000000000000000000

So assuming that guy twisted for a full day at one twist per second,

i.e. he came across 24*60*60=86400 states, the chance that he truely

solved it is less than 1 out of 432520032744899.

Cheers!

Stefan

P.S. Here's my code:

import java.math.*;

class RubikLuckySolve {

static BigDecimal big ( int n ) {

return scale( new BigDecimal( n + "" ));

}

static BigDecimal one = big( 1 );

static BigDecimal div ( BigDecimal a, BigDecimal b ) {

return scale( a.divide( b, a.ROUND_HALF_EVEN ));

}

static BigDecimal mul ( BigDecimal a, BigDecimal b ) {

return scale( a.multiply( b ));

}

static BigDecimal sub ( BigDecimal a, BigDecimal b ) {

return scale( a.subtract( b ));

}

static BigDecimal scale ( BigDecimal a ) {

return scale( a, 1000 );

}

static BigDecimal scale ( BigDecimal a, int scale ) {

return a.setScale( scale, a.ROUND_HALF_EVEN );

}

static BigDecimal power( BigDecimal base, int exp ) {

BigDecimal result = one;

while( exp-- > 0 )

result = mul( result, base );

return result;

}

static String nice ( BigDecimal a ) {

return (a+"").substring( 0, 30 );

}

public static void main ( String[] args ) {

BigDecimal n = one;

for( int e=1; e<=12; e++ )

n = mul( n, big( 2*e ));

for( int c=1; c<=8; c++ )

n = mul( n, big( 3*c ));

n = div( n, big( 12 ));

for( int k=0; k<2; k++ ){

BigDecimal foo = sub( one, div( one, n ));

for( int i=0; i<23; i++ ){

System.out.print( "10^" + i + " :\t" );

BigDecimal bar = sub( one, foo );

System.out.println( nice( (k==0) ? bar : div( one, bar )));

foo = power( foo, 10 );

}

System.out.println();

}

}

} - The 18/432... is only correct if you try *all* 18 moves. But you only

try one.

Stefan

--- In speedsolvingrubikscube@yahoogroups.com, "Minh" <minh144@y...>

wrote:>

> Sorry in advance if I just made a complete fool of myself, - but

> since, from the solved cube you can create 18 different permutations

> (R, R', R2 --> same with FBUDL), doesn't that mean that there is a

> 18/43252003274489856000 chance of the next turn producing a solved

> state? Maybe my logic is stuffed, since probability isn't one of my

> best topics... but that's how I think of it as..

> so P(1000 turns) = 1 - ((43252003274489856000-

> 18)/43252003274489856000) ^ 1000

>

> = approx 4.16^-14 % chance???...

>

> Minh

>

> --- In speedsolvingrubikscube@yahoogroups.com, cmhardw

> <no_reply@y...> wrote:

> > The chance that the next turn produces the solved state is

> > 1/43252003274489856000 so the chance that in 1000 turns you see

> the

> > solved state at least once should be

> >

> > 1-(43252003274489855999/43252003274489856000)^1000

> >

> > or roughly 2.31*10^-15 % chance

> >

> > Chris

> >

> >

> > --- In speedsolvingrubikscube@yahoogroups.com, Richard Patterson

> > <richy_jr_2000@y...> wrote:

> > > With over 43 quintillion different combinations, does

> > > anyone know the actual odds of solving it by accident?

> > > Say, 1000 random turns...can that be figured out?

> > > -Richard