public class Combinatorics
extends java.lang.Object
Constructor and Description |
---|
Combinatorics() |
Modifier and Type | Method and Description |
---|---|
static int |
binom(int n,
int k)
Calculates (n choose k)
|
static int |
countOddPartitions(int n,
int k)
Computes the number of partitions of n size k that do not have any even elements
|
static int |
countPartitionsBottomUp(int m,
int n)
Calculates the number of odd partitions of m of size n
|
static long |
factorial(int n)
Calculates n!
|
public static int binom(int n, int k)
public static long factorial(int n)
public static int countPartitionsBottomUp(int m, int n)
public static int countOddPartitions(int n, int k)