Lattice Boltzmann simulation of water and gas flow in porous gas diffusion layers in fuel cells reconstructed from micro-tomography The porous gas diffusion layers (GDLs) are key components in hydrogen fuel cells. During their operation the cells produce water at the cathode, and to avoid flooding, the water has to be removed out of the cells. How to manage the water is therefore an important issue in fuel cell design. In this paper we investigated water flow in the GDLs using a combination of the lattice Boltzmann method and X-ray computed tomography at the micron scale. Water flow in the GDL depends on water-air surface tension and hydrophobicity. To correctly represent the water-gas surface tension, the formations of water droplets in air were simulated, and the water-gas surface tension was obtained by fitting the simulated results to the Young-Laplace formula. The hydrophobicity is represented by the water-gas-fabric contact angle. For a given water-gas surface tension the value of the contact angle was determined by simulating the formations of water droplets on a solid surface with different hydrophobicity. We then applied the model to simulate water intrusion into initially dry GDLs driven by a pressure gradient in attempts to understand the impact of hydrophobicity on water distribution in the GDLs. The structures of the GDL were acquired by X-ray micro-tomography at a resolution of 1.7 microns. The simulated results revealed that with an increase in hydrophobicity, water transport in GDLs changes from piston-flow to channelled flow. Hydrogen fuel cells have attracted increased attention over the past few years because of their zero emission. During their operation, the cells produce water at the cathode. Whilst the presence of some water in the cathode is essential to keep the cell membrane humid so as to efficiently conduct protons from the anode to the cathode, excessive accumulation of water could result in flooding at the cathode and hence deteriorate the cell's performance. As such, how to effectively manage the water is an essential issue in fuel cell design.. The key components in fuel cells are porous gas diffusion layers (GDLs). The GDLs provide not only mechanical support to the cells, but also pathways for gases to move from gas-supply channels to catalyst layers where the electrochemical reactions take place to release the electrons from hydrogen. For the GDL at the cathode, it also needs to drain liquid water produced during the electrochemical reaction. Therefore, the cathode GDL has to provide pathways for both liquid water and gases to move simultaneously but in opposite directions. In practice, the GDL is often made hydrophobically heterogeneous so as to force water into a few channels, thereby leaving some space for gases to move through in the opposite direction from the gas-supply channel to the catalyst layer. As a result, spatial distribution of the water in the GDL controls gas flow and hence fuel cell performance. Because of its opaque nature, water distribution in GDLs is difficult to visualise. The existing work on water management in fuel cells is largely based on macroscopic models to predict saturation [1] . Whilst the saturation tells the percentage of pores that are filled by water, what controls gas flow in GDLs is the connectedness of the pores that remain unoccupied by water. The development in imaging technology over the past decade has been overcoming this barrier, and there has been increased research in the use of neutron imaging to visualise liquid water distribution in operating cells [2] . In our previous work, we have successfully visualised the 3D structure of the GDL at a resolution less than one micron using both computed X-ray tomography and FIB technology [3] . This, in combination with computational fluid dynamics, such as the lattice Boltzmann (LB) method and smooth particle hydrodynamic methods, has made simulation of water flow and water distribution in GDLs feasible at scales as fine as a few hundred nanometers [4] .. Several LB models have been developed since the 1980s to simulate two-phase flow. The earliest lattice-type two-phase model is the approach proposed by Rothman and Keller [5] (referred to as the RK model hereafter) based on the lattice gas algorithm (LGA). Because of its nature, the RK model inherited some drawbacks of the LGA such as numerical noises. Gunstensen et al. [6, 7] developed the LGA-based RK model into the LB model based on the concept of McNamara and Zanetti [8] using a linearised collision operator proposed by Higuera and Jimenez [9] . The RK model used two coloured particles to represent the two phases, and a perturbation to approximately recover Laplace's law at the fluid interface; it overcomes some drawback of the original RK model, including lack of Galilean invariance and statistical noise. The drawback of this model is that it is not rigorously based upon thermodynamics and is thus difficult to incorporate microscopic physical processes [10] . In addition, the pressure in this model is velocity-dependent, and the linearised collision operator is not computationally efficient [11] . Recently, Ahrenholz et al. has combined the RK model with the multiple-relaxation time LB model to simulate unsaturated water flow in glass bead columns [12] .. Another two-phase LB model is the method proposed by Shan and Chen [13, 14] (referred to as the SC model hereafter) and its modified versions [15, 16] . In the SC model, a nonlocal interaction force between particles of different fluids at neighbouring lattices is introduced, similar to the van der Waals attraction between fluid particles. Phase separation occurs when the attractive interaction is strong enough. Hou et al. [17] compared the RK and SC models, finding that the SC model is superior to the RK model in reducing numerical noise and handling fluids with contrasting densities. Recent development in the RK model has shown that such spurious noise can be reduced or even eliminated by using Latva-Koko's operator in the re-recolour step [18] . This could make the RK model more competitive than the SC model as revealed in a comparative study by Huang et al. [19] . Both the RK model and the SC model are based on the same lattice Boltzmann equation, thus they are efficient for parallelisation and easy to handle complicated boundaries. The SC model is a phenomenally-based model and does not conserve momentum locally. As such, some key parameters such as fluid-fluid surface tension cannot be derived a priori, and have to be estimated based on numerical experiments. Also, the SC model cannot handle fluids with large density ratios.. The third two-phase LB model is the free-energy approach developed by Swift et al. [20, 21] . In this model, the equilibrium distribution function in the classical LB model for ideal gases is modified so as to make it capable of simulating two-phase flow. The free-energy LB model conserves mass and momentum both locally and globally, and is formulated to account for the equilibrium thermodynamics of non-ideal gases. The major drawback of this model is the unphysical non-Galilean invariance for the viscous terms in the macroscopic Navier-Stokes equation.. The above three models are widely used in the literature to simulate two-phase flow with each having pros and cons as they are not directly derived from the kinetic theory. He et al. proposed a two-phase model by linking the LB model to the Boltzmann equation in the kinetic theory [22] . However, numerical experiences revealed that this method is susceptible to numerical instability, particularly for fluids with large density and viscosity ratios. To improve its numerical stability, Lee and Lin [23] developed a stable discretisation method to solve the lattice Boltzmann equation proposed by He et al. [22] ; results showed that the improved discretisation method significantly enhances stability and can hence handle fluids with density ratios as high as 1:1000. Other two-phase models developed over the past decade for simulating fluids with high density ratios include the method of Zheng et al. [24] and of Inamuro [25] . One drawback of these methods is that they need to calculate spatial derivatives up to second order, making them cumbersome to simulate twophase flow in porous media because of the complicated fluid-solid boundary. Furthermore, most two-phase flow in porous media is dominated by capillary forces. As a result, both the RK and SC models can offer good solutions and are widely used in practice.. There has been an increase in the use of LB models to simulate two-phase flow in fuel cells over the past few years. For example, Mukherjee and Wang [26] studied the influence of pore structure and GDL wettability on water transport and interfacial dynamics in stochastically constructed catalyst layers and gas diffusion layers in fuel cells. Niu et al. [27] did similar work in attempts to examine water flow in stochastically reconstructed GDLs and the dependence of relativepermeability for both air and water on water saturation. For water flow in the gas-supply channel, Hao and Cheng [28] simulated the dynamic behaviour of a water droplet under different flow conditions. The purpose of this paper is to investigate the impact of hydrophobicity on water intrusion in the GDLs using the SC model. The paper is organised as follows. We first describe the SC model in Section 2, and then explain how we determined the water-gas surface tension and the contact angle in Section 3. The implication and limitations of the model are discussed in Section 4. In this paper we investigated numerically the impact of hydrophobicity on water intrusion in GDLs used in the hydrogen fuel cell industry. The numerical simulations were based on the multiple-relaxation time lattice Boltzmann model. In the simulations, the dependence of water-air surface tension and water-air-solid contact angle on the LB model parameters was established by simulating the formation of water droplets in air and on the top of a solid wall respectively. Simulated results revealed that, under high pressure drop, water intrusion in hydrophobic GDLs is likely to be channelled, bypassing some pores, whilst in the hydrophilic GDLs, water intrusion likes a piston-flow in which water occupies all the pore space. Under low and medium pressure drops, because of the capillary barrier, water in both hydrophilic and hydrophobic GDLs is unsaturated, but water distribution in them is different. In hydrophobic GDLs, the water exists in large pores, whilst in hydrophilic GDLs the water intrudes into small pores first.. We used the SC two-phase model to simulate water intrusion. The SC model is a phenomenal model, solving the fluid-fluid interface by the diffused interface method in which the interface thickness spans several lattices. Therefore, spatial resolution needs to be sufficiently high in order to accurately represent the fluid-fluid interface. For example, a recent study of Yu and Fan [31] reveals that the surface tension estimated by the SC model using different spatial resolutions not only differs significantly but also depends on the value of the relaxation parameters. In fuel cell design, what is interesting is the water distribution when flow reaches a steady state. Furthermore, since water flow in GDLs is dominated by capillary, the two relaxation parameters we used for both fluids were close to unity in the simulations; the waterair surface tension is recovered by adjusting the time step. This naturally overcomes the dependence of surface tension on the relaxation parameters. For the impact of the spatial resolution, the porosity of a typical GDL is approximately 0.8 and the average pore size is 10 μm. The X-ray images were acquired at a very high resolution, 1.7 μm, which should be sufficient for LB simulations. Because of the heterogeneous nature of GDLs, however, it is likely that some fine pores in the GDLs might have been poorly represented in the X-ray image; the impact of such pores on the accuracy of the simulated results is an issue that needs further investigation. In all 3D simulations, there is always a trade-off between solution accuracy and the size of the sample which should be big enough to be representative. Yu and Fan proposed an adaptive mesh method which could be useful to solve this dilemma, using a fine mesh in fine pores and a coarse mesh in big pores [31] . Nonetheless, the results presented in this paper provide some insights into the impact of hydrophobicity on water intrusion in GDLs. The results show that manufacturing hydrophobic GDLs is able to force water into channels, but hydrophobicity makes water difficult to move from GDLs to the gas supply channel. Therefore, in designs, fully hydrophobic GDLs might not be able to improve water management. An alternative is to make GDLs heterogeneously hydrophobic in that some areas are hydrophilic and some areas are hydrophobic. As such, liquid water can be channelled under both high pressure and low pressure. How to experimentally quantify the heterogeneous hydrophobicity of GDLs and its effect on water flow is under development, and we will present the results in future publications. The lattice Boltzmann method consists of two steps: The first step is to calculate the collision between fluid particles, and the second step is to stream the fluid particles.. In this paper, we consider two fluids and the evolution of the fluid-particle distribution functions for each fluid is described by the following equation [29] :. where is a position vector, is time, ∫ ( , ) is the particle distribution function of fluid , moving in the th direction with velocity , ∫. is the equilibrium distribution functions of fluid , ∆ is a time step during which the particle moves from one lattice into another. In this paper, we used the D3Q19 model in which, as shown in Fig. 1 , the lattice velocity is defined as follows:. where is the side length of each cubic lattice. In Eq.. (. is a matrix describing the collision between fluid particles, whereM is a transform matrix that transforms the distribution functions into moments, and is a diagonal matrix to perform the relaxation collision in moment space. where is a dimensionless parameter that is related to the viscosity of fluid in that = 2 ( − 0.5)/3Δ . In the above LB model, the collision was calculated in the moment space as follows:. Where = × ∫ is the moment and. . The transformation matrix was given in detail in [29] . The equilibrium distribution functions for the D3Q19 model are given by . where ′ is bulk velocity and is calculated by . is the net force acting on fluid , including fluid-fluid interaction 1 and fluid-solid interaction 2 . That is,. The fluid-fluid reaction is calculated as follows: . where ( ′ ) is a non-zero constant at the fluid-solid interface and zero otherwise.. ( , ′ ) represents fluid-solid interaction strength and defines the wall wettability.. To ensure consistency with the fluid-fluid interaction, the fluid-wall interactive strength is described by. The sign of describes a hydrophobic or hydrophilic solid.. A material in a 3D image acquired by X-ray tomography is represented by a number of cubic elements. The 3D image is a gray photo with each element represented by an attenuation number ranging from 0 to 255, depending on the components in the element. A binary 3D structure is obtained from the gray image using the threshold method in which any elements with attenuation number less than the threshold are thought of as pores, and those with attenuation number higher than the threshold are classified as fabric solid. Because of this nature of tomography, any curved solid surface is approximated by a staircase surface in the 3D X-ray image; mathematically, this is a first-order approach. Efforts have been made over the past few years to rebuild smooth solid surface based on the zigzag surface in reconstructed images of porous materials for LB simulations [32] . However, for complicated porous materials like the GDLs investigated in this paper, the X-ray images always have errors to represent the void-solid surface due to the resolution limitation of imaging technology. As a result, we did not reprocess the binary X-ray images so as to make the staircase solid surface smooth. Instead, all the simulations used the original binary structures in which both pore and solid were represented by cubes each with a side length of 1.76 μm. All the distribution functions were defined at the centre of the cube, and the fluid-solid boundary was solved by the bounce back method. Because all cubic elements are the same, any particle in an element with its moving direction adjacent to a solid wall will move back to the element after the bouncing-back. Such a treatment is the special case of the method proposed by Bouzidi et al. [33] with the parameter q (Eq. (6) in [33] ) being 1/2.. Water intrusion through the image was simulated by applying a pressure drop in one direction; the pressure drop was simulated by imposing one prescribed pressure at the inlet boundary and one prescribed pressure at the outlet boundary, respectively; the other four sides of the 3D image were treated as periodic boundaries in which any particle exiting the image from one side re-enters the image from the opposite side with its mass and momentum remaining unchanged. The prescribed pressures were solved using the method proposed by Zou and He [34] .

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O B I I O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Photorealistic scene reconstruction by voxel coloring A novel scene reconstmetion technique is presented, different from previous approaches in its ability to cope with large changes in visibility and its modeling of intrinsic scene color and texture information. The method avoids image correspondence problems by working in a discretized scene space whose voxels are traversed in a jixed visibility ordering. This strategy takes full account of occlusions and allows the input cameras to be far apart and widely distributed about the environment. The algorithm identijies a special set of invariant voxels which together form a spatial andphotometric reconstruction of the scene, fully consistent with the input images. The approach is evaluated with images from both inward-and outwardfacing cameras. We consider the problem of acquiring photorealistic 3D models of real environments from widely distributed viewpoints. This problem has sparked recent interest in the computer vision community [l, 2, 3, 4, 51 as a result of new applications in telepresence, virtual walkthroughs, and other graphics-oriented problems that require realistic textured object models.. We use the term photorealism to describe 3D reconstructions of real scenes whose reprojections contain sufficient color and texture information to accurately reproduce images of the scene from a broad range of target viewpoints. To ensure accurate reprojections, the input images should be representative, i.e., sparsely distributed throughout the target range of viewpoints. Accordingly, we propose two criteria that a photorealistic reconstruction technique should satisfy: 0 Photo Integrity: The reprojected model should accurately reproduce the input images, preserving color, texture and pixel resolution The photorealistic scene reconstruction problem, as presently formulated, raises a number of unique challenges that push the limits of existing reconstruction techniques. Photo integrity requires that the reconstruction be dense and sufficiently accurate to reproduce the original images. This criterion poses a problem for existing feature-and contour-based techniques that do not provide dense shape estimates. While these techniques can produce texturemappedmodels [ 1, 3, 4] , accuracy is ensured only in places where features have been detected. The second criterion means that the input views may be far apart and contain significant occlusions. While some stereo methods [6, 71 can cope with limited occlusions, handling visibility changes of greater magnitude appears to be beyond the state of the art.. Instead of approaching this problem as one of shape reconstruction, we instead formulate a color reconstruction problem, in which the goal is an assignment of colors (radiances) to points in an (unknown) approximately Lambertian scene. As a solution, we present a voxel coloring technique that traverses a discretized 3D space in "depthorder" to identify voxels that have a unique coloring, constant across all possible interpretations of the scene. This approach has several advantages over existing stereo and structure-from-motion approaches to scene reconstruction. First, occlusions are explicitly modeled and accounted for. Second, the cameras can be positioned far apart without degrading accuracy or run-time. Third, the technique integrates numerous images to yield dense reconstructions that are accurate over a wide range of target viewpoints.. The voxel coloring algorithm presented here works by discretizing scene space into a set of voxels that is traversed and colored in a special order. In this respect, the method is similar to Collins' Space-Sweep approach [8] which performs an analogous scene traversal. However, the Space-Sweep algorithm does not provide a solution to the occlusion problem, a primary contribution of this paper. Katayama et al. [9] described a related method in which images are matched by detecting lines through slices of an epipolar volume, noting that occlusions could be explained by labeling lines in order of increasing slope. Our voxel traversal strategy yields a similar scene-space ordering but is not restricted to linear camera paths. However, their algorithm used a reference image, thereby ignoring points that are occluded in the reference image but visible elsewhere. Also related are recently developed panoramic stereo [ 10, 113 algorithms which avoid field of view problems by matching 360" panoramic images directly. Panoramic reconstructions can also be achieved using our approach, but without the need to build panoramic images (see Figs. 1 (b) and 4).. The remainder of the paper is organized as follows: Section 2 formulates and solves the voxel coloring problem, and describes its relations to shape reconstruction. Section 3 presents an efficient algorithm for computing the voxel coloring from a set of images, discussing complexity and related issues. Section 4 describes experiments on real and synthetic image sequences. This paper presented a new scene reconstruction technique that incorporates intrinsic color and texture information for the acquisition of photorealistic scene models. Unlike existing stereo and structure-from-motion techniques, the method guarantees that a consistent reconstruction is found, even under large visibility differences across the input images. The method relies on a constraint on the input camera configuration that enables a simple solution for determining voxel visibility. A second contribution was the constructive proof of the existence of a set of color invariants. These points are useful in two ways: first, they provide information that is intrinsic, i.e., constant across all possible consistent scenes. Second, together they constitute a spatial and photometric reconstruction of the scene whose projections reproduce the input images. The algorithm visits each voxel exactly once and projects it into every image. Therefore, the time complexity of voxel coloring is: O(vozels*images). To determine the space complexity, observe that evaluating one voxel does not require access to or comparison with other voxels. Consequently, voxels need not be stored in main memory during the algorithm; the voxels making up the voxel coloring will simply be output one at a time. Only the images and one-bit masks need to be allocated. The fact that the space and time complexities of voxel coloring are linear in the number of images is essential in that large numbers of images can be processed at once.. The algorithm differs from stereo and optical-flow techniques in that it does not perform window-based image correlation in the reconstruction process. Correspondences are found during the course of scene traversal by voxel projection. A disadvantage of this searchless strategy is that it requires very precise camera calibration to achieve the triangulation accuracy of stereo methods. Accuracy and run-time also depend on the voxel resolution, a parameter that can be set by the user or determined automatically to match the pixel resolution, calibration accuracy, and computational resources.. Importantly, the approach reconstructs only one of the potentially numerous scenes consistent with the input images. Consequently, it is susceptible to aperture problems caused by image regions of near-uniform color. These regions cause cusps in the reconstruction (see Fig. 2(e) ), since voxel coloring yields the reconstruction closest to the camera volume. This is a bias, just like smoothness is a bias in stereo methods, but one that guarantees a consistent reconstruction even with severe occlusions.

O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Fixed-complexity sphere encoder for multi-user MIMO systems In this paper, we propose a fixed-complexity sphere encoder (FSE) for multi-user multi-input multi-output (MU-MIMO) systems. The proposed FSE accomplishes a scalable tradeoff between performance and complexity. Also, because it has a parallel tree-search structure, the proposed encoder can be easily pipelined, leading to a tremendous reduction in the precoding latency. The complexity of the proposed encoder is also analyzed, and we propose two techniques that reduce it. Simulation and analytical results demonstrate that in a 4 × 4 MU-MIMO system, the proposed FSE requires only 11.5% of the computational complexity needed by the conventional QR decomposition with M-algorithm encoder (QRDM-E). Also, the encoding throughput of the proposed encoder is 7.5 times that of the QRDM-E with tolerable degradation in the BER performance, while achieving the optimum diversity order.Index Terms: Multi-user multi-input multi-output (MU-MIMO) systems, precoding, QR decomposition with M-algorithm encoder (QRDM-E), sphere encoder, Tomlinson-Harashima precoder (THP). Multi-user multiple-input multiple-output (MU-MIMO) techniques are becoming increasingly important as the base station (BS) should have the capability to simultaneously communicate with a large number of users. To this end, dirty paper coding (DPC), which is shown to achieve the capacity region of the Gaussian MIMO broadcast channel [1] , has been proposed by Costa [2] .. Several MU-MIMO precoding schemes were proposed in the literatures in order to achieve the near-capacity. Linear zeroforcing (ZF) precoding was introduced in [3] , where the transmitted vector is pre-filtered using the pseudo-inverse of the channel matrix. As a consequence, a high transmission power is required, particularly when the channel matrix is ill-conditioned.. To overcome this problem, regularized channel inversion, i.e., linear minimum mean square error (LMMSE) precoder, was proposed to reduce the required transmission power of the ZF precoding scheme, while achieving a tradeoff between interference and noise amplification [3] . Moreover, TomlinsonHarashima precoding (THP) scheme achieves better performance by limiting the transmit power, via a non-linear modulo operation [4] , [5] . Also, it is shown that the coding loss due to the modulo operation vanishes for high-order modulation schemes. Transmit power can be further reduced by perturbing the transmitted vector, as in [6] , where the optimum perturbation vector is found using the sphere encoder (SE). Although SE has a small average computational complexity, its worst-case complexity is very high. Besides, SE is sequential in the tree-search phase, which limits the potential for efficient hardware implementation.. To overcome the random complexity of the SE, the QRdecomposition with M-algorithm encoder (QRDM-E) was proposed in [7] . The main idea of the QRDM-E is to retain a fixed number of candidates at each encoding level. Although QRDM-E achieves the same performance of the SE, its complexity is high and its tree search strategy limits the possibilities for the efficient hardware implementation using pipelining.. In this paper, we propose a fixed-complexity sphere encoder (FSE) based on the fixed-complexity sphere decoder [8] , that achieves the optimum diversity order of the QRDM-E, as well as a flexible tradeoff between performance and complexity. Moreover, because the proposed FSE has a parallel search structure, it can be pipelined, which tremendously reduces the precoding latency. In addition, we evaluate the complexity of the conventional schemes and the proposed FSE and introduce two techniques that reduce its complexity.. The rest of this paper is organized as follows. In Section II, we introduce the system model and the statement of problem. In Section III, we review the conventional vector-perturbation techniques. In Section IV, we introduce the proposed FSE and in Section V we analyze its complexity and those of the SE and QRDM-E. Two proposed methods to reduce the complexity of the FSE are introduced in Section VI and simulation results are shown in Section VII. Finally, conclusions are drawn in Section VIII.

O B I O O O O O O O O O O O B I O O B I I I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I I I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I I I B B I I I I I B I B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Collective representational content for shared extended mind Some types of species exploit the external environment to support their cognitive processes, in the sense of patterns created in the environment that function as external mental states and serve as an extension to their mind. In the case of social species the creation and exploitation of such patterns can be shared, thus obtaining a form of shared mind or collective intelligence. This paper explores this shared extended mind principle for social species in more detail. The focus is on the notion of representational content in such cases. Proposals are put forward and formalised to define collective representational content for such shared external mental states. Two case studies in domains in which shared extended mind plays an important role are used as illustration. The first case study addresses the domain of social ant behaviour. The second case study addresses the domain of human communication via the environment. For both cases simulations are described, representation relations are specified and are verified against the simulated traces. Behaviour is often not only supported by internal mental structures and cognitive processes, but also by processes based on patterns created in the external environment that serve as external mental structures (cf. Clark, 1997 Clark, , 2001 Clark & Chalmers, 1998; Dennett, 1996) . Such a pattern in the environment is often called an extended mind. Examples of extended mind are the use of 'to do lists' and 'lists of desiderata'. Having written these down externally (e.g., on paper, in your diary, in your organizer or computer) makes it unnecessary to have an internal memory about all the items. Thus, internal mental processing can be kept less complex. Other examples of the use of extended mind are doing mathematics or arithmetic, where external (symbolic, graphical, material) representations are used (e.g., Bosse, Jonker, & Treur, 2003) . In Menary (2004) , a collection of papers can be found based on presentations at the conference 'The Extended Mind: The Very Idea' that took place in 2001. Clark (2001) points at the roles played by both internal and external representations in describing cognitive processes:. 'Internal representations will, almost certainly, feature in this story. But so will external representations, . . .' (Clark, 2001, p. 134) .. From another, developmental angle, also Griffiths and Stotz (2000) endorse the importance of using both internal and external representations; they speak of 'a larger representational environment which extends beyond the skin', and claim that 'culture makes humans as much as the reverse' (Griffiths & Stotz, 2000, p. 45 ).. Allowing mental states, which are in the external world and thus accessible for any agent around, opens the possibility that other agents also start to use them. Indeed, not only in the individual, single agent case, but also in the social, multi-agent case the extended mind principle can be observed, e.g., one individual creating a pattern in the 1389-0417/$ -see front matter Ó 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.cogsys.2005.11.007 environment, and one or more other individuals taking this pattern into account in their behaviour. For the human case, examples can be found everywhere, varying from roads, and traffic signs to books or other media, and to many other kinds of cultural achievements. Also in Scheele (2002) , it is claimed that part of the total team knowledge in distributed tasks (such as air traffic control) comprises external memory in the form of artefacts. In this multiagent case the extended mind principle serves as a way to build a form of social or collective intelligence, that goes beyond (and may even not require) social intelligence based on direct one-to-one communication.. Especially in the case of social species external mental states created by one individual can be exploited by another individual, or, more general, the creation and maintenance, as well as the exploitation of external mental states can be activities in which a number of individuals participate. For example, presenting slides on a paper with multiple authors to an audience. In such cases the external mental states cross, and in a sense break up, the borders between the individuals and become shared extended mental states. Another interesting and currently often studied example of collective intelligence is the intelligence shown by stigmergy. Stigmergy was defined originally as the indirect communication taking place among individuals in social insect societies (e.g., ant colonies), see Bonabeau (1999) , Bonabeau, Dorigo, and Theraulaz (1999) , and Grassé (1959) . Indeed, in this case the external world is exploited as an extended mind by using pheromones. While they walk, ants drop pheromones on the ground. The same or other ants sense these pheromones and follow the route in the direction of the strongest sensing. Pheromones are not persistent for long times; therefore such routes can vary over time. Currently, in the domain of computer science, the notion of stigmergy is used to solve many complex problems, e.g., concerning optimisation, coordination, or self-organisation.. In the literature on Philosophy of Mind, there is an ongoing discussion about the exact definitions of 'mind' and 'shared extended mind' (e.g., Clark & Chalmers, 1998; Tollefsen, 2006) . Although none of these authors provides a complete definition, a number of criteria for shared extended mind are commonly accepted:. • The environment participates in the agents' mental processes.. • The agents' internal mental processes are simplified.. • The agents have a more intensive interaction with the world.. • The agents depend on the external world in the sense that they delegate some of their mental representations and capabilities to it.. To this discussion, we want to add two novel questions. A first question is whether an agents' explicit intention to create the shared extended mind is a necessary requirement. As opposed to the mainstream view in the field, in the present paper this requirement is dropped, i.e., the one(s) 'creating' the shared extended mind do(es) not need to be aware of this. This means that agents with limited internal cognitive processes can nevertheless contribute to the emergence of a complex structure that can be described as a 'mind'. For example, we consider the pheromone mechanism used by ants for foraging similar to other common examples of the extended mind (computer, notepad, and so on). See Section 8 for an elaborate discussion on this topic. A second question with respect to the definition of shared extended mind is whether the mind needs to be useful for the agents that create it. Also this criterion is not considered necessary in the current paper. This means that we also allow cases where the shared extended mind may be disadvantageous for the agent that creates it. For example, in case of a predator-prey relationship, the traces that the prey leaves in the environment may be seen as a shared extended mind for the predators: they give information about the location of the prey, although this is completely against the preys interest. Tackling these kinds of examples may contribute to a more precise definition of shared extended mind. A possible approach in this respect is to define a classification of different categories of shared extended mind. This option will be explored in future work.. In Bosse, Jonker, Schut, and Treur (2005) , the shared extended mind principle is worked out in more detail. The paper focusses on formal analysis and formalisation of the dynamic properties of the processes involved, both at the local level (the basic mechanisms) and the global level (the emerging properties of the whole), and their relationships. A case study in social ant behaviour in which shared extended mind plays an important role is used as illustration. In the current paper, as an extension to Bosse et al. (2005) , the notion of representational content is analysed for mental processes based on the shared extended mind principle. The analysis of notions of representational content of internal mental state properties is well known in the literature on Cognitive Science and Philosophy of Mind. In a nutshell, the question in this literature is 'what does it mean for an agent to have a mental state', or 'what information does the mental state represent'? Usually, this question is answered by taking a relevant internal mental state property m and identifying a representation relation that indicates in which way m relates to properties in the external world or the agent's interaction with the external world (cf. Bickhard, 1993; Jacob, 1997; Kim, 1996, pp. 184-210) . For the case of extended mind an extension of the analysis of notions of representational content to external state properties is needed. Moreover, for the case of external mental state properties that are shared, a notion of collective representational content is needed (in contrast to a notion of representational content for a single agent). As a result, the question to be answered then becomes 'what information does a shared extended mental state (e.g., a heap of pheromones) represent for the group'? This is one of the main questions to be answered in this paper.. Thus, by addressing examples such as ant colonies and modelling them from an extended mind perspective, a number of challenging new issues on cognitive modelling and representational content are encountered:. • How to define representational content for an external mental state property? • How to handle decay of a mental state property?. • How can joint creation of a shared mental state property be modelled? • What is an appropriate notion of collective representational content of a shared external mental state property? • How can representational content be defined in a case where a behavioural choice depends on a number of mental state properties?. In this paper, these questions are addressed. To this end the shared extended mind principle is analysed in more detail, and a formalisation is provided of its dynamics. It is discussed in particular how a notion of collective representational content for a shared external mental state property can be formulated. In the literature notions of representational content are usually restricted to internal mental states of one individual. The notion of collective representational content developed here extends this in two manners: (1) for external instead of internal mental states, and (2) for groups of individuals instead of single individuals. The proposals put forward are evaluated in two case studies of social behaviour based on shared extended mind. First, as an example of an unintentionally created shared extended mind (by species with limited cognitive capabilities), a case study of a simple ant colony is addressed. Next, as an example of an intentionally created shared extended mind (by species with more complex cognitive capabilities), a case study is addressed involving a person that presents slides to an audience. The analysis of these case studies comprises multi-agent simulation based on identified local dynamic properties, identification of dynamic properties that describe collective representational content of shared extended mind states, and verification of these dynamic properties. The extended mind perspective introduces a high-level conceptualisation of agent-environment interaction processes. By modelling the ants example and the slide example from an extended mind perspective, the following challenging issues on cognitive modelling and representational content were encountered:. 1. How to define representational content for an external mental state property? 2. How to handle decay of a mental state property? 3. How can joint creation of a shared mental state property be modelled? 4. What is an appropriate notion of collective representational content of a shared external mental state property? 5. How can representational content be defined in a case where a behavioural choice depends on a number of mental state properties?. These questions were addressed in this paper. For example, modelling joint creation of mental state properties (3.) was made possible by using relative or leveled mental state properties, parameterised by numbers. Each contribution to such a mental state property was modelled by addition to the level indicated by the number. Collective representational content (4.) from a looking backward perspective was defined by taking into account histories of such contributions. Collective representational content from a forward perspective was defined taking into account multiple parameterised mental state properties, corresponding to the alternatives for behavioural choices, with their relative weights. In this case it is not possible to define representational content for just one of these mental state properties, but it is possible to define it for their combination or conjunction (5.).. The high-level conceptualisation has successfully been formalised and analysed in a logical manner. The formalisation enables simulation and automated checking of dynamic properties of traces or sets of traces, in particular of the representation relations.. The two case studies considered in this paper have some interesting differences and commonalities. In the slide example, the individual agents are assumed to have complex internal cognitive processes. Therefore, it is very natural to speak about a 'shared mind' in that case, since the pattern created in the external world (i.e., a slide on an overhead projector) represents a shared mental state of the group (i.e., a belief that a pot contains tea). However, in the ants example, the internal processes of the individual agents are assumed to be very limited. The ants do not really 'understand' what they are doing. Nevertheless, as a result of their behaviour, a structure (i.e., a pattern of pheromones) emerges that can be described as a shared 'mind', as shown in the previous section. For example, the external world state property 'pheromone is present at edge e' can be described using a mental notion such as 'the group believes that e is a relevant direction'. This is in line with the famous claim (often used as a reaction to Searle's Chinese Room Argument, Searle, 1980 Searle, , 1984 that 'intelligence' of complex systems is often an emerging property of the whole, not of the individual parts; e.g., Dennett (1991, pp. 435-440) .. Considering related work, there is a large body of literature that has some connection to the issues addressed in this paper, both in the area of Cognitive Science and beyond. From a broad perspective, the issues have been investigated for years in disciplines such as psychology, Computer-Supported Cooperative Work (CSCW) and Human-Computer Interaction (HCI). Two main examples are the concepts of Distributed Cognition and Activity Theory. Distributed Cognition (Hollan, Hutchins, & Kirsh, 2000; Hutchins, 1991; Salomon, 1993 ) is a branch of Cognitive Science that proposes that human knowledge and cognition are not confined to the individual. Instead, it is distributed by placing memories, facts, or knowledge on the objects, individuals, and tools in our environment. Distributed cognition it is a useful approach for (re)designing social aspects of cognition by putting emphasis on the individual and their environment. The approach views a system as a set of representations, and models the interchange of information between these representations. These representations can be either in the mental space of the participants or external representations available in the environment. Activity Theory, invented by Leontiev (1981) , is a Soviet psychological theory, based on the idea that cognition is distributed among individuals and part of the environment. Activity Theory became one of the major psychological theories in the Soviet Union, being used widely in areas such as the education of disabled children and the design of equipment control panels. See Nardi (1996) for a collection of papers about Activity Theory applied in different contexts.. From a narrow perspective, recently other researchers in Cognitive Science have also tried to define criteria for the notion of a collective mind, consisting of multiple extended minds (e.g., Clark & Chalmers, 1998; Tollefsen, 2006 ; see Section 8). Tollefsen works out the thesis that the mind is not bounded by skin and bones, making way for the concept of a collective mind. She includes multiple thought experiments that illustrate how to extend the coupled system to cover not only individual-artifact (computers, calculators, etc.), but also individual-individual. An example thought experiment concerns a husband and wife, where he is a disorganised professor and she reminds him of appointments, meetings, and so on. Together they form a coupled system; hence they have a collective mind. Our work described here considers a similar notion of a collective (or: shared extended) mind, but with some important differences. Firstly, we explicitly address the issue of representational content (Bickhard, 1993) in going from a single extended mind to a collective mind. Secondly, the thought experiments consider only one-to-one interactions (husband-wife), whereas our experiments consider many-tomany interactions.. For future research, it is planned to make the distinction between extended mind states and other external world states more concrete. In addition, the approach will be applied to several other cases of extended mind. For example, can the work be related to AI planning representations, traffic control, knowledge representation of negotiation, and to the concept of ''shared knowledge'' in knowledge management?. at(E8, 0.0) and pheromones_at(E9, 0.0) and pheromones_at (E10, 0.0) In the previous sections, the shared extended mind principle has been applied in two case studies. First, in Sections 4 and 5, to illustrate the case of an unintentionally created shared extended mind (by species with limited cognitive capabilities) the ants example was addressed. Next, in Sections 6 and 7, to illustrate the case of an intentionally created shared extended mind (by species with more complex cognitive capabilities) the slide example was addressed. For the latter case, there will not be much discussion about why this example counts as extended mind; the example satisfies all usual criteria for extended mind (e.g., Clark & Chalmers, 1998) . However, the former case needs some more explanation. Therefore, this section aims to provide an argument why an ant colony can be interpreted as having a shared extended mind as well. Moreover, it is discussed whether it is legitimate to speak about a collective representational content in this case.. Historically, the idea of an extended mind used in this paper continues on the idea of active externalism by Clark and Chalmers (1998) , that is based on the active role of the environment in driving cognitive processes. The central notion is that the individual brain performs some operations, while others are delegated to manipulations of external media. The authors build on the ideas of Kirsh and Maglio (1994) of epistemic actions that alter the world so as to aid and augment cognitive processes such as recognition and search. This in contrast with merely pragmatic actions, that alter the world because some physical change is desirable for its own sake (e.g., putting cement into a hole in a dam). Applying these notions to the use of pheromones by ants, the ant can be considered linked with external matter in a two-way interaction. The ant drops pheromones (for its own use and that of others) and detects pheromones that help it in its route taking. In other words, the ant and its pheromone enhanced environment form a coupled system that can be seen as a cognitive system in its own right. If the external component, the pheromones, are removed, the system's behavioural competence decreases: the ants will have more problems in finding the shortest paths. Furthermore, the use of pheromones cannot be considered pragmatic actions, for the presence of pheromones is not desirable for its own sake, i.e., independent of the presence of ants. Therefore, one can conclude that ants engage in active externalism. This, by itself, is not enough to conclude that ants and the pheromones in its environment together form an extended mind.. The notion of mind is irrevocably linked to the notion of mental states (e.g., experiences, beliefs, desires, emotions). Researchers such as Clark and Chalmers (1998) and Tollefsen (2006) in this special issue argue that such mental states can be based on features of the external world just as they might on features of the brain. A recurrent example is the use of a notebook instead of the memory function of the brain that underlies beliefs. The transferral to ants and pheromones are obvious: pheromones are used by the individual ant as indicators of interesting locations (e.g., food, nest). To accept the combination of internal mental states with features of the external world as extended mental states, a number of criteria should be met (see also Section 1). Clark and Chalmers (1998) state that some fundamental criteria are a high degree of trust, reliance, and accessibility. According to Tollefsen (2006) , Clark and Chalmers (1998) also added that the information contained in the resource must have been previously endorsed by the subject. We agree that if the information mysteriously appeared we would be less inclined to accord it the status of a belief. Nevertheless, we did not find this formulation as an additional criterion for the extended mental state in Clark and Chalmers (1998) . In our opinion this fourth criterion is covered by the criteria trust and reliance. It is irrelevant in what manner the information came to be in the extended mental state, the point is whether or not the behaviour is based on this information. The behaviour will only be effective if the information is reliable, and the behaviour will only occur if the information is trusted (implicitly or explicitly).. To return to the ant example, all three criteria (trust, reliance, and accessibility) are met. The ant places implicit trust in the pheromones. The reliability of pheromones is an interesting point, since pheromones degrade over time. Therefore, the reliability of pheromones depends on the frequency with which pheromone trails are travelled. The reliability further depends on the evaporative properties of pheromones that enable the map of the world as presented by pheromone trails adapts over time. Blocked and other ineffective routes will lose their pheromone trails over time by the fact that ants only maintain effective routes with pheromones. The reliability of pheromones for the individual ant is therefore not guaranteed, but of high enough quality as shown by the effectiveness of ant colonies in the evolution. The accessibility to the pheromones is constant, except for such strange situations as being picked up and dropped at a place not having pheromones. For the ant the number of types of mental states might not be impressive, but in our view a ''small'' mind is still a mind. From this last remark another discussion might be triggered, i.e., that of representation.. The discussion about representation relations and whether or not some part of a mental state has a representational content has led to interesting debates, see Clark (1997) , Haugeland (1991) , and Kosslyn (1994) . Especially, the question of the form that mental representation takes in non-linguistic creatures, such as human infants and non-human animals is of interest for the work presented in this paper. In Haugeland (1991) , three requirements for representational content of a ''nonextended'' mind are defined. In Clark (1997) , it is discussed how these requirements are translated to the case of an extended mind. Clark's (1997) line of reasoning provides an interesting point of departure for discussions of collective representational content. The three requirements from Haugeland (1991) , translated for the extended mind case, are as follows. A system uses external representation in case:. • The system must coordinate its behaviours with some environmental features F that are not always reliably present to the system. • The system copes by having some other external features F 0 (instead of the aforementioned environmental features F) that guide the behaviour instead of F.. • The external features F 0 are part of a more general representational scheme that allows for a variety of related representational states.

O B I O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O B I O O O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O B I O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O B I O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O B I O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O B I O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O B I O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O B I O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


On the complexity of equivalence of specifications of infinite objects We study the complexity of deciding the equality of infinite objects specified by systems of equations, and of infinite objects specified by λ-terms. For equational specifications there are several natural notions of equality: equality in all models, equality of the sets of solutions, and equality of normal forms for productive specifications. For λ-terms we investigate Böhm-tree equality and various notions of observational equality. We pinpoint the complexity of each of these notions in the arithmetical or analytical hierarchy.We show that the complexity of deciding equality in all models subsumes the entire analytical hierarchy. This holds already for the most simple infinite objects, viz. streams over {0, 1}, and stands in sharp contrast to the low arithmetical Π 0 2 -completeness of equality of equationally specified streams derived in [17] employing a different notion of equality. In the last two decades interest has grown towards infinite data, as witnessed by the application of type theory to infinite objects [5] , as well as the emergence of coalgebraic techniques for infinite data types like streams [19] , infinitary term rewriting and infinitary lambda calculus [24] . In functional programming, the use of infinite data structures dates back to 1976, see [11, 14] .. We are concerned with the complexity of deciding the equality of infinite objects specified by systems of equations, and infinite objects specified by λ-terms. The equational specification of infi- 0 The technical report supporting this paper can be found on arxiv.org under the same title.. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee.. nite objects is common practice in coalgebra, term rewriting and functional programming. Consider an example from [17] : zeros = 0 : zeros ones = 1 : ones blink = 0 : 1 : blink zip(x : σ, τ ) = x : zip(τ, σ). This is an equational specification of three infinite lists of bits, and a binary function over infinite lists. 1 Then, a typical question is whether the following equality holds:. zip(zeros, ones) = blink. The answer depends on the semantics we choose to interpret the equality; for example (2) is not valid in the hidden models considered in [17] ; for more details we refer to Section 2. In order to answer such a question, we first need to settle on the precise semantics of equality for equational specifications; the candidates we consider in this paper are I. Equality in all models.. II. Equality of the set of solutions.. For λ-terms we are not concerned with equality in the sense of convertibility (which is known to be Π 0 2 -complete, see [1] ). Instead, we are interested in behavioral equivalence of λ-terms in all contexts, because this corresponds to the interchangeability of expressions in purely functional languages. It is also closely related to referential transparency, and the notion of Böhm trees as values of expressions including those without normal form. Thus we consider the following equivalences for λ-terms:. III. Observational equivalences.. IV. Böhm-tree equality.. The 'right' choice of equivalence depends on the intended application. The classic semantics mentioned in items I and II above, are defined by model-theoretic means. From a algebraic perspective I and II are the most natural semantics to consider for equational reasoning. On the other hand, III and IV, are defined by means of evaluation, i.e., rewriting. In functional programming the latter are of foremost importance, because these take (lazy) evaluation strategies into account. From an evaluation perspective, two terms are equal if they have the same observable behavior, independent of the context they are in. In contrast to the model-theoretic notions, this equality is invariant under the exchange of meaningless subterms, that is, subterms which cannot be evaluated to a (weak) head normal form. Another candidate for the semantics of equality is V. Equality of normal forms for productive specifications.. A rewrite specification is productive [9, 23] if the terms under consideration can be fully evaluated, that is, (outermost-fair) rewriting yields a (possibly infinite) constructor normal form in the limit. In such a setting, equality of the normal forms is a suitable semantics for the equivalence of terms. Deciding the equality of productive specifications has been shown to be a Π 0 1 -complete problem in [13] ; this semantics is not considered here.. We now briefly describe the concepts I-IV.. Equality in models (I and II). The semantics I (equality in all models) is useful when the objects under consideration are specified in the same specification. This semantics interprets the objects simultaneously in each model satisfying the specification. This allows us to compare objects that depend on a common unknown, an underspecified object; see (4) below for an illustrating example. If the objects under consideration are fully specified, that is, have unique solutions, then semantics I coincides with semantics II. In contrast to I, semantics II is more suitable for comparing objects specified by different specifications, as we explain below. The objects are compared via the set of their solutions (in their respective specifications). This semantics is well-known from equations over real (or complex) numbers, where two equations, like. 2 − 1 = 0 and x 2 − 2x = 0 , are equivalent if they have the same solutions for x, here {0, 2}.. A Σ-algebra A consists of a carrier set A (the domain of A) and an interpretation [[·] ] of the symbols Σ occurring in the equational specification as functions over A. Then A is called a model of an equational specification E, which we denote by A |= E, if all equations of E respect the interpretation; that is, for every equation of E both sides have the same interpretation for every assignment of the variables. As the domain we will typically choose (a subset of) the final coalgebra [21] describing the class of objects we are specifying. The final coalgebra ensures that the model is continuous, that is, if we have a converging sequence of terms t1, t2, . . . . the symbols ones and ones are guaranteed to have the same interpretation. Continuity is crucial to conclude the validity of equations such as ones = ones which are not satisfied in non-continuous models like the initial algebra of the specification. Let E be a specification of M and N . Then M is considered equal to N with respect to semantics I if every model of E is also a model of M = N : ∀A. A |= E ⇒ A |= M = N . This notion is especially of interest if M and N depend on a common unknown and consequently have to be interpreted simultaneously in the same model. For example in. the streams M and N are both specified in terms of an unspecified stream X. Whatever interpretation X has, M and N are equal, and so they are equal in the sense of semantics I. On the other hand, semantics I has the effect that an underspecified constant is not equivalent to its renamed copy. This is illustrated by the following specification:. Here M and N are not equal in every model; for example, let . A | A |= EN } . Here the set of solutions of a constant X in a specification EX is the set of interpretations of X in all models of EX .. Observational equivalence (III and IV). In purely functional languages based on the λ-calculus [1] , the evaluation of expressions is free of side effects. As a consequence, an expression (or subexpression) can always be replaced by its normal form, the socalled value of the expression. This principle is known as referential transparency. This also implies that expressions can be substituted for each other if they have the same normal form.. For specifications of coinductive objects, such as infinite lists (called streams) or infinite trees, the value typically is an infinite term. For example in ones = 1 : ones, the term ones has as value (or infinite normal form) the infinite term 1 : 1 : 1 : . . .. However, it is not always guaranteed that a term can be fully evaluated. During the evaluation to the (possibly infinite) normal form, we may encounter subterms that cannot be evaluated because these subterms do not have a head normal form. In λ-calculus, such terms are known as meaningless terms. For example, consider:. Here g(n) is meaningless for every n. Consequently, natsx(0) evaluates to a stream in which every second element is meaningless, and therefore, undefined. An infinite value containing undefined parts can be represented by means of Böhm trees [1] introduced in 1975 by Corrado Böhm. In particular, the Böhm tree of natsx(0) is: 0 : ⊥ : 1 : ⊥ : 2 : ⊥ : 3 : ⊥ : 4 : ⊥ : . . ., where ⊥ is a special symbol representing an undefined element. In λ-calculus (or orthogonal higher-order rewriting), terms with equal Böhm trees can be exchanged (for each other) without changing the meaning of the whole expression. In the specification above, natsx(0) and natsx (0) have the same Böhm tree, and hence are interchangeable. In contrast, from the model-theoretic perspective natsx(0) and natsx (0) are different. In every model of natsx(0) all elements at odd indexes coincide, whereas natsx (0) admits models that assign different interpretations to these elements. From a rewriting as well as functional programming perspective, these differences are irrelevant as they concern undefined subterms.. There are several notions of infinite values, depending on what terms are considered meaningless, including Böhm trees, Lévy-Longo trees, Berarducci trees, η-Böhm trees, η ∞ -Böhm trees; see further [6] . The terms λx.xx and λx.x(λz.xz), for instance, have distinct Böhm trees, but we may want to consider the terms behaviorally, or observationally equivalent as they are η-convertible. There are several natural concepts of observational equivalence for λ-calculus, where terms are considered equivalent if they yield the same observations in every context. To that end, we consider three forms of observations: normal forms (nf), head normal forms (hnf), and weak head normal forms (whnf). A head normal form is a λ-term of the form λx1. . . . λxn.yN1 . . . Nm with n, m ≥ 0. A weak head normal form is an hnf or an abstraction, i.e., a whnf is a term of the form xM1 . . . Mm or λx.M . Each of the observations gives rise to an equivalence = nf , = hnf or = whnf , defined by. In fact, the equivalence = nf corresponds to η-Böhm trees, and = hnf to η ∞ -Böhm trees. For more details we refer to [6] , where it is argued that = whnf corresponds to evaluation strategies used by lazy functional languages. If two expressions behave the same in every context, then no functional program can distinguish them.. Contribution. We characterize for each of the semantics I-IV the complexity of deciding the equality of terms. For I and II we will focus on equational specifications of bitstreams, and for III and IV on behavioral equivalences of λ-terms and Böhm tree equality.. Each of these equivalences is undecidable, therefore we characterize their complexity by means of the arithmetical and analytical hierarchies, see Figure 1 . The arithmetical hierarchy classifies the complexity of a problem P by the minimum number of quantifier alternations in first-order formulas that characterize P . The analytical hierarchy extends this classification to second-order arithmetic, then counting the alternations of set quantifiers.. A It turns out that the complexities of deciding the equality in all models as well as the equality of the set of solutions subsume the entire arithmetical and analytical hierarchy when the domain of the models is the set of all streams, so-called full models, see Theorems 3 and 5. The idea of the proof is as follows. We translate formulas of the analytical hierarchy into stream specifications by representing ∀ set quantifiers by equations with variables. This simulates a quantification over all streams as the models are full, and the equations have to hold for all assignments of the variables. The ∃ set quantifiers are eliminated in favor of Skolem functions (here stream functions). The interpretation of the functions is determined by the model, and the question whether there exists a model corresponds to an existential quantification over all Skolem functions.. B & C If we admit models whose domain does not contain all streams, then the complexity of deciding equality drops to the level Π 1 1 of the analytical hierarchy for semantics I, and to Π 1 2 for II, see Theorems 1, and 7. The reason is that equations with variables no longer have to hold for all streams, but only for the streams that exist in the model. By the Löwenheim-Skolem theorem we obtain that if there exists a model, then there exists a countable model: from an uncountable model we construct a countable one, by taking the finitely many streams "of interest" and closing them under all functions in the model. Thus, it suffices to quantify over countable models for which one single set quantifier is enough.. The aforementioned results already hold for bitstreams, one of the simplest coinductive objects, and thereby can serve as a lower bound on the hardness of the equality problem for other coinductive objects. We also study the behavioral semantics from [17] . We find that if behavioral equivalence ≡ is required to be a congruence, like for example in [2] , then the complexity of deciding behavioral equivalence is catapulted out of the arithmetical hierarchy, to the level Π 1 1 of the analytical hierarchy, see Theorem 8. Likewise so for the behavioural equivalence for specifications of streams of natural numbers, relaxing the congruence requirement, see Theorem 9. D For the equivalences on λ-terms, we show that deciding the Böhm tree and Lévy-Longo tree equality, as well as the observational equivalences = nf , = hnf and = whnf are Π 0 2 -complete problems, see Theorem 11. (It is clear that when an object is given by a rewrite system, like the λ-calculus, then the complexity resides in the arithmetical hierarchy, since it suffices to quantify over a number steps to evaluate parts of the object.) E Finally, we consider the complexity of unique solutions. A term s has a unique solution within a specification E if there exists models of E, and in all models of E, s has the same interpretation. The problem of deciding unique solvability in all full models again subsumes the analytical hierarchy, see Theorem 4. When also considering the non-full models, we find that the problem is Π Outline. We first discuss related work. We formally introduce bitstream specifications and stream models in Section 3, and Turing machines with oracles in Section 4. We recall the basic complexityrelated notions in Section 5. We use these concepts in Section 6 to derive the complexity results for the model-theoretic notions. In Section 7 we consider a different notion of models, namely the behavioural semantics as in [17] . Finally, we investigate the observational equivalences of λ-terms in Section 8. We have investigated different model-theoretic and rewriting based semantics of equality of infinite objects, specified either by systems of equations or by λ-terms. It turns out that the complexities for these notions vary from the low levels of the arithmetical hierarchy Π , none of these classes are recursively enumerable or co-recursively enumerable. Thus, there exists no complete proof systems for proving or for disproving equality. An exception is the equality of normal forms for productive specifications for which inequalities can be recursively enumerated [13] . The complexity of the equality of streams specified by systems of equations has been investigated in the ICFP paper [17, Corollary 1]; we cite: Proving equality on streams defined equationally is a Π 0 2 -complete problem. This result is based on a behavioral notion of stream models [16] . We briefly summarize the main characteristics of these models:. ω can have multiple representatives in the model (known as confusion).. (ii) For every equation = r it is required that the interpretations (iii) Behavioral equivalence ≡ is not required to be a congruence.. Behavioral models have a wide range of applications, for example for modeling computations with hidden states, or capturing certain forms of nondeterminism. For these applications it is often intended that the semantics is not preserved under equational reasoning. For example, consider the following specification from [17] tail(push(σ)) = σ , specifying a function push that prefixes an element to the argument stream, while leaving unspecified which element. In the behavioral models we obtain a restricted form of nondeterminism [25] , for example, the following is not behaviorally satisfied:. although derivable by pure equational reasoning. For a nondeterministic operation, it is of course desirable that (6) does not hold.. However, for function definitions employing pattern matching, behavioral models sometimes yield unexpected results; consider:. Now, there are models that satisfy the specification (7), but not (8):. In We define the domain by AB = {0, 1} and. Here zε and oε are alternative representations of 0 ω and 1 ω , respectively, and zw and ow have an additional finite prefix w ∈ {0, 1} * . We define the interpretations. we define:. We define the interpretation [[:]] of the stream constructor by:. Note that the elements zε and oε cannot be constructed by . We define an auxiliary function 1 that (similar to zip) interleaves the elements of finite or infinite words; for u1, u2 ∈ {0, 1} ≤ω = {0, 1} * ∪ {0, 1} ω , let au1 1 u2 = a(u2 1 u1) and ε 1 u2 = u2. We now define the interpretation [[zip] ] of the symbol zip as follows:. and in all other cases, we define. where emb(zw) = w0 ω , emb(ow) = w1 ω , and emb(σ) = σ. It is straightforward to check that specification 1 is behaviorally satisfied, whereas [[zip(zeros,. The counterexample in Remark 1 employs the fact that the behavioral models of [17] do not require that every stream can be constructed by the (interpretation of the) stream constructor The example illustrates that the behavioral models of [17] do not go along with function definitions using pattern matching. To fully define [[zip]], we can specify it using the stream destructors: head(zip(σ, τ )) = head(σ), and tail(zip(σ, τ )) = zip(τ, tail(σ)). This change of the specification format resolves the problem.. Alternatively, keeping the specification format, we can adapt the notion of models. To reestablish soundness of equational reasoning one can (i) exclude confusion or (ii) require that ≡ is a congruence. Note that the common models of streams are free of confusion: final coalgebras [20] , one-sided infinite words A ω , and the function space N → A. In hidden algebras [15] , confusion is often allowed but its negative effects are prevented by restricting to behavioral models [2] , in which behavioral equivalence is a congruence:. Our results show that when ≡ is required to be a congruence (or confusion is eliminated), then the complexity of the equality of bitstreams that are specified equationally jumps from the low level Π 0 2 of the arithmetical hierarchy to the level Π 1 1 of the analytical hierarchy, thereby exceeding the arithmetical hierarchy. Moreover, we show that even for behavioral specifications with confusion (as in [17] ), equality of streams of natural numbers is Π 1 1 -complete. Consequently, the results of [17] are valid only for bitstreams in combination with the behavioral equality discussed above. For general behavioral specifications (not the special case of stream specifications), the Π 1 1 -completeness has been shown in [3] . Term rewriting systems are closely related to equational specifications. The complexity of deciding various standard properties of term rewriting systems, such as productivity, termination and confluence (Church-Rosser), has been investigated in [8, 10] .

O O B O O O O O B I O O O B O O O B O B I O O O O O O O B I O O O O B I O O O O O O B B O O O B O O O O O O B O O O O O O O O O O O B O O O O O B O O O B O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O B O B I O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O B O B I O O O O O O O O O B O O O O B O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O B O B O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O B O O O O O O O B O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O B O O O O O O B O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O B O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O B O O O O O O O O O O B I O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O B O B O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O B O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O B O O O O O O O O O O O O O O O O O O O O O O O