Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3809614
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:19:57+00:00 2026-05-19T15:19:57+00:00

Hi I am using Mathematica 4.0. I am trying to find all the permutations,

  • 0

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…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T15:19:58+00:00Added an answer on May 19, 2026 at 3:19 pm

    In Mathematica 5.1 and higher, there is a function Tuples which does what you want. You may try

    getTuples[elements_List, length_Integer] :=
      Flatten[Outer[List, Sequence @@ Table[elements, {length}]], length - 1]
    

    For example:

    In[6]:= getTuples[{0, 1}, 3]
    
    Out[6]= {{0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {0, 1, 1}, {1, 0, 0}, {1, 0, 1}, {1, 1, 0}, {1, 1, 1}}
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use Mathematica's NDSolve[] to compute a geodesic along a sphere using
I'm using Mathematica 7. I have an interpolated function, here's an example: pressures =
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
I'm trying to convert Chinese lunar system to Gregorian using Perl, both for fun
I'm currently reading the Mathematica Guidebooks for Programming and I was trying to work
I'm trying to build a C++ extension for python using swig. I've followed the
I'm trying to run a Mathematica program (that I didn't write) locally. I have
I'm trying to plot points that I've created in a table in mathematica but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.