Questions tagged [sets]

For questions pertaining to sets in the set-theoretical sense. Use "assignment" for questions about the use of the Mathematica functions Set or SetDelayed.

Filter by
Sorted by
Tagged with
1
vote
4answers
137 views

How can one expand an arbitrary boolean combination into the $2^n$ atoms of the associated boolean algebra of size $2^{2^n}$?

The answer of user250938 to Can one usefully apply the Boolean functions of Mathematica to measurable Boolean sets? and the second comment of Monroe Eskew to the answer to https://mathoverflow.net/...
0
votes
0answers
11 views

Is “A = {x | (x, y) ∈ A}” the same thing of “dom A”? [migrated]

I am learning set theory using the book "Axioms and Set Theory" from Robert André and it defines dom R as dom R = {x : x∈C ∧ (x, y) ∈ R for some x∈C}, R is a relation on C. But English ain't my first ...
0
votes
1answer
72 views

Can one usefully apply the Boolean functions of Mathematica to measurable Boolean sets?

This is something of an attempted succinct/pointed rephrasing of an earlier question Given measures on sets and on certain Boolean combinations of the sets, can one check their consistency and/or ...
0
votes
0answers
32 views

Given measures on sets and on certain Boolean combinations of the sets, can one check their consistency and/or extend them to other combinations?

I have four sets--let us denote them $A_i, i=1,\ldots,4$--of quantum-information-theoretic interest (https://arxiv.org/abs/2004.06745, https://arxiv.org/abs/1905.09228). The set $A_1$ contains the ...
4
votes
1answer
3k views

Putting set elements into venn diagram

My problem has two parts. Before that I have two Lists/Sets. It suppose to be created them by two initial strings. In the first part, I need to show sets' elements in venn diagram. I can create venn ...
4
votes
3answers
79 views

every set intersection for every set in a family with another family of sets

I want to find for each list within a list of lists what intersections occur when taking set intersection for each list in another list of lists. Hopefully that makes sense. I have tried ...
11
votes
6answers
725 views

How to randomly select subsets

I have a list of around 300 elements. I want to sample subsets of length 25 such that my samples are all distinct. My first inclination was to use something like ...
0
votes
0answers
4 views

Assigning a solution to variables [duplicate]

I have solved my solution and it has been appeared, it is C1, C2, C3, C4 but when I call C1 again (%13), program shows me that C1,... is not assigned. How can I reapair that ?
3
votes
1answer
2k views

How to make an efficient difference of sets function?

How to write a nice code that removes all elements from given set A, that occur also in set B? I would like to use DeleteCases[] for this purpose, but have no good ...
10
votes
4answers
448 views

Delete sublist when sub-sublists contain same element

Given lis={{{a},{b,c,d}},{{a,b},{b,c}},{{b,c},{a,b,c}},{{b},{d}},{{a,b},{c,d}}} I want to delete sublists which have one or more elements in common. So that I ...
3
votes
2answers
788 views

How to stretch this Venn diagram?

I am trying to duplicate (approximately) the following Venn diagram in Mathematica: I have used the top of this page as a guide, which showcases the following Venn diagram triplet: ...
1
vote
1answer
60 views

ArgMin over intervals and discrete sets

I was playing with ArgMin but I'm not sure how to use it for constrained optimization. For example, ArgMin[x^2, x] returns <...
0
votes
1answer
58 views

Possible way to plot the solution density of diophantine equations

Well, I'm trying to investigate the density of solutions to Diophantine equations. What is a general method to describe that density? I've two functions: $$\varphi\left(\text{a},\text{b},\text{c}\...
3
votes
1answer
97 views

Why doesn't DeleteDuplicates do what I want

First off. I am not a mathematician I am a linguist, a syntactician who is trying to say something about semantics, which in the case at hand can be largely understood to reduce to set theory. That ...
1
vote
0answers
35 views

Is there a way to predict permutations that consist of sets?

SequencePredict is a function that predicts the next value from the arranged data. But I want to use the data for the combination to predict the next combination(...
0
votes
2answers
64 views

Making a function that takes as an input a list not care about the order of the elements of the list

I would like a function f, that takes as input a list, not care about the order of elements of the list. So,for example: f[{3,2}]=f[{2,3}] Is this possible? Or is it necessary to convert the list ...
3
votes
2answers
200 views

How to find the positions of replaced elements in a list

I have two sets of elements a={3, 4.8, 5, 4.2, 3.6, 2.3, 4.5, 3.7} b={2.8, 4.7, 5.3, 3.5, 4.7, 2.8, 4.2, 3.4} and I create ...
2
votes
1answer
54 views

Creating pairs of non-intersecting set from a given set

Let's say I have a set {a,b,c,d} and I want to create a list of pairs {{a,b,c,d},{}},{{a,b,c},{d}},{{a,b,c},{}},... such that there is no intersection between each pair, and they do not need to use ...
4
votes
1answer
122 views

Non-flat partitions of a set

A non-flat partition of a set is one where, when the elements of the set are on a grid, the partition does not contain subsets with elements from the same row. When the set is more irregular the same ...
0
votes
1answer
33 views

How to find disjoint subsets such that union of the sets give the motherset or main set?

Let us define a set $\mathcal{S}=\{1,2, 3,\cdots,67\}$. I have a list of 132 subsets. I want to obtain 16(or 17) mutually exclusive subsets such that union of such 16(or 17) is equal to $\mathcal{S}$...
7
votes
5answers
486 views

Efficient deletion of specific list entries

It is sometimes useful to remove exactly the amount of specific entries on one list from another. Consider: ...
0
votes
1answer
74 views

Why is Resolve not reducing my set?

I tried to run the following code to get the region where (v,b,r) satisfies some complicated set of inequalities. ...
2
votes
1answer
56 views

Calculate plausibility in Dempster-Shafer theory

I want to use Mathematica to show which subsets of a power set are required to calculate the plausibility for a given set in a power set. This has lead me to compute a summation with a ...
0
votes
2answers
146 views

Summation over an index and a set

I have an index CC and a set of values CM, and c is an element of CM and ...
4
votes
2answers
144 views

How can I define operators that implement the algebra of sets?

I need to define some operators with properties like idempotence and distribution over union and intersection so that Mathematica can symbolically simplify expressions. How do I define such operators? ...
1
vote
0answers
47 views

How to preserve braces in result

I have a result from equation, for example p={{0<=x<=1/5||x==9/10},{0<=x<=1/5||x==9/10}} and using Cases[p, z_?NumericQ -> z, Infinity] I get {0,1/5,9/10,0,1/5,9/10} But I ...
1
vote
0answers
191 views

How to add brackets to list [closed]

I have for example set of points p={1/5,1/2} and I would like to add brackets to the list, so I would like to get a set of points p2={{1/5},{1/2}} I know how to remove brackets, but I cant ...
0
votes
0answers
60 views

How to perform delayed evaluation containing function with Mathematica

I was wondering whether there is a way in Mathematica to evaluate an expression in the most simple form, without any simplifying. For example if we define: ...
0
votes
0answers
77 views

Mathematica complement of a region

I want to use Reduce Function to give me intersection of a region and complement of another region The first region is: ...
1
vote
4answers
178 views

How to pick elements from a list with variable condition

Let A and M sets of numbers, with Length[A]=15. I want to do something like ...
-4
votes
1answer
107 views

Is the axiom of infinity provably Wrong? [closed]

The axiom of infinity is surely provably FALSE? ‘asserts the existence of a set containing all the natural numbers’ There is no number X such that X>all N because X+1>X So Actual Infinity does not ...
0
votes
1answer
67 views

Testing a description of the Cantor ternary set

The Cantor ternary set (aka the Cantor discontinuum) is, as usual, the set $K = \bigcap_{n=0}^{\infty} K_{n}$ where $K_{0} = [0, 1]$, the closed unit interval, and where for each $n \geq 1$ the set $...
0
votes
0answers
66 views
-1
votes
1answer
64 views

Operations between sets of integers [closed]

sorry it was impossible to put the code in Latex, he said that there were problems of indentation, I put the image
1
vote
0answers
47 views

Defining an abstract multiplication over finite indices

I would like to define a map (a "multiplication" denoted $\otimes$) over the finite set of symbols $G=\{a,b,c,d,e,f,g,h\}$. I would like to define several rules like $$a \otimes b= \{b \} $$ $$a \...
0
votes
1answer
61 views

Delete duplicates and sort a list of sets separately? [closed]

I have a set where it has three subsets. I want to have each element of each subsets appears only once, sorted, but the order of subsets does not change. For example: I want to get from $$ \{\{5,2,2,3\...
13
votes
3answers
2k views

how to efficiently apply function to all pairs of a set (and collect the results)

To build a graph, I need to apply a function f[a_, b_] to all pairs of a list (3500 elements). The function itself returns a link ...
5
votes
3answers
517 views

Is there a simple way to perform the opposite of intersection on two lists?

By "opposite of intersection" I mean that if I have two lists like so: list1 = {1,2,4,7,9}; list2 = {1,4,9,10,11} And then we do the "Reverse Intersection" on ...
1
vote
1answer
59 views

How do I simplify operations on sets?

How would I use Mathematica to simplify: S'∩(S∪T')' The answer is S'∩T Edit: S' means Complement of S. Thanks! Solved with: BooleanConvert[! S && ! (S || ! T)]
1
vote
1answer
40 views

Set of order preserving functions

I have a partial order defined on a finite set, 13 elements, represented as a directed graph. I'm trying to work with the set of order preserving functions from this poset into a finite subset of the ...
2
votes
2answers
106 views

Finding maximal elements of partially ordered sets

I am dealing with partially ordered sets $\Gamma$, which I represent as directed graphs with an edge going from $a$ to $b$ if $a \leq b$ in $\Gamma$. For example the following graph, ...
7
votes
4answers
253 views

Finding largest Range in a list

In a list of positive integers, I would like to find the largest n such that Range[n] is a subset of the list. So for example ...
20
votes
9answers
945 views

Any built-in function to generate successive sublists from a list?

Given lst = {a, b, c, d} I'd like to generate {{a}, {a, b}, {a, b, c}, {a, b, c, d}} but using built-in functions only, ...
11
votes
4answers
477 views

Patternmatching sets

How to match set-patterns against sets? A set (in the mathematical sense) is a list of elements without repetition and order of elements does not matter. For example, we have a pattern set ...
1
vote
2answers
117 views
17
votes
8answers
1k views

Enumerating tuples from a larger space such that all pairs of values are present at least once

I am trying to write a function that will accept a list of N lists and returns a list of N-tuples that represent all pairs of values from the original N lists at least once. To illustrate with an ...
1
vote
0answers
127 views

Partition a set of n objects into k subsets? [duplicate]

Is there some function recently added to Mathematica that facilitates forming all partitions of a n-element set into k subsets? In other words, something that easily gives the same thing as what <...
2
votes
1answer
61 views

If I have numbered elements, I there a simple way to put them in a list? [duplicate]

I've defined manually 32 elements as w1, w2, w3,..., w32....
3
votes
1answer
54 views

Eliminate from list of sets those that are equal (except for the order)

I have a list of sets and some of them are equal in the sense of mathematics, but are ordered differently. How can I remove those elements from my list? For example, the set ...
10
votes
5answers
1k views

Subsets of a list

Consider the following demand of products for the next four months. data={1,20,3,40}; I could produce the whole demand in the first months, leading to the ...