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
0
votes
2answers
43 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
45 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
48 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
96 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
30 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
61 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
198 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
43 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
115 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
30 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
481 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: ...
2
votes
1answer
50 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
112 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 ...
0
votes
1answer
73 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. ...
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
97 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
46 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
55 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: ...
-4
votes
1answer
105 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
63 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
60 views

Iterating over pairs in a list

Take a look at this code: ...
-1
votes
1answer
61 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
51 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\...
5
votes
3answers
308 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
57 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
37 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
97 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, ...
1
vote
2answers
103 views
1
vote
0answers
117 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 <...
1
vote
4answers
170 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 ...
2
votes
1answer
59 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
53 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 ...
1
vote
3answers
76 views

Computing $\bigcup_{n=1,5}X_{n}$? when $X_{n}=n+1,n+2,…,2n$

How do I correctly compute $\bigcup_{n=1,5}X_{n}$? when $X_{n}=n+1,n+2,...,2n$ for each $n \in \mathbb{N^{+}}$? When I do the calculation manually, I get the following results: $n=1:\{2\}$ $n=2:\{3,...
3
votes
0answers
705 views

How can I speed up my code which finds the ratio of two sums that are hard to compute? [closed]

Consider a set $\left\{\left. T(c, d)\right|c, d\in\mathbb{Z}\right\}$, a subset of the rational numbers. I want to compute $D$ $$D=\lim_{(a,b)\to(-\infty, \infty)}\lim_{(r, t)\to(\infty,\infty)}D'(...
0
votes
2answers
110 views

How to restrict a list of elements based on the values of their denominators?

EDIT: Why is my post downvoted? Can somone explain? Say we have a list of simplified elements where $$\left\{\left.\frac{(2i+1)^2}{(2z+1)^2}\right|i,z\in\mathbb{Z}\right\}\cap[1,2]$$ and we ...
0
votes
1answer
71 views

Mathematica functions for dealing with sets of integers [closed]

What are the convenient Mathematica functions, say $Func1$ and $Func2$, that if one inputs a collection of sets of numbers: $$\text{{{1,2},{3,2},{4,1},{1,2},{1,2},{4,1}}}$$ (1) $$\text{$Func1$[{{1,...
1
vote
1answer
89 views

Reduce a set expression in Mahematica [closed]

For example: Given $ A\subset B $ reduce $\left [ (B\triangle C )\bigcap (A-B)\bigcap (A \triangle B) \right ]\bigcup B $ $A \triangle B$ denotes the symmetric difference of the two sets. Edit ...
1
vote
2answers
94 views

Generating number pairs satisfying conditions [closed]

I would like to create a list of tuples $(m,k)$ satisfying the conditions $\qquad 26\leq m\leq 500$, $k^2 (m - k)^2 \leq m (m - 1) (3 k + m)$ and $\sqrt{2m}-1/2\leq k\leq \sqrt{2}m$. ...
0
votes
0answers
157 views

Intersection between a discrete set and a continuous set

I have two sets: $A=\{x| |x|<2\}, B=\{1,2,3\}$ and I know A=Interval[{-2,2}] B={1,2,3} but A \[Intersection] B can ...
1
vote
1answer
51 views

Check union closedness of set

I have defined two sets set1[n_] := Table[i, {i, 1, n}]; set2[n_] := Subsets[Delete[Subsets[set[n]], 1]]; Now, I want to check whether an element of set2[n] is ...
5
votes
0answers
69 views

Looking for a package for finite mappings

I am looking for a package for dealing with "mappings" $f\colon A\to B$ where $A$ and $B$ are finite subsets of the set of all possible (inert) expressions. I need operations like: Computing $f(a)$ ...
7
votes
2answers
190 views

Sets and sums of different elements

Consider the set S={w,x,y,z}. If the set of all possible sums of any three different elements from S is {-1,3,5,8}, then what is the set S? How could I solve this function using Mathematica?
5
votes
2answers
382 views

Get envelope of a set of functions?

I'm new with mathematica and I'm trying to solve a problem. I have a set of functions in the same variable. Let's say the domain is [0,2]. I would like to get an ordered list of the functions ...
1
vote
1answer
82 views

Fast way to compute intersection of equivalence classes

There is a set $S=\{1, 2, \dots, m\}$ and $n$ equivalence relations on the set: $a \sim_i b $, where $a,b \in S$, $i=1, \dots, n$. Now we define $a \sim b$ iff $ a \sim_i b$ $\forall i=1, \dots, n$. ...
0
votes
1answer
50 views

Use elements of a convex sets to solve equations [closed]

i try to do sth. like this A=Solve[{x>=5, y>=3, x<13,y<13} ,{x,y}] which gives me a convex set and then ...
1
vote
1answer
82 views

Having trouble representing null sets within Mathematica

I am having trouble writing the Mathematica code to prove this answer. I was able to derive the answers but through trial and error, ideally I want to derive them through examination of correct code. ...
9
votes
1answer
240 views

Is there an easy way to do set counting in Mathematica?

I'm using counts of elements in sets, along with logic. So, for instance, I'd like to determine if Count[$a \land \neg b$] = Count [$a$] - Count[$a \land b$] ...where ...
4
votes
2answers
135 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
43 views

Solving systems of logial and set theoretic propositions

I need to allocate a couple of dozen elements into different sets, respecting some boundary conditions, and was hoping Mathematica might somehow help. A simple example: The propositions being a) a ...