We study two well-known planar visibility problems, namely visibility testing and visibility counting, in a model where there is uncertainty about the input data. The standard versions of these problems are defined as follows: we are given a set S of n segments in R2, and we would like to preprocess S so that we can quickly answer queries of the form: is the given query segment s∈S visible from the given query point q∈R2 (for visibility testing) and how many segments in S are visible from the given query point q∈R2 (for visibility counting).In our model of uncertainty, each segment may or may not exist, and if it does, it is located in one of finitely many possible locations, given by a discrete probability distribution. In this setting, the probabilistic visibility testing problem (PVTP, for short) is to compute the probability that a given segment s∈S is visible from a given query point q and the probabilistic visibility counting problem (PVCP, for short) is to compute the expected number of segments in S that are visible from a query point q. We first show that PVTP is #P-complete. In the special case where uncertainty is only about whether segments exist and not about their location, we show that PVTP is solvable in O(nlogn) time. Our algorithm for PVTP combined with linearity of expectation gives an O(n2logn) time algorithm for PVCP.Using the algorithm for PVTP, together with a few old tricks, we can show that one can preprocess S in O(n5logn) time into a data structure of size O(n4), so that each PVTP query for a fixed segment s can be answered in O(logn) time.We also give a faster 2-approximation algorithm for this problem. At the end, we improve the approximation factor of the algorithm.
Read full abstract