Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: √ ∞ ≠ ≤ ≥ ≈ ⇒ ∈ Δ θ ∴ ∑ ∫ π -

Login

Username

Password

Not registered yet?

#1 2011-10-15 15:06:08

JonathanS
Novice

Offline

Comination Algorithm, Order Matters, Souce Code

Hello, I visited mathsisfun.com/combinatorics/combinations-permutations-calculator.html and would like to get the source code for the combination where order matters and no repeats.

The one that is n!/(n-r)!

I would be using it for a program I am making that outputs all possible tetrahedral molecules.

Thanks!

#2 2011-10-15 19:32:17

bobbym
Administrator

Online

Re: Comination Algorithm, Order Matters, Souce Code

Hi JonathanS;

There is some confusion here.

like to get the source code for the combination where order matters and no repeats.

When order matters it is called a permutation.


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

#3 2011-10-15 21:48:17

JonathanS
Novice

Offline

Re: Comination Algorithm, Order Matters, Souce Code

ah k, got to google some algorithms for permutations, thanks!

#4 2011-10-15 23:15:02

bobbym
Administrator

Online

Re: Comination Algorithm, Order Matters, Souce Code

Hi JonathanS;

You should be able to find many of them.


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.

Board footer

Powered by FluxBB