Design of dynamic load-balancing tools for parallel applications The design of general-purpose dynamic load-balancing tools for parallel applications is more challenging than the design of static partitioning tools. Both algorithmic and software engineering issues arise. We have addressed many of these issues in the design of the Zoltan dynamic load-balancing library. Zoltan has an objectoriented interface that makes it easy to use and provides separation between the application and the load-balancing algorithms. It contains a suite of dynamic load-balancingalgorithms, including both geometric and graph-based algorithms. Its design makes it valuable both as a partitioning tool for a variety of applications and as a research test-bed for new algorithmic development. In this paper, we describe Zoltan's design and demonstrate its use in an unstructured-mesh finite element application. We have described many of the problems involved in designing general-purpose dynamic load-balancing tools and demonstrated solutions in the implementation of the Zoltan library. Zoltan's object-oriented interface provides separation between the data structures of applications and load-balancing algorithms, enabling the library to be used by a wide variety of applications. In experiments, we showed that the overhead involved with this approach is small compared to the time required to compute a new decomposition. Zoltan contains a suite of load-balancing methods, including both geometric and graph-based methods. This tool-kit approach has advantages for both application developers and researchers. By providing a number of different types of algorithms, Zoltan allows application developers to experiment easily to find the best methods for their applications. For researchers, Zoltan enables easy incorporation of new algorithms and provides good implementations of standard algorithms to which fair comparisons may be made.. In static partitioning, comparisons of algorithms are performed based on their execution times and quality of partition (measured by the partition's load distribution and communication costs).. Comparisons of dynamic load-balancing algorithms, however, must also account for the data migration costs of a new partition. Using Zoltan, we will investigate the relative importance of partition quality, time to compute new partitions, and data migration costs in a number of applications. For some applications, lower-quality partitions may be acceptable if data migration costs can be minimized. Other applications may perform better with high-quality partitions, regardless of the cost of obtaining them. Zoltan's design enables such comparisons. Since it includes a suite of methods, many different methods can be tried in a single application. And because it is easy to incorporate Zoltan in new applications, load-balancing algorithms' performance can be analyzed in different types of simulations.. Heterogeneous computing architectures create new challenges in dynamic load balancing. Partitioning algorithms must account for widely varying processor powers, themory capacities, and network connections to correctly balance load, prevent memory overflows, and reduce communication over slow-speed network links. Even the use of static partitioners as pre..processors is ineffective in such systems. Instead, a simulation must obtain a set of processors, determine the characteristics of the processors and network, partition based on those characteristics and then execute. Tools and algorithms will be needed to provide this capability. Migration of nodes, dements, and faces. application data in an attempt to create partitions having equal execution times and communicating mostly across fast network links. Karypis, Schloegel and Kumar will incorporate the model into the ParMETIS library [13] which provides graph-partitioning capabilities in Zoltan. We will incorporate the model into other existing algorithms in Zoltan and will use the model in the design of new algorithms specifically for heterogeneous architectures.

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


A Event Occurrence Rules based Compact Modeling Formalism for a Class of Discrete Event Systems The analysis, failure diagnosis and control of discrete event systems (DESs) requires an accurate model of the system. In this paper we present a methodology which makes the task of modeling DESs considerably less cumbersome, less error prone, and more user-friendly than it usually is. In doing so we simplify the modeling formalism of [5, 4] , proposed for obtaining valid models of complex discrete event systems, by eliminating "precedence relations", and capturing them as part of the "event occurrence rules". Under the new modeling formalism the size of the system model is polynomial in the number of signals; whereas the number of states in the commonly used automata models is exponential in the number of signals. We present automated techniques for deriving an automaton model from the model in the proposed formalism. We illustrate the modeling formalism using examples drawn from manufacturing and process control systems. Most man made systems are discrete event systems (DESs) owing to the manner in which they evolve: In response to events that are spontaneous, instantaneous, asynchronous (thus discrete in nature). There exist numerous types of models of DESs which include automata based models [10] , boolean models [1] , and polynomial representations [6] . [12] provides a survey of modeling and analysis methods such as Temporal Logic, Calculus of Events, Petri Nets and Minimax Algebra. Logic based systems and automatic theorem proving have been used for the development of logic controllers [2] for DESs, which uses a logic based approach to find the final state starting from an initial state.. Modeling of DESs continues to pose a challenge to control system designers. If one attempts to include all the details of the system in a single model it is generally prone to errors as the size of the state space grows exponentially with the number of signals in the system. For this reason modular construction of the system is frequently attempted where sub-models are first built, and then combined through a suitable composition mechanism in order to obtain the overall model. It is naturally desired that all the relevant detail is present in the system model obtained from the composition of these sub-models, and additionally no extraneous behavior results.. Modeling of systems is used for a variety of reasons including diagnosis. For diagnosing failures, observations of the real system are compared with the predictions of a model for identifying faulty conditions. Sampath et al. have proposed a formal language framework for studying diagnosability properties of untimed discrete event systems [11] . A template based approach for fault monitoring of automated manufacturing systems using the timing and sequencing of events has been developed by Holloway [8] .. Once a model of the system has been obtained, it can also be used for the purposes of control. Ramadge and Wonham [10] introduced supervisory control theory (SCT) for discrete event systems [9, 3] , where they employed an automaton model of the system, called a plant, and studied how another automaton, called a supervisor, can be employed to restrict its behavior. The control specifications which express the constrains that one wishes to impose on the system's behavior are modeled as automata or equivalently as formal languages. A supervisor exercises control over the system by dynamically disallowing a minimal set of controllable events so as to achieve the desired specifications. Since SCT relies exclusively on automata for representing both the system and its control specifications, developing easier techniques for obtaining accurate automata models of them is necessary.. With the use of models being essential for the purposes of fault analysis and control, devising systematic and easy methods for obtaining models of the system is a necessity. In [5, 4] , a technique for obtaining the automata models of DESs was proposed which made the task of modeling considerably easier. For a system consisting of binary valued input and output signals, in which the state of the system is determined solely by the values of input and output signals, a modeling formalism was proposed which yielded a model description polynomial in the number of signals. The model was described in terms of initial conditions, weighted sensor event occurrence rules, and precedence relations. This work simplifies the modeling formalism of [5, 4] by eliminating precedence relations among output events, by capturing them as part of the even occurrence rules. Further the procedure of automatic derivation of an equivalent automaton model is considerably simplified through to the use of interacting extended automata. The compact modeling formalism proposed here makes the modeling process considerably simpler, is less error-prone, more user-friendly, scalable, flexible and reconfigurable.. For modeling purposes we take an input/output view of the system. The input signals of the system constitute the independent variables, and output signals the dependent variables.. Input signals are permitted to change their values depending only on their own present values; whereas output signals change their values based on their own values and values of other signals. The model in our framework relies on establishing enabling or guard conditions for each event, where an event is a transition of a signal from one binary value to another. We start by establishing the initial conditions of the system signals. Next, for each of the output events of the system, we obtain event occurrence rules involving boolean constraints over all the signals of the system. In a similar way event occurrence rules for all the input events of the system are obtained, which are simply given by default rules capturing that input signals alternate between their binary values, regardless of the values of the other signals.. Once the rules for all the output and input events of the system has been obtained, we provide an algorithm for translating the rules based model into an equivalent automaton model of the system. We first represent the system as a composition of a set of 2-state interacting extended automata, one automata for each of the binary valued signals (both input and output) of the system. The enabling conditions present in the event occurrence rules are associated as guards with transitions in the 2-state extended automata models. A composition of the interacting extended automata yields the desired automaton model.. The representation of the system in our formalism is polynomial in the size of signals, in contrast to the automata models whose state space are exponential in the size of signals, and thus are immensely difficult to construct. This compactness of the proposed model, together with its intuitive nature, makes it user-friendly, less error-prone, more flexible, easily scalable, and provides canonicity of representation.. The rest of the paper is organized as follows: In Section 2 the preliminaries related to modeling DESs are discussed, which is followed by a motivating manufacturing system example in Section 3 for illustrating the issued involved in modeling DESs. Section 4 introduces the proposed rule based modeling formalism, and an algorithm is given in Section 5 for converting the rule based model to an equivalent automaton model. In Section 6 the modeling formalism is extended to model systems which have DES abstractions and the formalism in this setting is illustrated using examples drawn from process control systems. The flexibility offered by the proposed modeling formalism is illustrated by reconfiguring the process control system in various ways. Section 7 provides conclusions and directions for future research.

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


Tank monitoring: a pAMN case study Abstract. The introduction of probabilistic behaviour into the B-method is a recent development. In addition to allowing probabilistic behaviour to be modelled, the relationship between expected values of the machine state can be expressed and verified. This paper explores the application of probabilistic B to a simple case study: tracking the volume of liquid held in a tank by measuring the flow of liquid into it. The flow can change as time progresses, and sensors are used to measure the flow with some degree of accuracy and reliability, modelled as non-deterministic and probabilistic behaviour respectively. At the specification level, the analysis is concerned with the expectation clause in the probabilistic B machine and its consistency with machine operations. At the refinement level, refinement and equivalence laws on probabilistic GSL are used to establish that a particular design of sensors delivers the required level of reliability. This paper explores the application of probabilistic B to a simple case study: tracking the volume of liquid held in a tank by measuring the liquid flow into it. The flow can change as time progresses. Sensors with a given reliability are used to measure the flow and provide information to the system, so there is a small probability that the sensors will fail, giving an incorrect reading. The behaviour of the sensors is described using probabilistic B. We include the tank explicitly in our model so that we can describe the relationship between the actual volume of liquid it contains and our system's measurement for it. As well as probabilistic behaviour, our system exhibits nondeterministic behaviour in the reading that a failed sensor will give, and (after the first scenario we consider) in the reading that a correctly working sensor will give: any value from a particular range. Thus the case study explores the interaction between probabilistic and nondeterministic behaviour.. The case study is concerned with two stages of the development process: specification, and refinement. At the specification level we are concerned with obtaining bounds on the accuracy of the system's value for the volume of liquid in the tank, given a particular level of reliability for the combination of sensors providing the readings. This analysis will be concerned with the expectation clause in the probabilistic B machine. At the refinement level, we are concerned with establishing that a particular combination of sensors does indeed deliver the required level of reliability. This analysis will make use of refinement and equivalence laws. This paper is a full version of the work presented in [STRT05] .. The paper is structured as follows: we introduce the background approach and notation in Sects. 2 and 3. Section 4 introduces the Tank case study. Section 5 introduces an initial approach to specification and refinement of a monitoring system for the Tank, introducing error margins on sensor readings of the tank. By progressively introducing more uncertainty, we investigate the significance to the specification of the possible flows of liquid 310 S. Schneider et al. To give a semantics to pGSL programs, we make use of expectations: bounded non-negative real-valued functions of the state space. These are generally expressed as formulas over the state variables. The weakest preexpectation semantics for a program prog maps an expectation exp to another expectation [prog] exp, analogous to weakest precondition semantics. It gives the expected value for exp after prog in terms of expectations on the state before. The language and its semantics from [Mor98] is given in Fig. 1 .. In this paper we will use a derived operator (also given in [Abr96a] ) for assigning to a variable some element chosen nondeterministically from a set S. We define x :∈ S @y.(y ∈ S ⇒ x : y) This first example has illustrated several points:. • The expected value of the machine expectation expression should be non-decreasing on every occurrence of the operation.. • However, the actual value of the machine expectation expression can decrease on some operation calls (provided its expected value does not).. • Expectations can be used to express a relationship between the expected values of state variables, in our case providing a range for the expected value of volume in terms of the expected value of rvolume. This is checked as part of machine consistency, and is independent of any particular implementation.. • The accuracy of the approximation rvolume to the tank value volume depends not only on the probability of an incorrect reading, but also on the ratio between minflow and maxflow, since this affects the maximum possible error in rvolume.. • Probabilistic operations can be implemented using combinations of probabilistic components (sensors) in the way we would expect. Such implementations need only be checked for refinement against the machine descriptions of the operations. The machine consistency checks ensure that the machine operations provide the overall requirements on the expectations.. This second example illustrates several points:. • We can specify error ranges for readings of flow.. • Such ranges have an impact on the expectations that will be non-decreasing on operations: the nondeterminism in the state updates means that the relationship between rvolume and volume will be weaker.. • The particular relationships that can be guaranteed between volume and rvolume depend on the error ranges of readings and also on the the ratio of maxflow to minflow. Each of these dominates in some cases.. • The flow readings can be implemented by sensors whose errors are within the specified range.. This version of the tank monitoring system has considered a version of sensor which does not provide feedback on its status. Thus a sensor's incorrect reading can only be discovered by comparing it with other sensors. We considered an implementation which uses three sensors in such a way that if at most one has failed then an accurate reading is obtained. We found that if each sensor has at least 90% reliability, then the combination has at least 97.2% reliability in terms of providing an accurate reading. This allowed us to construct the specification that was guaranteed by the implementation. This in turn enables the relationship between the expected values of volume and rvolume to be established.. In this example we have seen how the updates to the monitoring system and to the tank can be separated. This separation introduces the possibility that the real value volume and the system value rvolume can diverge quite considerably, for two reasons: firstly, tock and poll might not occur together in general, so one might occur much 322 S. Schneider et al.. The first approach to separating tock from poll yielded a very weak relationship between the system and the real values for the volume of the liquid in the tank, because assumptions about the way the operations would be executed were not built into the model. In this section we built in the assumption that tock and poll were dealing with the same values for flow by controlling more carefully when flow can be changed. We introduced a new operation setFlow to do this, but only when volume and rvolume were in step. We then required that the other operations could not alter flow. The expected operation of the system, whereby tock and poll will essentially occur together, is incorporated within this model. But an unexpected operation, in which tock and poll occurring together will read completely different values of flow, is not permitted within this mode of the system. The result is a much tighter relationship on the expected values of volume and rvolume.. Note that the implementation of the poll operation in terms of sensors will again be the same as it was previously. All the changes we have made are at the level of the specification. The case study in this paper has shown how probabilistic B can be applied to specify and refine a system which naturally includes both probabilistic and nondeterministic behaviour, and has highlighted a number of issues that can arise in this process.. We considered two progressions of scenarios. The first progression was given in Sect. 5. In the first scenario, we considered the simple case where sensor readings are either perfectly accurate, or completely arbitrary, with the sensors indicating whether they are working correctly or not. This enabled a value for the accuracy of the system's value rvolume to be given in terms of the range of possible flows. Essentially the accuracy is calculated by allowing for the worst case of nondeterminism, in accordance with the demonic approach to nondeterminism reflected in the semantics of the language. We obtained the expected result that the larger the ratio between the maximum and minimum flow, the less accurate the value we could expect.. In the second scenario, we allowed some error range on the values read even when the sensors were working correctly. This additional nondeterminism also entered into the calculation to determine the level of accuracy of rvolume, and again we saw that the wider the range of possibilities, for flow readings, and for the possible flows, the lower the level of accuracy for the system's record of the volume of liquid.. In the third scenario, the sensors no longer provided a direct indication of whether they were giving a correct reading or not, so it was necessary to use three sensors and compare readings to deduce which values are most likely correct. In this example we worked from the implementation to the specification, firstly obtaining the reliability provided by the combination of sensors, and then calculating the level of accuracy that the system could deliver.. All three of these scenarios were modelled using a machine which had only a single operation, which synchronised updates of the real tank and updates of the monitoring system.. In the second set of scenarios, we separated the model of the tank from the description of the monitoring system. This approach is more common in the development of embedded systems [DT97] , and also occurs in Event-B [Abr96b, Abr03] , since the separation allows a cleaner development of the system. The fact that different operations were used to update the states of the tank and of the monitoring system had a significant impact on the relationship between the expectations of the real volume and the monitoring system's value for it. We found that the first approach gave too weak a relationship, essentially no stronger than that provided by the invariant (which is concerned only with all possible reachable states). The reason for this is that probabilistic B does not provide any control on the invocation of machine operations, or assumptions on the order and frequency of their occurrence, so it must allow for the machine to be placed in any environment. The fact that the flow could change on any update of the tank meant that the system readings and the real flow values could be wildly different for some sequences of operation calls.. In the second scenario, we introduced behaviour incorporating realistic assumptions: that the flow would not change while the system updates and tank updates were out of step. We considered this reasonable because in practice these updates would tend to be in step. This assumption meant that the system readings for flow corresponded to the real flow into the tank, and we regained a tighter relationship between the expected values of the measured volume and the real volume of liquid.. We have seen that the requirement that every operation should not decrease the machine's expectation introduces a consistency condition between the expectation and the probabilistic and nondeterministic behaviour in the machine operations. This need for consistency can be pushed in either direction: either starting with a required expectation and then deriving the reliability requirements and flow parameters necessary to achieve that; or starting with a given combination of sensors with some known reliability and obtaining the tightest possible bounds on the expectation. Our first implementation of VolumeTracker1 will make use of two sensors, which provide readings for the flow, and also give diagnostic information stating whether they are broken or not. We will firstly consider sensors which can fail on any particular reading independently of any other reading. We will consider sensors which have a reliability of at least 90%. We will need to make use of two of these, Sensor1a and Sensor1b to give readings to 99% accuracy. Sensor1b is given in Fig. 5 , and Sensor1a is entirely similar.. We propose an implementation VolumeTracker1I of VolumeTracker1 which uses two sensors in order to obtain a more reliable reading of the flow. This is given in Fig. 6 , and makes use of the Context machine of Fig. 7 .. Observe that the implementation contains its own variable rvolume. To avoid complicating this example with imported state, we relax the normal restriction that implementation machines cannot have their own state. We need to prove that the poll operation in the implementation is a refinement of the poll operation in the specification. This can be done by manipulating the probabilistic choices using the laws of [MM04] given in Sect. 3.2.. The poll operation in VolumeTracker1I of Fig. 6 is of the form P1a; P1b; F ; R; T , where the variables v1, v2, st1, st2, rflow are all local. We show that this operation is equivalent to poll given in the specification machine VolumeTracker1, as follows:. P1a; P1b; F ; R; T {expanding P1a and P1b} (S1al 0.9 ⊕ S1ar); (S1bl 0.9 ⊕ S1br); F ; R; T {Law 15} S1al; (S1bl 0.9 ⊕ S1br); F ; R; T 0.9 ⊕ S1ar; (S1bl 0.9 ⊕ S1br); F ; R; T {Law 20} (S1al; S1bl; F ; R; T 0.9 ⊕ S1al; S1br; F ; R; T ) 0.9 ⊕ (S1ar; S1bl; F ; R; T 0.9 ⊕ S1ar; S1br; F ; R; T ) {standard program algebra in each branch; removal of local variables}. Thus we arrive at the operation poll given in the specification machine VolumeTracker1. This demonstrates that VolumeTracker1I indeed provides an implementation of VolumeTracker1.

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


Terrain generation using genetic algorithms We propose a method for applying genetic algorithms to create 3D terrain data sets.Existing procedural algorithms for generation of terrain have several shortcomings. The most popular approach, fractal-based terrain generation, is efficient, but is difficult for a user to control. Other methods tend to require too much user input. In this paper, we provide an alternative method of terrain generation that uses a two-pass genetic algorithm approach to produce a variety of terrain types using only intuitive user inputs. We allow a user to specify a rough sketch of terrain region boundaries, and we refine these boundaries using a genetic algorithm. We then couple this with a database of given terrain data to generate an artificial terrain, which we optimize using a second genetic algorithm. Artificial terrain generation involves the creation of a set of elevation values over a two dimensional grid, such that the resulting model appears to be the surface of a real region of land. While games, movies, and similar forms of entertainment are the most popular applications for terrain generation algorithms, these algorithms also find application in a variety of other contexts, including simulation and training environments.. Current terrain generation algorithms span a wide range. These are described in more detail in section 2.2. All of these current techniques have key limitations. Many of the simpler methods are suitable for creating only a narrow range of terrain types. Some require the user to possess arcane parameter tuning skills in order to get acceptable results. Most of them provide no localized control over the landscape, and those that do require the user to invest a significant amount of skilled labor in order to get results.. In contrast, for a terrain generation tool to be maximally useful to artists, game developers, architects, and simulation designers (i.e., the user base of such a tool), it ought to enable its users to design the terrain visually using intuitive controls, producing realistic results across a variety of terrain types.. The approach we present here aims to address many of the shortcomings of these existing methods. We give the user a manageable level of control in specifying the types of terrains, and the approximate regions that each terrain type should occupy. We then make use of genetic algorithms in two stages to create a realistic terrain model. The resulting method is capable of generating realistic terrains with only intuitive inputs and limited knowledge required of the user, and could be implemented as a standalone, CAD-style tool, or as a plugin for any of the major 3D modeling packages commercially available. The silhouette generation process has several shortcomings, in that a single run of the GA is unable to generate some types of terrain features that can be found in nature due to the constraint we placed on the allowable range of θ. We could further improve the performance of the GA used in this phase by first generating silhouette lines of arbitrary length and θ, then extracting from it line segments having the desired length to initialize our population. A complexity parameter could also be incorporated into the GA used in the generation processes to better approximate the simplicity or complexity of certain terrain silhouettes, such as that exhibited by deserts or shorelines.. Currently, the terrain samples for the different terrain types used in the terrain height field generation phase are all hand-picked. We are experimenting with various image and pattern analysis techniques such as Fourier analysis, image feature detection, and perceptron-based classification in an attempt to automate this process such that the system can automatically or semiautomatically categorize a given set of terrain samples into different logical terrain types and determine the relevant characteristics of each, further simplifying the process from a user's perspective. We are also considering methods of identifying the presence of multiple terrain types within a single source sample. Such improvements in our methods of analyzing terrain types will allow us to refine our fitness evaluation algorithm in the height field generation stage.. We believe that the fitness evaluation and mutation operators can be further improved to better track the formation of terrain features spanning multiple genes, allowing entire features to be crossed over en bloc and resulting in faster convergence properties. More extensive feature tracking would also enable the formation of rivers and such (which impose additional constraints, such as being continuous across region boundaries and always flowing downhill). We have presented a new approach to terrain generation using genetic algorithms. Instead of trying to solve the problem as a whole, we break it down into two phases: terrain silhouette generation, and terrain height field generation. In contrast to fractal-based algorithms, our approach provides better control over the shape and layout of the resultant terrain, through the placement of regions of different terrain types. We provide a balance between user input and real-world data capture unmatched by previous approaches.. There is still much room for improvement, as discussed in the future work section. Our experimentations in automatic terrain sample categorization can further improve the usability of this approach and the fitness evaluation function for the chromosomes. Depending on how much detail we want in the resultant silhouette, the number of line segments used can be adjusted. The maximum amount of useful detail is limited by the resolution of the height field that will be generated in the second phase -if the silhouette has details finer than this limit, they will have no contribution to the output height field.. Since, in real-world terrain, a single region may be adjacent to several other regions of different types, and they may transition differently into each other, we allow the individual boundary segments in the silhouette of a particular region to have different S values for their fitness evaluation criteria.. Encoding all of the terrain-related data into each chromosome would be expensive since each chromosome would then contain a complete 3D terrain (actually, more than a complete terrain since the genes overlap one another); this is a primary reason for encoding only the sequence of transformation operations. By allowing the chromosomes to contain only the instructions for generating a height field, it is feasible to use a larger population for the evolution process. In our experiments, we used between 5 and 15 chromosomes, evolved over 10 to 20 cycles.. Since (like all genetic algorithms) the height field generation algorithm is inherently random, the terrains generated from two separate runs of the algorithm will not, in general, be the same, even if they use the same map. While this has the benefit of allowing an infinite number of variations to be created, it would also inhibit the user's design process, as each successive run would produce an entirely new terrain, even if the user had made only a small tweak to the map between runs. To control this, the seed for the random number generator can be kept the same across separate runs of the algorithm, allowing the same terrain to be regenerated as many times as desired. Our approach breaks down the terrain generation process into two stages: the terrain silhouette generation phase, and the terrain height field generation phase. The input to the first phase is a rough, 2D map laying out the geography of the desired terrain that can be randomly generated or specified by the user. This map is processed by the first phase to remove any unnaturally straight edges ( Figure 1 ), and then fed to the second phase, along with a database of pre-selected height field samples representative of the different terrain types. The second phase searches for an optimal arrangement of elevation data from the database that approximates the map generated in the first phase.

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


Characterizing the NP-PSPACE Gap in the Satisfiability Problem for Modal Logic There has been a great of work on characterizing the complexity of the satisfiability and validity problem for modal logics. In particular, Ladner showed that the validity problem for all logics between K, T, and S4 is PSPACE-complete, while for S5 it is NP-complete. We show that, in a precise sense, it is negative introspection, the axiom ¬Kp ⇒ K¬Kp, that causes the gap. In a precise sense, if we require this axiom, then the satisfiability problem is NP-complete; without it, it is PSPACE-complete. There has been a great of work on characterizing the complexity of the satisfiability and validity problem for modal logics (see [Halpern and Moses 1992; Ladner 1977; Vardi 1989] for some examples of most interest here). In particular, Ladner [1977] showed that the validity problem for all logics between K, T, and S4 is PSPACE-complete, while for S5 it is NP-complete.

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


Minimizing delivery cost in scalable streaming content distribution systems Abstract-Recent scalable multicast streaming protocols for on-demand delivery of media content offer the promise of greatly reduced server and network bandwidth. However, a key unresolved issue is how to design scalable content distribution systems that place replica servers closer to various client populations and route client requests and response streams so as to minimize the total server and network delivery cost. This issue is significantly more complex than the design of distribution systems for traditional Web files or unicast on-demand streaming, for two reasons. First, closest server and shortest path routing does not minimize network bandwidth usage; instead, the optimal routing of client requests and server multicasts is complex and interdependent. Second, the server bandwidth usage increases with the number of replicas. Nevertheless, this paper shows that the complex replica placement and routing optimization problem, in its essential form, can be expressed fairly simply, and can be solved for example client populations and realistic network topologies. The solutions show that the optimal scalable system can differ significantly from the optimal system for conventional delivery. Furthermore, simple canonical networks are analyzed to develop insights into effective heuristics for near-optimal placement and routing. The proposed new heuristics can be used for designing large and heterogeneous systems that are of practical interest. For a number of example networks, the best heuristics produce systems with total delivery cost that is within 16% of optimality. This paper has addressed the problem of replica placement, client request routing, and multicast stream routing in media content distribution systems employing scalable streaming protocols. Although the design of such systems is significantly more complex than the design of conventional unicast delivery systems, we formulated fairly simple optimization models for a variety of scalable protocols including hierarchical merging, patching, periodic broadcasts, and scheduled broadcasts. With the aid of additional constraints that must hold in the scalable delivery system solution, we showed that a variety of realistic scenarios can be solved exactly using available optimization software. We also showed that using the optimal conventional unicast content distribution system for scalable delivery results in network costs that can be as much as 50%-150% higher than optimal. Finally, we developed six possible heuristics that find near-optimal solutions at much lower computational cost than the exact algorithm, but which yield results of comparable quality. The best near-optimal algorithms use a greedy min-cost tsp placement heuristic, and either shortest path routing or a greedy ordered min-cost heuristic for routing client requests and multicast streams. These algorithms have a total solution complexity equal to the complexity of applying Dijkstra's shortest path algorithm to each client site and each possible server access node in the network. Furthermore, the solutions were within 16% of optimal for all scenarios evaluated.. Future work includes evaluating the performance of our heuristic solutions on larger and more diverse system design scenarios (including periodic broadcast protocols), extending the formal model to specify delivery costs for interactive client requests, investigating the impact of interactive client loads on the optimal and near-optimal content delivery systems, and investigating the problem of optimal joint placement and routing for multiple objects.

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


How Accurate Can Block Matches Be in Stereo Vision? This article explores the sub-pixel accuracy attainable for the disparity computed from a rectified stereo pair of images with small baseline. In this framework we consider translations as the local deformation model between patches in the images. A mathematical study shows first how discrete block-matching can be performed with arbitrary precision under Shannon-Whittaker conditions. This study leads to the specification of a block-matching algorithm which is able to refine disparities with sub-pixel accuracy. Moreover, a formula for the variance of the disparity error caused by the noise is introduced and proved. Several simulated and real experiments show a decent agreement between this theoretical error variance and the observed RMSE in stereo pairs with good SNR and low baseline. A practical consequence is that under realistic sampling and noise conditions in optical imaging, the disparity map in stereo-rectified images can be computed for the majority of pixels (but only for those pixels with meaningful matches) with a 1/20 pixel precision. , and a few objections. The empirical sub-pixel accuracy in stereo vision can attain its predicted limit, which only depends on the noise at regular disparity points. The experiments on realistically simulated pairs and real benchmark images show a 1/20 pixel accuracy to be attained by block-matching, for more than half the image pixels, under realistic noise conditions. These image pixels were not found a posteriori, they were specified a priori by an autonomous algorithm, meaning that the small predicted accuracy can be predicted a priori for these points. The two ingredients, namely a sub-pixel accuracy and a strict a priori mismatch control, could make stereo-vision (with high SNR and low baseline) into potential competitor Table 5 .7: Comparison of several stereo algorithms in the top classification. Values on the diagonals (gray) are the values with respect to the ground truth. In general the distance between two solutions is smaller than the distance to the ground truth, with the exception of GC+SegmBorder.. with laser range scanners. Indeed, at a 70cm distance, the best triangulation scanners achieve a 20µ accuracy, only on Lambertian objects and very controlled environment and this requires multiple scans. On the other hand a well-calibrated stereo camera system with 4000 pixels width, situated at the same distance of the object can achieve a 70/4000cm disparity accuracy at the well matched points if the accuracy is pixelian. This yields a 1.7510 −2 cm = 175µ accuracy for pixelian stereo systems. But if the stereo disparity attains a 0.10 pixels accuracy we get a 17.5µ accuracy, which is exactly comparable to the best current triangulation scanner accuracy. The above Middlebury experiments also showed that the ground truth provided as a benchmark reference is actually less accurate than the attainable level of 1/20 pixel (see [51] for similar conclusions). This study also suggests that a rigorous methodology to create reliable ground truths is needed. Such ground truths should be built up by several different automatic devices used repeatedly on the same objects, so as to provide a cross-validated estimate of their own accuracy.. A first objection to the sub-pixel algorithm presented herewith is that it only delivers a non dense disparity map, while the users usually desire a 3D rendering of the objects and therefore a dense map. There is no contradiction, however, with this goal in the present study. Global interpolation methods can be used to complete the reliable pixels, knowing of course that the accuracy of the new disparities will not be guaranteed. It is clear that stereo algorithms giving a final dense map must be more complex than just block-matching. But our conclusion is that a block-matching is necessary and fruitful if accuracy is at stake.. A second objection is that the study does not take into account the actual trend of working not with a stereo pair, but rather with a whole set of images of a 3D scene taken from many viewpoints. The present study can and must be extended to this general setting with some advantage. For example if we dispose of five successive snapshots with low baseline, a fusion of the four obtained disparities should decrease the error variance by a four factor, and therefore go beyond the accuracy estimated here.. A third objection is that the translation model (2.1) which is the basis of all computations here, is geometrically too simplistic. It is in essence only true for the parts of the observed objects facing the cameras, and in the low baseline framework. However, it so happens that for the low baseline case, the translation dominates the other perspective deformations, as has been systematically observed in experiments. In the case of slanted surfaces with respect to the cameras, the present theory can be used anyway. In fact, local matching is reduced to an (approximate) translation, after a local affine transform on one of the images. This is doable but goes beyond the scope of the present study.. where S i = m∈Ai ϕ x (m)n(m) 2 , A i = [0, N ] 2 ∩ (a i + Z 2 ), a 1 = ( 1 /4, 1 /4), a 2 = ( 1 /4, 3 /4), a 3 = ( 3 /4, 1 /4), and a 4 = ( 3 /4, 3 /4). We shall evaluate for example Var(S 1 ) = Var m∈A1 ϕ x (m)n(m) 2 .. The samples n(m), m ∈ A 1 being independent, Var(S 1 ) = m∈A1 ϕ x (m) 2 Var(n(m) 2 ) which by Lemma 2.3 yields Var(S 1 ) = 2σ 4 m∈A1 ϕ x (m) 2 . Thus, from (5.1) follows that V Indeed, n being a degree N -trigonometric polynomial,ñ k,l = 0 for (k, l) / ∈ [−N/2, N/2− 1] 2 . Since theñ k,l are independent with variance σ 2 N 2 , we obtain the announced result by taking the variance of the last finite sum: is the degree N -trigonometric polynomial best approximating g for the quadratic distance.

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


Visual ContextRank for web image re-ranking Previous web image re-ranking approaches usually construct similarity measure on image level. Considering the diversity of large scale web image database, these approaches ignore the difference of importance between target area and background area in images, thus are not robust to background clutter and may bring some false similarity contribution among images, especially for object query images. We propose ContextRank, re-ranking images by building Markov random process of a surfer jumping across visual words within and among images. For intra-image context, links of visual words are constructed if they are close enough within an image. For inter-image context, links of visual words between image pairs are constructed by incorporating both feature similarity and spatial consistency. Equally speaking, we build a random walk model on visual word level where spatial information is taken into account. The stationary distribution of visual words in each image is derived by calculating the principle eigenvector of link matrix. The score of images are the sum of scores of visual words in each image. Evaluation on object images collected from the Google search engine shows that our approach outperforms VisualRank, and is comparable with the state-of-art. Compared to VisualRank, our method reaches better performance without significant extra computation cost, which is suitable for potential requirement of large scale web image retrieval. The needs for large scale web multimedia search and retrieval have emerged to tens of millions of web users during the last ten years. Currently, web image search has been supported by many commercial search engines, such as Google, Live, Yahoo, et al.. Most of them are implemented by indexing and searching the associated textual information of images. Text based search has shown effectiveness and efficiency for retrieving text information from the massive web pages. Although text does provide some useful information for describing image content, it is not the true description of visual content which is directly pictured from the real world. Retrieval only by text may mislead users' experiences for many reasons, such as semantic uncorrespondence between texture and visual description, and commercial or political inclinations in text. Therefore, it is reasonable to retrieve firstly by text and hyperlink analysis, keeping the power of quickly retrieving a corpse of web database, and then re-rank the top ranked documents by visual analysis. This idea has been investigated in many works [1, 2, 3, 4] , where they use different but effective ways to measure the visual correspondence of those top N images to a given query. However, considering the diversity of web images, such as different content, different context and sources, many issues should be taken into account carefully.. For a query category, the relevant images should be appropriately clustered in a good feature space. An efficient re-ranking algorithm should be able to discover those images that contain the target pattern and find the cluster and images belonging to it. An efficient way was proposed by Jing et al. [1] , building pairwise similarity matrix of Top 1000 images, and using VisualRank to calculating the score of each image. But it may be a problem that in [1] , each matched local feature weighs equally, regardless of the context information whether the local descriptor is located on the background or the target area. Therefore a lot of false contributions to the similarity score will be brought in. Context information like spatial consistence and link information could help to filter those obvious false links.. How to automatically locate those local features in target areas is a challenging issue. According to study in [5] , the local descriptors in object area tend to have more links with each other, while those in background are likely to be isolated in a graph, and unlikely to have consistent links with those located at the object area. Their approach is able to find the most salient local descriptors locating on object area. Our method is based on the same assumption with [5] , but we do not aim to locate the features in target area, but to reweigh visual words based on both local features differences and their spatial context. The third issue is how to utilize multiple information sources. There is a lot of information metadata describing a web image, such as anchor text, geo-tag, concept score and time stamps. All these could be directly used for context analysis, or integrated by some text processing method to derive an initial text retrieval results, such as Google Pagerank [6] . The efficiency of initial result has been studied by [1] [2] [3] . In [4] , the initial rank is treated as noisy label and supervised learning procedure is fitted 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, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. to an unsupervised re-ranking requirement. We do not employ any supervised learning approach, since the model derived by supervised learning is likely to be biased to the chosen training data. And more importantly, the model may deteriorate when false positive and false negative examples are introduced, leading to the instability of performance. We describe the visual relation of image by building pairwise relationship among visual words in an unsupervised way. In this paper, we propose a novel approach for re-ranking object image categories retrieved from the Google search engine. Two kinds of visual context information are considered. Intra-image context models the visual co-occurrence information of an image. Inter-image context is helpful to construct the good link among image pairs using global consistence of candidate in image pairs, thus it is able to filter most of false links or those links locating on background region. Experiment results show that our approach significantly outperform VisualRank for re-ranking object images.. Our approach is comparable with [4] and [9] . Future study includes experiments on more object categories, better modeling of image context information beyond pair-wise context and construction of better visual vocabulary. We also need to study how to incorporate text information more effectively. The aim of Pagerank is to find the central cluster of data. Since what we rank is the visual words in each image, it is possible to have multiple clusters on the graph. According to [5] , those local features located in object area tend to have consistent links with each other. However, when similar background occurs repeatedly, or the target objects co-occur with other objects frequently, such as human, the algorithm may be distracted to find another cluster that is not indicating visual words describing target object. These co-occurred objects could also provide some useful information for the object query, which could also be seen as a kind of context. We will try to identify this problem in future study. Web image Re-ranking is related to traditional Content Based Image Retrieval (CBIR). An overview of CBIR could be found in [7] . However, query image is often unavailable in web search scenario, so approaches of traditional CBIR could not be directly applied. Correspondingly, in Automatic Annotation Based Retrieval (AABR), Learning approaches such as SVM [8] are trained to detect or classify certain objects or events. The retrieved results are ranked by their score measuring the probability that a visual concept exists. However, the derived mapping from visual feature to high level concept is not as good as expected because strong visual variance exists among images and videos.. The problem of web image re-ranking is different from purely CBIR or AABR. Unlike CBIR that uses only visual analysis, both textual and visual analyses are employed in re-ranking task. No concept detector should be trained to calculate the probability of visual concept existence in re-ranking problem.. The well studied graph based methods are very popular ways that could construct the relationship of data objects [1, 3, 10, 11, 12] . They have been widely used in large scale web mining and text retrieval. The simplicity and effectiveness of such approaches applied in visual information processing were also demonstrated by He et al. [10] , who first suggest combining Pagerank with visual similarity for image retrieval. Then Hsu et al. [3] employ the similar idea for video retrieval. Jing et al.. [1] re-rank more than one thousand of Google product and landscape query images. Tian et al. [2] generalize the graph based methods. Our method is closely related to these graph based approaches.. In principle, link analysis such as Pagerank [6] is a good way to describe data with large intra-class variance, by building manifold with pair-wise similarity calculation. Believe propagation could be used to propagate label information on this data manifold [12] . Previous graph based re-ranking approaches treat each image as a node, and their feature similarity as the edge, which more or less neglect the structure on image content level. Studies in text retrieval provide some further views. For example, LexRank [11] is proposed to identify the most salient sentences for extractive summarization in a set of document. In Cai et al. [13] , where the web pages are decomposed into blocks and link analysis is done on block level, and images in the same web page but different block are possible to be clustered into different topics. These studies inspire us to extend link analysis to a finer level.. A good method to re-rank images by visual content analysis could also be derived from bag-of-words approach in text retrieval, which has shown scalability and robustness in processing large scale of text documents. This idea has also been successfully applied to image and video data mining [9, 14, 15, 16, 17] . Original bag-of-word model ignores the spatial information and high order relationship of image features. Incorporating spatial relationship of visual words can help enhancing the distinguishability [18, 19, 20, 21] . Inspired by these researches, we combine intra-image context and inter-image context together with a random walk graph theory to model the inter-image and intra-image relation of visual words.

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


The design and implementation of heterogeneous multicore systems for energy-efficient speculative thread execution With the emergence of multicore processors, various aggressive execution models have been proposed to exploit fine-grained thread-level parallelism, taking advantage of the fast on-chip interconnection communication. However, the aggressive nature of these execution models often leads to excessive energy consumption incommensurate to execution time reduction. In the context of Thread-Level Speculation, we demonstrated that on a same-ISA heterogeneous multicore system, by dynamically deciding how on-chip resources are utilized, speculative threads can achieve performance gain in an energy-efficient way.Through a systematic design space exploration, we built a multicore architecture that integrates heterogeneous components of processing cores and first-level caches. To cope with processor reconfiguration overheads, we introduced runtime mechanisms to mitigate their impacts. To match program execution with the most energy-efficient processor configuration, the system was equipped with a dynamic resource allocation scheme that characterizes program behaviors using novel processor counters.We evaluated the proposed heterogeneous system with a diverse set of benchmark programs from SPEC CPU2000 and CPU20006 suites. Compared to the most efficient homogeneous TLS implementation, we achieved similar performance but consumed 18% less energy. Compared to the most efficient homogeneous uniprocessor running sequential programs, we improved performance by 29% and reduced energy consumption by 3.6%, which is a 42% improvement in energy-delay-squared product. One primary research objective pertaining to computer systems is to improve performance. In the past few decades, this objective had been largely realized through This work is supported in part by a grant from the National Science Foundation under CNS-0834599, CCF-0916583, and CPS-0931931; a contract from Semiconductor Research Cooperation under SRC-2008-TJ-1819; and a gift grant from IBM. Authors' addresses: Y. Luo, Advanced Micro Devices, One AMD Place, Sunnyvale, CA 94088, email: Yangchun.Luo@amd.com; W.-C. Hsu, National Chiao Tung University, Taiwan; email: hsu@cs.nctu.edu.tw; A. Zhai, University of Minnesota -Twin Cities; email: zhai@cs.umn.edu. Permission to make digital or hard copies of part or all 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 show this notice on the first page or initial screen of a display along with the full citation. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works requires prior specific perimssion and/or a fee. Permissions may be requested from Publications Dept., ACM, Inc., 2 Penn Plaza, Suite 701, New York, NY 10121-0701, USA, fax +1 (212) 869-0481 or permission@acm.org. c 2013 ACM 1544-3566/2013/12-ART26 $15.00 DOI: http://dx.doi.org/10. 1145/2541228.2541233 generated by the corresponding sequential program. Thus, altering the second-level cache size will have similar impact on performance whether or not the program is speculatively parallelized.. TLS can be supported on processors with different forms of multithreading: a single core with SMT support, as well as multiple independent cores (Chip Multiprocessor [CMP] ) each executing a single thread. Previous work has shown that SMT and CMP could result in different levels of energy efficiency [Packirisamy et al. 2008] . Thus, we explore the possibility for both types of multithreading support. Thread-Level Speculation (TLS), by optimistically ignoring infrequent memory aliasing, could improve performance and save energy if the success rate is high. On the other hand, failed speculation could lead to prolonged execution time and increased power consumption, degrading energy efficiency. In this article, we proposed a heterogeneous multicore system to address this issue.. By building an idealistic execution environment and making a number of simplifying assumptions, we were able to efficiently experiment on multicore configurations with a diverse combination of computing and caching components. The resulting design is an architecture that integrates four processing blocks, each containing a four-issue SMT core, a two-issue non-SMT core, and an L1 cache that can be resized between 64KB and 16KB. To cope with various processor reconfiguration overheads, we introduced runtime mechanisms to mitigate their impacts. This was done by reducing the frequency of causal operations. The overhead impact was reduced by 92% as a result. Moreover, we proposed a set of resource allocation schemes that can monitor program execution and match it with the most efficient processor configuration. With all simplifying assumptions removed, the proposed heterogeneous system achieved 18% higher energy efficiency (ED 2 P) compared to the most efficient homogeneous TLS implementation. It improved performance by 29% and at the same time reduced energy consumption by 3.6% compared to the most efficient homogeneous sequential processor, a 42% improvement in energy efficiency (ED 2 P). In the architecture community, speculative threads have long been regarded as energy inefficient. Our work has sent an important message: by combining heterogeneous architecture and speculative thread-level parallelism, we can judiciously allocate onchip resources and achieve noticeable performance improvement while reducing energy consumption. This work is the extension of a previous publication [Luo et al. 2010] . It is closely related to the following areas of computer architecture research: TLS, dynamic optimization, energy-efficient computation, and heterogeneous multi-core design and implementation. In this section, we briefly outline related works in these areas.. A number of prior works have addressed energy efficiency issues for TLS execution. Packirisamy et al. [2008] compared and contrasted the energy efficiency of SMT and CMP in terms of supporting TLS workload under the same die area constraints. They examined how the interactions between speculative threads affect their energy efficiency in SMT-mode and CMP-mode execution. Renau et al. [2005] proposed various energy-saving optimizations for TLS execution. Tuck et al. [2007] built a taskcriticality graph and used it for scheduling speculative threads based on their critical levels. Sarangi et al. [2005] introduced ReSlice that could significantly reduce the cost of value mis-speculation and used it to improve both performance and energy efficiency for TLS systems. Our work differs from the above in that (1) we proposed an asymmetric multicore system tuned for TLS execution, and (2) our energy efficiency improvement mainly came from successfully matching program segments with computation and caching components on which they are most energy efficient. Nevertheless, it is worth pointing out that many of the techniques proposed by these prior works are orthogonal and can potentially complement our system to further improve energy efficiency.. Managing speculative threads at runtime can reduce the unpredictability of speculative threads. Luo et al. [2009 Luo et al. [ , 2012 proposed dynamic dispatching mechanisms to enhance TLS performance. Novel hardware performance counters are introduced to monitor thread execution and enable quantitative evaluation of speculative threads. Based on such evaluations, the runtime tuning system can (re-)decide how the speculative threads are extracted to improve performance. This work is based on a homogeneous CMP system and does not consider energy consumptions. However, these techniques can potentially be integrated into our heterogeneous system to extract more energy-efficient speculative threads from sequential applications.. A large number of proposals have discussed dynamic tuning for improving energy efficiency of microprocessors. Wu et al. [2005a Wu et al. [ , 2005b presented the runtime optimizer framework that uses DVFS to manage energy versus performance tradeoffs. This framework is based on dynamic instrumentation: initial test instructions are inserted to hot code regions to collect the execution profile; then mode set (reset) instructions are inserted at the entry (exit) point of candidate code segments. Bhattacharjee et al. [2009] proposed a thread criticality predictor and then applied dynamic optimization and DVFS based on the criticality. While DVFS is not evaluated in this article, it is certainly orthogonal to our approach.. As more and more transistors are integrated onto a single die, efficiently utilizing onchip resources becomes increasingly challenging. The work from Kumar et al. [2006] , Chakraborty et al. [2006] , and Becchi and Crowley [2006] studied thread migration for better resource utilization. However, their proposed schemes worked at coarse granularity and may not support speculative threads. Our work focused on speculative threads and tackled fine-grained thread management overheads.. Heterogeneous systems with same-ISA heterogeneous cores are proposed by Kumar et al. to improve energy efficiency for sequential programs [2003] as well as multiprogramming workloads [2004] . They presented policies for matching core sizes with application characteristics. Our work is different because (1) we studied speculative threads that have unique sharing and interference patterns; (2) our threads are managed at a much finer granularity level, and thus our runtime system must throttle the invocation of thread management operations; and (3) we have shown the benefit of incorporating heterogeneous cache components, which is not considered by Kumar et al. Suleman et al. [2009] proposed an Asymmetric Chip Multiprocessor to speed up lock-based critical section execution in OpenMP applications. Our work differs in that our workloads do not have explicit lock-based critical sections and the runtime deals with resource allocation for all program segments. Yang et al. [2002] proposed first-level cache designs that can be resized during program execution. Considerable energy-delay product reduction has been observed by having the ability of resizing both sets and associativities. Our work has shown that in the context of speculative threads that utilize cache ways as write buffers, resizing by sets is always a more energy-efficient choice. In addition, Patsilaras et al. [2012] studied workloads with high memory-level parallelism that resulted in a heterogeneous multicore system very similar to our design. It shows that the types of heterogeneous components we advocate have applications not only for speculative thread-level parallelism but also for memory-level parallelism.. In the effort to implement heterogeneous processors, FabScalar [Choudhary et al. 2011 presented a toolset to automatically compose the synthesizable RTL designs of arbitrary cores within a canonical superscalar template. Najaf-abadi et al. [2009] proposed core selectability to incorporate differently designed cores that can be toggled into active employment. They also investigated the overhead and feasibility of multiplexing access to the L1 cache from two different cores.

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


Directed spanners via flow-based linear programs We examine directed spanners through flow-based linear programming relaxations. We design anÕ(n 2/3 )-approximation algorithm for the directed k-spanner problem that works for all k ≥ 1, which is the first sublinear approximation for arbitrary edge-lengths. Even in the more restricted setting of unit edge-lengths, our algorithm improves over the previ-). Both of our algorithms easily extend to the fault-tolerant setting, which has recently attracted attention but not from an approximation viewpoint. We also prove a nearly matching integrality gap ofΩ(n 1/3− ) for every constant > 0. A virtue of all our algorithms is that they are relatively simple. Technically, we introduce a new yet natural flowbased relaxation, and show how to approximately solve it even when its size is not polynomial. The main challenge is to design a rounding scheme that "coordinates" the choices of flow-paths between the many demand pairs while using few edges overall. We achieve this, roughly speaking, by randomization at the level of vertices. We examine several directed spanner problems from the perspective of approximation via a linear programming (LP) relaxation. In particular, we design flow-based LP relaxations for these classical NP-hard problems, and then investigate how well these relaxations approximate the optimal spanner, providing nearly matching upper and lower bounds. We begin by introducing the spanner problems that we consider, focusing throughout on directed graphs; we briefly compare to undirected graphs in Section 1.4. A k-spanner of G, for k ≥ 1, is a subgraph G = (V, E ), that preserves all pairwise distances within factor k, i.e. for all u, v ∈ V ,. Here and throughout, dH denotes the shortest-path distance in a graph H. It is easy to see that requiring (1) only for edges (u, v) ∈ E suffices. In the directed k-spanner problem with unit edge-lengths, the input is the graph G and the goal is to find a k-spanner G having the minimum number of edges. We allow the stretch k to be a function of n = |V |, e.g. k = O(log n), and in fact some of our results are most interesting when k = Ω(log n). This definition was introduced by Peleg and Schäf-fer [PS89] (in particular, they showed the problem is NPhard), and since then it has been studied extensively, with applications ranging from routing in networks (e.g. [AP95, TZ05] ) to solving linear systems (e.g. [ST04, EEST08] ).. The above definition has several natural generalizations. An obvious one is to let G have nonnegative edge-lengths, leading to more complicated distances. This is the directed k-spanner problem with arbitrary edge-lengths. Another generalization, introduced in [CLPR09] , incorporates fault tolerance: a k-spanner G is r-vertex-tolerant if for all F ⊆ V with |F | ≤ r we have that G \ F is a k-spanner of G \ F . The definition of r-edge-tolerant is the same, except that F is a subset of E rather than of V . Clearly, the special case r = 0 is just the standard notion defined above. This paper address both of these generalizations.. Yet another generalization of the problem is the clientserver model [EP01] : the input contains also a set C ⊆ E of so-called client edges and a set S ⊆ E of server edges, the requirement (1) is only needed for edges in C, while the spanner is only allowed to use edges in S (i.e. E ⊆ S). Obviously, the case C = S = E is just the standard notion defined above. Our results extend to this model in a straightforward manner, but for the sake of exposition we shall not address it directly. We first present a flow-based LP relaxation for spanner problems (Section 2). This relaxation is quite natural but appears to be new, and in particular it differs from the ones used in [DK99, BGJ + 09]. We then use this LP relaxation to obtain the approximation algorithms described below (see also Table 1 ).

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


Synchronous elastic circuits with early evaluation and token counterflow A protocol for latency-insensitive design with early evaluation is presented. The protocol is based on a symmetric view of the system in which tokens carrying information move in the forward direction and anti-tokens canceling information move in the backward direction. An implementation of the protocol and an example illustrate the flow for converting a regular synchronous design into an elastic circuit with early evaluation. Synchronous elastic (or latency insensitive) systems have been suggested by a few research groups as a form of discretized asynchronous systems (see, e.g., [3, 5, 6] ). Such systems are "elastic" in the sense that they can tolerate changes in the latencies of their components.. Conventional synchronous elastic systems are based on strict evaluation: the computation is initiated only when all input data are available. However this requirement is not always necessary. As an example, let us consider a multiplexer with the following behavior: z = if s then a else b. Early evaluation can be applied if, for instance, s and a are available and the value of s is true. In that case, the result z = a can be produced and the value of b can be discarded when it arrives at the multiplexer.. In early evaluation, care must be taken in preventing the spurious enabling of functional units when the non-required inputs arrive later than the completion of the computation. A possible technique is the use of negative tokens, also called anti-tokens. Each time an early evaluation occurs, an anti-token is generated at every non-required input in such a way that when it meets the positive token they annihilate.. The idea of anti-tokens was used in [8, 11] , extending Petri nets for handling OR causality and nodes with arbitrary guard functions. [7] used a similar technique for performance estimation of systems with early evaluation. Early evaluation [10] and anti-tokens [1, 2] have also been used in asynchronous circuits.. This paper presents a behavioral model for synchronous elastic systems with early evaluation, called a dual marked graph. An implementation with a symmetry between the logic to handle tokens and anti-tokens is proposed. The paper concludes with an example illustrating the elasticization flow, the performance analysis of early evaluation, and system performance vs. controller area trade-offs. This paper describes a particular implementation of early evaluation, but many variations are possible. For example, it would be possible to extend the approach to store multiple anti-tokens at every controller. This might improve performance in some cases, but we found little experimental motivation for this feature. The propagation of anti-tokens creates a distributed memory within the system and eliminates the need for storing them within early join nodes.. The mechanism for anti-token counter-flow can also be used for handling exceptions inside elastic pipelines. For example, flushing a pipeline on branch mispredictions can be done by injecting anti-tokens. This paper has focused on the performance aspects of the early evaluation. The power reduction aspect due to disabling non-required activity in the data-path is an equally important side effect of the anti-token counterflow.

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O