set formation from different subsets

1 回表示 (過去 30 日間)
Ezgi
Ezgi 2019 年 6 月 25 日
コメント済み: Ezgi 2019 年 6 月 25 日
Let's say that I have the following subsets:
{1},{2},{3},{4},{3,4},{2,4},{1,3},{1,2},{1,2,4}
I want to form sets using these subsets where all numbers will be covered but the subset selection will be different.
Numbers can be used only once in a set(selecting {1,3} and {3,4} for the same set is not allowed since 3 is in both subsets).
Example sets to be formed: set1={{1},{2,4},{3}}, set2={{1,2},{3,4}} etc.
How can I code this?
Thank you.
  2 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 6 月 25 日
How many sets to be formed?
Also set1={1},{2},{3},{4},
set2={3,4},{1,2}
set3={2,4},{1,3}
set4={1,2,4}
is this OK?
Ezgi
Ezgi 2019 年 6 月 25 日
Sets will be:
set1: {1},{2},{3},{4}
set2: {1},{2,4},{3}
set3: {1},{3,4},{2}
set4: {1,2},{3},{4}
set5: {1,2},{3,4}
set6: {1,3},{2,4}
set7: {1,3},{2},{4}
set8: {1,2,4},{3}
set9: {1},{2},{3,4}

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by