**Anatoly Klypin and Jon Holtzman**

Department of Astronomy, New Mexico State University

Las Cruces, NM 88001

**Abstract**

Particle-Mesh (PM) codes are still very useful tools for testing predictions of cosmological models in cases when extra high resolution is not very important. We release for public use a cosmological PM N-body code. The code is very fast and simple. We provide a complete package of routines needed to set initial conditions, to run the code, and to analyze the results. The package allows you to simulate models with numerous combinations of parameters: open/flat/closed background, with or without the cosmological constant, different values of the Hubble constant, with or without hot neutrinos, tilted or non-tilted initial spectra, different amount of baryons.

Routines are included to measure the power spectrum and the density distribution function in your simulations, and a bound-density-maxima code for halo finding. We also provide results of test runs. A simulation with $256^3$ mesh and $128^3$ particles can be done in a couple of days on a typical workstation (about 70Mb of memory is needed). To run simulations with $800^3$ mesh and $256^3$ particles one needs a computer with 1Gb memory and 1Gb disk space. The code has been successfully tested on an HP workstation and on a Sun workstation running Solaris, but we expect it should work on other systems.

The package can be downloaded from http://astro.nmsu.edu/$\sim$aklypin/PM/PMcode.tar.gz A PostScript version of this manual can be obtained from http://astro.nmsu.edu/$\sim$aklypin/PM/PMcode.ps.gz

We provide this tool as a service to the astronomical community, but we cannot guarantee results.

# **Introduction**

There are many different numerical techniques to follow the evolution of a system of many particles. For earlier reviews see Hockney & Eastwood (1981) and Sellwood (1987). The most frequently used methods for cosmological applications fall in three classes: Particle Mesh (PM) codes, Particle-Particle/Particle-Mesh (P$^3$M) codes, and TREE codes. All methods have their advantages and disadvantages.

**PM codes** use a mesh for the density and potential. As a result, their resolution is limited by the size of the mesh. The largest simulations done by the author have been on a $800^3$ mesh with $3\times 256^3
=1.5\times 10^8$ particles. The SP2 parallel supercomputer at Cornell has been used to run simulations with a $1600^3=4.096\times 10^9$ mesh (Gross, 1997). There are two advantages of the method: i) it is fast (the smallest number of operations per particle per time step of all the other methods), ii) it typically uses very large number of particles. The latter can be crucial for some applications. There are a few variants of PM codes. A "plain-vanilla" PM was described by Hockney & Eastwood (1981), and this includes a Cloud-In-Cell density assignment and a 7-point discrete analog of the laplacian operator. Higher order approximations improve the accuracy on large distances, but degrade the resolution (e.g. Gelb (1992)). In an effort to reduce the order of approximation and to increase the resolution, Melott (1986) introduced the staggered mesh. It gives a better resolution on cell-size distances, but particles get self-forces (an isolated particle experiences a force from itself), which might be not a welcome feature.

**P$^3$M codes** are described in detail in Hockney & Eastwood (1981) and in Efstathiou et al.(1985). They have two parts: a PM part, which takes care of large-scale forces, and a PP part, which adds a small-scale particle-particle contribution. The simulations usually have $64^3$–$100^3$ particles. Because of strong clustering at late stages of evolution, the PP part becomes prohibitively expensive once large objects start to form in large numbers. Significant speed is achieved in a modified version of the code which introduces subgrids (next levels of PM) in areas with high density (AP$^3$M code of Couchman (1991)). With modification this code runs as fast as TREE code even for heavily clustered configurations (Couchman 1991).

**TREE codes** are the most flexible code in the sense of the choice of boundary conditions (Appel 1985, Barnes & Hut 1986, Hernquist 1987). They are also more expensive than PM: it takes 10-50 times more operations. Bouchet & Hernquist (1986) and Hernquist, Bouchet & Suto (1991) have extended the code for the periodical boundary conditions, which are important for simulating large-scale fluctuations.

**Multigrid methods** were introduced long ago, but only recently have they started to show a potential to produce real results (Anninos, Norman & Clarke 1994, Suisalu & Saar 1995, Kravtsov et al.1997). At present the most advanced and fastest multigrid code has been developed by Kravtsov et al.(1997).

#  **Equations and dimensionless variables**

The equations of motion of particles in expanding coordinates, which are used in our PM code, were presented by Kates et al.(1991). Different numerical effects (including resolution) were discussed in Klypin et al.(1996). We use comoving coordinates ofr particles $\mathbf{x}=\mathbf{x}(t)$, which are related to proper coordinates by $\mathbf{r}=a(t)\mathbf{x}$, where $a(t)=(1+z)^{-1}$ is the expansion parameter. Instead of using peculiar velocity $\mathbf{v}_{\rm pec}=a\dot\mathbf{x}$ we write the equations for particle momenta $\mathbf{p}$:

$$\mathbf{p}=a^2\dot\mathbf{x}, \quad \mathbf{v}_{\rm pec}=\mathbf{p}/a  \label{Eqp}$$

This choice of "velocity" simplifies the equations of motion by removing a few terms with $\dot a/a$. It is also convenient to change the time variable from time $t$ to the expansion parameter $a$. The equations governing the motion of particles are: $${d\mathbf{p}\over da} =-{\nabla\phi\over\dot a}, \quad
{d\mathbf{x}\over da} = {\mathbf{p}\over \dot a a^2}         \label{Eqdxda}$$

$$\nabla^2\phi = 4\pi G\Omega_{\rm m}(t)a^2\rho_{\rm cr}(t)\delta
=4\pi G\Omega_0\rho_{\rm cr,0}{\delta\over a}, \quad
\delta\equiv {\rho(\mathbf{x})-\rho_b\over\rho_b},       \label{EqPoisson}$$

$$\dot a\sqrt{a} =H_0\sqrt{\Omega_0
         +\Omega_{\rm curv,0}a
         +\Omega_{\Lambda,0}a^3},
    \quad \Omega_0+\Omega_{\rm curv,0}+ \Omega_{\Lambda,0} =1, \label{Eqpart}$$

where $\Omega_0=\Omega_m(z=0)$, $\Omega_{\rm curv,0}$, and $\Omega_{\Lambda,0}$ are the density of the matter, effective density of the curvature, and the cosmological constant in units of the critical density at $z=0$. The curvature contribution is positive for negative curvature.

Dimensionless variables (shown with tildas below) are defined by introducing the length of a cell of the grid $x_0$ and by measuring the time in units of $1/H_0$:

$$\mathbf{x} = x_0\tilde\mathbf{x}, \quad t=\tilde t/H_0,   \label{Eqtime}$$

$$\mathbf{v}_{\rm pec}=(x_0H_0)\tilde\mathbf{p}/a,
    \quad\phi=\tilde\phi(x_0H_0)^2            \label{Eqvel}$$

$$\rho={\tilde\rho\over a^3}{3H_0^2\over 8\pi G}\Omega_0  \label{Eqrho}$$

Equations (2–5) can be rewritten in terms of dimensionless variables: $${d\tilde\mathbf{p}\over da}= -F(a)\tilde\nabla \tilde\phi,
\quad {d\tilde\mathbf{x}\over da}= F(a){\tilde\mathbf{p}\over a^2}  \label{Eqtildep}$$

$$\tilde\nabla^2 \tilde\phi ={3\over 2} {\Omega_0\over a}
 (\tilde\rho -1),        \label{Eqtildephi}$$ where $$F(a)\equiv H_0/\dot a =\left({
    \Omega_0 +\Omega_{\rm curv,0}a+\Omega_{\Lambda,0}a^3}
    \over a \right)^{-1/2}.   \label{EqFa}$$

Equations ( – ) are solved numerically by the PM code.

If $L$ is the length of the computational box at $z=0$, $N_{\rm grid}$ is the number of grid cells in one direction, and $N_{\rm row}$ is the number of particles in one direction, which contribute a fraction $\Omega_0$ of the critical density, then the transformations from dimensionless variables given by the code to dimensional variables are given by $$x=x_0\tilde x, \quad
   x_0 ={L\over N_{\rm grid}}
       =7.8{\rm kpc}\left({L_{\rm Mpc}\over N_{\rm grid}/128}\right),
\label{Eqxnot}$$

$$v_{\rm pec} = (x_0H_0){\tilde p\over a} = 0.781{\rm km\over s}\cdot
    {\tilde p\over a}\cdot {L_{\rm Mpc}h\over  N_{\rm grid}/128},
\label{Eqvscale}$$

$${\rm Mass} =N_{\rm particles}\cdot m_1,
 \quad m_1 =\Omega_0\rho_{\rm cr,0}\left({L\over N_{\rm row}}\right)^3
           =1.32\cdot 10^5(\Omega_0h^2)
\left({L_{\rm Mpc}\over N_{\rm row}/128}\right)^3
\label{Eqmass}$$

# **Scheme of integration**

Equations ( – ) are solved using finite differences with a constant step in space $\Delta x =\Delta y =\Delta
z =1$ and a constant step in the expansion parameter $\Delta a$. We use the "leap-frog" scheme to advance coordinates and velocities from one moment to another. (In the following we drop tildas for all dimensionless variables.) At any moment $a_n=a_0+n\Delta a$, we have the coordinates $\mathbf{x}_n$ and the potential $\phi_n$. Velocities $\mathbf{p}_{n-1/2}$ are defined at $a_{n-1/2}=a_n-\Delta
a/2$. The coordinates and the velocities for the next moment are found using:

$$\begin{aligned}
\mathbf{p}_{n+1/2} &=&\mathbf{p}_{n-1/2}-F(a_n)\nabla\phi_n\Delta a,\nonumber\\
\mathbf{x}_{n+1} &=&\mathbf{x}_n+{F(a_{n+1/2})\over a_{n+1/2}^2}
\mathbf{p}_{n+1/2}\Delta a
\label{Eqmove}
\end{aligned}$$

In order to solve eq.() we approximate the Laplacian operator using the 7-point "crest" template: $$\nabla^2\phi\approx
\phi_{i\pm 1,j,k}+\phi_{i,j\pm 1,k}+\phi_{i,j,k\pm 1}-6\phi_{i,j,k},
\label{Eqdifphi}$$

where $(i,j,k) =1,...,N_{\rm grid}$. This leads to a large system of linear equations relating unknown variables $\phi_{i,j,k}$ with known right-hand side of the discrete form of the Poisson equation $3\Omega_0(\rho_{i,j,k}-1)/2a$. The system of equations is solved exactly by the FFT technique.

The density on the mesh $\rho_{i,j,k}$ is obtained from particle positions using the Cloud-In-Cell method. In order to find the "acceleration" $\mathbf{g}=-\nabla\phi$ for each particle, the gravitational potential is differentiated on the mesh: $$g_x=-(\phi_{i+1,j,k}-\phi_{i-1,j,k})/2,\quad g_y=...,\quad g_z=...
\label{Eqgx}$$ Then the acceleration is interpolated to the position of the particle using a three-linear interpolation. This scheme for the force interpolation (the same interpolation as in the density assignment) is very important because it does not produce a force acting on the particle itself. (Thus, an isolated point does not produce a force at the position of the particle). While this might sound like a natural condition for any realistic method, only two methods – PM and TREE – do not have this self-force. In P$^3$M the effect is minimized. In the case of multigrid methods the self-force cannot be excluded – only minimized. Typically this is achieved by placing extended buffer zones around regions with high resolution (e.g. Kravtsov 1997). No precautions were made in AP$^3$M method, which might result in spurious effects in regions were multi-level grids are introduced.

Thus, the main scheme of the PM method consists of the following four blocks repeated every time step:

-   Find density on the mesh using the Cloud-In-Cell technique.

-   Solve the Poisson equation using two three-dimensional FFTs.

-   Advance velocities and coordinates of the particles.

-   Advance time and print results.

# **Format of data**

In order to have the best possible resolution, most of the available computer memory is allocated to the density/potential grid. The Poisson solver is organized in such a way that only one large mesh is needed. Particle coordinates and velocities are kept on disk and are read into memory in large portions when necessary. This reading/writing of particles results in a small overhead – typically 5-10% of the total cpu time. If this overhead is an issue, the code can be easily adjusted to keep all particles in memory. This is always the case for a parallel version of the code. Particles are divided into "species" with constant mass of a particle for each species. Each species is kept in a separate file. Information which describes the run (such as the number of particles, omegas, and current time) is written in a separate header file.

Each file with particle data is a FORTRAN direct-access file with the number of records equal to the number of particles in one direction $N_{\rm
row}$. Each record has coordinates and velocities for a "page" of particles $N_{\rm page}=N_{\rm row}^2$. The "page" of particles is read into a common block, which has the structure: $X(N_{\rm
page}),Y(N_{\rm page}),Z(N_{\rm page}), V_x(N_{\rm page}),V_y(N_{\rm
page}),V_z(N_{\rm page})$ The particle files and the header file are needed for continuation of the run or for the data analysis. The following diagram shows the structure and names of the data files:

C3CRD.DAT
Header

Text-of-Header, a, $a_{\rm init}$,  Δa, Step,…

C3crs0.DAT
Set 0
Page 1
$x_1,x_2,\ldots x_{\rm Npage},$ $y_1, \ldots~
                           z_1, \ldots~ V_{x 1}, \ldots~ V_{z {\rm Npage}}$

Page 2
$x_1,x_2,\ldots x_{\rm Npage},$ $y_1, \ldots~
                    z_1, \ldots~ V_{x 1}, \ldots~ V_{z {\rm Npage}}$

…
…

…
…

Page $N_{\rm row}$
$x_1,x_2,\ldots x_{\rm Npage},$ $y_1, \ldots~
                           z_1,\ldots~ V_{x 1}, \ldots~ V_{z {\rm Npage}}$

C3crs1.DAT
Set 1
Page 1
$x_1,x_2,\ldots x_{\rm Npage},$ $y_1, \ldots~
                           z_1, \ldots~ V_{x 1}, \ldots~ V_{z {\rm Npage}}$

Page 2
$x_1,x_2,\ldots x_{\rm Npage},$ $y_1, \ldots~
                           z_1, \ldots~ V_{x 1}, \ldots~ V_{z {\rm Npage}}$

Page $N_{\rm row}$
$x_1,x_2,\ldots x_{\rm Npage},$ $y_1, \ldots~
                           z_1, \ldots~ V_{x 1}, \ldots~ V_{z {\rm Npage}}$

…

$\underbrace{\hspace{1in}}$
$\underbrace{\hspace{1.5in}}$
$\underbrace{\hspace{3in}}$

File Name
Description

Content of the file

Not a part of the file

Thus, the memory required to run the code is about $N_{\rm
grid}^3+6N_{\rm row}^2$ memory words or 64Mb$(N_{\rm grid}/256)^3$ +0.375Mb$(N_{\rm row}/128)^2$ if single precision arithmetic is used. The total amount of disk space is 48Mb$(N_{\rm row}/128)^3$ per each set of "species".

# **Initial conditions: CDM and CHDM models**

We use the Zeldovich approximation to set initial conditions. The approximation is valid in mildly nonlinear regime and is much superior to the linear approximation. We slightly rewrite the original version of the approximation to incorporate cases (like CHDM) when the growth rates $b(t)$ depend on the wavelength of the perturbation $|k|$. In the Zeldovich approximation the comoving and the lagrangian coordinates are related in the following way:

$$\mathbf{x} =\mathbf{q} -\alpha\sum_{\mathbf{k}}b_{|k|}(t)\mathbf{S}_{|k|}(\mathbf{q}),
\quad
\mathbf{p} = -\alpha a^2\sum_{\mathbf{k}}b_{|k|}(t)
        \left( {\dot b_{|k|}\over b_{|k|}}\right)\mathbf{S}_{|k|}(\mathbf{q}),
\label{EqZeldtwo}$$

where the displacement vector $\mathbf{S}$ is related to the velocity potential $\Phi$ and the power spectrum of fluctuations $P(|k|)$:

$$\mathbf{S}_{|k|}(\mathbf{q}) =\nabla_q\Phi_{|k|}(\mathbf{q}), \quad
\Phi_{|k|}=\sum_{\mathbf{k}}a_{\mathbf{k}}\cos(\mathbf{k}\mathbf{q}) +
b_{\mathbf{k}}\sin(\mathbf{k}\mathbf{q}),
\label{EqZeldthree}$$

where $a$ and $b$ are gaussian random numbers with the mean zero and dispersion $\sigma^2=P(k)/k^4$:

$$a_{\mathbf{k}}=\sqrt{P(|k|)}\cdot {Gauss(0,1)\over |k|^2}, \quad
b_{\mathbf{k}}=\sqrt{P(|k|)}\cdot {Gauss(0,1)\over |k|^2}.
\label{EqZeldfour}$$

The parameter $\alpha$, together with the power spectrum $P(k)$, define the normalization of the fluctuations.

We estimate the power spectrum $P(k)$ for a wide range of cosmological models using a Boltzman code (Holtzman 1989). As compared with the original version of the code, the current version allows for more accurate estimates at high wavenumbers. For each cosmological model the numerical data points were fitted using the following fitting formula:

$$P(k) = {k^n\exp(P_1) \over (1 + P_2k^{1/2} +P_3k +P_4k^{3/2}+P_5k^{2})^{2P_6}}.
\label{EqFit}$$

The coefficients $P_i$ are presented in the file **cdm.fit** for a variety of models. The errors of the fits are smaller than 5% in the power spectrum. The top panel in Figure 1 shows the errors of the fits for CDM models ($\Omega_0=1$) with a Hubble constant $H=50$km/s/Mpc. Errors at a level of $\sim$ 2% level at $k\sim 3h~{\rm Mpc}^{-1}$ and at $k\sim 30h~{\rm Mpc}^{-1}$ are due to small mismatch in approximations used at high wavenumbers. The fits smooth out the jumps and, thus, provide better approximations to the real power spectra at those large wavenumbers. The waves around $k\sim 0.1h~{\rm Mpc}^{-1}$ are due to acoustic oscillations in baryons. They are larger for larger $\Omega_b/\Omega_0$ ratios. For very small $\Omega_b/\Omega_0$ the errors introduced by using the fits are extremely small. Thus, if one can neglect (or smooth out) the acoustic oscillations, the maximum errors of our fits are expected to be smaller than 1–2% in the power. The comparison of some of our power spectra with the results from COSMICS (Bertschinger 1996) support our conclusion. We recommend the use of the fits whenever it is possible.

The power spectrum of cosmological models is often approximated using a fitting formula given by Bardeen et al.(1986, BBKS): $$P(k)=k^nT^2(k), \quad T(k)={\ln(1+2.34q)\over 2.34q}
     [1+3.89q+(16.1q)^2+(5.4q)^3+(6.71q)^4]^{-1/4},
\label{EqBBKS}$$ where $q=k/(\Omega_0h^2~{\rm Mpc}^{-1})$. Unfortunately, the accuracy of this approximation is not great. Peacock & Dodds (1994) modified the fit using another relation between $q$ and $k$:

$$q=k/(\Omega_0h^2\exp(-2\Omega_b)~{\rm Mpc}^{-1}).
\label{EqPDodds}$$

This approximation was criticized by Sugiyama (1995), who introduced a better scaling for low-$\Omega_0$ cases: $$q={k(T_{\rm CMB}/2.7K)^2 \over
\Omega_0h^2\exp(-\Omega_b-\sqrt{h/0.5}\Omega_b/\Omega_0)~{\rm Mpc}^{-1}}.
\label{EqSug}$$

These approximations have been frequently used in a number of publications (e.g. Liddle et al.1996). The bottom panel of Figure 1 shows the ratio of the power spectrum given by this approximation to the power spectrum obtained from our fits for several choices of baryon fraction. For comparison, we also present the error of the eqs.(-) relative to the power spectrum obtained by COSMICS for $\Omega_b =0.05$ (triangles), showing the good agreement of our results with those of COSMICS. In all cases, there is a large decline (around 20% in power) between a peak at $k=0.2h~{\rm Mpc}^{-1}$ and small scales $k\sim (10-30)h~{\rm Mpc}^{-1}$. This decline was noticed by Hu & Sugiyama (1996), who studied the small-scale perturbations. Note that if we take $T_{\rm CMB}=2.70$K instead of 2.726K, than the peak of the error at $k=0.2$ increases up to 15%. The error in the power is rather small for small $k < 0.1h~{\rm Mpc}^{-1}$ and for a realistic amount of baryons $\Omega_b\sim 0.07$. One can easily miss it if instead of an error of the power spectrum, one plots the transfer function in a double logarithmic scale. But the error is very significant for galactic-scale events. It can result in serious errors in the epoch of galaxy formation or in the amount of gas in damped Ly-$\alpha$ clouds at high redshifts.

Hu & Sugiyama (1996) recommend changing the last parameter in the BBKS fit from 6.71 to 6.07. We do not find that this correction gives an accurate fit to our spectrum. We find that the following approximation, which is a combination of a slightly modified BBKS fit and the Hu & Sugiyama (1996) scaling with the amount of baryons, provides errors in the power spectrum smaller than 5% for the range of wavenumbers $k= (10^{-4} - 40)h~{\rm Mpc}^{-1}$ and for $\Omega_b/\Omega_0<0.1$:

$$\begin{aligned}
P(k)  &=&k^nT^2(k), \nonumber\\
 T(k) &=&{\ln(1+2.34q)\over 2.34q}
     [1+13q+(10.5q)^2+(10.4q)^3+(6.51q)^4]^{-1/4},\nonumber\\
 q    &=&{k(T_{\rm CMB}/2.7K)^2\over
        \Omega_0h^2\alpha^{1/2}(1-\Omega_b/\Omega_0)^{0.60}},\qquad
 \alpha = a_1^{-\Omega_b/\Omega_0}a_2^{-(\Omega_b/\Omega_0)^3}\nonumber\\
 a_1 &=& (46.9\Omega_0h^2)^{0.670}[1+(32.1\Omega_0h^2)^{-0.532}],\quad
 a_2 = (12\Omega_0h^2)^{0.424}[1+(45\Omega_0h^2)^{-0.582}]
\label{EqUgly}
\end{aligned}$$

Figures 2 and 3 show errors of the fits for the CDM and for the $\Lambda$CDM models.

# **Finding Halos with Bound Density Maxima code**

Finding halos in dense environments is a challenge. The most widely used halo-finding algorithms – the friends-of-friends (e.g., Efstathiou et al.1985) and the spherical overdensity algorithm (e.g., Lacey & Cole 1994; Klypin 1996) – are not acceptable (Gelb & Bertschinger 1994, Summers et al.1995). The friends-of-friends (FOF) algorithm merges together apparently distinct halos if the linking radius is too large or misses some of the halos if the radius is small. Adaptive FOF (van Kampen 1995) seems to work better. But we find that it is difficult to find an optimal scaling of the linking radius with the density. We have developed a related algorithm (Klypin, Gottlober, Kravtsov 1997), which we call "hierarchical friends-of-friends". Because it uses all linking radii, it does not have the problem that the adaptive FOF algorithm has. The algorithms, either adaptive or hierarchical, can not work because they pick up many fake halos in very dense environments. Klypin et al.(1997) supplement the hierarchical FOF algorithm with an algorithm which checks if halos existed at previous moments. The algorithm which finds halos as maxima of mass inside spheres of a given overdensity works better than plain FOF, but no fixed overdensity limit can find halos in both low and high density environment. The DENMAX algorithm (Gelb & Bertschinger 1994) and its offspring, SKID (Governato et al.1997), make significant progress – they remove unbound particles, which is important for halos in groups and clusters. Recently, Summers et al. (1995) tried to perfect the idea of Couchman & Carlberg (1992) to trace the history of halo merging and to use it for halo identification. Starting at an early epoch, Summers et al.identify halos using the FOF algorithm with a linking radius corresponding to the "virial overdensity" of 200 and then trace particles belonging to halos at later times. It appears that it is impossible to make a working algorithm because halos interact too violently. A large fraction of mass is tidally stripped from some halos and a large fraction of mass is accreted. Some of the problems that any halo finding algorithm faces are not numerical. They exist in the real Universe. We select a few typical difficult situations.

1\. *A large galaxy with a small satellite.* Examples: LMC and the Milky Way or the M51 system. Assuming that the satellite is bound, do we have to include the mass of the satellite in the mass of the large galaxy? If we do, then we count the mass of the satellite twice: once when we find the satellite and then when we find the large galaxy. This does not seem reasonable. If we do not include the satellite, then the mass of the large galaxy is underestimated. For example, the binding energy of a particle at the distance of the satellite will be wrong. The problem arises when we try to assign particles to different halos in an effort to find masses of halos. This is very difficult to do for particles moving between halos. Even if a particle at some moment has negative energy relative to one of the halos, it is not guaranteed that it belongs to the halo. The gravitational potential changes with time, and the particle may end up falling onto another halo. This is not just a precaution. This actually was found very often in real halos when we compared contents of halos at different redshifts. Interacting halos exchange mass and lose mass. We try to avoid the situation: instead of assigning mass to halos, we find the maximum of the "rotational velocity", $\sqrt{GM/R}$, which is observationally a more meaningful quantity.

2\. *A satellite of a large galaxy.* The previous situation is now viewed from a different angle. How can we estimate the mass or the rotational velocity of the satellite? The formal virial radius of the satellite is large: the big galaxy is within the radius. The rotational velocity may rise all the way to the center of the large galaxy. In order to find the outer radius of the satellite, we analyze the density profile. At small distances from the center of the satellite the density steeply declines, but then it flattens out and may even increase. This means that we reached the outer border of the satellite. We use the radius at which the density starts to flatten out as the first approximation for the radius of the halo. This approximation can be improved by removing unbound particles and checking the steepness of the density profile in the outer part.

3\. *Tidal stripping.* Peripheral parts of galaxies, responsible for extended flat rotation curves outside of clusters, are very likely tidally stripped and lost when the galaxies fall into a cluster. The same happens with halos: a large fraction of halo mass may be lost due to stripping in dense cluster environments. Thus, if an algorithm finds that 90% of mass of a halo identified at early epoch is lost, it does not mean that the halo was destroyed. This is not a numerical effect and is not due to "lack of physics". This is a normal situation. What is left of the halo, given that it still has a large enough mass and radius, is a "galaxy".

We have developed our halo-finding algorithm (Klypin et al.1997) having in mind all these problems. The bound-density-maxima (BDM) algorithm stems from the DENMAX algorithm (Gelb & Bertschinger 1994). Just as in DENMAX, the BDM algorithm first finds positions of the density maxima on some scale and then removes unbound particles inside the halo radius. However, the algorithm finds maxima and removes unbound particles in a way different from DENMAX. The algorithm can work by itself or in conjunction with the hierarchical FOF. In the latter case, it takes positions of halos from the hierarchical friends-of-friends, and then removes unbound particles and finds parameters of halos.

In order to find positions of halos we choose a radius $r_{sp}$ of a sphere for which we find maxima of mass. This defines the *scale* of objects we are looking for, but not exact radii or masses of halos. The radius of a halo can be either larger or smaller than $r_{sp}$, but distances between halos cannot be smaller than $r_{sp}$. We place a large number of spheres in the simulation box. The number of the spheres is typically an order of magnitude or more larger than the expected number of halos. For each sphere we find the mass inside the sphere and the center of the mass. The center of the sphere is displaced to the center of mass and the new mass and the center of mass is found. The process is iterated until convergence. Depending on specific parameters of the simulations, the number of iterations ranges from 10 to 100. This process finds local maxima of mass within sphere of radius $r_{sp}$.

The efficiency of finding local maxima of mass depends on how the spheres are chosen. In the present version of the code two algorithms were implemented. (1) A small fraction of all particles are chosen as centers of the spheres. The code asks you to enter $N_{seed}$, the "Number of particles for initial seeds". Then it will select every $N_{particles}/N_{seed}$ particle as a center of a sphere. (2) Additional spheres will be placed in regions with relatively low density. The whole simulation box is divided into a mesh of large cells. The size of the cells is defined by the variable "Cell" in **PMhalos.f**. The "Cell" is typically equal to one or two PM cells. If a cell has many particles in it ("neighbors"), than some of them (not more than 3) will be chosen as centers of spheres. The code asks you to enter the minimum number of neighbors: "Number of neighbors for a seed".

In some cases one would need to improve the location of the halo. An example is if one is looking for groups of "galaxies" but also would like to have the groups always centered on a galaxy. The search radius for the groups may be chosen to be, say 500 kpc. Additional iterations with a smaller radius of the sphere will find the galaxy-size halo closest to the center of mass of the group and place the center of the group at the "galaxy". In the BDM code this option is realized in the following way. The code asks you to enter the "smaller radius for final halos". If this radius $r_{small}$ is not equal to the search radius $r_{sp}$, the code will do additional iterations by gradually changing the search radius from $r_{sp}$ to $r_{small}$. If $r_{small}
=r_{sp}$, no additional iterations are made.

Some of the density maxima will be found many times because in the process of maximizing the mass some of spheres converge on the same local maximum. Spheres which find the same maximum are called "duplicates". We remove duplicates and keep only one halo for each maximum. Halos with too small number of particles (typically 5–10) and halos with too low central overdensity are removed from the final list. Parameters which control the removal are supplied by the user.

Once centers of potential halos are found, we start the procedure of removing unbound particles and finding the structure of halos. We place concentric spherical shells around each center. For each shell we find the mass of the dark matter particles, the mean velocity, the velocity dispersion relative to the mean, and the maximum of the rotational velocity $V_{\rm max}=\sqrt{GM(r)/r}\mid_{max}$. In order to determine whether a particle is bound or not, we estimate the escape velocity at the distance $r$ of the particle from the halo center:

$$V^2_{\rm escape}(r) \approx (2.15\times V_{\rm max})^2 {\ln(1+2r/r_{max})
          \over (r/r_{max}) },$$

where $r_{max}$ is the radius of the maximum of the rotational velocity. This expression for the escape velocity is valid for a halo with the Navarro-Frenk-White density profile. If the velocity of a particle is larger than the escape velocity, it is assumed to be unbound. We estimate the maximum rotational velocity $V_{max}$ and radius of the maximum $r_{max}$ using the density profile for the halo. Because $V_{max}$ and $r_{max}$ must be found before the unbound particles are removed and because the mean velocity is also found using all particles (bound and unbound), the whole procedure cannot be done in one step. We start by artificially increasing the value of the escape velocity by a factor of three. Only particles above the limit are removed. We find a new density profile, new mean velocities, and new $V_{max}$ and $r_{max}$. The escape velocity is again increased, but this time by a smaller factor. The procedure is repeated 6 times. The last iteration does not have any extra factors for the escape velocity: all unbound particles are removed. Examples of halos identified by the code are presented in Klypin et al.(1997).

Finding a halo radius is straightforward for isolated halos: increase the radius of sphere untill the overdensity inside the sphere is equal to some limiting value provided by the user. For halos inside groups or clusters (halos inside halos) the algorithm is more complicated. It consists of three steps: (i) It starts with finding the radius of given overdensity limit (as for an isolated halo). (ii) Then, the algorithm checks how the mean overdensity inside given radius changes with the radius. It starts going from the very central shell outwards. If the mean overdensity stops declining, the algorithm assigns the radius to the halo radius. (iii) Now the algorithm goes from this radius inwards and checks the slope $n$ of the overdensity profile: $(M(r)/\langle M(r)\rangle )\propto r^{-n}$. If the slope is too shallow (mass increases too fast with the radius), the radius of the halo is decreased because most of the mass at this radius does not belong to the halo. The radius is decreased untill the slope is steep enough. The limit for the slope is equal to $n=1$. This is a rather mild slope: for an isothermal sphere one expects $n=2$; for the Navarro-Frenk-White profile $n=1.7-2.5$.

The BDM code will ask you to enter many parameters. A typical dialog may look as follows:

Enter Min. Center Overdensity for Halos $=>$ 340. (1)

Enter Overdensity Threshold for Halos    $=>$ 340. (2)

Enter Minimum halo mass in Msun/h     $=>$ 5.e+9 (4)

Enter comoving search radius(Mpc/h)     $=>$ 0.050 (5)

Enter smaller radius(Mpc/h) of final halos$=>$ 0.030 (6)

Enter min.radius for halos(Mpc/h)         $=>$ 0.030 (7)

Enter fraction of DM particles (1/4,1/2,1)$=>$ 1 (8)

Enter rejection velocity limit (V/Vescape)$=>$ 1.0 (9)

Distance to check for Velocity duplicates $=>$ 0.300 (10)

Define duplicates if (v1-v2)/Vrms $<$           0.10 (11)

Enter Comoving Box size(Mpc/h)          $=>$ 20. (12)

In lines (1-2), enter the minimum overdensity for halos. If both values are equal, the code will find halos with the overdensity above the limits you provided. You may choose only those halos which have higher central density, if you enter a larger number in the first line. Only halos with mass larger than the value entered in the third line and radius in the line 7 will be kept. For debugging of the code, you may read only 0.25, or 0.5 of all particles (line 8). If you would like to remove unbound particles as described above, enter 1 in line 9. In order to ignore the option (no removing of unbound particles) enter a number larger than 5. Lines 10 and 11 are used for two parameters needed for additional screening of duplicates. In case of very large halos, when the density profile in the center of the halo is rather flat, the iteration of spheres stops when the spheres are still far one from the other. The spheres have found the same object: masses, radii, velocities of the " halos" are very close, but their positions are slightly different. Because the fake halos have very close velocities, they can be identified. The parameter in the line 10 defines the maximum distance (in units of $h^{-1}{\rm Mpc}$) within which the code will look for the duplicates. If the difference in velocities $\sqrt{(v_{x1}-v_{x2})^2+(._y)+(._z)}$ is less than the parameter in line (11) as measured in units of maximum of the rms velocities for particles in the halos, only largest will be kept. You may ignore the option by entering two zeros.

# **How to compile and run the code**

The code consists of several different FORTRAN programs:

-   PM_to_ASCII.f

-   PMhalos.f

-   PMmain.f

-   PMmodelCHDM.f

-   PMmodels.f

-   PMpower.f

-   PMselect.f

-   PMstartCDM.f

-   PMstartCHDM.f

A Makefile is provided to allow easy compilation of all of the programs. You should edit the Makefile and put in your preferred compilation flags for:

-   Optimization. On both our Sun machines running Solaris, and our HP running HPUNIX, we use -O3.

-   The routine **PMmodels.f** should be compiled using double precision for all "real" variables and constants. On the Sun, this can be accomplished using the -R8 flag, on the HP with -dbl.

The general scheme for running the code and analyzing results is as follows:

1.   Set initial conditions using **PMmodels** and **PMstartCDM**.

2.   Run the PM code using **PMmain**.

3.   Analyze the results using **PMpower**, and **PMhalos**. **PM_to_ASCII** will scale your results to "normal" units.

More details on each step are provided in subsequent sections.

Some important parameters and variables which are used in the codes, for which you will either be prompted or may wish to change *before compilation*. **Please note the last item which may require you to make a change in the code!**

-   AEXPN = expansion parameter ($=1/(1+z)$). AEXP0 is the expansion parameter at initial moment.

-   NROW = number of particles in one dimension ($=2^n$). The total number of particles is equal to NROW$^3$. Particles are stored in direct-access files. Each record of the files contains NROW$^2$ particles.

-   NGRID = size of the computational mesh ($=2^m$). The total number of cells is NGRID$^3$. If you need to change either NROW or NGRID, the only place where you need to make changes is the file **PMparameters.h**.

-   ASTEP = step in the expansion parameter $a$. Time integration is done with a constant step in the expansion parameter: $da =$ASTEP.

-   ISTEP = current integration step

-   Nspecies = number of additional species of particles. This is curretly used for the CHDM models. For plain CDM, ODM, or $\Lambda$CDM models Nspecies = 0.

-   Om0,Oml0,Ocurv = densities of matter, cosmological constant, and curvature at $z=0$.

-   hubble = the Hubble constant in units of $100$km/s/Mpc

-   NACCES = length of a record of direct-access files with coordinates and velocities of particles (e.g., PMcrs0.DAT). For some computers the length of the record is counted in bytes, for some it is in machine words. If you get errors when running the code that indicate problems with accessing the data files, multiply NACCES by 4 in file **PMauxiliary.f**, routine RDTAPE, and in files **PMstart...f**. If the length of the data files is too long (it should be $24\times NROW^3$ bytes), divide NACCES by 4.

# **How to set initial conditions**

Two programs need to be run in order to set initial conditions. If the model you are interested in do not have massive neutrinos, the programs are **PMmodels** and **PMstartCDM**. For models with massive neutrinos, the corresponding programs are **PMmodelCHDM** and **PMstartCHDM**. Additionally, if you wish to run the PM code for a model for which the initial power spectrum is not included in the package, it is possible for you (with a bit more work) to specify whatever power spectrum you want.

## Models without massive neutrinos

A range of initial spectra which have been computed by our Boltzmann code and fit with our fitting function (ea.) are available. The fitting parameters are tabulated in the file **cdm.fit**. You will need to look in this file and determine the line number of the model which you are interested in. The first program (**PMmodels**) will ask to give you the following parameters:

-   Name of a file where it writes parameters of the model and normalized power spectra.

-   $\sigma_8=$ rms density perturbation in a sphere of radius $8h^{-1}$Mpc and the slope of the power spectrum at long

-   Line number in the file **cdm.fit**

-   Size of the simulation box, number of particles in 1D, and the redshift at which you would like to start your code (or to get the power spectrum).

-   The program will ask you if you need to have a file with all input parameters needed to set initial conditions. If you need the file, answer "Yes", and it will create file **InStart.dat**, which you will give as input to the second code **PMstartCDM**. It will also ask you few questions needed to produce the file. If you answer "No", the code finishes its work by creating the file with the name you gave it in the first line. The file has parameters of the model (all $\Omega$'s, the Hubble constant, the age of the universe, growth rate of density $\delta$, and $d(\ln{\delta})/d(\ln{a})$ at different redshifts. It also gives the bulk velocity of a sphere of radius $50h^{-1}{\rm Mpc}$ and normalized power spectra of dark matter at redshift zero ($a=1$) and at the redshift you provided.

-   If you answered "Yes" for the previous question (you needed to have an input file for **PMstartCDM**), you will be asked to provide the following information:

    -   *A string of up to 45 characters ("header")*. The header is not used for simulations, but it is useful to label your simulation. You can provide any information you want. This header will stick to your run. All files with snapshots of your simulation and all files with analysis of your simulation will have the header. Experience of running many simulations shows that one never has enough information describing details of a simulation done some time ago to identify that simulation later. Use the header to identify your run.

    -   *Step in the expansion parameter $da$.* This defines how many integration steps the code will do untill it runs to the redshift zero. If you would like to make $N$ steps and you start at redshift $z$, $da=(1-{1\over 1+z})/N$. The step $da$ should be (significantly) smaller than the initial expansion parameter $a_{init}
        =-{1\over 1+z}$.

    -   *Seed for random numbers*. Use any integer number in the range $1-(2^{31}-1)$ $(2^{31}\approx 2.1478\times 10^9)$.

Next you will run **PMstartCDM** which is the program that actually generates initial conditions for the PM code. It will generate two files, which **PMmain** reads and updates: **PMcrd.DAT** (information on the cosmological model and parameters of the run) and **PMcrs0.DAT** (coordinates and velocities of particles). If you run a CHDM simulation, you will have more data files with data for hot neutrinos. **PMstartCDM** will ask you to provide some parameters. If you created file **InStart.dat** using the program **PMmodels**, simply provide the file as input: $PMstartCDM < InStart.dat$.

## Models with massive neutrinos

In order to set initial conditions for a CHDM model, run **PMmodelCHDM** and then **PMstartCHDM**. The codes will ask you similar questions as for non-CHDM models. Because setting initial conditions for the CHDM model is more complicated, we provide only one particular CHDM variant: a model with two equal mass neutrinos with total contribution $\Omega_{\nu}=0.20$, $h=0.5$. Initial conditions can be set only at redshift $z=30$.

## Initial conditions for arbitrary initial power spectra

There are two ways of building initial conditions for models which are not provided with the package.

1.  You may add a line to **cdm.fit** with fitting parameters for your model and with parameters of approximation for the power spectrum. This requires that your model is well fit by our fitting formula (eq. ). The format of the **cdm.fit** file is described in the file. See also the routine **TRUNF(k)** for details of the approximation of the power spectrum of perturbations.

2.  You may change the functions TRUNF in **PMstartCDM.f** and Pk in **PMmodels.f** to return whatever initial spectra you desire.

# **How to run the PM code**

After you generate the initial conditions, you can start running the code. Check if two files **PMcrd.DAT** and **PMcrs0.DAT** were generated and are in your directory: **PMmain** will read the files. It will also overwrite the files when it finishes. So, if you need to have the original files, please make copies before you start running **PMmain**.

# **How to get coordinates and velocities of particles**

To get the final coordinates and velocities, run **PM_to_ASCII**. This will convert the input files **PMcrd.DAT** and **PMcrs0.DAT** into readable output files. You will specify the output file name.

# **How to get power spectrum and density distribution**

You can get the power spectrum and density distribution of your output by running **PMpower**. This will read the raw output files from **PMmain**, **PMcrd.DAT** and **PMcrs0.DAT**. The output will go into a file called **Spectrum.DAT**.

# **How to find halos using the Bound-Density-Maxima code**

Run **PMhalos**. The code will ask you many questions. It will produce two files with the final results. "Catalog.DAT" contains detailed information about all halos found by the code. After a rather long preamble, data on the halos follow. Each halo has a "header", which gives global parameters: coordinates, velocities, mass, and so on for the halo (format is given in the preamble). "Catshort.DAT" has a shorter preamble and has only a list of the halo headers.

The code may miss some halos if one chooses wrong parameters!

1.  The number of spheres (seeds) should be very large: 100,000 – 150,000. If it is too small, the code misses some of small halos (but not the big ones).

2.  The number of particles in each shell for the halo profile should be large: 5-6 per shell. The code needs the density profile of a halo to find radius, escape velocity and so on. It may get confused if the profile is too noisy.

3.  Radius of the first bin for the profile should not be too small: not less than 1/2 of your force resolution. It should also contain few particles ($>2$).

4.  Outer radius should be large. If density does not decline enough (flat profile), the code thinks that this halo is a fluke. If your radius is too small such that only the central part of a potential halo fits in the radius, and the density gradient is not steep, the code will kill your halo.

# **Examples**

We make available two examples of runs of the PM code with data analysis which you can use for comparison with your own results if that is desired. The first example has files for the test with $32^3$ particles and $128^3$ mesh. The second example is for $128^3$ particles and $256^3$ mesh. Both tests were done for a $\Lambda$CDM model with $h=0.7$.

These are available as two separate tar files with all results or you can also grab individual result files. Since the output data files for the second example are quite large, the tar file for this case does not include these data files. The full set of files from the $32^3$ example can be downloaded from http://astro.nmsu.edu/ $\sim$aklypin/PM/TEST32x128.tar.gz. The files from the $128^3$ example (without data files) can be downloaded from: http://astro.nmsu.edu/$\sim$aklypin/PM/TEST128x256.tar.gz.

Individual output files from the two cases can be downloaded from: http://astro.nmsu.edu/$\sim$aklypin/ PM/TEST32x128 and http://astro.nmsu.edu/$\sim$aklypin/PM/TEST128x256. We recommend looking at the output plots (\*.ps.gz).

# **References**

Appel A., *SIAM J. Sci. Stat. Comput.*, **6** (1985) 85.

Aninnos P., Norman M., Clarke D.A., Astrophys. J.**436** (1994) 11.

Bardeen, J.M., Bond, J.R, Kaiser, N., Szalay, A., 1986, Astrophys. J., 304, 15 (BBKS).

Barnes J. and Hut P., *Nature* **324** (1986) 446.

Bertschinger, E., & Gelb, J.M. 1991, Comp. Phys., 5, 164

Bouchet F.R. and Hernquist L., Astrophys. J. Suppl.**68** (1988) 521.

Couchman H.M.P., Astrophys. J.**368** (1991) 23.

Couchman, H.P.M., & Carlberg, R. 1992, Astrophys. J., 389, 453

Efstathiou G., Davis M., Frenk C.S., and White S.D.M., Astrophys. J. Suppl.**57** (1985) 241.

Gelb J., Bertschinger, E., 1994, Astrophys. J., 436, 467.

Governato, F., Moore, B., Cen, R., Stadel, J., Lake, G., Quinn, T., 1997, New Astronomy, 2, 91.

Gross, M., *Ph.D. Thesis,* UCSC (1997)

Hernquist L., Astrophys. J. Suppl.**64** (1987) 715.

Hernquist L., Bouchet F.R., and Suto Y., Astrophys. J. Suppl.**75** (1991) 231.

Hockney R.W. and Eastwood J.W., *Numerical simulations using particles* (New York: McGraw-Hill) 1981.

Hu, W., Sugiyama, N., 1996, Astrophys. J., 471, 542.

Kates, R., Kotok, E., Klypin, A, 1991, Astron. & Astrophys., 243, 295.

Klypin A., Holtzman J., Primack J., and Regos E., Astrophys. J. **416** (1993) 1.

Klypin, A. 1996, in "Dark Matter in the Universe", p. 419, eds. S. Bonometto, J.Primack, A. Provenzale, IOS Press, Amsterdam, Oxford, Tokyo, Washington DC

Klypin, A, Nolthenius, R., Primack, J., 1997, Astrophys. J., 474, 533.

Klypin, A., Gottlober, S., Kravtsov, A., Khokhlov, A., 1997, Astrophys. J., submitted.

Kravtsov, A., Klypin, A., & Khokhlov, A. 1997, Astrophys. J. Suppl., 111, 73

Lacey, C., Cole, S. 1994, M.N.R.A.S., 271, 676

Liddle, A.R., Lyth, D., Roberts, D., Viana, P.T.P., 1996, M.N.R.A.S., 278, 644.

Melott A.L., *Phys. Rev. Letters* **56** (1986) 1992.

Peacock, J., Dodds, S.J., 1994, M.N.R.A.S., 267, 1020.

Suisalu, I., Saar, E., 1995, M.N.R.A.S., 274, 287.

Sellwood J.A., *Ann. Rev. Astron. Astrophys.* **25** (1987) 151.

Sugiyama, N., 1995, Astrophys. J., 471, 542.

Summers, F.J., Davis, M., & Evrard, A. 1995, Astrophys. J., 454, 1

van Kampen, E. 1995, M.N.R.A.S., 273, 295


abstract: Theories with compact extra dimensions have become increasingly popular. In some theories the standard model particles are confined to our four-dimensional world and only gravity can propagate in the extra dimensions. In these models the size of the extra dimensions can be as large as hundreds of microns. The functional dependence of the gravitational force on distance is well known at both large and small distances compared to the size of the extra dimensions; for two extra dimensions, for example, it varies from $1/r^{2}$ to $1/r^{4}$ as the distance decreases. However, the dependence for intermediate distances has not been fully calculated. We determine this dependence as a function of both the size of the extra dimensions and the possible angle between the extra dimensional unit vectors and show that high precision measurements of the gravitational force would make possible the determination of the shape of the extra dimensions.
author: Marc Sher; Kelly A. Sullivan
title: Experimentally probing the shape of extra dimensions

# Introduction

Since the realization twenty years ago that string theories were promising candidates for a unified theory of all interactions, there has been extensive interest in theories with more than three spatial dimensions. In string theory consistency requires that there be nine spatial dimensions. Because we only observe three such dimensions, it is generally assumed that each of the other six dimensions must be compact, curled into a very small size $R$. For example, a cylinder has one large and one compact direction. For a small creature on the cylinder, the world looks two dimensional, while for a large creature, the cylinder looks one dimensional. Thus one expects that at distance scales larger than $R$ (corresponding to energy scales below $\hbar c/R$), the effects of these extra dimensions are unobservable. More precisely, if $y$ is one of the compact dimensions, then $y$ is identified with $y+2\pi R$. Thus, $f(y)=f(y+2\pi R)$ for any function. By Fourier's theorem, any such function can be Fourier-expanded. At distance scales larger than $R$ (or energy scales smaller than $\hbar c/R$), only the zero mode, which is independent of the extra dimensions, is relevant.

The possibility of experimental detection of these extra dimensions has been considered negligible until recently, because it was believed that the scale $R$ is far smaller than the scales that can be reached in colliders. As a particle's energy increases, its Compton wavelength shrinks, and at a high enough energy it will become smaller than the particle's Schwarzschild radius (at which point gravitational effects are important). Quantum gravitational effects will be critical at this energy scale, which is called the Planck energy. This energy scale is $\sqrt{\hbar c^{5}\over G}
\sim 10^{19}$ GeV (corresponding to a Planck length of $10^{-33}$ cm.). We thus expect the compactification scale $R$ to be of this order, which is far beyond the range of accelerators.

The reason that the Planck energy is so high is that at macroscopic length scales gravity is much weaker than the other interactions and thus enormous energies must be reached before it becomes comparably strong. A major problem in particle physics is trying to put into one single framework two widely different energy scales (the weak interaction scale of $100$ GeV and the Planck scale). This problem is called the hierarchy problem and is related to the relative weakness of gravity.

In the past few years, new models have appeared in which the size of the extra dimensions can be much larger, as large as a millimeter! In these models only gravitational interactions can propagate in the extra dimensions; other particles and interactions are stuck in our three-dimensional space. In this way, only gravitational interactions at distance scales less than a millimeter would be sensitive to these extra dimensions. Having non-gravitational interactions stuck in our three-dimensional isn't as ad hoc as it might appear – string theories often have gravitons as closed strings and other particles as open strings, and the open ends can be stuck on a three-dimensional surface. Such large extra dimensions would have dramatic experimental implications. In higher dimensions, gravity would no longer be inverse square, but would be inverse-cube in four spatial dimensions, inverse-fourth in five, etc. This dependence follows from Gauss' law in many dimensions. Thus, we would experimentally see gravity change from being inverse-square at scales larger than $R$ to inverse-cubed at scales smaller than $R$ (if there is one extra dimension).

We have explicitly assumed that Gauss' law will describe the gravitational interaction in many spatial dimensions.  This assumption follows naturally from string theories and is discussed in Ref. .   Gauss' law relates the integral of the force over the surface of a volume to the amount of mass (or charge in the case of electromagnetism) inside that volume.    By the divergence theorem the integral of the force over the surface can be converted into a divergence of the force over the volume. The divergence of a force is the Laplacian of the potential energy, which leads to Poisson's equation (giving $\nabla\cdot
\vec{E} = 4\pi \rho$ and  $\nabla^2 V = -4\pi\rho$ for electromagnetic fields).  Poisson's equation follows directly from the Einstein field equations in $n$ dimensions, and thus Gauss' law follows from general relativity.  See Ref.  for details.

The major attractive feature of models in which there are large extra dimensions is that they can substantially decrease the Planck scale to accessible energies. For example, suppose that there are six compact dimensions, all with a size $R$ given by 20 fermis (corresponding to an energy scale of 10 MeV). As the energy scale increases past 10 MeV, gravity will change from being $1/r^{2}$ to $1/r^{8}$. Its strength will then grow extremely rapidly at scales above 10 MeV and will become strong at approximately a few TeV, which is within reach of currently planned accelerators. Thus the Planck scale will only be a few TeV, and we can expect future colliders to directly probe quantum gravity and string effects, produce black holes, etc. The traditional hierarchy problem is then resolved.

We can reverse the argument and determine the value of $R$ given that the requirement that the Planck scale be in the TeV range. This requirement will depend only on the number of extra dimensions. For a Planck scale of $1$ TeV it is found that $R \sim 10^{32/d} 10^{-17}$ cm., where $d$ is the number of extra dimensions. For one extra dimension the value of $R$ turns out to be millions of kilometers, which is clearly excluded. Thus, there cannot be just one extra dimension. For two extra dimensions $R$ is a few hundred microns, which is currently being experimentally probed. For three extra dimensions $R$ is tens of nanometers. Although this distance is accessible in some proposed experiments, reaching force strengths comparable to the gravitational force seems far out of reach. For more than three extra dimensions the value of $R$ is too small to ever probe directly.

In this article we will focus on the case of two extra dimensions. With more than one compact dimension, the shape is not completely constrained, for example, with two extra dimensions, the ratio of the radii of the two dimensions can be other than unity and the unit vectors need not be orthogonal, leading to a shape angle. Thus, by precisely measuring the force of gravity at small distances, we can probe the shape as well as the size of the extra dimensions.

# Calculational Methods and Gauss' Law

Although we will focus on the case of two extra dimensions, we will first begin, as a toy model, with the case of a single extra dimension, compactified with periodicity $R$ ($R$ would be the circumference of a circle, not the radius). The spatial variables are $x$, $y$, $z$, and $w$. A point mass in the system will appear as in Fig. 1, where $y$ and $z$ coordinates have been suppressed, and the periodicity in the compact dimension is apparent. It should be pointed out that we are working in a "brane-world" scenario in which the known particles are confined to a four-dimensional brane and only gravity can propagate in the extra dimensions.

It is difficult to visualize four spatial dimensions.  To simplify the visualization we consider a three-dimensional problem in which the masses in Fig. 1 are point charges and ask for the value of the electric field a distance $r$ from the central point charge.  For $r << R$, only the central point charge is relevant, and the electric field is given by drawing a spherical Gaussian surface around the charge, resulting in a $1/r^2$ force.  As $r$ increases, the other charges become important, and no simple Gaussian surface can be drawn; we must add the contributions explicitly, resulting in an infinite sum.  As $r$ becomes much bigger than $R$, the point charges look like a line charge.  Now a cylindrical Gaussian surface can be used, resulting in a $1/r$ force law.   An interesting exercise would be to write the sum explicitly, and show how it interpolates between the two different examples of Gauss' law (we will do this interpolation for the higher dimensional case).  In standard electromagnetism texts the $1/r$ force law is derived by first considering a finite length line and then increasing the length to infinity.   The method described here is an alternative derivation that provides some insight into the $1/r$ behavior.

In four spatial dimensions and $r << R$, the gravitational (or electromagnetic) force law is $1/r^3$, which is found by encircling the point mass with a 4-sphere.  As $r$ increases, the full sum must be used.   At very large distances the points look like a line, and a Gaussian 4-cylinder must be used.  Note that the surface area of a 3 cylinder (parallel to the axis) is given by the length of the cylinder times the circumference of the "2-sphere" (that is, circle) endcaps, that is, $2\pi r
L$.   Thus the surface area of a 4-cylinder is the length times the area of the 3-sphere endcaps, which is $4\pi r^2 L$.  We now proceed to the calculation of the gravitational potential from the masses in Fig. 1 in 4 spatial dimensions.

For very small distance scales, $r << R$, the gravitational field depends only on the mass at $w=0$. Gauss' law in $n$-dimensions is $$\int\! F\cdot da = S_nG_nM_{\rm enc},\label{eq:1}$$ where $S_{n}$ is the surface area of a unit $n$-sphere, $M_{\rm enc}$ is the mass enclosed in the Gaussian volume, and $G_{n}$ is the $n$-dimensional Newton's constant. Note that Newton's constant can be defined through this equation– the constant $S_{n}$ is only a convention. In three spatial dimensions the left-hand-side of Eq. () gives $F 4\pi r^{2}$, and the right-hand-side gives $4\pi G_{3}M$. By equating these two terms, we find the familiar Newton's law for the gravitational field. In higher dimensions, the surface area of a unit sphere is $$S_n = \frac{2 \pi ^{n/2}}{\Gamma(\frac{n}{2})},$$ where $\Gamma$ is the Gamma Function. For our purposes, it is sufficient to know that $\Gamma(n)=(n-1)\Gamma(n-1), \Gamma(1)=1,
\Gamma({1\over 2})=\sqrt{\pi}$. We see that the gravitational field will be given by $F= G_{n}M/r^{n-1}$. For one extra dimension, we see this reasoning gives $F=G_{4}M/r^{3}$. Note that the dimensionality of $G_{4}$ and $G_{3}$ (the usual Newton's constant) are different.

At very large distances, $r >> R$, the string of masses looks like a continuous line of uniform mass density, and we can use a cylindrical Gaussian surface to solve for the field. Consider a 4-dimensional cylinder of side length $L$, with endcaps composed of three dimensional spheres of radius $r$. The mass enclosed by the cylinder is $M {L\over R}$, $S_{4}=2\pi^{2}$, and the left-hand-side of Gauss' law is $F 4\pi r^{2} L$. Plugging these into Eq. (1), the $L$ drops out (as usual in cylindrical Gauss' law applications), and we find that $$F=G_{4}M{2\pi^{2}\over 4\pi}{1\over r^{2}R}.$$ Thus at large distances, we recover the usual inverse square law. Comparing this expression with the conventional Newton's Law of gravity, we can find the expression for $G_{4}$ in terms of $G_{3}$ (the usual gravitational constant) and $R$. In $n$ spatial dimensions, we can write $$G_{3} = {S_{n}\over 4\pi}{G_{n}\over V_{n-3}}$$ where $V_{n-3}$ is the volume of the $(n-3)$-dimensional compactified space.

Thus, we find from Gauss' law that the gravitational field varies from an inverse-square law at large distances to an inverse ($n-1$) law at small distances, where $n$ is the number of spatial dimensions. This result is independent of the precise shape of the extra dimensions. To probe the shape we must look at intermediate distances. In this case, we must explicitly sum over the "mirror masses" and thus Gauss' law does not provide a useful way to calculate the force. For simplicity, we will calculate the gravitational potential at intermediate distances – the field can be determined by differentiation. Again, we first consider a single extra dimension as in Fig. 1. In four spatial dimensions the gravitational potential at a distance $D$ from a point mass is $V_{4}=-G_{4}M/2D^2$ and so the general result for the potential a distance $r = \sqrt{x^{2}+y^{2}+z^{2}}$ from the mass $M$ is $$V(r) = -{G_{4}M\over 2}\!\sum_{n=-\infty}^{\infty}{1\over r^{2}+n^{2}R^{2}}.
\label{eq:5}$$ In terms of the conventional Newton's constant $G_{3}$, Eq. () becomes $$V(r) = -{G_{3}M\over \pi R}\sum_{n=-\infty}^{\infty}{1\over
n^{2}+\Delta^{2}},$$ where $\Delta\equiv r/R$. For large $\Delta$, the sum is $\pi/\Delta$, leading to the conventional gravitational potential.

We plot $rV(r)$ as a function of $r$ in Fig. 2. As expected, the potential varies as $1/r$ for large $r$ and as $1/r^{2}$ for small $r$. Because one extra dimension is already excluded, we now consider the case of two extra dimensions must.

# Two Extra Dimensions

With two extra dimensions the topology of the compactified space is no longer simple. Because the three dimensions of our universe are topologically flat, we will assume that the two compact dimensions are also flat. This assumption occurs naturally in string theory. Flat compact dimensions are not unnatural. For example, the surface of a cylinder is two-dimensional, and has one very large and one very small dimension. Yet it is topologically flat – the angles of a triangle on a cylinder always sum to $180$ degrees.

Technically, the space we are considering is the product of two circles, known as a 2-torus. It can have two circumferences, which we will denote as $R_{1}$ and $R_{2}$. In addition, there is no reason that the unit vectors in the two compact directions must be orthogonal. Thus, the description of the image masses corresponding to Fig. 1 is given in Fig. 3. The three parameters that specify the shape of the extra dimensions are $R_{1}$, $R_{2}$, and $\theta$.

As before, we can look at a 3-dimensional electromagnetic analogy with the masses in Fig. 3 replaced by point charges.  At very short distances, only the central charge contributes, giving the $1/r^2$ force.   At intermediate distances, we must calculate the full double sum. At very large distances, a Gaussian pillbox will yield a constant field.   An interesting exercise would be to show how the double sum explicitly results in Coulomb's law at short distances and a constant field at large distances.

We will first consider the case in which the unit vectors are orthogonal. The potential is given by $$V=-{G_{5}M\over 3}\sum_{m=-\infty}^{\infty}
\sum_{n=-\infty}^{\infty}{1\over
(r^{2}+n^{2}R_{1}^{2}+m^{2}R_{2}^{2})^{3/2}},$$ where without loss of generality we can choose $R_{2}\geq R_{1}$; $G_{5}$ is Newton's constant in five spatial dimensions.

The result is plotted in Fig. 4 for $R_{2}=R_{1}$, $R_{2}=3R_{1}$, and $R_{2}=10R_{1}$. Note that at large distances, the standard $1/r$ potential emerges as expected. For small distances, we can clearly see the $1/r^{3}$ dependence of the potential. It is important to note that a measurement of the strength of the gravitational potential at very small distances would enable us to distinguish between the three possibilities. One expects these possibilities to be distinguishable, because the strength of the potential depends on the five-dimensional Newton's constant, which depends on the volume of the extra dimensions (see Eq. (4)). However, the volume of the extra dimensions does not determine the shape – we could not distinguish between $R_{1}=R_{2}=\sqrt{10} R_{0}$ and $R_{2}=10R_{1}=10R_{0}$, where $R_{0}$ is an unknown scale. Thus, to explore the shape of the extra dimensions, the full position dependence of the potential must be explored.

In Fig. 5 we have rescaled $R_{1}$ and $R_{2}$ so that the volume of the extra dimensions is the same in each of the three cases. We can now determine the precision necessary to distinguish the three cases. From Fig. 5 we can see that the value of the potential varies as $R_{2}$ varies from $R_{1}$ to $10R_{1}$ by a little over a factor of two. A 30% measurement of the potential would enable us to distinguish between $R_{2}=R_{1}$ and $R_{2}=3R_{1}$. Such precision seems experimentally feasible, once a deviation from the inverse-square law is found.

The full expression for the potential at intermediate distances has not previously been plotted.  In many other papers (see Refs. , , and ), the leading order deviation as $r$ is decreased is given. This deviation is of the form $V=V_0[1 + \alpha \exp(-r/R)]$, and many experimenters make plots of the allowed region in the $\alpha$-$R$ plane.  But a measurement of a nonzero value of $\alpha$ would only establish a deviation — the expression breaks down for slightly smaller values of $r$ — and the full expression would then be necessary.

The other possibility is that the unit vectors in the extra dimensions are not orthogonal. Here, we assume $R_{1}=R_{2}$ for simplicity and vary $\theta$. If we again rescale the values of $R$ so that the volumes are identical, we find the results in Fig. 6. We see that it is essentially impossible to distinguish between $\theta=\pi/2$ and $\theta=\pi/3$, but that a factor of two measurement of the potential would distinguish between these cases and $\theta=\pi/36$.

# Discussion

Experiments probing the nature of gravity at short distances are now underway (see Ref.   for a review). Measurements at the nanometer-scale are possible. Should a deviation from the inverse-square law be discovered, there will be a huge effort to measure this deviation precisely. In large extra dimension models, the nature of the deviation is well known at very short distances, and the leading order term in the deviation is also well known. In this paper we have discussed the deviation in the intermediate region and have shown that experimentally constraining the shape as well as the volume of the extra dimensions is feasible. For two extra dimensions, in which the expected scale is in the tens to hundreds of microns region, a measurement of $30\%$ accuracy in the potential would enable us to distinguish a difference of a factor of three in the size of the extra dimensions, and shape angles smaller than a few degrees would also be measurable.

There are several possible avenues for future study. We could consider three extra dimensions, which would be aesthetically appealing because the nine spatial dimensions of string theory could be grouped into three large, three intermediate, and three small dimensions. In this case there would be three different sizes as well as three different shape angles. As noted, it is unlikely that this case is measurable experimentally.

Another possibility is that the extra dimensions are not flat. Here we have assumed that they are flat and form a 2-torus, the simplest case. However, it could be that the extra dimensions are curved. For example, they could have the topology of the surface of a sphere. In this case the simple description of Fig. 3 would not be accurate (because one can travel in any direction and return to one's starting point). An expansion in terms of Kaluza-Klein modes on a sphere would be appropriate in this case. This expansion was done in Ref. , where the leading order deviation from Newton's law is presented.

# Figure Captions


abstract: The Travelling Salesman Problem (TSP) is well known and challenging combinatorial optimisation problem. Although exact solutions to the problem exist, its high computational demands have attracted a number of heuristic approaches to generate satisfactory, if not optimal, candidate solutions. Some heuristic methods take their inspiration from natural systems, extracting the salient features of such systems for use in classical computer algorithms. In this paper we demonstrate a simple unconventional computation method to approximate the Euclidean TSP using a shrinking blob of virtual material. The collective morphological adaptation and minimisation behaviour of the material emerges from the low-level interactions of a population of particles moving within a diffusive lattice. A 'blob' of this material is placed over a set of data points projected into the lattice, representing TSP city locations, and the blob is reduced in size over time. As the blob shrinks it morphologically adapts to the configuration of the cities. The shrinkage process stops when the blob no longer completely covers all cities. By tracing the perimeter of the blob a path between cities is elicited corresponding to a TSP tour. Over six runs on 20 randomly generated datasets of 20 cities this simple and unguided method found tours with a mean best tour length of 1.04, mean average tour length of 1.07 and mean worst tour length of 1.09, when expressed as a fraction of the minimal tour computed by an exact TSP solver. We examine the insertion mechanism by which the blob constructs a tour, note limitations of performance with problem scaling, and the relationship between the TSP and other structures which group points on the plane. The method is notable for its simplicity rather than its performance and may provide clues to the mechanism of human performance on TSP problems. The method raises questions about how to select the best fit between the natural behaviour of a physical system and its desired computational use.
author: Jeff Jones and Andrew Adamatzky
bibliography: references.bib
title: Computation of Travelling Salesman Problem by a Shrinking Blob

**Keywords:** Travelling salesman problem, multi-agent, virtual material, unconventional computation, material computation

# Introduction

\*\*\*\*\* About the travelling salesman problem and non-classical approaches. \*\*\*\*\*

## Why *Physarum* Does Not *Directly* Approximate the TSP

Although *Physarum* has been previously been used in the approximation of TSP , this was achieved by an indirect encoding of the problem to enable it to be presented to a confined plasmodium in a controlled environment. In its natural propagative state *Physarum* does not approximate the TSP. This is because the material comprising the plasmodium spontaneously forms networks. Even when the plasmodium is arranged as a solid sheet, the sheet is soon transformed into a network structure linking the nutrient sources by competitive flux of material within the sheet. It is physically impractical to force the plasmodium to conform to a TSP network structure during its nutrient foraging. Attempts were made in to force multi-agent morphologically adaptive emergent transport networks to conform to TSP-like requirements (degree of connectivity 2, no crossed paths) by dynamically adjusting the concentration of city 'node' attractants with only partial success. By using a large mass of the same multi-agent collective as a 'blob' of virtual material the results herein are more successful.

# Virtual Material Approach

In the shrinking blob method we use a piece, or 'blob' of a virtual plasmodium material to approximate the TSP. The material is composed of thousands of simple mobile multi-agent particles interacting together in a 2D diffusive lattice. Each particle senses the concentration of a generic 'chemoattractant' diffusing within the lattice and each agent also deposits the same substance within the lattice upon successful forward movement. The multi-agent population collectively exhibits emergent properties of cohesion and shape minimisation as a results of the low-level particle interactions. The pattern formation and network adaptation properties of small populations of the material were discussed in . In this paper we use a relatively large population of particles which collectively behaves as a sheet of deformable virtual material. A full description of the virtual material method is given in the appendix.

## Shrinkage Process

We initialise a sheet of the virtual material around a set of data points corresponding to TSP city nodes (Fig. a). Chemoattractant is projected into the diffusive lattice at node locations, however, projection is reduced at regions which are covered by the blob sheet. The initial shape of the sheet corresponds to the Convex Hull of the data points. We then shrink the material by systematically removing some of its constituent particle components. The city nodes act as attractants to the material, effectively 'snagging' the material at the locations of uncovered nodes and affecting its subsequent morphological adaptation. As the material continues to shrink its innate minimising properties conform to the locations of the city nodes and the area occupied by the material is reduced, becoming a concave area covering the nodes (Fig. b-e). The shrinkage is stopped when all of the nodes are partially uncovered by the sheet (Fig. f). The reader is encouraged to view the supplementary video recordings of the shrinkage process at (http:???). When the shrinkage is stopped the area of the sheet corresponds to the area enclosed by a tour of the Euclidean Travelling Salesman Problem. The exact tour formed by the blob can be elucidated by tracking along the perimeter of the blob, adding a city to the tour list when it is first encountered. The tour is complete when the start city is re-encountered. The approach is simple, making use of the innate adaptive emergent properties of the material. Despite being completely unguided and containing no heuristic optimisation strategies the approach yields efficient tours. The separate stages of the approach will now be described in detail.

## Halting the Computation

It is important to halt the shrinkage of the blob at the right time. If the shrinking is stopped too early an incomplete tour will be formed (i.e. only a partial subset of the nodes will be included in the tour if not all of the nodes are uncovered). Unlike guided heuristic methods a set of candidate tours is not initially formed and subsequently modified. Only a single tour is formed and the shrinking blob approach is akin to the 'instance machines' (as opposed to universal machines) proposed by Zauner and Conrad . To automatically halt the computation we use a so-called 'traffic light' system. At the start of the method the sheet covers the entire set of nodes. Only the outer nodes are partially covered by the blob. To measure whether a node is covered by the sheet we assess the number of particles in a $5x5$ window around each node. If the number of particles is $<15$ then the node is classified as uncovered and the node indicator is set to green. Otherwise the node is classified as covered and the node indicator is set to red. At each scheduler step the indicators of all nodes are checked. When all nodes are set to green, all nodes underneath the blob are partially uncovered and the shrinkage is stopped.

## Reading the Result of the Computation

To trace the path of cities in the tour discovered by the blob a manual process is used. The collection of partially uncovered nodes and blob shape may be interpreted as an island shape with the nodes representing cities on the coastline of the island (Fig. ). We begin by selecting the city at the top of the arena. If more than one city is at this $y$ location the left-most city at this $y$ location is selected. This city is the start city of the tour and is added to the tour list $\textbf{T}$. Moving in a clockwise direction we trace the perimeter of the blob (walking around the shore of the island …). Each time we encounter a city, it is added to $\textbf{T}$. If a city is subsequently re-encountered (as in the case of narrow peninsula structures as described below) it is ignored. When the path reaches the starting city the tour is complete and the list in $\textbf{T}$ represents the tour of the TSP found by the shrinking blob.

Some special cases in the tracking process must be noted in the case where a city lies on a narrow 'peninsula' of the blob as indicated in Fig. . In Fig. a the city nearest position $x$ in the path lies close to one side of a narrow peninsula. However the side at which the city is located can be deduced by a small convex bulge on the left side of the blob. In this case the city is not added until it is encountered on the left side of the peninsula. In the case of Fig. b, however, the city at $x$ is located exactly in the middle of a peninsula and its closest side cannot be discerned. In this instance two interpretations are possible and the subsequent differences in possible tour paths are indicated by the dotted lines in Fig. b, i) and ii). In interpretation i) the city is added to $\textbf{T}$ immediately and in ii) it is not added until it is encountered on its opposite side. If this situation occurs during the tracking process we add the city to $\textbf{T}$ when it is first encountered.

# Results

We assessed the shrinking blob method by generating 20 datasets, each consisting of 20 randomly generated nodes within a circular arena in a $200x200$ lattice. To aid the manual tracking process we added the condition that points must have a separation distance of at least 25 pixels. For each run a population of particles was generated and initialised within the confines of the convex hull (algorithmically generated) of the point set. Any particles migrating out of the convex hull area were removed. As the shrinkage process started the cohesion of the blob emerged and, as shrinkage progressed, the blob adapted to the shape of the city nodes. Six experimental runs were performed on each dataset and the resulting blob shape was recorded and tracked by the manual tracking process to reveal the tour. The best, worst and mean performance over the 6 runs for each 20 datasets was recorded and these results were aggregated over the 20 datasets and shown in Fig. . Results of the shrinking blob method are expressed as a fraction of the shortest exact tour found by the Concorde TSP solver .

## Construction of Tour by Concave Insertion Process

Although the final tour list is read off by tracking the perimeter of the shrunken blob, the construction of the tour actually occurs by an insertion process as the blob shrinks. The blob is initially patterned with the shape of the convex hull. This is only a partial tour, since only the peripheral nodes which are part of the Convex Hull are included. By recording the stages by which nodes are uncovered and added during the shrinkage process, the method of construction can be elucidated. Fig.  shows the visual deformation of the Convex Hull structure as the blob shrinks and new city nodes are added to the list. The actual order of insertion of cities to the tour is given in Fig. . As the blob shrinks, concavities form in the periphery of the blob which move inwards to the centre of the blob shape. This concave deformation is a transformation of the Convex Hull into a Concave Hull. The Concave Hull, the area occupied by — or the 'shape' of — a set of points is not as simple to define as its convex hull. It is commonly used in Geographical Information Systems (GIS) as the minimum region (or footprint ) occupied by a set of points, which cannot, in some cases, be represented correctly by the convex hull . The Concave Hull is related to the structures known as $\alpha$-shapes . The $\alpha$-shape of a set of points, $P$, is an intersection of the complement of all closed discs of radius $1/\alpha$ that includes no points of $P$. An $\alpha$-shape is a convex hull when $\alpha \rightarrow \infty$. When decreasing $\alpha$, the shapes may shrink, develop holes and become disconnected, collapsing to $P$ when $\alpha \rightarrow 0$. A concave hull is non-convex polygon representing area occupied by $P$ and the concave hull is a connected $\alpha$-shape without holes. In contrast to $\alpha$-shapes, the blob (more specifically, the set of points which it covers) does not become disconnected as it shrinks. As the blob adapts its morphology from Convex Hull to TSP is demonstrates increased concavity with decreased area. Although the shrinkage process is automatically stopped when a TSP tour is formed, the process could indeed continue past the TSP. If shrinkage continues then the blob will approximate the Steiner tree, the minimum path between all nodes.

## Differences in Performance of the Shrinking Blob Method

The results of the shrinking blob method show variations in performance from very good approximations of close-to-minimum tours (Fig. ) to less favourable fractions of the minimal tour (Fig. ). What is the reason for the disparity in performance on these datasets? If we examine the tour paths we can glean some clues as to the difference in performance. In the 'good' results examples the major concave regions of the tour formed by the blob closely match the concavities in the exact computed TSP tour (e.g. Fig. a and b). However in the 'poor' approximation results we can see that the major concave regions of the blob tour do not match the major concavities in the respective exact computed tours (e.g. Fig. a and b). Given that these concave regions are formed from the deformation of the initial Convex Hull we can see that the concavities in the blob tour appear to be formed, and 'deepened' where there are larger distances between the cities on the initial Convex Hull.

To explore the role of distance on concavity formation we patterned a blob into a square shape by placing regularly placed stimuli around the border of a square (Fig. a, stimuli positions, 20 pixels apart, indicated by crosses). When shrinkage of the blob was initiated there is no difference between the stimuli distances. All regions between stimuli initially show small concavities (the 'perforations' in Fig. b) until one gradually predominates and extends inwards. Also of note is the fact that when one concave region predominates, the other concavities shrink (Fig. c-e). The position of the initial dominating concavity is different in each run (presumably due to stochastic influences on the collective material properties of the blob) and this may explain the small differences in performance even on successful approximation of short tours.

When there is a larger gap between stimuli points the predominating concavity forms more quickly and is larger. The the concave region also deepens more quickly. This is shown in Fig. f-j which has a gap of 30 pixels between two stimulus points on the right side of the square and in Fig. k-o which has a gap of 60 pixels between stimulus points. When there are two large distances between stimuli there is competition between the competing concavities and the larger region predominates. This is demonstrated in Fig. p-t which has a distance gap of 40 pixels on the left side of the square and 60 pixels on the right side. Although two concave regions are formed, the larger deepens whilst the smaller concave region actually shrinks as the blob adapts its shape.

The synthetic examples illustrate the influence of city distance on concavity formation and evolution and these effects are more complex when irregular arrangements of city nodes are used. This is because arrangements of cities present stimuli to the blob sheet when partially uncovered, acting to anchor the blob at these regions, and the morphological adaptation of the blob is thus affected by the spatial configuration of city nodes. In the examples of relatively poor approximation of the minimum tour (Fig. ) the initial incorrect selection of concavities are subsequently deepened by the shrinking process, resulting in tours which differ significantly in both their visual shape and in the city order. In the examples of good comparative performance with the exact solver the blob tours differ only in a small number of nodes.

## Other Factors Affecting Shrinking Blob Performance

\- number of cities - sensor angle - sensor scale (large / mixed) - speed of shrinkage

# Discussion

We have presented a simple material approach to computation of the Travelling Salesman Problem using a shrinking blob.

# Acknowledgements