Hello,
I am new to Mathematica and I want to create the following list.
Suppose that each entry of a N-dimensional vector can be 0 or 1. How do I obtain all possible N-dimensional vectors where each entry could be 0 or 1?
I was able to write the following code but it only works for small N.
I don’t think that N=100 is feasible. There are 2^{100} different tuples of dimension 100 consisting of entries one and zero. That’s a rather large number.
2^100
(*1267650600228229401496703205376*)
That is a huge number. One entry such as \{0,0\} requires 88 Bytes.
ByteCount[{0, 0}]
(*88*)
If we multiply that by 2^{100} we get a really large number. Rough estimate (might be wrong) is that you need about 10^{19} 1 TB hard drives to store that amount of data.
Tuples[{0,1},63]
(*Tuples::toomany: The length of the output of Tuples[{0,1},63] should be a machine integer. >>*)
Tuples[{0,1},62]
(*General::nomem: The current computation was aborted because there was insufficient memory available to complete the computation.*)
So there is a system issue, i.e. address the array, and also there is a memory issue.