0

hey so I am trying to calculate the amount of possible combinations of a 2000x2000 rubik's cube, and i written this code in python to calculate it, as online calculators i use and physical calculators all yielded no results. Do i need a beefier computer? or is this just simply unachievable?

the actual equation is 10^(((3.26017)*((2.00214)^(2000)))-6.51938), by normal calculator notation. If any of you can calculate it for me, please send me like a copy paste thing of the code if possible, thanks.

     import decimal
>>> decimal.getcontext().prec = 10000
>>> decimal.Decimal(10)**((decimal.Decimal(3.26017))*((decimal.Decimal(2.00214))**(decimal.Decimal(2000))))-(decimal.Decimal(6.51938))
Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    decimal.Decimal(10)**((decimal.Decimal(3.26017))*((decimal.Decimal(2.00214))**(decimal.Decimal(2000))))-(decimal.Decimal(6.51938))
decimal.Overflow: [<class 'decimal.Overflow'>]

PA IN
  • 11
  • 1
    You should always do a rough estimate first. The result has more the 2\*\*2000 digits, a number that is greater than the number of atoms in the universe. You need to rethink how to express this value. Working in logs (base 10) would be do-able. – President James K. Polk Apr 25 '21 at 15:11
  • Where did you get the formula from? I doubt that it's correct: the true number must be bounded by `(6 * 2000 * 2000)! / (2000*2000)!^6` (the number of possible permutations of the surface colours), which is a number that's _much_ smaller than the one you give. – Mark Dickinson Apr 26 '21 at 17:04
  • (The actual number has somewhere around 15.5 million digits, so it should be reasonably easy to compute with appropriate big number libraries.) – Mark Dickinson Apr 26 '21 at 17:11

1 Answers1

0

2.002142000 is a number of over 600 digits. Multiplying it by about 3 and subtracting about 6 won't change that much.

The problem is that you then want to raise 10 to this power. 10 to the power of this number isn't a number with 600 digits, it's a number where the number of digits has 600 digits. To store this number in memory you would require of the order of 10600 bits. An exabyte (assuming you could get a computer with this much memory) is only about 1019 bits.

In short, your number is way too large to be calculated.

Luke Woodward
  • 63,336
  • 16
  • 89
  • 104