Original Research Paper oi:10.5566/ias.v32.p101-105 EXACT SIMULATION OF A BOOLEAN MODEL CHRISTIAN LANTUÉJOULB MinesParisTech 35 rue Saint-Honoré 77305 Fontainebleau France e-mail: christian.lantuejoul@mines-paristech.fr Receive February 27 2013; revise April 4 2013; accepte May 5 2013) ABSTRACT A Boolean moel is a union of inepenent objects compact ranom subsets) locate at Poisson points. Two algorithms are propose for simulating a Boolean moel with non uniformly boune objects in a boune omain. The first one applies only to stationary moels. It generates the objects prior to their Poisson locations. Two examples illustrate its applicability. The secon algorithm applies to stationary an non-stationary moels. It generates the Poisson points prior to the objects. Its practical ifficulties of implementation are iscusse. Both algorithms are base on importance sampling techniques an the generate objects are weighte. eywors: Boolean moel importance sampling Minkowsky functionals Steiner formula. INTRODUCTION The Boolean moel is certainly one of the most currently use ranom set moels in mathematical morphology stochastic geometry an spatial statistics. It is efine as the union of a family of inepenent ranom compact subsets enote for short as objects ) locate at the points of a locally finite Poisson process. It is stationary if the objects are ientically istribute up to their location) an the Poisson process is homogeneous an non-stationary otherwise. Despite its wiesprea use it seems that little attention has been pai to the following problem: How to perform exact simulations of a Boolean moel in a boune omain? The solution to that problem is not straightforwar unless the objects are uniformly boune. The ifficulty lies in that the intersection of a Boolean moel an a boune omain is also a Boolean moel but its parameters are ifferent. The more remote the object to the omain the less chance they have to hit it. On the other han the larger the objects the more chance they have to hit the omain. After a brief reminer on the Boolean moel this problem is investigate. Although most emphasis is place on the stationary case because of its possible connections with stereology the general case is also treate in a secon part of the paper. Two examples serve to illustrate the algorithms an their implementations. Here is the set of notation that will be use throughout the paper. Unless specifie the workspace is the -imensional Eucliean space R with Lebesgue measure v. The origin of R is enote by o. More generally points are enote by lower case letters subsets by capital letters an family of subsets by calligraphic letters. If x R an A R τ x A stans for the translation of A w.r.t. vector ox. The ilation of A by another subset B is efine as δ B A = {x R : τ x B A }. DEFINITION AND MAIN PROPERTIES The basic ingreients of a Boolean moel are i) a Poisson point process P with an intensity function θ = θ x x R ) that is assume to be locally integrable. ii) a family of nonempty an mutually inepenent compact ranom subsets A x x R ). A x is calle the object locate at x. If it takes simple shapes then its statistical properties can be specifie by elementary escriptors e.g. istribution of its raius for a isk). For more intricate shapes the hitting functional of A x can be consiere Matheron 1975). It assigns each compact subset of R in short ) the probability that it intersects with A x T x ) = P{A x }. 1) Definition 1 A Boolean moel is a union of objects locate at Poisson points X = A x. x P 101
LANTUÉJOUL C: Simulation of a Boolean moel Our objective is to simulate the Boolean moel in a compact omain say Z. Insofar as this mainly consists of simulating the objects of X that intersect with Z it is crucial to assume their number to be almost surely finite. Uner this assumption it can be shown Lantuéjoul 2002) that the number of objects hitting any compact subset of Z is Poisson istribute with mean ϑ) = θ R x T x ) x Z). 2) In particular the avoiing functional of X Z efine for each Z) as Q X Z ) = P{X Z) = } = P{X = } is equal to Q X Z ) = exp ϑ) ) Z). 3) STATIONARY CASE ALGORITHM In this case the intensity function is constant say θ an all objects have the same hitting functional up to a translation T x ) = T o τ x ). 4) In what follows it is convenient to write T o ) = FA)1 A where F symbolically) enotes the istribution of the parameters of A o. Then we have T x ) = FA)1 τx A. Applying this formula to Eq. 2 an permuting integrals the mean number of objects hitting Z becomes ϑz) = θ FA)v δa Z ) = θe { v δa Z )} 5) which gives the following expression for the avoiing functional of X Z. Q X Z ) = exp θ FA)v δa )). Let us write it slightly ifferently Q X Z ) = exp ϑz) F Z A) v ) δ A ) v δ A Z) 6) which involves a weighte version F Z of F F Z A) = FA)v δ A Z) E{v δ A Z)}. 7) An interpretation of Eq. 6) is as follows: X Z is the union of a Poisson number mean ϑz)) of inepenent objects of the form τẋa where A is istribute like F Z an ẋ is a uniform point over δ A Z. Hence the simulation algorithm: Algorithm 1 i) set X = ; ii) generate n P ϑz) ) ; iii) if n = 0 return X Z an stop; iv) generate A F Z ; v) generate x U δ A Z); vi) put X = X τ x A n = n 1 an goto iii). The main ifficulty with this algorithm is step iv): How to simulate the weighte istribution F Z? The next section shows that interesting simplifications arise when the objects are convex. CONVEX OBJECTS Such algorithmic simplifications actually arise only when the simulations are performe within a ball-shape omain. Accoringly it is avantageous to firstly exten the simulation fiel to a ball then perform the simulations in the extene omain an finally restrict the simulations prouce to the actual simulation fiel. The choice of the ball is unimportant as long as it encloses the simulation fiel. One possibility is the ball circumscribe to the simulation fiel. In what follows the simulation fiel Z is assume to be a ball say Boρ). Then Steiner formula applies an shows that the mean number of objects hitting Z epens only on the expecte Minkowski functionals of the objects: ϑz) = θ ) E{W k A)}ρ k. 8) k Moreover F Z can be simulate as a mixture of istributions of objects weighte by their Minkowski functionals: F Z ) k Wk A)ρ k A) = FA) k) E{Wk A)}ρ k = p k F k A) 102
with F k A) = FA)W ka) E{W k A)} k = 0... 9) exponential istribution has been chosen equal to 7.22 so as to provie a backgroun proportion of 30%. an ) k E{Wk A)}ρ k p k = ) k = 0... 10) l=0 l E{Wl A)}ρ l Using this mixture of weighte istributions the algorithm for simulating F Z becomes Algorithm 2 i) generate k p; ii) generate A F k A); iii) return A an stop. The following two examples show how this algorithm can be implemente. Example 1 The objects are balls an their raii follow inepenent exponential istributions with mean 1/a Fig. 1. Simulation of a Boolean moel of iscs with exponential raii. Example 2 Here is a somewhat more elaborate example even if the Boolean moel consiere is only twoimensional. The objects are typical Poisson polygons erive from a network of Poisson lines with intensity λ see Fig. 2. P{R > r} = exp ar). Starting from Eq. 5 the mean number of objects hitting Z is ϑz) = θe { ω ρ + R) } = θ!ω a aρ) k k! where ω = π /2 /Γ/2 + 1) is the -volume of the unit ball. The next step is the simulation of F k A). Actually it can also be written F k r) because the only ranom element of A is its raius. If A = Bor) then W k A) = ω r k an E{W k A)} = ω k)!/a k. Plugging these values into Eq. 9 we obtain F k r) = aexp ar)ar) k k)! This is a gamma istribution with parameter k + 1 an scale factor a. A simple way to simulate it is to consier lnu 1 u k+1 )/a where u 1...u k+1 are inepenent uniform values on ]01[. As an illustration Fig. 1 shows a simulation of a Boolean moel of iscs with exponential raii. The isplaye simulation fiel is a 7 5 rectangle. The Poisson intensity is θ = 10 an the parameter a of the. Fig. 2. Realization of a Poisson line process. The polygons elimite by the lines are Poisson polygons. These polygons have been extensively stuie in Miles 1969) an Matheron 1975). In particular their expecte Minkowski functionals are E{W 0 A)} = 1 πλ 2 E{W 1A)} = 1 λ E{W 2A)} = π. Using these expecte values Eq. 8) gives ϑz) = θ πλ 2 1 + πλρ)2. Not so simple is the simulation of F Z A) = p 0 F 0 A)+ p 1 F 1 A)+ p 2 F 2 A). The explicit values for the weights are 1 p 0 = 1 + πλρ) 2 p 1 = 2πλρ 1 + πλρ) 2 p 2 = π2 λ 2 ρ 2 1 + πλρ) 2. With probability p 0 a polygon must be simulate from F 0. The stanar proceure to o this consists of generating Poisson lines sequentially by increasing 103
LANTUÉJOUL C: Simulation of a Boolean moel istance from the origin. The proceure is continue until the generation of aitional lines no longer affects the polygon containing the origin. With probability p 1 a polygon must be simulate from F 1. To o this a polygon is first generate from F 0 an then split by a uniformly oriente line through the origin. It remains to select at ranom one of the two polygons thus elimite see Fig. 3). With probability p 2 a polygon must be simulate from F 2. The algorithm propose by Miles 1974) consists of taking the intersection between a polygon generate from F 0 an a cone elimite by two ranom rays emanating from the origin see Fig. 3). Both rays are uniformly oriente an separate by an angle with p..f. f ϕ) = ϕ sinϕ/π. provie that ϑz) > 0 if ϑz) = 0 then X Z = a.s.). On the other han Eq. 2 can be use to erive the following expansion ϑ) ϑz) = θ x T x Z) R ϑz) T x ) T x Z) x which shows that ϑ)/ϑz) is the hitting functional of some object of Z say A Z. More precisely A Z is locate accoring to the pf f x) = θ xt x Z) ϑz) x R. 11) Moreover the conitional hitting functional of A Z given its location x is equal to o o o T x ) T x Z) = P{A x Z) A x Z }. 12) Fig. 3. Weighte polygons generate from istributions F 0 left) F 1 mile) an F 2 right). To illustrate the construction a simulation of a Boolean moel of Poisson polygons is epicte in Fig. 4. With a Poisson intensity θ an a Poisson line intensity λ respectively set to 10 an 1.625 the backgroun proportion is close to 30%. A Z is calle a typical object hitting Z. The interest of typical objects lies in the following property Lantuéjoul 2002): Proposition 1 X Z is the union of a Poisson number mean ϑz)) of typical objects hitting Z. Inee we can reaily check that the avoiing functional of such a union of typical objects coincies with that of X Z: exp ϑz) ) ϑ n Z) 1 ϑ) ) n = exp ϑ) ). n=0 n! ϑz) Fig. 4. Simulation of a Boolean moel of Poisson polygons. NON STATIONARY CASE ALGORITHM Let us start again with Eq. 3 that provies the avoiing functional of X Z an let us write it like Q X Z ) = exp ϑz) ϑ) ) ϑz) From this proposition the following algorithm is erive for simulating a Boolean moel even non stationary in the omain Z. Algorithm 3 i) set X = ; ii) generate n P ϑz) ) ; iii) if n = 0 return X an stop; iv) generate a typical object A Z hitting Z; v) put X = X A Z n = n 1 an goto iii). 104
PRACTICAL IMPLEMENTATION Algorithm 3 calls for several remarks. Step ii) assumes that ϑz) is explicitly known but this is not always the case because the integral of θ x T x Z) may not be mathematically tractable. Moreover step iv) requires simulating the pf Eq. 11) that specifies the location of the typical objects hitting Z. This istribution may have a complicate expression. Step iv) also involves generating conitionally typical objects given their locations. It is possible to generate objects A x sequentially till one is prouce that hits Z. This algorithm can be easily implemente but lacks efficiency. In orer to alleviate these ifficulties rejection an coupling methos can be resorte to. A typical approach is to consier another Boolean moel X that ominates X in the sense that its ingreients satisfy the following three properties: i) its Poisson intensity function θ satisfies θ x θ x at each point x) ii) its population of objects A x) satisfies A x A x iii) there exists an algorithm to conitionally simulate A x given A x. Then the iea is firstly to generate the objects of X hitting Z. Then each generate object A x is save with probability θ x /θ x an iscare with the complementary probability 1 θ x /θ x. Finally each remaining object A x is replace by a new object A x generate using the conitional algorithm mentione in iii). A simulation of X in Z is given by the union of these new objects in Z. Hence a Boolean moel can effectively be generate whenever it is ominate by another Boolean moel that is numerically tractable an can be simulate. There is no general rule for builing such a ominating moel. This must be one on a case by case basis. ACNOWLEDGEMENTS The topic of this paper was presente at the S4G Conference June 25-28 2012 in Prague Czech Republic. The author thanks P. Calka for fruitful iscussions about the simulation of weighte Poisson polygons. REFERENCES Lantuéjoul C 2002). Geostatistical simulations: Moels an algorithms. Berlin: Springer. Matheron G 1975). Ranom sets an integral geometry. New York: Wiley. Miles RE 1969). Poisson flats in Eucliean spaces. Av Appl Prob 1:211-37. Miles RE 1974). A synopsis of Poisson flats in Eucliean spaces. In: Haring EF enall DG es. Stochastic geometry. New York: Wiley. pp. 202 27. 105