FOAM: general purpose
Monte Carlo Cellular Algorithm S. Jadach
Institute of Nuclear Physics, Krak ´ ow, Poland Presented with help of Thorsten Ohl
Outline:
• Introduction and motivation
• Cellular algorithm of FOAM
• Examples of numerical results
• Conclusions
These and related slides on http://home.cern.ch/jadach
Introduction: What is general purpose?
For the problem of function minimalization one takes MINUIT or some other program and applies it to arbitrary user-function. One may find also general
purpose programs for integration of “arbitrary” integrand. General-purpose means that these tools work, in principle, for a very wide range of user-functions.
For multi-dimensional Monte Carlo simulation problem, that is for the problem of generation randomly points according to a given n -dimensional distribution, there is precious little examples of the General Purpose Monte Carlo Simulators (GPMCS), that is programs which work (in principle) for arbitrary integrand.
Two essential reasons for scarcity of GPMCS’s:
(a) lack of ideas about the efficient algorithm,
(b) need of much CPU power and memory – only recently available/affordable.
General features of General Purpose Monte Carlo Simulators (GPMCS)
Inevitably the GPMCS has to work in 2 stages: exploration and generation.
During exploration GPMCS is “digesting” the entire shape of the n -dimensional distribution ρ(x 1 , x 2 , ...x n ) to be generated and memorize it as efficiently as possible using all CPU power and memory available.
Obviously, for the memorized ρ 0 (x 1 , x 2 , ...x n ) a method of the MC generation of the points ~x exactly according to ρ 0 (~x) , has to be available.
The quality of the distribution of the weight w = ρ/ρ 0 for events in the generation (small variance, good ration of maximum to average, etc.) is determined by the algorithm of the exploration. In other words, the “target weight distribution” in the generation is determining the algorithm of exploration.
The GPMCS programs will be always limited to “small dimensions”.
With presently available computers “small” means in practice n < 10
(up to n < 15 for certain function). This is already not so bad!!!
Cellular exploration of the distribution
The most obvious method to minimize the variance (or maximum weight) of the target weight distribution in generation (proposed already some 40 years ago) is to split integration domain into many cells, such that ρ(~x) is approximated by constant
ρ 0 (~x) within each cell. This is a cellular class of general purpose MC algorithms.
(I think that “stratified sampling”, used in the literature, has a narrower meaning.)
FOAM: shape of cells, how to cover space with cells?
Three shapes of cells are used pure simplices, pure hypercubes and Cartesian products of them. They can be rather easily and efficiently parametrized.
The system of cells can be created all at once (like in Vegas) or in a more evolutionary way, by the “split process”. In the Foam algorithm we rely on the
binary split of cells. )Choice of a cell to be split driven by target weight distribution.) The binary split assures automatically full coverage of the space,
simply because the primary “root cell” is the entire integration domain.
Variance reduction versus maximum weight reduction
In construction of the FOAM algorithm I have put most effort on the minimization of the ratio of the maximum weight to the average weight w max /hwi .
This parameter is essential, if we want to transform w -ted events into w = 1
events, at the latter stage of the MC generation.
Minimizing maximum weight is not the same as minimizing variance
σ = phw 2 i − hwi 2 . Usually minimizing w max is more difficult.
In FOAM minimizing variance is also implemented and optionally available.
It can be useful if case them w -ted events are acceptable.
Next slide shows two examples of the weight distribution evolution in the Foam,
when adding more and more cells.
Generation weight distribution: minimization of variance
Number of cells: 200, 2k, 20k
Generation weight distribution: minimization of maximum weight
!
"
# $% &$ '% $$ '% &$ (% $$
$% $$) '$*
$% &$) '$*
'% $$) '$*
'% &$) '$* +, -+ ., ++ ., -+ /, ++
+, ++0 .+1
+, -+0 .+1
., ++0 .+1
., -+0 .+1
/, ++0 .+1
/, -+0 .+1
Number of cells: 200, 2k, 20k
Cell split algorithm: covers both (a) w max and (b) variance minimization
We define two auxiliary distributions ρ 0 (x) and ρ loss (x) related to integrand ρ(x) .
Both are constructed together with the foam of cells, in the exploration process.
(1) EXPLORATION of ρ(x) and BUILD-UP of Foam of cells :
ρ loss (x) and ρ 0 (x) are evolving in the process of the division of cells.
R loss = R ρ loss d n x is minimized in the same process.
(2) MC event generation:
Events are generated according to ρ 0 (x) . R 0 = R ρ 0 d n x is known exactly.
R = R 0 hwi 0 where w = ρ/ρ 0 . The average h...i 0 is over events generated according to ρ 0 .
(a) Minimization of w max
ρ 0 (x) ≡ max y∈Cell i ρ(y) , for x ∈ Cell i , the “ceiling function”.
R loss = R d n x [ρ 0 (x) − ρ(x)] = R d n x ρ loss (x) ,
Note that rejection rate in final MC run = R loss /R .
(b) Minimization of of variance
ρ 0 (x) ≡ phρ 2 i i , for x ∈ Cell i . The average h...i i is over i − th Cell assuming flat distribution.
ρ loss (x) ≡ phρ 2 i i − hρi i , for x ∈ Cell i . Final MC variance is just ' R loss .
Two Rules governing binary split of a cell
Each split of a Cell: ω → ω 0 + ω 00 should decrease total R loss . R ω loss 0 + R ω loss 00 << R loss ω
How to get the best total decrease ∆R loss ?
[1] For each next cell split we choose a cell with the biggest R loss .
[2] Position/direction of a plane dividing a parent cell into two daughter cells is chosen to get the smallest total R loss .
How do we split a cell into two daughter cells?
General method relies on the small MC exercise on which events are generated with flat distribution, weighted with ρ and projected onto n (simplical case) or
n(n + 1)/2 (h-cubical case) of the cells.
Resulting histograms are analysed and the best “division geometry” found, for
which the estimate of ∆R loss is calculated. See next slides...
Geometry of n -dim. Simplical Cell division, 3-Dim. case
i
j
new vertex
daughter 2 daughter 1
Parent simplex
Pair of vertices x i and x j is chosen and a new vertex Y is put somewhere on the line in between: Y = λx i + (1 − λ)x j , 0 < λ < 1
Two daughter simplices are defined with the list of vertices:
(x 1 , x 2 , ..., x i−1 , Y, x i+1 , ..., x j−1 , x j , x j+1 , ..., x n , x n+1 ),
(x 1 , x 2 , ..., x i−1 , x i , x i+1 , ..., x j−1 , Y, x j+1 , ..., x n , x n+1 ).
Geometry of n -dim. Simplical Cell division, 3-Dim. case
i
j Y X
How do we choose (i, j) pair and the value of λ ?
Short sample of the MC events (100-1000) is generated ∈ cell.
Each MC point projected X → Y onto a given edge (i, j), i 6= j : Y = λ ij x i + (1 − λ ij )x j , λ ij (X) = |Det |Det i |
i |+|Det j | , Det i = Det(r 1 , ..., r i−1 , r i+1 , ...r n , r n+1 ),
Det j = Det(r 1 , ..., r j−1 , r j+1 , ...r n , r n+1 ), r k = x k − X ,
where Det(x 1 , x 2 , ..., x n ) determinant.
Choice of the best division edge, Simplical 3-Dim. case
1
2 3
4
(3,4)
(1,4)
(1,2)
(2,3) (2,4)
How do we select (i, j) ? out of n(n−1) 2 possibilities.
For each (i, j) the dN/dλ is histogrammed, and its LOSS functional R loss is
estimated. The edge (i, j) with the biggest LOSS is selected! For the cell division
λ is read from the histogram. λ is always a rational number, n/N bin !
Binary split 2-dim. example
! "
!
" #$% &
• Integrand covers narrow strip along edges.
• We intend to split upper triangle.
• 1000 w-ted events are generated and projected onto 3 sides of the parent triangle.
• 3 Projections are analyzed.
• Choosen is the cell with the smallest R loss (middle plot).
• Two resulting daughter triangles are shown at leftmost plot.
2-dimensional example of binary split: projection on one of edges
! "$#%& &
! '
• Projected integrand ρ(x) .
• Old ρ 0 for parent cell (majorizing ρ(x) ).
• New ρ 0 for two daughter cells.
• OLD R loss all area above red line, for the parent cell.
• New R loss between red line and New ρ 0 , for 2 daughters.
• Obviously I N ew 0 < I Old 0 , the division
point ? is chosen to MINIMIZE THE
LOSS functional/integral R loss !
Evolution of simplical foam at 2-dim.
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
" " " " " " " " " " "
##
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
# $$$$$$$$$$$$$$$$$$$$$$$$$$$$$
%
%
%
%
%
%
%
%
%
%
%&
&
&
&
&
&
&
&
&
&
&
# # # # # # # # # # # # # # #'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
(
(
(
(
(
(
(
# # # # # # # # # # # # # # # # # # # # # # # # # #
)
)
)
)
)
)
)
)
)
)
*
*
**
*
**
*
**
*)
)))))))))+
,, ,,
%
%
%
%
%
%
%
%
%
%
%
%
%
, , , , ,, , ,-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- !! !!!!! !!!! !!!! !!!!!$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
**********
!!!!!!*
**
*
**
*
**
*
.
.
.
.
.
.
.
.
.
.
*
**********
# # # # # # # # # # # # # # # #
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
# !
!
!
!
%%%%%%%%%%%%%%%%%%%%%%%%
!
!
!
' ' ' ' ' ' ' ' '// // /// #
#
#
#
#
#
#
#
#
#
#
#
#
#
#
/ / / // / / / // '
'
'
'
'
'
'
'
' 0
0
0
0
0
0
0
0
0 ...
"
"
"
"
"
"
"
"
"
"
" 0 0 0 0 0 0 0 0 0....
(((( (((1
+
&&&&&&&&&&&2
2
2
2
2
2
2
2
2
2
2222222222,
,
,
,
,
,
,
,
,
,
,
,
3 3 33 3 3 3 33 3 3 33 3 3---
-
--- 3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
4
4
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/
/ 4 4 4 4 4 4 4 4 4
5
6 5
7
5
8 5
9
5
:
5
; 5
< 5
= 5
>
5
6?
5
66 5
67
5
68 5
69 5
6: 5
6;
5
6< 5
6= 5
6>
5
7? 5
76
5
775
78 5
79 5
7:
5
7; 5
7<
5
7=
@
7> @
8?
5
86 5
87
5
88 5
89
5
8:
@
8; 5
8< 5
8= 5
8>
5
9? @
96
5
97 5
98 5
99 5
9:
5
9; 5
9< 5
9=
5
9> 5
:?
5
:6
5
:7 5
:8
@
:9
5
::
@
:;
5
:< 5
:=
5
:> @
;?
5
;6 @
;7 5
;8
5
;95
;: 5
;; @
;<
5
;=
5
;> @
<?
@
<6 5
<7
5
<8 @
<9
5
<: @
<;
5
<< @
<= 5
<>
@
=? @
=6 @
=7
@
=8
@
=9 @
=:
5
=; @
=<
@
==
@
=> 5
>? @
>6 @
>7
@
>8 @
>9
@
>:
@
>; @
><
@
>= @
>>
@
6 ??
@
6 ?6 @
6 ?7 @
6? 8
@
6 ? 9 @
6? : @
6? ; @
6? <
@
6?= @
6? >
@
66? @
666
@
667
@
668 @
669
@
66: @
66;
@
66<
@
66= @
66>
@
67? @
676@ 677
@
678 @
679
@
67: @
67;
@
67<
AAAAAAAAAAAAAAAAAAAAAAAB
B
B
B
B
B
B9?C C C C C C C C C
D
D
D
D
D
D
DE
E
E <6 F
F
F
F
FGGGGHHHHHH
=7 IIIIII
IH
HH
HH
H
HH
HH E
E
E
=9
A
A
A
ABBBBBBBJD
D
D
D
D
D=;KKKKKK
E
E
>;
LLLLLL C C C C C C C C C C CM
M
M
M
M
M
M
M
M
M
M
M
M
M
M
M
M >= NNNNNNNNO
O
OP
P
P
P
P
P
P
P
P
P
P 6??
E E EE EE
PPPPPQ
Q
Q
Q
Q
Q
Q
Q
Q
Q 6? 7
RR RPPPPPPE
E
E
E
E
E6 ? 8
SS S S S S S STTT
TQ
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q 6 ? : U
U
U
U
U
U
UMMVVVVV V
666
WWWW E
E
E
668 X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
XY Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y YG
G
G
G
66: F
F
F
F
F
F
FZ
Z Z Z Z Z Z Z Z Z Z
66< [
[
[
[
[
[
[
[
[
[
[
[
[
[
[\\\\\\\\\\\\\\\\\\ E
E
E
66= H
HH
HH
H
H]]]]]]]]]]B
B
B
67?
^
^
^
^
^
^R R R R R R R RG
G
678
__
OOOOOOOOOO
67<[[[[[[[[[[[[[[F
F
F
F
F
67=
R R R R R R R R R R R R R R R R RF
F
F
F
F
F
F
F
F
F
F
F
F
F
F
F
[
[
[
[
[
[
[
[
[
[
[
[
[
[ 67>
F
F
F
F
]]]]]]]]]]
68?
`````\
\
\
\M
M
M688 aaaaaaF
F
F
689a
a
a
a
a
a68:
b
b
b
bDDDDDD
68; X
X
X
D D D D D D D
68=
c
c
c
c
c
c 69? 698
R R R R R R R R R R R R R R R R R R R R R R R R
699 I
I
I
I
I
IFFFFFed
d
69; I
I
I
IddHHHHH
69<
E E E E E E E E E E E E E E E E E EE
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E 69>
M M M M M M M M M M M Mbb bbbC
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C 6:?
X X X X X X X X X X X XM
M
M
M
M
M
M
M
M
M
M
M 6:6 ZZ
O
O
OIIII
6:8
c c c cd
d
d
d
6:9
d d d d`
`
`
`
`
6:: \\\f
f
f
f
f
f
f
f
f
f
f
f
f
f
f 6:;
R R R R R R R R R R R R\\
6:< ggggggO
O
O[
[
[
[
[
[
[
[ 6:=
S SS SO
O
Og
g
g
g
g
g 6:>
U
U
U
UGGGIIII
6;? V
V
V
V
V
VUU U UIII
6;6
f ff ff X X
6;7 hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh E
E
E
E
E
E
E
E
E
E
E
E
E
E 6;9
iiiiiiiiiiiiiiiiiiiiiiiiiiiiih
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
hE
E
E
E 6;:
d d d d d ccM
M
M
M
M
M
M 6;; F
F
F
F
F
F
FG G G G G G G G G G G G G G G G G G G G G G E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E 6;=
]
]
]
]
]
]
]
]
]
] FFFFFF F E
E
E
6;>
\
\
\
6<?
G GG GGG G c cc ccc cC
C
C
C
C
C
C
C
C
C
C
C 6<7
M M M M M M M M MG
G
G
G
G
G
G
C
C
C 6<8
F
F
F
Fb
b b b E
E
6<9 F
F
F
FY
Y YOOO
6<;Z
Z
Z
Z
Z
Z
Z
Z
Z
ZY Y Y Y Y YFF FF
6<< \\
]
]
]
]
]
]
]
]
]
]AAAAAAAAAAA
6<= HHH
HH
H\
\
AAAAA
6<>
F
F G
G
G
G
6=?
R
R
R
R
R
R
R
R FF
6=6 R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R 6=7 d dd dd E E E E E E ES
S
S
S
S
S
S
S
S
S
S
S 6=9
RR E E Ed
d
d
d
d6=:
CCCCCG
G
G
G
G
6=;
GGGGGL
L
L
L
L
L6=< FFFI
I
I
I
I
I
I
OOOO
O6== jjjO
O
O
O
OE
E
6=>
[[[[[[[[[[[[[[[ E
E
E
E
E
E
E
E
E
E
E
E
E
E
E 6>?
f f ff f f ff f f f ff f f
E
E
E
E 6>6 FFFFFFFFFFFFFFi
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
i
ih
hhhhhhhhhhhhhhh 6>7
FFFFFFFh
h
h
h
h
h
h
h
h
h
h
h
h
h
h
h
HHHHHHHHHH 6>8
A
A
A
A
A
A
A
A
A
A
AO
OOOOOOOOOOOOO
6>9
__A
A
A
A
6>:
C C C C C C C C C C
6>;
C C C C C C C
K
K
K
K
K
K
K 6>< R
R
R
R
R
R
R
R
R
R
R
R
RR R R R R R R R R R R R
6>= E EE EE EE
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\ 7??
QQQQQQQQQQQE
E
E
E
E
E
E
\
\
\
\ 7?6
XXAAAW
W
W
W
7? 7 AAAAAAAX
X
7?8 HH
H
HH
H
HH
H
HH
H
H
HH
HH
H R R R R R R R R R R R R R R R R R R R E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E
E 7? 9
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
] R RRRHHHHHHHHHHHHHHHHHH
7?: KKKKKR RR RR R
7? ;
K KK R
R
R
R
R
RXXX
7?< Y
Y
B
B
B
B
BU U U U UU U
7?>
R
R
R
R
R
R
R
R
R
R
R
R
II 76 ?
IIEE
766 RR QQQQQQQQQ
Q`
`
`
`
`
`
`
`
`
`
` 767
````` ````` ` E
E
E
E
E
E
E
E
E
E768
769 f
f
f
f
76: XX76;
C C C C C C C C C C C C C C C CXXX76< ^
^
^
R
R
R
R
R
R
R
R
R
RR R R R R R R R R R R R R
76= R
R
R
R
R
R
R
R
R
R
R^^ ^ 76>
^ ^ ^ ^
77? c
c
c
c
c
c
c
c
c
c ^^^^ ^^
776C C C C C C C C
777
^
^
^
^ C
C
C
C
C
C
C
C
778
779
K
K
K
K
K
K 77: R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
`
`
` 77;
```f
f
f
f
f
f
f
f
f
f
f
f
f 77<
k
k
k
k
k
kf f f f f f f f f f f f fCC
C
C
C
C
C
C
77=
k kk kk kCC
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C 77> Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
YG G G G GFF FFFF F
78?
G G G G G G G G G GG Y YY Y Y YY Y YY Y Y
786 B
B
B E
E
787
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R BBB
788 RRRR789
R
R
R
R
78: [[O
O
O
O
O
O
O
O78;
[[[[[[ 78<h
h
h
hBBB
EE 78=
H
HHH
Hhhhh
78>
R R R R R RO
O
O
O
O
O
O
O
O P
P
P
P
P
P
P
P
P 79?
RR PPPPPPPPPN
N
N
N
N
N
N
N 796 R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R
R G
G
G
G
G
G
G
G
G
G
G
G
G
797
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
YR R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R R RG
G
G
G
G
G
G
G
G
798
\\ cccck
k
k
k
k799
\\ kkkkkd
d
d
d
d79: GGG BB79; Y
Y
Y
Y
Y
Y
Y BBBB
79<
A
A
AFFFF^
^
79=
A
A
A^ ^ E
E
79> l l
l l
l
l l l l
l
l l
l l l l
l l l
l l
ll l l
l l
l
l l
l l
l l
l
l l l l
l l
l l l l
l l l
l l
l
l l
l
l
l
l l
l l
l l l
ll l l
l
l l
l l
l l
l l
l l l
l l l
l
l l
l l
l
ll l l
l l
l
l l
l l
l
l l l
l l l l
l l
l l
l
l l
l l
l
l l
l ll
l l
l l
l l
l l l l
l l
l ll
l l l
l
l l l
l
l l
l l l
l l
l l
l l
l l
l l l l
l
l l
l l
l
l l
l l l l
l l
l l
l l
l l
ll l l
l l
l
l
l l
l
l ll l
l l
l
l l
l l
l l l
l l
l l
l
l l
l
l l l l
l
l
l l l
l
l
l l
l
l l
l
l
l
l
l l
l l
l ll
l
l l
l l l
l l
l l
l l
l l
l
l l l
l l
l
l
ll l l
l l l
l ll
l l l
l
l l l
l
l l
l l l
l l
l l
l l
l l
l
l l
l l l l l
l
l
l
l l l
l
l
l l
l l
l l l
l l
l
l l
l
l
ll l l
l
l
l l l l
l
l
l l
l
l l l
l l l
l
l l l
l l
l
l l
l
l
l l
l l l l l l
l l l l
l l
l l
l l l
ll l l
l
l l
l l
l
l
l l l
l l
l
l l
l
l l
l l
l l l l
l l
l
l l l
l l l l
ll
l l
l l l
l l
l l
l
l
l l l
l l
l l
l
l
l l
l
l l
ll l
l l l
l
l l
ll l
l l
l l
l
l l
l l
l
l l
l l
l l
l l l
l
l l
l l l l
l ll
l l l
l l
l
l l
l l l
l l
l l l
l
l l l
l l
l
l
l
l l
l l
l
l
l ll
l l
l
l
l l ll
l l
l l
l l l
l
l
l l l
l
l
l
l l l l l
l
l l
l
l
l l l
l l
l
l
l l l
l
l l
l
l
l l
ll l
l l
l l l
l l
lll
l l l
l l
l
l l l
l
l l
l l l
l l l
ll
l
l l l
l l
l
l
l
l l
l l
l l
l l
l l l l
l l
l l
l
l l l l
l
l l l
l l
l
l l l
l l
l l l
l l
ll l
l ll l
l
l l
l l
l l
l l
l l
l
l l
l l
l l
l l l
l l
l
l l
l l
l l
l l
l l
l
l l l l
l
l l
l
l l l
l
l l
l
l
l
l l l
l l
l l
l l
l
l
l l
l l l ll
l ll
l l l ll
l l
l l l l ll
ll l l
l
l
l l l
l
l
l l l
l l
l l
l l l
l l
l
l
l l l l l
l
l
l l l
l l
l l
l
l
l l
l l
l
l l l
l l l l
l
l l
l
l l l
l
l l
l
l l l
l l
l
l l
l l l
l l l
l
l l
l
l l l
l
l
l l l
l l
l l
l l
l l
l l ll l
l
l l l l l
l l
l
ll l l l
ll
l
l l
l
l l l
l l
l
l l l
l l l l
l l
l
l
l l
l l l
l l l
l
l l
l l
l l
l l
l l l
l l
l l
l l l
l l
l l
l l
l l
l
l l
l
l
l l
l l
l l
l
l l
l l
l
l l
l l
l l
l l
l
l l
l ll
l
l l
l
l
l
l l
l l
l l
l l
l l
l
l l
l
l l
l l
l l
l
l
l l l
l l l
l
l l
l
l
l
l
l l
l l l
l
l l
l l
l l l l l
l
l l
l
l
l
l l l l
ll l
l l
l l
l
l
l l l
l l
l
l
l l
l
l l
l l l
l l
l l
l l l
l
l l l l
l l
l
l l l l
l l l
l ll l l
l
l
l
l
l l
ll
l
l l l
l
l l
l
l
l l l l
l l l l
l
l l
l
l l l
l
l l
l l l
l
l
l l
ll
l
l
l l
l l
l
l l l l l
l ll
l l
l l
l l
ll
l l l
l
l
l l l
l
l l
l l
l l l l
l l l l
l
l l
l
l l
l l
l
l l l
l
l l l
l
l
l l
l l l
l
l l l l
l l
l
l l
l
l l
l l l
l
l
l
l l l
l l l
l l
l
l
l
l l
l
l l
l
l
l l l
l l
l
ll
l l l
l
l ll
l l l
l l
l l
l
l l
l
l l
l l l
l l
l
l l
l l l l
l l
Number of cells= 10, 70,
250, 2500.
Evolution of hyper-cubic. foam at 2-dim.