Permutation (Function)

image\trumpet2.gif Disclaimer

The Permutation function calculates the number of permutations for a given number of objects that can be selected from a range of objects.

Syntax

Permutation(Num, NumChosen)

Returns (Double)

A numeric value containing the number of permutations for a given number (NumChosen) of objects that can be selected from number objects (Num).

Parameters

Name

Type

Description

Num

Numeric

Sets the number of bars to be considered.

NumChosen

Numeric

Sets the number of objects within the range (Num) that can be selected.

Usage

A permutation is any set or subset of objects or events where internal order is significant. If Num <= 0, NumChosen < 0, or Num < NumChosen the Function will return a -1. -1 will also be returned if there is a divisor of zero within the calculation.

Example

Assigns to Value1 the number of permutations for a range of 50, containing permutations with 3 elements:

Value1 = Permutation(50, 3);