Articles
Average Running Time Analysis of an Algorithm to Calculate the Size of the Union of Cartesian Products

https://doi.org/10.1016/S1571-0653(04)00409-3Get rights and content

Abstract

Abstract

We consider the problem of calculating the size of the union of Cartesian products of finite sets of integers Sij, ∣Ui=1,…,n Si1xxSim∣ where m denotes the dimension of the space and n the number of Cartesian products.

This problem, denoted by SUCP, contains as a special case the problem of counting the number of satisfying assignments of the satisfiability problem (SAT). We present an algorithm to solve the problem SUCP, called the grouping method.

For the average running time analysis, Sij are constructed by randomly selecting each element in set D = {1, 2,…, d} with probability p. We show that the average running time of the grouping method is O(mnd · min{(nd(l — p) + l)m-1, dm-1}), which is more efficient than the time complexity O(mndm) of the naive method if n(l-p) ⪡ 1 holds.

References (4)

There are more references available in the full text version of this article.

Cited by (0)

View full text