Register | Login

let f(n, k) be the # of ways of choosing k integers without replacement from
n consecutive integers so that no two selected are consecutive.

Who Voted for this Story


Comments


Written by csguy (#13)
529 days ago
f(n,k)=f(n-2,k-1)+f(n-1,k)

f(n-2,k-1) if last element is selected

f(n-1,k) if last element is not selected




Indian Social News and Links Network