## Using subsets in a list to estimate total number of words

How do I estimate the total number of words in the English language that have exactly 3 letters? Buddy told me to count the number of subsets in a list, but I don’t know how that relates.

## Maximal subsets of a point set which fit in a unit disk

Suppose that there are a set $$P$$ of $$n$$ points on the plane, and let $$P_1, \dots, P_k$$ be not necessarily disjoint subsets of $$P$$ such that every point in $$P_i|\ 1 \leq i \leq k$$ fits inside a unit disk $$D_i$$.

Moreover, each $$P_i$$ is maximal. This means that if the corresponding unit disk $$D_i$$ moves to cover another point, then one point which was inside the disk will be uncovered.

Here is an example: In the above figure, there are three maximal subsets.

I don’t know whether this problem has a name or was studied before, but my question is:

1. Can $$k$$ be $$O(1)^n$$?
2. If not, then can we find those subsets in polynomial time w.r.t. $$n$$?

## Counting a property of every sub-sets

Consider a array $$a$$ of length $$n$$ and $$a_i and a array of length $$n$$ ,$$b=[0,0….(n$$ $$times)]$$.Consider every sub-set of array $$a$$ and denote it by $$s$$ i need to find a number $$k$$ with the largest number of occurrences or the most frequent one, If there are several options, choose the smallest one and then increase $$b[k]$$ by one .I need to final $$b$$ after considering all sub sets.

My idea is that ,I make a array $$val$$ of length $$n$$ where $$val[i]$$ is number of times $$i$$ occurred in array $$a$$ .Consider that i am trying to find value for $$b[k]$$ then i will create a array $$temp$$ of length where $$temp[i]=min(val[k],val[i])$$.Then consider the value of $$val[k]$$ to be $$m$$ then in a subset element $$k$$ can occur from $$0$$ to $$m$$ times and using this i will find answer for all of its occurrences from $$0$$ to $$m$$ which is a simple number of sub sets problem and finally i will have my answer.

But my algorithms complexity is bad as it quadratic or worse.Could anyone help me.

## Finding $l$ subsets such that their intersection has less or equal than $k$ elements NP-complete or in P?

I have a set $$M$$, subsets $$L_1,…,L_m$$ and natural numbers $$k,l\leq m$$.

The problem is:

Are there l unique indices $$1\leq i_1,…,i_l\leq m$$, such that

$$\hspace{5cm}\left|\bigcap_{j=1}^{l} L_{i_{j}}\right| \leq k$$

Now my question is whether this problem is $$NP$$-complete or not. What irritates me is the two constraints $$l$$ and $$k$$ because the NP-complete problems that were conceptually close to it that I took a look on (set cover, vertex cover) only have one constraint respectively that also appears in this problem.

I then tried to write a polynomial time algorithm that looks at which of the sets $$L_1,…,L_m$$ share more than $$k$$ elements with other sets but even if all sets would share more than $$k$$ elements with other this wouldn’t mean that their intersection has more than $$k$$ elements…

This question kind of comes close but in it there is no restriction on the amount of subsets to use and the size of the intersection should be exactly $$k$$, but maybe this could be useful anyways.

Can somebody further enlighten me ?

Posted on Categories proxies

## How to find optimal partition subsets

Given an partition [0,1]，there are 5000 partition subsets Pi=[ai1,ai2]∈[0,1], 0≤ai1≤ai2≤1, i=1,2,…,5000. I want to analyze these subsets and find 10 subsets to contain sixty or seventy percent of the subsets. These 10 subsets could be disjoint, even overlapped.

## How to prove ” A set with n elements has n(n − 1)/2 subsets with exactly two elements.”

Prove by induction: A set with n elements has n(n − 1)/2 subsets with exactly two elements.

Thanks KK

## Checking disjointness between subsets of a poset

If there is a poset $$(P, \le)$$ and two sets $$X \subseteq P$$ and $$Y \subseteq P$$, and we have a way $$f : P^2 \to 2$$ to efficiently compute for any $$(x, y) \in P^2$$ whether there exists a $$z \in P$$ such that $$(x \le z) \wedge (y \le z)$$, we want to return $$\mathbf{T}$$ if there exists a pair $$(x, y) \in X \times Y$$ such that $$f(x, y) = 1$$ and $$\mathbf{F}$$ otherwise, using the fewest possible number of calls to $$f$$.

Posted on Categories proxies

## Literature request: Generating all vertex subsets of a graph

I made the same post here in Mathematics Exchange but maybe here is a better place.

I am working in an algorithm which finds a unique maximal independent set of vertices which generates all other vertex subsets. This is done using two measures of ‘importance’ for vertices. I assume this might have some applications outside mathematics, especially in computer science, but I am not sure where I can read about such applications. Does anyone have any good literature suggestions?

Posted on Categories proxies

## Optimal ordering – Dynamic programming on subsets

We have a set T of n elements and m subsets $$R_i \subset T i = 1,…,m$$. The $$S_i$$ are not assumed to be different. We also define an ordering of T, a one-to-one mapping $$\pi$$ of $$T$$ onto the set of integers $${1,…n}$$. That is, every $$\pi(v)$$ is an integer from 1 to n and all $$\pi(v), v \in T$$ are distinct. For a set $$R \subset T$$ and an ordering of $$\pi$$ of $$V$$, let $$l_\pi(S)$$ and $$r_\pi(S)$$ denote, respectively, the smallest and largest value $$\pi(v)$$ among all $$v \in S$$. The problem is to find an ordering $$\pi$$ that minimizes $$\sum_{i=1}^m (r_\pi(S_i) – l_\pi(S_i))$$.

This problem is NP-hard but is in FPT and can be solved with dynamic programming on subsets in $$O^*(2^n)$$

The idea here is to optimize the ordering of the first $$k$$ items and then go from $$k$$ to $$k+1$$ items and prove that the time complexity does not change when doing so.

But how do we optimize the ordering for the first $$k$$ items in just $$O^*(2^n)$$ time? It seems like the same problem as the initial one to me.

Posted on Categories proxies

## Functions cumputable in $\theta(n)$ and $\theta(|S| \cdot n)$ for calculating subsets of size |S|

I need to define a function $$f: \mathbb{N} \rightarrow \{0,1 \}$$ that is computable (by a deterministic TM) in $$\theta(n)$$ worst case time and such that the time complexity for calculating $$f(S)$$ is $$\theta(|S| \cdot n)$$ for all finite $$S \subset \mathbb{N}$$ where $$S$$ is of the form $$S = \{0,1,2, \dots ,k \}$$ for some $$k \in \mathbb{N}$$

A naive attempt was to define $$f$$ by the positiveness of a polynomial of degree $$n$$ but the problem is that it is unknown whether computing the roots of a polynomial of degree $$n$$ can be done in polynomial time. If it can be done in polynomial time then $$f(S)$$ can be done in $$\theta(n) \neq \theta(|S| \cdot n)$$ worst case time by summing the size of ranges of positiveness.

Is there any better approach?

Posted on Categories proxies