Unprovability of the Logical Characterization of Bisimulation We quickly review labelled Markov processes (LMP) and provide a counterexample showing that in general measurable spaces, event bisimilarity and state bisimilarity differ in LMP. This shows that the logic in Desharnais [3] does not characterize state bisimulation in non-analytic measurable spaces. Furthermore we show that, under current foundations of Mathematics, such logical characterization is unprovable for spaces that are projections of a coanalytic set. Underlying this construction there is a proof that stationary Markov processes over general measurable spaces do not have semi-pullbacks. One of the more interesting facts about the state of the art on Markov decision processes over a continuous state-space is that there exist a number of competing notions of bisimulation. The essential difference with the discrete case is the appearance of nonmeasurable sets, which e.g., inhibit the possibility of extending straightforwardly Larsen and Skou [15] notion of probabilistic bisimulation.. To work in a concrete setting, we will use the framework of Labelled Markov Processes (LMP). LMP have a labelled set of actions that encode interaction with the environment; thus LMP are a reactive model in which there are different transition subprobabilities for each action. The thesis [3] contains a thorough study and introduction to LMP.. The categorical approach to bisimulation is already present in Joyal et al. [12] and was studied for LMP in [4] . There, the notion of zig-zag morphism was defined and the relation of bisimilarity was given by a span of zig-zags. Zig-zags are exactly the coalgebra morphisms for Giry's functor Π [9] . The major obstacle for this definition of bisimulation was that transitivity of bisimilarity was proved by using structure results only available when the state-space is analytic. This was done in [4] by using a technical result by Edalat [8] that constructed a span of zig-zags given a cospan. To achieve this goal, Edalat established explicitly the existence of regular conditional probability for the universal completion of a Polish space. An alternative point of view, restricted to the category of Polish spaces, can be found in Doberkat [5] .. A Hennessy-Milner logic was also developed and in [4] it was proved that the relation of bisimilarity was characterized by this logic in the case of an analytic state-space. Clearly, a notion of logical equivalence must be transitive, so the problem of transitivity is more general than that of the logical characterization of bisimilarity.. It was realized that a new notion of bisimulation was needed, and in [2] Danos, Desharnais, Laviolette, and Panangaden defined event bisimulation in terms of the measurable structure of LMP. They proved that logical equivalence and event bisimilarity coincide and that both can be phrased as a cospan of zig-zags. These results are in a way consequences of the fact that cospans are far more easy to work with in a coalgebraic setting.. In this paper, we construct a counterexample showing that in general measurable spaces, event bisimilarity and state bisimilarity differ in LMP. This shows that the Hennessy-Milner logic used in [4, 3, 2] does not characterize bisimulation in non-analytic measurable spaces. The construction includes also a counterexample to the existence of semi-pullbacks in the category of stationary Markov processes over general measurable spaces.. The construction of our counterexample needs the existence of a nonmeasurable set. It is known that it is consistent with current foundations of Mathematics that there exists a nonmeasurable subset of the Euclidean plane which is the continuous image of the complement of an analytic set. Hence, there are spaces in level 2 of the projective hierarchy of sets (level 0 occupied by Borel sets, level 1 by analytic sets and their complements) for which the logical characterization bisimulation is unprovable.. The paper is organized as follows. In Section 2 we review some background to our study, including some concepts related to measurable spaces and prior results on labelled Markov processes. Section 3 develops the consequences of Loś and Marczewski's theorem on extension of measure, in particular the non-existence of semi-pullbacks in the category of stationary Markov processes and zig-zag morphisms. Our main counterexample, a LMP for which event and state bisimilarity differ from each other, is constructed in Section 4. A careful analysis of the set theoretical requirements of this construction is pursued in Section 5, where we show our unprovability result.

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


Bootstrap for neural model selection Bootstrap techniques (also called resampling computation techniques) have introduced new advances in modeling and model evaluation [10] . Using resampling methods to construct a series of new samples which are based on the original data set, allows to estimate the stability of the parameters. Properties such as convergence and asymptotic normality can be checked for any particular observed data set. In most cases, the statistics computed on the generated data sets give a good idea of the confidence regions of the estimates. In this paper, we debate on the contribution of such methods for model selection, in the case of feedforward neural networks. The method is described and compared with the leave-one-out resampling method. The effectiveness of the bootstrap method, versus the leave-one-out methode, is checked through a number of examples. These examples indicate that our technique is better then the leave-one-out method. The bootstrap method can be used for a great variety of situations. We have applied it for many other cases, and the results seem to be very interesting to help for model selection.

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


Is content publishing in BitTorrent altruistic or profit-driven? BitTorrent is the most popular P2P content delivery application where individual users share various type of content with tens of thousands of other users. The growing popularity of BitTorrent is primarily due to the availability of valuable content without any cost for the consumers. However, apart from required resources, publishing (sharing) valuable (and often copyrighted) content has serious legal implications for users who publish the material (or publishers). This raises a question that whether (at least major) content publishers behave in an altruistic fashion or have other incentives such as !nancial. In this study, we identify the content publishers of more than 55K torrents in two major BitTorrent portals and examine their behavior. We demonstrate that a small fraction of publishers is responsible for 67% of the published content and 75% of the downloads. Our investigations reveal that these major publishers respond to two different pro!les. On the one hand, antipiracy agencies and malicious publishers publish a large amount of fake !les to protect copyrighted content and spread malware respectively. On the other hand, content publishing in BitTorrent is largely driven by companies with !nancial incentives. Therefore, if these companies lose their interest or are unable to publish content, BitTorrent traf!c/portals may disappear or at least their associated traf!c will be signi!cantly reduced. Peer to Peer (P2P) file-sharing applications, and more specifically BitTorrent, are a clear example of killer Internet applications in the last decade. BitTorrent is currently used by hundreds of millions of users and is responsible for a large portion of the Internet traffic [4] . This in turn has attracted the research community to examine various aspects of swarming mechanism in BitTorrent [10, 16, 13] and propose different techniques to improve its performance [19, 15] . Furthermore, other aspects of BitTorrent such as demography of users [22, 12, 20] along with the security [21] and privacy [6, 7] issues have also been studied. However, the socio-economic aspects of BitTorrent in particular, and other P2P file sharing systems in general, have received little attention. In particular, the availability of popular and often copyrighted content (e.g. recent TV shows and Hollywood movies) to millions of interested users at no cost is the key factor in the popularity of BitTorrent. This raises an important question about the incentive of publishers who make these content available through BitTorrent portals. Despite its importance to properly understand the popularity of BitTorrent, to our knowledge prior studies on BitTorrent have not tackled this critical question.. In this paper, we study content publishing in Bit-Torrent from a socio-economic point of view by unravelling who publishes content in BitTorrent, and why. Toward this end, we conduct a large scale measurement over two major BitTorrent portals, namely Mininova and the Pirate Bay, to capture more than 55K published content that involve more than 35M IP addresses. Using this dataset, we first examine the contribution of the individual content publishers and illustrate that a small fraction of publishers (∼100) are responsible of uploading 67% of the content that serve 75% of the downloads in our major dataset. Furthermore, most of these major publishers dedicate their resources for publishing content and consume few or no published content by others, i.e. their level of content publication and consumption is very imbalanced. In addition to allocating a significant amount of resources for publishing content, these users often publish copyrighted material, which has legal implications for them [1, 2] . These observations raise the following question: what are the main incentives of (major) content publishers in BitTorrent?.. To answer this important question, we conduct a systematic study on the major publishers in BitTorrent. We show that these publishers can be broadly divided into two different groups: fake publishers who publish a large number of fake content and top publishers who publish a large number of often copyrighted content. We also identify the main characteristics (i.e. signature) of publishers in each group such as their seeding behavior and the popularity of their published content. We investigate the main incentives of major (non-fake) publishers and classify them into three categories (i) Private BitTorrent Portals that offer certain services and receive financial gain through ads, donations and fees, (ii) Promoting web sites that leverage published content at BitTorrent portals to attract users to their own web site for financial gain, and (iii) Altruistic Major Publishers. We characterize these three groups of publishers and present the estimated value (income) of the associated web sites to support our claims about their incentives.. The main contributions of this paper can be summarized as follows:. • We present a simple measurement methodology to monitor the content publishing activity in major BitTorrent portals. This methodology has been used to implement a system that continuously monitors and reports the content publishing activity in the Pirate Bay portal. The collected data is made publicly available through a web site.. • The distribution of the number of published content by each publisher is very skewed, i.e. a very small fraction of publishers (∼100) is responsible for a significant fraction of the published content (67%) and even more significant fraction of the downloads (75%). These major publishers can be further divided into three groups based on their incentives as follows: fake publishers, altruistic top publishers and profit-driven publishers.. • Fake publishers are either antipiracy agencies or malicious users who are responsible for 30% of the content and 25% of the downloads. These publishers sustain a continuous poisoning-like index attack [17] against BitTorrent portals that affects millions of downloaders.. • Profit-driven top publishers own fairly profitable web sites. They use major BitTorrent portals such as the Pirate Bay as a platform to advertise their web sites to millions of users. For this purpose they publish popular torrents where they attach the URL of their web sites in various manners. The publishers that pursue this approach are responsible for roughly 30% of the content and 40% of the downloads in BitTorrent.. The rest of the paper is organized as follows. Section 2 describes our measurement methodology. Sections 3 and 4 are dedicated to the identification of major publishers and their main characteristics (i.e. signature) respectively. In Section 5, we study the incentives that major publishers have to perform this activity. Section 6 presents other players that also benefit from content publishing. In Section 7 we describe our publicly available application to monitor content publishing activity in the Pirate Bay portal. Finally Section 8 discusses related work and Section 9 concludes the paper. . BitTorrent content publishers can be broadly divided into three groups as follows: (i) Altruistic users who publish content while consuming content that is published by other users. (ii) Fake publishers publish a significant number of files that are often Video and Software content from a few hosting providers. Due to the fake nature of their content, their torrents are unpopular and they need to seed all torrents to keep them alive. These publishers appear to be associated with antipiracy agencies or malicious users. We validate this hypothesis in the next section. (iii) Top publishers publish a large number of popular files (often copyrighted video) and remain for a long time in the associated torrents to ensure proper seeding of their published content. These publishers are located at hosting facilities or commercial ISPs. Their behavior suggests that these publishers are interested in the visibility of the published content possibly to attract a large number of users. The (cost of) allocated resources by these publishers along with legal implications of publishing copyrighted material cannot be considered as altruistic.. Therefore, the most conceivable incentive for these publishers appears to be financial profit. We examine this hypothesis in the rest of the paper. In this paper we studied the content publishing activity in BitTorrent from a socio-economic perspective. The results reveal that a small fraction of publishers are responsible for 67% of the published content and 75% of the downloads. We have carefully examined the incentives of major publishers and identified the following key characteristics: first, antipiracy agencies and malicious users perform a systematic poisoning index attack over major BitTorrent portals in order to obstruct download of copyrighted content and to spread malware, respectively. Overall, this attack contributes 30% of the content and attracts 25% (several millions) of downloads. Second, 37% of the (non-fake) published content is published by a small fraction of users that serve 54% of the (non-fake files) downloads. Our evidence suggests that these publishers have financial incentives for posting these contents on BitTorrent portals. The removal of these financial-driven publishers (e.g. by antipiracy actions) may significantly affect the popularity of these portals as well as the whole BitTorrent ecosystem. If this happens, will BitTorrent survive as the most popular file-sharing application without these publishers?. Significant research effort has focused on understanding different aspects of BitTorrent by gathering data from live swarms. Most of these studies have primarily examined demographics of users [12, 20, 22] and technical aspects of swarming mechanism [18, 13, 9] . However, to our knowledge the socio-economics aspects of BitTorrent that we addressed in this paper have received little attention. The most relevant work to this paper is a recent study that examined the weakness of BitTorrent privacy [6] . The authors analyzed the demography of BitTorrent content publishers and presented a highly skewed distribution of published content among them as well as the presence of a significant fraction of publishers located at hosting providers. This indeed validates some of our initial observations. In another study, Zhang et al. [22] presented the most extensive characterization of the BitTorrent ecosystem. This study briefly examined the demography of content publishers and showed a skewed distribution of the contributed content among them. The authors identify the publishers by their usernames. We have shown that this assumption may miss an important group of publishers who post fake content, i.e. fake publishers. Our work goes beyond the simple examination of demographics of content publishers. We identify, characterize and classify the major publishers and more interestingly reveal their incentives and their motivating business model.

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


Automated Handwashing Assistance For Persons With Dementia Using Video And A Partially Observable Markov Decision Process This paper presents a real-time vision-based system to assist a person with dementia wash their hands. The system uses only video inputs, and assistance is given as either verbal or visual prompts, or through the enlistment of a human caregiver's help. The system combines a Bayesian sequential estimation framework for tracking hands and towel, with a decision theoretic framework for computing policies of action. The decision making system is a partially observable Markov decision process, or POMDP. Decision policies dictating system actions are computed in the POMDP using a point-based approximate solution technique. The tracking and decision making systems are coupled using a heuristic method for temporally segmenting the input video stream based on the continuity of the belief state. A key element of the system is the ability to estimate and adapt to user psychological states, such as awareness and responsiveness. We evaluate the system in three ways. First, we evaluate the hand-tracking system by comparing its outputs to manual annotations and to a simple hand-detection method. Second, we test the POMDP solution methods in simulation, and show that our policies have higher expected return than five other heuristic methods. Third, we report results from a ten-week trial with seven persons moderate-to-severe dementia in a long-term care facility in Toronto, Canada. The subjects washed their hands once a day, with assistance given by our automated system, or by a human caregiver, in alternating two-week periods. We give two detailed case study analyses of the system working during trials, and then show agreement between the system and independent human raters of the same trials. Older adults living with cognitive disabilities (such as Alzheimer's disease or other forms of dementia) have difficulty completing activities of daily living (ADLs). Such older adults are usually assisted by a human caregivers, either family members or professionals, who monitor the activity in question and guide or prompt them when necessary. The dependence on a caregiver is difficult for the older adult, and can lead to feelings of anger and helplessness, particularly for private ADLs such as using the washroom. The demands and stress placed on caregivers is also significant due to the need for constant monitoring.. Computerized cognitive assistive technologies (CATs) are devices or systems that have the potential to allow this elderly population to complete such ADLs more independently by monitoring the users during the task, providing guidance or assistance when necessary, and in some cases alerting a caregiver when circumstances warrant. Ideally, such a system or device should be relatively non-invasive (e.g., not require special preparation for the user or constrain the user in any way), promote independent ADL completion (or partial completion) by the user, and relieve the caregiver of the burden of continual monitoring and guidance. This paper presents a real-time system for assisting persons with dementia during handwashing, an important ADL that often poses difficulty with this population. The system described here was built upon three previous versions, each relaxing restrictive assumptions present in its predecessor [1, 2] . In particular, the current system removes the need for worn markers to aid visual tracking (as used in [1] ) and includes an explicit model of uncertainty not present in [2] . Our system for assisting persons with dementia during handwashing consists of four basic components, as shown in Figure 1 . Video from a camera mounted above a sink is input to a system to track objects of interest (e.g., hands and towel). Object positions are passed to a belief monitor that estimates the progress of the user in the task as well as the user's mental state (see below). This is represented as a belief state or distribution over possible task points and mental states. A policy then maps the belief state to a system action: this can be a no-op, an audio or video prompt, or a call for human assistance. The system action is fed back to the belief monitor to enable sequential updates of the belief state. Finally, the prompter plays the prompt or makes the assistance call as appropriate. A key feature of our system is the use of computer vision to ensure that monitoring is as non-invasive or as "passive" as possible. The user is not required to perform any special steps while performing an ADL, wear or activate a special device, or otherwise change their routines. Our approach has been motivated in part by the desire to see how far computer vision can be pushed to create such non-invasive assistive technologies.. For tracking, we use a mixed-state data-driven Bayesian sequential estimation method using flocks of color features [3] , which allow objects to be robustly tracked over long periods of time, through large changes in shape and through partial occlusions. Our belief monitoring and policy systems use a partially observable Markov decision process (POMDP). We show how the handwashing task can be modelled using a POMDP, with rewards and costs associated with specific actions and states reflecting their relative value (in terms of task progress, annoyance, inconvenience, etc.). The solution to the POMDP determines a decision policy-that associates actions with specific belief statesthat optimizes long-term expected accumulated reward. The POMDP includes a model of the user's mental state, such as responsiveness or awareness, and allows monitoring of these user traits. We denote these mental states in this paper as the user's attitude. We use a heuristic for the temporal abstraction between tracking and behaviours.. Our previous work has demonstrated the effectiveness of the handtracker [3] , a fully observable version of the POMDP model [2] , and our initial tests with the current version of the system [4] . This paper expands on the work presented in [4] by showing results of the system performance taken from an eight-week trial of the system working with our target users: six persons with moderate to severe dementia in a long-term care facility in Toronto, Canada. The subjects washed their hands once a day, with assistance given by our automated system, or by a human caregiver, in alternating two-week periods. We give two case study analyses of the system working during trials. We then show the rewards gathered by the system, based on human annotations of the true state during each trial, and we show how the system is able to estimate the user's context and psychological state by comparing the system's state with that given by independent human raters of the same trials. Our clinical findings (i.e. the effect of the system on users) are reported in [5] .. The remainder of this paper is structured as follows. In Section 2, we give details about our computer vision system for tracking hands and towel. Section 3 discusses the POMDP, including specification, belief monitoring, temporal abstraction, and solution methods. Section 4 describes our experiments, and Section 5 shows our results both in simulations and in trials with our target users. Finally, we discuss related and future work and conclude. This paper described a system for assisting a person with dementia complete the task of handwashing that combines a flexible object tracker with monitoring and decision making using a partially observable Markov decision process (POMDP). The system was demonstrated during an eight-week user trial in Toronto, Canada, in summer 2007. The results showed that the system can provide assistance to this user group. However, a number of important challenges remain.. The first challenge is endowing assistive systems such as this one with the ability to adapt to users, both in the short and long term. Adaptivity implies the ability to adjust or modify the interaction strategy with a user over time, based on the changing abilities, needs or preferences of the user. Alzheimer's disease, as with many forms of dementia, is progressive: the capabilities and needs of sufferers change over time, requiring assistive technologies to adapt in order to provide sustained support. Our current system only has a limited adaptivity in that it can only learn a user's attitude based upon a fixed dynamics model. We have begun investigating Bayesian reinforcement learning methods in the context of handwashing assistants to make this system adaptive to users and able to learn their specific patterns of behaviors [43] . This learning method comes with a high complexity cost, however, and work is currently ongoing into reducing this. We believe that this complexity challenge is related to a second challenge: ensuring the computer vision models can generalise to other tasks. Adaptivity depends on input generality, since constraints posed by input specificity will reduce the potential for exploration by the system. At the same time, adaptivity is a key to reducing complexity, since new representations can be acquired "on the fly" and so the system does not need to take all possibilities into account a priori. We are currently beginning to address both of these key challenges, and will leverage their inter-dependence to develop novel algorithms for adaptivity and for computer vision.. A second major challenge is the specification or learning of the reward function. We currently specify this reward function by hand. However, the reward function encapsulates a great deal of prior information from carers and users, that should be carefully elicited from the target population. The benefit of framing the problem using a decision theoretic model is that it provides a the-oretically well founded model within which we can start to investigate questions of preference and value tradeoffs that are inherent in cognitive assistive technologies.. A number of other avenues are open for future work.. • In this paper, we described very preliminary results showing that a handwashing assistant could be used to monitor general user health (e.g., dementia level). We hope that this monitoring capability can be extended and improved, rendering these technologies doubly useful to carers and users.. • A benefit of the system we have developed is its ability to generalise to other ADL. We are currently looking at implementing the same system for other important washroom ADL, such as toothbrushing, and eventually, toileting.. • We are investigating methods for learning the model from data, and for integrating the tracker uncertainty into the decision making.. • Using stereo depth information for tracking • The prompts are currently "canned" and do not change over time. We are investigating methods for making the prompts adaptive to specific users.. • The system currently has no "ears", and so cannot respond when users say something (which they often do). We plan to add some speech recognition capabilities to the system to overcome this.. • Finally, we are looking into other non-invasive sensors to provide more inputs to the POMDP models. One example is the use of sound (microphones) to detect if the water is running or not.

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


A Hardware Implementation of a Run-Time Scheduler for Reconfigurable Systems Abstract-New generation embedded systems demand high performance, efficiency, and flexibility. Reconfigurable hardware can provide all these features. However, the costly reconfiguration process and the lack of management support have prevented a broader use of these resources. To solve these issues we have developed a scheduler that deals with task-graphs at run-time, steering its execution in the reconfigurable resources while carrying out both prefetch and replacement techniques that cooperate to hide most of the reconfiguration delays. In our scheduling environment, task-graphs are analyzed at design-time to extract useful information. This information is used at run-time to obtain near-optimal schedules, escaping from local-optimum decisions, while only carrying out simple computations. Moreover, we have developed a hardware implementation of the scheduler that applies all the optimization techniques while introducing a delay of only a few clock cycles. In the experiments our scheduler clearly outperforms conventional run-time schedulers based on as-soon-as-possible techniques. In addition, our replacement policy, specially designed for reconfigurable systems, achieves almost optimal results both regarding reuse and performance.Index Terms-Field-programmable gate arrays (FPGAs), reconfigurable architectures, task scheduling. During recent years many research groups have developed techniques that attempt to reduce the reconfiguration overhead. An interesting survey of most of them can be found in [4] .. Many authors, such as [1] , [5] - [8] have proposed to build a HW multitasking platform by dividing the entire reconfigurable area into smaller RUs. The first implementation of such a system in a commercial FPGA was presented by Marescaux et al. in [1] . In this work, the authors propose to divide the entire reconfigurable area into identical tiles, connected among them by an interconnection network (ICN). Recently, Nollet et al. [9] have proposed to extend this approach applying the idea of configuration hierarchy to build a reconfigurable multi-processor system-on-a-chip (MP-SoC). Basically, instead of executing dedicated HW tasks in the reconfigurable resources, they use these resources to implement programmable softcores that will execute SW tasks. They have developed task mapping heuristics to assign tasks to the different processors (both hardand soft-processors), taking into account the communication topology. We believe that the ideas of this work are compatible with our approach, although we are not focusing on soft-cores.. In [5] , Walder et al. present a run-time environment to execute HW tasks by partially reconfiguring a Xilinx Virtex II PRO. This work does not deal with task-graphs, but with independent tasks, and the main objective is to develop a partition technique to decide the optimal size of the RUs. In our work, we assume that this has already been decided, hence this work is again orthogonal to our work.. In [6] , Qu et al. propose adding more reconfiguration controllers to carry out several reconfigurations in parallel. This could improve the efficiency of a reconfigurable multitasking system, but currently the commercial platforms only include one reconfiguration controller.. In [10] and [11] , the authors present two interesting approaches for HW multitasking. In this case, the objective is to take full advantage of the data-parallelism for a given application by replicating the same task several times. This is again compatible with our work. Several versions of the same task with different level of data parallelism can be identified at design-time, and at run-time the OS or the middleware could select the appropriated one and then send it to our DAG scheduler. In fact this is what we have done in order to generate one of the benchmarks that we will use in the experimental section (Parallel-JPEG).. Other interesting contributions for HW multitasking systems are the research efforts to develop OS support to simplify the use of the reconfigurable HW. Some relevant examples are the works developed by Kosciuszkiewicz et al. [12] and K.-H. So et al. [13] . They propose to extend an embedded Linux OS to support HW tasks. The idea is to provide support to let the user transparently deal with HW tasks at run-time as they were regular threads. A related topic is how to decide, again transparently to the user, which tasks must be executed in the reconfigurable resources. HW/SW partitioning has been a very active research field during the last decade: in [14] , Fu and Compton deal with a HW/SW multitasking system, which includes reconfigurable resources and a UltraSparc processor. In order to improve the performance some tasks are assigned to the reconfigurable HW. They have developed several algorithms to select these tasks taking into account the needs of each application, the available resources, and the reconfiguration overheads.. Previously some research groups have proposed to include HW scheduling support for reconfigurable systems. In [7] , the authors propose an HW micro-architecture to deal with task management at run-time efficiently applying a list-scheduling heuristic. However, the authors did not implement their design, but they only included it in their specific simulation environment. In [8] , the authors have extended [7] in order to support control dependencies in the task graph. However, again they do not implement their approach. Moreover, they assume that all the reconfigurations can be carried out in parallel; hence they do not need to schedule the reconfigurations. This simplifies considerably their scheduler. However, as it was explained before, currently this is not a realistic assumption. In addition, they do not provide replacement support, and they follow a greedy listscheduling approach that cannot escape from local-optimum decisions. In [15] , the authors propose a scheduling methodology for a real-time system based on reconfigurable HW and implement it in an FPGA. They use an earliest-deadline first approach but grouping several tasks in order to apply efficiently full reconfigurations. Since they do not support partial reconfiguration, they do not have to apply any prefetch approach or a replacement policy because they only have one RU. In addition they deal with independent periodic tasks; hence the scheduling support that they have developed is completely different from our approach. Hence our work clearly provides important novel contributions. First, we not only provide a prefetch approach, which was initially proposed in [16] , but also a replacement technique designed to collaborate with our scheduler and improve the overall results. Second, we have found a simple way to escape from local optimum decisions. In this regard, many researchers have proposed offline scheduling techniques that can escape from local optimum solutions. However, when dealing with online systems this is much more complex and only simple (and mostly greedy) algorithms are used as list-scheduling or earliest-deadline first. Third, we have implemented our scheduler and tested it in an FPGA using graphs extracted from actual multimedia applications. Fourth, we have implemented an equivalent SW version and analyzed the design tradeoffs.. Our research group has been already active in this field for many years. We already presented a scheduling environment for reconfigurable systems in [17] and [18] . In these works we proposed several techniques that also deal with task-graphs at run-time. However, in a recent work [19] we identified that even our simple techniques generate important overheads when dealing at run-time with complex data structures, such as task-graphs, especially if they were executed in an embedded processor. Hence we decided to develop a generic HW task-graph execution manager for reconfigurable systems [20] . This module receives as inputs a task-graph and its schedule and steers the execution of that task-graph following the instructions given in the schedule. The main achievement presented here was a HW implementation of that manager, which significantly speeds up this management process with respect to an equivalent SW version.. The next step has been to add a scheduling layer to this management module, thereby developing a task-graph scheduler for reconfigurable systems. Of course, we have tried to keep those ideas that proved to be useful in our previous work, such as a replacement policy that collaborates with the scheduler, and trying to extract useful information at design-time. However, we have developed new techniques that can be efficiently implemented in HW, and we have extracted some extra information at design-time. A preliminary version of this work has been published in [21] . At that time our scheduler applied a simple ASAP approach, and our HW implementation was very area-hungry. Since then, we have developed a new scheduler that delays some reconfigurations in order to escape from local-optimum decisions, we have drastically improved the area scalability of our design, we have improved the replacement strategy, and we have carried out new experiments in order to better test our approach.

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


An interactive bi-objective shortest path approach: searching for unsupported nondominated solutions In many network routing problems several conflicting objectives must be considered. Even for the biobjective shortest path problem, generating and presenting the whole set of nondominated solutions (paths) to a decision maker, in general, is not effective because the number of these paths can be very large. Interactive procedures are adequate to overcome these drawbacks. Current et al. [1] proposed an interactive approach based on a NISE-like procedure to search for nondominated supported solutions and using auxiliar constrained shortest path problems to carry out the search inside the duality gaps. In this paper we propose a new interactive approach to search for unsupported nondominated solutions (lying inside duality gaps) based on a k-shortest path procedure. Both approaches are compared.1999 Elsevier Science Ltd. All rights reserved.Network routing problems are generally multidimensional in nature, and in many cases the explicit consideration of multiple objectives is adequate. Objectives related to cost, time, accessibility, environmental impact, reliability and risk are appropriated for selecting the most satisfactory (''best compromise'') route in many problems. In general there is no single optimal solution in a multiobjective problem but rather, a set of nondominated solutions from which the decision maker must select the most satisfactory. However, generating and presenting the whole set of nondominated paths to a decision maker, in general, is not effective because the number of these paths can be very large. Interactive procedures are adequate to overcome these drawbacks. This paper introduces an interactive procedure to assist the decision maker in identifying the ''best compromise'' solution for the bi-objective shortest path problem. The procedure incorporates an efficient k-shortest path algorithm to identify nondominated solutions lying inside duality gaps. Test problem results indicate that the procedure can be readily executed on a PC for large-scale instances of problems. Shortest path problems arise in a wide variety of practical problem settings, both as stand-alone models and as subproblems in more complex problem settings. The shortest path problem is quoted as the most common problem in combinatorial operations research [2] due to its numerous applications as the largest capacity path problem, the quickest path problem, the most reliable path problem, the minimum cost-time ratio problem, the minimum cost-reliability ratio problem and various routing problems. Ahuja et al. [3] describe applications in the telecommunications and transportation industries (whenever a message or a vehicle must be sent between two geographical locations as quickly or as cheaply as possible) and in urban traffic planning (urban planners use complex optimization models for computing traffic flow patterns based on shortest paths from origins to destinations). The wayfinding in emergency evacuations [4] , the location of collective facilities (where the accessibility is a main concern) in an urban or regional context and the traffic assignment problem in a transportation network [5] are other practical examples which include the evaluation of shortest paths. Elimam et al. [6] present other civil engineering applications using shortest path-based models: the study of optimal sequences of wastewater treatment processes reducing pollutants levels at minimum cost to an acceptable standard (hydraulics) and the determination of minimum cost, energy efficient composite wall and roof structures (building structures). Consequently, many algorithmic approaches for location problems, vehicle routing, urban traffic engineering and even other problems that appear to have very different structures (as wastewater treatment or structures design) rely on the solution of shortest path problems.. Expressions as ''cheap and quickest'', ''cheap and more reliable'', ''cheap with acceptable standard'' or ''cheap and energy efficient'' come frequently associated with the shortest path problem -they suggest that models can be more realistic if more than one criterion is explicitly considered. In fact, it is well-recognized that many network routing problems are multiobjective in nature [7] . This has led to significant research effort devoted to formulating and solving multiobjective shortest path problems. The criteria, in addition to total path length (or cost), which have been addressed in these problems include: accessibility to the path [8, 9] , travel time [10, 14] demand satisfaction [15] , environmental protection [16] , risk minimization [17] , and reliability [18] .. Efficient exact algorithms exist for the single objective shortest path problem [19] . Unfortunately, the multiobjective case (including the bi-objective case) is NP-complete [20] . Although the calculation of the whole set of the nondominated solutions in the bi-objective case can be done easily, it must be remarked that the number of the nondominated solutions can be very large. So, this is not, in general, an effective way of presenting alternative choices to a decision maker.. Note that in multiobjective shortest path problems the nondominated solutions are those paths where the values of the objective functions are such that it is not possible to find another feasible path better than the current one in at least one objective function without worsening the value of at least another objective.. Interactive procedures are adequate to overcome these drawbacks. Current et al. [1] proposed an interactive approach for the bi-objective shortest path problem. It starts by identifying a subset of the supported nondominated solutions using a NISE-like algorithm [21] . The search for unsupported nondominated solutions is carried out solving shortest path instances with additional linear constraints. Due to the computational complexity of the constrained shortest path problem Current et al. in [1] propose an interactive search of the previously chosen duality gap(s) based on the constrained shortest path algorithm of Handler and Zang [22] . To improve the computational efficiency of the approach, Clı´maco et al. [23] and Coutinho-Rodrigues et al. [24] proposed a different related (to Current et al. [1] ) approach using a k-shortest algorithm for searching nondominated solutions inside duality gaps.. In this paper we compare the two approaches mentioned above: computational results show that the k-shortest path-based approach is much faster than the constrained shortest path-based approach. In this paper we compare two approaches for searching nondominated solutions inside duality gaps concerning bi-objective shortest path problems.. Two major points must be emphasized from the results:. -The approach using a k-shortest path algorithm is unquestionably faster than the approach using a constrained shortest path algorithm.. -Although our implementation of the algorithm by Azevedo et al. [28] [29] [30] does not take in account the most recent computational improvements proposed by its authors, it works in our problem clearly better than the k-shortest path algorithm by Dreyfus [27] .

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


Approximate Sum-Capacity of the Y-channel A network where three users want to establish multiple unicasts between each other via a relay is considered. This network is called the Y-channel and resembles an elemental ingredient of future wireless networks. The sum-capacity of this network is studied. A characterization of the sum-capacity within an additive gap of 2 bits, and a multiplicative gap of 4, for all values of channel gains and transmit powers is obtained. Contrary to similar setups where the cut-set bounds can be achieved within a constant gap, they can not be achieved in our case, where they are dominated by our new genie-aided bounds. Furthermore, it is shown that a time-sharing strategy, in which at each time two users exchange information using coding strategies of the bi-directional relay channel, achieves the upper bounds to within a constant gap. This result is further extended to the K-user case, where it is shown that the same scheme achieves the sum-capacity within 2 log(K − 1) bits.Multi-way relaying, sum-capacity, functional decode-and-forward, constant gap.

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


On the approximation ability of evolutionary optimization with application to minimum set cover Evolutionary algorithms (EAs) are heuristic algorithms inspired by natural evolution. They are often used to obtain satisficing solutions in practice. In this paper, we investigate a largely underexplored issue: the approximation performance of EAs in terms of how close the solution obtained is to an optimal solution. We study an EA framework named simple EA with isolated population (SEIP) that can be implemented as a single-or multi-objective EA. We analyze the approximation performance of SEIP using the partial ratio, which characterizes the approximation ratio that can be guaranteed.Specifically, we analyze SEIP using a set cover problem that is NP-hard. We find that in a simple configuration, SEIP efficiently achieves an H n -approximation ratio, the asymptotic lower bound, for the unbounded set cover problem. We also find that SEIP efficiently achieves an (H k − k−1 8k 9 )-approximation ratio, the currently best-achievable result, for the k-set cover problem. Moreover, for an instance class of the k-set cover problem, we disclose how SEIP, using either one-bit or bit-wise mutation, can overcome the difficulty that limits the greedy algorithm. Evolutionary algorithms (EAs) [3] have been successfully applied to many fields and can achieve extraordinary performance in addressing some real-world hard problems, particularly NP-hard problems [16, 18, 17, 4] . To gain an understanding of the behavior of EAs, many theoretical studies have focused on the running time required to achieve exact optimal solutions [14, 33, 26, 2] . In practice, EAs are most commonly used to obtain satisficing solutions, yet theoretical studies of the approximation ability of EAs have only emerged recently.. He and Yao [15] first studied conditions under which the wide-gap far distance and the narrow-gap long distance problems are hard to approximate using EAs. Giel and Wegener [12] investigated a (1+1)-EA for a maximum matching problem and found that the time taken time to find exact optimal solutions is exponential but is only O(n 2⌈1/ǫ⌉ ) for (1 + ǫ)-approximate solutions, which demonstrates the value of EAs as approximation algorithms.. Subsequently, further results on the approximation ability of EAs were reported. For the (1+1)-EA, the simplest type of EA, two classes of results have been obtained. On one hand, it was found that the (1+1)-EA has an arbitrarily poor approximation ratio for the minimum vertex cover problem and thus also for the minimum set cover problem [11, 28] . On the other hand, it was also found that (1+1)-EA provides a polynomial-time randomized approximation scheme for a subclass of the partition problem [32] . Furthermore, for some subclasses of the minimum vertex cover problem for which the (1+1)-EA gets stuck, a multiple restart strategy allows the EA to recover an optimal solution with high probability [28] . Another result for the (1+1)-EA is that it improves a 2-approximation algorithm to a (2 − 2/n)-approximation on the minimum vertex cover problem [10] . This implies that it might sometimes be useful as a post-optimizer.. Recent advances in multi-objective (usually bi-objective) EAs have shed light on the power of EAs as approximation optimizers. For a single-objective problem, multi-objective reformulation introduces an auxiliary objective function for which a multi-objective EA is used as the optimizer. Scharnow et al.. [ 30] first suggested that multi-objective reformulation could be superior to use of a single-objective EA.. This was confirmed for various problems [24, 25, 11, 27] by showing that while a single-objective EA could get stuck, multi-objective reformulation helps to solve the problems efficiently.. Regarding approximations, it has been shown that multi-objective EAs are effective for some NP-hard problems. Friedrich et al. [11] proved that a multi-objective EA achieves a (ln n)-approximation ratio for the minimum set cover problem, and reaches the asymptotic lower bound in polynomial time.. Neumann and Reichel [23] showed that multi-objective EAs achieve a k-approximation ratio for the minimum multicuts problem in polynomial time.. In the present study, we investigate the approximation ability of EAs by introducing a framework called simple evolutionary algorithm with isolated population (SEIP), which uses an isolation function to manage competition among solutions. By specifying the isolation function, SEIP can be implemented as a single-or multi-objective EA. Multi-objective EAs previously analyzed [22, 11, 23] can be viewed as special cases of SEIP in term of the solutions maintained in the population. By analyzing the SEIP framework, we obtain a general characterization of EAs that guarantee approximation quality.. We then study the minimum set cover problem (MSCP), which is an NP-hard problem [9] . We prove that for the unbounded MSCP, a simple configuration of SEIP efficiently obtains an H k -approximation ratio (where H k is the harmonic number of the cardinality of the largest set), the asymptotic lower bound [9] . For the minimum k-set cover problem, this approach efficiently yields an (H k − k−1 8k 9 )-approximation ratio, the currently best-achievable quality [13] . Moreover, for a subclass of the minimum k-set cover problem, we demonstrate how SEIP, with either one-bit or bit-wise mutation, can overcome the difficulty that limits the greedy algorithm.. The remainder of the paper is organized as follows. After introducing preliminaries in Section 2, we describe SEIP in Section 3 and characterize its behavior for approximation in Section 4. We then analyze the approximation ratio achieved by SEIP for the MSCP in Section 5. In Section 6 we conclude the paper with a discussion of the advantages and limitations of the SEIP framework. We studied the approximation performance of an EA framework. SEIP introduces an isolation function to manage competition among solutions, which can be configured as a single-or multi-objective EA.. We analyzed the approximation performance of SEIP using the partial ratio and obtained a general characterization of the SEIP approximation behavior. Our analysis confirms that SEIP can achieve a guaranteed approximate solution: it tries to optimize the partial ratio of solutions in every isolation by finding good partial solutions, then these partial solutions form a feasible solution with a good approximation ratio.. We studied the performance of SEIP for the MSCP, which is NP-hard. Previous studies [11, 28] showed that (1+1)-EA is not a good solver for MSCP, while a multi-objective EA achieves a similar approximation ratio to that of the greedy algorithm. Our analysis extends previous work to show that for the unbounded MSCP, SEIP achieves an H k -approximation ratio (where H k is the harmonic number of the cardinality of the largest set), the asymptotic lower bound. For the minimum k-set cover problem, it achieves an (H k − k−1 8k 9 )-approximation ratio, the current best-achievable result [13] , which is beyond the ability of the greedy algorithm. Moreover, for a subclass of the MSCP, we show how SEIP with either one-bit or bit-wise mutation can overcome the difficulty that limits the greedy algorithm.. We discussed some advantages and limitations of SEIP for approximations. To prove the SEIP approximation ratio for the MCSP problem, we used SEIP to simulate the greedy algorithm. Since the greedy algorithm is a general scheme for approximations and has been analyzed for many problems, SEIP analysis can be extended to cases for which the greedy algorithm has been applied, and therefore we can easily show that SEIP is a 1 k -approximation algorithm for k-extensible systems [21] , including b-matching, maximum profit scheduling and maximum asymmetric TSP problems. Moreover, to prove the approximation ratio of SEIP for the minimum k-set cover problem, we used SEIP to simulate the GAWW algorithm, which implies that SEIP also has extra behaviors that provide opportunities to exceed the greedy algorithm. However, limitations of SEIP are found from Theorem 2. There are some situations in which SEIP may fail. SEIP is required to flip a number of bits at a time, which depends on n, to achieve a good solution. In this situation, to flip the required number of bits, one-bit mutation is limited since it only flips one bit at a time, and bit-wise mutation is also limited as it requires exponential time. Further designs for elegant mutation operators may be possible. However, since the solution space has size 2 n , any mutation has to assign an exponentially small probability to some distant mutations. Once these distant mutations are required, exponential time is required.. Another view of this limitation is that since the mutation operator only allows limited steps, SEIP may also over-optimize partial ratios, just like the greedy algorithm over-optimizes each step.. Our theoretical analysis suggests that EAs can achieve solutions with guaranteed performance. We believe that guaranteed and better approximation performance can be achieved by better EA design in the future.

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


On the linear ranking problem for integer linear-constraint loops In this paper we study the complexity of the Linear Ranking problem: given a loop, described by linear constraints over a finite set of integer variables, is there a linear ranking function for this loop? While existence of such a function implies termination, this problem is not equivalent to termination. When the variables range over the rationals or reals, the Linear Ranking problem is known to be PTIME decidable. However, when they range over the integers, whether for single-path or multipath loops, the complexity of the Linear Ranking problem has not yet been determined. We show that it is coNP-complete. However, we point out some special cases of importance of PTIME complexity. We also present complete algorithms for synthesizing linear ranking functions, both for the general case and the special PTIME cases. Termination analysis has received a considerable attention and nowadays several powerful tools for the automatic termination analysis of different programming languages and computational models exist [1, 21, 27, 43] . Much of the recent development in termination analysis has benefited from techniques that deal with one loop at a time, where a loop is specified by a loop guard and a (non-iterative) loop body.. Very often, these loops are abstracted so that the state of the program during the loop is represented by a finite set of integer variables, the loop guard is a conjunction of linear inequalities, and the body modifies the variables in an affine linear way, as in the following example:. where tagged variables represent the values at the completion of an iteration. When the variables are modified so that they are not Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. POPL'13, January 23-25, 2012, Rome, Italy. Copyright c 2013 ACM 978-1-4503-1832-7/13/01. . . $10.00 affine linear functions of the old ones, the effect is sometimes captured (or approximated) by means of linear constraints. E.g., the C language loop "while (4*x>=y && y>=1) do x=(2*x+1)/5;", which involves integer division, can be represented by linear constraints as follows (since 2*x+1 is always positive). Linear constraints might also be used to model changes to data structures, the variables representing a size abstraction such as length of lists, depth of trees, etc. [17, 34, 35, 43] . For a precise definition of the loop representations we consider, see Sec. 2; they also include multipath loops where alternative paths in the loop body are represented. A standard technique to prove the termination of a loop is to find a ranking function. Such a function maps a program state (a valuation of the variables) into an element of some well-founded ordered set, such that the value descends (in the appropriate order) whenever the loop completes an iteration. Since descent in a well-founded set cannot be infinite, this proves that the loop must terminate. This definition of "ranking function" is very general; in practice, researchers have often limited themselves to a convenient and tractable form of ranking function, so that an algorithm to find the function-if there is one-might be found.. A frequently used class of ranking functions is based on affine linear functions. In this case, we seek a function ρ(x1, . . . , xn) = a1x1 + · · · + anxn + a0, with the rationals as a co-domain, such that (i) ρ(x) ≥ 0 for any valuationx that satisfies the loop guard; and (ii) ρ(x) − ρ(x ) ≥ 1 for any transition that starts inx and continues inx . This automatically induces the piecewise-linear ranking function: f (x) = ρ(x) + 1 ifx satisfies the loop guard and 0 otherwise, with the non-negative rationals as a co-domain but ordered w.r.t. a b iff a + 1 ≤ b (which is well-founded). For simplicity, we call ρ itself a linear ranking function instead of referring to f .. An algorithm to find a linear ranking function using linear programming (LP ) was found by multiple researchers in different places and times and in some alternative versions [3, 20, 25, 36, 38, 42] . Since LP has a polynomial time complexity, most of these methods yield polynomial-time algorithms. Generally speaking, they are based on the fact that LP can precisely decide whether a given inequality is implied by a set of other inequalities, and can even be used to generate any implied inequality. After all, conditions (i) and (ii) above are inequalities that should be implied by the constraints that define the loop guard and body. This approach can, in a certain sense, be sound and complete Soundness means that it produces a correct linear ranking function, if it succeeds; completeness means that if a linear ranking function exists, it will succeed. In other words, there are no false negatives. A completeness claim appears in some of the references, and we found it cited several times. In our opinion, it has created a false impression that the Linear Ranking problem for linearconstraint loops with integer variables was completely solved (and happily classified as polynomial time).. The fly in the ointment is the fact that these solutions are only complete when the variables range over the rationals, which means that the linear ranking function has to fulfill its requirements for any rational valuation of the variables that satisfies the loop guard. But this may lead to a false negative if the variables are, in fact, integers. The reader may turn to the two loops above and note that both of them do not terminate over the rationals at all (for the first, consider x1 = x2 = 1 2 ; for the second, x1 = 1 4 and x2 = 1). But they have linear ranking functions valid for all integer valuations, which we derive in Sec. 3.4. This observation has led us to investigate the Linear Ranking problem for single-path and multipath linear constraint loops. We present several fundamental new results on this problem. We have confirmed that this problem is indeed harder in the integer setting, proving it to be coNP-complete (as a decision problem), even for loops that only manipulate integers in a finite range. On a positive note, this shows that there is a complete solution, even if exponential-time. We give such a solution both to the decision problem and to the synthesis problem. The crux of the coNPcompleteness proof, and the corresponding synthesis algorithm, is that we rely on the generator representation of the transition polyhedron defined by the loop constraints. We provide sufficient and necessary conditions for the existence of a linear ranking function that use the vertices and rays of this representation.. Another positive news for the practically-minded reader is that some special cases of importance do have a PTIME solution, because they reduce (with no effort, or with a polynomial-time computation) to the rational case. We present several such cases, which include, among others, loops in which the body is a sequence of linear affine updates with integer coefficients, as in loop (1) above; and the condition is defined by either an extended form of difference constraints, a restricted form of Two Variables Per Inequality constraints, or a cone (constraints where the free constant is zero). Some cases in which the body involves linear constraints are also presented. All the algorithms presented in this paper have been implemented, and can be tried out online (see Sec. 5).. Our results should be of interest to all users of linear ranking functions, and in fact their uses go beyond termination proofs. For example, they have been used to provide an upper bound on the number of iterations of a loop in program complexity analysis [2, 3] and to automatically parallelize computations [24, 25] . We remark that in termination analysis, the distinction between integers and rationals has already been considered, both regarding ranking-function generation [13, 22] and the very decidability of the termination problem [9, 16, 45] . All these works left the integer case open. Interestingly, our results provide an insight on how to make the solution proposed by Bradley et al. [13] complete (see Sec. 6).. This paper is organized as follows. Sec. 2 gives definitions and background information regarding linear constraint loops, linear ranking functions and the mathematical notions involved. Sec. 3 proves that the decision problem, denoted LINRF(Z), is coNPcomplete, and also presents an exponential-time ranking-function synthesis algorithm. Sec. 4 discusses PTIME-solvable cases. Sec. 5 describes a prototype implementation. Sec. 6 surveys related previous work. Sec. 7 concludes. We have studied the Linear Ranking problem for single-path and multipath linear constraint loops and observed the difference between the LINRF(Q) problem, where variables range over the rationals, and the LINRF(Z) problem, where variables only take integer values. In practice, the latter is more common, but the complexity of the problem has not been studied before; the common approach has been to relax the problem to the rationals, where complete, polynomial-time decision procedures have been known.. We have confirmed that LINRF(Z) is a harder problem, proving it to be coNP-complete. On a positive note, this shows that there is a complete solution, even if exponential-time. We further showed that some special cases of importance do have a PTIME solution.. The latter results arise from a proof that for integer polyhedra, LINRF(Z) and LINRF(Q) are equivalent. Interestingly, this is not the case for termination in general. For example, the transition polyhedron of the loop "while x ≥ 0 do x = 10 − 2x" is integral; the loop terminates when the variables range over Z but does not terminate when they range over Q, specifically for x = 3 1 3 . Note that this loop does not have a LRF over the integers.. A more general notion of ranking function applies to an arbitrary control-flow graph with transitions specified by source and target nodes as well as linear constraints on the values of variables. In this setting, one seeks to associate a (possibly different) affine function ρν with each node ν, so that on a transition from ν to ν we have ρν (x) > ρ ν (x ). Such functions can be found by LP , a procedure complete over the rationals, using a simple extension of the solution for the loops we have discussed [3, 36] . The considerations regarding the complexity of the corresponding problem over integers are essentially the same as those we have presented, and we preferred to use the simpler model for clearer presentation.. In all examples that we have discussed in this paper, when a loop has a LRF over Z but not over Q, then the loop did not terminate over Q. This is, however, not the case in general. A counter-example can be constructed by combining (i.e., executing simultaneously) the loop of Ex. 3.6 and Loop (1) of Sec. 1.. In the context of complexity (cost) analysis, there is a special interest in LRFs that decrease at least by 1 in each iteration, since they bound the number of iterations of a given loop. In order to get tight bounds, even if Q has a LRF it might be worthwhile to compute one for I(Q). To see this, let us add 4x1 ≥ 3 to the condition of Loop (1) in Sec. 1. Then, both Q and I(Q) have LRFs. For I(Q) the most tight one (under the requirement to decrease by at least 1) is f1(x1, x2) = x1 + x2 − 1, while for Q it is f2(x1, x2) = 2x1 + 2x2 − 2. Hence, a better bound is obtained using I(Q). The same observation applies to loop parallelization: the functions' value gives the schedule's latency (depth of the computation tree) and a lower value is preferable. There are several works [3, 20, 36, 38, 42] that directly address the LINRF(Q) problem for SLC or MLC loops. In all these works, the underlying techniques allow synthesizing LRFs and not only deciding if one exists. The common observation to all these works is that synthesising LRFs can be done by inferring the implied inequalities of a given polyhedron (the transition polyhedron of the loop), in particular inequalities like conditions (4) and (5) of Def. 2.3 that define a LRF . Regarding completeness, all these methods are complete for LINRF(Q) but not for LINRF(Z). They can also be used to approximate LINRF(Z) by relaxing the loop such that its variables range over Q instead of Z, thus sacrificing completeness. All these methods have a corresponding PTIME algorithm. Exceptions in this line of research are the work of Bradley et al. [13] and Cook et al. [22] that directly address the LINRF(Z) problem for MLC loops.. Sohn and Van Gelder [42] considered MLC loops with variables ranging over N. These are abstractions of loops from logic programs. The loops were, in fact, relaxed from N to Q+ before seeking a LRF , however, this is not explicitly mentioned. The main observation is that the duality theorem of LP [41, p. 92] can be used to infer inequalities that are implied by the transition polyhedron. The authors also mention that this was observed before by Lassez [33] in the context of solving CLP(R) queries. Completeness was not addressed in this work, and the PTIME complexity was mentioned but not formally addressed. Later, Mesnard and Serebrenik [36] formally proved that the techniques of Sohn and Van Gelder [42] provide a complete PTIME method for LINRF(Q), also for the case of MLC loops. They pointed out the incompleteness for LINRF(Z).. Probably the most popular work on the synthesis of LRFs is the one of Podelski and Rybalchenko [38] . They also observed the need for deriving inequalities implied by the transition polyhedron, but instead of using the duality theorem of LP they used the affine form of Farkas' lemma [41, p. 93] . Completeness was claimed, and the statement did not make it clear that the method is complete for LINRF(Q) but not for LINRF(Z). This was clarified, however, in the PhD thesis of Rybalchenko [40] .. Bagnara et al. [6] proved that the methods of Sohn and Van Gelder [36] and Podelski and Rybalchenko [38] are actually equivalent, i.e., they compute the same set of LRFs. They also showed that the method of Podelski and Rybalchenko can, potentially, be more efficient since it requires solving rational constraints systems with fewer variables and constraints.. The earliest appearances of a solution based on Farkas' Lemma, that we know of, are by Colón and Sipma [20] , in the context of termination analysis, and by Feautrier [25] , in the context of automatic parallelization of computations. Colón and Sipma did not claim that the problem can be solved in polynomial time, and indeed their implementation seems to have exponential complexity since they use generators and polars, despite the similarity of the underlying theory to that of [38] . Completeness was claimed, however it was not explicitly mentioned that the variables range over Q and not Z.. Feautrier [25] described scheduling of computations that can be described by recursive equations. An abstraction to a form similar to an MLC loop allowed him to compute a so-called schedule, which is essentially a ranking function, but used backwards, since the computations at the bottom of the recursion tree are to be completed first.. Cook et al. [22] observed that the Farkas-lemma based solution is complete for LINRF(Z) when the input MLC loop is specified by integer polyhedra. They also mention that any polyhedron can be converted to an integer one, and that this might increase its size exponentially. Unlike our work, they do not address PTIME cases or the complexity of LINRF(Z). In fact, the main issue in that work is the synthesis of ranking functions for bit-victors relations.. Bradley et al. [13] directly addressed the LINRF(Z) problem for MLC loops, and stated that the methods of Colón and Sipma [20] and Podelski and Rybalchenko [38] are not complete for LINRF(Z). Their technique is based on the observation that if there is a LRF , then there exists one in which each coefficient λi has a value in the interval [−1, 1], and moreover with denominators that are power of 2. Using this observation, they recursively search for the coefficients starting from a region defined by a hyperrectangle in which each λi is in the interval [−1, 1]. Given a hyperrectangle, the algorithm first checks if one of its corners defines a LRF , in which case it stops. Otherwise, the region is either pruned (if it can be verified that it contains no solution), or divided into smaller regions for recursive search. Testing if a region should be pruned is done by checking the satisfiability of a possibly exponential (in the number of variables) number of Presburger formulas. The algorithm will find a LRF if exists, but it might not terminate if no LRF exists. To make it practical, it is parametrized by the search depth, thus sacrificing completeness. It is interesting to note that the search-depth parameter in their algorithm actually bounds the bit-size of the LRF coefficients. Our Cor. 3.21 shows that it is possible to deterministically bound this depth, that turning their algorithm into a complete one, though still exponential.. Codish et al. [19] studied the synthesis of LRFs for SLC loops with size-change constraints (i.e., of the form xi ≥ x j + c where c ∈ {0, 1}), and monotonicity constraints (i.e., of the form X ≥ Y + c, where X and Y are variables or primed variables, and c ∈ {0, 1}). In both cases the variables ranged over N. For sizechange constraints, they proved that the loop terminates iff a LRF exists, moreover, such function has the form λi · xi with λi ∈ {0, 1}. For the case of monotonicity constraints, they proved that the loop terminates iff a LRF exists for the balanced version of the loop, and has the form λi · xi with λi ∈ {0, ±1}. Intuitively, a balanced loop includes x i ≥ x j +c iff it includes xi ≥ xj +c. They showed how to balance the loop while preserving its termination behavior. Recently, Bozga et al. [10] presented similar results for SLC loops defined by octagonal relations.. Bradley et al. [12] extended the work of Colón and Sipma [20] and searched lexicographic LRFs. In [14, 15] they considered multipath loops with polynomial transitions and the synthesis of lexicographic polynomial ranking functions, where the notion of ranking functions was also relaxed to functions that eventually decrease. Cousot [23] used Lagrangian relaxation for inferring possibly nonlinear ranking functions. In the linear case, Lagrangian relaxation is similar to the affine form of Farkas' lemma.. Alias et al. [3] again rediscovered the Farkas-lemma based solution for LINRF(Q), or rather "ported" it from the former work by Feautrier, but this time for termination and cost analysis. Like [12] , they construct lexicographic LRFs, however, they do it for programs with an arbitrary control-flow graph, and they prove completeness of their procedure. Their goal was to use these functions to derive cost bounds (like a bound on the worst-case number of transitions in terms of the initial state); this bound is (when it can be found) a polynomial, whose degree is at most the dimension of the (co-domain of the) lexicographic ranking function. Alias et al.'s construction produces a function of minimum dimension. They, too, have relaxed the problem from integers to rationals and failed to state that their completeness results depend on this relaxation.. Decidability and complexity of termination (in general, not necessarily with LRFs) of SLC and MLC loops has been intensively studied for different classes of constraints. For SLC loops, Tiwari [45] proved that the problem is decidable when the update is linear and the variables range over R. Braverman [16] proved that this holds also for Q, and for the homogeneous case it holds for Z. Both considered universal termination. Also, in both cases they allow the use of strict inequalities in the condition. Ben-Amram et al. [9] showed that the termination of SLC loops is at least EXPSPACE-hard, and that the problem is undecidable for some extensions that introduce a simple form of non-linearity; and also for SLC loops in which the use of a single irrational coefficient is allowed. See these works for references to additional results on the decidability of termination in other types of loops.

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