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.

2
votes
1answer
33 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
96 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
27 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
476 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
44 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
97 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
69 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
44 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
56 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
38 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
45 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
103 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
62 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
57 views

Iterating over pairs in a list

Take a look at this code: ...
-1
votes
1answer
56 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
45 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
48 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
242 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
56 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
79 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
100 views
1
vote
0answers
109 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
165 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
50 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
74 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
704 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
108 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
87 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
91 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
149 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
50 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
189 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
355 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
49 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
239 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
130 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 ...
2
votes
0answers
70 views

Is there a way to make a set of all real numbers within a range? [closed]

Is there a way to create a set of all real numbers within a range? For example, the range between 1300 and 1500, including 1500 in normal distribution. Thank you very much. My problem exactly: $A$ – ...
0
votes
1answer
89 views

Mining for matching elements of sets with equal divisors

This problem is extrapolated from a problem that was solved on how to manipulate lists of set outputs as a union ( Equation Autogeneration ), where the concern now is how to mine for (or attain from ...
3
votes
2answers
1k views

How do I do the Minkowski sum of two sets?

I have 2 sets, $X$ and $Y$. How do I find the Minkowski sum of these sets?
10
votes
5answers
564 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 ...
3
votes
1answer
200 views

Finding pairs where the intersection of them is empty set from a nested list

It would be better to give an example first. Suppose I have a nested list of the form list = {{ 1,2,3,6}, { 3,6,10,20}, { 4,7,11}, { 10,20}}; where each element ...
7
votes
4answers
250 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 ...
17
votes
8answers
961 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 ...