# sets's questions - English 1answer

232 sets questions.

### inclusion and concatenation of languages

1 answers, 33 views formal-languages sets
so for a homework assignment i need to prove the following: We have arbitrary languages L1⊆∑1*, L2⊆∑2*, L3⊆∑3*, L4⊆∑4*Prove that the followging is either true or ...

### 4 Does this “set intersection” problem have a different name?

0 answers, 34 views np-complete sets
I've been back and forth about this one. I have the following theoretical homework problem, which describes the SET-INTERSECTION problem. In my homework, it's ...

### 5 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 ...

### 1 Determining possible data structures given a set of required operations

1 answers, 61 views data-structures sets dictionaries
This was an interview question that I was told is supposed to be an open ended discussion of the trade-offs. You have a collection of comparable objects and want to be able to do the following: 1. ...

### 2 Can a Turing machine determine if a set is accepted by a another Turing machine?

2 answers, 125 views computability turing-machines sets
Can a Turing machine $M_A$ determine if the Turing machine $M_B$ accepts the set $W_k$? I am curious about the answer to this as I am thinking about using the truth value of it on using it for a ...

### -1 Count points on same distance from set of points

1 answers, 16 views search-algorithms sets counting
Let's consider finite grid of points with size of $N$ by $M$ and set of $x$ points ($x$ is small number, up to 10, $N$ and $M$ are big numbers, up to 30000 )). Each of the $x$ points is described with ...

### 1 Data-structure for dynamic disjoint-sets

I have a collection of objects, with certain properties (let say 3 - zone, type, owner) only having a small predetermined possible set of values (like enum). This is just a simple (javascript) array ...

### Pruning a powerset based on a graph

0 answers, 27 views algorithms graphs graph-theory sets
I have a list of nodes l = [1, 2, 3, ... , n] and a list of tuples p = [(1, 2), (2, 3), ...], where the latter represents which ...

### How to read off the set represented by a van-Emde-Boas tree?

I'm reviewing my background in Algorithms and DS design. Specifically I never went through the van Emde Boas Tree. Though I can undestand the proto-vEB with related picture. I'm struggling to ...

### How to extract a set $C$ that contains $N$ subsets of a set $B$, covers all elements of an external set $A$, but $N$ is minimal?

Let $A$ denote a set that contains a relatively large number of different strings. Let $S_i$ denote these strings. Let $B$ denote a set of sets such that each subset contains a (relatively small, ...

### In two sets, identify set of pairs with maximal sum of connections

1 answers, 16 views algorithms optimization sorting sets
Given two sets of items $A = { a_1, .., a_N }, B = { b_1, .., b_M },$ and assuming a connection weight $w{_i}_j \ge 0$ between any possible pair $(a_i, b_j)$ that contains one item of each set, how ...

### 4 effective, efficient algorithms on antichains

In a partially ordered set L, an antichain is a subset A of L such that no two elements of A are comparable. Antichains are commonly used to represent upward-closed subsets of L, that is, sets S such ...

### 11 Computing set difference between two large sets

4 answers, 6.540 views algorithms data-structures sets

### 4 Finding the number of ways to partition $\{1,…,N\}$ into $P_1$ and $P_2$ such that $sum(P_1) = sum(P_2)$ for a given $N$

2 answers, 61 views algorithms optimization sets partitions
I am trying to think of how to optimize the following problem: Let $S = \{1,2,...,N\}$. How many ways can $S$ be partitioned into non-empty subsets $P_1$ and $P_2$ such that $sum(P_1) = sum(P_2)$? I ...

### 1 Reverse cartesian product matching all given rows

1 answers, 130 views algorithms combinatorics sets set-cover

### Algorithm to find most efficent partitioning of a set

1 answers, 36 views optimization sets
Given a set $S$ with a finite number of elements, where each $s_i\in S$ is itself a set with a finite number of elements, how do you partition $S$ using as few partitions as possible, such that all ...

### 1 an appropriate data-structure to represent a family of sets (Which supports exactly MAKE-SET(x), UNION(S1,S2), REPORT(S))

1 answers, 23 views data-structures sets union-find
I need to represent a family F of sets with some appropriate datastructure. The datastructure needs to support the procedures MAKE-SET(x), DISJOINT-UNION(A,B) and REPORT(A). I dont have a problem with ...

### Space efficient data structure for subsets of [1:n]

2 answers, 37 views data-structures sets space-analysis
Let $S= \{1,2,3...,n\}$ be a set and I want to store a subset of $A \subseteq S$. Is there exists any data structure such that insert$(x)$, delete ($x$) can be done in amortised $O(1)$ time and search(...

### 5 Finding set of disjoint sets with additional value optimization

1 answers, 427 views optimization sets
I've got a set $Q$ of pairs $[S, v]$ where $S$ is a nonempty set and $v$ is a value ($v \in \mathbb{N}_{+}$). I need to find a subset $R$ of $Q$ with following properties: Sum of all $v$'s is maximum ...

### 1 Checking if the mimimum is unique

We have a finite poset and its subset $S$. We can enumerate elements of $S$ using an iterator. I need to check if there are more than one minimal elements of $S$ (regarding the above poset). The ...

### Can I union two cuckoo filters?

If I have a cuckoo filter containing {a,b} and another cuckoo filter containing {a,c}, can I union the filters to make one ...

### 2 What algorithm could I use to find the largest set of disjoint members from a set of subsets of a set?

1 answers, 29 views algorithms sets
I've written a political quiz based on data from the public whip. They group politicians' votes by policy; each vote can belong to many policies. There are too many policies for me to ask a question ...

### Finding intersection with a-priori knowledge that intersection is small

0 answers, 19 views sets communication-complexity
Assume Alice and Bob have sets $A$ and $B$ of size $n$ each. What are the most communication efficient algorithms for finding the intersection between the two sets if I know that the intersection is ...

### 2 hash-table subsets

Having trouble figuring this out. If I have 2 sets of integers how would I use a hash table to test if set A is a subset of set B (in pseudocode). I think I understand that basically I would need to ...

### 2 Minimum overlap partitioning

0 answers, 53 views algorithms sets
We are given $N$ sets of $M$ non-unique elements each. The amount of overlap (computed as the element count in the set intersection) between the elements of these sets is stored in a $N \times N$ ...

### 3 Compute the union of two sets between two endpoints minimizing communication complexity

I have two endpoints, $a$ and $b$, that can communicate through a channel. $a$ is storing a set of fixed-length strings $A = \{a_1, \ldots, a_{N_A}\}$, and $b$ is storing another set of fixed-length ...