wu :: forums
« wu :: forums - Finding if a set of subsets contains a partition »

Welcome, Guest. Please Login or Register.
Apr 19th, 2024, 4:40am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   cs
(Moderators: Grimbal, william wu, SMQ, towr, Icarus, ThudnBlunder, Eigenray)
   Finding if a set of subsets contains a partition
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Finding if a set of subsets contains a partition  (Read 1631 times)
dudiobugtron
Uberpuzzler
*****





   


Posts: 735
Finding if a set of subsets contains a partition  
« on: Jun 5th, 2014, 7:32pm »
Quote Quote Modify Modify

Hi!  (Apologies if this is not the right place to post this, as it's a straight CS question and not a riddle I know the answer to.  It's not homework, and is just for my personal interest.)
 
Here is the problem:
-----------------------
 
I have a set N = {1,2,3,...,n}.  I also have a set S of subsets of N. (So S is a subset of the powerset of N).  I want to know if there is some subset P of S where the elements of P form a partition of N. (ie: each element of N is in exactly 1 element of P.)
 
eg: N = {1,2,3,4,5}
S = {{1},{1,2},{2,3},{3,5},{1,4},{2,4},{1,4,5}}
P = {{2,3},{1,4,5}} is a partition of N.
 
Does anyone have a good algorithm for determining this?  Is this a known problem?  Is it P? NP complete? etc...
IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7526
Re: Finding if a set of subsets contains a partiti  
« Reply #1 on: Jun 6th, 2014, 4:42pm »
Quote Quote Modify Modify

The number of subsets of the powerset of N is exponential in N.  So could be S.
But maybe there is a solution that is polynomial in the size of S.
« Last Edit: Jun 6th, 2014, 4:42pm by Grimbal » IP Logged
dudiobugtron
Uberpuzzler
*****





   


Posts: 735
Re: Finding if a set of subsets contains a partiti  
« Reply #2 on: Jun 6th, 2014, 6:48pm »
Quote Quote Modify Modify

on Jun 6th, 2014, 4:42pm, Grimbal wrote:
The number of subsets of the powerset of N is exponential in N.  So could be S.
But maybe there is a solution that is polynomial in the size of S.

 
So does that mean there is certainly not a general solution that is polynomial in N?  If so, that is really useful to know. Smiley
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Finding if a set of subsets contains a partiti  
« Reply #3 on: Jun 7th, 2014, 4:25am »
Quote Quote Modify Modify

Suppose S is the set of all subsets of N that contain 1. There is no way to find that out except by looking at all of S, the size of which is exponential in N (it's 2N-1). So no, there is not a general solution that is polynomial in N.
 
Unless, perhaps you get some index to S (i.e. information that let's you skip (to) parts of input without having to process it). But even then I'm doubtful.
« Last Edit: Jun 7th, 2014, 4:26am by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
dudiobugtron
Uberpuzzler
*****





   


Posts: 735
Re: Finding if a set of subsets contains a partiti  
« Reply #4 on: Jun 9th, 2014, 12:41pm »
Quote Quote Modify Modify

OK, that makes a lot of sense, thanks!
 
So I need to restrict myself to subsets S that are themselves polynomial in N, and then find a solution which is polynomial in S.
 
------------------------------
PS: I think it is cool that adding more items to the subset actually makes it harder to tell if it contains a partition.  Naively, you might think that since adding more elements makes it more likely to contain a partition, that it would be easier to tell if it did.  But I guess a better way to think about it is that it's harder to tell that it doesn't.
« Last Edit: Jun 9th, 2014, 12:45pm by dudiobugtron » IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board