Faithfulness in Chain Graphs: The Discrete Case This paper deals with chain graphs under the classic Lauritzen-Wermuth-Frydenberg interpretation. We prove that the strictly positive discrete probability distributions with the prescribed sample space that factorize according to a chain graph G with dimension d have positive Lebesgue measure wrt R d , whereas those that factorize according to G but are not faithful to it have zero Lebesgue measure wrt R d . This means that, in the measuretheoretic sense described, almost all the strictly positive discrete probability distributions with the prescribed sample space that factorize according to G are faithful to it. This paper deals with chain graphs under the classic Lauritzen-Wermuth-Frydenberg interpretation. The use of chain graphs to represent independence models in artificial intelligence and statistics has increased over the years, particularly in the case of undirected graphs and acyclic directed graphs. However, the vast majority of independence models that can be represented by chain graphs cannot be represented by undirected graphs or acyclic directed graphs (Peña, 2007) . As Studený (2005 , Section 1.1) points out, something that would help to judge whether this is an advantage of chain graphs would be proving that any independence model represented by a chain graph exists within an uncertainty calculus of artificial intelligence, e.g. a class of probability distributions or a class of relational databases. In this paper, we prove that for any chain graph there exists a discrete probability distribution with the prescribed sample space that is faithful to it. Actually, we prove a stronger result, namely that the strictly positive discrete probability distributions with the prescribed sample space that factorize according to a chain graph G with dimension d have positive Lebesgue measure wrt R d , whereas those that factorize according to G but are not faithful to it have zero Lebesgue measure wrt R d . This means that, in the measure-theoretic sense described, almost all the strictly positive discrete probability distributions with the prescribed sample space that factorize according to G are faithful to it. Previously, it has only been proven that for any chain graph there exists a discrete probability distribution that is faithful to it for some sample space, most likely different from the prescribed sample space (Studený & Bouckaert, 1998, Theorem 7.2) . Another related result is that in (Peña et al., 2009, Theorem 3) , where it is proven that for any undirected graph there exists a discrete probability distribution with the prescribed sample space that is faithful to it. This result has also been proven for acyclic directed graphs (Meek, 1995, Theorem 7) . The result in Meek (1995) is actually stronger, as it proves that, in a certain measure-theoretic sense, almost all the discrete probability distributions with the prescribed sample space that factorize according to an acyclic directed graph are faithful to it. This paper extends that result to chain graphs.. The rest of the paper is organized as follows. We start by reviewing some concepts in Section 2. In Section 3, we describe how we parameterize the strictly positive discrete probability distributions with the prescribed sample space that factorize according to a chain graph. We present our results on faithfulness in Section 4. In Section 5, we present some results about chain graph equivalence that follow from the results in Section 4. Finally, we close with some discussion in Section 6. In this paper, we have proven that, in a certain measure-theoretic sense, almost all the strictly positive discrete probability distributions with the prescribed sample space that factorize according to a chain graph are faithful to it. This result extends previous results such as. • (Studený & Bouckaert, 1998, Theorem 7. 2) where it is proven that for any chain graph there exists a discrete probability distribution that is faithful to it for some sample space, most likely different from the prescribed sample space,. • (Peña et al., 2009, Theorem 3) where it is proven that for any undirected graph there exists a discrete probability distribution with the prescribed sample space that is faithful to it, and. • (Meek, 1995, Theorem 7) where it is proven that, in a certain measure-theoretic sense, almost all the discrete probability distributions with the prescribed sample space that factorize according to an acyclic directed graph are faithful to it.. In this paper, we have also proven a number of consequences that follow from the result discussed above:. • The fact that the vast majority of independence models that can be represented by chain graphs cannot be represented by undirected graphs or acyclic directed graphs is an advantage of chain graphs, because such models exist within an uncertainty calculus of artificial intelligence: The class of strictly positive discrete probability distributions with any prescribed sample space.. • Some definitions of equivalence in chain graphs coincide, which implies that the graphical characterization of Markov distribution equivalence in Frydenberg (1990, Theorem 5.6 ) also applies to other definitions of equivalence.. • For the parameterization introduced in this paper, all the chain graphs in a class of equivalence have the same dimension and, thus, the factorizations they induce are equally space efficient for storing the strictly positive discrete probability distributions that factorize according to the chain graphs in the class.. We are currently investigating whether the results in this paper can be extended to the class of regular Gaussian distributions. The main problem lies in the derivation of a result analogous to that in Section 3.

B 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 O O O O O


Geometrically aware communication in random wireless networks Some of the first routing algorithms for position-aware wireless networks used the Delaunay triangulation of the pointlocations of the network's nodes as the underlying connectivity graph. Later on these solutions were considered impractical because the Delaunay triangulation may in general contain arbitrarily long edges and because calculating the Delaunay triangulation may require a global view of the network. Many other algorithms were then suggested for geometric routing, often assuming random placement of network nodes for analysis or simulation [27, 5, 28, 15] . But as we show, when the nodes are uniformly placed in the unit disk the Delaunay triangulation does not contain long edges, it is easy to compute locally and it is in many ways optimal for geometric routing and flooding.In particular, we prove that with high probability the maximal length of an edge in Del(P ), the Delaunay triangulation of a set P of n nodes uniformly placed in the unit disk, * Work by M.S. has been supported by a grant from the U.S.-Israeli Binational Science Foundation, by a grant from the Israel Science Fund (for a Center of Excellence in Geometric Computing), by NSF Grants CCR-97-32101, CCR-00-98246, and by the Hermann Minkowski-MINERVA Center for Geometry at Tel Aviv University.† A full version of this paper is available at http://www.cs. tau.ac.il/ ∼ stupp/PAPERS/fulldel.pdf 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. is O( 3 log n n ), and that the expected sum of squares of all the edges in Del(P ) is O(1). These geometric results imply that for wireless networks, randomly distributed in a unit disk (1) computing the Delaunay triangulation locally is asymptotically easy; (2) simple "face routing" through the Delaunay triangulation optimizes, up to poly-logarithmic factors, the energy load on the nodes, and (3) flooding the network, an operation quite common in sensor nets, is with high probability optimal up to a constant factor. The last property is particularly important for geocasting because the Delaunay triangulation is known to be a spanner. We consider energetically efficient geometric routing and flooding in position-aware wireless and sensor networks. Such networks are typically created among a large number of stationary nodes, randomly placed in some bounded geographic region, that communicate by radio transmission. Usually it is assumed that there is no centralized fixed infrastructure that directly communicates with each node. Instead, nodes that are within each other's radio range may communicate directly, while those that are far apart use intermediate nodes to relay messages.. Wireless sensor nets were suggested for applications ranging from disaster recovery and surveillance [12] to the exploration of Mars [10] . In many cases, thousands of nodes are expected to interconnect while deployed in a hostile inaccessible environment. Thus, while such networks share some of the aspects of classical radio networks (geographical positioning, for example) they have also created some unique challenges. For example, sensors are usually required to be small, light and cheap, which means that power management is particularly important [1, 12] . While there may be many parameters which affect the power consumption in each node it is common to assume that message transmission is the dominating factor. Another property unique to sensor networks is that in many cases sensors cannot have a dedicated identity. Instead, the locally sensed properties of each node are used as its identifier, making network floods (the propagation of a message by sending it over all the links in the network) far more common 1 [17, 18, 14] . Several architectures have been proposed for constructing efficient sensor networks [18, 31, 19] . A notable difference between these architectures and existing wireless architectures is that they strive to keep the network as homogeneous as possible. That is, global or local master nodes are not allowed. Instead, workload is distributed as evenly as possible among all the nodes. Even architectures which do cluster nodes [18] change the cluster-heads from time to time to amortize the load.. Homogeneity is a crucial property for network robustness. A robust sensor network is expected to work even if a constant fraction of the sensor-nodes fail. Thus, while we consider conventional measures of efficiency, such as the time until the first node fails [27, 8, 7] we also propose a new measure, the half life of a network, defined to be the number of communication rounds (routing or flooding) it takes until more than half of the nodes consume all their available energy and fail. As is the case in many homogeneous systems, the half life is equal, up to poly-logarithmic factors, to the time it takes for any constant fraction of nodes to fail. This is opposed to the time it takes for the first node to fail, or for the last node to fail, which may be significantly different. We use this measure to evaluate the cost of flooding and routing over the edges of the Delaunay triangulation, showing them to be asymptotically optimal in randomly placed sensor nets.. Several earlier studies of geometric routing have proposed the use of the Delaunay triangulation as an efficient routing graph among the network's nodes [4, 24] . These results, however, were considered impractical, because in general the Delaunay triangulation may contain arbitrarily long edges and because constructing the triangulation, even locally near a point, might require a global view of the entire point set. An extensive amount of research was then done to overcome these shortcomings, while keeping the routing efficient [6, 27, 34, 18, 7, 15, 25, 28, 20, 5, 22] . Various algorithms were suggested, including for the case where the nodes are uniformly distributed in some fixed region. We show that under such an assumption the original suggestions of [4] do indeed lead to efficient algorithms, at least when the nodes are randomly placed in a fixed disk. Furthermore, while we leave the analysis of random node placement in the unit square or in other simple regions as open, it follows from our analysis that for a uniform distribution the boundary effects of the Delaunay triangulation which make edges near the boundary longer than "inner edges" involve, for most simple regions, an asymptotically diminishing number of nodes that lie very close to the boundary.. Given an instance, P , of n random points uniformly chosen from the unit disk, denote by Del(P ) the Delaunay triangulation of P , and by tu the distance of node u from the boundary of the unit disk (that is, t u = 1 − u ). We show that Theorem 1. Depending on the distances of the endpoints u, v from the boundary, the maximum length of a Delaunay edge uv is, with high probability,. An interesting outcome of this theorem is that, with high probability, the number of nodes in the convex hull of P must be Θ( 3 n log n ).. We also show that Theorem 2. The expected value of the sum of the squared lengths of the edges of Del(P ) is Θ(1).. Some implications of these results are straightforward. For example, since there are no long edges, one can expect the computation of the triangulation to be local. We say that the triangulation Del(P ) is r-local if every edge in Del(P ) is contained in some disk of radius smaller than r that does not contain any other point in P . We show that. -local triangulation, with high probability.. However, showing that routing and flooding over the Delaunay edges are energetically efficient requires some assumptions on the communication patterns. We consider two homogeneous communication patterns: a random point-topoint communication process which models communication among nodes as a random process where in each step two random nodes are chosen to communicate, and an iterated flooding process which models repeated floods as a process where at each time step one message is propagated to the entire network by being sent over each link in the system. We then show that Theorem 4. The half life of the iterated flooding process over Del(P ) is Θ(n) with high probability.. Noting that the upper bound in this case follows from the well known bounds for the Euclidean minimum spanning tree [16, 23] , which is contained in the Delaunay triangulation. We also show that Theorem 5. The time until the first node fails and the half life of a system executing a random point-to-point communication process, when routing over Delaunay edges, is, with high probability, Ω((. Here we assume a routing algorithm that sends a message from node u to node v along a path that lies on the union of the boundaries of all Delaunay faces crossed by the segment uv; see, e.g., [21] . We refer to such a routing strategy as face routing.. We also derive upper bounds for the network's half life, when it executes a random point-to-point communication process, where the bounds are independent of the routing method and the underlying routing graph. Using machinery from percolation theory, we show that Theorem 6. The half life of any system executing a random point-to-point communication process, using any routing strategy on any routing graph, is O(n 1.5 log n), with high probability.. Thus, we prove that face routing over the Delaunay edges is asymptotically optimal up to a polylogarithmic factor for point-to-point communication.

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 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 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 B I 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 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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


Constructing large DNA segments by iterative clone recombination Abstract Methods for constructing large contiguous segments of DNA will be enabling for Synthetic Biology, where the assembly of genes encoding circuits, biosynthetic pathways or even whole microbial organisms is of interest. Currently, in vitro approaches to DNA synthesis are adequate for generating DNAs that are up to 10s of kbp in length, and in vivo recombination strategies are more suitable for building DNA constructs that are 100 kbp or larger. We have developed a vector system for efficient assembly of large DNA molecules by iterative in vivo recombination of fosmid clones. Two custom fosmid vectors have been built, pFOSAMP and pFOSKAN, that support antibiotic switching. Using this technique we rebuilt two non-contiguous regions of the Haemophilus influenzae genome as episomes in recombinogenic Escherichia coli host cells. These regions together comprise190 kbp, or 10.4% of the H. influenze genome. Current approaches to gene synthesis utilize short oligonucleotides that are subjected to iterative rounds of ligation and amplification to make longer DNA sequences. This method has been used successfully to build complete coding sequences for individual genes, gene clusters (Tian et al. 2004) , and even compete viral genomes (Cello et al. 2002; Smith et al. 2003) . The power of this approach, in terms of bases of DNA synthesized per unit cost appears to be advancing on a trajectory reminiscent of Moore's law (Carlson 2003) . In vitro approaches for generating much larger sequences are compromised by the fragility high molecular weight DNA and the diminishing yield of the desired product as length increases. Thus, the construction of large DNA molecules has generally relied on recombination of precursor fragments in a host organism (Itaya et al. 2005) . The lambda Red system (Yu et al. 2000) is an efficient and scarless method of in vivo recombination. This system utilizes a host strain (typically E. coli DH10B cells) carrying a segment of the phage lambda genome that contains the exo, bet and gam genes under control of a temperature-sensitive repressor. These lambda genes mediate recombination between the ends of a linear incoming DNA segment with homologous sequences in a target DNA. The homology regions can be very short (*50 bp) and the target can be any chromosomal or episomal DNA molecule present in the host cell. We have designed a fosmid vector system that allows lambda Red recombinations to be done iteratively, such that large DNAs can be assembled stepwise in the host cell. For proof of principle we are reassembling segments of the H. influenzae Rd KW20 genome in an E. coli host, using a recombination strategy similar in principle to that described by Kotzamanis and Huxley (2004) . Briefly, a genomic library is constructed in each of two fosmid vectors that carry different antibiotic resistance markers. Clones are randomly sequenced, mapped to the genome and a minimal tiling set of genomic fragments in alternating vectors is selected. DNA for a given clone is isolated, linearized, and transformed into cells containing the next clone in the tiling set. A lambda RED mediated fusion event joins the incoming fragment with its neighbour and replaces the antibiotic resistance gene, allowing selection of recombinants. The process is then repeated. Here we demonstrate the re-assembly by iterative recombination of two noncontiguous H. influenzae gDNA segments totaling of 190 kbp, or 10.4% of the genome. In principle, this approach could be used to rebuild and reboot the complete H. influenzae genome. This is our longer-term goal with this model system, but requires consideration of additional issues such as cross-talk in gene expression and incompatibility of some gene products (Holt et al. 2007 ). The method also general utility in constructing large DNAs. The ability to construct large DNA's that represent complete biosynthetic pathways or even complete genomes will be an important enabling technology for synthetic biology.. Here we describe a rapid, iterative method based on sitespecific lambda Red recombination for assembling fosmid clones into larger episomal constructs. Fosmid clones are convenient for this purpose because the fosmid library construction procedure is routine and, at approximately 40 kbp, fosmid clones are large enough to contain entire bacterial operons and gene clusters but are still small enough to be easily sequenced and manipulated. A 40 kbp DNA segment is within the scope of what can be synthesized in vitro and, therefore, there is a convenient transition from in vitro construction of fosmid sized DNA fragments to in vivo assembly of these precursors into substantially larger DNA molecules.. We are exploring approaches for building microbial chromosomes (Holt et al. 2007) . Recently, it has been shown that the entire 1.1 Mbp chromosome from Mycoplasma mycoides can be purified by PFGE and transferred into a recipient cell of the closely related species, Mycoplasma capricolum (Lartigue et al. 2007 ). The transfer event was facilitated by polyethlylene glycol, a reagent typically used to promote mammalian cell fusion in vitro. Mycoplasmas are amenable to this approach because they lack a cell wall. Selection for markers on the M. mycoides chromosome allowed isolation of cells identical to this species and harboring only this genome. This is an important advance that shows that it is possible to exchange Mycoplasma chromosomes. However, approaches for actually building microbial genome require further development and, since there are no current in vitro synthesis methods to construct a DNAs that are 100s of kbp or larger, the most practical approach to building a genome, be it natural, modified, or fully synthetic, appears to be stepwise assembly of moderately large segments in a host cell. As such, there must be co-residence of the donor and host genomes in a single cell for some period of time as the construction procedure moves to completion, and a means to recognize and mitigate incompatibilities between donor and host gene products. Regarding the methodology for actually constructing a microbial genome in a host cell, various approaches can be envisioned, and some progress has already been made. Itaya et al. (2005) used an iterative process of homologous recombination to integrate most (3.5 Mbp) of the genome of the photosynthetic bacterium Synechocystis directly into the genome of a Bacillus subtilis host. Their process, termed ''inchworm elongation'', involves insertion of a target sequence into the Bacillus genome followed by delivery of a Synechocystis genome segment tens of kilobases in length that recombines at that site. This is done iteratively, in an ''inchworm'' fashion in order to establish longer donor segments within the host chromosome and shows that large segments of a bacterial genome can be assembled in a host cell. Our approach to fosmid clone assembly that is described in the present study requires relatively few steps, and has the advantage that the DNA molecule is constructed as an episome, which can be isolated from the host for further analysis, manipulation or transplantation. Mechanistically, our approach is similar to that described by Kotzamanis and Huxley (2004) . This group demonstrated the fusion of a pair of overlapping human BAC clones by first subcloning inserts into new vectors that carried different antibiotic resistance genes, then joining them by lambda RED recombination with antibiotic switching. Our study extends this work by establishing a fosmid vector system for constructing recombination-ready libraries, and demonstrating serial rather than just pairwise recombination. Further, we have successfully mitigated the issue of executing recombination in the presence of a highly similar host genome. Further, we anticipate that hierarchical assembly involving iterative steps of pairing fosmids, then joining these pairs, and so on, has the potential to dramatically accelerate the assembly of very large DNAs.. A difficulty that can be anticipated in assembling large episomal elements in closely related host cell is that some number of genes encoded by a given segment of DNA will be transcribed and translated. This ectopic expression may have a deleterious effect on the host through mechanisms that may include, for example, direct toxicity of gene products, altered gene dosage, or sequestration of rare codons. As episomal elements are assembled, there is increasing chance of reconstituting a set of genes that are individually tolerable, but toxic in combination. The study of the combinatorial behavior of gene products is an important area of synthetic biology, yet remains underexplored. The method of iterative clone recombination presented here will facilitate these studies, and provides a useful and broadly applicable approach to building large DNAs. Two modified fosmid vectors-one containing an ampicillin resistance marker (pFOSAMP, Fig. 1a ) and the second a kanamycin resistance marker (pFOSKAN, Fig. 1b) were constructed by modifying the pEPIFOS5 fosmid vector backbone. A unique FseI restriction site was engineered to the right of the insert site and serves to linearize the clones that are to recombine with the target construct in the host. Two H. influenzae fosmid libraries were built, one in each vector, and random clones were end-sequenced to high redundancy. End-sequences were mapped to the H. influenzae Rd KW20 reference genome sequence and repeats within and between H. influenzae and E. coli were highlighted to facilitate selection of a minimal tiling set of clones with non-repetitive end sequences. The selected minimal tiling set included 61 clones, 31 from the pFOSAMP library and 30 from the pFOSKAN library and covers 98.5% of the 1.83 Mbp H. influenzae genome. Three segments of the genome (coordinates 145,915-157,386; 1,275,539-1,290,904; and 1,508,825-1,510,549 bp) were not spanned by any clone and, therefore, these relatively small physical gaps are not represented in the tiling set. We demonstrate successful iterative recombination by reassembling independently two non-contiguous regions of the H. influenzae genome using the method illustrated in Fig. 2 . For each region, the first of three overlapping Constructing large DNA segments by iterative clone recombination 141 fosmids was transformed into lambda Red compatible E. coli cells, cultured in the presence appropriate antibiotic (e.g. ampicillin) and electrocompetent cells were prepared. The next clone in the tiling path was linearized by FseI, end polished, then transformed into the cells containing the initial fosmid. The incoming clone was joined with the first clone by a recombination event mediated at one end by the vector sequence and at the other end by overlapping genomic sequence. A key feature of this system is that upon recombination, the new genomic segment is joined to the first, but at the same time the vector segment from the first clone is replaced with the vector of the second clone. As such, the product contains only a single vector sequence, but now the antibiotic resistance marker has been exchanged and recombinant clones can be selected. Importantly, the incoming clone cannot propagate on its own because it is linear, and only becomes circularized (and thus replicable) upon recombination with the first resident clone. A second round of recombination was then undertaken with the third fosmid clone for each region, to generate large contiguous H. influenzae genomic DNA segments propagating in their E. coli hosts. The size and content of the intermediate and final constructs was verified by EcoRI restriction mapping (Fig. 3) and also by sizing the Fse1 cut gDNA by PFGE (Fig. S1 ). Regarding the success rate of these types of recombination procedures it is important to note that we began initially with 11 sets of three clones that in total spanned half of the H. influenzae genome. Successful pairwise recombinations were obtained for five of these sets. The two sets reported above were the first to undergo successfully the second round of recombination, and thereby demonstrate the feasibility of iterative recombination. Recombination failures could be related to scale, where an inadequate number of cells were plated and screened, or perhaps to reconstitution of toxic gene combinations incompatible with host cell viability, as discussed below.

O O O O O O O O O O O O O O O O O O O O O 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 B 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 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 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 B 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 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 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 B O O O O O B 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 O O O 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 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 B I 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 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 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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


Tractability Results in the Block Algebra In this paper we define the notion of a block algebra, which is based upon a spatial application of Allen's interval algebra. In the Ô-dimensional Euclidean space, where Ô ½, we consider only blocks whose sides are parallel to the axes of some orthogonal basis. The block algebra consists of a set of relations (the block relations) together with the fundamental operations of composition, converse and intersection. The ½¿ Ô basic relations of this algebra constitute the exhaustive list of the relations possibly holding between two blocks. We are interested in the problem of testing the consistency of a set of spatial constraints between blocks, i.e. a block network. The consistency question for block networks is NP-complete. We first extend the notions of convexity and preconvexity to the block algebra. Similarly to the interval algebra case, convexity leads to a tractable set whereas, contrary to the interval algebra case, preconvexity leads to an intractable set. Nevertheless we characterize a tractable subset of the preconvex relations: the strongly preconvex relations. Moreover we show that strong preconvexity and ORD-Horn representability are the same. Qualitative temporal and spatial reasoning with constraints are important aspects of reasoning in many areas of Artificial Intelligence: geographical information systems, natural language understanding, specification and verification of programs and systems, temporal and spatial databases, temporal and spatial planning, document analysis, etc. Concerning temporal reasoning, Allen's interval algebra [1] is one of the most well-known and widely used formalisms. Allen takes intervals as primitive temporal entities and considers 13 basic relations between these intervals (see Figure 1 ). These basic relations represent all the possible relative positions of two intervals on the rational line. Temporal information is represented by binary constraint networks called interval networks, each constraint being defined by an interval relation (a disjunction of basic interval relations). Since the consistency problem of interval networks is NP-complete, a great deal of research has been done to find sets of interval relations whose consistency can be decided in polynomial time. In particular the convex subclass [18, 5] and the ORD-Horn subclass [17] are tractable sets whose consistency problem can be solved by the path-consistency method. Ligozat [12, 13] gives an alternative characterization of ORD-Horn relations in terms of preconvex relations. Preconvexity is defined from concepts such as the topological closure, the convex closure and the dimension of a relation. It is easy to determine whether an interval relation is preconvex. Moreover, Ligozat has produced an interesting proof of the tractability of the preconvex relations.. On the other hand, as far as qualitative spatial reasoning is concerned, a well-known approach is the region-based calculus called Region Connection Calculus (RCC) proposed by Randell, Cui and Cohn [21] . This approach is based on binary topological relations between spatial regions. Solving constraint networks in RCC is also an NP-complete problem. Re-cently, Renz and Nebel [23, 22] characterized tractable subclasses of region relations.. The real applications of RCC are numerous, however we note that with this calculus we cannot express relations such as directional relations (like 'a spatial entity is on the left of another spatial entity' or 'a spatial entity is above another spatial entity', etc.). That is the reason why -following our work in [2, 3] -we extend the interval algebra to any dimension Ô ½. This kind of approach has been used during the past few years [16, 11, 20, 19, 24] , nevertheless no complexity problems were examined in that line of work.. We consider blocks whose sides are parallel to the axes of some orthogonal basis in the Ô-dimensional Euclidean space. The formalism that we obtain -the block algebra formalism -provides a framework for representing and reasoning about spatial relations between those blocks. In the sequel, the term block will denote this kind of blocks. We will confine ourselves to the issue of the consistency of block networks which consist of sets of constraints between a finite number of blocks. Adapting the line of reasoning suggested by Ligozat [13] we extend the notions of convexity and preconvexity to block relations. We prove that, similarly to the interval algebra case, convexity leads to a tractable set whereas, contrary to the interval algebra case, preconvexity leads to an intractable set. Observing this, we define a subset of the block relations -the strongly preconvex relations -which we show to be tractable and for which the consistency problem can be decided by means of the path-consistency method and a new method: the weak path-consistency method. To close our study, we show that strongly preconvex relations coincide with ORD-Horn relations in the sense of Nebel and Bürckert [17] .. Section 2 is devoted to some reminders about the interval algebra and to the definition of the block algebra. In Section 3 we focus our attention on the notion of convexity while in Section 4 the main matter is the notion of preconvexity. Then in Section 5 we define the strongly preconvex block relations; we prove that these relations coincide with ORD-Horn ones in Section 6 and that they correspond to a tractable set in Section 7. We have defined the block algebra as a set of relations -the block relations -together with the fundamental operations of composition, converse and intersection, for every Ô ½ the dimension of the space). Adapting the line of reasoning suggested by Ligozat, we extended the concepts of convexity and preconvexity to the block algebra. In this paper, we proved that convexity leads to a tractable subset whereas for the general case, i.e. Ô ½, the consistency problem of the preconvex block networks is an NP-complete problem. We introduced the set of strongly preconvex relations which is larger than the set of convex relations and smaller than the set of preconvex relations, and we proved its tractability. We established the fact that the path-consistency algorithm as well as the weak path-consistency algorithm constitute decision methods for the consistency problem of strongly preconvex networks. We also showed that the strongly preconvex relations and the ORD-Horn relations (in the sense of Nebel and Bürckert [17] ) are the same set of relations. The problem of the maximality of this tractable subset remains an open problem. Usually to prove the maximality of a fragment of a relational algebra an extensive machine-generated analysis is used. Because of the huge size of ¾ Ô we cannot proceed in the same way. Another open question is concerned with the size of the set of strongly preconvex relations. We only know that there are many more strongly preconvex relations than convex block relations and block relations corresponding to the Cartesian product of preconvex interval relations. In another direction, the question also arises as to how the qualitative constraints we have been considering could be integrated into a more general setting to include metric constraints. In [8] we considered metric constraints of STPs [9] and proved that the consistency problem of the strongly preconvex block network augmented with these metric constraints is always polynomial. In conclusion let us indicate that we have implemented several algorithms (in particular the weak path-consistency method) to solve the consistency problem of strongly preconvex networks for Ô ¾ ½ ¾ ¿ .

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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 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 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 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 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 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 B I 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 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 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 O O O O O O O O O O B I O O O O O O O O O O O


Complete involutive rewriting systems 16S15 Finite generation, finite presentability, normal forms diamond lemma, term rewriting.16Z05 Computational aspects of associative rings.Given a monoid string rewriting system M , one way of obtaining a complete rewriting system for M is to use the classical Knuth-Bendix critical pairs completion algorithm. It is well known that this algorithm is equivalent to computing a noncommutative Gröbner basis for M . This article develops an alternative approach, using noncommutative involutive basis methods to obtain a complete involutive rewriting system for M . This corresponds to the S-polynomial x(xy 2 − 1) − (x 2 − 1)y 2 = y 2 − x in the Gröbner basis algorithm (Buchberger, 1998) . After all overlaps or S-polynomials have been considered, both algorithms terminate with the complete rewriting system M = rws({x, y}, {x 2 → ε, y 2 → x, xy → yx}) for M , so the monoid is the cyclic group of order 4.. In Evans (2005) , an alternative method of computing noncommutative Gröbner bases was proposed, using concepts from the theory of commutative involutive bases (Gerdt and Blinkov, 1998a) . We note that much of this theory (and its associated algorithms) carries over with few complications to the noncommutative case; it is the involutive divisions (such as the Janet division and the Pommaret division) that do not carry over, leading to the development of new noncommutative involutive divisions. In this paper we show how these new divisions are used to. give certain involutive rewriting systems, and how the techniques of noncommutative involutive bases are used to compute complete involutive rewriting systems.. One motivating factor for this work is the potential to obtain more efficient reduction paths with respect to complete involutive rewriting systems. To illustrate this, consider the tree of all possible ways of reducing the word xyxy to normal form using the complete rewriting system of Example 1.1.. { { w w w w w w w w w. { { w w w w w w w w w. | | y y y y y y y y y Compare the number of reductions needed above (between 3 and 5) to the two involutive reductions needed to involutively reduce the same word to normal form using the complete involutive rewriting system computed (later) in Example 3.8.

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 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 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


Scratch-pad memory allocation without compiler support for java applications ABSTRACT This paper presents the first scratch-pad memory allocation scheme that requires no compiler support for interpreted-language based applications. A scratch-pad memory (SPM) is a fast compiler-managed SRAM that replaces the hardware-managed cache. Its uses are motivated by its better realtime guarantees as compared to cache and by its significantly lower overheads in energy consumption, area and access time. Interpreted languages are languages such as Java that are interpreted by a runtime environment instead of being executed directly on hardware.All existing memory allocation schemes for SPM require compiler analysis to develop the allocation strategy. Specifically, existing allocation schemes for Java-based applications determine the allocations at compile-time. They then annotate the Java bytecodes with these allocation decisions for the Java Virtual Machine (JVM) to implement the actual allocation at runtime. These existing allocation schemes tie the resulting bytecode to specific SPM sizes, therefore preventing the applications from being portable to different SPM sizes. Further, existing methods do not work for unmodified third-party bytecodes produced by compilers other than their specialized compilers.In this paper, we propose the first ever SPM allocation scheme that is completely implemented inside the JVM. Our method requires no compiler support and works for unmodified bytecodes from any source. Moreover, unlike existing methods, it preserves the portability of bytecode to any SPM size. We investigate our method on the Sun Hotspot JVM on which we achieve a 27.8% improvement on runtime and 21.8% on energy saving versus not using the SPM -the only existing alternative for unmodified bytecodes. Embedded systems typically employ several memory technologies to combine their advantages. Non-volatile flash memory is often used for storing code. SRAM and DRAM are the two most common writable memories used for program data and for accelerating code access. SRAM is fast but expensive while DRAM is slower (by a factor of 10 to 100) but less expensive (by a factor of 20 or more). To combine their advantages, a large amount of DRAM is often used to provide low-cost capacity, along with a small-size SRAM to reduce run-time by storing frequently used data. The proper use of SRAM in embedded systems can result in significant run-time and energy gains compared to using DRAM alone. This gain is likely to increase in the future since the speed of SRAM is increasing by an average of 50% per year at a similar rate to processor speeds [7] versus only 7% a year for DRAM [15] .. There are two common ways of adding SRAM: either as a hardware-cache or a Scratch Pad Memory (SPM). In desktop systems, caches are the most popular approach. A cache dynamically stores a subset of the frequently used data or instructions in SRAM. Caches have been a great success for desktops because they are flexible enough to be used by any executable; a trend that is likely to continue in the future. On the other hand, in most embedded systems where code is often tied to particular implementations, the overheads of cache are less justifiable. Cache incurs a significant penalty in area cost, energy, hit latency and real-time guarantees. A detailed study [6] compares the tradeoffs of a cache as compared to a SPM. Their results show that a SPM has 34% smaller area and 40% lower power consumption than a cache memory of the same capacity. Further, the run-time with a SPM using a simple static knapsack-based [6] allocation algorithm was measured to be 18% better as compared to a cache. Thus, defying conventional wisdom, they found absolutely no advantage to using a cache, even in highend embedded systems where performance is important. Given the power, cost, performance and real-time advantages of SPM, it is not surprising that SPM is the most common form of SRAM in embedded CPUs today.. Examples of embedded processor families having SPM include low-end chips such as the Motorola MPC500, Analog Devices ADSP-21XX, Philips LPC2290; mid-grade chips like the Analog Devices ADSP-21160m, Atmel AT91-C140, ARM 968E-S, Hitachi M32R-32192, Infineon XC166 and high-end chips such as Analog Devices ADSP-TS201S, Hitachi SuperH-SH7050, and Motorola Dragonball; there are many others. Recent trends indicate that the dominance of SPM will likely consolidate further in the future [6, 30] , for regular as well as network processors.. A great variety of allocation schemes for SPM have been proposed in the last decade [5, 6, 8, 29, 39, 41] ; more are listed in the related work. They can be categorized into static methods, where the selection of objects in SPM does not change at run time; and dynamic methods, where the selection of memory objects in SPM can change during runtime to fit the program's dynamic behavior. Even in dynamic methods, to avoid allocation overhead at run-time, the changes of SPM allocation across different program portions is usually determined at compile-time in most successful methods, leading to statically decided dynamic methods. Most existing methods can place code, global, and stack objects in SPM. Heap objects are more challenging to orchestrate in statically decided methods; however, the first method to successfully place heap objects in SPM has recently appeared [8] .. A limitation of all the above existing SPM allocation methods is that they are compile-time methods meant for compiled languages only, such as C and C++. It is not apparent how they can be adapted to interpreted languages, such as Java. Some background is in order. In interpreted languages, a high-level source language program is compiled not into machine code, but into an architecture-independent format. In the case of Java, this format is called Java bytecode. Such bytecode is interpreted by a software called a Java Virtual Machine (JVM). Although interpretation adds overhead, this overhead is reduced by a Just-In-Time (JIT) compiler that translates frequently run code methods into machine code. JIT compilation has the advantage that it can tailor the code to the exact resources available on the client device; for this reason, Java programs now run nearly as fast as their C++ counterparts, and sometimes exceed their performance [21] . Given Java's competitive performance, and because Java bytecode is portable across platforms, Java is becoming increasingly common in embedded systems. For example, a majority of cell phones today are Java-enabled. Indeed many third-party software titles are available for download for mobile phones [11, 12, 14, 19, 37] . Sun microsystem's market-leading Java platform is available in both Standard Edition (J2SE) and Micro-edition (J2ME) versions, for desktops and resource-limited embedded systems, respectively. However, embedded systems have been deployed with the standard edition as well [25] .. With this background, we can identify at least three reasons why existing methods for SPM allocation cannot handle Java applications. First, low-level details such as memory allocation purposely are not expressible in java bytecode, which is meant to be platformindependent. Hence if a Java-to-bytecode compiler did SPM allocation, it would have no way to express the allocation results in the bytecode. Consequently, SPM allocation for Java programs must be done in the JVM. Second, even if a method were to be found for expressing memory allocation in bytecode, that bytecode would not be portable to devices with a different size of SPM. This would defeat the key portability advantage of Java. Third, existing SPM allocation methods are have primarily been targeted to C, and deal with code, global, stack and heap data. Java programs have different types of data with different characteristics than C programs, such as the method stack, the operand stack, static class variables, instance-based class variables and method code. It is not immediately apparent how they should be handled by methods for C.. We present the first method in the literature for allocating data in Java programs to SPM that is applicable to unmodified Java bytecode from any source. This is because the method is implemented entirely inside the JVM, and makes no assumptions about the input bytecode. Our method first collects profile data on the access frequencies of various objects inside of the JVM. This is done to discover the most frequently accessed objects, which are the best candidates for SPM allocation. Next, our method discovers the size of the SPM on the particular device the JVM is running on by making a call to the operating system from the JVM. Subsequently, it analyzes the different types of data in the running Java application, and decides their allocation to JVM. Finally it implements this allocation by moving the objects in question to SPM during run-time, and updating their address tables inside the JVM. The result is a java application that is faster and consumes less energy, since it allocates frequent code and data to SPM.. The rest of the paper is organized as follows. Section 2 overviews different related works. Section 3 discusses our method in detail. It dicusses about the characteristics of each memory objects and how we choose them as candidates for SPM allocation from subsection 3.1 through 3.4. Section 4 discuss about how we run the profiling process for each memory-objects candidate inside the JVM. Section 5 describes the SPM allocator. Subsection 5.1 discusses the processing of profile data. Subsection 5.2 discusses the calculation process for allocation bin sizes. Subsection 5.3 discusses the allocation policy implemented inside the JVM. Section 6 presents the experimental environment, benchmarks properties, and our method's results. Section 7 compares our method with systems having caches in various architectures. Section 8 concludes. As Java is becoming more and more widespread in the embedded systems, especially in mobile devices, SPM allocation for Javabased programs is becoming increasingly important. In this paper, we introduce the first SPM allocation technique for Java applications that requires no compile-time support or bytecode modifications. This means that our method can improve third-party applications compiled with any compiler, rather than only applications compiled with specialized compilers suggested by existing methods in research. Our method is able to consider both code objects and data objects, including heap, stack, and static class objects for SPM allocation. Our proposed method is also able to share memory between stack objects that have mutually disjoint life-times. 2 Caches improve average-case performance, but for most memory accesses, the worst case is a miss -this severely degrades real-time bounds. SPM allocation strategies for code, globals and stack are usually predictable in that the contents of SPM are precisely known at any program point; thus average case and worst case numbers are the same for SPM. This is not true for Heap data since the precise objects actually in SPM are not predictable at compile-time in our method; however most of our gain is for non-heap data. The careful quantitative study in [44] found that despite using the stateof-the-art AbsInt tool [1] for cache worst-case prediction, widely recognized as the best available, for their benchmarks, the real-time bounds with cache were up to 3-4X worse than with SPM. Our results indicate that on average, the proposed method achieves a 27.8% net speedup compared to a no-SPM allocation. This speedup is after a 9.2% runtime overhead. The overhead is mainly due the profiling stage at runtime. In future work, we plan to study different methods for reducing this overhead. This section presents experimental results by comparing our proposed scheme against a no-SPM allocation method, which is the only other option for Java programs on processors with SPM. Since our scheme is the first SPM allocation scheme for Java applications Future work may include further comparisons with related work in executed environments to evaluate the differences in advantages and disadvantages of the two types. Experimental Environment In our initial experiments we have modified the industry-leading Sun HotSpot JVM to implement our methods. The JVM is then simulated by GDB for ARM v5e embedded processor family [3] to collect statistics. An external DRAM with 20-cycle latency, Flash memory with 10-cycle latency, and an internal SRAM (SPM) with 1-cycle latency are simulated. The memory latencies assumed for Flash and DRAM are representative of those in modern embedded systems [10, 20] . Data is placed in DRAM and code in Flash memory. Code is most commonly placed in Flash memory today when it needs to be downloaded. A set of most frequently used data and code is greedily allocated to SPM by our compiler. The SRAM size is configured to be 20% of the total data size in the program. This percentage is varied in additional experiments. The benchmarks' characteristics are shown in table 1. There are many existing methods for SPM allocation that have studied and demonstrated the advantages of SPMs. Most of these methods are for executed code environments, such as those arising from languages such as C or C++, where application binaries are executed directly on the hardware. A few methods are for interpreted languages, such as Java, where application bytecodes are interpreted by a run-time system instead. Compile-time methods for executed environments In executed environments, SPM allocators are mostly compile-time methods that require toolchain support to make allocation decisions at compile-time. They can be further categorized into static methods and dynamic methods.. Static methods are those whose SPM allocation does not change after the initial allocation [4-6, 16, 29, 32, 33] . Some of these methods [6, 29, 32] are restricted to allocating only global variables to SPM, while others [4, 5, 16, 33] can allocate both global and stack variables to SPM. These static allocation methods either use greedy strategies to find an efficient solution, or model the problem as a knapsack problem or an integer-linear programming problem (ILP) to find an optimal solution. Some of the other static allocation methods [2, 40] aim to allocate code to SPM rather than data; while others [35, 42] can allocate both code and data.. Dynamic methods are those which can change the SPM allocation during run-time [8, 13, 26, 27, 34, 38, 39, 41] . The method in [26] can place global and stack arrays accessed through affine functions of enclosing loop induction variables in SPM. The method in [38] allocates global and stack data to SPM dynamically, with explicit compiler-inserted copying code that copies data between slow memory and SPM when profitable. All dynamic data movement decisions are made at compile-time based on profile information. The method in [41] is a dynamic method that allocates code as well as global and stack data. It uses an ILP formulation for deriving an allocation. The work in [39] also allocates code and data, but using a polynomial-time heuristic. A more complete discussion of the above schemes can be found in [39] . The method in [8] is the first dynamic SPM allocation method to place a portion of the heap data in the SPM.. Our proposed method is inspired by some of the above methods, most notably [5] . However it adapts those compile-time methods to a Java environment where the profiling and allocation are done at run-time instead, and where the types of data are substantially different than in C programs. Run-time SPM allocations in executed environment As far as we know, there are no existing successful run-time-only methods for SPM allocation for executed environments. The only run-timeonly methods proposed so far have been software caching methods, which have largely not been successful. Software caching [13, 17, 27] emulates a cache in SRAM using software. The tag, data and valid bits are all managed by compiler-inserted code at each memory access. Significant software overhead is incurred to manage these fields, though the compiler already optimizes away some [17, 27] . All these schemes have a fundamental failing -just like a hardware cache, they have poor real-time guarantees, since in any type of cache, cache hits are the common case, but cache misses are the worst case. Cache misses degrade the worst-case execution time significantly compared to the average-case time. This defeats the primary reason for using SPM, which is to improve real-time bounds vs. caches. Moreover, existing software caching schemes have large overheads in managing the cache's fields. Consequently software caching has been widely recognized as a failure, and most recent works have focused on earlier-mentioned compiletime methods.. Unlike software caching, our proposed scheme delivers predictable run-times for any unmodified interpreted codes, and hence good real-time bounds. Further, there is no per-memory-access overhead; instead the overhead is introduced only during the profiling period of the program (which could be off-line) and never afterwards. SPM utilization in interpreted environment For environments such as Java where codes are interpreted by a run-time system, we found little related work that utilizes the SPM. The method by Tomar, Kim and others in [22, 36] allocates only heap objects to SPM, and requires compiler support. Their Java compiler collects profile information, and then inserts annotations in the Java bytecode containing this information. The JVM is also modified to preferentially place annotated objects to SPM. The method in [22, 36] has at least the following three drawbacks compared to our SPM allocator for Java. First, their method applies only to Java bytecodes produced by their specialized compiler; unlike our method, in which the JVM can optimize unmodified bytecodes produced by any compiler. This is an enormous practical advantage in that our method does not require worldwide adoption of a Java compiler technology and annotation standard; instead a user can see benefits on existing bytecodes on day one, independent of adoption by others. Second, their methods can place only heap data in SPM; our methods can additionally place code, static class objects, and stack objects in SPM. This greatly expands the benefits of SPM since code objects in particular tend to be the most frequently used of all objects; others are also often frequently used. Third, their method requires a modified software toolchain comprising a modified compiler and added external instrumentation tools; thus it is no longer transparent to the development environment. Our method leaves the software toolchain unchanged; only the run-time system (JVM) needs modification.. Other related work such as [23] demonstrates the advantages of locality of small objects in Java applications by employing a garbage collector in a design with caches and SPM. In this method, small long-lived heap objects are mapped to SPM to reduce the memory traffic between the cache system and the main memory. This is a very specialized use of SPM and its benefits are mostly orthogonal from our method.

B B I O B O O B O O O O O O O B B I O O O O B 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 O O O O O O O O B I 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 B 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 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 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 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 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 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 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 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 B O O O O B 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 B B 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 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 B 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 B 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 B O O O O O O B I O O O O O B 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 B 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 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 B 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 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 B 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 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 O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O 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 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 B 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 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 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 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 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 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 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 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 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 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 B O O B B 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 B O O O O O O B O O O O O B 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 B 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 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 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 O O O O O O O O


Data-driven biped control Figure 1: Our data-driven controller allows the physically-simulated biped character to reproduce challenging motor skills captured in motion data.We present a dynamic controller to physically simulate underactuated three-dimensional full-body biped locomotion. Our datadriven controller takes motion capture reference data to reproduce realistic human locomotion through realtime physically based simulation. The key idea is modulating the reference trajectory continuously and seamlessly such that even a simple dynamic tracking controller can follow the reference trajectory while maintaining its balance. In our framework, biped control can be facilitated by a large array of existing data-driven animation techniques because our controller can take a stream of reference data generated on-thefly at runtime. We demonstrate the effectiveness of our approach through examples that allow bipeds to turn, spin, and walk while steering its direction interactively. Physically simulating under-actuated biped locomotion has been a notorious challenge in computer graphics for two decades. Most of early biped controllers were either manually designed and handtuned or relying on optimization with energy-minimizing objectives. Though some of those controllers are very robust, they tend to result in stereotyped gaits often looking robotic and lifeless. SIMBICON is an exemplar of manually-crafted biped controllers, which is simple, easy-to-implement, and remarkably robust [Yin et al. 2007] . Its robustness allowed it to be employed in further challenges such as controller adaptation , composition [Coros et al. 2009 ] and stepping planning . However, it is also true that SIMBICON generates stereotyped, marching-like gaits.. Recently, motion capture data were employed to achieve natural and realistic locomotion from physically based controllers. Reference-tracking controllers pose yet other challenges such as collecting physically-feasible training data and developing robust feedback control algorithms for the tracking of reference trajectories and the maintenance of balance.. Our goal is to build full-body, three-dimensional locomotion controllers those are as simple and robust as SIMBICON, and still can faithfully reproduce natural and realistic locomotion guided by reference motion capture data. Our data-driven controllers can generate a variety of locomotor behaviors, such as turning and spinning. The key challenge of our approach is modulating a continuous stream of reference data in a seamless way while synchronizing with forward dynamic simulation. Reference-tracking controllers often fail when the swing foot lands on the ground earlier/later than the reference data indicates. Because the ground reaction force is the only source of control to balance under-actuated bipeds, unexpected changes in ground contacts could easily drive the controllers to unrecoverable failure states. In this paper, we show that carefully synchronizing the reference trajectory and the simulated biped at contact changes in a feedback loop allows us to achieve both the robustness of feedback controllers and the quality of motion capture data simultaneously.. The biggest advantage of our approach is that physically based control can be facilitated by a large array of existing data-driven animation techniques. Our biped controllers are equipped with a datadriven animation engine at the front end. The data-driven engine generates a sequence of movement patterns by editing [Lee and Shin 1999; Kim et al. 2009 ], blending [Rose et al. 1998 ], retargetting [Gleicher 1998 ], and composing [Lee et al. 2002; Kovar et al. 2002] motion fragments in the database. In this framework, the role of dynamic controllers can be greatly simplified, that is, tracking reference trajectories. We will demonstrate the effectiveness of our approach through examples that allow bipeds to turn, spin, and walk while steering its direction interactively.. Biped controllers have extensively been explored in computer graphics and robotics. Hodgins and her colleagues presented manually designed biped controllers for highly-dynamic athletic motor skills, such as running, jumping, and bicycling [Hodgins et al. 1995] . Their controllers were equipped with finite state machines for phase transition control and a feedback balancing mechanism based on step placements. van de Panne and his colleagues have extensively studied the design of biped and quadruped controllers. Most notably among them, SIMBICON is a robust, threedimensional walking controller employing a series of key-poses to shape a reference trajectory and a step-based feedback loop to follow the reference trajectory [Yin et al. 2007 ]. Robust walking controllers can also be acquired by approximating bipeds with simplified inverted pendulums, which allow a guaranteed balancing strategy in a closed-form solution Tsai et al. 2009 ]. Those walking controllers tend to raise their swing feet higher and keep them in the air longer than natural human walking. Their robustness partly comes from the tendency of extended swing phases, which allows more flexibility in step placements for balancing.. Optimization has served as a key methodology in biped controller design. Hodgins and Pollard [1997] adapted existing controllers to new characters of different scales by searching control parameters via simulated annealing. This type of optimization is a very challenging problem because each controller has a lot of parameters to tune and the objectives are highly non-linear. The continuation method employed by Yin et al. [2008] addressed a difficult controller-adaptation problem by solving a progressive sequence of problems that trace a path from a solved problem to the target unsolved problem. Wang et al. [2009] optimized SIMBICON controllers to allow more human-like gaits using biomechanicallymotivated objective functions. Control policy searching techniques have also been used to learn walking controllers of physical robots [Morimoto et al. 2003; Tedrake et al. 2004] . It should be noted that our research goal is different than trajectory optimization [Liu and Popović 2002; Fang and Pollard 2003; Safonova et al. 2004; Wampler and Popović 2009] , which attempts to find a specific trajectory of motion minimizing energy consumption subject to user constraints.. Once a collection of robust controllers are acquired, high-level control over biped behaviors is desired. Faloutsos and van de Panne [2001] discussed the precondition and postcondition of individual controllers to make transition between controllers. Integrated controllers equipped with various motor skills have been employed to clear stepping stones and steer through obstacles [Coros et al. 2009 ]. da Silva et al. [2009] studied a combination of controllers to create inbetween controllers and coordinate the operation of multiple controllers.. Several biped controllers have been supplemented with the realism of motion capture data. To circumvent the difficulty of balance control, some controllers allow only the upper-body to be driven by motion capture data while the lower-body is either fixed or controlled by a conventional balance controller [Zordan and Hodgins 2002; Nakaoka et al. 2003 ]. Data-driven control of two-dimensional biped locomotion was first addressed by Sok et al. [2007] . They pointed out that motion capture data are physically inaccurate and rectified motion capture data to make them physically plausible using spacetime optimization. They also demonstrated that even very simple regression and tracking methods can generate stable biped walking, running and jumping when they are combined with physically plausible reference data. da Silva et al. [2008b] developed three-dimensional walking controllers that exhibit improved robustness and stability. Their controller employed short-horizon tracking and quadratic programming to maintain biped balance. This idea In robotics, biped humanoid robots are often driven by oscillatory movement pattern generators described by differential equations. Several researchers have explored a strategy to synchronize reference movement patterns and an actual humanoid via phase resetting [Nakanishi et al. 2004; Nakanishi et al. 2006 ]. Phase resetting is conceptually similar to our synchronization method, though our controller can deal with realistic motion capture references that necessitate coordinated movements of many actuated joints (upto 42 degrees of freedom in our experiments).. Comparing to previous data-driven controllers, our controller requires neither any precomputed control model (such as regression models, LQR, or NQR) nor non-linear optimization (such as quadratic programming). The model-free approach allows our controllers to take any reference trajectory generated on-the-fly at runtime. It also allows us to decouple the data-driven animation engine and physically based controllers. Therefore, any existing datadriven techniques can be used to actuate and drive physically simulated bipeds without any restriction or precomputation. Our controller does not require the derivative evaluation of equations of motion or a non-linear optimization solver. This makes our controller easy-to-implement and computationally efficient. Biped control requires two essential mechanisms for shaping trajectories and robust balancing/tracking control. Our work is perhaps emphasizing the importance of trajectory shaping. Motion capture reference data allowed our controller to generate realistic human locomotion. Even balance control was achieved in a datadriven manner by modulating reference trajectories. Presumably, advanced control methodologies would improve our work in several directions. Regression-based approaches [Sok et al. 2007 ] would allow us to represent natural variations of locomotion in statistical models, which would cope with variations in environments and simulation conditions. Advanced optimal control methods, such as LQR [da Silva et al. 2008a] and NQR [Muico et al. 2009 ], would allow less stiff systems for tracking control. Even with such expected advantages, we were unable to employ sophisticated control methods because those methods require all reference data be prepared for preprocessing. No reference data generated on-the-fly could be fed into the controller. This restricts the flexibility and versatility of biped control. Designing robust model-free controllers would be an important advance in biped control. We can also think of online model learning that builds a control model incrementally at runtime.. Our controller is more robust if it sacrifices its motion quality by maintaining the direction of the stance foot to match the angle of the ground surface while in contact. It means our controller becomes less robust with more natural stance phases including heel-strike, midstance, and toe-off. In our push experiments, a controller with its stance foot angle fixed with respect to the ground tends to withstand stronger pushes by 10N to 20N. A similar observation was reported by Wang et al. [2009] . The loss of robustness is probably related to inaccurate modeling of the foot. Since our foot model is rigid, it usually have a small contact region on which ground reaction forces are applied. This makes the stance foot to wobble in the simulation. More realistic foot models might improve the robustness of our controller.. Ideally, reference motion data should be physically feasible for best tracking performance, though motion capture data are in general physically imprecise. Some of previous approaches [Sok et al. 2007; Muico et al. 2009 ] preprocessed motion data to make them physically feasible via spacetime optimization. Spacetime optimization of three-dimensional, full-body motion data is notorious for its challenging nature of numerical instability and heavy computational burden. We did not employ such optimization in our experiments because our feedback rules worked effectively with our test data. However, we suspect that optimized reference data would allow our controller to be more robust and to follow the reference data more precisely. The optimization of reference data would be particularly important if motion data need to be warped, blended, and retargetted.. We have experimented mostly with locomotion data. Controlling and simulating a wider spectrum of human motions will be an exciting avenue for future research. We anticipate that we will see compelling biped characters equipped with a variety of motor skills spanning from low-energy locomotion to highly-dynamic dancing and athletic skills that build on data-driven control techniques such as those presented here. All motion data in our experiments were originally captured using a Vicon optical motion capture system at the rate of 120 frames/second and then down-sampled to 30 frames/second. Motion data include walking in a variety of different speeds, turning angles and styles. We also captured sharp U-turning and spinning. We lifted up the swing foot trajectory slightly in the motion data of turning, spinning and interactive control examples which have low step height. We set dynamics and integrator parameters to achieve robust simulation in a conservative manner while maintaining the performance of realtime simulation at the rate of 30 frames/second. The ground reaction is modeled as a damped spring. Parameters were manually tuned for each motion data. Parameter tuning was not formidable because each parameter has an intuitive meaning and many of gains are simply constant for all motion data. Most of motion data can be stably reproduced for a wide range of parameter choices excepting for several very challenging examples, such as spinning, which requires careful parameter tuning (see the accompanied video). Most of our controllers generated stable cycles and became resilient to mild pushes without position feedbacks, that is, c2 = c4 = 0. Without external perturbation, the velocity feedback alone allows the reference trajectory to be followed closely and thus the position feedback has nothing to do with balancing. However, external pushes would make the simulation to deviate from the reference trajectory and the position feedback would play an important role. Therefore, we first tune c1 and c3 to achieve stable cycles without any external perturbation and then tune c2 and c4 later in the presence of random pushes at the center of mass.. Locomotion Control. Our biped character is able to reproduce various gaits of human walking (see Figure 6 ). Each motion clip recorded a subject standing still, starting to walk, taking 6 to 8 steps, Figure 6 : Data-driven biped simulation from motion capture data including (top to bottom) WalkForwardNormal, WalkBrisk, WalkMarch, WalkBackward, U-turn, and Spin.. and then stopping. Representing motion data as a motion graph allows us to produce an arbitrarily long sequence of locomotion by splicing walking steps. Our biped can track an arbitrary combination of locomotion steps including slow/fast walking, turning of different angles, and different gaits.. Effects of Individual Components. Our controller consists of several components for balancing, tracking, and synchronization. Disabling any of these components would result in either falling over in several steps or the degradation in motion quality. We evaluated the effect of each component by disabling each one at a time for a variety of walking data:. • Disabling synchronization always leads to falling over in 3 to 6 steps.. • Disabling the feedback on a stance hip makes the torso to lean and eventually leads to falling over in 2 to 4 steps.. • Disabling the feedback on a swing hip makes the character to lean to one side and eventually leads to falling over in 6 to 10 steps.. • Disabling the feedback on a stance ankle or swing foot height managed to avoid falling over for some gaits, but the motion looks unnatural.. Robustness under Various Conditions. We tested our walking controller on varied simulation conditions to evaluate its robustness (see Figure 7) . Our controller generated stable cycles of walking for up to 15 Kg of extra weight on one leg, 50% longer legs, 50% shorter legs, one leg 3% shorter than the other, up and down slopes up to 6 and 4 degrees respectively, 60% to 1200% variations of friction coefficients. These numbers were acquired from the same reference data and the same parameters with those used in walking examples. The limits can be significantly improved if we adapt the Robustness to Pushes. We quantified the robustness to external disturbances with push experiments similar to Wang et al. [2009] . The body mass and simulation coefficients were set to match those of SIMBICON [Yin et al. 2007 ] as much as we could. However, we were unable to conduct the comparison test under the exactly same condition. Once the biped entered into stable cycles, we applied forces of 0.4 seconds duration to the center of mass of torso once every 4 seconds for 40 seconds. Interactive Control. Our model-free approach allows us to blend a set of motion data on-the-fly and feed inbetween data to the controller. The feedback gains are also interpolated at the same ratio as motion data. The motion set includes turning in 90, 135, and 180 degrees, straight walking at normal/fast speeds and two different gaits. Motion blending and transitioning are computed in the datadriven animation engine and our controller simply tracks a stream of reference data generated at the animation engine. Our biped character can steer in arbitrary turning angles, change its speed, and make transition between different gaits. The user can control the biped character interactively by specifying walking direction, speed and a type of gaits through simple user interfaces. Our controller allows the biped to respond to external perturbations, such as intentional pushes and collision with stacked boxes (see Figure 8 ).

O O O O O O O O O O O O O O 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 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 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 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 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 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 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 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 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 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 B I 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 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