Συνδυαστική Ανάλυση

Catalan
Catalan (n)

Δίνει τον nστό αριθμό Catalan.

See Planetmath for more information.

Combinations
Combinations (k,n)

Δίνει όλους τους συνδυασμούς των k αριθμών από 1 μέχρι n ως ένα διάνυσμα διανυσμάτων. (Δείτε επίσης NextCombination)

See Wikipedia for more information.

DoubleFactorial
DoubleFactorial (n)

Διπλό παραγοντικό: n(n-2)(n-4)...

See Planetmath for more information.

Factorial
Factorial (n)

Παραγοντικό: n(n-1)(n-2)...

See Planetmath for more information.

FallingFactorial
FallingFactorial (n,k)

Μειούμενο παραγοντικό: (n)_k = n(n-1)...(n-(k-1))

See Planetmath for more information.

Fibonacci
Fibonacci (x)

Παραλλαγές: fib

Υπολογίζει τον nστό αριθμό Φιμπονάτσι. Δηλαδή, τον αριθμό που ορίζεται αναδρομικά από Fibonacci(n) = Fibonacci(n-1) + Fibonacci(n-2) και Fibonacci(1) = Fibonacci(2) = 1.

See Wikipedia or Planetmath or Mathworld for more information.

FrobeniusNumber
FrobeniusNumber (v,arg...)

Calculate the Frobenius number. That is calculate largest number that cannot be given as a non-negative integer linear combination of a given vector of non-negative integers. The vector can be given as separate numbers or a single vector. All the numbers given should have GCD of 1.

See Wikipedia or Mathworld for more information.

GaloisMatrix
GaloisMatrix (combining_rule)

Galois matrix given a linear combining rule (a_1*x_1+...+a_n*x_n=x_(n+1)).

GreedyAlgorithm
GreedyAlgorithm (n,v)

Βρίσκει το διάνυσμα c μη αρνητικών ακεραίων έτσι ώστε να παίρνει το εσωτερικό γινόμενο με το v να είναι ίσο με n. Αν δεν είναι δυνατό, επιστρέφει null. Το v πρέπει να δίνεται ταξινομημένο με αύξουσα διάταξη και πρέπει να αποτελείται από μη αρνητικούς ακέραιους.

See Wikipedia or Mathworld for more information.

HarmonicNumber
HarmonicNumber (n,r)

Παραλλαγές: HarmonicH

Harmonic Number, the nth harmonic number of order r. That is, it is the sum of 1/k^r for k from 1 to n. Equivalent to sum k = 1 to n do 1/k^r.

See Wikipedia for more information.

Hofstadter
Hofstadter (n)

Η συνάρτηση Χόφσταντερ q(n) ορίζεται από q(1)=1, q(2)=1, q(n)=q(n-q(n-1))+q(n-q(n-2)).

See Wikipedia for more information. The sequence is A005185 in OEIS.

LinearRecursiveSequence
LinearRecursiveSequence (seed_values,combining_rule,n)

Υπολογίζει τη γραμμική κυκλική ακολουθία χρησιμοποιώντας το βηματισμό Γκαλουά.

Multinomial
Multinomial (v,arg...)

Υπολογίζει τους πολυωνυμικούς συντελεστές. Παίρνει ένα διάνυσμα από k μη αρνητικούς ακέραιους και υπολογίζει τον πολυωνυμικό συντελεστή. Αυτός αντιστοιχεί με τον συντελεστή στο ομογενές πολυώνυμο σε k μεταβλητές με τις αντίστοιχες δυνάμεις.

The formula for Multinomial(a,b,c) can be written as:

(a+b+c)! / (a!b!c!)

In other words, if we would have only two elements, then Multinomial(a,b) is the same thing as Binomial(a+b,a) or Binomial(a+b,b).

See Wikipedia, Planetmath, or Mathworld for more information.

NextCombination
NextCombination (v,n)

Δίνει τον συνδυασμό που μπορεί να έρθει μετά το v στην κλήση στους συνδυασμούς της συνάρτησης, ο πρώτος συνδυασμός πρέπει να είναι [1:k]. Αυτή η συνάρτηση είναι χρήσιμη, αν έχετε πολλούς συνδυασμούς να περάσετε και δεν θέλετε να σπαταλήσετε μνήμη για να τους αποθηκεύσετε όλους.

For example with Combinations you would normally write a loop like:

for n in Combinations (4,6) do (
  SomeFunction (n)
);

But with NextCombination you would write something like:

n:=[1:4];
do (
  SomeFunction (n)
) while not IsNull(n:=NextCombination(n,6));

See also Combinations.

See Wikipedia for more information.

Pascal
Pascal (i)

Δίνει το τρίγωνο του Πασκάλ ως πίνακα. Αυτό θα επιστρέψει έναν i+1 επί i+1 κάτω διαγώνιο πίνακα που είναι το τρίγωνο Πασκάλ μετά από i επαναλήψεις.

See Planetmath for more information.

Permutations
Permutations (k,n)

Δίνει όλες τις μεταθέσεις των k αριθμών από 1 μέχρι n ως ένα διάνυσμα διανυσμάτων.

See Mathworld or Wikipedia for more information.

RisingFactorial
RisingFactorial (n,k)

Παραλλαγές: Pochhammer

(Pochhammer) Rising factorial: (n)_k = n(n+1)...(n+(k-1)).

See Planetmath for more information.

StirlingNumberFirst
StirlingNumberFirst (n,m)

Παραλλαγές: StirlingS1

Ο αριθμός Στέρλινγκ πρώτου είδους.

See Planetmath or Mathworld for more information.

StirlingNumberSecond
StirlingNumberSecond (n,m)

Παραλλαγές: StirlingS2

Ο αριθμός Στέρλινγκ δεύτερου είδους.

See Planetmath or Mathworld for more information.

Subfactorial
Subfactorial (n)

Subfactorial: n! times sum_{k=0}^n (-1)^k/k!.

Triangular
Triangular (nth)

Υπολογίζει τον nστό τριγωνικό αριθμό.

See Planetmath for more information.

nCr
nCr (n,r)

Παραλλαγές: Binomial

Υπολογίζει συνδυασμούς, δηλαδή, τον συντελεστή διωνύμου. Το n μπορεί να είναι οποιοσδήποτε πραγματικός αριθμός.

See Planetmath for more information.

nPr
nPr (n,r)

Calculate the number of permutations of size r of numbers from 1 to n.

See Mathworld or Wikipedia for more information.