Make combinations function C(n,k) return 0 when k>n, which is standard. Maybe P(n,k) should do the same instead of throwing an error?
Changed paths: