Last active
February 10, 2025 02:51
-
-
Save hrgnz/14dc9c56f68f7bf2a2be1ac98bdedd40 to your computer and use it in GitHub Desktop.
リストの分割 != リストの分割
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abc390dで使用。集合をいくつかの部分集合に分割する。 | |
Needs["Combinatorica`"] | |
res = SetPartitions@lst; | |
```mathematica | |
In[]:= Clear["Global`*"] | |
n = 6; | |
Needs["Combinatorica`"] | |
comb = SetPartitions@Range@n; | |
Length@comb == BellB@n | |
Out[]= True | |
``` | |
How can I obtain all partitions of a list in Mathematica? | |
https://stackoverflow.com/questions/8304892/how-can-i-obtain-all-partitions-of-a-list-in-mathematica |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment