Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个通用集和集数 S。我需要从 S 中找到最大集数,以便在任何选定的两个集之间没有共同元素。
我的方法---我将 S 中的每个集合视为一个节点,如果两个集合之间有任何共同元素,那么这两个集合之间就会有一条边。如果构造的图是二分的,这种方法可以正常工作。我有如果构造的图不是二分的,则难以解决。
PS-选择集不一定要覆盖全集的所有元素。它应该返回不相邻的最大集合数。
谢谢