Hello everybody,

I'm working on a project about permutations which needs to deal with very large integers.

I need to retrieve any permutation of a set with an ID (only to find it, not to save it)

With a small number of possibilites (for ex, with 2^

But in my case, I have to deal with something about 30^

That's too much big for an int, even a long.

My question is :

Has anyone worked with integers as large as this ? Is it possible ?

I think yes, but I don't know how to do it.

I just found this post, speaking about java BigIntegers

http://forum.processing.org/topic/every-possible-combination

It looks interesting, but I'm not sure of what it is exactly (creating int as long as I want ?), and I don't know if making operations with integers with a length about 650 000 can be possible without crashing memory or something like that.

Thanks for your help ! :)

I'm working on a project about permutations which needs to deal with very large integers.

I need to retrieve any permutation of a set with an ID (only to find it, not to save it)

With a small number of possibilites (for ex, with 2^

^{3}possibilites, from {1,1,1} to {2,2,2} ) you can easily retrieve {1,1,1} with the ID "0" or {2,2,1} with the ID "3" or {2,2,2} with the ID "7"}, using division, subtraction and modulo operations.But in my case, I have to deal with something about 30^

^{500 000}possibilities. In this case, an ID number can have a length of 650 000 !That's too much big for an int, even a long.

My question is :

Has anyone worked with integers as large as this ? Is it possible ?

I think yes, but I don't know how to do it.

I just found this post, speaking about java BigIntegers

http://forum.processing.org/topic/every-possible-combination

It looks interesting, but I'm not sure of what it is exactly (creating int as long as I want ?), and I don't know if making operations with integers with a length about 650 000 can be possible without crashing memory or something like that.

Thanks for your help ! :)

1