-
-
Notifications
You must be signed in to change notification settings - Fork 0
C from n to k
admin edited this page Jun 10, 2021
·
3 revisions
Welcome to Mathematical experiments the math wiki!
Let there be n different objects. To find the number of combinations of n objects by k, we will choose combinations of m objects in all possible ways, while paying attention to the different composition of the combinations, but not the order (it is not important here, unlike the placements).
import "github.com/digital-technology-agency/math"
func Example() {
n := 100
k := 3
value := math.CnkUint(n, k)
fmt.Printf("Result: %d", value)
/*
Result: 161700
*/
}