Questions tagged [sets]

Questions about finite and infinite sets and multisets, related data structures and concepts.

Sets have a long history in mathematics and its formalization. Various data structures exists for representing finite and infinite sets and multisets. Sets have close connections to the concept of a function.

435 questions
5
votes
1 answer

Among a number of sets, how to find the one that includes the highest number of other sets?

I have a large number of sets, A, B, C, ... where each set includes a few integers. I would like to find the set that includes the highest number of other sets. A brute-force solution is to compare each set with all other sets and count the number…
Matt
  • 153
  • 6
2
votes
1 answer

How can a set of N players be split into M teams, given certain rules?

A lot of times, I’ve needed to split a given set of people into a given number of teams but with some complications, like: Alice and Bob CANNOT be on the same team. Carol and David just HAVE TO BE on the same team. I feel like this is already a…
fernozzle
  • 123
  • 3
2
votes
1 answer

Minimum number of intersections to arrive at specific set

Say I have a large number of sets (on the order of ~1000) with a smaller number of potential entries (~200), and a widely varying number of entries per set. An example: $s_1 = \{1, 42, 133\}$ $s_2 = \{27, 283, 292, 172, 66, 62\}$ $s_3 = \{1, 42,…
malexmave
  • 985
  • 1
  • 7
  • 9
2
votes
2 answers

How to prove that $n$ sets have maximum of $2^n-1$ disjoint subsets when you have operations $\cup , \cap , \setminus$?

I just found out that you can have $2^{2^n-1}$ different subsets, made from $n$ sets, using operations $\cup , \cap , \setminus$. That is because when $n=2$, for example, you have 3 disjoint subsets: $A\setminus B, B\setminus A,A\cap B$ and then you…
Pavel
  • 1
  • 3
  • 13
2
votes
2 answers

What does the intersection symbol (∩) mean when applied to two non-set elements?

I came across a piece of literature in which I saw the intersection symbol (∩) being used on two non-set elements in the definition of an equivalence relation; I have posted it below for reference. The elements in question are meant to represent…
chillsauce
  • 123
  • 4
1
vote
0 answers

Algorithm for Minimum Subset Needed to Satisfy all Constraints

I was wondering what is the most efficient algorithm to solve something like the following: You have $P$ people. You have $T$ tasks, each of which is a set of sets that represent all of the possible sets of people that could be used to complete the…
JayJuly
  • 11
  • 2
1
vote
1 answer

Intersection of two independent sets

I am trying to make sure my intuition for the following question from an assignment is correct Prove or disrove: if $G = (V, E)$ is a graph and $I_1$ and $I_2$ are independent sets in $G$, then $I_1 \cap I_2$ is an independent set in $G$. Answer:…
user75706
1
vote
1 answer

Evaluating correctness of various definitions countable sets

I was trying to understand the definition of countable set (again!!!). Wikipedia has a very great explanation: A set $S$ is countable if there exists an $\color{red}{\text{injective}}$ function $f$ from $S$ to the natural numbers $\mathbb N$. If…
RajS
  • 1,667
  • 4
  • 26
  • 46
1
vote
1 answer

Determining whether a relation is the "union" of two other relations

Given a relations $P$ and $Q$ on $S$, what are the most efficient algorithms to find whether the relation satisfy the constraints $P \cup Q = S \times S$ and $P \cap Q = \emptyset$? If it helps, for my application the elements of $S$ are strings.…
R. Li
  • 13
  • 2
1
vote
1 answer

What is the name two mutually idempotent functions?

To clarify, in haskell, there is an ord function that gives the byte integer of a character (i.e. ord 'a' yields 97); and there is a char function that takes the byte integer of a character and returns the character (i.e. char 97 yelds 'a'. What is…
1
vote
1 answer

Does adding all of these sequences actually get us the set of all infinite sequences?

Section 1.9 Binary Strings of the textbook Introduction to Lattices and Order, second edition, by Davey and Priestley, says the following: Let $\Sigma^\ast$ be the set of all finite binary strings, that is, all finite sequences of zeros and ones;…
The Pointer
  • 217
  • 1
  • 10
1
vote
1 answer

Is there a practical algorithm for estimating antichain coverage of a superset?

Suppose I'm given a set $S$ and antichain $A \subset 2^S$ ($\forall a_1,a_2\in A: a_1\neq a_2 \iff a_1 \nsubseteq a_2$). Let's call subset $b \in 2^S$ covered by $A$ if $\exists a \in A :b \subseteq a $. I'm looking for a way to answer "What…
NooneAtAll3
  • 123
  • 7
1
vote
1 answer

Complement of $\{w\#x \mid w,x \in \Sigma^*, T(M_w) \neq \{x\}\}$

This is one of my homework assignment questions, that are quite difficult for me. The question states: Show that $L$ is not semi-decidable where $L = \{w\#x \mid w,x \in \Sigma^*, T(M_w)\neq \{x\}\}$ So I just need a better understanding of $L$ in…
456c526f
  • 23
  • 2
1
vote
1 answer

Finding all subsets of a set of MultiSets made of elements from a single MultiSet (without replacement)

(originally asked on StackOverflow) Two recent questions on StackOverflow by the same author1 are generally solved by the same technique. This feels to me like it would be a studied and perhaps well-solved problem. I would like to know what it…
Scott Sauyet
  • 113
  • 3
1
vote
0 answers

Data structure for overlapping sets

Is there a good data structure for storing overlapping sets? Consider having multiple sets which can overlap in various ways and would like to store them in the memory and access efficient way. Example: A = {a, b, c, d} B = {a, b, c} C = {b, c, d} D…
1
2