Function to find probability of first bag to contain N items such that M items are distributed among X bags
def Probability ( M , N , X ) : NEW_LINE INDENT return float ( nCr ( M - N - 1 , X - 2 ) / ( nCr ( M - 1 , X - 1 ) * 1.0 ) ) ; NEW_LINE DEDENT