Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.3K Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] Obtain intersections and delete subset duplicates?

this output is the intersection of pairs of larger subsets:

{{13, 24, 68, 79}, {13, 24, 68, 79, 90}, {13, 24, 44, 48, 68, 79}, {13, 20, 44, 48, 68, 79}, {13, 24, 44, 55, 68, 79, 90}, {13, 24, 44, 68, 79}, {13, 20, 24, 44, 48, 55, 79}, {13, 20, 44, 55, 68, 79}, {13, 20, 44, 68, 79}, {13, 24, 48, 68, 79, 90}, {13, 24, 48, 68, 79}, {13, 24, 48, 55, 79, 90}, {20, 24, 44, 68, 90}, {13, 24, 79, 90}, {13, 20, 48, 68}, {20, 68, 79, 90}, {13, 20, 68}, {20, 24, 68}, {20, 68, 79}, {20, 24, 79}, {13, 20, 24}, {20, 24, 68, 90}, {24, 44, 68, 79}, {13, 24, 68}, {20, 24, 44, 79}, {13, 20, 44, 55, 79}, {13, 20, 79} …

now I would like to eliminate the intersections that are already present in other intersections, for example:

{13, 24, 68, 79} is already present in {13, 24, 68, 79, 90} and {13, 24, 44, 48, 68, 79}

{13, 24, 68, 79, 90} is already present in {13, 24, 44, 55, 68, 79, 90} …

how to do?

thanks

POSTED BY: Mutatis Mutandis
3 Replies

You can even get a Wolfram Language implementation of BCL in one of the responses here

POSTED BY: Daniel Lichtblau
Posted 6 years ago

For a description of the BCL algorithm used by @Carl Woll in those WFR functions, and other ways to solve the problem, check this MSE post.

POSTED BY: Rohit Namjoshi

This recent WFR item could be useful:

https://resources.wolframcloud.com/FunctionRepository/resources/MinimalSubsets

It can be accessed as ResourceFunction["MinimalSubsets"]

--- edit ---

Actually you seem to want ResourceFunction["MaximalSubsets"]

https://resources.wolframcloud.com/FunctionRepository/resources/MaximalSubsets

---end edit ---

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard