New submission from Serhiy Storchaka <storchaka+cpyt...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue37128>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to