Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2011-10-14 16:06:08

JonathanS
Member
Registered: 2011-10-14
Posts: 2

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!

Offline

#2 2011-10-14 20:32:17

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 107,182

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.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2011-10-14 22:48:17

JonathanS
Member
Registered: 2011-10-14
Posts: 2

Re: Comination Algorithm, Order Matters, Souce Code

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

Offline

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

bobbym
Administrator
From: Bumpkinland
Registered: 2009-04-12
Posts: 107,182

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.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB