Algorithm to generate spanning set

后端 未结 5 1821
粉色の甜心
粉色の甜心 2021-02-20 12:19

Given this input: [1,2,3,4]

I\'d like to generate the set of spanning sets:

[1] [2] [3] [4]
[1] [2] [3,4]
[1] [2,3] [4]
[1] [3] [2,4]
[1,2] [3] [4]
[1,3]         


        
5条回答
  •  深忆病人
    2021-02-20 12:36

    Here's The SUNY algorithm repository page on the problem. Maybe you can translate one of the code references to python.

    Edit: This was a similar problem. Here is the SUNY repository page about generating partitions, which I believe is the correct problem.

提交回复
热议问题