4

Please see Computational Discrete Mathematics by Pemmaraju and Skiena, pages 106 and 107. DerangementQ[p_?PermutationListQ]:= !(Apply[Or,Map[(#===p[[#]])&,Range[Length[p]]]]) NumberOfDerangements[0] = 1; NumberOfDerangements[n_Integer?Positive] := Block[{$RecursionLimit = Infinity}, n*NumberOfDerangements[n - 1] + (-1)^n] Derangements[0] = {{}}; ...


1

p = 0.2; q = 0.6; n = 15; a = l*Binomial[n q, l] Binomial[n (1 - q), n (1 - q) - n p + l]; b = (n p - l) Binomial[n q, l] Binomial[n (1 - q), n (1 - q) - n p + l]; c = (n q - l) Binomial[n q, l] Binomial[n (1 - q), n (1 - q) - n p + l]; d = (n (1 - q) - n p + l) Binomial[n q, l] Binomial[n (1 - q), n (1 - q) - n p + l]; (* maximize for each individually *) ...


Only top voted, non community-wiki answers of a minimum length are eligible