Is there some function recently added to Mathematica that facilitates forming all partitions of a n-element set into k subsets?
In other words, something that easily gives the same thing as what Combinatorica`KSetPartitions does?
I'm aware of the defined function KSetP at Partition a set into $k$ non-empty subsets, but that has quite a bit of code.
My query here is asking for something at a higher level than the aforementioned function KSetP that is made possible by some built-in function either that was recently added to Mathematica or was previously available but was not exploited in KSetP.
nlikely to be? For smallnthere may be something simpler, but I would guess that since there are $2^n$ subsets, it quickly becomes tricky to keep the computational costs down. – aardvark2012 Oct 31 '17 at 22:52kSetP. – murray Nov 01 '17 at 00:30KSetPfunction has quite a bit of code, but it's definition is only 11 lines. – Jason B. Nov 01 '17 at 03:12