human
Number of Simple Graph with N Vertices and M Edges | Function to return the value of Binomial Coefficient C ( n , k ).
Since C ( n , k ) = C ( n , n - k ).
Calculate the value of [ n * ( n - 1 ) * -- - * ( n - k + 1 ) ] / [ k * ( k - 1 ) * ... * 1 ].
Driver Code"
Solution in Python:
assistant
#Here is code to number of Simple Graph with N Vertices and M Edges and the other steps required.
 def binomialCoeff ( n , k ) :
	if ( k > n ) :
		return 0
	res = 1
	if ( k > n - k ) :
		k = n - k
	for i in range ( k ) :
		res *= ( n - i )
		res //= ( i + 1 )
	return res
if __name__ == " _ _ main _ _ " :
	N = 5
	M = 1
	P = ( N * ( N - 1 ) ) // 2
	print ( binomialCoeff ( P , M ) )