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.
精彩评论