开发者

calculating the complexity of the inclusion-exclusion principle

I have an equation the uses the inclusion-exclusion principle to calculate the probabilities of correlated events by removing the duplicate counting of intersections.

Now I want to know the comp开发者_运维百科lexity of this equation: What is the cost of computing the inclusion-exclusion principle in relation to the number of elements? is it exponential?


Well, the formula involves all subsets of the elements. There are 2^n subsets. Therefore it's at least exponential complexity.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜