The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
66 views

Consecutive generation of subsets

It is well known that the array of subsets of even small set is very big. This leads to problems with machine memory. Is there an effective way to generate subsets sequentially?
3
votes
1answer
68 views

Find independent vertex sets

I'm trying to find all independent vertex sets for a given graph. Note that they may not be maximal independent sets. There is a function in Mathematica called ...
10
votes
4answers
337 views

Efficient way to make subsets of list with placeholders

I have an arbitrary list of unique elements: lst = {a, b, c, d} Documentation allows finding subsets with same number of elements, say ...
4
votes
0answers
68 views

Create an adequate 'training set' to train a ClassifierFunction which performs the role of the built-in `SubsetQ`

I am trying to "grow" my own SubsetQ function using Machine Learning methods. My cSubsetQ when given two lists (listA and listB)...
1
vote
1answer
36 views

Choosing sets from Subsets[list] part 2

Piggybacking off of this question, say if I wanted to exclude sets which weren't the union of elements of the list of lists. For example: ...
6
votes
5answers
160 views

Choosing sets from Subset[list]

Say I have a set, S, and I take Subsets[S] (the power set of S). For example: S={a,b,c} Subsets[S]={{}, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}} How can ...
2
votes
2answers
151 views

Refining subset relations

People who do combinatorics (like me) are often faced with the following problem: For a list of combinatorial objects (vectors, permutations graphs,etc.), we know what multi-set of values it ...
-2
votes
2answers
108 views

How to efficiently find all sets of primes that add to a given number?

For large numbers the naive approach falls down: Select[Subsets[Range[1, 4]], PrimeQ@Total@# &] {{2},{3},{1,2},{1,4},{2,3},{3,4},{1,2,4}} ...
19
votes
5answers
687 views

How to delete subsets quickly?

I have some data like this: ...
2
votes
3answers
113 views

Efficient extraction of a subset

The context is molecular dynamics. The data is in the format (index_1, index_2, distance). The goal is to find all of the distances to the neighbors of point index_0 and to present a set listing the ...
2
votes
4answers
134 views

calculating subsets of a matrix (L=40X40)

I need to calculate all $k$-possible subsets$(k:1,L)$ of matrix with size $L$. I am using subset function as following, ...
1
vote
4answers
142 views

Find all disjoint subsets of equal length

Suppose that $A$ is a list with $n$ elements where $n$ is even. I want to write a function that returns all pairs $(A_1,A_2)$ where the sets $A_1$ and $A_2$ each have length $\frac{n}{2}$, $A_1 \cap ...
0
votes
1answer
150 views

How to subset datasets in Mathematica 10 [closed]

I'm sorry if this is obvious but I can't find a way to select only a certain amount of columns of a dataset (or delete a certain amount of columns from a dataset) using the key of each column. I ...
2
votes
2answers
96 views

Efficient subsetting and averaging

The following code aims to average 4 groups of the values vector. Which elements belong to each group is determined by the indic ...
5
votes
4answers
240 views

Signed power set of a list

Given {a, b, c, ...} with $n$ elements generate a list with $2^n$ elements. For example, if the list were {a, b, c}, then the ...
1
vote
4answers
186 views

Need an efficient way to do this list manipulation

Lets say i have two lists with me as given below: l1 = {4, 6, 8, 9, 10, 12}; l2 = {2, 3, 4, 5, 6, 7}; Now i have a function S2P(details irrelevant) which takes ...