Combinations

Computes the number of ways to choose k elements among n: 0nk.

Syntax

combinations(Integer, Integer)
 Vector, Integer)

Description

Given two integers nLaTeXn and kLaTeXk, returns the number of ways to choose kLaTeXk elements among nLaTeXn: 0nkLaTeX\binom{n}{k}.

combinatorics.combinations1.calc.png

Given a list or vector L and an integer kLaTeXk, returns a list with all the possible ways to choose kLaTeXk element among LLaTeXL.

combinatorics.combinations2.calc.png