C(2n, 2) =? 2C(n, 2) + n^2
(2n)!/(2n-2)!2! =? 2n!/(n-2)!2! + n^2
2n(2n-1)/2 =? 2n(n-1)/2 + n^2
n(2n-1) =? n(n-1) + n^2
2n^2 - n =? n^2 - n + n^2
2n^2 - n = 2n^2 - n
?? Via a combinatorial argument.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
Does anyone know or has a code in vb to generate all posible subsets (permutations of n, n-1, n-2 ... 0 items) of a given array?
The number of subsets generated would be 2^n, but what I need to know is the sets generated.
Thanks, Pablo
actually you get different count of subsets depending on homogenity in the array. for instance 1337 gives 1C4 2C3 1C1=24
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.