Can anyone tell if there exists a P-time algorithm for finding a anti-chain of size k in a partially ordered set? (or a DAG)
All resources I found online deal with finding the maximum anti-chain.
Can anyone tell if there exists a P-time algorithm for finding a anti-chain of size k in a partially ordered set? (or a DAG)
All resources I found online deal with finding the maximum anti-chain.
I think the formulation of the question is not precise enough since there are two parameters:
kthe size of the antichain;nthe size of the posetP;There is a clear algorithm which is polynomial in
nand exponential ink:enumerate all the subsets of size
kofP. Using some kind of gray code you can get each subset inO(1). So the cost is clearly proportional to the number of k-subsets which is a binomial coefficientchoose(n, k). The complexity is thereforeO(n^k).for each subsets, check if it's an antichain. Assuming you compare two elements of the poset in
O(1). You do that inO(k^2).So the stupid algorithm as a complexity of
O(k^2+n^k), which is polynomial inn.