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.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

#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.
Probability is the most important concept in modern science, especially as nobody has the slightest notion what it means.
90% of mathematicians do not understand 90% of currently published mathematics.

Board footer

Powered by FluxBB