List of usage examples for com.google.common.math LongMath binomial
public static long binomial(int n, int k)
From source file:net.automatalib.util.automata.ads.ADSUtil.java
/** * Computes an upper bound for the length of a splitting word. Based on * <p>// w w w .j ava 2s . co m * I.V. Kogan. "Estimated Length of a Minimal Simple Conditional Diagnostic Experiment". In: Automation and Remote * Control 34 (1973) * * @param n * the size of the automaton (number of states) * @param i * the number of states that should be distinguished by the current splitting word * @param m * the number of states that should originally be distinguished * * @return upper bound for the length of a splitting word */ public static long computeMaximumSplittingWordLength(final int n, final int i, final int m) { if (m == 2) { return n; } return LongMath.binomial(n, i) - LongMath.binomial(m - 1, i - 1) - 1; }