Skip to main content
1-Visitor
January 18, 2013
Solved

Combinations without repetition!

  • January 18, 2013
  • 2 replies
  • 4691 views

I am trying to write a program but it did not work out. Actually, I do not know the programming in Mathcad. Black magic for me.

I want to have the program written in Mathcad because I would have to export a file from the Internet websites and later imported into Mathcad. Too much of this work.

Example of what I want to get on this page:http://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.html


Please see the attached file for more info. Thanks! JK

Best answer by Werner_E

Something like the attached?

Still playing lotto?

2 replies

19-Tanzanite
January 18, 2013

Do you mean something like the attached?

Alan

jkowalski1-VisitorAuthor
1-Visitor
January 18, 2013

I'm sorry but this is not the solution to my problem....

see a *.gif file.

I have a vector(array) of numbers:


Vec:=[5,8,17,33,80]


and I would like to enumerate all the combinations of a subset of three of element.

The result is:

5,8,17

5,8,33

5,8,80

........

........

17,33,80


Total to be 10.

============================================================


Of course, I also want the program to solve various possibilities depending on the vector(array).

An example:

Vec:=[20,31,41,45,65,78,80] to subset of 4 of element.

result is:


20,31,41,45

20,31,41,65

20,31,41,78

................

................

45,65,78,80

Combin(7,4)=35 possibilities

Werner_E25-Diamond IAnswer
25-Diamond I
January 18, 2013

Something like the attached?

Still playing lotto?

jkowalski1-VisitorAuthor
1-Visitor
January 18, 2013

This worked perfectly well. 🙂

I play lotto purely theoretical.

Thanks again. for your time(a lot of time) and help

25-Diamond I
January 18, 2013

I play lotto purely theoretical.

Sure the best way to save money anyway 😉