Hi I am using Mathematica 4.0. I am trying to find all the permutations, for example, say there are two numbers 0 & 1. I am trying to generate all permutations using these two numbers in 3(say) places with repetition i.e. like {1,1,1},{1,1,0},{1,0,1},{1,0,0}… Also I am trying to put each of the permutation in an array. Is there any code or command in Mathematica 4.0 by which I can do all these things. Please help me in this task…
Share
In Mathematica 5.1 and higher, there is a function
Tupleswhich does what you want. You may tryFor example:
But I don’t know if this works in M4.0. It should, I guess, but I can not check. Generally, you will face tons of difficulties of various kinds working with such an obsolete version as 4.0, including lacking the functionality, inferior performance and interface (front-end), certain bugs that were fixed in later versions, incompatibility with code written in later versions, and getting help. This is especially true for Mathematica given huge advances in all sorts of directions introduced since 4.0. So, if you plan to use it regularly, I’d strongly suggest to upgrade.