473,383 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

exhaustive subsets

I've found some python solutions to find the set of subsets for a given set,
but how do you find the set of the set of subsets whose union is the given
set and whose intersections is the empty set.

ie. Given a cake divided into 6 unique pieces (0-5), how many different ways
can I distribute the cake so that there are no pieces left. eg.

((0), (1,2,3,4))
or ((0),(1),(2,3,4))
or ((0,1),(2,3),(4))
or ((0,4),(1),(2,3))

Is there a name for this problem?

Cheers,
Brett

--
Brett Calcott
Philosophy Program, RSSS, ANU
Canberra, ACT 0200, AUSTRALIA


Jul 18 '05 #1
4 1927
In article <ma************************************@python.org >,
"Brett Calcott" <br***@coombs.anu.edu.au> wrote:
I've found some python solutions to find the set of subsets for a given set,
but how do you find the set of the set of subsets whose union is the given
set and whose intersections is the empty set.

ie. Given a cake divided into 6 unique pieces (0-5), how many different ways
can I distribute the cake so that there are no pieces left. eg.

((0), (1,2,3,4))
or ((0),(1),(2,3,4))
or ((0,1),(2,3),(4))
or ((0,4),(1),(2,3))

Is there a name for this problem?


Partitions? Didn't we just have a discussion about them here a week or
two ago?
<http://groups.google.com/groups?thre...2936.25742.pyt
ho******@python.org>

--
David Eppstein http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science
Jul 18 '05 #2
google for Sterling numbers

"Brett Calcott" <br***@coombs.anu.edu.au> wrote in message
news:ma************************************@python .org...
| I've found some python solutions to find the set of subsets for a given set,
| but how do you find the set of the set of subsets whose union is the given
| set and whose intersections is the empty set.
|
| ie. Given a cake divided into 6 unique pieces (0-5), how many different ways
| can I distribute the cake so that there are no pieces left. eg.
|
| ((0), (1,2,3,4))
| or ((0),(1),(2,3,4))
| or ((0,1),(2,3),(4))
| or ((0,4),(1),(2,3))
|
| Is there a name for this problem?
|
| Cheers,
| Brett
|
| --
| Brett Calcott
| Philosophy Program, RSSS, ANU
| Canberra, ACT 0200, AUSTRALIA
|
|
|
|
Jul 18 '05 #3
"Elaine Jackson" <el***************@home.com> wrote in message news:<zQZoc.474813$Ig.279550@pd7tw2no>...
google for Sterling numbers


I'm pretty sure you mean "Stirling numbers". When I followed your
suggestion I got a lot of pages about businesses reporting "sterling
numbers" in their quarterly reports, and about marijuana, oddly
enough.
Jul 18 '05 #4
>
Partitions? Didn't we just have a discussion about them here a week or
two ago?
<http://groups.google.com/groups?thre...2936.25742.pyt
ho******@python.org>


Thanks. Knowing the right terminology makes all the difference to doing a
search :)

Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Simon | last post by:
Hi, I'm hoping you could show me examples of how a functional/declarative language could be used to consicely describe resticted subsets of elements. I'm looking for a 'specification' style...
3
by: will | last post by:
HOpe you can help with this... I have the following xml document... <?xml version="1.0" ?> <file> <header>some data</header> <detail> some more data</detail> <footer> gdshada </footer>
2
by: cdiggins | last post by:
I am familiar with TinyXML and "Simple XML Subset Parser" from GLib, but I was wondering if there exist any specifications subsets of XML without attributes? I proposed one called XML-- (XML minus...
7
by: Gaijinco | last post by:
I been thinking about this topic for a long time. The best I have done is the following code: #include <iostream> using namespace std; #include <cmath> int main(){ const int SIZE=3;
25
by: Jessica Weiner | last post by:
I have an array of n integers and I want a function that returns a list of arrays of all possible subsets. Can someone provide me with the code? Thanks. Jess
4
by: LurfysMa | last post by:
I could use some help with a table design problem. I have an electronic flashcard program. Actually, several of them. They each rely on a utility program to keep track of the usage statistics....
3
by: Lord0 | last post by:
I *think* I need to be able to validate subsets of an XML document using different schema. The functionality I'm trying to implement is this. a) External suppliers produce an XML document...
4
by: Patrick | last post by:
Hi, I want to write a programs that checks if a set of numbers in a list obey a condition, the problem is that i have say "n" numbers and i need to check all subsets of the n numbers for the...
1
by: Rajesh V | last post by:
Hi, The aim of this C++ code is to print all the k-element subsets of a set of size n. But somewhere it goes wrong - it doesn't print the answer properly. I tried a lot to find the mistake, but...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.