Tagged Questions

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

169 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?
174 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 ...
64 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$. ...
43 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 ...
68 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. ...
172 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 ...
46 views

how to use a tree as a key to construct a table of key values

I have an interesting problem that I was able to summarize in the form of trees, sets, and key value pairs. I have the following sets of keys and values \begin{aligned} k_0 &= [A]...
36 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 ...
61 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$ –...
65 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 ...
297 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?
445 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 ...
161 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 ...
173 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 ...
723 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 ...
306 views

A more perfect Union[]

I was doing a Project Euler problem with my class, and found the following weird fact: Union[] of a list of some 50 million numbers (of which only around 15000 were ...
92 views

How can I create a set (list) provide a kind of rule/algorithm?

Example: S = {r ∈ Q : r² < 2} Let S be the set of all rational numbers whose squares are less than 2. It follows that 1 ∈ S, 4/3 ∈ S, but 3/2 doesn't ∈ S because 9/4 ≥ 2. Thank you.
243 views

131 views

Set theoretic operations on sets of real numbers

I have two pieces of code that produce a bunch of real numbers, say $A$ and $B$ respectively. (It is not relevant to the question, but $A$ consists of eigenvalues of the Hamiltonian of some physical ...
2k views

Plot 3D set (or a domain of three-variable function)

is there any way to plot a "3D set" of points subject to certain rules? For example, my task is to find maximum of some function of three variables which have to meet some conditions. Of course I can'...
396 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 ...
627 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, ...
889 views

Exact cover solution

Is it possible to get a exact cover solution(s) and/or number of possible solutions in Mathematica?
479 views

Combining lists with common elements efficiently [duplicate]

Possible Duplicate: Computing the equivalence classes of the symmetric transitive closure of a relation I am required to process sets consisting of 2-element subsets of integers by combining ...
953 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 ...
2k views

How to select minimal subsets?

I am a newbie, so please point me in the right direction if you feel this question has been answered somewhere else before. Here goes: Suppose I have a list like this: ...
3k views

Define a mathematical set

I have a terribly short question: Is there a way to define a pure mathematical set? I tried a bit of googling, but the word "set" has two meanings and the other one (as in setting) as by far more ...