Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2016-06-30 22:30:05

ptm
Member
Registered: 2016-06-30
Posts: 10

Permutations?

Hello to the members of the "Math is fun forum"!
Please help me to find the solution for my problem.

I have a spreadsheet with 4096 cells in one row , with 4096 unique values in it.
I would like to arrange them in a different order.
How many rows would I need to arrange them in all possible ways?
Such as:
1,2,4096,3,4....
10,12,14,1,4095...
...
It would need 4096! rows.

I would like to extend the columns to 65536.
Copy/Paste the available 4096 values into it 16 times.

After that how many rows would I need to mix-arrange them in all possible permutations?
Such as:
1,3,3,4096,4095,2,2,2,2,2,2,11,257,8,8,8,8,8,8,8,8,...
4095,4096,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3...
...

Thank you.

Offline

#2 2016-06-30 23:59:39

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Permutations?

But excel fails to give an answer. Of course even 4096! fails on excel sheet.

Last edited by thickhead (2016-07-01 00:02:52)


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#3 2016-07-01 00:20:37

ptm
Member
Registered: 2016-06-30
Posts: 10

Re: Permutations?

Thank you!
I'll try it with my compiler and let you know the result.

Offline

#4 2016-07-01 01:21:32

ptm
Member
Registered: 2016-06-30
Posts: 10

Re: Permutations?

16!=2.0922789888e13
2.0922789888e13^4096=2.085392997397824e54559

65536!=5.162948523097533e+287193

5.162948523097533 e+287193 / 2.085392997397824e54559

I don't really need precision so I round it down:
1.0e287193 / 1.0e54559=1.0e232634

That is larger than (4096!)^16 and smaller than 65536! just as expected.

Thank you very much for your effort, thickhead!

Offline

#5 2016-07-03 11:34:01

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Permutations?

Hi;


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#6 2016-07-03 18:23:24

ptm
Member
Registered: 2016-06-30
Posts: 10

Re: Permutations?

Thank you, Bobbym!

Seems my 64 bit long double needs to be changed to a 80 bit long double...
(long and long double have the same size with my compiler: 64 bits)

Offline

#7 2016-07-03 18:59:53

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Permutations?

Hi;

You can use Wolfram Alpha.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#8 2016-07-03 20:58:33

ptm
Member
Registered: 2016-06-30
Posts: 10

Re: Permutations?

Wow! Excellent tool!
Thank you, Bobbym!

Offline

#9 2016-07-04 01:24:43

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Permutations?

Hi;

You are welcome.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#10 2016-07-04 22:16:47

ptm
Member
Registered: 2016-06-30
Posts: 10

Re: Permutations?

Great team here!
I would like to ask your opinion.

In my earlier example I've used 4096 values.
4096 values 16 times  = 65536

There are 6542 prime numbers between 0 and 65536.
No. 2 is not usable for my project so there are left 6541.
They don't fit exactly into my 65536 cells.
I can use them only 10 times, there are left 126 empty cells.
65536-(10*6541)=126

The 126 empty cells can be filled with the first 126 values from the 6541.

(10*6541)+126=65536


Is it possible to calculate all the permutations now?

Should I use the 6541 values...
…or should I stick to  4096*16?

Thank you!

Offline

#11 2016-07-05 00:31:31

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Permutations?

Last edited by thickhead (2016-07-05 04:22:56)


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#12 2016-07-05 07:41:14

ptm
Member
Registered: 2016-06-30
Posts: 10

Re: Permutations?

Thank you Thickhead!

Offline

#13 2016-07-06 18:08:17

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 24,974
Website

Re: Permutations?

We should move this thread out of `Formulas`


'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.

Offline

#14 2016-07-06 22:35:40

ptm
Member
Registered: 2016-06-30
Posts: 10

Re: Permutations?

Please give me the formula that how to calculate when I have 2 or more than 2 times 65536 cells in the row.
I'll try to figure out from that that how many are the all possible permutations.
Thank you guys!

Offline

#15 2016-07-07 09:51:32

ptm
Member
Registered: 2016-06-30
Posts: 10

Re: Permutations?

To understand that why would I need to know the permutations I included fragments of the program I'm coding in C++:

Offline

Board footer

Powered by FluxBB