We develop a randomized approximation algorithm for the size of set union problem |A1 ∪ A2 ∪ ... ∪ Am|, which is given a list of sets A1, ..., Am with approximate set size mi for Ai with mi ∈ ((1 − βL)|Ai|, (1 + βR)|Ai|), and biased random generators with Probfor each input set Ai and element x ∈ Ai, where i = 1, 2, ..., m. The approximation ratio for |A1 ∪ A2 ∪ ... ∪ Am| is in the rangefor any ǫ ∈ (0, 1), where αL, αR, βL, βR ∈ (0, 1). The complexity of the algorithm is measured by both time complexity and round complexity. The algorithm is allowed to make multiple membership queries and get random elements from the input sets in one round. Our algorithm makes adaptive accesses to input sets with multiple rounds. Our algorithm gives an approximation scheme with O(m • (log m) O(1) ) running time and O(log m) rounds, where m is the number of sets. Our algorithm can handle input sets that can generate random elements with bias, and its approximation ratio depends on the bias. Our algorithm gives a flexible tradeoff with time complexity O m 1+ξ and round complexity O 1 ξ for any ξ ∈ (0, 1). We prove that our algorithm runs sublinear in time under certain condition that each element in A1 ∪ A2 ∪ ... ∪ Am belongs to m a for any fixed a > 0. A O r(r + l|λ|) 3 l 3 d 4 running time dynamic programming algorithm is proposed to deal with an interesting problem in number theory area that is to count the number of lattice points in a d−dimensional ball B d (r, p, d) of radius r with center at p ∈ D (λ, d, l), whereand another arbitrary integer i k for k = 1, 2, ..., d}. We prove that it is #P-hard to count the number of lattice points in a set of balls, and we also show that there is no polynomial time algorithm to approximate the number of lattice points in the intersection of n-dimensional balls unless P=NP.