[New-bugs-announce] [issue37128] Add math.perm()
Serhiy Storchaka
report at bugs.python.org
Sat Jun 1 16:47:29 EDT 2019
New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:
The function which returns the number of ways to choose k items from n items without repetition and without order was added in issue35431. This functions is always goes in pair with other function, which returns the number of ways to choose k items from n items without repetition and with order. These functions are always learned together in curses of combinatorics. Often C(n,k) is determined via P(n,k) (and both are determined via factorial).
P(n, k) = n! / (n-k)!
C(n, k) = P(n, k) / k!
The proposed PR adds meth.perm(). It shares most of the code with math.comb().
----------
components: Library (Lib)
messages: 344226
nosy: lemburg, mark.dickinson, serhiy.storchaka, stutzbach
priority: normal
severity: normal
status: open
title: Add math.perm()
type: enhancement
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37128>
_______________________________________
More information about the New-bugs-announce
mailing list