Is there an optimal algorithm for finding all Up-sets of a certain set?

33 Views Asked by At

In my thesis, I need to find all Up-sets of this set: $$ P=\{ \top ,1,2,3,4,5, \bot\} $$ By the order considered in the picture and I tried to coding this problem by Mathematica but I cant find a nice and optimal algorithm. definition of Up-set is in this link:https://en.wikipedia.org/wiki/Upper_set. Thank you. enter image description here

1

There are 1 best solutions below

5
On

What algorithm complexity where you hoping for? For small sizes (say vertex set of size less than $20$ ) this can be easily brute forced rapidly.


As for your specific case, we can do it by hand rather easily looking at the following:

If an up-set contains $\perp$ then it must be $P$ and if an up-set does not contain $T$ it must be $\varnothing$.

So when finding the other up-sets we must only consider the elements $\{1,2,3,4,5\}$

Now, notice that our order can be expressed by noticing that $\{1,2,3\}$ are not realated between each other, but are all greater than either of $\{4,5\}$. Also $4$ and $5$ are not related.

Therefore any subset of $\{1,2,3\}$ gives us a top-set ( when we can't add either of $4$ and $5$). [this gives us $8$ top-sets].

Also, every non-empty subset of $\{4,5\}$ gives us a top-set (when we must add $1,2$ and $3$. [this gives us $3$ top-sets].

So in total there are $2+8+3=13$ topsets.