name
stringlengths
5
6
title
stringlengths
8
144
abstract
stringlengths
0
2.68k
fulltext
stringlengths
1.78k
95k
keywords
stringlengths
22
532
299468
Axiomatic Approach to Feature Subset Selection Based on Relevance.
AbstractRelevance has traditionally been linked with feature subset selection, but formalization of this link has not been attempted. In this paper, we propose two axioms for feature subset selectionsufficiency axiom and necessity axiombased on which this link is formalized: The expected feature subset is the one which maximizes relevance. Finding the expected feature subset turns out to be NP-hard. We then devise a heuristic algorithm to find the expected subset which has a polynomial time complexity. The experimental results show that the algorithm finds good enough subset of features which, when presented to C4.5, results in better prediction accuracy.
Introduction The problem of feature subset selection (FSS hereafter) has long been an active research topic within statistics and pattern recognition (e.g., [9]), but most work in this area has dealt with linear regression. In the past few years, researchers in machine learning have realised (see for example, [18, 16]) that practical algorithms in supervised machine learning degrade in performance (prediction accuracy) when faced with many features that are not necessary for predicting the desired output. Therefore FSS has since received considerable attention from machine learning researchers interested in improving the performance of their algorithms. Common machine learning algorithms, including top-down induction of decision trees, such as CART, ID3, and C4.5, and nearest-neighbour algorithms (such as instance-based learning), are known to suffer from irrelevant features [18, 19]. A good choice of features may not only help improve performance accuracy, but also aid in finding smaller models for the data, resulting in better understanding and interpretation of the data. Broadly speaking, FSS is to select a subset of features from the feature space which is good enough regarding its ability to describe the training dataset and to predict for future cases. There is a wealth of algorithms for FSS (see for example, [2, 15, 1, 17, 14, 24]). With regard to how to evaluate the goodness of a subset of features, the FSS methods fall into two broad categories: filter approach and wrapper approach, which are illustrated in Figures 1 and 2. In the filter approach, a good feature set is selected as a result of pre-processing based on properties of the data itself and Feature Set Feature Selection Algorithm Learning Algorithm Figure 1: Filter model. Feature Set Feature subset evaluation Feature subset search Learning Algorithm Learning Algorithm Figure 2: Wrapper model. independent of the induction algorithm. Section 5.1 presents a review on the empirical use of the notion of goodness in this category. There is a special type in this approach - feature weighting [15], which is slightly different from the mainstream filter approach in the way the search for good feature set is conducted. Basically the mainstream approach evaluates each subset of features and finds the "optimal", while the weighting approach weighs each individual feature and selects a "quasi-optimal" set of features, typically those whose weights exceed a given threshold [15, 17]. In the wrapper approach, feature selection is done with the help of induction algorithms. The feature selection algorithm conducts a search for a good feature set using the induction algorithm itself as part of the evaluation function. Typically, the feature subset which performs best for the induction algorithm will be selected. Both types of approach to FSS are closely related to the notion of relevance. For example, FOCUS [2], RELIEF [15] and Schlimmer's model [22] use ``relevance'' to estimate the goodness of feature subset in one way or another. Section 5.2 presents a review in this respect. Although the wrapper approach does not use the relevance measure directly, it is shown [16] that the "optimal" feature subset obtained this way must be from the relevant feature set (strongly relevant and weakly relevant features). However, the mathematical foundation for FSS is still lacking [26]. In [25], a unified frame-work for relevance was proposed. In this framework relevance is quantified and related to mutual information, and furthermore, it was shown that this quantification satisfies the axiomatic characterisations of relevance laid down by leading researchers in this area. This renders the notion of relevance having a solid mathematical foundation. In light of these, we attempt to characterise FSS in terms of the relevance framework, in order to give FSS a solid foundation for further theoretical study. We then present an algorithm for FSS based on the relevance characterisation. We also present some experimental results applying this algorithm to some real world datasets. 2 Characterisation of feature subset selection In this section we are to characterise FSS in the realm of machine learning, which is confined to the following sense. The input to a (supervised) learning algorithm is a training set D of m labelled instances of a target (concept) Y 1 . Typically D is assumed drawn independently and identically distributed (i.i.d.) from an unknown distribution over the labelled instance space. An unlabelled instance x is an element of the n dimensional space is the ith feature (or variable) in the feature space Labelled instances are tuples ! x; y ? where y is the label, or output. Let L be a learning algorithm having a hypothesis space H. L maps D to h 2 H and h maps an unlabelled instance to a label. The task of the learning algorithm is to choose a hypothesis that best explains the given data D. In this paper, the training set D will be represented by a relation table r[X the set of features and Y is the output or target variable. In what follows we will use r[X denote both the learning task and the training set. The problem of feature selection is then to search for a subset \Pi of X that not only performs well on the training dataset, but also predicts well on unseen new cases - it is good enough. Our objective in this section is to characterise what the best feature subset should be from first principles as well as some known principles. 2.1 The preservation of learning information Given a dataset r[X [ Y ], the learning task is to characterise the relationship between X and Y so that this relationship can be used to predict on future cases (either one in the dataset or a new case). Therefore any selected feature subset, if it is expected to work well on the given dataset, should preserve the existing relationship between X and Y hidden in the dataset. A natural measure of this relationship is the mutual information [7]. We call this relationship learning information. Specifically, given a learning task r[X [ Y ], the learning information is the mutual information suppose \Sigma and \Pi are two subsets of X . If I (\Sigma; Y say that \Sigma and \Pi have the same contribution to the learning task. A sufficient feature set or simply SFS of a learning task is a subset, \Sigma, of X such that I (\Sigma; Y contribute the same to the learning task. This is re-stated as the following axiom: Axiom 2.1 (Preservation of learning information) For a given learning task r[X [ Y ], the best feature subset, \Pi, should preserve the learning information contained in the training dataset. That is, I The following two lemmas follow directly from the chain rule for mutual information and the non-negativity of mutual information. Lemma 2.1 Given r[X [ Y ]. For any \Pi ' X, I From this lemma and the additivity of mutual information [7] we know that given a SFS \Pi, removing all the remaining features \Sigma will not lose learning information contained in the original dataset. In other words, Y is conditionally independent of \Sigma given \Pi. 1 Target or target concept is usually defined as a subset of an instance space [2], which can be interpreted as a bi-partition of the instance space. Here we use it in the more general sense: a target concept is an arbitrary partition of the instance space. It is regarded as a variable here. 2 In this paper we use X i to refer to both a variable and the domain of the variable, when this can be identified from the context. 3 [6, 12]. We use the notation in [12]. A relation scheme R is a set of variables (features). A relation (table) over R is an indicator function for a set of tuples, written the tuple t is in the relation; otherwise. For the purpose of this paper, we extend the indicator function such that is the frequency of tuple t appearing in the relation. With this extension, we can talk about the distribution of the tuples, which can be easily obtained. Lemma 2.2 If \Pi is a SFS for a learning task r[X [ Y ], then any superset, \Sigma, of \Pi is also a SFS. This lemma helps in determining SFSs without having to calculate the learning information. This property is exploited in the design of an FSS algorithm later. 2.2 The simplest description: Occam's razor Given a learning task, there may be a number of SFSs. However they may not perform the same on prediction. The best feature subset should perform best in this respect. However it is not easy to determine which subset of features predicts better since there is no full knowledge about the future. Although the dataset is assumed to be drawn i.i.d. from the labelled instance space according to an unknown distribution, this assumption doesn't help in individual cases. What we can do is to focus on the training dataset itself and then apply some empirical principles. There are a number of empirical principles. Occam's razor is one of them. Occam's razor, known as the principle of parsimony, is a tool that has application in many areas of science, and it has been incorporated into the methodology of experimental science. This principle is becoming influential in machine learning, where this principle can be formulated as: given two hypotheses that both are consistent with a training set of examples of a given task, the simpler one will guess better on future examples of this task [4, 27, 3]. It has been shown (see for example, [4]) that, under very general assumptions, Occam's razor produces hypotheses that with high probability will be predictive of future cases. One basic question is concerned with the meaning of "simplicity", namely Occam simplicity. Typically Occam simplicity is associated with the difficulty of implementing a given task, namely complexity of implementation. For example, the number of hidden neurons in neural networks [3]; the number of leaf nodes of a decision tree [10, 11]; the minimum description length (MDL) [21, 20]; and the encoding length [23]. However, Wolpert [27] noticed that the complexity of implementation is not directly related to the issue of prediction or generalisation, therefore there is no direct reason to believe that minimisation of such a complexity measure will result in improvement of general- isation. Wolpert [27] then derived the uniform simplicity measure, which is concerned exclusively with how learning generalises. Wolpert showed [27] that when expressed in terms of the uniform simplicity measure Occam's razor is indeed a way to set up a good generaliser. The main disadvantage of uniform simplicity measure is that the calculation of it needs "all learning sets and all questions", as well as guessing distribution and simplicity distribution [27]. This is impossible in practice. It seems that uniform simplicity measures have only theoretical significance. Fortunately many of the conventional simplicity measures are shown to be rough approximations to the uniform simplicity measure [27]. In practice we can only rely on approxima- tions, like those mentioned above. Back to our problem: Most of the practical simplicity measures (approximations to uniform simplicity measure) are model-dependent. However we are looking at FSS independently of any learning model, so a model-independent simplicity measure is required. Entropy seems an ideal candidate, as it measures the average number of bits (encoding length) to describe a source (e.g., a random variable). Using the entropy as the Occam simplicity measure in our context, we have: given a learning task r[X [Y ], the Occam's razor dictates the selection of a SFS \Pi which minimises H (\Pi; Y ), where H is Shannon's entropy function. To make this formal, we re-state it, in conjunction with the information preservation axiom, as the following axiom: Axiom 2.2 (Minimum encoding length) Given a learning task r[X [Y ] and a set of sufficient feature subsets. The one \Pi which minimises the joint should be favoured with respect to its predictive ability. Now we set out to characterise the \Pi which minimises the joint entropy. Lemma 2.3 Given a learning task r[X [ Y ], consider two SFSs \Pi; \Sigma ' X. H Proof. Since both \Pi and \Sigma are SFSs, by definition we have I (\Pi; Y Therefore we have H(Y Furthermore we have According to this lemma, the most favourable feature subset would be the sufficient one which has the least marginal entropy. 2.3 Characterisation of feature subset selection in terms of relevance In the previous two sections we have derived two axiomatic characterisations of FSS: the preservation of learning information, and minimum encoding length. In this section we are going to show the above two axioms can all be re-stated in terms of relevance, in an even more concise form. Given two variables X and Y , by definition (see appendix), the relevance of X to Y is Therefore for a SFS \Pi ' X , i.e., I (\Pi; Y preserving learning information amounts to preserving the relevance rela- general (due to the fact that I (\Pi; Y the \Pi which preserves learning information in fact maximises the relevance r(X ; Y ). Consider two SFSs \Pi and \Sigma. Since, by definition, I (\Pi; Y Therefore, in conjunction with the previous requirement, the most favourable feature subset would be the sufficient one which maximises the relevance r(Y ; X). Summarising the above discussion we have the following theorem: Theorem 2.1 Given a learning task r[X [ Y ], the most favourable feature subset is the \Pi which is sufficient (preserving learning information, I (\Pi; Y minimises the joint entropy Putting it concisely, this is the one which has maximum r(\Pi; Y ) and maximum r(Y ; \Pi). This theorem formalises the more or less intuitively justified connection between relevance and FSS. 3 A relevance-based algorithm for feature selection In this section we present a heuristic FSS algorithm which is based on the characterisation in the previous section. A straightforward algorithm is to systematically examine all feature subsets and find one which satisfies the above two axioms. Unfortunately, as shown in [8], this class of algorithms turns out to be NP-complete. Branch and bound based on the characteristics of relevance was attempted [25], but it was shown to be also exponential in general. So we attempted heuristic approaches. Here we are to present our preferred heuristic FSS algorithm. Our objective is to find a sufficient subset of features, which is close to optimal in the above axiomatic sense. The heuristic used here is: if a feature or attribute is highly relevant on its own, it it very likely that this feature is in the optimal feature set. Since features are examined individually, we need to take into account the correlation among individual features. Consider, for example, two features Y be the target. Suppose r(x 1 x 1 is selected, then x 2 is not needed any more since r(x according to Lemma 6.1. In other words, x 2 becomes irrelevant given x 1 . Our algorithm should not select them both. To this end, we design our algorithm, which takes advantage of conditional relevance. Algorithm 3.1 (CR: feature selection based on conditional relevance) Given a learning ffl Calculate, for every x 2 X, the relevance r(x; Y ), and find the feature x 0 with largest relevance ffl Main procedure: 1. 2. Repeat: Add x i to BSFS such that x i is not in BSFS and r(x is the largest among all possible relevance values. 3. Until r(BSFS; Y ffl Return BSFS. Clearly the time complexity for calculating relevance and finding the largest is O(N ). We now analyse the complexity for the main procedure. At loop k where there are k features left for inspection, we need to compute conditional relevance r(x features, hence a complexity of O(k). To find the feature with largest conditional relevance value, we need comparisons, hence a complexity of O(k \Gamma 1). In the worst case we need to loop from to hence the complexity is P 1 Therefore the overall complexity for above algorithm is O(N 2 ). This algorithm is highly dependent on the choice of the initial set of features, which is the individual feature most relevant to Y . The BSFS selected by CR is guaranteed to be SFS, but not guaranteed to be necessary. It is conjectured that if x 0 is in the optimal SFS, then the BSFS found by CR is indeed optimal. 4 Experiment and evaluation Here we are to evaluate the performance of the feature selection algorithm presented in the previous section using some real world datasets. We choose three datasets from the U. C. Irvine machine learning repository: Australian, Diabetes, and Heart. Some general information about these datasets is shown in Table 1. To evaluate the performance of out feature selection algorithm, we chose to use the C4.5 module in the Clementine package in our experiment. We feed the selected feature subsets to C4.5 and compare the results with and without feature subset selections. The test accuracies by C4.5 without and with feature selection are shown in Table 2. The evaluation method we used is cross validation implemented in Clementine. From these experiment results we see that applying our feature selection algorithm does indeed improve the test accuracies for all three datasets, and the corresponding decision trees have smaller sizes. However the success is limited in the sense that the accuracy improvements were not very great in this case. The reason is probably that C4.5 has a built-in feature selection facility based on mutual information. It is then reasonable to believe that if the feature selection algorithm described above is used with other learning algorithms without built-in feature selection facilities (e.g., nearest neighbour), the accuracy improvement could be higher than those reported here. Dataset features no. of examples no. classes class distribution Australian 14 690 2 44:5%(+) Diabetes 8 768 2 65:1%(+) Australian D C C D D D C D D C D D C C Diabetes C C C C C C C C Heart C D D C C D D C D C C C D Table 1: General information about the datasets, where D refers to discrete (here categorical) and C refers to continuous. Size of trees Test accuracy Selected features Size of trees Test accuracy Australian Diabetes 54 72.9 2,5,6,7,8 42 74.2 Heart Table 2: Decision tree sizes, test accuracies on decision trees generated by C4.5 without and with feature selection, together with the selected feature sets. The evaluation method we used is cross validation implemented in Clementine. The datasets are from the U. C. Irvine machine learning repository: Australian credit, Diabetes, and Heart. We also carry out an experiment to inspect the change of accuracies through gradually adding features in the order of relevance values. We first rank all the features according to their individual relevance values start evaluation from the one with highest relevance value. The results are shown in Figure 3. From this figure we can see that as features are gradually added in the order, the accuracy will on average go up first and reach a peak and then go down. This diagram justifies to some extent our algorithm, although the algorithm may not always find the feature subsets corresponding exactly to the peak points. Another observation from this experiment is that the performance of C4.5 for the three datasets is (in descending order): Australian, Heart and Diabetes (Table 2) in terms of the average (test) accuracy, while the percentage of continuous features is in the (descending) order: Diabetes (8/8), Heart (7/13), and Australian (6/14). It indicates that C4.5 doesn't work as well for continuous features as for discrete features. Our feature selection algorithm didn't change this situation. In C4.5, continuous features are treated as discrete features in such a way that their values are divided into two groups, each of which is a discrete cluster used in the classification. From the granularity point of view [13], the granularity of the continuous features are made simply too coarse. In our feature selection algorithm, continuous features are treated as discrete features in such a way that each continuous value is taken to be a discrete value and is used individually in the classification. Again the granularity here seems too fine. This points to a direction for future studies: what is the proper granularity for a continuous feature for use in classification? Australian Diabetes Heart Figure 3: Accuracy vs. first k features used in the relevance ranking, where k starts from 1. The relevance-based rankings for the three datasets are as follows. Australian: Diabetes: 7,6,2,5,8,4,1,3; Heart: 5,8,10,13,3,12,1,4,9,11,2,7,6. 5 Comparison with related work In this section we are to take a closer look at some related work from the relevance point of view and compare them with ours. 5.1 How is the best feature subset characterised in the literature? In [15], the best feature subset is characterised as sufficient and necessary to describe the target. Ideally the sufficiency and necessity requirement is quantified by a measure J (\Pi; Y; D) which evaluates the feature subset \Pi for the target concept Y and the given data D: the best feature subset should have the best value of J (\Pi; Y; D). However the nature of the sufficiency and necessity requirement was not made clear in [15]. In the context of learning from examples, it seems reasonable that sufficiency concerns the ability of a feature subset to describe the given dataset (called qualified later on), while the necessity concerns the optimality among all the qualified feature subsets regarding predictive ability. From this we can say that our two axiomatic characterisations are possible interpretations of the sufficiency and necessity requirement proposed in [15]. In practice, the best feature subsets are measured in pragmatic ways. For example, in FOCUS [2] a good feature subset is a minimal subset which is consistent with the training dataset. Here the consistency can be understood as the sufficiency requirement, since only when the feature subset is consistent with the given dataset can it qualify to describe the dataset without losing learning information. The minimality of feature subset can be understood as the necessity requirement, as it was used as a bias of learning regarding which subset can predict better for future cases. In RELIEF [15], a good subset is one whose elements each has a relevance level greater than a given threshold. Here the relevancy and the threshold together determine whether a given feature subset is sufficient (or qualified) to describe the given dataset. But there is no direct justification as to why the feature subset determined in this way would perform better in predicting for future cases, i.e., necessary. In [22] a good subset is one of the minimal determinations, but nothing is mentioned as to which one is the best. Here all the minimal determinations are sufficient, but which of these is necessary is left open. 5.2 Re-modelling using the relevance framework Many FSS algorithms use "relevance" to estimate feature usefulness in one way or another. The FOCUS [2] algorithm starts with an empty feature set and carries out breadth-first search until it finds a minimal combination \Pi of features which is consistent with the training dataset. The features in \Pi are relevant to the target concept C. In terms of the relevance framework [25], this requirement amounts to r(\Pi; being minimum. RELIEF is a feature relevance estimation algorithm, but the meaning of relevance is different from ours and has not been theoretically justified. It associates with each feature a weight indicating the relative relevance of that feature to the concept class (C) and returns a set of features whose weights exceed a threshold. This amounts to firstly calculate, for each feature X , r(X ; C), and then select a set of features such that for any X in this set, r(X ; C) - , where - is the threshold. Compared to FOCUS, this method is computationally efficient. Furthermore, it allows features to be ranked by relevance. Schlimmer [22] described a related approach that carries out a systematic search through the space of feature sets for all (not just the one with minimal cardinality) minimal determinations which are consistent with training dataset. The algorithm has an attractive polynomial complexity due to the space-for-time technique: caching the search path to avoid revisiting states. A determination is in fact a SFS, and a minimal determination is such a SFS that removing any element will render it not being a SFS anymore. Therefore this algorithm amounts to finding all SFSs within a given length such that for each of these, \Pi, r(\Pi; Most recent research on feature selection differs from these early methods by relying on wrapper strategies rather than filtering schemes. The general argument for wrapper approaches is that the induction method that will use the feature subset should provide a better estimate of accuracy than a separate measure that may have an entirely different inductive bias. John, Kohavi, and Pfleger [14] were the first to present the wrapper idea as a general framework for feature selection. The generic wrapper technique must still use some measure to select among alternative features. One natural scheme involves running the induction algorithm over the entire training data using a given set of features, then measuring the accuracy of the learned structure on the training data. However, John et al argue that a cross-validation method, which they use in their implementation, provides a better measure of expected accuracy on novel test cases. The major disadvantage of wrapper methods over filter methods is the former's computational cost, which results from calling the induction algorithm for each feature set considered. This cost has led some researchers to invent ingenious techniques for speeding the evaluation process. The wrapper scheme in [16] does not use the relevance measure directly; rather, it uses the accuracy obtained by applying an induction algorithm as the measure for the goodness of feature sets. However, Kohavi and Sommerfield show that the "optimal" feature set X obtained this way must be from the relevant feature set (strongly relevant and weakly relevant features). As shown in [25] their strong relevance and weak relevance can be characterised by our relevance formalism, so the wrapper scheme can also be modelled by our relevance, r(X However, Caruana and Freitag [5] observe that not all features that are relevant are necessarily useful for induction. They tested FOCUS and RELIEF on the calendar scheduling problem, where they fed the feature sets obtained by those two algorithms to ID3/C4.5, and found that a more direct feature selection procedure, hill-climbing in feature space, finds superior feature sets. They didn't explain the reason for this. But a possible explanation based on relevance is as follows. For a given concept class C there are many SFS's, where for each SFS, X , 1. One of the many SFS's, which satisfies some criteria, should be optimal in general. This optimal feature set may not be the minimal one in general. Starting from Occam's razor, we argue that the optimal one should be such that r(C; X) is maximised. In conclusion from the above discussion, RELIEF, Schlimmer's algorithm, and Wrapper take into account only the sufficiency condition, evidenced by their addressing only r(X ; C). FOCUS takes into account both sufficiency and necessity conditions. But the necessity is measured by the cardinality of the feature subset being minimal. The relationship of this measurement to the Occam's razor characterisation above is not clear yet. 6 Conclusion In this paper we have derived, from first principles and Occam's razor principle, two axiomatic requirements for any feature subset to qualify as "good": preservation of learning information and minimum encoding length. Since FSS has traditionally linked with relevance, we further showed that when identified with the variable relevance in the unified framework for relevance, relevance has a direct relationship with FSS: maximising relevance in both ways (i.e., will result in the favourable feature subset. Based on the axiomatic characterisation of FSS, one heuristic FSS algorithm was designed and presented. This algorithm weights (ranks) features using conditional relevance r(X ; Y jZ) in a step-wise way: it starts with the feature with the highest unconditional relevance value and then keeps selecting features with highest conditional relevance values with respect to the current selected subset. This algorithm can get rid of highly correlated features, and it is shown to have a complexity of O(n 2 ). We also presented evaluation results using three real world problems: Australian credit, Diabetes diagnosis, and Heart diagnosis, all from the UCI machine learning repository. The purpose of the evaluation is two fold. Firstly, we evaluated the performance of the algorithm. The results are quite encouraging: the average test accuracies on three datasets were all improved, and the resultant decision trees had smaller tree sizes. Since C4.5 has a built-in feature selection process, which is based on gain ratio defined by mutual information, we conjecture that if the algorithm is used with other learning algorithms without a built-in feature selection process (e.g., nearest neighbour), the accuracy improvement could be higher. Secondly, we evaluated the relationship between relevance and learning accuracy. The results show a strong connection between relevance and learning accuracy. When all features are ranked according to their conditional relevance values, adding features one by one to the feature set would lead to a clear pattern of accuracy: first ascending to a peak and then descending gradually. Therefore we conclude that highly relevant features can improve learning accuracies and highly irrelevant features can degrade learning accuracies. As an aside, we observed that C4.5 based learning accuracy (whether or not feature selection is used) is related to the proportion of continuous features: the higher the proportion of continuous features, the lower the accuracy. It is argued that one possible reason is that in C4.5 continuous features are bi-partitioned, which could be too coarse. Future studies in this direction will focus on developing algorithms to find proper granularities for continuous features. --R Feature selection for case-based classification of cloud types Learning with many irrelevant features. What size network is good for generalization of a specific task of interest? Occam's Razor. How useful is relevance? A relational model of data for large shared data banks. Elements of information theory. Pattern recognition: A statistical approach. What should be minimized in a decision tree? The attribute selection problem in decision tree generation. Relational Databases: A Tutorial for Statisticians. Irrelevant features and the subset selection problem. The feature selection problem: traditional methods and a new algorithm. Feature Subset Selection Using the Wrapper Method: Over-fitting and Dynamic Search Space Topology Estimating attributes: analysis and extensions of RELIEF. Selection of relevant features in machine learning. Machine learning Inferring decision trees using the minimum description length principle. Stochastic complexity and modeling. Efficiently inducing determinations: a complete and systematic search algorithm that uses optimal pruning. Occam algorithms for computing visual motion. Prototype and feature selection by sampling and random mutation hill-climbing algorithms Towards a unified framework of relevance Computer systems that learn - classification and predication methods from statistics The relationship between Occam's Razor and convergent guessing. --TR --CTR Xianghong Zhou , Gareth Chelvanayagam , Michael Hallett, Identifying the most significant pairwise correlations of residues in different positions of helices: the subset selection problem using least squares optimization, Proceedings of the 2001 ACM symposium on Applied computing, p.51-55, March 2001, Las Vegas, Nevada, United States Jong-Min Park, Convergence and Application of Online Active Sampling Using Orthogonal Pillar Vectors, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.26 n.9, p.1197-1207, September 2004 Arno J. Knobbe , Eric K. Y. Ho, Maximally informative k-itemsets and their efficient discovery, Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, August 20-23, 2006, Philadelphia, PA, USA
relevance;knowledge discovery;machine learning;entropy;feature subset selection
299846
Synthesizing Efficient Out-of-Core Programs for Block Recursive Algorithms Using Block-Cyclic Data Distributions.
AbstractIn this paper, we present a framework for synthesizing I/O efficient out-of-core programs for block recursive algorithms, such as the fast Fourier transform (FFT) and block matrix transposition algorithms. Our framework uses an algebraic representation which is based on tensor products and other matrix operations. The programs are optimized for the striped Vitter and Shriver's two-level memory model in which data can be distributed using various $cyclic(B)$ distributions in contrast to the normally used physical track distribution $cyclic(B_d)$, where $B_d$ is the physical disk block size. We first introduce tensor bases to capture the semantics of block-cyclic data distributions of out-of-core data and also data access patterns to out-of-core data. We then present program generation techniques for tensor products and matrix transposition. We accurately represent the number of parallel I/O operations required for the synthesized programs for tensor products and matrix transposition as a function of tensor bases and data distributions. We introduce an algorithm to determine the data distribution which optimizes the performance of the synthesized programs. Further, we formalize the procedure of synthesizing efficient out-of-core programs for tensor product formulas with various block-cyclic distributions as a dynamic programming problem. We demonstrate the effectiveness of our approach through several examples. We show that the choice of an appropriate data distribution can reduce the number of passes to access out-of-core data by as large as eight times for a tensor product and the dynamic programming approach can largely reduce the number of passes to access out-of-core data for the overall tensor product formulas.
Introduction Due to the rapid increase in the performance of processors and communication networks in the last two decades, the cost of memory access has become the main bottleneck in achieving high-performance for many applications. Modern computers, including parallel computers, use a sophisticated memory hierarchy consisting of, for example, caches, main memory, and disk arrays, to narrow the gap between the processor and memory system performance. However, the efficient use of this deep memory hierarchy is becoming more and more challenging. For out-of-core applications, such as computational fluid dynamics and seismic data processing, which involve a large volume of data, the task of efficiently using the I/O subsystem becomes y Supported by NSF Grant NSF-IRI-91-00681, Rome Labs Contracts F30602-94-C-0037, ARPA/SISTO contracts N00014- 91-J-1985, and N00014-92-C-0182 under subcontract KI-92-01-0182. z Surface mail: Department of Computer Science, Duke University, Box 90129, Durham, N.C. 27708-0129. extremely important. This has spurred a large interest in various aspects of out-of-core applications, including language support, out-of-core compilers, parallel file systems, out-of-core algorithms, and out-of-core program synthesis [2, 18, 7, 4]. Program synthesis (or automatic program generation) has a long history in computer science [16]. In the recent past, tensor (Kronecker) product algebra has been successfully used to synthesize programs for the class of block recursive algorithms for various architectures such as vector, shared memory and distributed memory machines [11, 9, 5], and for memory hierarchies such as cache and single disk systems [14, 13]. We have recently enhanced this program synthesis framework for multiple disk systems with the fixed physical track data distribution [10] as captured by the two-level disk model proposed by Vitter and Shriver [19]. In this paper, we present a framework of using tensor products to synthesize programs for block recursive algorithms for the striped Vitter and Shriver's two-level memory model which permits various block-cyclic distributions of the out-of-core data on the disk array. The framework presented in this paper generalizes the framework presented in [10]. We use the algebraic properties of the tensor products to capture the semantics of block-cyclic data distributions cyclic(B), where B is the logical block size, on the disk array. We investigate the implications of various block-cyclic distributions cyclic(B) on the performance of out-of- core block recursive algorithms, such as the fast Fourier transform (FFT) and block matrix transposition algorithm. Tensor product representations of block recursive algorithms may involve stride permutations. Since a stride permutation can be interpreted as a matrix transposition, synthesizing efficient out-of-core programs for stride permutations is important [17, 6, 12]. We present a procedure for synthesizing efficient out-of-core programs for stride permutations using a cyclic(B) distribution of the data. An algorithm for determining the block size B which optimizes the performance of the synthesized programs is also presented. We then discuss program generation techniques for tensor products with various block-cyclic data dis- tributions. We discuss several strategies, such as factor grouping and data rearrangement, to improve the performance for the tensor product formulas. We formalize the procedure of synthesizing efficient out-of- core programs for the tensor product formulas with various data distributions as a dynamic programming problem. However, since data rearrangement is too expensive in our target model as discussed in Section 7, we have not incorporated it into our dynamic programming approach. In this sense, the stride permutations should be mainly understood as a method of program synthesis for matrix transpositions not for the tensor product formulas. We illustrate the effectiveness of this dynamic programming approach through an example out-of-core FFT program. We further examine the performance issues of synthesized programs. We show that: 1. The choice of data distribution has a large influence on the performance of the synthesized programs, 2. Our simple algorithm for selecting the appropriate data distribution size is very effective, and 3. The dynamic programming approach can always reduce the number of passes to access out-of-core data. The paper is organized as follows. Section 2 discusses formulation of block recursive algorithms using tensor products and other matrix operations. In Section 3, we introduce a two-level computation model and present the semantics of data distributions and data access patterns. We also argue the advantages of using various block-cyclic distributions. Section 4 presents an overview of our approach of out-of-core program synthesis. A generic program for synthesizing out-of-core programs for tensor products from given tensor bases is also discussed. Section 5 presents a framework for synthesizing programs for the various block-cyclic data distributions for stride permutations. In Section 6, we present our approach for synthesizing out-of- core programs for tensor products. Section 7 presents a multi-step dynamic programming algorithm for synthesizing programs for tensor product formulas. In Section 8, we summarize the performance results and show the effectiveness of using various block-cyclic data distributions. Section 9 discusses related research. Conclusions are provided in Section 10. In Appendix A, we list a selected set of symbols used in this paper. Appendix B and Appendix C present additional details for proving some of the properties discussed in Section 4 and Section 5, respectively. Product Algebra The tensor (Kronecker) product [8] of an m \Theta n matrix A m;n and a p \Theta q matrix B p;q is a block matrix A obtained by replacing each element a i;j of A m;n by the matrix [a i;j B p;q ]. A a A tensor product involving an identity matrix can be implemented as parallel operation. An identity matrix of order n is denoted as I n . Consider the application of (I to a vector n. This can be interpreted as n copies of B p;q acting in parallel on disjoint segments of X nq . However, to interpret the application of m;n\Omega I p ) to Y np as parallel operations we need to understand stride permutations. A stride permutation L mn n is an mn \Theta mn permutation matrix. The application of L mn n to X mn results in a vector Y mn such that: vector consisting of the elements in the set fX i+j \Lambdan 1)g. One important property of the stride permutation is L mp p;q\Omega A m;n )L nq q . Using stride permutations, the application m;n\Omega I p ) to the vector Y np can also be interpreted as p parallel applications of A m;n to disjoint segments of Y np by using the identity L mp p\Omega A m;n )L np . In this case, however, the inputs for each application of A m;n are accessed at a stride of p and the outputs are also stored at a stride of p. In general, (I m\Omega A n;p\Omega I q ) can be interpreted as mq parallel applications of A n;p . The properties of tensor products can be used to transform the tensor product representation of an algorithm into another equivalent form, which can take the advantage of the parallel operations discussed above. For example, by using the following tensor product factorizations, A m;n\Omega I p )(I m;n\Omega I q ); (4) A\Omega B can be implemented by first applying q parallel applications of A and then m parallel applications of properties of tensor products are listed below [11]: 1. A\Omega (B\Omega (A\Omega B)\Omega C; 2. (A\Omega B)(C\Omega AC\Omega BD; assume that the ordinary multiplications AC and BD are defined. 3. 4. In contrast to the tensor products which can be used to describe various computations, the tensor product of vector bases, called a tensor basis, can be used to describe the data access and storage patterns of a multi-dimensional array. A vector basis e m m, is a column vector of length m with a one at position i and zeros elsewhere. We use e m i to denote the ith index of a one-dimensional array of size m: Since in+j , we can use e m to represent the index [i; j] of a two-dimensional array if we assume a row-major storage order of multi-dimensional arrays in the memory. In general, the tensor basis e m t \Delta\Omega e m1 corresponds to index [i array. The indexing function needed to access elements of a multi-dimensional array can be obtained by linearizing the tensor basis. For example, linearizing the tensor basis e m t \Delta\Omega e m1 results in the vector basis e m t \Delta\Delta\Deltam 1 . The index in the linearized tensor basis is exactly the indexing function needed for accessing a t-dimensional array in the row-major order. Equivalently, a vector basis e M i can be factorized into a tensor product of vector bases \Delta\Omega e m1 3). Factorization of a vector basis corresponds to viewing a one-dimensional array as a multi-dimensional array. Using tensor bases, the semantics of the stride permutation L mn n can be formally expressed as: L mn corresponds to matrix transposition of an m \Theta n array stored in the row-major order. By appropriately factorizing the vector basis for an input vector, we can use the resulting tensor basis to describe the data access pattern of a tensor product. For example, for a tensor product (I m\Omega A p;n\Omega I q ), the input vector basis e mnq s can be factorized to obtain the input tensor basis e m j is known as operator basis. The output vector basis e mnq s can be factorized to obtain the output tensor basis e m which can also be determined by the following identity, m\Omega A p;n\Omega I q )(e m i\Omega A p;n e n j\Omega I q e q i\Omega A p;n e n and by replacing A p;n e n j by e p Using these input and output bases, we can determine the input and output data elements of an application of A p;n and derive a program with a two-dimensional iteration space: We ignore the dimensions of matrices whenever they are clear from the context. Code for (i; k)-th application of A p;n The indices of the input data elements to the (i; k)-th application can be obtained from the linearized input tensor basis e mnq inq+qj+k as finq ng. Similarly, the output indices can be determined from the linearized output tensor basis as fipq pg. Note that, there are no loops corresponding to indices j and j 0 in the above program. 2.1 Tensor Product Formulation of Block Recursive Algorithms A tensor product formulation of a block recursive algorithm has the following generic form: Y j\Omega A v j\Omega I c j ); where A v j is a v j \Theta v j linear transformation, (6) where . Under this definition, a stride permutation can be understood as a special case when are 1 \Theta 1 matrices, and A v j is a permutation matrix corresponding to a stride permutation. The identity terms I r j allow decomposition of the computation into a set of smaller size computations, which may be computed in the main memory. Similarly, the identity terms I c j allow a decomposition of the computation into a set of subcomputations, where each subcomputation accesses the data storage in a stride fashion. Although, these parallel and stride computational structures help in decomposing the computation into smaller in-core computations, the task of combining these decompositions with the goal of minimizing I/O for the entire computation is a challenging problem. We next present an example to illustrate how to use tensor product formulas to represent the Cooley-Tukey FFT algorithm. Fast Fourier Transform The Fourier transform can be denoted by the following matrix vector multiplications where FN is a N \Theta N discrete Fourier matrix. FN (i; and !N is the N-th primitive root of unity rs, then the discrete Fourier matrix FN can be factorized as follows [11, 15], r\Omega I s )T rs rs s is called twiddle factors and is defined as T rs . By using the above factorization recursively, we obtain the following tensor product representation of the Cooley-Tukey FFT algorithm, Y Y Figure 1: The data organization for 4, and Each column is a disk. Each box is a physical block. Each row consists of a physical track. The numbers in each box denote the record indices. 2 i\Gamma1 is a diagonal matrix of constants and R 2 n permutes the input sequence to a bit-reversed order. If we ignore the initial bit-reversal operation R 2 n and notice that I 2 2 i\Gamma1 is a diagonal matrix, then we can see that the computational structure of F 2 n is captured by the first factor I 2 2\Omega I 2 i\Gamma1 . It can be easily verified that this major computational portion is an example of Formula (6). 3 Parallel I/O Model with Block-Cyclic Data Distributions We use a two-level model which is similar to Vitter and Shriver's two-level memory model [19]. However, in our model the data on disks (called out-of-core data) can be distributed in different (logical) block sizes. The model consists of a processor with an internal random access memory and a set of disks. The storage capacity of each disk is assumed to be infinite. On each disk, the data is organized as physical block with fixed size. Four parameters: N (the size of the input), M (the size of the internal memory), B d (the size of each physical block), and D (the number of disks), are used in this model. We assume that M ! N , Bd . In this model, disk I/O occurs in physical tracks (defined below) of size B d D. The physical blocks which have the same relative positions on each disk constitute a physical track. The physical tracks are numbered contiguously with the outermost track having the lowest address and the innermost track having the highest address. The ith physical track is denoted by T i . Fig. 1 shows an example data layout with B and Each parallel I/O operation can simultaneously access D physical blocks, one block from each disk. Therefore parallelism in data access is at two levels: elements in one physical block are transferred concurrently and D physical blocks can be transferred in one I/O operation. In this paper, we use the striped disk access model in which physical blocks in one I/O operation come from the same track, as opposed to the independent I/O model in which block can come from different tracks. We use the parallel primitives, parallel read(i) and parallel write(i), to denote the read and write to the physical track T i , respectively. We define the measure of I/O performance as the number of parallel I/Os required. 3.1 Block-Cyclic Data Distributions Block-cyclic distributions have been used for distributing arrays among processors on a multiprocessor sys- tem. A block-cyclic distribution partitions an array into equal sized block of consecutive elements and then maps them onto the processors in a cyclic manner. If we regard the disks in the above model as processors, D D D D 43 44 48 Figure 2: The data organization for 8. Each column is a disk. The first left shadowed box denotes an example logical block. There are two logical tracks LT 0 and LT 1 each of them consists of two physical tracks. then the data organization described above (e.g. in Fig. 1) is exactly a block-cyclic distribution (denoted as with the block size B d . Moreover, we can assume that data can be distributed with an arbitrary block size 2 . Fig. 2 shows the data organization for the same parameters as in Fig. 1, but with a cyclic(8) distribution. Notice that the size of the physical track and the size of the physical block are not changed. However, they contain different records. We will call B records in a block formed by a cyclic(B) distribution as a logical block. Similarly, the logical blocks which have the same relative positions on each disk consist of a logical track. The ith logical track is denoted as LT i . Note that each parallel I/O operation still accesses a physical track not a logical track. Hence, several parallel I/O operations are needed to access a logical track. For example, to load the logical track LT 1 in Fig. 2, two parallel read operations parallel read(2) and parallel read(3), which respectively load the physical tracks T 2 and T 3 , are needed. We next use a simple example to show the advantages of using logical distributions on developing I/O-efficient programs for block recursive algorithms. Why Logical Data Distributions? Assume that we want to implement F I 8 on our target model under the parameters given in Fig. 1. Further, we assume that the size of the main memory is the half of the size of the inputs. Because we are mainly interested in data access patterns, we ignore the real computations conducted by F 8 . The only thing we need to remember is that F 8 needs eight elements with a stride of eight because of the existence of the identity matrix I 8 . We first consider implementing F I 8 on the physical block distribution. From the above discussion, we know that the first F 8 needs to be applied to eight elements: 0; 8; 16; 24; 28; 32; 40; 48, and 56. From Fig. 1, we can see that these elements required by the F 8 computation are stored on four physical tracks. However, our main memory can hold only two physical tracks, so that we can not simply load all of the four physical tracks into the main memory and accomplish the computation in one pass of I/O. To get around this memory limitation, we can use two different approaches. First, we load the first physical track and keep the first half of the records in each physical block in that loaded physical track and throw other half of the records. We do this for every other physical track. Then we do the computation for half of the records in the main memory. After finishing computation for half of the records, we write the results out. Then we repeat the above procedure. However, we now keep other half 2 Cormen has called this data organization on disks as a banded data layout [3] and studied the performance for a class of permutations and several other basic primitives of NESL language[1]. of the records in the main memory for each loaded track. By doing computation in this way, it is obviously that we need two passes to load out-of-core data. Another method is that we use a logical block distribution. Suppose that the size of a logical block is eight as shown in Fig. 2. Now, the eight records required by one F 8 are stored on two physical tracks, physical track one and three, or physical track two and four. Therefore, if we can load physical tracks one and three first and do the computation, then load physical track two and four and do the computation, then we can finish the computation in one pass. This example clearly shows the advantages of using logical distributions comparing with using only physical track distributions. However, there are several problems which we have not addressed here, such as how to determine the block size of the logical distribution and how to determine the data access patterns. We will discuss these issues in the rest of the paper. Note that the striped I/O model with the data distribution cyclic(B d ) can be transformed to a model with 1. However, this transformation may not be true for an arbitrary cyclic(B) distribution. Therefore we normally can not reduce the problem to the simpler case, where 1. For simplicity, we make the following assumptions. The input and the output data are stored in separate set of disks. All parameters are power of two 3 . The block size B of the distribution is a multiple of B d . 3.2 Semantics of Data Distributions and Access Patterns As discussed in [9], a block-cyclic distribution can be algebraically represented by a tensor basis. That approach can be adopted to the disk model by substituting disks for processors. However, because of the existence of the physical blocks and the physical tracks, the tensor basis used to define a block-cyclic distribution for multiprocessors needs to be further factorized. We call this factorized tensor basis as a (out-of-core) data distribution basis, which is defined as follows: Definition 3.1 . If a vector N , with distributed according to the cyclic(B) distribution on D disks, then its data distribution basis is defined as: g\Omega e D b\Omega e Bd b d We use D(s) to refer to the sth factor (from the left), e.g., d . For example, the data distribution basis for Figure 2 is e 2 b d . The data distribution basis for Figure 1 can be written as e 4 b d selected portion of the distribution basis in Formula (10) can be used to obtain the indexing function needed to denote a particular data unit such as a logical track or a physical track. Let, 3 The results can be easily generalized to all parameters to be power of any integer. Figure 3: An example data organization and access pattern. Each logical track consists of two physical tracks. Each physical block is further decomposed into two sub-blocks. All of those shadowed sub-blocks together can be used to form a data access pattern. One example is to access the shadowed sub-blocks in the row-major order. Then the indexing function for accessing the physical tracks can be obtained by linearizing the tensor basis obtained from physical-track-basis(D). By taking the difference 4 of the data distribution basis with each of them, we can have tensor bases which denote the records inside a logical track and a physical track, respectively. These tensor bases are called a logical track-element basis (e D b\Omega e Bd b d ) and a physical track-element basis (e D d\Omega e Bd b d respectively. This concept can be further extended to denote other subsets of data which we will discuss later. On the other hand, different orders of instantiating the indices in the data distribution basis defined in Formula (10) result in different access patterns of the out-of-core data. For example, if we instantiate the indices in that formula in the order from left to right, i.e. g is the slowest and b d is the fastest changing index, then we actually access data first in the first logical block in the first disk and then access the first logical block in the second disk. After finishing the access to the first logical track sequentially, the second logical track is accessed, and so on. It is obvious that if the order of the indices in a data distribution basis is instantiated differently, then the out-of-core data will be accessed in a different pattern. For example, if we instantiate the index b b in e B b before the index d in e D d in Formula (10), then it results in an access pattern where in first the data along a physical track is accessed and then to the successive physical tracks are accessed. This change in the instantiation order of the indices can be regarded as a permutation 5 of the data distribution basis. We will call a permutation of a data distribution basis as a loop basis. In the synthesized programs, every index in a loop basis may be used to generate a loop nest. The order of the loop nests is determined by the order of the vector bases in the loop basis. More generally, the out-of-core data can be viewed as organized as a multi-dimensional structure. For example, the data layouts in Fig. 2 can be viewed as a three-dimensional array, where each logical block is viewed as a B b \Theta B d matrix. Further we can convert B d to a two-dimensional structure. We can combine records in some of the disks together as a submatrix. These other views can be denoted by factorizing and regrouping data distribution bases and can be used to form different data access patterns. Fig. 3 shows an example data organization and access pattern. We assume that each logical 4 Let S and G be two tensor bases. Their difference is denoted as S-G and is a tensor basis which is constructed from deleting all the vector bases in G from S. 5 Let S be a tensor basis and S =\Omega q . Let ff be a permutation on a permutation of S is a tensor basis defined as follows, ff(S) =\Omega q track consists of two physical tracks. We further decompose each physical block B d as two sub-blocks, each of them has size B d1 . In order to reflect this data organization, we can factorize the data distribution basis as follows, g\Omega e D b d After we permute this factorized data distribution basis, we can have the loop basis which accesses subsets of data in different patterns. Assume that we want to access data in Fig. 3 in the following order: first accessing the darker shadowed sub-blocks in the row-major order and then accessing the lighter shadowed sub-blocks in the row-major order. Then we can move D(3) and D(4) before D(2) and D(1), respectively. This results in the following loop basis, b d b\Omega e D We can verify the correctness of this loop basis as follows. (1) The index b d2 chooses the same shadowed sub-blocks. (2) The index g chooses the logical tracks. (3) The index b b chooses the logical blocks. (4) The index d chooses disks. (5) The index b d1 chooses the records inside a sub-block. Since the increasing of the indices is in the reversed order of the above five steps. We first access records inside the first darker shadowed sub-block in the first disk and then access the records in the same shadowed sub-block in the second disk, and so on. After accessing all the records in the same darker shadowed sub-blocks in the row-major order, we repeat the procedure for the lighter shadowed sub-blocks. 4 Overview of Program Synthesis Efficient implementations of block recursive algorithms are obtained by using the properties of tensor products to transform the tensor product representations for the block recursive algorithms. The transformations will use the results of the performance of each individual tensor product. This performance of each tensor product is obtained by using the method presented in Section 6. Fig. 4 shows the procedure of synthesizing efficient out-of-core programs for block recursive algorithms. In that figure, the augmented tensor basis contains the following information: data distribution bases, loop bases, sub-computations and memory-loads, which are necessary for code generation and will be explained further in this section. If the input tensor product formula consists of only a stride permutation, it will quickly pass through the program transformation step. Then it will use an algorithm presented in Section 4 to generate an augmented tensor basis. For other tensor product formulas, the successive steps will be applied to each tensor product in the transformed tensor product formulas. To obtain an augmented tensor basis for each tensor product, we use the method presented in Section 6. The code generation step for both tensor products and stride permutations will use the same procedure presented in this section. Our presentation of deriving efficient implementations for the block recursive algorithms is in a reversed order of Fig. 4. We first present a procedure for code generation by using the information contained in the Target machine model Tensor Product Formula Tensor Product Formula + Data Distribution Augmented Tensor Basis Code Generation Parallel I/O Program Program Transformation Computation Partitioning Access Pattern Analysis Figure 4: The procedure of synthesizing efficient out-of-core programs for block recursive algorithms. augmented tensor basis. Then, we determine efficient implementations for a stride permutation and a simple tensor product with a given data distribution on a given model by determining the corresponding augmented tensor bases. We develop an algorithm to determine the data distribution which can result in an efficient implementation for a simple tensor product. Using the information obtained so far, we use a dynamic (or a multi-step dynamic) programming algorithm to determine an efficient implementation for the block recursive algorithms. In the rest of this section, we summarize how to synthesize efficient programs for simple tensor products and stride permutations on our target machine model. The further details and the performance of synthesized programs are then discussed in the next two sections. To minimize the number of I/O operations for a synthesized program, we need to exploit locality by reusing the loaded data. This requires decomposing the computation and reorganizing data and data access patterns to maximize data reuse. In the synthesized program, the same sub-computation is performed several times over different data sets. Hence, the loop structure of the synthesized programs is constructed as follows. An outer loop nest enclosing three inner loop nests: read loop nest for reading in the data, computation loop nest for performing sub-computation on the loaded data, and write loop nest for writing the output data back to the disk. The inner read loop nest should load the out-of-core data without overflowing the main memory. We refer to each of this data sets as a memory-load. The inner computation loop nest should perform subcomputation on a memory-load. Further, the data sets should be accessed using parallel primitives, parallel read and parallel write, to load or store a physical track each time. One of the main results in this paper is that an efficient tensor product decomposition of a computation Generate loops for indices in -n Generate loops for indices in -m Parallel read using the input distribution basis Construct a memory-load End the loops corresponding to -m Perform operations to a memory-load Generate loops for indices in ' m Parallel write using the output distribution basis End the loops corresponding to ' m End loops corresponding to -n Figure 5: A procedure of code generation for a tensor product. and an efficient data access pattern can be obtained by using the algebraic properties of data distribution bases and loop bases. In other words, once we have determined data distribution bases and loop bases, we can determine the memory-loads and the subcomputations (or operations) for each memory-load. For a tensor product computation, the input and output data may be organized and accessed differently, we therefore use input data distribution basis fi, output data distribution basis ffi, input loop basis -, and output loop basis ' to denote them respectively. Data distribution bases can be obtained from input and output bases by rewriting them into the form of Formula (10). However, it is a non-trivial task to determine the loop bases with the goal of minimizing the number of I/O operations. We next present a generic synthesized program and then summarize some general ideas for determining loop bases. We will discuss the details on how to determine loop bases and therefore memory-loads and operations to each memory-load in the next two sections. Consider the task of generating target code assuming that the data distribution bases, loop bases, memory-loads and operations to each memory-load have been already determined. As we discussed in the previous section, under our striped I/O model, each I/O operation will read or store all the records in a physical track each time. Hence, only part of loop basis will explicitly appear in the synthesized programs. Moreover, the input (or output) loop basis can be separated into two parts such that the first part specifies memory-loads and the second part specifies the records inside a memory-load. The second part can be further separated into two parts: one part, denoted as -m , is used to construct a memory-load and another part, denoted as - will not generate loop nests in the synthesized programs. In other words, we can write the input and the output bases as follows: where, we call -n (or ' n ) as a memory basis, since each instantiation of the indices in -n corresponds to a memory-load. Using these loop bases, a generic program can then be obtained as described in Fig. 5. Notice when parallel read a track, the track number is obtained from the indexing function of physical-track-basis(fi) (part of the input data distribution basis) as defined in Formula (12). So does the parallel write. Fig. 6 shows an example synthesized program for I I 4 . We assume that F 2 a 2 \Theta 2 matrix, and data are distributed in cyclic(2) manner. It uses e 8 b d as both the input and the output distribution bases. The input and the output loop bases are also the same as e 2 b d g1 is a factorization of e 8 . Let us further examine Formulas (15) and (16). Obviously, if - and ' - consist of the physical track- element bases for input and output data respectively, then the out-of-core data needs to be accessed only once. In terms of memory-loads, each memory-load has the following properties. The input for each memory- load occupies all of the locations in a set of physical tracks specified by the input data distribution basis. And after computing these records in the main memory, they are organized to occupy all of the locations in a set of physical tracks specified by the output data distribution basis. We call this type of memory-load as a perfect memory-load. If we can construct memory-loads in this manner, then we can synthesize a program which accesses out-of-core data only once (called a one-pass program). However, it may not be possible to construct the perfect memory-loads for some computations. In that case, we may need to keep only part of the records from a loaded physical track in the main memory and discard the other records. Therefore, a multi-pass program needs to be synthesized in which the same physical track is loaded several times. In terms of tensor bases, this corresponds to moving some of the vector bases in the physical track basis out of the memory basis. Consider the example presented in Section 3.2, where we moved fi(4) as the first factor. Since the unit of data access is still a physical track, this moving corresponds to loading the same track Bd times. However, for each loaded track, only half of the records can be kept in the main memory if we assume that the size of the main memory is the half of the input size. The records which should be kept for each loaded track can be determined by the vector bases which are moved before the memory-load basis. In this case, it is e . Each instantiation of the index b d2 determines the sub-blocks in a physical track which should be kept for the current memory-load. The detailed program for loading out-of-core data and constructing memory-loads is shown below, ENDDO ENDDO ENDDO ENDDO ENDDO where A is a temporary array for holding a physical track and X holds a memory-load. In summary, in order to determine efficient loop bases, we construct initial loop bases - and ' such that - and ' - consists of the physical track-element bases from the input and the output data distribution bases, respectively. We then determine which of the vector bases, if any, need to be moved from - into -n . These moved vector bases are used to determine which portions of a physical block should be kept for the current memory-load. The size of these moved vector bases is equal to the number of times of the same physical tracks to be loaded. Further, we may need to determine the order of the rest vector bases in - \Gamma - and to reflect the order of accessing physical tracks. Parallel read from a track ENDDO // Perform operations for a memory load // Write the result back Parallel write to a track parallel ENDDO ENDDO Figure Code for the tensor product I 2\Omega I 4 , where X is an array of size M and A = I I 4 . Synthesizing Programs for Stride Permutations In this section, we present a framework for synthesizing efficient out-of-core programs for stride permutations using a cyclic(B) distribution. The performance of synthesized programs will be represented as a function of the size of a sub-tensor basis, whose value can be obtained when the distribution size is given. We also present an algorithm to determine the distribution which will optimize the performance. 5.1 Stride Permutations in Cyclic(B) Distribution As we have mentioned, our goal is to decompose computations into a sequence of sub-computations operated on perfect memory-loads. However, this may not be always possible because of the limited memory size. In that case, we minimize the number of times the data is loaded for each memory-load as well as we ensure that each physical track of the output is written only once in parallel. We will develop an approach to determine the input and output loop bases for the given distribution cyclic(B). Based on these loop bases and data distribution bases, we determine memory-loads and operations to the memory-loads. Following which a program can be synthesized by using the procedure presented in Section 4. The cost of the program can also be determined from the loop bases. We summarize our results as the following theorem and then present a constructive proof. Theorem 5.1 Let Y be input and output vectors with length N , respectively. Let X and Y be distributed according to cyclic(B) and the data distribution bases be denoted as fi and ffi, respectively. Further denote that fi(2)\Omega fi(4) and ' ffi(2)\Omega ffi(4). Then a program can be synthesized with N operations for the stride permutation Proof: We present an algorithm as shown in Fig. 7 for determining the input and the output loop bases. The algorithm is further explained in Step 1 as shown below. In Step 2 and Step 3, we show how to construct 6 The notation j S j denotes the size of the tensor basis S, which is equal to the multiplication of the dimensions of each vector basis in S. Initialization fi(1)\Omega fi(3)\Omega fi(2)\Omega fi(4) // One-pass or multi-pass implementation if (j (' else consists of the last factors of the factorized tensor basis and BdD . // The final input and output loop bases Figure 7: An algorithm for determining input and output loop bases. memory-loads and operations for a memory-load. In Step 4, we show that I/O costs can be obtained from those information. 1. Determine input and output loop bases. We begin with the following construction for the input and the output loop bases, where we use the convention that - appearing on the right hand side refers to the original representation, which is equal to fi(1)\Omega fi(3)\Omega fi(2)\Omega fi(4), and - appearing on the left hand side refers to an update. So does '. Further, we assume that ffi(2)\Omega ffi(4). It is easy to verify that (' - \Gamma- is a permutation of (- Therefore, they denote the same records. Thus, if the number of records denoted by j than the size of the main memory, then we can simply take . However, the number of records denoted by j may exceed the size of the main memory. In that case, we want to construct memory-loads which can be obtained by reading the input data several times however writing the output data only once. In terms of tensor bases, as we discussed in Section 4, this reloading can be achieved by looping over part of the indices in - . In other words, we need to factorize - as -2 and -1 such that -2 denotes which sub-blocks should be kept for a loaded physical track and -1 denotes records inside each sub-block. Further, j -2 j is equal to the number of times we will reload each physical track. This reloading is achieved by taking moving -2 before - ' m . In summary, the input and output loop bases in Formulas (17) and (18) are modified as follows: consists of the last factors of the factorized tensor basis and the size of ' m is equal to M BdD . ffl For input loop basis. Let -2 Therefore, now the input and output loop bases can be written as, We further verify the following facts. First, and ' contain the same vector bases, however, in the different order. (The proof is presented in Appendix B.) Therefore, they denote the same records, however, in different order. Second, from the previous results, we have that j . Therefore the records denoted by them can fit into a memory-load. Third, j -m DBd ), which means that we have loaded more records which can fit into the main memory and we need to discard some of the records. The details for determining which records to be discarded will be discussed in the next step. (4) -n and ' m contain the same vector bases. We therefore can set that ' m=-n , which will only change the order of writing results onto physical tracks. 2. Determine a memory-load. When j (' Therefore, the records denoted by them can be used to form a perfect memory-load. However, when this condition is not satisfied, we need to use Formula (19) and (20) as the input and output loop bases, respectively. Because j , the size of each memory-load can be set to be equal to the size of the main memory. However, as we mentioned before, we need to discard some records from each loaded track to form the memory-load. This can be done by linearize -2 . Each instantiation of -2 will give a set of sub-blocks in a physical track which should be kept. 3. Determine operations for a memory-load. As we mentioned above, for each memory load, the tensor vectors in the input and output loop bases which denote the records inside a memory-load are the same, but in a different order. In other words, one is a permutation of another. Because the input and output loop bases are permutations of the input and output data distribution bases, we actually permute a memory-load of data each time. Therefore, each in-memory operation is nothing more than a permutation for a subset of data distribution bases denoted by -m\Omega 4. I/O cost of synthesized programs. It is readily to see that if j program can be synthesized, i.e., the number of parallel I/Os is 2N BdD . When the above condition does not hold, we keep j records for each loaded physical track and load the same physical track j -2 j times. Moreover, since DBd , it can be easily determined that j -2 . Because we write out each record only once, the number of parallel I/O operations is (1 BdD . Combining these two cases together, we yield the performance results presented in the theorem. Further, a program with this performance can be synthesized by using the procedure listed in Fig. 5. 5.2 Determining Efficient Data Distributions In the previous subsection, we presented an approach for synthesizing efficient I/O programs for the given data distribution. We now present an algorithm to determine the data distribution which optimizes the performance of the synthesized program. The idea of the algorithm is as follows. We begin with the physical track distribution cyclic(B d ), i.e., initially . If there is a one-pass algorithm under this distribution, then B d is the desired block size for the data distribution. Otherwise, we double the value of B. If the performance of the synthesized program under this distribution increases, we continue this procedure. Otherwise, the algorithm stops and the current block size is the desired size of data distributions. We formalize this idea in Fig. 8. number of I/Os when using cyclic(B) while (Cost 6= 2N DBd and B - N D ) do number of I/Os when using cyclic(B) If C new - Cost then Cost = C new else break output distribution size = B=2, number of Figure 8: Algorithm for computing the desired size of data distributions. 6 Synthesizing Programs for Tensor Products For the tensor product, I R\Omega A V\Omega I C , the main computation matrix A V needs V records with the stride C. We call each of these V records as a desired record. We first present a possible general form of the input and output loop bases for the given distribution cyclic(B). The parameters in this form can be determined by analyzing the relative values of the parameters. Based on these loop bases and also data distribution bases, we can determine memory-loads and operations to each memory-load. Therefore a program can be generated by using the procedure discussed in Section 4. The cost of the program can also be determined from the loop bases. Since the tensor product I R\Omega A V\Omega I C does not change the order of the inputs (or it can be computed in-place), we will use the same input and output data distribution bases for the input and output data and also the same input and output loop bases for programs synthesized in this section. Therefore, we will only consider input, input distribution and input loop bases and assume that all of the output bases are the same as their input bases respectively. We summarize our results as a theorem and then present a constructive proof. Theorem 6.2 Let the input data be distributed according to cyclic(B) and the input data distribution basis be denoted as -. Let fi(2)\Omega fi(4). Further assume that -1 denotes a subset of - and is moved into the memory basis. Then for the tensor product I R\Omega A V\Omega I C , where RV a program can be synthesized with 2N BdD parallel I/O operations; otherwise a program can be synthesized with j -2 j 3N BdD parallel I/O operations. Proof: 1. Determine input loop basis. If the desired records for an A V computation are stored in t physical tracks and t - M BdD , then we can simply load t tracks in parallel and therefore a one-pass program can be generated. However, when t ? M BdD , we can not keep all of the records in t tracks in the main memory. We take a simple approach that we keep as many as possible records which follow each desired records in the same track in the main memory. Then we reload these tracks to finish the computations for the other records. In terms of the tensor basis, we need nothing more than factorizing and permuting the input data distribution basis to reflect these data access patterns. More specifically, we begin with -(2)\Omega -(4), and defined as the same initial value as defined in Section 5. For a one-pass program, we factorize and permute -n\Omega -m to change the order of accessing physical tracks. However, for a multi-pass program, we need to factorize and permute all of the -, since we need to keep part of the records loaded in the main memory and discard the other records. The part of records to be kept or discarded can be denoted by a subset of the vector bases in the physical track basis. One of the example factorizing and permuting and its semantics has been discussed in Chapter 4. However, in general, in order to factorize and permute a tensor basis to a desired form, we need to examine the relative values of the parameters in the targeted I/O model, the tensor product and the size B of the data distribution. Because of the space limitation, we present the major idea of the analysis in Appendix C. For the following analysis, it is enough to say that we have found subsets of - , denoted as -1 and -2 . -2 is moved into the memory basis and will generate loop nests for data access. 2. Determine a memory-load. For a one-pass program, we can simply factorize -n\Omega -m and BdD . For a multi-pass program, we to be -n\Omega -m such that j -m and all of the vector bases in -2 appear in -n . Moreover, for a multi-pass program, as discussed in Section 5, we use -2 to determine which records should be kept for the current memory-load. 3. Determine operations for a memory-load. The original tensor product can be regarded as R parallel applications of A V to the inputs with stride C. When data are distributed among disks and loaded in units of physical tracks, the net effect is to possibly reduce the stride with which each A V will access in the main memory. The operations to a memory-load have a general form of I M Z\Omega A V\Omega I Z . However, the value of Z will depend on the relative values of the parameters. Appendix C presents the major ideas on how to determine the value of Z. 4. I/O cost of synthesized programs. For a one-pass program which does not move any vector bases in - , the number of parallel I/Os is simply equal to 2N BdD . In other words, the synthesized program is optimal in terms of the number of I/Os. For a multi-pass program, we need to read the inputs j -2 j times. Therefore the number of parallel I/O operations is j -2 j 3N BdD . The constant 3 can be explained as follows. When we store a physical track, we need to read that physical track into the main memory again, since part of the records in that physical track have been discarded. By reloading this physical track, we can reassemble the physical track with the part of updated records and then write it out in parallel. Otherwise, part of the records to be written out in that physical track may not be correct. Further, "reassembling" the physical track needs to use the tensor basis ' -2 (notice that ' -2 is equal to -2 ) to put the updated records into the correct locations of the physical track. This is similar with how to use -2 to take sub-blocks out from a loaded physical track for the current memory-load. Now, a program with the performance discussed above can be synthesized by using the procedure listed in Fig. 5. However, to be accurate, when synthesizing a multi-pass program, we need to incorporate the idea of "reassembling" a physical track into the write-out part of the procedure listed in Fig. 5, which, as we discussed above, is nothing more than using the linearization of ' -2 to put sub-blocks in the current memory-load into the correct locations of the reloaded physical track.7 Synthesizing Programs for Tensor Product Formulas In this section, we discuss techniques of program synthesis for tensor product formulas. There are several strategies for developing disk-efficient programs, such as exploiting locality and exploiting parallelism in accessing the data. Similar ideas have been discussed in [13], where they use factor grouping to exploit locality and data rearrangement to reduce the cost of I/O operations. We have also presented a greedy method which uses factor grouping to improve the performance for the striped Vitter and Shriver's two-level memory model with a fixed block size of data distribution [10]. Factor grouping combines contiguous tensor products in a tensor product formula together and therefore reduces the number of passes to access the secondary storage. Consider the core Cooley-Tukey FFT computation computation can be represented by Formula (9) by ignoring the initial bit-reversal and the twiddle factor operations). For i=2 and 3, we have the following tensor products I 2 2\Omega I 2 , and I 2 respectively. Assuming that each of these tensor products can be implemented optimally, the number of parallel I/O operations required to implement these two steps individually is 4N DB . However, they are successive tensor products in Formula (6). Hence, by using the properties of tensor products, they can be combined into one tensor product, I 2 2\Omega I 2 , which may also be implementable optimally by using only 2N DBd parallel I/O operations. Data rearrangement uses the properties of tensor products to change the data access pattern. For example, the tensor product I R\Omega A I C can be transformed into the equivalent form (I C ). In the best case, the number of parallel I/Os required is 6N DBd after using this transformation, since at least three passes are needed for the transformed form. Because of the extra passes introduced by this transformation, it is not profitable to use it for our targeted machine model. Further, the first and the last terms in the transformed formula may not be implementable optimally. Therefore, we have not incorporated this transformation into our current optimization procedures. Minimizing I/O Cost by using Dynamic Programming Since factor grouping (as shown above) and the size of the data distribution (as will be shown in the next section) have a large influence on the performance of synthesized programs, we take the following approach for determining an optimal manner in which a tensor product formula can be implemented. We use the algorithm for determining the optimal data distribution presented in Fig. 8 as a main routine. However, for each cyclic(B) data distribution, we use a dynamic programming algorithm to determine the optimal factor groupings. Hence, we also call this method as a multi-step dynamic programming method. Let C[i; j] be the optimal cost (the minimum number of I/O passes required to access the out-of-core data) for computing (j \Gamma i) tensor factors from the ith factor to the jth factor in a tensor product formula. Then C[i; j] can be computed as follows: ae In the above formula, C 0 denotes the cost for computing a tensor product. The method of determining the cost of a tensor product has been discussed in Section 6. The values of C 0 for different cases can be found in Table 3 and Table 4 presented in Section 8.2. A special case of needs to be further explained. we assume that C[j and we use C[i; k] to represent the cost of grouping all the tensor product factors from i to j together. Because the grouped tensor product is a simple tensor product, the value of C[i; k] in this case can also be determined by using Table 3 and Table 4 presented in Section 8.2. However, in this case, if or the size of grouped operations is larger than the size of the main memory, we don't want to group all of k \Gamma i factors together. We assign a large value such as 1 to C[k; j] to avoid it from being selected. Performance Results 8.1 Performance of Synthesized Programs for Matrix Transposition Given the flexibility of choosing different data distributions, we can synthesize programs with better performance than those obtained using a fixed size of data distributions for stride permutations. We present a set of experimental results for the number of I/O operations required by the cyclic(B d ) distribution and distribution, where the size B of the distribution varies. These results are summarized in Table 1, and Table 2. From the tables, we can see that the number of passes is not a monotonically increasing or decreasing function. However, it normally decreases and then increases as B is increased. Therefore the algorithm in Fig. 8 has a good chance to find out an efficient size of data distributions. We also notice that for any stride permutation, we can always find out a distribution which can implement the computation in only one-pass. Table 1: The number of I/O passes required for performing stride permutation L PQ using various cyclic(B) distributions (D Table 2: The number of I/O passes required for performing stride permutation L PQ using various cyclic(B) distributions (D 8.2 Performance of Synthesized Programs for Tensor Products The number of I/O passes required by the synthesized programs for a tensor product are summarized in Table 3 and Table 4 by going through various cases using the approach presented in Appendix C. We can verify that the results presented here are more comprehensive than the results presented in [10]. In most cases, using the approach presented in Section 5.1, we can actually synthesize programs with better performance. For example, when , from [10], a program with V BdD passes will be synthesized. However, for those conditions, we can have that C ? B d , and V C ? M . If we further assume that D, then from the results in Table 3, we can synthesize a program with V C passes, which is less than V BdD M . Table 3: The number of I/O passes required for the tensor product I R\Omega A V\Omega I C using a cyclic(B) distribution, BdD ) is the maximum number of the physical tracks in a memory-load. Table 4: The number of I/O passes required for the tensor product I R\Omega A V\Omega I C with given size B of data distributions, where N t (= M BdD ) is the maximum number of the physical tracks in a memory-load. We now show that by using an appropriate cyclic(B) data distribution, a better performance program can be synthesized for most of the cases. Several typical examples are shown in Table 5. We notice that when we increase B, we can reduce the number of passes of data access for most of the cases and the decrease in the number of passes can be as large as eight times. The values in the table also suggest that we can use the algorithm presented in Fig 8 to find out an efficient size of data distributions for a given tensor product. We also notice that for some cases, such as C - B d , we can not improve the performance. The reason is that the stride required by A V is less than the physical block size, we can not reduce it further by redistribution. Table 5: The number of I/O passes required for various sizes of data distributions and the tensor product I R\Omega A V\Omega I C . Let . Let the size N(= RV C) of the input vector be very large. 8.3 Performance of Synthesized Programs for Tensor Product Formulas We show the effectiveness of the multi-step dynamic programming method by comparing the programs synthesized by it with the programs synthesized by the greedy method and the dynamic programming method (applied to the data distribution of fixed size), respectively. The example we use is the core Cooley-Tukey FFT computation. The results for several typical sizes of inputs are shown in Table 6. We find out that using dynamic programming for the fixed size of the cyclic(B d ) distribution normally can not improve the performance over the greedy method. However, by using the multi-step dynamic programming, we can reduce the number of passes for the synthesized programs by at least 1 if N is significantly large. Because the input size is large, the performance gain by reducing even one pass to access the out-of-core data is significant. Greedy D.P. M.D.P. 4 Table The number of I/O passes for the synthesized programs using Greedy, Dynamic programming (D.P), and Multi-step dynamic programming(M.D.P) methods (D 9 Related Research Tensor product algebra has been successfully used for synthesizing programs for block recursive algorithms for various architectures such as vector, shared memory, and distributed memory machines [11, 9, 5]. Recently, the tensor product framework is used for synthesizing programs for memory hierarchies. For example, a method of program synthesis for a single disk system is discussed in [13]. However they have not addressed the issues of data distributions on multiple disk systems. In [14], Kumar, Huang, Sadayappan and Johnson discussed the method of program synthesis for cache memory, where they addressed the issue of data layouts on a set-associated cache. In [10], we presented a framework of using tensor products for synthesizing efficient programs for a deeper level of memory hierarchy modeled by Vitter and Shriver's two-level memory model. However, we only considered the data distributions to be fixed physical track distributions. The programs synthesized are also not as efficient as the programs synthesized from the approach presented in this paper. There are also many other recent research efforts in other areas of I/O intensive applications, which include out-of-core algorithms, languages, compilers, parallel file systems, and performance models [2]. For example, Vitter and Shriver proved lower and upper bounds for matrix transposition and FFT graph computations for the two-level memory model [19]. Cormen presented algorithms for BMMC permutations [3], which includes stride permutations as a sub-class, on the two-level memory model. Conclusions We have presented a novel framework for synthesizing out-of-core programs for block recursive algorithms using the algebraic properties of tensor products. We use the striped Vitter and Shriver's two level memory model as our target machine model. However, instead of using the simpler physical track distribution normally used by this model, we use various block-cyclic distributions supported by the High Performance Fortran to organize data on disks. Moreover, we use tensor bases as a tool to capture the semantics of data distributions and data access patterns. We show that by using the algebraic properties of tensor products, we can decompose computations and arrange data access patterns to generate out-of-core programs automatically. We demonstrate the importance of choosing the appropriate data distribution for the efficient out-of-core implementations through a set of experiments. The experimental results also shows that our simple algorithm for choosing the efficient data distribution is very effective. From the observations about the importance of data distributions and factor grouping for tensor products, we propose a dynamic programming approach to determine the efficient data distribution and the factor grouping. For an example FFT computation, this dynamic programming approach can reduce the number of I/O passes by at least one comparing with using a simpler greedy algorithm. Acknowledgements We thank Peter Mills for his comments on this paper. --R Vector models for data-parallel computing Virtual Memory for Data-Parallel Computing Integrating theory and practice in parallel file systems. EXTENT: A portable programming environment for designing and implementing high performance block recursive algorithms. A fast computer method for matrix transposing. Parallel I/O systems and interfaces for parallel computers. Kronecker Products and Matrix Calculus: With Applications. Synthesizing Communication-efficient Distributed-Memory Parallel Programs for Block Recursive Algorithms Generating efficient programs for two-level memories from tensor products A methodology for designing Efficient transposition algorithms for large matrices. A methodology for generating efficient disk-based algorithms from tensor product formulas An algebraic approach to cache memory characterization for block recursive algorithms. Computational frameworks for the fast Fourier transform. Parallel Algorithm Derivation and Program Transformation. Parallel processing with the perfect shuffle. Compilation of out-of-core data parallel programs for distributed memory machines Algorithms for parallel memory I: Two-level memories --TR
tensor product;block recursive algorithm;data distribution;program synthesis;fast Fourier transform;Parallel I/O
299871
Genericity, Randomness, and Polynomial-Time Approximations.
Polynomial-time safe and unsafe approximations for intractable sets were introduced by Meyer and Paterson [Technical Report TM-126, Laboratory for Computer Science, MIT, Cambridge, MA, 1979] and Yesha [SIAM J. Comput., 12 (1983), pp. 411--425], respectively. The question of which sets have optimal safe and unsafe approximations has been investigated extensively. Duris and Rolim [Lecture Notes in Comput. Sci. 841, Springer-Verlag, Berlin, New York, 1994, pp. 38--51] and Ambos-Spies [Proc. 22nd ICALP, Springer-Verlag, Berlin, New York, 1995, pp. 384--392] showed that the existence of optimal polynomial-time approximations for the safe and unsafe cases is independent. Using the law of the iterated logarithm for p-random sequences (which has been recently proven in [Proc. 11th Conf. Computational Complexity, IEEE Computer Society Press, Piscataway, NJ, 1996, pp. 180--189]), we extend this observation by showing that both the class of polynomial-time $\Delta$-levelable sets and the class of sets which have optimal polynomial-time unsafe approximations have p-measure 0. Hence typical sets in E (in the sense of p-measure) do not have optimal polynomial-time unsafe approximations. We will also establish the relationship between resource bounded genericity concepts and the polynomial-time safe and unsafe approximation concepts.
Introduction . The notion of polynomial-time safe approximations was introduced by Meyer and Paterson in [13] (see also [8]). A safe approximation algorithm for a set A is a polynomial-time algorithm M that on each input x outputs either do not know) such that all inputs accepted by M are members of A and no member of A is rejected by M . An approximation algorithm is optimal if no other polynomial-time algorithm correctly decides infinitely many more inputs, that is to say, outputs infinitely many more correct 1s or 0s. In Orponen, Russo, and Sch-oning [14], the existence of optimal approximations was phrased in terms of P-levelability: a recursive set A is P-levelable if for any deterministic Turing machine M accepting A and for any polynomial p there is another machine M 0 accepting A and a polynomial p 0 such that for infinitely many elements x of A, M does not accept x within p(jxj) steps while M 0 accepts x within p 0 (jxj) steps. It is easy to show that A has an optimal polynomial-time safe approximation if and only if neither A nor - A is P-levelable. The notion of polynomial-time unsafe approximations was introduced by Yesha in [19]: an unsafe approximation algorithm for a set A is just a standard polynomial-time bounded deterministic Turing machine M with outputs 1 and 0. Note that, different from the polynomial-time safe approximations, here we are allowed to make errors, and we study the amount of inputs on which M are correct. Duris and Rolim [6] further investigated unsafe approximations and introduced a levelability concept, \Delta-levelability, which implies the nonexistence of optimal polynomial-time unsafe ap- proximations. They showed that complete sets for E are \Delta-levelable and there exists Received by the editors April 22, 1996; accepted for publication (in revised form) March 4, 1997; published electronically July 7, 1998. http://www.siam.org/journals/sicomp/28-2/30235.html y Department of Computer Science, The University of Auckland, Private Bag 92019, Auckland, New Zealand (wang@cs.auckland.ac.nz). GENERICITY, RANDOMNESS, AND APPROXIMATIONS 395 an intractable set in E which has an optimal safe approximation but no optimal unsafe approximation. But they did not succeed in producing an intractable set with optimal unsafe approximations. Ambos-Spies [1] defined a concept of weak \Delta-levelability and showed that there exists an intractable set in E which is not weakly \Delta-levelable (hence it has an optimal unsafe approximation). Like resource-bounded randomness concepts, different kinds of resource-bounded genericity concepts were introduced by Ambos-Spies [2], Ambos-Spies, Fleischhack, and Huwig [3], Fenner [7], and Lutz [9]. It has been proved that resource-bounded generic sets are useful in providing a coherent picture of complexity classes. These sets embody the method of diagonalization construction; that is, requirements which can always be satisfied by finite extensions are automatically satisfied by generic sets. It was shown in Ambos-Spies, Neis, and Terwijn [4] that the generic sets of Ambos- Spies are P-immune, and that the class of sets which have optimal safe approximations is large in the sense of resource-bounded Ambos-Spies category. Mayordomo [11] has shown that the class of P-immune sets is neither meager nor comeager both in the sense of resource-bounded Lutz category and in the sense of resource-bounded Fenner category. We extend this result by showing that the class of sets which have optimal safe approximations is neither meager nor comeager both in the sense of resource-bounded Lutz category and in the sense of resource-bounded Fenner category. Moreover, we will show the following relations between unsafe approximations and resource-bounded categories. 1. The class of weakly \Delta-levelable sets is neither meager nor comeager in the sense of resource-bounded Ambos-Spies category [4]. 2. The class of weakly \Delta-levelable sets is comeager (is therefore large) in the sense of resource-bounded general Ambos-Spies [2], Fenner [7], and Lutz [9] categories. 3. The class of \Delta-levelable sets is neither meager nor comeager in the sense of resource-bounded general Ambos-Spies [2], Fenner [7], and Lutz [9] categories. In the last section, we will show the relationship between polynomial-time approximations and p-measure. Mayordomo [12] has shown that the class of P-bi-immune sets has p-measure 1. It follows that the class of sets which have optimal polynomial-time safe approximations has p-measure 1. Using the law of the iterated logarithm for p-random sequences which we have proved in Wang [16, 17], we will show that the following hold. 1. The class of \Delta-levelable sets has p-measure 0. 2. The class of sets which have optimal polynomial-time unsafe approximations have p-measure 0. That is, the class of weakly \Delta-levelable sets has p-measure 1. 3. p-Random sets are weakly \Delta-levelable but not \Delta-levelable. Hence typical sets in the sense of resource-bounded measure do not have optimal polynomial-time unsafe approximations. It should be noted that the above results show that the class of weakly \Delta-levelable sets is large both in the sense of the different notions of resource-bounded category and in the sense of resource-bounded measure. That is to say, typical sets in E 2 (in the sense of resource-bounded category or in the sense of resource-bounded measure) are weakly \Delta-levelable. In contrast to the results in this paper, we have recently shown (in [18]) the following results. 1. There is a p-stochastic set A 2 E 2 which is \Delta-levelable. 2. There is a p-stochastic set A 2 E 2 which has an optimal unsafe approximation 2. Definitions. N and Q(Q + ) are the set of natural numbers and the set of (nonnegative) rational numbers, respectively. is the binary alphabet, \Sigma is the set of (finite) binary strings, \Sigma n is the set of binary strings of length n, and is the set of infinite binary sequences. The length of a string x is denoted by jxj. ! is the length-lexicographical ordering on \Sigma , and z n (n - 0) is the nth string under this ordering. - is the empty string. For strings x; y 2 \Sigma , xy is the concatenation of x and y, x v y denotes that x is an initial segment of y. For a sequence x 2 \Sigma [ \Sigma 1 and an integer number n - \Gamma1, x[0::n] denotes the initial segment of length n+1 of x denotes the ith bit of x, i.e., Lowercase letters z from the middle and the end of the alphabet will denote numbers and strings, respectively. The letter b is reserved for elements of \Sigma, and lowercase Greek letters -; infinite sequences from \Sigma 1 . A subset of \Sigma is called a language, a problem, or simply a set. Capital letters are used to denote subsets of \Sigma and boldface capital letters are used to denote subsets of \Sigma 1 . The cardinality of a language A is denoted by kAk. We identify a language A with its characteristic function, i.e., x 2 A if and only if 1. The characteristic sequence of a language A is the infinite sequence A(z 0 )A(z 1 We freely identify a language with its characteristic sequence and the class of all languages with the set \Sigma 1 . For a language A ' \Sigma and a string z n 2 \Sigma , A j'z . For languages A and B, - A is the complement of is the symmetric difference of A and B; A ' B (resp., A ae B) denotes that A is a subset of B (resp., A ' B and B 6' A). For a number n, ng and A ng. We fix a standard polynomial-time computable and invertible pairing function -x; yhx; yi on \Sigma such that, for every string x, there is a real ff(x) ? 0 satisfying almost all n; where \Sigma and \Sigma g. We will use to denote the complexity classes DT IME(poly), DT IME(2 linear ), and poly ), respectively. Finally, we fix a recursive enumeration fP e : e - 0g of P such that P e (x) can be computed in O(2 jxj+e ) steps (uniformly in e and x). We define a finite function to be a partial function from \Sigma to \Sigma whose domain is finite. For a finite function oe and a string x 2 \Sigma , we write oe(x) # if x 2 dom(oe), and oe(x) " otherwise. For two finite functions oe; - , we say oe and - are compatible if The concatenation oe- of two finite functions oe and - is defined as -. For a set A and a string x, we identify the characteristic string A j'x with the finite function xg. For a finite function oe and a set A, oe is extended by A if for all x 2 dom(oe), 3. Genericity versus polynomial-time safe approximations. In this sec- tion, we summarize some known results on the relationship between the different notions of resource-bounded genericity and the notion of polynomial-time safe approximations We first introduce some concepts of resource-bounded genericity. Definition 3.1. A partial function f from \Sigma to foe : oe is a finite function g is dense along a set A if there are infinitely many strings x such that f(A j'x) is defined. GENERICITY, RANDOMNESS, AND APPROXIMATIONS 397 A set A meets f if, for some x, the finite function extended by A. Otherwise, A avoids f . Definition 3.2. A class C of sets is nowhere dense via f if f is dense along all sets in C and for every set A 2 C, A avoids f . Definition 3.3. Let F be a class of (partial) functions from \Sigma to foe : oe is a finite functiong. A class C of sets is F-meager if there exists a function f 2 F such that C= [ i2N C i and C i is nowhere dense via f i class C of sets is F-comeager if - C is F-meager. Definition 3.4. A set G is F-generic if G is an element of all F-comeager classes. Lemma 3.5 (see [2, 7, 9]). A set G is F-generic if and only if G meets all functions which are dense along G. For a class F of functions, each function f 2 F can be considered as a finitary property P of sets. If f(A j'x) is defined, then all sets extending the property P . So a set A has the property P if and only if A meets f . f is dense along A if and only if in a construction of A along the ordering !, where at stage s of the construction we decide whether or not the string z s belongs to A, there are infinitely many stages s such that by appropriately defining A(z s ) we can ensure that A has the property P (that is to say, for some string x, extended by A). For different function classes F, we have different notions of F-genericity. In this paper, we will concentrate on the following four kinds of function classes which have been investigated by Ambos-Spies [2], Amos-Spies, Neis, and Terwijn [4], Fenner [7], and Lutz [9], respectively. F 1 is the class of polynomial-time computable partial functions from \Sigma to \Sigma; F 2 is the class of polynomial-time computable partial functions from \Sigma to foe : oe is a finite functiong; F 3 is the class of polynomial-time computable total functions from \Sigma to foe : oe is a finite functiong; and F 4 is the class of polynomial-time computable total functions from \Sigma to \Sigma . Definition 3.6. 1. (See Ambos-Spies, Neis, and Terwijn [4].) A set G is A-generic if G is F 1 - generic. 2. (See Ambos-Spies [2].) A set G is general A-generic if G is F 2 -generic. 3. (See Fenner [7].) A set G is F-generic if G is F 3 -generic. 4. (See Lutz [9].) A set G is L-generic if G is F 4 -generic. Obviously, we have the following implications. Theorem 3.7. 1. If a set G is general A-generic, then G is A-generic, F-generic, and L-generic. 2. If a set G is F-generic, then G is L-generic. Proof. The proof is straightforward. In this paper, we will also study the following concepts. A set G is Ambos-Spies n k -generic (resp., general Ambos-Spies n k -generic, Fenner n k -generic, Lutz n k -generic) if and only if G meets all n k -time computable functions f are dense along G. Theorem 3.8 (see Ambos-Spies [2]). A class C of sets is meager in the sense of Ambos-Spies category (resp., general Ambos-Spies category, Fenner category, Lutz Category) if and only if there exists a number k 2 N such that there is no Ambos- Spies n k -generic (resp., general Ambos-Spies n k -generic, Lutz n k -generic, Fenner set in C. As an example, we show that Ambos-Spies n-generic sets are P-immune. Theorem 3.9 (see Ambos-Spies, Neis, Terwijn [4]). Let G be an Ambos-Spies n-generic set. Then G is P-immune. Proof. For a contradiction assume that A 2 P is an infinite subset of G. Then the function f : \Sigma ! \Sigma defined by is computable in time n and is dense along G. So, by the Ambos-Spies n-genericity of G, G meets f . By the definition of f , this implies that there exists some string A such that z G, a contradiction. It has been shown (see Mayordomo [12]) that neither F-genericity nor L-genericity implies P-immunity or non-P-immunity. A partial set A is defined by a partial characteristic function f : \Sigma ! \Sigma. A partial set A is polynomial-time computable if dom(A) 2 P and its partial characteristic function is computable in polynomial time. Definition 3.10 (see Meyer and Paterson [13]). A polynomial-time safe approximation of a set A is a polynomial-time computable partial set Q which is consistent with A, that is to say, for every string x 2 dom(Q), Q(x). The approximation Q is optimal if, for every polynomial-time safe approximation Q 0 of A, Definition 3.11 (see Orponen, Russo, and Sch-oning [14]). A set A is P-levelable if, for any subset B 2 P of A, there is another subset B of A such that kB 0 1. Lemma 3.12 (see Orponen, Russo, and Sch-oning [14]). A set A possesses an optimal polynomial-time safe approximation if and only if neither A nor - A is P- levelable. Proof. The proof is straightforward. Lemma 3.13. If a set A is P-immune, then A is not P-levelable. Proof. The proof is straightforward. Theorem 3.14 (see Ambos-Spies [2]). Let G be an Ambos-Spies n-generic set. Then neither G nor - G is P-levelable. That is to say, G has an optimal polynomial-time safe approximation. Proof. This follows from Theorem 3.9. Theorem 3.14 shows that the class of P-levelable sets is "small" in the sense of resource-bounded (general) Ambos-Spies category. Corollary 3.15. The class of P-levelable sets is meager in the sense of resource-bounded (general) Ambos-Spies category. Now we show that the class of P-levelable sets is neither meager nor comeager in the sense of resource-bounded Fenner category and Lutz category. Theorem 3.16. 1. There exists a set G in E 2 which is both F-generic and P-levelable. 2. there exists a set G in E 2 which is F-generic but not P-levelable. Proof. 1. Let I be an enumeration of F 3 such that f i (x) can be computed uniformly in time 2 log k (jxj+i) for some k 2 N . In the following, we construct a set G in stages which is both F-generic and P-levelable. In the construction we will ensure that GENERICITY, RANDOMNESS, AND APPROXIMATIONS 399 In order to ensure that G is P-levelable, it suffices to satisfy for all e - 0 the following requirements: To show that the requirements L e (e - 0) ensure that G is P-levelable (fix a subset of G) we have to define a subset C of G such that C e such that P Then, by the requirement L e , has the required property. The strategy for meeting a requirement L e is as follows: if there is a string to refute the hypothesis of the requirement trivially met). To ensure that G is F-generic, it suffices to meet for all the following requirements: exists a string x such that G extends (G j'x)f e (G j'x). Because the set I 1 is used to satisfy L e , we will use I 2 to satisfy G e . The strategy for meeting a requirement G e is as follows: for some string x 2 I 2 , let G extend Define a priority ordering of the requirements by letting R Ln . Now we give the construction of G formally. Stage s. If G(z s ) has been defined before stage s, then go to stage s + 1. A requirement L e requires attention if 2. z s 2 3. For all y A requirement G e requires attention if e ! s, G e has not received attention yet, and x 2 I 2 for all z s - x - z t where z t is the greatest element in dom((G j'z s )f e (G j'z s )). Fix the minimal n such that Rn requires attention. If there is no such n, then let G(z s Otherwise, we say that Rn receives attention. Moreover, if then let G(z s z t is the greatest element in dom((G j'z s )f e (G j'z s )) and for a finite function oe and a number k, f ill 1 (oe; dom(oe)g. This completes the construction of G. It is easy to verify that the set G constructed above is both P-levelable and F-generic; the details are omitted here. 2. For a general A-generic set G, by Theorem 3.9, G is P-immune. By Theorem 3.7, G is F-generic. Hence, G is F-generic but not P-levelable. Corollary 3.17. The class of P-levelable sets is neither meager nor comeager in the sense of resource-bounded Fenner category and Lutz category. Proof. This follows from Theorem 3.16. 4. Genericity versus polynomial-time unsafe approximations. Definition 4.1 (see Duris and Rolim [6] and Yesha [19]). A polynomial-time unsafe approximation of a set A is a set B 2 P. The set A\DeltaB is called the error set of the approximation. Let f be an unbounded function on the natural numbers. A set A is \Delta-levelable with density f if, for any set B 2 P, there is another set B such that for almost all n 2 N . A set A is \Delta-levelable if A is \Delta-levelable with density f such that lim n!1 Note that, in Definition 4.1, the density function f is independent of the choice of Definition 4.2 (see Ambos-Spies [1]). A polynomial-time unsafe approximation B of a set A is optimal if, for any approximation B A set A is weakly \Delta-levelable if, for any polynomial-time unsafe approximation B of A, there is another polynomial-time unsafe approximation B 0 of A such that It should be noted that our above definitions are a little different from the original definitions of Ambos-Spies [1], Duris and Rolim [6], and Yesha [19]. In the original def- initions, they considered the errors on strings up to certain length (i.e., k(A\DeltaB) -n instead of errors on strings up to z n (i.e., k(A\DeltaB) j'z n k). But it is easy to check that all our results except Theorem 5.14 in this paper hold for the original definitions also. Lemma 4.3 (see Ambos-Spies [1]). 1. A set A is weakly \Delta-levelable if and only if A does not have an optimal polynomial time unsafe approximation. 2. If a set A is \Delta-levelable then it is weakly \Delta-levelable. Lemma 4.4. Let A; B be two sets such that A is \Delta-levelable with linear density and A\DeltaB is sparse. Then B is \Delta-levelable with linear density. Proof. Let p be the polynomial such that, for all n, assume that A is \Delta-levelable with density ffn (ff ? 0). Then there is a real number We will show that B is \Delta-levelable with density fin. given any set C 2 P, by \Delta-levelability of A, choose D 2 P such that for almost all n. Then for almost all n. Hence, B is \Delta-levelable with density fin. Theorem 4.5. 1. there exists a set G in E 2 which is both A-generic and \Delta-levelable. 2. there exists a set G in E 2 which is A-generic but not weakly \Delta-levelable. Proof. 1. Duris and Rolim [6] constructed a set A in E which is \Delta-levelable with linear density and, in [4], Ambos-Spies, Neis, and Terwijn showed that, for any set there is an A-generic set B 0 in E 2 such that B \DeltaB 0 is sparse. So, for any set A which is \Delta-levelable with linear density, there is an A-generic set G in E 2 such that A\DeltaG is sparse. It follows from Lemma 4.4 that G is \Delta-levelable with linear density. GENERICITY, RANDOMNESS, AND APPROXIMATIONS 401 2. Ambos-Spies [1, Theorem 3.3] constructed a P-bi-immune set in E which is not weakly \Delta-levelable. In his proof, he used the requirements to ensure that the constructed set G is P-bi-immune. In order to guarantee that G is not weakly \Delta-levelable, he used the requirements to ensure that will be an optimal unsafe approximation of G. If we change the requirements BI 2e and BI 2e+1 to the requirements then a routine modification of the finite injury argument in the proof of Ambos-Spies [1, Theorem 3.3] can be used to construct an A-generic set G in E 2 which is not weakly \Delta-levelable. The details are omitted here. Corollary 4.6. The class of (weakly) \Delta-levelable sets is neither meager nor comeager in the sense of resource-bounded Ambos-Spies category. Corollary 4.6 shows that the class of weakly \Delta-levelable sets is neither large nor small in the sense of resource-bounded Ambos-Spies category. However, as we will show next, it is large in the sense of resource-bounded general Ambos-Spies category, resource-bounded Fenner category, and resource-bounded Lutz category. Theorem 4.7. Let G be a Lutz n 3 -generic set. Then G is weakly \Delta-levelable. Proof. Let P. We show that - B witnesses that the unsafe approximation B of G is not optimal. For any string x, define y, where if and only if z jxj+j 2 B. Obviously, f is computable in time n 3 . Since G is Lutz infinitely often. Hence, for any k and n 0 , there exists n ? n 0 such that only if B. Hence which implies that G is weakly \Delta-levelable. Corollary 4.8. The class of weakly \Delta-levelable sets is comeager in the sense of resource-bounded Lutz, Fenner, and general Ambos-Spies categories. Proof. This follows from Theorems 3.7, 3.8, and 4.7. Now we show that the class of \Delta-levelable sets is neither meager nor comeager in the sense of all these resource-bounded categories we have discussed above. Theorem 4.9. there exists a set G in E 2 which is both general A-generic and \Delta-levelable. Proof. Let . For each set P e 2 P, let P g(e) be defined in such a way that In the following we construct a general A-generic set G which is \Delta-levelable by keeping P g(e) to witness that the unsafe approximation P e of G is not optimal. Let be an enumeration of all functions in F 2 such that f i (x) can be computed uniformly in time 2 log k (jxj+i) for some k 2 N . The set G is constructed in stages. To ensure that G is general A-generic, it suffices to meet for all e 2 N the following requirements: To ensure that G is \Delta-levelable, it suffices to meet for all e; k 2 N the following requirements, as shown at the end of the proof: The strategy for meeting a requirement G e is as follows: at stage s, if G e has not been satisfied yet and f e (G j'z s ) is defined, then let G extend (G j'z s )f e (G j'z s ). But this action may injure the satisfaction of some requirements L hi;ki and Gm . The conflict is solved by delaying the action until it will not injure the satisfaction of the requirements L hi;ki and Gm which have higher priority than G e . The strategy for meeting a requirement L he;ki is as follows: at stage s, if L he;ki has not been satisfied yet and P e (z s a requirement G e becomes satisfied at some stage, it is satisfied forever, so L he;ki can only be injured finitely often and then it will have a chance to become satisfied forever. Stage s. In this stage, we define the value of G(z s ). A requirement Gn requires attention if 1. 2. Gn has not been satisfied yet. 3. there exists t - s such that A. fn (G j'z t ) is defined. B. G j'z s is consistent with (G j'z t )f n (G j'z t ). C. For all e; k 2 N such that he; ki ! n, there is at most one he; mi 2 N such that 0 ffi(he;mi) 2 dom((G j'z t )f n (G j'z t )). D. For all (1) Fix the minimal m such that Gm requires attention, and fix the minimal t in the above item 3 corresponding to the requirement Gm . If there is no such m, then let Otherwise we say that Gm receives attention. Moreover, let for some e; n; This completes the construction. We show that all requirements are met by proving a sequence of claims. Claim 1. Every requirement Gn requires attention at most finitely often. Proof. The proof is by induction. Fix n and assume that the claim is correct for all numbers less than n. Then there is a stage s 0 such that no requirement Gm with attention after stage s 0 . So Gn receives attention at any stage s ? s 0 GENERICITY, RANDOMNESS, AND APPROXIMATIONS 403 at which it requires attention. Hence it is immediate from the construction that Gn requires attention at most finitely often. 2. Given n 0 2 N , if no requirement Gn (n attention after stage s 0 and Gn0 requires attention at stage s 0 , then for all he; ki Proof. The proof is straightforward from the construction. 3. Every requirement Gn is met. Proof. For a contradiction, fix the minimal n such that Gn is not met. Then fn is dense along G. We have to show that Gn requires attention infinitely often which is contrary to Claim 1. Since kP e \DeltaP by the construction and Claim 2, there will be a stage s 0 such that at all stages s ? s 0 , (1) holds for all such that he; ki ! n. Hence Gn requires attention at each stage s ? s 0 at which fn (G j'z s ) is defined. 4. Every requirement L he;ki is met. Proof. This follows from Claims 2 and 3. Now we show that G is both A-generic and \Delta-levelable. G is A-generic since all requirements Gn are met. For he; ki 2 N , let n he;ki be the least number s 0 such that and let f(n) be the biggest k such that Then lim That is to say, G is \Delta-levelable with density f . Theorem 4.10. there exists a set G in E 2 which is general A-generic but not \Delta-levelable. Proof. As in the previous proof, a set G is constructed in stages. To ensure that G is general A-generic, it suffices to meet for all e 2 N the following requirements: Fix a set B 2 P. Then the requirements will ensure that B witnesses the failure of \Delta-levelability of G. To meet the requirements G e , we use the strategy in Theorem 4.9. The strategy for meeting a requirement NL he;ki is as follows: at stage s such that P e (z s ) and this action can be repeated over and over again. Hence kG\DeltaP e k is growing more quickly than kG\DeltaBk, and eventually the requirement NL he;ki is met at some sufficiently large stage. Define a priority ordering of the requirements by letting R NL he;ki . We now describe the construction of G formally. Stage s. In this stage, we define the value of G(z s ). A requirement NL he;ki requires attention if he; ki ! s and 1. 2. A requirement Gn requires attention if 1. 2. Gn has not been satisfied yet. 3. there exists t - s such that A. fn (G j'z t ) is defined. B. G j'z s is consistent with (G j'z t )f n (G j'z t ). C. there is no e; k 2 N such that (1). (2). (3). there exists y 2 dom((G j'z t )f n (G j'z t Fix the minimal m such that Rm requires attention. If there is no such m, let we say that Rm receives attention. Moreover, if NL he;ki then let G(z s fix the least t in the above item 3 corresponding to the requirement Gm . Let G(z s This completes the construction of G. It suffices to show that all requirements are met. Note that, by definition of requiring attention, Rm is met if and only if Rm requires attention at most finitely often. So, for a contradiction, fix the minimal m such that Rm requires attention infinitely often. By minimality of m, fix a stage s 0 such that no requirement Rm 0 with attention after stage s 0 . Then Rm receives attention at any stage at which Rm requires attention. Now, we first assume that at some stage s ? s 0 , Gn receives attention and becomes satisfied forever. Finally assume that Rm = NL he;ki . Then B \DeltaP e is infinite and, at all stages s ? s 0 such that receives attention; hence G(z s Since, for all other stages s with s ? s 0 , B(z s rapidly than G\DeltaB; hence and NL he;ki is met contrary to assumption. Corollary 4.11. The class of \Delta-levelable sets is neither meager nor comeager in the sense of resource-bounded (general) Ambos-Spies, Lutz, and Fenner categories. Proof. The proof follows from Theorems 3.7, 4.9, and 4.10. 5. Resource-bounded randomness versus polynomial-time approxima- tions. We first introduce a fragment of Lutz's effective measure theory which will be sufficient for our investigation. Definition 5.1. A martingale is a function F : \Sigma A martingale F succeeds on a sequence - 2 \Sigma 1 if lim sup n F (-[0::n \Gamma denotes the set of sequences on which the martingale F succeeds. Definition 5.2 (see Lutz [10]). A set C of infinite sequences has p-measure 0 there is a polynomial-time computable martingale which GENERICITY, RANDOMNESS, AND APPROXIMATIONS 405 succeeds on every sequence in C. The set C has p-measure 1 (- p for the complement - 2 Cg of C. Definition 5.3 (see Lutz [10]). A sequence - is n k -random if, for every n k -time computable martingale F , lim sup n F that is to say, F does not succeed on -. A sequence - is p-random if - is n k -random for all k 2 N . The following theorem is straightforward from the definition. Theorem 5.4. A set C of infinite sequences has p-measure 0 if and only if there exists a number k 2 N such that there is no n k -random sequences in C. Proof. See, e.g., [16]. The relation between p-measure and the class of P-levelable sets is characterized by the following theorem. Theorem 5.5 (see Mayordomo [11]). The class of P-bi-immune sets has p- measure 1. Corollary 5.6. The class of P-levelable sets has p-measure 0. Corollary 5.7. The class of sets which possesses optimal polynomial-time safe approximations has p-measure 1. Corollary 5.8. For each p-random set A, A has an optimal polynomial-time safe approximation. Now we turn our attention to the relations between the p-randomness concept and the concept of polynomial-time unsafe approximations. In our following proof, we will use the law of the iterated logarithm for p-random sequences. Definition 5.9. A sequence - 2 \Sigma 1 satisfies the law of the iterated logarithm if lim sup and lim inf Theorem 5.10 (see Wang [17]). there exists a number k 2 N such that every sequence satisfies the law of the iterated logarithm. For the sake of convenience, we will identify a set with its characteristic sequence. The symmetric difference of two sets can be characterized by the parity function on sequences. Definition 5.11. 1. The parity function \Phi : \Sigma \Theta \Sigma ! \Sigma on bits is defined by 2. The parity function on sequences is defined by 3. The parity function \Phi : \Sigma \Theta ff : f is a partial function from \Sigma to \Sigmag ! \Sigma on strings and functions is defined by x \Phi defined and b 4. The parity function \Phi : \Sigma 1 \Theta ff : f is a partial function from \Sigma to \Sigmag ! sequences and functions is defined by - \Phi defined and b 406 YONGGE WANG The intuitive meaning of - \Phi f is as follows: Given a sequence - and a number such that f(-[0::n \Gamma 1]) is defined, we use f to predict the value of -[n] from the first n bits -[0::n \Gamma 1]. If the prediction is successful, then output 0, else output 1. And - \Phi f is the output sequence. We first explain a useful technique which is similar to the invariance property of p-random sequences. Lemma 5.12. Let - 2 \Sigma 1 be n k -random and f : \Sigma ! \Sigma be a partial function computable in time n k such that - \Phi f is an infinite sequence. Then - \Phi f is n random. Proof. For a contradiction assume that - \Phi f is not n k\Gamma1 -random and let F : \Sigma ! be an n k\Gamma1 -martingale that succeeds on - \Phi f . Define by letting f) for all x 2 \Sigma . It is a routine to check that F 0 is an n k -martingale. Moreover, since F succeeds on - \Phi f , F 0 succeeds on -, which is a contradiction with the hypothesis that - is n k -random. Lemma 5.13. Let k be the number in Theorem 5.10, and let A; B; C ' \Sigma be three sets such that the following conditions hold. 1. 2. kB \DeltaC 3. there exists c 2 N such that, for almost all n, (2) Then A is not n k+1 -random. Proof. Let ff; fi, and fl be the characteristic sequences of A; B, and C, respectively. By Lemma 5.12, it suffices to define an n 2 -time computable partial function f : \Sigma ! \Sigma such that ff \Phi f is an infinite sequence which is not n k -random. Define the function f by ae fi[jxj] if fi[jxj] 6= fl[jxj]; undefined if Then f is n 2 -time computable and, since kB \DeltaC is an infinite sequence. In order to show that ff \Phi f is not n k -random, we show that ff \Phi f does not satisfy the law of the iterated logarithm. We first show that, for all n , the following equation holds: where l Let GENERICITY, RANDOMNESS, AND APPROXIMATIONS 407 Then l Obviously, this implies (3). The condition (2) is equivalent to (ff \Phi fi)[i] - \Gammac: So, by (3), for almost all n, where l j. By (4), lim inf 0: Hence, by Theorem 5.10, ff \Phi f is not n k -random. This completes the proof. Now we are ready to prove our main theorems of this section. Theorem 5.14. The class of \Delta-levelable sets has p-measure 0. Proof. Let A be a \Delta-levelable set. Then there is a function f(n) - 0 satisfying lim polynomial-time computable sets B; C such that for all n, By Lemma 5.13, A is not n k+1 -random, where k is the number in Theorem 5.10. So the theorem follows from Theorem 5.4. Theorem 5.15. The class of sets which have optimal polynomial-time unsafe approximations has p-measure 0. Proof. If A has an optimal polynomial-time unsafe approximation, then there is a polynomial-time computable set B and a number c 2 N such that, for all n, i.e., By Lemma 5.13, A is not n k+1 -random, where k is the number in Theorem 5.10. So the theorem follows from Theorem 5.4. Corollary 5.16. The class of sets which are weakly \Delta-levelable but not \Delta- levelable has p-measure 1. Corollary 5.17. Every p-random set is weakly \Delta-levelable but not \Delta-levelable. Acknowledgments . I would like to thank Professor Ambos-Spies for many comments on an early version of this paper, and I would like to thank two anonymous referees for their valuable comments on this paper. --R On optimal polynomial time approximations: P-levelability vs Diagonalizations over polynomial time computable sets Genericity and measure for exponential time On the structure of complete sets Notions of resource-bounded category and genericity Category and measure in complexity classes Almost everywhere high nonuniform complexity Almost every set in exponential time is P-bi-immune Contributions to the Study of Resource-Bounded Measure With what frequency are apparently intractable problems difficult? Optimal approximation of complete sets Randomness and Complexity. The law of the iterated logarithm for p-random sequences On certain polynomial-time truth-table reducibilities of complete sets to sparse sets --TR
resource bounded genericity;resource bounded randomness;approximation;computational complexity
299878
Reconstructing Algebraic Functions from Mixed Data.
We consider a variant of the traditional task of explicitly reconstructing algebraic functions from black box representations. In the traditional setting for such problems, one is given access to an unknown function f that is represented by a black box, or an oracle, which can be queried for the value of f at any input. Given a guarantee that this unknown function f is some nice algebraic function, say a polynomial in its input of degree bound d, the goal of the reconstruction problem is to explicitly determine the coefficients of the unknown polynomial. All work on polynomial interpolation, especially sparse ones, are or may be presented in such a setting. The work of Kaltofen and Trager [Computing with polynomials given by black boxes for their evaluations: Greatest common divisors, factorization, separation of numerators and denominators, in Proc. 29th Ann. IEEE Symp. on Foundations of Computer Science, 1988, pp. 296--305], for instance, highlights the utility of this setting, by performing numerous manipulations on polynomials presented as black boxes.The variant considered in this paper differs from the traditional setting in that our black boxes represent several algebraic functions f1,...,fk, where at each input x, the box arbitrarily chooses a subset of f1(x),...,fk(x) to output and we do not know which subset it outputs. We show how to reconstruct the functions f1,...,fk from the black box, provided the black box outputs according to these functions "often." This allows us to group the sample points into sets, such that for each set, all outputs to points in the set are from the same algebraic function. Our methods are robust in the presence of a small fraction of arbitrary errors in the black box.Our model and techniques can be applied in the areas of computer vision, machine learning, curve fitting and polynomial approximation, self-correcting programs, and bivariate polynomial factorization.
Introduction . Suppose you are given a large set of points in the plane and are told that an overwhelming majority of these points lie on one of k different algebraic curves of some specified degree bound D (but you are not told anything else about the curves). Given the parameters k and D, your task is to determine or "reconstruct" these algebraic curves, or alternatively, to group the points into sets, each of which is on the same degree D curve. Related versions of this problem may also be of interest, such as extensions to higher dimensions, and a setting where instead of the points being given in advance, one is allowed to make queries of the form "what is the value of one of the curves at point x?" (the answer to such a query will not specify which of the k curves was used to compute the value). Solutions to this fundamental problem have applications to: Princeton University, Supported by Dept. of Navy Grant #N00014-85-C-0456, by NSF PYI grant CCR-9057486 and a grant from MITL. y Princeton University. Part of this research was done while at Matsushita Information Technology Labs. z Cornell University. Part of this research was done while at Hebrew University and Princeton University. This research is supported by DIMACS, NSF-STC88-09648, ONR Young Investigator Award N00014-93-1-0590 and grant No. 92-00226 from the United States - Israel Binational Science Foundation (BSF). x MIT Laboratory for Computer Science, Cambridge, MA 02139. Email: madhu@lcs.mit.edu. Part of this work was done when this author was at U.C. Berkeley and IBM's Thomas J. Watson Research Center, supported in part by NSF Grant No. CCR 88-96202. ffl the grouping problem in computer vision ffl computational learning theory ffl curve fitting over discrete domains ffl simple algorithms for polynomial factorization self-correcting programs. Computer Vision. Consider a computer vision system for a robot that picks parts out of a bin. The input to the system contains an intensity map of the scene. The robot can distinguish between the parts by extracting edges from the image. Current edge detection algorithms use discretised differential operators to extract edges (e.g. [30][10]). These algorithms produce output consisting of a bit map, where for every image point (x; y), the bit value of the point, e(x; y), is set to 1 if and only if this point lies on an edge. For many vision applications it is then desired to connect between neighboring points to achieve a more compact representation of the edge map. This problem, known as "the grouping problem", is complicated by the fact that the parts are cluttered, they may be nonconvex and they may contain holes. No polynomial time algorithm has been found for this problem. Under the assumption that the edges of the parts are given by piecewise algebraic curves, and that the edge detection process produces results which are free of precision error, our algorithm transforms edge maps into piecewise polynomial curves in polynomial time. The second assumption is unrealistic in real computer vision appli- cations. However, we feel that it suggests an interesting approach which should be studied further. Computational Learning Theory. Our mechanism can be used to extend some well-known results on learning boolean functions to the setting of learning real-valued functions. Here is a specific instance of such a situation: In the study of economics, the price-demand curve is often considered to be well-described by an algebraic function (e.g. However, it is also the case that this curve may change [23]. In particular, there may be several unknown price-demand curves which apply in various situations - one may correspond to the behavior found when the country is at war, a second may apply after a stock market crash, and a third behavior may be found after a change in the tax structure. Some of the factors that determine which curve applies may be obvious, but others may occur because of more subtle reasons. The task of learning the price-demand relationship may be decomposed into the two subtasks of first determining the unknown curves, and then learning what determines the move from one curve to another. Our algorithm gives a solution for the first task. We consider the Valiant model of PAC learning [36], in which a concept is learnable if there is an efficient algorithm that is able to find a good approximation to the concept on the basis of sample data. In general, our results imply that any function on input x and boolean attributes (y select f i from a set of polynomial functions f and then computes and outputs f i (x) can be learned, as long as the selector function can be learned. For example, a polynomial-valued decision list given by a list of terms (conjuncts of literals), (D a list of univariate polynomials, in a real variable x, represents a real valued function f as follows: where i is the least index such that D i (y If the terms are restricted to being conjunctions of at most c literals, we call it a polynomial-valued c-decision list. This is an extension of the boolean decision list model defined by Rivest in [32], where the polynomials f i are restricted to being the constants 0 or 1. In [32], Rivest shows that the class of boolean c-decision lists is learnable in polynomial time. Using our techniques, in combination with Rivest's algorithm, we can extend this result to show that the class of polynomial-valued c-decision lists can be learned in polynomial time. The only technical point that needs to be made is as follows: Rivest gives an algorithm for producing a decision list that is consistent with the random examples and then argues using an Occam argument (see Blumer et. al. [8]) that any hypothesis that is consistent with the labels of the random examples is a good hypothesis (i.e. computes a function that is usually equal to the target function). Our techniques in combination with Rivest's algorithm yield a consistent hypothesis, but since our hypothesis is not a boolean function, we must use the work of Haussler [22] to see that a consistent hypothesis is a good hypothesis. Independent of our work, Blum and Chalasani [6] also consider a model of learning from examples where the examples may be classified according to one of several different concepts. In their model an adversary controls the decision of which concept would be used to classify the next example. Under this model they study the task of learning boolean-valued concepts such as k-term DNF's and probabilistic decision lists. Curve Fitting Problems over Discrete Domains. A typical curve fitting problem takes the following form: Given a set of points on the plane, give a simple curve that "fits" the given points. Depending on the exact specification of the "fit" the problem takes on different flavors: for instance, if the curve is to pass close to all the points, then this becomes a uniform approximation problem (see text by Rivlin [33]), while if the curve is supposed to pass through most of the points, then it resembles problems from coding theory. Here, we consider a problem that unifies the above two instances over discrete domains. For example, given a set of m points, with integer coordinates, we show in Subsection 4.1 how to find a polynomial with integer coefficients that is \Delta-close to all but an ffl fraction of the points (if such a polynomial exists), where ffl need only be less than 1=2 (provided is m is larger than (4\Delta+1)d Reducing Bivariate Factoring to Univariate Factoring. In [4] Berlekamp gave a randomized polynomial time algorithm for factoring univariate polynomials over finite fields. Kaltofen [24] and Grigoriev and Chistov [18] show that the problem of bivariate factoring can also be solved in polynomial time by a reduction to univariate factoring, using somewhat deep methods from algebra. Our techniques in Subsection 4.2 give a simple method to reduce the problem of factoring bivariate polynomials to that of factoring univariate polynomials over finite fields in the special case when the bivariate polynomial splits into factors which are monic and of constant degree in one of the variables. Though the results are not new, nor as strong as existing results, the methods are much simpler than those used to obtain the previously known results. Self-Correcting Programs . One motivation for this work comes from the area of self-correcting programs introduced independently in [7][28]. For many functions, one can take programs that are known to be correct on most inputs and apply a simple transformation to produce a program that is correct with high probability on each input. But, how bad can a program be, and still allow for such a transformation? There is previous work addressing this question when the functions in question are polynomials (see for example [28],[13],[14]). When the program is not known to be correct on most inputs, the definition of self-correction needs to be modified, since the program can toggle between two seemingly correct functions. Our methods give self- correctors that work when the error of the program is such that it answers according to one of a small number of other algebraic functions. An algebraic decision tree may contain a small number of branches, in which all subtrees are intended to compute the same function but are computed separately for purposes of efficiency. The algebraic decision tree program might err in some of the subtrees and compute the wrong algebraic function. Our self-correctors output a small number of candidates for the correct function. One particular situation where this is useful is in the computation of the permanent of a matrix, over a finite field. Results of Cai and Hemachandra ([9]), when used in combination with our results, imply that if there is an efficient program which computes the permanent correctly on a non-negligible fraction of the input and computes one of a small number of other algebraic functions on the rest of the inputs, then the permanent can be computed efficiently everywhere. 1.1. The k-Algebraic Black Box Model. We consider the following black-box reconstruction problem, which is general enough to model all of the aforementioned problems. We think of the black-box as "containing" k functions, f f i is an "algebraically well-behaved" function. For instance, each f i could be a polynomial of degree at most d, and on every input x the black box outputs f i (x) for some (Here and throughout this paper, the notation [k] stands for the set of integers Relating to the problem discussed in the first paragraph of the introduction, this corresponds to the case where for every value of an x-coordinate there is at least one point that has that value. We now present this definition formally, starting with the standard black box model Definition 1.1. A black box B is an oracle representing a function from a finite domain D to a range R. There are two kinds of domains that will be of interest to us. One is a finite subset H of a (potentially infinite) field F . The second is an n-dimensional vector space over a finite field F . In both cases the range will be the field F . Previous research on black box reconstruction focused on the following: Assuming that B is one of a special class of functions (for example, that B is a degree d polynomial), determine an explicit representation of B. In our model, there may be more than one output that is valid for each input. More specifically: Definition 1.2. A black box B mapping a finite subset H of a field F to F is a (k; d)-polynomial black box if there exist polynomials f of degree at most d such that for every input x 2 H, there exists kg, such that In such a case, we say that the functions f describe the black box B. Our first black box reconstruction problem is: Given a (k; d)-polynomial black box B, find a set of functions f that describe B. The definition of a (k; d)-polynomial black box can be generalized to situations involving noise as follows: Definition 1.3. For ffl 2 [0; 1] and for a finite subset H of a field F , a black is an ffl-noisy (k; d)-polynomial black box if there exist polynomials f of degree at most d and a set S ae H, with jSj - (1 \Gamma ffl)jHj, such that for every input x 2 S, there exists kg such that In such a case, the functions f are said to describe B. The notion of the reconstruction problem generalizes to the noisy case in the obvious way. We now attempt to generalize the problem to allow the black box to compute other algebraic functions, such as x etc. This part is somewhat more technical, so we introduce some new terminology: Definition 1.4. For positive integers d x ; d y and indeterminates x; y, the f(d x ; x); (d y ; y)g- weighted degree of a monomial x i y j is id x +jd y . The f(d x ; x); (d y ; y)g-weighted degree of a polynomial Q(x; y) is the maximum over all monomials in Q (i.e., the monomials with non-zero coefficients in Q) of their f(d x ; x); (d y ; y)g-weighted degree. We now introduce the notion of an algebraic box and show how it relates to the earlier notion of a polynomial black box. Definition 1.5. For a finite subset H of a field F , A black a (k; d)-algebraic black box if there exists a polynomial Q(x; y) of f(1; x); (d; y)g- weighted degree at most kd, such that for every input x 2 H, the output y of the black box satisfies Q(x; In such a case, we say that the polynomial Q describes B. For example, if x, the polynomial Q(x; satisfies the requirement of the definition and describes B. The f(1; x); (d; y)g-weighted degree of Q is 2d. Proposition 1.6. If B is a (k; d)-polynomial black box then B is also a (k; d)- algebraic black box. Proof. Let B be a (k; d)-polynomial black box and let f it. Then the polynomial has f(1; x); (d; y)g-weighted degree at most kd. The (k; d)-algebraic black box reconstruction problem is: Given a (k; d)-algebraic box B, find the polynomialQ of f(1; x); (d; y)g- weighted degree at most kd which describes it. The definition and proposition can be extended easily to the ffl-noisy case. All the above definitions generalize to a case where the input is an n-dimensional vector over F and the black box is computing n-variate functions. In particular, we Definition 1.7. For a finite field F , a n-variate black F is a (k; d)- polynomial black box if there exist polynomials f of total degree at most d such that for every input that Definition 1.8. For a finite field F , An n-variate black F is a (k; d)- algebraic black box if there exists a polynomial Q(x weighted degree at most kd such that for every input , the output y of the black box satisfies Q(x Again the reconstruction problems are defined correspondingly. In this paper we attempt to solve all such reconstruction problems. Notice that this problem is not well-defined if there exist multiple solutions, say Q and ~ Q, such that both Q and ~ describe the black box. Much of the work is done in establishing conditions under which any ~ Q that describes the black box gives a meaningful answer. 1.2. Previous Work and Our Results. The setting where the black box represents a single polynomial or rational function, without noise, is the classic interpolation problem and is well studied. Efficient algorithms for sparse multivariate polynomial interpolation are given by Zippel [40, 41], Grigoriev, Karpinski and Singer [21] and Borodin and Tiwari [3], and for sparse rational functions by Grigoriev, Karpinski and Singer [20]. The case where the black box represents a single function with some noise has also been studied previously. Welch and Berlekamp [39, 5] (see also [14]) show how to reconstruct a univariate polynomial from a ( 1 and Coppersmith [11], Gemmell, Lipton, Rubinfeld, Sudan and Wigderson [13] and Gemmell and Sudan [14] show how to do the same for multivariate polynomials. All the above mentioned results require, however, that the field size be at least polynomially large in d . The conditions are required to ensure that there is a unique degree d polynomial describing the black box on 1=2+ ffi fraction of the inputs. Reconstructing functions from a black box representing more than one function, or when the function it represents is not guaranteed to be unique, seems to be a relatively unexplored subject. The works of Goldreich and Levin [15] and Kushilevitz and Mansour [26] are the only exceptions we know of. Both papers study the reconstruction of n-variate linear functions (i.e., homogenous polynomials of degree 1) from a box over GF(2). In this case, there can be up to O( 1 representing the black box and they reconstruct all such polynomials. The main result in this paper is an algorithm for reconstructing algebraic functions describing noisy algebraic black boxes, which works when the black box satisfies certain conditions. To see why the result needs to have some conditions on the black box, consider the following example: Suppose the black box is described by the polynomial suppose for every x the black box always outputs a y from the unit circle (and never according to the line x clearly the reconstruction algorithm has no information to reconstruct the line x 1. The condition imposed on the black box essentially addresses this issue. We describe the result for univariate ffl-noisy (k; d)-polynomial black boxes. We present a randomized algorithm which takes as input a parameter p ? ffl and with high probability outputs a list of all polynomials f i which describe the black box on more than p fraction of the condition amounts to saying that the black box must output according to f i sufficiently often.) The running time of the algorithm is a polynomial in k; d and 1 (p\Gammaffl) . This result is presented along with generalizations to univariate noisy algebraic black boxes in Section 2. To reconstruct a univariate polynomial, we sample the black box on a small set of inputs and construct a bivariate polynomial ~ Q(x; y) which is zero at all the sample points. Then we use bivariate polynomial factorization to find a factor of the form our candidate for output. We show that if the number of points (x; y) such that y = f(x) is large in the sample we chose, then has to be a factor of any ~ Q which all the sample points satisfy. Our results do not generalize immediately to multivariate polynomials. Among other factors, one problem is that an n-variate polynomial of degree d has d which is exponential in n (or d). This seems to make the problem inherently hard to solve in time polynomial in n and d. However we bypass this, once again using the idea of black boxes. Instead of trying to reconstruct the multivariate polynomial explicitly (i.e., by determining all its coefficients), we allow the reconstruction algorithm to reconstruct the polynomial implicitly, i.e., by constructing a black box which computes the multivariate polynomial. If the polynomial turns out to be sparse then we can now use any sparse interpolation algorithm from [3, 20, 21, 40] to reconstruct an explicit representation of the polynomials in time polynomial in n, d and the number of non-zero coefficients. On the other hand, by using the techniques of [25] we can also continue to manipulate the black boxes as they are for whatever purposes 1 . We now describe our result for reconstructing multivariate polynomials. We present a randomized algorithm which takes as input a parameter p and with high probability reconstructs probabilistic black boxes for all the polynomials f describing a noisy (k; d)-black box over a finite field F , provided the noisy (k; d)-black black box satisfies the following conditions: (1) Every polynomial is represented on at least a p-fraction of the inputs (i.e. for every i, Pr - p). (2) The finite field F over which the black box works is sufficiently large (jF j should be polynomially large in k; d; 1 ). The running time of the algorithm is polynomial in k; d and 1 The main technique employed here is a randomized reduction from the multivariate to the univariate case. We note that the solution obtained here for the multivariate case differs in several aspects from the solution for the univariate case. First, this algorithm does not extend to the case of finite subsets of infinite fields. Second, it needs to make sure that all the polynomials are well-respresented in the black box. The latter aspect is a significant weakness and getting around this is an open question. Subsequent work. One of the main questions left open by this paper is the problem of reconstructing all degree d polynomials that agree with an arbitrary black box on ffl fraction of the inputs. Some recent work has addressed this question. Goldreich, Rubinfeld and Sudan [16] give an algorithm to (explicitly) reconstruct all n-variate degree d polynomials agreeing with a black box over F on ffl fraction of the inputs, runs in time O((n; 1 which is exponential in d. Their algorithm generalizes the earlier mentioned solution of Goldreich and Levin [15]. For the case of univariate polynomials, Sudan [35], has given a polynomial time algorithm which can find all degree d polynomials agreeing with a black box on ffl fraction of the domain, provided j. The main contribution in [35] is a simple observation which shows that m input/output pairs from any black box can be thought of as the output of a (1; O( m))-algebraic black box. Using this observation, Lemma 2.10 of this paper is applied to reconstruct all polynomials of low 1 The idea of manipulating multivariate polynomials and rational functions represented by black boxes was proposed by Kaltofen and Trager in [25]. They show that it is possible to factor and compute g.c.d.'s for polynomials given by such a representation and to separate the numerator from the denominator of rational functions given by such a representation. degree which describe the black box on ffl-fraction of the inputs. Finding a similar solution for the multivariate cases remains open (some cases are addressed by [35], but the problem is not completely resolved). A second question that is left open is the task of solving the (k; d)-polynomial black box problem over the reals, where the points are not provided to infinite precision. This is the true problem underlying the application to computer vision. While the ideas in this paper do not immediately apply to this question, some variants (in particular, the variant employed in [35]) seem promising and deserve to be investigated further. In other related work, Rubinfeld and Zippel [34] have employed the black box reconstruction problem and build on the techniques presented in this paper to present a modular approach to the polynomial factorization problem. While the application presented in this paper (in Section 4.2) is to a restricted subclass of the bivariate factorization problem, the work of [34] finds an application to the general multivariate factorization problem. 1.3. Organization . The rest of this paper is organized as follows. In Section 2, we describe our results for univariate polynomials, rational functions and other algebraic functions. In Section 3, we consider extensions of the reconstruction problem to the case of multivariate polynomials. Finally, in Section 4, we describe several applications of our work. 2. Univariate Black Boxes. In this section we consider the univariate reconstruction problem for (noisy) (k; d)-polynomial and algebraic black boxes. We describe our general format of our results with the example of a (k; d)-polynomial black box described by f We present a solution in the form of an algorithm which takes of the black box and attempts to reconstruct the polynomials f k from this set of input/output pairs. In order to reconstruct a small set of polynomials which includes a specific polynomial the algorithm (obviously) needs to find sufficiently many points are needed). We present complementary bounds, showing that if the number of points on f i is sufficiently large, then the output is guaranteed to include f i . We then show how some simple sampling of the black box (either by exhaustively sampling all points from the domain H or by picking a random sample of x j 's chosen independently and uniformly at random from H) yields a collection of input/output pairs which satisfies the required condition, provided H is large enough and the fraction of inputs on which B's output is described by f i is large enough. 2.1. An Intermediate Model. As a first step towards solving the algebraic reconstruction problem, we consider the case where the black box outputs all of on any input x. We refer to this as a (k; d)-total polynomial black box. These are output in arbitrary order, which is not necessarily the same for each x. We further assume that there are no errors in the output. Thus the reconstruction problem we wish to solve may be stated formally as: Given: Positive integers k and d, a field F and a black box with the property that there exist polynomials f of degree at most d over F , such that for every x 2 F , the multisets fB 1 are identical. We reduce the problem of extracting the polynomials to that of bivariate polynomial factorization. The main idea underlying this reduction is the following: On input x if the (k; d)-total polynomial black box outputs fy we know that 8j 2 Therefore, each input/output pair (x; y the black box satisfies the relation: Y Our aim will be to construct a related polynomial which will enable us to recover the Consider the functions oe defined as Y (these are the primitive symmetric functions of Observe that oe j (x) can be evaluated at any input x using the given (k; d)-total polynomial black box, using the identity Y Furthermore this computation can be performed in time in O(k log k log log using a fast Fourier transform (see survey article by von zur Gathen [12], pages 320-321). Observe further that oe j is a polynomial of degree at most jd. Hence evaluating it at points suffices to find all the coefficients of this polynomial (if the black box outputs every f i (x) for every x). Now consider the following bivariate polynomial, in x and a new indeterminate y: From the explicit representation of the oe i 's, we can also compute an explicit representation of Q. But now notice that Q can equivalently be written as: Y (The equivalence follows from the definition of the oe j 's.) Therefore, to recover the we have to do is find the factors of the bivariate polynomial Q. Bivariate factorization can be done efficiently over the rationals [18, 24, 29] and can be done efficiently (probabilistically) over finite fields [17, 24]. We now summarize our algorithm. The input to the algorithm is kd elements from the the field F , and a set fy for every representing the output of the black box B on input x j . 1. Evaluate oe j 2. Interpolate for the coefficients of oe j (x) and let oe j;l be the coefficient of x l in oe j . 3. Let Q(x; y) be the polynomial 4. Factor Q into its irreducible factors. This will yield Q(x; 5. Output the polynomials The arguments leading to this algorithm prove its correctness and we have the following lemma. Lemma 2.1. Let f(x j=1 be the input/output pairs of a (k; d) total polynomial black box B over a field F on kd inputs. Then there exists an randomized algorithm whose running time is polynomial in k; d which explicitly reconstructs the set of polynomials ff which describe B. Since the only condition on the x j 's is that they be distinct, it is easy to get a total polynomial reconstruction algorithm from the above lemma and thus we get the following theorem. Theorem 2.2. Let f be degree d polynomials over Q (the rationals) or a finite field F of cardinality at least kd + 1. Given a black box B which on input x outputs the multiset ff 1 arbitrary order), there exists an algorithm which queries the black box on kd distinct inputs and reconstructs the polynomials that describe the black box. The algorithm is deterministic when the polynomials are over Q and probabilistic when the polynomials are over some finite field. 2.2. (k; d)-polynomial black boxes. We now build on the methods of the previous section to reconstruct information from a (k; d)-polynomial black box which outputs the value of one of k univariate polynomials f on every input. Our method extends immediately to two more general cases: 1. (k; d)-algebraic black boxes. 2. Noisy (polynomial and algebraic) black boxes. The generalizations are dealt with in the next section. The problem we wish to solve is formally stated as: Given: Positive integers k and d, a field F , a finite set H ' F and a black box with the property that there exist polynomials f of degree at most d over F , such that for every x (x)g. Our solution for this problem is based on the solution of the previous subsection. The critical observation is that the polynomial Q produced by the algorithm of the previous section always satisfied the property Q(x; input x to the black box and where y is any element of the output set of the black box on input x. We will try to construct a polynomial Q in two variables as in the previous section, satisfying the property that if y = B(x) is the output of the black box on input x, then Q(x; However, we will not be able to construct the polynomials oe i (x) as in the previous case. Hence, we will abandon that part of the algorithm and directly try to find any polynomial ~ Q such that ~ on all the sampled points. We will then use the factors of this polynomial to determine the f i 's as in the previous section. Thus our algorithm is summarized as follows: The input to the algorithm is m distinct pairs of elements 1. Interpolate to find a set of coefficients ~ q lj of the polynomial ~ dl ~ that satisfies ~ 2. Factor the polynomial ~ Q and if it has any factors of the form (y \Gamma g(x)), output g as a candidate polynomial. Notes: The important step above is Step 1 which involves finding a non-trivial solution to a homogenous linear system. First we need to make sure this system has at least one solution. This is easy since Q(x; is such a solution. However the solution in such a step need not necessarily be unique and we will simply find any solution to this system and show that it suffices, under certain conditions, for Step 2. In what follows, we shall examine the conditions under which the output will include a certain polynomial f i . Lemma 2.3. For a set f(x distinct pairs from F \Theta F , if ~ Q is a bivariate polynomial of f(1; x); (d; y)g-weighted degree kd satisfying and f is a univariate polynomial of degree d satisfying then the polynomial (y \Gamma f(x)) divides the polynomial ~ Proof. g. Notice that for distinct the pairs are not distinct. Consider the univariate polynomial ~ Q(x; f(x)). For all indices j 2 S we have that ~ is a polynomial of degree at most kd in x. Hence if ~ is zero at jSj ? kd places, then it must be identically zero, implying that The lemma above guarantees that under certain circumstances, the factors of ~ do give useful information about the f i 's. The effect is summarized in the following lemma. Lemma 2.4. Let f(x distinct pairs of elements which are the input/output pairs of a (k; d)-polynomial black box B described by polynomials . If there exists an i 2 [k] such that jfjjy then a set of at most k polynomials fg that includes f i can be found in time polynomial in m, k and d. Remark: Notice that Lemma 2.4 is a strict strengthening of Lemma 2.1. To finish the analysis of the algorithm we need to determine how to sample the black so as to get enough points according to f i . Let p i be the confidence parameter. Let ). The strategy for picking the points f(x 1 depends on jHj. If jHj - 2 pick m elements independently and uniformly at random from H. Lemma A.1 in the appendix (shown using a simple combination of Chernoff bounds and the "birthday problem analysis") shows that the sampled points are all distinct and satisfy with probability at least 1 \Gamma ffi . Thus in this case we will use f(x as the input to the algorithm described above. If on the other hand jHj is not large enough, then we will simply sample every point in H (i.e., the input set will be f(x; B(x))jx 2 Hg) implying in particular that and in this case the algorithm described above will include f i as part of its output provided Notice that in both cases the running time of the algorithm is polynomial in M , which is in turn bounded by some polynomial in k; d; 1 . Furthermore, by choosing and a threshold parameter p and running the algorithm above with confidence parameter ffi 0 , we find that the algorithm above recovers, with confidence p. The running time is still a polynomial in k; d; 1 . This yields the following theorem. Theorem 2.5. Let B be a (k; d)-polynomial black box, mapping a finite domain H to a field F , described by polynomials f . For There exists an algorithm which takes as input a confidence parameter and a threshold p ? 0, runs in time poly(k; d; 1 makes calls to the black box B and with probability at least reconstructs a list of at most k polynomials which includes all polynomials f i such that 2.3. (k; d)-algebraic black boxes. The algorithm of Section 2.2 extends immediately to the case of algebraic black boxes. Here, by definition, the input/output pair of the black box, (x; y), satisfies an algebraic relation of the form Q(x; We can attempt to find a polynomial ~ all the sampled points by interpolation (Step 3 in the algorithm of Section 2.2). As in the previous section, it will not be possible to guarantee that the output we produce will be exactly Q. For instance, if Q(x; all the points actually come from the unit circle, then the algorithm has no information to point to the line x+y Thus, as in the previous section, we will only attempt to find those parts of the curve that describe significant portions of output of the black box. More precisely, if Q(x; y) factors into irreducible factors and we know that many points satisfy, say, Q 1 then we would like Q 1 to be one of the outputs of the algorithm. The proof that this is indeed the case is slightly more complicated than in the previous subsection. We will use a version of Bezout's theorem ([38], Theorem 3.1). Essentially, Bezout's theorem states that two algebraic curves in the plane cannot intersect in infinitely many points, unless they are identical. The theorem gives an explicit bound on the number of points where two curves of degree d 1 and d 2 may meet. Bezout's bound is slightly weaker than the one we wish to prove for the case of (k; d)-algebraic black boxes, so we prove our lemma from first principles. Before going on to the next lemma we review a couple of standard definitions from algebra (cf. [38]). Definition 2.6. Given univariate polynomials P be the (d 1 given as follows: The resultant of the polynomials P and Q, denoted Res(P; Q) is the determinant of Q). For multivariate polynomials P resultant with respect to y is defined similarly by viewing polynomials in y with coefficients from the ring of polynomials in x We define the matrix M y (P; Q) as above and its determinant is the resultant Res y Lemma 2.7. For a set of points with the x j 's being distinct, if ~ Q(x; y) and Q 1 (x; y) are polynomials of f(1; x); (d; y)g-weighted degree at most kd respectively, satisfying the properties: (1) 8 d, then the polynomials Q 1 (x; y) and ~ share a non-constant common factor. Proof. Consider the resultant R y (x) of the polynomials ~ Q(x; y) and Q 1 (x; y) with respect to y. Observe that the resultant is a polynomial in x. The following claim bounds the degree of this polynomial. Claim 2.8. R y (x) is a polynomial of degree at most k 1 kd. Proof. The determinant of the matrix M y ( ~ where - ranges over all permutations from [k sign(-) denotes the sign of the permutation. We will examine every permutation show that the degree of the (viewed as a polynomial in x) is at most This will suffice to show that the determinant is a polynomial of degree at most kk 1 d. the degree of the entry (M y ( ~ by the definition of the resultant, d ij - (i (Here we consider the polynomial 0 as having degree \Gamma1.) Thus the degree of the term given by k1 d i-(i) k1 This concludes the proof. It is well-known that the resultant of two polynomials is zero iff the polynomials share a common factor (cf. [38], Chapter 1, Theorem 9.3). We will show that R y (x) is identically zero and this will suffice to prove the lemma. We show this part in the next claim by showing that R y (x) has more zeroes than the upper bound on its degree. 2.9. For every j such that ~ R y Proof. Fix x j and consider the polynomials ~ the resultant of the polynomials ~ q(y) and q 1 (y). Now we know that ~ implying that is a common factor of ~ q and q 1 . Therefore the resultant of ~ q and q 1 must be zero, implying R y Since the above holds for any factor Q i of Q, we have: Lemma 2.10. Let B be a (k; d)-algebraic black box described by a bivariate polynomial Q with no repeated non-constant factors. Let Q l be the irreducible factors of Q of f(1; x); (d; y)g-weighted degree k 1 Given m pairs of elements which are the input/output pairs of B on m distinct inputs, if there exists an i 2 [k] such that jfjjQ i then a set of at most k polynomials f ~ that includes Q i can be found in time polynomial in m, k and d. Remark: For a set of pairs is a strengthening of Lemma 2.4. Unfortunately, the proof as shown above does not extend to the case of where the pairs are distinct, but the x j are not. Due to this limitation, Lemma 2.10 does not even cover the case of Lemma 2.1. Once again, using a sampling method similar to that used for Theorem 2.5, we get the following theorem. Theorem 2.11. Let B be a (k; d)-algebraic black box described by a polynomial Q with distinct irreducible factors l such that the f(1; x); (d; y)g-weighted degree of Q is at most kd and of Q i is at most k i d. Further, let There exists a randomized algorithm which takes as input a confidence parameter and a threshold p ? 0, runs in time poly(k; d; 1 makes calls to the black box B and with probability at least reconstructs a list of at most k bivariate polynomials which includes every polynomial Q i such that 2.4. ffl-noisy black boxes. Finally we extend the reconstruction algorithms of the previous section to the case when the black boxes are allowed to output noise on an ffl fraction of the inputs from H. As usual the basic algorithm will be to find a polynomial ~ Q(x; y) which is zero on all the input-output pairs of the black box. However we will have to do something about the noisy points which do not lie on any nice algebraic curve. We adapt an algorithm of Welch and Berlekamp [39, 5] (see also [14]) to handle this situation. Say we sample the black box B in m points x and the black box outputs according to some (unknown) polynomial Q in all but m 0 locations. Say that these locations are given by 0g. We use the fact that there exists a non-zero polynomial W (x) of degree at most m 0 which is zero when Indeed W is such a polynomial. Let Q (x; Thus we can modify the algorithm of the previous section to try to find Q . This algorithm is summarized as follows: The input to the algorithms is m pairs of elements 1. Interpolate to find a set of coefficients q lj of the polynomial ~ that satisfies ~ /* The parameter m 0 will be specified later. */ 2. Factor the polynomial ~ Q and output all its irreducible factors. be the irreducible factors of the unknown polynomialQ (x; y) describing the black box B. We focus on the factor Q 1 . Let the f(1; x); (d; y)g- weighted degree of Q 1 be k 1 d. The following two lemmas essentially show that if the fraction of points sufficiently larger than k 1 times the fraction of noise, then we can reconstruct the polynomial Q 1 . Lemma 2.12. For a set of points f(x Q(x; y) and Q 1 (x; y) are polynomials of f(1; x); (d; y)g-weighted degree at most kd respectively, satisfying the properties: (1) 8 share a non-constant common factor. Proof. The proof is a straightforward modification of the proof of Lemma 2.7. The only change is in Claim 2.8, where the bound on the degree of the resultant Res y ( ~ goes up to k 1 because the degree of the non-zero entries in the first k 1 columns goes up by m 0 . Lemma 2.13. Let B be a (k; d)-algebraic black box described by a bivariate polynomial Q with no repeated non-constant factors. Let Q l be the irreducible factors of Q of at most f(1; x); (d; y)g-weighted degree k 1 which are the input/output pairs of B on distinct inputs, if there exists an i 2 [k] such that jfjjQ i then a set of at most k bivariate polynomials that includes can be found in time polynomial in m, k and d. Lemma A.2 of the appendix ensures that if then a sample of M elements chosen independently and uniformly at random from F satisfies the following three properties: 1. The x j 's have no repeated elements. 2. There are (strictly) less than ((ffl values of j such that 3. There are at least ((p i +k i ffl)=2)M +k i kd=2 values of j such that Q i Thus if jHj - 3 randomly points from H and use as input to the algorithm described above. If, on the other hand H is small, then we use all as the input set and use m as input to our algorithm. In the latter case, Q i is guaranteed to be part of the output if (p yields the following theorem. Theorem 2.14. Let B be an ffl-noisy (k; d)-algebraic black box described by a polynomial Q with no repeated non-constant factors. Further, let l be the (distinct) irreducible factors of Q and let p i There exists an algorithm which takes as input ffi; p ? 0, runs in time poly(k; d; 1 at least reconstructs a list of at most k bivariate polynomials which includes every 3. Multivariate Black Boxes. In this section, we extend Theorem 2.14 to multivariate polynomial black boxes over finite fields. The methods of Section 2, i.e., those based on trying to find the coefficients of polynomials simultaneously, do not seem to extend directly to the general multivariate case. This is due to the possibly large explicit representation of the function extracted from the black box, which makes it inefficient to work with. Instead, we use techniques of pairwise independent sampling to reduce the problem to a univariate situation and then apply Theorem 2.14 to the new univariate problem. We start by summarizing the problem. Given: An n-variate ffl-noisy (k; d)-polynomial black . I.e., there exist n-variate polynomials f of total degree at most d such that Pr and furthermore, each f i is well represented in B, i.e., Construct k black boxes computing the functions f Notice that we have changed the problem from that of the previous section in several ways. First, we no longer ask for an explicit representation of f i , but allow for implicit representations. This is a strengthening of the problem, since explicit representations may be much longer than implicit ones and thus allow a reconstruction algorithm much more time than we do. For instance, if the reconstructed function is a sparse multivariate polynomial, then we can use any of the sparse multivariate polynomial interpolation algorithms given in [3, 20, 21, 40] to recover explicit representations of the reconstructed functions, in running time which is polynomial in the number of non-zero coefficients rather than total number of possible coefficients. A second change from the problem of the previous section is that we expect all the polynomials to be well represented in the black box B. This is a weakening of the problem, and we do not know how to get around it. The outline of the method we use to solve the above problem is as follows. Consider first the slightly simpler problem: Given B and an input - b 2 F n , find the multiset b)g. This we solve by a reduction to a univariate version of the reconstruction problem. Now a solution to this problem does not immediately suffice to yield a solution to the n-variate reconstruction problem as described above. This is because the solution produces a multiset of values fy for which we do not know which y j corresponds to f i . We want the black boxes to always output according to the same polynomial consistently. In order to solve this problem, we introduce the notion of a reference point - which will have the property that the value of the k different polynomials will be all distinct on this point. We will then use a more general reduction to the univariate problem which will allow us to reconstruct a set of pairs f(y along with the property of the reference point, allows us to order the points consistently for all inputs - b. We now go into the details. 3.1. Reference Points. The following definition of a reference point is motivated by the above discussion. We wish to consider the polynomial Q(x and want to ensure that at the reference point - One way to test for this is to see if the polynomial has any repeated non-constant factors. This will be our definition of a reference point. Note that this definition is general enough to apply also to polynomials Q which do not factor linearly in y. Definition 3.1. For a multivariate polynomial Q(x that has no non-constant repeated factors, a reference point is an element - that the univariate polynomial p(y) has no repeated non-constant factors. The next lemma will show that a random point is likely to be a reference point for any given polynomial Q, provided the field size is large compared to the degree of the polynomial Q. We will need one more notion which is standard in algebra. Definition 3.2. The discriminant of a univariate polynomial Q(y), denoted \Delta, is is the derivative of Q with respect to y. The discriminant of a multivariate polynomial Q(x with respect to y, denoted \Delta(x defined to be Res y (Q; is the derivative of Q with respect to y. (Formally the derivative of a monomial q i y i is the summation is of 's. The derivative of a polynomial is simply the sum of the derivatives of the monomials in it.) The above definition is motivated by the following well-known fact: A polynomial (over any unique factorization domain) has repeated non-constant factors if and only if it shares a common factor with its derivative (cf. [27], Theorem 1.68). From the well-known fact about resultants, this extends to saying that a polynomial has repeated non-constant factors if and only if its discriminant is zero. Lemma 3.3. For a polynomial Q(x degree at most kd with no repeated non-constant factors a random point - r 2 F n is a reference point with probability at least 1 \Gamma k(k\Gamma1)d Proof. Let \Delta(x be the discriminant of Q with respect to y. Notice that is a polynomial of f(1; x y)g-weighted degree at most (k \Gamma 1)d. Thus, as in Claim 2.8 we can show that \Delta(x polynomial in x of degree at most k(k \Gamma 1)d. Since Q has no repeated factors, \Delta(x identically zero. Thus for a random point - r 2 F n , the probability that at most k(k \Gamma 1)d=jF j. But observe that \Delta(-r) is the discriminant of the univariate polynomial p(y) r is a reference point. 3.2. Reduction to the univariate case. We now consider the case where we are given a black box B, described by polynomials f and two points - and we wish to find a set of k pairs f(y such that for every i 2 [k], there exists some j 2 [k] such that (y We solve this problem by creating a univariate reconstruction problem and then using Theorem 2.14 to solve this problem. This reduction builds upon a method of [14], which in turn builds upon earlier work of [1, 13]. We create a univariate "subdomain", more precisely a function D , such that the image of the domain, Im(D) satisfies the following properties:, 1. - a and - b are contained in Im(D). 2. The restriction of a polynomial ~ weighted degree kd to Im(D), i.e., the function ~ Q(D(t); y), is a bivariate polynomial of f(1; t); (3d; y)g-weighted degree 3kd. 3. Im(D) resembles a randomly and independently chosen sample of F n of size jF j. In particular, with high probability, the fraction of points from Im(D) where the black box responds with f(x very close to the fraction of points from F n where the black box responds with f . For a finite field F , with constructed by picking vectors - at random from F n and setting construction it is immediately clear that the "subdomain" D satisfies properties (1) and (2) listed above. The following lemma shows that it also satisfies property (3) above. Lemma 3.4. For sets Pr d Proof. Observe that the set of points fD(t)jt 2 F n f0; 1gg, constitute a pairwise independent sample of points chosen uniformly at random from F n . The lemma now follows from a standard application of Chebyshev bounds. Thus we obtain the following algorithm (tuned for confidence parameter The algorithm is given a threshold p. 1. Pick - c; - d at random from F n . 2. Let be given by D i F be the black box given by B 3. Reconstruct all univariate polynomials of degree at most 3d describing threshold p and confidence 4. Output f(g 1 (0); g 1 (1))g. (jF j\Gamma2) . By Lemma 3.4 we know that the above algorithm finds a univariate domain D, s.t. at most ffl fraction of the points on the domain are "noisy" and every polynomial is represented on at least p fraction of the domain, with probability at least 1 \Gamma 1=6. Thus if p i - p for every i, and (p 3kd, then the univariate reconstruction algorithm is guaranteed to find all the f i 's, with probability at least 1 \Gamma 1=6. The condition on jF j above can be simplified (somewhat) to (p \Gamma ffl)jF j ? 3kd and under this condition the algorithm above returns f(f 1 correctly with probability at least 2=3. Notice that by repeating log 1 times and outputting the majority answer (i.e., the set that is output most often), we can boost the confidence up to any ffi ? 0. This yields the following lemma: Lemma 3.5. Given an ffl-noisy n-variate polynomial black box B described by polynomials of degree d, s.t. there exists a randomized algorithm that takes as input runs in time poly(n; k; d; 1 outputs the set of k ordered pairs f(f 1 with probability at least 3.3. Putting it together. We are now ready to describe the algorithm for solving the multivariate reconstruction problem. The algorithm has a preprocessing stage where it sets up k black boxes, and a query processing stage where it is given a query point -a 2 F n and the black boxes compute f i (-a). Preprocessing Stage: Given: Oracle access to a black box B described by polynomials Parameters k, ffl, p and ffi . Step 1: Pick - r at random and - b at random. Step 2: Reconstruct, with confidence 1\Gammaffi, the set f(f 1 using the algorithm of Section 3.2. Step 3: If the multiset ff 1 has two identical values, then output "failure". Else pass the reference point - r and the values f 1 to the Query Processing Stage. Query Processing Stage: Given: Oracle access to a black box B, - b 2 F n and parameters k; d; p and ffi . Additionally reference point - r and values v passed on by the Preprocessing Stage. Step 1: Reconstruct with confidence ffi the set f(f 1 using the algorithm of Section 3.2. Step 2: If the set ff 1 equals the set fv then reorder the indices so that f i If the sets are not identical then report "failure". Step 3: For every i 2 [k], the black box B i outputs f i (b). This yields the following theorem. Theorem 3.6. Let B be an ffl-noisy n-variate (k; d)-polynomial black box s.t. Pr and 8i 2 [k] Pr there exists a randomized algorithm that takes as input a confidence parameter ffi and with probability such that for every i 2 [k] there exists j 2 [k] s.t. for every input - b 2 F n , the black box 4. Applications. In this section, we describe the application of our techniques to curve fitting and bivariate polynomial factorization. 4.1. Curve Fitting Problems over Discrete Domains. In this subsection, we study the curve fitting problem over discret domains. Given a set of m points, with integer coordinates, we show how to find a polynomial with integer coefficients that is \Delta-close to all but an ffl fraction of the points (if such a polynomial exists), need only be less than 1=2 (provided is m is larger than (4\Delta+1)d (or over the integers) the problem can be formulated as: Given: m pairs of points, ffl, such that there exists a polynomial f , of degree at most d, such that for all but fflm values of j in [m] Problem: Find such an f . Consider f \Delta]. Notice that all but ffl fraction of the points are described by the polynomial f i 's. Thus the above problem could be thought of a reconstruction problem for an ffl-noisy reconstruction problem. Lemma 2.13 can now be applied to this set of points to get the following result. 4.1. If there exists an i such that the number of points for which strictly more than fflm +kd, then we can find a small set of polynomials which includes The weakness of the above procedure is that it can only be guaranteed to succeed if ffl is smaller than 1 2\Delta+2 , since only then can we guarantee the existence of an i such that the polynomial f i (x) is represented more often than the noise in the input set. We now present a variation of the above method which gets around this weakness and solves the curve fitting problem for strictly positive values of ffl (independent of \Delta) and in fact works for ffl arbitrarily close to 1=2. The idea is that we can artificially decrease the influence of the bad points. To do this, we look at the following set of points: f(x i and y i each point in the original sample, we generate 2\Delta+1 points, by adding and subtracting up to \Delta to the y coordinate of each point.) We show that these points represent the output of a (k; d)-algebraic black box for Observe that the following conditions hold for the (2\Delta+1)m points constructed above: ffl There exists a polynomial Q(x; y) of f(1; x); (d; y)g-weighted degree at most fflm+(4\Delta+1)d such that Q(x; all the points. This is the polynomial: is the polynomial satisfying W that the degree of W is fflm.) ffl At least (1 \Gamma ffl)m of the points satisfy This is because for every point in the original such that y j is within \Delta of f(x j ) (and there were one of the new Lemma 4.2. Given m points 1there exists a polynomial time algorithm that can find all polynomials f of degree d such that f is \Delta-close to all but an ffl fraction of the points Proof. Find a polynomial ~ Q(x; y) such that ~ all the points f(x i such that the degree of ~ Q is at most fflm then by Lemma 2.3 we know that for every candidate function f which forms an (ffl; \Delta) fit on the given points, (y \Gamma f(x)) divides ~ Q. Thus factoring ~ give us all the candidates. 4.2. Reducing Bivariate Factoring to Univariate Factoring. In Section 2.1, we saw how to reduce the problem of reconstructing total polynomial black boxes to the problem of factoring bivariate polynomials. In the specific case of univariate polynomial black boxes over finite fields, we will also reduce the reconstruction problem to that of factoring univariate polynomials into their irreducible factors. As an interesting consequence, we describe a simple way of reducing the problem of factoring special bivariate polynomials over finite fields to the problem of factoring univariate polynomials. We first show how to reduce the reconstruction problem to that of factoring univariate polynomials: Suppose we have a black box which on input x outputs the (unordered) set ff 1 where the f i 's are univariate polynomials, each of degree at most d. Sampling from the black box and interpolating, we can find the polynomial explicitly (in terms of its coefficients). If somehow we could guarantee that at least one of the f i 's is irreducible, we could factor t to find f i . Such a guarantee is not available, but we simulate it via randomization. Let ff(x) 2 F [x] be a random degree d polynomial. We can convert the given set of sample points so that on each input x we have the (still unordered) set fg 1 ff(x)g. Each of the polynomials g i is a random degree d polynomial (but they are not necessarily independent). We then use the fact that random polynomials over finite fields have a reasonable chance of being irreducible. Lemma 4.3 ([27], p.84). The probability P q (d) that a random polynomial of degree d is irreducible over F q , is at least 1 We can thus interpolate (after sampling at kd explicitly compute into irreducible factors r 1 l . For each factor r j of g, we verify whether or not r j \Gamma ff is a candidate for one of the f i 's by checking that it evaluates to one of the outputs of the black box B on all the sampled points. By Lemma 4.3 we know that with non-negligible probability g i is irreducible and if this happens, we find g i as one of the factors of g (i.e., as one of the r j 's). Subtracting ff from g i gives us f i , which will pass the candidacy verification. Lemma 4.4. If a degree d polynomial p agrees with one of the outputs of the black box on kd different x's, then p agrees with one of the outputs of the black box on all x's. Proof. If p agrees with one of the outputs of the black box on kd different x's, then by the pigeonhole principle there is a polynomial f i which agrees with p on at least different x's. Thus Thus, no r j which is not equal to one of the g i 's will pass the candidacy verification. By repeating this procedure enough times and outputting all the candidates, we can reconstruct all the polynomials ff g. Straightforward analysis shows that the expected number of times that we need to repeat the process (choose random ff) is O(k=P q (d)). Refining the analysis, we can show that O(ln k=P q (d)) times suffice. From the above, we get the following algorithm for finding the monic linear factors of a bivariate polynomial Q(x; y). program Simple Factor repeat O( ln k=P q (d) ) times pick a random degree d polynomial for every factor g(x) of Q(x; ff(x)) divides Q(x; y) output (y 4.5. Given a bivariate polynomial Q(x; y), over a finite field F , of total degree at most kd, the algorithm Simple Factor finds all the linear and monic factors of We next extend this mechanism, and apply the reconstruction mechanism of Section 2.2 to the problem of finding the factors of Q(x; y) which are monic and of constant degree in y. Our mechanism tries to isolate some factor A(x; y) of Q(x; y) of the form where the a i 's are polynomials in x of degree at most d (and c is a constant). Let Q(x; y) be a polynomial of f(1; x); (d; y)g-weighted degree kd. For each i 2 [c] we construct a program P i which is supposed to be a (K; d)-algebraic box for a i , for some c . We then use our reconstruction procedure (Theorem 2.14) to produce, for each i 2 [c], a list of at most K polynomials which contains a i . This, in turn, gives a set of at most K c polynomials in x and y which contains A(x; y). A(x; y) can be isolated from this set by exhaustive search. The running time of this algorithm is thus some polynomial in (kd) c 2 The program P i for a i works as follows on input x constructs the polynomial Q (which is a polynomial in y) and factors Q x1 . ffl Let S be the set of factors of Q x1 . (S contains polynomials in y.) ffl Let S c be the set of polynomials of degree c obtained by taking products of polynomials in S. picks a random polynomial f in S c and outputs the coefficient of y i in f . We now show that P i is a (2ikd c described by some polynomial the algebraic closure of the quotient ring of polynomials in x, Q(x; y) factors into linear factors in y; let this factorization be (The b i (x) are some functions of x, but not necessarily polynomials.) For T ae [k], l2S b l (x). Notice that the function a i (x) that we are interested in is actually oe T;i (x) for some T . Notice further that the output of the program P i is always oe T;i (x) for some T (though this T is some arbitrary subset of [k]). Thus the input/output pairs (x; y) of the program P i always satisfy oe T;i Unfortunately, oe T;i (x) need not be a polynomial in x. So we are not done yet. We will show that Q actually a polynomial in x and y of f(1; x); (d; y)g-weighted degree at most Ki, where c To see this, consider the coefficient of y j in Q (x; y). This is q k (x) N times some polynomial in b 1 By definition of Q , we notice that g j is a symmetric polynomial in b 1 of degree at most i c . We now invoke the "fundamental theorem of symmetric polynomials" ([27], pages 29-30) which states that a symmetric polynomial of degree D in variables z can be expressed as a polynomial of degree at most D in the primitive symmetric functions in In our case this translates into saying that, there exists some polynomial ~ of degree at most N s.t. g j (b 1 (since the primitive symmetric functions in b 1 are actually qk (x) . Thus we find that the coefficient of y j in Q (x; y) is a polynomial in x of degree at most ikd c . The claimed bound on the degree of Q now follows easily. Thus we get the following lemma. Lemma 4.6. Given a polynomial Q(x; y) of f(1; x); (d; y)g-weighted degree kd, there is an algorithm that runs in time polynomial in (kd) c 2 which finds all factors of Q that are monic and of degree c in y. Acknowledgments . We are very grateful to Avi Wigderson for asking a question that started us down this line of research and for helpful discussions. We are very grateful to Umesh Vazirani for his enthusiasm, his valuable opinions and suggestions, and the time that he spent with us discussing this work. We thank Ronen Basri, Oded Goldreich and Mike Kearns for their comments on the writeup of this paper. We thank Joel Friedman for technical discussions about questions related to the topics of this paper. We also thank the anonymous referees for their extensive reports and catching many blatant as well as subtle errors from an earlier version of this paper. --R Hiding Instance in Multioracle Queries. Probabilistic Algorithms in Finite Fields A Deterministic Algorithm for Sparse Multivariate Polynomial Interpolation. Factoring Polynomials over Large Finite Fields. Bounded Distance Learning Switching Concepts. Occam's Razor. A note on enumerative counting. Finding edges and lines in images. Personal communication to Ronitt Rubinfeld Highly resilient correctors for polynomials. Learning polynomials with queries: The highly noisy case. Factorization of Polynomials over a Finite Field and the Solution of Systems of Algebraic Equations. Fast decomposition of polynomials into irreducible ones and the solution of systems of algebraic equations. Algorithms for Sparse Rational Interpolation. Interpolation of Sparse Rational Functions Without Knowing Bounds on Exponents. Fast Parallel Algorithms for Sparse Multivariate Polynomial Interpolation over Finite Fields. Decision Theoretic Generalizations of the PAC Model for Neural Net and Other Learning Applications. Microeconomic Theory A Polynomial-Time Reduction from Bivariate to Univariate Integral Polynomial Factorization Computing with Polynomials Given by Black Boxes for Their Evaluations: Greatest Common Divisors Learning decision trees using the Fourier spectrum. Introduction to finite fields and their applications. New directions in testing. Factoring polynomials with rational coefficients. Theory of edge detection. Randomized Algorithms. Learning Decision Lists. An Introduction of the Approximation of Functions. A new modular interpolation algorithm for factoring multivariate polynomials. Decoding of Reed Solomon codes beyond the error-correction bound A Theory of the Learnable Algebraic Curves. Correction of Algebraic Block Codes. Probabilistic Algorithms for Sparse Polynomials. Interpolating Polynomials from their Values. --TR --CTR Dan Boneh, Finding smooth integers in short intervals using CRT decoding, Journal of Computer and System Sciences, v.64 n.4, p.768-784, June 2002 Dan Boneh, Finding smooth integers in short intervals using CRT decoding, Proceedings of the thirty-second annual ACM symposium on Theory of computing, p.265-272, May 21-23, 2000, Portland, Oregon, United States Fitting algebraic curves to noisy data, Proceedings of the thiry-fourth annual ACM symposium on Theory of computing, May 19-21, 2002, Montreal, Quebec, Canada Igor E. Shparlinski, Sparse polynomial approximation in finite fields, Proceedings of the thirty-third annual ACM symposium on Theory of computing, p.209-215, July 2001, Hersonissos, Greece Igor E. Shparlinski , Ron Steinfeld, Noisy Chinese remaindering in the Lee norm, Journal of Complexity, v.20 n.2-3, p.423-437, April/June 2004 Alina Beygelzimer , Mitsunori Ogihara, The enumerability of P collapses P to NC, Theoretical Computer Science, v.345 n.2-3, p.248-259, 22 November 2005 Fitting algebraic curves to noisy data, Journal of Computer and System Sciences, v.67 n.2, p.325-340, September Oded Goldreich , Dana Ron , Madhu Sudan, Chinese remaindering with errors, Proceedings of the thirty-first annual ACM symposium on Theory of computing, p.225-234, May 01-04, 1999, Atlanta, Georgia, United States A. C. Gilbert , S. Guha , P. Indyk , S. Muthukrishnan , M. Strauss, Near-optimal sparse fourier representations via sampling, Proceedings of the thiry-fourth annual ACM symposium on Theory of computing, May 19-21, 2002, Montreal, Quebec, Canada Till Tantau, Query complexity of membership comparable sets, Theoretical Computer Science, v.302 n.1-3, p.467-474, 13 June Venkatesan Guruswami , Piotr Indyk, Linear time encodable and list decodable codes, Proceedings of the thirty-fifth annual ACM symposium on Theory of computing, June 09-11, 2003, San Diego, CA, USA Venkatesan Guruswami, Algorithmic results in list decoding, Foundations and Trends in Theoretical Computer Science, v.2 n.2, p.107-195, January 2007 Zhang , Rajiv Gupta, Hiding program slices for software security, Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization, March 23-26, 2003, San Francisco, California
bezout's theorem;polynomial interpolation;polynomial factoring;error correcting codes;multivariate polynomials;PAC learning;noisy interpolation
300125
A Compression Algorithm for Probability Transition Matrices.
This paper describes a compression algorithm for probability transition matrices. The compressed matrix is itself a probability transition matrix. In general the compression is not error free, but the error appears to be small even for high levels of compression.
Introduction . Many discrete systems can be described by a Markov chain model in which each state of the Markov model is some discrete state of the dynamical system. If there are N states, then the Markov chain model is defined by an N \Theta N matrix Q called the "1-step probability transition matrix," where Q(i; j) is the probability of going from state i to state j in one step. The n-step behavior is described by the nth power of Q, Q n . For many systems, the number of states is enormous and there is a computational advantage in reducing N . Previous methods for reducing the number of states (referred to as compression, aggregation, or lumping methods) have focused on techniques that provide good estimations of the steady-state behavior of the Markov model. The focus of this paper, however, is on transient behavior, and the goal is to produce an algorithm for compressing Q matrices in a way that yields good estimates of the transient behavior of the Markov model. The algorithm described in this paper compresses a Q matrix into a smaller Q matrix with less states. In general, the compression will not be without error, so the goal is to provide an algorithm that compresses the original Q matrix without significant error. Although computing a compressed matrix might take some time, the savings resulting from using this compressed matrix in all subsequent computations can more than offset the compression time. The organization of this paper is as follows. Section 2 introduces the compression algorithm, which compresses pairs of states by taking a weighted average of the row entries for those two states, followed by summing the two columns associated with those two states. Section 2 also introduces the important concepts of row and column equivalence, which are important for identifying pairs of states that can be compressed with no error. Section 3 provides mathematical justification for taking the weighted average of row entries and shows that the weights are simply column sums of probability mass. Section 4 proves that pairs of states that are row or column equivalent lead to perfect compression. Section 5 introduces an analysis of error and uses this to define a metric for row and column similarity which can be used to find pairs of states that yield almost perfect compression. Later sections illustrate the utility of the compression algorithm through experiments. 2. The Compression Algorithm at a High Level. The entries in the Q probability that the system will tran- This work was supported by ARPA Order # D106/03. y AI Center - Code 5514, Naval Research Laboratory, 4555 Overlook Avenue, Washington DC, 20375. Phone: 202-767-9006, FAX: 202-767-3172 (spears@aic.nrl.navy.mil). W. M. SPEARS sition to state j in one step, given that it currently is in state i. 1 Now suppose that states i and j have been chosen for compression. The new compressed state is referred to as state fi - jg. Compressing states i and j together means that the combined state represents being in either state i or state j. Since this is a disjunctive situation, the probability of transition from state k into the compressed state is simply the sum Stated another way, part of the compression algorithm is to sum columns of probability numbers. However, in general, transitions from a compressed state are more complicated to compute. Clearly, the probability of transitioning from the compressed state to some other state p fi-jg;k must lie somewhere between p i;k and p j;k , depending on how much time is spent in states i and j. Thus a weighted average of row entries appears to be called for, where the weights reflect the amount of time spent in states i and j. Precisely how to do this weighted average is investigated in Section 3. The algorithm for compressing two states i and j together is as follows: 2 (a) Compute a weighted average of the ith and jth rows. Place the results in rows i and j. (b) Sum the ith and jth columns. Place the results in column i. Remove row j and column j. The compression algorithm has two steps. It takes as input a matrix Q u (an uncompressed averages the row entries, producing an intermediate row-averaged matrix Q r . Step (b) sums column entries to produce the final compressed matrix Q c . Step (a) is the sole source of error, since in general it is difficult to estimate the amount of time spent in states i and j. Now that the compression algorithm has been outlined, it is important to define what is meant by "perfect" compression. As mentioned before, analysis of n-step transition probabilities (i.e., transient behavior of the Markov chain) can be realized by computing Q n . For large Q matrices this is computationally expensive. It would be less expensive to compress Q and to then raise it to the nth power. If the compression algorithm has worked well then the nth power of the compressed matrix Q c should be (nearly) identical to compressing the nth power of the uncompressed matrix Q u . In other words, perfect compression has occurred if (Q n c . It turns out that there are two situations under which perfect compression can be obtained. The first situation is referred to as "row equivalence", in which the two states i and j have identical rows (i.e., 8k p In this case the weighted averaging can not produce any error, since the weights will be irrelevant. The second situation is referred to as "column equivalence", in which state i has column entries that are a real multiple q of the column entries for state j (i.e., 8k p intuition here is that when this situation occurs, the ratio of time spent in state i to state j is precisely q. The details of this can be found in Section 4. However, for arbitrary matrices, compressing an arbitrarily chosen pair of states will not necessarily lead to good results. Thus, the goal is to identify pairs of states i and j upon which the above compression algorithm will work well. It turns out that pairs of states that are row or column similar are good candidates for compression. The justification for these measures will be provided in Section 5. 1 The notation p (n) denotes the entries of the n-step probability transition matrix Q n . 2 The algorithm is written this way because it makes it amenable to mathematical analysis. COMPRESSING PROBABILITY TRANSITION MATRICES 3 At a high level, of course, this simple compression algorithm must be repeated for many pairs of states, if one wants to dramatically reduce the size of a Q matrix. The high level compression algorithm is simply: Compress() Repeat as long as possible (i) Find the pair of states i and j most similar to each other. 3. The Compression Algorithm in More Detail. In the previous section the compression algorithm was described in two steps. Step (a) is where error can occur and care must be taken to mathematically justify the weighted averaging of rows. This can be done by attempting to force (Q 2 to be as similar as possible to c (later sections will generalize this to higher powers). This is mathematically difficult, but fortunately it suffices to force Q 2 u to be as similar as possible to Q which is much simpler and focuses on the row-averaged matrix Q r explicitly. The intuition behind this is that if compression is done correctly, passage through the new compressed state should affect the 2-step transition probabilities as little as possible. 3 This will be shown with a 4 \Theta 4 Q matrix, and then generalized to an arbitrary N \Theta N matrix. The result will be the weighted row averaging procedure outlined earlier. This particular presentation has been motivated by a concern for comprehension and hence is not completely formal. A completely formal presentation is in the Appendix. 3.1. Weighted Averaging with a 4 \Theta 4 Matrix. Consider a general uncompressed 4 \Theta 4 matrix Q u for a Markov chain model of 4 states, as well as the general intermediate matrix The notation r i;j j Q r (i; j) is used to prevent confusion with the p i;j in Q u . Without loss of generality the goal will be to compress the 3rd and 4th states (rows and columns) of this matrix. Since the 3rd and 4th states are being compressed, rows 1 and 2 of Q r must be the same as Q u (i.e., averaging rows 3 and 4 will not affect rows 1 and 2). Denoting f3 - 4g to be the compressed state, the intermediate matrix is: The r f3-4g;k represent the weighted average of rows 3 and 4 of Q u . Recall that step (a) of Compress-states(3,4) will place that average in both rows 3 and 4, which is why rows 3 and 4 of Q r are the same. The trick now is to determine what r f3-4g;1 , r f3-4g;2 , r f3-4g;3 , and r f3-4g;4 should be in order to produce a reasonable compression. This is done by considering 3 More formally, it can be shown that if Q 2 c for row or column equivalent situations. See Section 4. 4 W. M. SPEARS a (2) 1;1 a (2) 1;2 a (2) 1;3 a (2) a (2) 2;1 a (2) 2;2 a (2) 2;3 a (2) a (2) 3;1 a (2) 3;2 a (2) 3;3 a (2) a (2) 4;1 a (2) 4;2 a (2) 4;3 a (2) The notation a (2) i;j is used to prevent confusion with the p (2) i;j in Q 2 u . Since the goal is to have it is necessary to have p (2) i;j be as similar as possible to a (2) i;j . The p (2) i;j values can be computed using p i;j values, while the a (2) i;j values require the unknowns r f3-4g;1 , r f3-4g;2 , r f3-4g;3 , and r f3-4g;4 . For example, p (2) 1;1 can be computed by multiplying Q u by itself: However, a (2) 1;1 is computed by multiplying Q u and a (2) In the ideal situation we would like both of these to be equal. This implies that: But we can write another formula for r f3-4g;1 by considering p (2) 2;1 and a (2) a (2) Again, we would like both of these to be equal. This implies that: Similarly, consideration of p (2) 3;1 and a (2) 3;1 yields: while consideration of p (2) 4;1 and a (2) 4;1 yields: What has happened here is that the four elements in the first column of Q lead to four expressions for r f3-4g;1 . In general, all four expressions for r f3-4g;1 can not hold simultaneously (although we will investigate conditions under which they will hold later). The best estimate is to take a weighted average of the four expressions for r f3-4g;1 (this is related to the concept of "averaging" probabilities - see Appendix for more details). This yields: COMPRESSING PROBABILITY TRANSITION MATRICES 5 Note how the final expression for r f3-4g;1 is a weighted average of the row entries p 3;1 and p 4;1 , where the weights are column sums for columns 3 and 4. In general the elements of Q in the kth column will constrain r f3-4g;k : Once again, note how the expression for r f3-4g;k is a weighted average of the row entries p 3;k and p 4;k , where the weights are column sums for columns 3 and 4. 3.2. Weighted Averaging with an N \Theta N Matrix. The previous results for a 4 \Theta 4 matrix can be extended to an N \Theta N matrix. Without loss of generality compress states . Then the N elements of column k yield N expressions for each r fN \Gamma1-Ng;k . The best estimate is (see Appendix for details): Note again how the weights are column sums for columns Generalizing this to compressing two arbitrary states i and j yields: l p l;i )p i;k l p l;j )p j;k l l p l;j are the sums of the probability mass in columns i and j of Q u . Equation 3.1 indicates how to compute the r fi-jg;k entries in Q r . Note how they are computed using the weighted average of the row entries in rows i and j. The weights are simply the column sums. This justifies the row averaging component of the compression algorithm described in the previous section. Intuitively stated, the column mass for columns i and j provide good estimates of the relative amount of time spent in states i and j. The estimates are used as weights to average the transitions from i to state k and from j to k, producing the probability of transition from the combined state fi - jg to k. 3.3. Mathematical Restatement of the Compression Algorithm. Now that the weighted averaging of rows i and j has been explained, it is only necessary to sum columns i and j in order to complete the compression algorithm. The whole algorithm can be expressed simply as follows. Assume that two states have been chosen for compression. Let S denote the set of all N states, and let the non-empty sets such that one S i contains the two chosen states, while each other S i is composed of exactly one state. Let m i denote the column mass of state i. Then the compressed matrix Q c is: 6 W. M. SPEARS j2Sy This corresponds to taking a weighted average of the two rows corresponding to the two chosen states, while summing the two corresponding columns. The other entries in the Q matrix remain unchanged. Consider an example in which states 2 and 3 are compressed. In that case S is described by: Applying this to the following column equivalent matrix Q u produces perfect results c In summary, this section has justified the use of column mass as weights in the row averaging portion of the compression algorithm. The whole compression algorithm is stated succinctly as a mathematical function, which can compress any arbitrary pair of states. However, as stated earlier, compression of arbitrary pairs of states need not lead to good compression. The goal, then, is to identify such states. This is investigated in the next section, and relies upon the concepts of row and column equivalence. 4. Special Cases in Which Compression is Perfect. If compression is working well, then the compressed version of Q n u should be (nearly) identical to Q n c . As suggested in Section 2, there are two situations under which perfect compression will occur. The first situation is when two states are row equivalent. The intuition here is that the row average of two identical rows will not involve any error, and thus the compression will be perfect. The second situation is when two states are column equivalent. The intuition for this situation is that if the column c i is equal to qc j , then the ratio of time spent in state i to state j is exactly q. Under these circumstances the weighted row average will also produce no error. This section will prove that (Q n c when the two states being compressed are either row equivalent or column equivalent. This will hold for any n and for any Q u matrix of size N \Theta N . The method of proof will be to treat the compression algorithm as a linear transformation f , and then to show that f(Q n where f(Q u COMPRESSING PROBABILITY TRANSITION MATRICES 7 4.1. Row Equivalence and the Compression Algorithm. This subsection will prove that when two states are row equivalent, compression of those states can be described by a linear transformation (matrix multiplication). The compression algorithm compresses an N \Theta N matrix Q u to an . However, for the sake of mathematical convenience all of the matrix transformations will be with N \Theta N matrices. Without loss of generality it is assumed that states are being compressed. When it comes time to expressing the final compression, the Nth row and column will simply be ignored, producing the matrix. The "ffl" notation is used to denote entries that are not important for the derivation. Assume that states are row equivalent. Thus 8k pN Using Equation 3.1 to compute the row averages yields: and the compressed matrix should have the form: Theorem 4.1. If states N and are row equivalent then Q and can be expressed as follows: This is precisely what Q c should be. Thus the compression of two row equivalent states can be expressed simply as TQ u T . The first T performs row averaging (which is trivial) and the second T performs column summing. The reader will also note that some elements of T do not appear to be important for the derivation that Q This is true, however, the purpose of these elements is to ensure that I , since this fact will also be used to help prove that (Q n 8 W. M. SPEARS 4.2. Column Equivalence and the Compression Algorithm. This subsection will prove that when two states are column equivalent, compression of those states can be described by a linear transformation. Assume without loss of generality that states are column equivalent. Thus 8k Using Equation 3.1 to compute the row averages yields: and the compressed matrix should have the form: qpN \Gamma1;1 +pN;1 Theorem 4.2. If states N and are column equivalent then Q Y =4 I 0 I 0q can be expressed as follows: qpN \Gamma1;1 +pN;1 This is precisely what Q c should be. Thus the compression of two column equivalent states can be expressed simply as XQ u Y . X performs row averaging and Y performs column summing. The reader will note that some elements of X and Y are not important for the derivation that Q could be used instead of Y ). This is true, however, the purpose of these elements is to ensure that Y since this fact will be used to help prove that (Q n c at the end of this section. COMPRESSING PROBABILITY TRANSITION MATRICES 9 4.3. Some Necessary Lemmas. Before proving that (Q n c for row or column equivalent states, it is necessary to prove some simple lemmas. The idea is to show that if Q u is row or column equivalent, so is Q n u . This will allow the previous linear transformations to be applied to Q n u as well as Q u . Let square matrices A and B be defined as matrices of row and column vectors respectively: A =6 4 a a 1 Then the matrix product AB can be represented using dot product notation: Lemma 4.3. Row equivalence is invariant under post-multiplication. Proof: Suppose states i and j of A are row equivalent (a . So, states i and j in AB must be row equivalent. Lemma 4.4. Column equivalence is invariant under pre-multiplication. Proof: Suppose states i and j of B are column equivalent (b states i and j in AB must be column equivalent. Lemma 4.5. Row and column equivalence are invariant under raising to a power. Proof: . Thus, if states i and j are row equivalent in Q, they are row equivalent in Q n by Lemma 4.3. Similarly, Q states i and j are column equivalent in Q, they are column equivalent in Q n by Lemma 4.4. Lemma 4.5 indicates that the previous linear transformations can be applied to u to produce (Q n when two states in Q u are row or column equivalent. 4.4. Theorems for Perfect Compression. Given the previous theorems concerning the linear transformations and Lemma 4.5, it is now possible to state and prove the theorems for perfect compression. The Q matrix can be considered to be Q u in these theorems. Theorem 4.6. If Q is row equivalent, then Q r implies (Q n r , and c Proof: If Q is row equivalent, then so is Q n by Lemma 4.5. If Q r then r , and (Q n c . Theorem 4.7. If Q is column equivalent, then Q r implies (Q n r , and c Proof: If Q is column equivalent, then so is Q n by Lemma 4.5. If Q r then (Q n r , and (Q n c . These two theorems illustrate the validity of trying to force Q 2 u to be as similar as possible to Q u Q r in Section 3. Theorem 4.8. If Q is row equivalent, then (Q n c . Proof: If Q is row equivalent, then so is Q n by Lemma 4.5. Then (Q c . Theorem 4.9. If Q is column equivalent, then (Q n c . Proof: If Q is column equivalent, then so is Q n by Lemma 4.5. Then (Q c . These theorems hold for all n and for all row or column equivalent N \Theta N Q matrices, and highlight the importance of row and column equivalence. If two states are row or column equivalent, then compression of those two states is perfect (i.e., 5. Error Analysis and a Similarity Metric. The previous sections have explained how to merge pairs of states and have explained that row or column equivalent pairs will yield perfect compression. Of course, it is highly unlikely that pairs of states will be found that are perfectly row equivalent or column equivalent. The goal then is to find a similarity metric that measures the row and column similarity (i.e., how close pairs of states are to being row or column equivalent). If the metric is formed correctly, those pairs of states that are more similar should yield less error when compressed. This section will derive an expression for error and then use this as a similarity metric for pairs of states. We will use Q u to estimate error. As mentioned before, it is desirable to have the entries in those two matrices be as similar as possible. Consider compressing two states i and j. Then the entries in Q 2 are: The entries in Q are: a (2) Then the error associated with the (x; y)th element of Q is: Using Equation 3.1 for r fi-jg;k (and substituting y for Now denote ff i;j . This is a measure of the row similarity for rows and j at column y (and will be explained further below). Then: This simplifies to: Denote fi i;j COMPRESSING PROBABILITY TRANSITION MATRICES 11 Now fi i;j (x) can be considered to be a measure of column similarity for columns and j at row x (this will be shown more explicitly further down). Since only the magnitude of the error is important, and not the sign, the absolute value of the error should be considered: jError i;j (x; Recall that Error i;j (x; y) is the error associated with the (x; y)th element of states i and j are compressed. The total error of the whole matrix is: x y jError i;j (x; x y But this can be simplified to: x y jff i;j (y)j To understand this equation consider the situation where states i and j are row equivalent. Then 8y This indicates that 8y ff i;j Thus there is no error associated with compressing row equivalent states i and j, as has been shown in earlier sections. Consider the situation where states i and j are column equivalent. Then 8x qp x;j and m . It is trivial to show that 8x fi i;j and as a consequence there is no error associated with compressing column equivalent states i and j, as has been shown in earlier sections. Given this, a natural similarity metric is the expression for error: x y jff i;j (y)j If the similarity is close to zero then error is close to zero, and pairs of states can be judged as to the amount of error that will ensue if they are compressed. 4 The compression algorithm can now be written as follows: Compress() Repeat as long as possible (i) Find pair of states i and j such that Similarity i;j ! ffl. The role of ffl is as a threshold. Pairs of states that are more similar than this threshold can be compressed. By raising ffl one can compress more states, but with a commensurate increase in error. The paper thus far has fully outlined the compression algorithm for pairs of states, and identified situations under which compression is perfect - namely, when the pairs of states are row or column equivalent. By performing an error analysis, a natural measure of similarity was derived, in which pairs of states that are row or column similar yield small amounts of error in the compression algorithm. The following section outlines some experiments showing the degree of compression that can be achieved in practice. 4 It is useful to think of this as a "Dissimilarity" metric. 6. Some Experiments. In order to evaluate the practicality of the compression algorithm, it was tested on some Markov chains derived from the field of genetic algorithms (GAs). In a GA a population of individuals evolves generation by generation via Darwinian selection and perturbation operators such as recombination and mutation. Each individual in the population can be considered to be a point in a search space (see [8] for an overview of GAs). Each different population of the GA is a state in the Markov chain, and p i;j is the probability that the GA will evolve from one population i to another j, in one generation (time step). The number of states grows extremely fast as the size of the population increases and as the size of individuals increase. The details of the mapping of GAs to Markov chains can be found in [6]. Their use in examining transient behavior can be found in [2]. 5 6.1. Accuracy Experiments. The first set of experiments examine the accuracy of the compressed Markov chains by using both Q n c to compute the probability distribution p (n) over the states at time n. To answer such questions, Q n must be combined with a set of initial conditions concerning the GA at generation 0. Thus, the a priori probability of the GA being in state i at time 0 is p (0) . 6 Given this, the probability that the GA will be in a particular state j at time n is: It is also possible to compute probabilities over a set of states. Define a predicate red J and the set J of states that make P red J true. Then the probability that the GA will be in one of the states of J at time n is: In this paper, J represents the set of all states which contain at least one copy of the optimum (i.e., the set of all populations which have at least one individual with the optimum function value). The Markov model is used to compute p (n) J , the probability of having at least one copy of the optimum in the population at time n. The compression algorithm can thus be evaluated by using both Q n truth) and Q n c (the estimate) to compute p (n) J for different values of n. The closer the estimate is to ground truth, the better the compression algorithm is working. Since the goal is to compute probabilities involving states containing the optimum (the J set), J states should not be compressed with non-J states. Consequently, the compression algorithm is run separately for both sets of states. The algorithm is: Repeat until no new compressed states are created (a) For each state i in the J set of the current compressed model (i) Find the most similar state j in the J set. (ii) If Similarity i;j ! ffl, Compress-states(i,j). (b) For each state i in the non-J set of the current compressed model (i) Find the most similar state j in the non-J set. (ii) If Similarity i;j ! ffl, Compress-states(i,j). 5 For the GA, Q has no zero entries and is thus ergodic. 6 If states i and j have been compressed then p (0) fi-jg COMPRESSING PROBABILITY TRANSITION MATRICES 13 (n Search Space 1 (n Search Space 2 (n Search Space 3 (n Search Space 4 Fig. 6.1. p (n) J where ffl is 0.0 and 0.15 for 455. The bold curves represent the exact values, while the non-bold curves represent the values computed from the compressed matrix. In theory this compression algorithm could result in a two state model involving just J and non-J . In practice this would require large values of ffl and unacceptable error in p (n) J computations. Four different search spaces were chosen for the GA. This particular set of four search spaces was chosen because experience has shown that it is hard to get a single compression algorithm to perform well on all. Also, in order to see how well the compression algorithm scales to larger Markov chains, four population sizes were chosen for the GA (10, 12, 14, and 16). These four choices of population size produced Markov chains of 286, 455, 680, and 969 states, respectively. Thus, the compression algorithm was tested on sixteen different Markov chains. 7 Naturally, the setting of ffl is crucial to the success of the experiments. Experiments indicated that a value of 0.15 yielded good compression with minimal error, for all sixteen Markov chains. The results for are shown in Figure 6.1. The results for the other experiments are omitted for the sake of brevity, but they are almost identical. The values p (n) J are computed for n ranging from 2 to 100, for both the compressed and uncompressed Markov chains, and graphed as curves. The bold curves represent the exact p (n) J values, while the non-bold curves represent the values computed from the compressed matrix. The figures clearly indicate that the compressed matrix is yielding negligible error. To see how the amount of compression is affected by the size of the Markov chain, consider Table 6.1, which gives the percentage of states removed for each of the sixteen chains. What is interesting is that, for these particular search spaces, the amount of compression is increasing as N increases (while still yielding negligible error). For 80% of the states have been removed, yielding Q c matrices roughly 3% the size (in terms of memory requirements) of the original Q u matrix. It is also interesting to note that different search spaces are consistently compressed to different 7 See [2] for a definition of these search spaces. 14 W. M. SPEARS Table The percentage of states removed when Search Space 1 85% 88% 90% 92% Search Space 2 71% 76% 81% 84% Search Space 3 65% 73% 79% 82% Search Space 4 64% 73% 79% 82% degrees. For example, the third and fourth search spaces are consistently compressed less than the first search space. Further investigation into the nature of these search spaces may help characterize when arbitrary Markov chains are hard/easy to compress with this algorithm. 6.2. Timing Experiments. It is now necessary to examine the computational cost of the compression algorithm. Our prior work, [2] and [9], focused heavily on the insights gained by actually examining Q n u , which involved computations on the order of N 3 (to multiply Q u repeatedly). Thus, the primary motivation for producing the compression algorithm was to gain the same insights more efficiently by dramatically reducing N . Since the second search space is quite representative in terms of the performance of the compression algorithm, we draw our timing results from the experiments with that particular search space. Table 6.2 gives the amount of CPU time (in minutes) needed to compute Q n u as n ranges from 2 to 100. Table 6.3 gives the amount of time needed to compress Q u to Q c as well as the time needed to compute c as n ranges from 2 to 100. 8 Clearly, the compression algorithm achieves enormous savings in time when it is actually necessary to compute powers of Q u . Table The time (in minutes) to compute Q n Computation Time 27 125 447 1289 Table The time (in minutes) to compress Qu and to compute Q n c for Compression Time 0.2 0.9 3.0 9.5 Computation Time 2.4 7.6 17.9 38.1 Another common use of Q n u is to compute the probability distribution p (n) over the states at time n (as we did in the previous subsection). If the prior distribution p (0) is known in advance, however, this is more efficiently done by multiplying p (0) by repeatedly (i.e., this is repeated n times to produce p (n) ). The computation is of instead of N 3 . Table 6.4 and Table 6.5 give the amount of time needed to compute p (n) (from Q u and Q c respectively). Despite the obvious benefits of computing p (n) from Q c , the compression algorithm is not advantageous in this case since the time needed timing results are on a Sun Sparc 20. The code is written in C and is available from the author. COMPRESSING PROBABILITY TRANSITION MATRICES 15 Table The time (in minutes) to compute p (n) for Computation Time 0.1 0.3 0.7 1.4 Table The time (in minutes) to compress Qu and to compute p (n) for Compression Time 0.2 0.9 3.0 9.5 Computation Time 0.02 0.02 0.03 to compress Q u exceeds the time to produce p (n) from Q u . However, there are still occasions when compressing Q u and then using Q c to compute p (n) will in fact be more efficient. The first is when it is necessary to compute p (n) for a large number of different prior distributions (recall that Q c does not depend on the prior information and hence need not be recomputed). The second occasion is when it is necessary to compute p (n) for large n (e.g., [10] indicates that times on the order of 10 8 are sometimes required). In both of these situations the cost of the compression algorithm is amortized. Finally, compression is also advantageous when the prior distribution is not known in advance. 9 In summary, the compression algorithm is most advantageous when it is necessary to actually examine the powers of Q u directly. For computing probability distributions over the states, the compression algorithm will be advantageous if the prior distribution is initially unknown, if a large number of prior distributions will be considered, or if the transient behavior over a long period of time is required. 7. Related Work. The goal of this paper has been to provide a technique for compressing (or aggregating) discrete-time Markov chains (DTMCs) in a way that yields good estimates of the transient behavior of the Markov model. This section summarizes the work that is most closely related. There is a considerable body of literature concerning the approximation of transient behavior in Markov chains. Techniques include the computation of matrix expo- nentials, the use of ordinary differential equations, and Krylov subspace methods [10]. However, all of these techniques are for continuous-time Markov chains (CTMCs), which use an infinitesimal generator matrix instead of a probability transition matrix. It is possible to discretize a CTMC to obtain a DTMC such that the stationary probability vector of the CTMC is identical to that of the DTMC. However, [10] notes that the transient solutions of DTMCs are not the same as those of the corresponding CTMCs, indicating that these techniques will be problematic for computing the transient behavior of DTMCs. There is also considerable work in aggregation of DTMCs. Almost all theoretical analyses of aggregation (e.g., "block aggregation" [5]) utilize the same functional form: where A and B are matrices that determine the partitioning and the aggregation of the states [3] [4]. This functional form must satisfy two axioms: "linearity" and "state 9 It is also important to emphasize that it is very likely that the compression algorithm can be extensively optimized, producing much better timing results. W. M. SPEARS partitioning". Linearity implies that A and B do not depend explicitly on the entries in Q u . State partitioning implies that the "aggregated" transition probabilities should depend only upon the probabilities associated with the aggregated states (e.g., the aggregation of states i and j should only depend on p i;i , p i;j , p j;i , and p j;j ). Neither axiom is true for compression of column equivalent states in this paper. This is reflected in the fact that in general I . Instead, in this paper I for both row and column equivalence, yielding desirable properties with respect to the powers of Q u . The current results indicate that the relevance of both axioms should be re-examined. The aggregation technique most closely related to the work in this paper is described by [10], [11] and [12]. This aggregation technique partitions the set of states Denoting the steady state probability of state i as j2Sy If compression is performed in this manner, the steady state behavior of the compressed system is the same as the original system. The aggregated matrix can be computed via the method of "stochastic complementation" or via "iterative aggre- gation/ disaggregation" methods. The former will work on arbitrary matrices but is generally computationally expensive. The latter is most efficient for "nearly completely see [1]). However, the emphasis is always on steady-state behavior, and not on transient behavior. This difference in emphasis can been seen by noting the difference in the choice of weights - the focus in this paper has been on column mass instead of steady state values. In a sense the compression algorithm presented in this paper is a generalization of steady state aggregation. The steady state matrix is column equivalent for every pair of states, and the column masses, when renormalized, are the same as the steady state probabilities. Thus the compression algorithm is a generalization of the aggregation formula to transient behavior. 10 This leads to the intriguing hypothesis that this new compression algorithm will be more accurate when describing transient behavior, and less accurate for describing steady state behavior. Preliminary results appear to confirm this hypothesis. 8. Summary and Discussion. This paper has introduced a novel compression algorithm for probability transition matrices. The output from the algorithm is a smaller probability transition matrix with less states. The algorithm is designed to aggregate arbitrary (not necessarily NCD) probability transition matrices of DTMCs in order to obtain accurate estimations of transient behavior. Thus it appears to fill the gap between existing transient techniques (which focus on CTMCs) and existing aggregation techniques for DTMCs (which focus on steady-state behavior). There are a number of potential avenues for further expansion of this research. The first possibility is to compress more than two states at once. Multiple-state compression may yield better results, by allowing for a more accurate estimation of error. Another avenue is to derive estimates of how error propagates to higher powers of Q c . The current similarity metric is not necessarily a good indicator of the error at Note that Lemma 4.5 implies that if b COMPRESSING PROBABILITY TRANSITION MATRICES 17 higher powers of Q c , although empirically the results are quite good. However, both of these avenues greatly increase the computational complexity of the algorithm. The comparison with the related work indicates that this new compression algorithm can be considered to be a generalization of the more traditional aggregation formulas. This indicates yet a third avenue for research. If in fact column mass turns out to yield better weights for the weighted average during transient behavior, then it may be possible to smoothly interpolate between column mass and steady state probabilities as the transient behavior approaches steady state. Of course, this pre-supposes the existence of the steady state distribution, but efficient algorithms do exist to compute these distributions. The current algorithm also quite deliberately ignores the roles of the priors p (0) in order to have as general an algorithm as possible. However, if priors are known, then it may be possible to use this information to improve the weighted averaging procedure (see Appendix), thus once again reducing the error in some situations. Finally, the amount of compression that can be achieved with negligible error is a useful indicator of whether the system is being modeled at the correct level of gran- ularity. If the probability transition matrix is hard to compress, then the system is probably modeled at a reasonable level of granularity. However, ease of compression indicates that the system is being modeled in too much detail. In these cases monitoring the states that are chosen for compression by the similarity metric can yield important information about the characteristics of the system. This approach could be used to characterize systems that are defined by a probability transition matrix but are still not well understood at a higher level. Acknowledgements . I thank Diana Gordon for pointing out that a method for evaluating the compression algorithm was to show that (Q n c . Diana also pointed out sections that needed mathematical refinement. I also thank the anonymous reviewers for their very constructive comments. --R Using Markov chains to analyze GAFOs. Aggregation of Markov processes: axiomatization. Linear aggregation of input-output models Modelling genetic algorithms with Markov chains. A survey of methods for computing large sparse matrix exponentials arising in Markov chains. An overview of evolutionary computation. Analyzing GAs using Markov models with semantically ordered and lumped states. Introduction to the numerical solution of Markov chains. Numerical experiments with iteration and aggregation for Markov chains. Modeling simple genetic algorithms. --TR
lumping;transient behavior;probability transition matrix;aggregation;compression
300138
Using Generalized Cayley Transformations within an Inexact Rational Krylov Sequence Method.
The rational Krylov sequence (RKS) method is a generalization of Arnoldi's method. It constructs an orthogonal reduction of a matrix pencil into an upper Hessenberg pencil. The RKS method is useful when the matrix pencil may be efficiently factored. This paper considers approximately solving the resulting linear systems with iterative methods. We show that a Cayley transformation leads to a more efficient and robust eigensolver than the usual shift-invert transformation when the linear systems are solved inexactly within the RKS method. A relationship with the recently introduced Jacobi--Davidson method is also established.
Introduction . Suppose that a few eigenvalues near a complex number - and possibly corresponding eigenvectors of the generalized matrix eigenvalue problem are needed. Assume that both A and B are large complex matrices of order n: Also suppose that at least one of A or B is nonsingular so that equation (1.1) has eigenvalues. Without loss of generality, assume that B is invertible. Following standard convention, we refer to (A; B) as a matrix pencil. For us, n is considered large when it is prohibitive to compute all the eigenvalues as a dense algorithm in would attempt to do. A standard approach is to perform inverse iteration [17, p.386] with the matrix -B: The sequence of iterates is produced. Under some mild assumptions, the sequence converges toward the desired eigenvector with eigenvalue closest to -, and a Rayleigh quotient calculation gives an estimate of the eigenvalue. Another approach is to extract the approximate eigenpair by using the information from the subspace defined by joining together m iterates of the sequence (1.2). This leads to a straightforward extension [22] of the ideas introduced by Ericsson and Ruhe [13] for the spectral (shift-invert) transformation Lanczos method. Starting with the vector v, Arnoldi's method [2] builds, step by step, an orthogonal basis for the Krylov subspace Km One improvement to the inverse iteration scheme given is to possibly vary the at every step. For example, - j may be set to the Rayleigh quotient z H Az=z H Bz, where z is an unit vector in the direction of (T SI elegantly shows how to build an orthogonal basis for the rational Krylov subspace The work of R. B. Lehoucq was supported by the Mathematical, Information, and Computational Sciences Division subprogram of the Office of Computational and Technology Research, U.S. Department of Energy, under Contract W-31-109-Eng-38. The work by Karl Meerbergen was supported by the project Iterative Methods in Scientific Computing , contract number HCM network CHRC-CT93-0420, coordinated by CERFACS, Toulouse, France. y Mathematics and Computer Science Division, Argonne National Laboratory, Argonne, IL 60439 USA. Current address Sandia National Laboratories, MS 1110, P.O.Box 5800 Albuquerque, NM 87185-1110, rlehoucq@cs.sandia.gov. z LMS Numerical Technologies, Interleuvenlaan 70, 3001 Heverlee, Belgium, km@lmsnit.be R. B. LEHOUCQ AND K. MEERBERGEN The resulting algorithm is called a rational Krylov sequence (RKS) method and is a generalization of the shift-invert Arnoldi method where the shift is possibly varied during each step. All the methods considered require the solution of By for x: This is typically accomplished by factoring A \Gamma -B: For example, when A \Gamma -B is sparse, a direct method [7, 8, 9, 10, 12, 11] may be employed. If the shifts - j are not varied, then use of one of these direct methods in conjunction with ARPACK [21] is a powerful combination for computing a few solutions of the generalized eigenvalue problem (1.1). However, for large eigenvalue problems (n ? 10; 000), direct methods using the RKS method may not provide an efficient solution because of the potentially prohibitive storage requirements. The motivation for the current study is to investigate the use of iterative methods for the linear systems of equations arising in the RKS method. One benefit is that for the many eigenvalue problems arising from a discretization of partial differential equations, an intelligent preconditioner may often be constructed. We shall call these methods inexact RKS ones because we no longer have a rational Krylov space. In particular, we shall demonstrate that a Cayley transformation performs more robustly than a shift-invert transformation T SI using iterative methods for the linear solves. Before we continue, some remarks are in order. Although, combining an eigensolver (using one of the methods discussed previously) with an iterative method for the linear solves is not a new (or even novel) idea, what is generally not appreciated is that residuals of the linear systems must be small. To be precise, the matrix vector product must be applied so that kBu \Gamma where v is the approximate solution of the linear system and ffl M is machine precision. This is a necessary requirement for the correct representation of the underlying Krylov subspace. If the linear systems are not solved with the above accuracy, there is no guarantee that a Krylov space for T SI j has been generated. For example, if Arnoldi's method is used, there is no reason to expect that the Hessenberg matrix generated represents the orthogonal projection of T SI onto the Arnoldi vectors generated. If the above assumption of accuracy is violated (as is often the case), any results produced by such an eigensolver should be taken with caution. Fittingly, the literature on approaches for finding a few solutions to the generalized eigenvalue problem (1.1), where only approximate solutions to the linear systems are available, is sparse. Bramble et. al. [4], Knyazev [18], Knyazev et. al. [19], Morgan [25], and Szyld [42] each consider the situation where the matrix pencil is symmetric positive definite. (The papers [18, 19, 4] also contain numerous citations to the Russian literature.) Algorithms based on Jacobi-Davidson method [38] introduced by Sleijpen and van der Vorst are discussed in [14, 39]. In a recent report, Sorensen [41] discusses methods based on truncating a QZ iteration. The recent paper by Meerbergen and Roose [23] provided motivation for the current article. They demonstrate the superior numerical performance of a Cayley transformation over that of a shift-invert transformation within an Arnoldi method when using an iterative linear solver. Our article is organized as follows. We introduce the RKS method in x2. The inexact RKS method is introduced in x3 along with a connection with inverse iteration and some examples illustrating our ideas are presented. In x4, we illustrate our method for a generalized eigenvalue problem. In x5, we show that an appropriate (approximate) shift-invert transformation could be used. We compare inexact RKS and Jacobi-Davidson methods in x6. We conclude the paper in x7 with a summary INEXACT RATIONAL KRYLOV SEQUENCE METHOD 3 ffl Choose a starting vector v1 with ffl For 1. Select a pole - j , a zero - j 2. (continuation vector). 3. Form w / 4. Orthogonalize w 5. \Theta and ~ k 7. and ~ 8. Compute approximate eigenpairs of interest. 9. Check whether the approximate eigenpairs satisfy the convergence criterion. Fig. 2.1. Computing the Rational Krylov Sequence (RKS) for the matrix pencil (A,B) of the main ideas and some remaining questions. In this article, matrices are denoted by upper-case Roman characters. Vectors are denoted by lower-case Roman characters. The range of the matrix V is denoted by R(V The Hermitian transpose of the vector x is denoted by x will be introduced and employed in the next few sections. The norm k \Delta k used is the Euclidean one. 2. The Rational Krylov Sequence Method. The method is outlined by the algorithm listed in Figure 2.1. For the practical RKS algorithm given in [32], Ruhe considers the shift-invert transformation T SI In exact arithmetic, both transformations lead to the same rational Krylov space, because However, in finite-precision arithmetic and/or in conjunction with iterative methods for linear systems, substantial differences may exist (see [23] for examples). We call the - j 's the poles, the - j 's the zeros, and the 's the continuation vectors. A discussion on some possible choices is postponed until x3.2. This section will discuss some relationships among quantities in Steps 1-7, the form of Gram-Schmidt orthogonalization we employ, and finally the computation of approximate eigenpairs and their convergence. By eliminating w from Steps 2-5, we obtain the relationship \Theta h 1;j h 2;j \Theta t T . Rearranging Equation (2.2) results in By putting together the relations for we have that 4 R. B. LEHOUCQ AND K. MEERBERGEN where ~ h j and ~ t j are associated with the jth columns of ~ Hm and ~ Tm , respectively, and A final simplification is to rewrite Equation (2.3) as where ~ Tm and ~ We remark that as long as the sub-diagonal elements (the h j+1;j 's) are nonzero, both ~ Hm and ~ Lm are unreduced upper Hessenberg (rectangular) matrices and hence of full rank. 2.1. Orthogonalization. The orthogonalization of Step 3 of the algorithm in Figure 2.1 is performed using an iterative classical Gram-Schmidt algorithm. This is the same approach used by Sorensen [40] based on the analysis [5] of reorthogonaliza- tion in the Gram-Schmidt algorithm. 2.2. Computing Eigenvalue Estimates. We now consider the calculation of approximate eigenpairs for the RKS method and first discuss how to compute Ritz pairs. The main purpose of this article is to study the use of iterative linear system solvers in RKS and not the various ways to extract eigenvalues. Therefore, we use standard Ritz values throughout, though the theory can easily be extended to harmonic [32, 39] Ritz values. Consider a matrix C and a subspace R(X), where X 2 C n\Thetak is of full rank. The pair ('; y jXz) is called a Ritz pair of C with respect to the subspace R(X) if and only if This is referred to as a Galerkin projection. Two important properties of a Galerkin projection are the following. First, if R(X) j C n , the Ritz pairs are exact eigenpairs of C. Second, if C is normal, the Ritz values lie in the convex hull of the eigenvalues of C. For example, if C is Hermitian, the Ritz values lie between the smallest and largest eigenvalue of C. The following theorem shows how Ritz pairs may be computed from the RKS method outlined by the algorithm listed in Figure 2.1. Theorem 2.1. ('; y j Vm+1 ~ Lm z) is a Ritz pair for B \Gamma1 A with respect to only if ~ Lm z: Proof. Following the definition (2.6) and Equation (2.4), ('; y) is a Ritz pair when Lm Thus, (Vm+1 ~ and the desired equivalence with (2.7) follows. We denote by ' (m) i the i-th Ritz value available after m steps of the RKS algorithm of Figure 2.1. Unless otherwise stated, we assume that the Ritz values are in increasing distance from -m , that is, j' (m) j: The associated Ritz vector is denoted by y (m) The sub- and superscripts are omitted whenever their meaning from the context is clear. INEXACT RATIONAL KRYLOV SEQUENCE METHOD 5 2.2.1. Computing Ritz Pairs. The generalized eigenvalue problem (2.7) may be solved as a standard one. Since ~ Lm is an unreduced upper Hessenberg matrix, ~ Lm is of full rank, and hence ~ Lm is invertible. Thus, the standard eigenvalue problem ~ is solved giving the 1 - We remark that ~ m is the Moore-Penrose generalized inverse of ~ : The explicit formation of the inverse of ~ Lm is not required. Instead, ~ Km may be computed by least squares methods, for example with the LAPACK [1] software. The Ritz vector is y (m) Lm z (m) where 1: Sub- and superscripts are omitted when the context is clear. 2.3. Stopping Criterion. The accuracy of a Ritz pair ('; typically estimated by the residual norm kAy \Gamma By'k: From Equation (2.4), it follows that Lm )z (m) where g (m) Km z (m) Lm z (m) simple check for convergence of a Ritz pair in the algorithm in Figure 2.1 is when for a user-defined error tolerance tol. For any Ritz pair ('; y) it follows that (A+E)y = By', where Hence small relative to kB \Gamma1 Ak, then ('; y) is an eigenpair for a nearby problem. If ' is not a poorly conditioned eigenvalue of the matrix pencil and kB \Gamma1 k is not large, then the size of kgk indicates the accuracy of the computed Ritz value. This conclusion motivates us to say that the sequence of Ritz pairs (' (m) (fixed i) converges toward an eigenpair of Equation (1.1) if and only if kg (m) to zero as m increases toward n: Although this convergence is not rigorously defined (we necessarily have kg (n) does allow us to track the progress of a Ritz pair after step m of algorithm in Figure 2.1. 3. The Inexact RKS Method. At Steps 3-5 of the RKS algorithm in Figure 2.1 the Cayley transformation is computed by a two step process. First, the linear system is solved for w: Next, w is orthogonalized against V j , and the solution V j+1 ~ h j results. These two steps account for the largest source of errors arising when computing in floating-point arithmetic. Since our interest is in using a (preconditioned) iterative method for the solution of Equation (3.1), we neglect the errors in the Gram-Schmidt orthogonalization phase (but we assume that the columns of V j+1 are orthogonal to machine precision). 6 R. B. LEHOUCQ AND K. MEERBERGEN Let us formally analyze the errors arising from the solution of Equation (3.1). Let denote the computed solution and the associated residual. Thus, Here, ks j x H ks ks is a modest multiple of machine precision, we say that the direct method computes a backward stable solution. A robust implementation of a direct method gives a backward stable solution to a linear system. Note that even if a backward stable solution x j is in hand, it may share few, if any, digits of accuracy with w: Moreover, achieving such a backward stable solution with an iterative method may be prohibitively expensive. Therefore, we shall study the situation where a large backward error is allowed for the solution of the linear system. In order to give an indication of what we mean by large, a few words about iterative linear system solvers are needed. A linear system is said to be solved with a relative residual tolerance - when the solution, x, satisfies kb \Gamma Cxk -kbk for any b: Krylov methods [15, 34] are typically used. GMRES [35], BiCGSTAB(') [37], and QMR [16] are among those most widely used. See [3] for templates for all these solvers. The performance of these solvers substantially improves when a suitable preconditioner is employed. Hence what we mean by a large error is that 10 \Gamma8 - By putting all the s j for together in Sm j ; we have which we call an inexact rational Krylov sequence (I-RKS) relation. This relation may be rewritten as Km with where ~ m is the generalized Moore-Penrose inverse. In other words, we have computed an exact RKS for the pencil We caution the reader not to confuse the Em 's with the unsubscripted E's of x 2.3. Denote by oe Lm ) the reciprocal of the minimum singular value of ~ fore, if is large, then the Ritz pairs from x2.2.1 may not be those of a pencil near (A; B): This situation implies that even if we use a direct method for the linear systems, a nearly rank deficient ~ Lm might lead to inaccurate Ritz pairs. The matrix Em incorporates the backward error of the linear solution and is the distance to the matrix pencil We call the Ritz pairs for We now define and discuss a few quantities that will prove helpful in the discussion that follows. ffl Cayley residual s C this is the residual of the linear system (3.1) at step j of the rational Krylov method. ffl RKS residual f (j) the RKS method computes a Ritz pair (' (j) i and and so the RKS residual satisfies ~ INEXACT RATIONAL KRYLOV SEQUENCE METHOD 7 ffl Choose a starting vector v1 with ffl For 1. Select a pole - j . If j ? 1 set the zero - Otherwise, set 2. Compute the continuation vector r (j 3. Form by solving ae oe for x j and set 4. See steps 4-6 of the IC-RKS method listed in Figure 3.2. Fig. 3.1. Inverse iteration via the inexact RKS method. ffl True residual r (j) this is the residual defined by r (j) (The sub- and superscript of the true residual is dropped with those of f (j) These three residuals may be linked via the relationships that follow from Equation (3.2) and the definition (3.3) of present numerical evidence that demonstrates that although kf (j) k decreases in size for increasing j; r (j) does not decrease when an inexact shift-invert transformation is employed. However, when an inexact Cayley transformation is used instead, both kS j z (j) k and kf (j) k decrease and the size of the true residual also decreases. The continuation of this section is as follows. In x3.1, we present a relationship with inverse iteration that includes a theorem that shows the convergence for inexact inverse iteration. In x3.2, we fix the various parameters of the RKS method, i.e. the poles, zeros and continuation vectors. This selection makes a link with the generalized Davidson method [6, 25, 26]. In x3.3, an informal argument is given for the convergence of the inexact Cayley rational Krylov sequence (IC-RKS) method, described under x3.2, using the theoretical result from x3.1. We also illustrate this by a numerical example. 3.1. Inverse Iteration. We first exploit a direct relationship with inverse iteration that occurs with a special choice of the continuation vector when a Cayley transformation is used. An example is then presented that compares this choice with a shift-invert transformation. The subsection is concluded with a theorem that shows the numerical behavior observed is not just a fortuitous event. Although the choice of continuation vector does not exploit the entire space of vectors as in IC-RKS, the theorem justifies the superior properties of combining an approximate linear solve via a Cayley transformation. From Equation (2.2) and the matrix identity (2.1), it follows that Using (2.5) with ~ l 8 R. B. LEHOUCQ AND K. MEERBERGEN and hence V j+1 ~ l j is the linear combination of the columns of V j+1 obtained by performing one step of inverse iteration on the vector V j t j . An inductive argument easily establishes the following property. Lemma 3.1. If t Y is a scalar and v 1 is the starting vector of RKS. Lemma 3.1 indicates how to compute an approximate eigenvalue. If we denote ~ Equation (2.4) gives the Rayleigh quotient as an estimate of an eigenvalue without need to explicitly apply B An algorithm for inverse iteration is given in Figure 3.1. The approximate eigenpair on iteration j is (' so we can use the relationships (3.4) with z Recall that we used - (j \Gamma1) and . The entries ' (0) and v 1 determine the initial estimates for the eigenpair. We now compare inexact inverse iteration computed via the RKS method using the shift-invert and Cayley transformations with an example. Example 3.1. The Olmstead model [28] represents the flow of a layer of viscoelastic fluid heated from below. The equations are @t with boundary conditions the speed of the fluid and v is related to viscoelastic forces. The equation was discretized with central differences with gridsize 1=(n=2). After the discretization, the equation may be written as - The size of the Jacobian matrix We consider the Jacobian for the parameter values for the trivial steady state Thus, the interest is in the eigenvalue of largest real part. We ran the algorithm in Figure 3.1. The linear systems were solved by 20 iterations of Gauss-Seidel starting with a zero initial vector. Since this solver is stationary, the relative residual norm is almost constant. The initial guess for the eigenvalue was 0: The initial vector for RKS was n: The poles - j were set equal to 5 for all j: The residuals r (j) , f (j) and S j z (j) are shown in Table 3.1. All three sequences decrease when the Cayley transform is used. We redid the experiments using the shift-invert transformation. The results are also shown in Table 3.1. Both kS j z (j) k and kr (j) k stagnate near the same value. Note, however, that kf (j) k tends to zero. Table 3.1 shows that the true residual decreases when the Cayley transformation is used, but stagnates for the shift-invert transformation. The following result indicates what occurs under some mild conditions when performing inexact inverse iteration with either the shift-invert or the Cayley transformation. INEXACT RATIONAL KRYLOV SEQUENCE METHOD 9 Table Numerical results for inverse iteration on Example 3.1 using inexact Cayley and shift-invert transformations. The table shows the norms of true residual r (j) , S j z (j) , and the RKS residual The norm of ~ l j is also displayed for the Cayley transformation. Cayley shift-invert Theorem 3.2. Assume that there is an integer k - m and value fl ? 0 such that is the relative residual tolerance used for the linear solves (see equations (3.12) and (3.13)). If a Cayley transformation is used, then for kf and when a shift-invert transformation is used, Proof. With z it follows that ks j k=k ~ l j k ks For the Cayley transform, we prove (3.7) by induction on j. We clearly have that which satisfies (3.7) for k. Suppose that (3.7) holds for some integer From the hypothesis of the theorem, we have that Combining this with equations (3.9) and (3.12) results in ks (j \Gamma1) k: Using our inductive hypothesis on kr (j \Gamma1) k gives and (3.7) follows. For shift-invert, (3.8) follows from (3.9) and (3.13), which completes the proof. The theorem shows that if ae iteration computed via the Cayley transformation will produce a Ritz pair with a small direct residual. Since inexact inverse iteration can do no better than exact inverse iteration. Although, the term kf (j) k will decrease when using the shift-invert transformation, the size of the direct residual kr (j) k may stagnate. This occurs because the contribution from solving the linear systems inexactly (s SI j ) to the true residual is constant. When a direct method is used for the linear system of equations, - is a multiple of machine precision. Hence, whether a shift-invert or Cayley transformation is used, the true residual kr (j) k decreases at a rate proportional to ae: For the exact Cayley transformation, we have and ~ l 1. Hence, we have Thus, converges to zero, then 1 \Sigma tends to one for increasing j: Computation reveals that quite often k ~ l j k - 1 after a very small number of steps. This also holds for inexact inverse iteration, because it can be seen as exact inverse iteration applied to B), as Table 3.1 demonstrates. Hence, for large enough k, and the convergence rate of inverse iteration using the Cayley transform is approximately ae As the method progresses, ae is easily estimated and thus the largest relative residual tolerance that may be used is also easily estimated. 3.2. Choosing a Pole, Zero and Continuation Vector. A robust and efficient strategy for selecting the poles during the RKS method is a subject of research. The present situation is further complicated because we employ approximate methods for the linear solves. Since we are more concerned in showing that use of ~ K k and ~ for the computation of Ritz pairs, a fixed pole is used for the numerical experiments. The choice of the zero of the Cayley transformation is crucial for computing a Ritz pair with a small direct residual. This was demonstrated by the numerical examples in [23]. We first formally analyze the choice of the zero and continuation vector and then give an example. Suppose that (' (j \Gamma1) ; y (j \Gamma1) ) is an (inexact) Ritz pair computed during the j-1st step of an (inexact) RKS method. We select the zero - (j \Gamma1) and contination vector of interest. For a Cayley transformation, this leads to while a shift-invert transformation gives (3. INEXACT RATIONAL KRYLOV SEQUENCE METHOD 11 ffl Choose a starting vector v 1 with kv 1 ffl For 1. Select a pole - j . If j ? 1 set the zero - (j \Gamma1) . Otherwise, set - 2. Compute the continuation vector r (j residual). 3. Form w / 4. See steps 4-7 of the RKS method listed in Figure 2.1. 5. Solve the eigenvalue problem ~ 6. Check whether the approximate eigenpairs satisfy the convergence criterion Fig. 3.2. Computing eigenvalues of the pencil (A; B) by the inexact Cayley rational Krylov sequence (IC-RKS) method as the linear systems to be solved. Although both transformations use the same continuation vector, the Cayley transformation also uses the Ritz value for its zero. The only difference in the two linear systems (3.10) and (3.11) is the righthand side. When a preconditioner is used to solve the linear system (3.10), we have a generalization of Davidson's method [6, 26] for computing eigenvalues of a matrix pencil. Denote the computed solutions to (3.10) and (3.11) by x C j and x SI If an iterative method with relative residual tolerance - is used for the two linear systems, then the residuals of the linear systems satisfy ks C ks SI for the Cayley and shift-invert transformation, respectively. (We drop the superscripts that denote whether a Cayley or shift-invert transformation when the context is clear.) In view of the two bounds (3.12) and (3.13) on the computed solutions, a Cayley transformation is preferred over a shift-invert transformation. It appears that use of a Cayley transformation leads to better results with inexact linear solvers when the zero and continuation vector are chosen as in (3.10). Our experimental results also support this conclusion. The algorithm in Figure 3.2 lists an inexact Cayley RKS method (IC-RKS). We now illustrate a few properties of this algorithm by means of an example that demonstrates: (1) the inexact rational Krylov method is not a Galerkin projection method; (2) the method can only compute one eigenvalue at a time, just as in Davidson methods. Example 3.2. Consider the matrices (A; I) has eigenpairs (j; e j 5: The goal is to compute the smallest eigenvalue 1 and corresponding eigenvector e 1 with IC-RKS method using a fixed pole 0:7. The starting vector is set equal to v 5: The Cayley system 12 R. B. LEHOUCQ AND K. MEERBERGEN is solved as x Note that M simulates a stationary iterative solver with residual tolerance which implies that f (5) 5: Thus, the computed eigenpairs are exact eigenpairs of A+E 5 : We found that 1:0000 0:0120 \Gamma0:0697 0:3708 \Gamma0:4728 \Gamma0:0000 1:9987 \Gamma0:5981 4:4591 \Gamma5:6013 \Gamma0:0001 0:1003 0:4666 17:1897 \Gamma21:1757 \Gamma0:0002 0:0340 \Gamma4:4220 36:8172 \Gamma40:7251 and has eigenpairs 1:0000 0:0000 0:0000 0:0000 0:0000 0:9812 \Gamma0:1801 \Gamma0:0177 \Gamma0:1340 0:9229 0:3188 0:1681 0:0045 \Sigma 0:0068i \Gamma0:0826 \Sigma 0:7214i the true residual has the form r (5) This example shows that E 5 is nearly rank deficient and that the desired eigenvector of (A; I) is nearly its nullvector. Therefore, the desired eigenvalue, in this case, can be computed with a small true residual. It should be noted that the perturbation E 5 is small in the direction of only one eigenspace, hence IC-RKS is not able to compute several eigenvalues simultaneously. This is not the situation when the linear systems are solved more accurately with, for instance, a direct method. In this example, IC-RKS computes the exact eigenpairs of A steps. In general, however, r (5) because the inexact Ritz pair is not computed from a Galerkin projection with A: We also remark that ' (5) 4 and ' (5) 5 are non-real and this would not be the case with a Galerkin projection because A is a real symmetric matrix. This is in contrast with other iterative eigenvalue solvers, such as Arnoldi and Jacobi-Davidson methods where Galerkin projections with A are employed. 3.3. Inexact Rational Krylov. We now informally discuss the algorithm listed in Figure 3.2 including a comparison with inexact inverse iteration of the previous section. From (3.5) with the Ritz vector y (i\Gamma1) computed as in x 2.2.1, it follows that INEXACT RATIONAL KRYLOV SEQUENCE METHOD 13 Table Numerical results for the Olmstead model of Example 3.3. The table shows the order of accuracy for the residual norm of the rightmost Ritz pair, the norm of S j z (j) , and the first four components of z (j) . Numerical experiments reveal that the j-th component of z (j) is large relative the components (see Table 3.2). This is because the best approximation of the desired eigenvector among the columns of V j+1 ~ L j is given by V j+1 ~ l j -the improvement of the previous Ritz vector by one step of inverse iteration. Thus, using the continuation vector V i ~ should give better results because information in the subspace R(V i+1 ~ used. Inexact inverse iteration only uses information in the space spanned by the last column of V i+1 ~ The inexact Ritz pairs (' (i) ; y (i) ) lead to true residuals r (i) if the Cayley transform is used. The Cayley residual on iteration i satisfies ks i k -kr (i\Gamma1) k. The true residual on the jth iteration is decomposed as r ks gives an upper bound to kS j z (j) k. In the right-hand side, ks i k is independent of j and can be quite large for small i. However, because je T typically forms a decreasing sequence for increasing j, we have a decreasing sequence kS j z (j) k: Example 3.3. We now discuss an example for which e T z (j) and S j z (j) tend to zero in the IC-RKS method. The matrix arises from the same problem as in Example 3.1, but now We ran Algorithm IC-RKS from Figure 3.2 with fixed starting with vector n: The linear systems were solved by GMRES preconditioned by ILU. The number of iterations of GMRES was determined by the relative error tolerance, which was selected as shows the residual norm and the norm of the error term S j z (j) . Both kS j z (j) k and tend to zero. For large j, kS j z (j) k - kr (j) k. This is the case because f (j) converges more rapidly to zero than S j z (j) . Table 3.2 also illustrates the fact that decreases for a fixed i and increasing j. 4. A Numerical Example. This example illustrates the use of inexact rational Krylov methods for the solution of a generalized eigenvalue problem. We also make a comparison between inexact inverse iteration with the Cayley transform and IC-RKS. The simulation of flow of a viscous fluid with a free surface on a tilted plane, leads, with a finite element approach, to an eigenvalue problem singular matrix. The computation of the eigenvalue nearest \Gamma10 is of interest. Since our theory is valid only for nonsingular 14 R. B. LEHOUCQ AND K. MEERBERGEN Table Numerical results for the tilted plane problem from x 4. The methods used are inexact rational Krylov (IC-RKS) and inverse iteration with the Cayley transform. On iteration j, ' (j) is the inexact Ritz value, s j the Cayley residual, and g IC-RKS (Fig. 3.2) Inverse Iteration (Fig. 3.1) ks ks 9 B, we interchange the role of A and B by computing the eigenvalue nearest The fact that B is singular implies that is an eigenvalue. It has been shown that the presence of this eigenvalue can disturb the calculation of a nonzero eigenvalue when the shift-invert Arnoldi method [29, 24], or the rational Krylov method [36] are used. One way to reduce the impact of is to start the IC-RKS method with an initial vector v 1 that is poor in the eigenspace corresponding to This can be achieved by selecting arbitrary. The eigenvalue fl nearest \Gamma0:1 was computed by use of IC-RKS (Fig. 3.2) with fixed pole - \Gamma0:1. The linear systems were solved by GMRES preconditioned with . The initial vector v 1 was computed from the system using the GMRES-ILUT solver. The algorithm was stopped when kr (j) The numerical results are shown in Table 4.1 for inexact rational Krylov (IC- RKS) and inexact inverse iteration using the Cayley transform. First, note that kf (j) k - kAkkg (j) k, so kg (j) k does not measure the RKS residual (see also (2.8)). Also note that for both IC-RKS and inverse iteration, the sequences kr (j) k, ks j k and decrease. Both methods converge to Finally, note that IC-RKS is faster than inverse iteration. 5. A relation between inexact shift-invert and Cayley transforms. In the previous section, we showed that the inexact rational Krylov method can be used for the computation of eigenvalues of a matrix pencil. The example shows a substantial difference in convergence behavior between the shift-invert and Cayley transforma- tions. In this section, we show that an appropriate shift-invert transformation may also be employed. During each step of IC-RKS, the following relationship results where s j is the residual of the linear system that is approximately solved. Rearranging (5.1) and adding - j By (j) to both sides gives the equivalent shift-invert system INEXACT RATIONAL KRYLOV SEQUENCE METHOD 15 Hence, if the zero vector is used as the initial guess for the iterative method for linear systems approximately solved via the Cayley transform, \Gammay (j) should be used for the shift-invert transformation formulation. Assume that - is a constant and that IC-RKS converges to some eigenpair. From (3.13), it follows that when shift-invert is used, convergence to the same eigenpair is attained for decreasing - (as j increases). In the context of inexact inverse iteration, Lai, Lin and Lin [20] also observe that the approximate linear system solver requires an increasingly tighter tolerance on the residual (of the linear system) as the number of inverse iterations increases. In contrast, a Cayley transformation allows us to use a fixed tolerance on the linear system residual. 6. A Connection with the Jacobi-Davidson Method. We now show a connection between the Jacobi-Davidson [14, 39, 38] and RKS [32] methods. Consider the linear system (j \Gamma1) is a Ritz vector of interest. This amounts to selecting the jth continuation vector t (j \Gamma1) as in the Algorithm IC-RKS in Figure 3.2 with associated Ritz value ~ The right-hand side in (6.1) is then the residual of the eigenpair (~- j ; y j ) and is orthogonal to y j . Since we are interested in expanding our search space (the span of the columns of V j ), multiply both sides of Equation (6.1) by the projector I \Gamma By Using the fact that results in By the component of w in the direction of y j does not play a role when w is added to the subspace R(V j ). Thus, we are interested in finding only the component of w orthogonal to y j and so the linear system By is solved instead. The Jacobi-Davidson method calls Equation (6.2) the correction equation. Suppose that x j is a computed solution of Equation (6.2) with residual s j , given by By where s j is orthogonal to y j . Rewrite (6.3) with d j The orthogonality of y j with d and with s j leads to (6. R. B. LEHOUCQ AND K. MEERBERGEN Choosing the zero - between the Jacobi-Davidson and RKS methods when Cayley transformations are used. When " j is computed, the solution of the Jacobi-Davidson correction equation x can be inserted in the RKS method. Note that, although, the Ritz vector y j is orthogonal to the right-hand side of the Jacobi-Davidson correction equation (6.2), y j is not orthogonal to the right-hand side of (6.4). An advantage of the inexact rational Krylov method is that the matrices ~ and ~ K j do not require the explicit application of A and/or B as needed as in the Jacobi-Davidson method. An efficient implementation of the Jacobi-Davidson method requires dot products (the first elements in the last row of V H We caution the reader to conclude that the Jacobi-Davidson method is an expensive variant of IC-RKS because it fits an IC-RKS framework. A detailed numerical comparison of the two methods requires examining the respective rates of convergence and ability to obtain relative residual reductions during the linear solves. This is the subject of future work. 7. Conclusions. This paper studied the use of approximate linear solves within Ruhe's rational Krylov sequence method. The analysis of the convergence of inexact inverse iteration showed the importance of using the Cayley transformation instead of the usual shift-invert transformation, when the linear systems are solved with a given relative residual tolerance. A theoretical link between the inexact rational Krylov method that uses generalized Cayley transformations and the Jacobi-Davidson methods was drawn resulting in a connection between the correction equation and a Cayley transformation. We called the eigenpairs computed by IC-RKS inexact Ritz pairs, because they are Ritz pairs for a perturbed RKS method. The classical properties of Galerkin projection are lost due to this inexactness. Since IC-RKS solves a perturbed problem, the application of techniques developed for the RKS method (using approximate linear solves) may be employed. These techniques include the use of complex poles and zeros for real A and B [31], harmonic Ritz pairs, deflation and purging [32, 36], and the implicit application of a rational filter [36]. Acknowledgments The authors thank Dirk Roose for the financial support that allowed the first author to visit second author. This visit initiated the collaboration that lead to this article. The authors also thank Gorrik De Sambanx, Gerard Sleijpen and the referees for helpful comments and suggestions that improved the quality of the article. In particular, one of the referees provided numerous contructive criticisms that improved the quality of the presentation. --R The principle of minimized iterations in the solution of the matrix eigenvalue problem. Templates for the solution of linear systems: Building blocks for iterative methods. A subspace preconditioning algorithm for eigenvector/eigenvalue computation. Reorthogonalization and stable The iterative calculation of a few of the lowest eigenvalues and corresponding eigenvectors of large real symmetric matrices. An unsymmetric-pattern multifrontal method for sparse LU factor- ization A combined unifrontal/multifrontal method for unsymmetric sparse matrices. A supernodal approach to sparse partial pivoting. ME28: A sparse unsymmetric linear equation solver for complex equations. The design of MA48 The design of a new frontal code for solving sparse unsymmetric systems. The spectral transformation Lanczos method for the numerical solution of large sparse generalized symmetric eigenvalue problems. Iterative solution of linear systems. QMRPACK: A package of QMR algorithms. Matrix computations. Convergence rate estimates for iterative methods for mesh symmetric eigenvalue problem. The preconditioned gradient-type iterative methods in a subspace for partial generalized symmetric eigenvalue problem An inexact inverse iteration for large sparse eigenvalue problems. ARPACK Users' Guide: Solution of Large Scale Eigenvalue Problems with Implicitly Restarted Arnoldi Methods. Matrix transformations for computing rightmost eigenvalues of real nonsymmetric matrices. The restarted arnoldi method applied to iterative linear system solvers for the computation of rightmost eigenvalues. Implicitly restarted Arnoldi with purification for the shift-invert transformation Davidson's method and preconditioning for generalized eigenvalue problems. Generalizations of Davidson's method for computing eigenvalues of large non-symmetric matrices How to implement the spectral transformation. Bifurcation with memory. Improving the spectral transformation block Arnoldi method. Rational Krylov sequence methods for eigenvalue computation. The Rational Krylov algorithm for nonsymmetric eigenvalue problems Rational Krylov tool kit for sparse matrix computations. Iterative Methods for Sparse Linear Systems. GMRES: A generalized minimal residual algorithm for solving nonsymmetric linear systems. The implicit application of a rational filter in the rks method. A Jacobi-Davidson iteration method for linear eigenvalue problems Implicit application of polynomial filters in a k-step Arnoldi method Truncated QZ methods for large scale generalized eigenvalue problems. Criteria for combining inverse and Rayleigh quotient iteration. --TR --CTR Tsung-Min Hwang , Wen-Wei Lin , Wei-Cheng Wang , Weichung Wang, Numerical simulation of three dimensional pyramid quantum dot, Journal of Computational Physics, v.196 n.1, p.208-232, 1 May 2004
arnoldi method;rational Krylov sequence;eigenvalues;cayley transformation;generalized eigenvalue problem
300160
Consistent Initial Condition Calculation for Differential-Algebraic Systems.
In this paper we describe a new algorithm for the calculation of consistent initial conditions for a class of systems of differential-algebraic equations which includes semi-explicit index-one systems. We consider initial condition problems of two types---one where the differential variables are specified, and one where the derivative vector is specified. The algorithm requires a minimum of additional information from the user. We outline the implementation in a general-purpose solver DASPK for differential-algebraic equations, and present some numerical experiments which illustrate its effectiveness.
Introduction . This paper is concerned with the calculation of initial conditions for systems of differential-algebraic equations (DAEs). We write the DAE system in the general form G(t; G, y, and y 0 are N-dimensional vectors. The initial value problem for this system is the problem of finding a solution that satisfies a consistent set of initial conditions y(t 0 . Two software packages have been written for solving initial value problems for the DAE system (1.1)-DASSL [2], and an extension of it called DASPK [7]. Both use variable-order, variable- stepsize backward differentiation formulas. DASSL solves the linear system at each time step by dense or banded direct linear system methods. In DASPK, the linear systems that arise at each time step are solved with either direct linear system methods, or with a preconditioned Krylov iterative method, namely GMRES [16]. For large-scale systems, the iterative method combined with a suitable preconditioner can be quite effective. When using either of the solvers DASSL or DASPK, the integration must be started with a consistent set of initial conditions y 0 and y 0 . Consistency requires, in particular, that G(t 0 ; y Usually, not all of the components of y 0 and y 0 are known directly from the original problem specification. The problem of finding consistent initial values can be a challenging task. The present DASSL and DASPK solvers offer an option for finding consistent y 0 0 from a given initial y 0 , by taking a small artificial step with the Backward Euler method. However, initialization problems do not always arise in this form, and even for the intended problem type, that technique is not always successful. In any case it is unsatisfactory in that it produces values at than at . In this paper, we propose an alternative procedure for a class of DAE problems. We will show that this method, in combination with the modified Newton methods of DASSL or the Newton-Krylov methods of [5] and [6], yields an algorithm which converges nearly as rapidly as the underlying Newton or Newton-Krylov method. The new method is very convenient for the user, because it makes use of the Jacobian or preconditioner matrices which are already required in DASSL or DASPK. The consistent initialization problem has been studied in [1, 8, 9, 12, 13, 15, 14] for more general DAE systems than we will consider here. However, none of these algorithms offer the simplicity or convenience of the approach which we develop here. This research was supported in part by the Applied Mathematical Sciences subprogram of the Office of Energy Research, U.S. Dept. of Energy, by Lawrence Livermore National Laboratory under contract W-7405-ENG-48. y Center for Computational Sciences & Engineering, L-316, Lawrence Livermore National Laboratory, Livermore, California 94551. z Department of Computer Science, University of Minnesota, Minneapolis, MN 55455. The work of this author was partially supported by ARO contract number DAAL03-92-G-0247, DOE contract number DE-FG02-92ER25130, NIST contract number 60NANB2D1272, and by the Minnesota Supercomputer Institute. The class of problems that we consider is a generalization of semi-explicit index-one DAE systems. Semi-explicit index-one DAE systems are characterized as follows. The dependent variable vector y can be split into a vector u of size N d , called the differential variables, and a vector v of size N a , called the algebraic variables, such that the equations have the form in which g v = @g=@v is a nonsingular square matrix. We will be concerned with the initialization problem of finding the initial value v 0 of v when the initial value u 0 for u is specified. We can easily generalize the class of problems considered, to those where the ODE subsystem for u may be implicit. Thus we consider systems of the form where with the matrix f u being square and nonsingular. We will continue to refer to problems of the form (1.3), with f u 0 and g v nonsingular, as semi-explicit index-one, even though they may be not be explicit in u 0 . In fact, our main initialization technique applies to an even more general class of problems, as we will explain later. We also consider a second type of initialization problem, in which the initial derivatives are specified but all of the dependent variables are unknown. That is, we must solve for y 0 given y 0 For example, beginning the DAE solution at a steady state corresponds to specifying y 0 problem does not involve a split of the y vector into differential and algebraic parts or a semi-explicit form for the equations. In later sections, we will refer to these two problems as Initialization Problem 1 and Initialization Problem 2. 2. The Basic Method. The central idea of this paper is to solve both of these initial condition problems with the help of mechanisms already in place for the solution of the DAE system itself, rather than requiring the user to perform a special computation for it. Consider first Initialization Problem 1 for the semi-explicit index-one system (1.3), where v is to be determined, given u at the initial point We expand this problem to include the calculation of u 0 Thus we can form a nonlinear system in the N-vector namely This general approach of solving the expanded problem has also been used in [12]. A Newton iteration for the solution of F would require the Jacobian matrix f By assumption, this matrix is nonsingular, at least in a neighborhood of the desired solution. In the course of integrating a DAE system with DASSL or DASPK, the user must call upon one of several linear system algorithms to solve N \Theta N linear systems at every time step. These arise from a Newton-like method for solving algebraic systems G(t; y, where a is a vector containing past values, and c is a constant, set by the solver, that is inversely proportional to the stepsize h. Thus the linear systems have the form in which R is a residual vector, \Deltay is a correction to y, and the matrix J is the DAE system iteration matrix @y The user is encouraged to supply an approximation to J , for use either as the Newton matrix itself in the case of direct methods, or as a preconditioner in the case of a Krylov method. In the direct case, J is generated by difference quotient approximations if not supplied by the user. In the case of the system (1.3), we have f f cf In order to make use of J in solving F we pick an artificial stepsize h, and set in (2.5). Then, to recover the block f u 0 , we rescale the first block-column of J by h, using the scaling matrix I a where I d and I a are the identity matrices of size N d and N a , respectively. Thus we consider the matrix hg evaluated at . Note that - f Thus if h is small in some appropriate sense, we can expect that - J will be a good approximation to F 0 (x). The proposed initialization procedure is to carry out a Newton-like iteration with corrections Each iteration will call on the linear system solution procedure that is to be used later in solving the DAE system itself. It will also require information about which components of y are differential and which are algebraic, in order to apply the correction \Deltax to the vectors y and y 0 . But otherwise, the procedure requires no additional information or methodology. Upon convergence, we have all components of y(t 0 ), and we have the components of y corresponding to u 0 0 , the derivatives of the differential variables. The remaining components of y corresponding to v 0 simply be set to zero, as the integration procedure is insensitive to these (since v 0 does not appear in (1.3)) 1 , 1 Although the BDF formulas do not depend on these values, the error test at the end of the first step depends on them, unless the v variables are excluded from the error test (which is an option in the code). and the first time step will produce accurate values for them. The next two sections will present this procedure in a more formal manner and prove convergence for it. For Initialization Problem 2, we are given the initial value of y 0 and must compute the initial y. In this case, we are simply interested in solving for in the system with y 0 We assume that this problem is well-posed as provided by the user, so that F 0 G y is nonsingular in a neighborhood of the solution, including the initial guess supplied. As in the first problem, we will call for the user to supply the DAE iteration matrix J , but this time we set so that the matrix involved is simply there is no stepsize h. We then proceed with Newton iterations using J , with corrections \Deltay Finally, we remark that an extension of these ideas to Hessenberg index-2 DAE systems is under way by the authors. 3. More General Problems. In the case of Initialization Problem 1, the full scope of problems for which the above idea can be applied is more general than systems of the form (1.3). 0 and satisfies F The true Jacobian is F 0 and is approximated by - suitably small. 3.2. Permuted variables. We wish to generalize the system (1.3) first by dropping the requirement that the differential and algebraic components are separated into blocks in y. Thus we assume there is a permutation matrix P of size N such that while in terms of z the system function G has the form The vector of unknowns in terms of z is and in terms of y it is In order to express the objective function F (x) precisely, we introduce two projections in R N , I d 0 I a These satisfy the help of these projections, we can write I a I a and P a y I a That is, P a y a x is a vector containing the unknown algebraic components (corresponding to Similarly, vector containing the unknown derivative components (corresponding to u 0 where. The known components of y 0 comprise a vector and so we can write y x. The fact that G does not depend on v 0 means that G(t; Thus the system to be solved in x is In the same way, we need not require that the components of G are blocked as in (3.2). Thus we allow a permutation Q in the components of G, such that QG has that blocked form. Then of course so does QF . However, we can work with G (hence F ) in its original ordering, in the initialization procedure. 3.3. Implicit constraints. To generalize further the form of the problem we can solve, suppose that, after permuting the y vector to z = Py, the DAE system function G has the form G(t; having full rank N d : This class of problems generalizes (1.3) and (3.2) in that the algebraic constraints, g(t; u; (1.3), need not be identified explicitly. For systems of this form, we can again define the projection matrices P d and P a by (3.5), and it again is true that G(t; We define the vectors w and x by (3.3) and (3.4) as before, and the system to be solved is now with y before. The Jacobian of this function is Knowing that H u 0 has full rank, there is a nonsingular matrix M such that MH A 1' with A 1 a square nonsingular matrix of size N d . Then and the fact that the index is one implies that B 2 is nonsingular near the consistent initial value (see x2.5 of [2]). Thus @w and so F 0 is nonsingular. On the other hand, the Jacobian being supplied (or approximated) by the user is Taking before, and recalling the scaling matrix S defined by (2.6), the corresponding scaling in x is I a Thus we find Comparing (3.10) and (3.12), we again expect - J to work well as an approximation to F 0 (x) in a modified Newton iteration to solve F The corrections to x now take the form where It is the class of problems given by (3.8) that we take as the scope of Initialization Problem 1, for which we have implemented the algorithm described above. 3.4. General index-one systems. Note that (3.8) does not include all fully-implicit index- one DAEs, because the rank and dependency conditions combined exclude certain index-one sys- tems. A simple example is the system This has index one, and it is well-posed for any given value of y 1 (t 0 ). But it does not fit into the scheme of (3.8), because it contains the derivatives of both variables, and the rank of the 2 \Theta 2 matrix H y 0 is only 1. In principle, this scheme can be applied to more general index-1 DAE systems by allowing P to be a more general matrix, not just a permutation. If a constant nonsingular matrix P can be found that transforms y into full rank, as in (3.8), then G(t; defined by (3.5). The vector x and function F (x) can be defined by (3.4) and (3.9) as before, in which y 0;d is defined from the input vector y 0 as P d y 0 , as in (3.6). The Jacobian F 0 and the approximation - again satisfy (3.10) and (3.12). Thus our procedure will still work, as long as the problem supplied by the user is well-posed. However, in contrast to the case where P is a permutation, once a solution vector x is found, the vector y may differ from y 0;in in all of its components. For the example system above, an appropriate matrix P is making . With this choice, we have and P If the input initial value of y 2 differs from g 2 (t 0 ), both components of y 0 would be altered by the procedure. On the other hand, if preserving y 1 approach would have to be used. The procedure with more general constant P determines a consistent set of initial conditions only in the sense that the initial values of the transformed variables are consistent. Initial values for the derivatives of the original variables may not be consistent. For example, in the system 2 is initialized correctly, whereas y 0 1 or y 0 2 individually can only be determined if information about the constraint derivative g 0 2 (t) is available [13]. For the most general index-1 systems, Due to the complications and expense of finding such a smooth P and continuing with this change of variables in later time steps, we have chosen not to implement this extension of our algorithm, instead restricting P to the class of permutation matrices. If necessary, the user may be able to bring the problem to the form (3.8) by a change of variables as described above. 4. Convergence Theory. In the case of Initialization Problem 1, given by (3.8)-(3.9), the question of convergence of the Newton or modified Newton iteration arises. Here we give a convergence analysis for the iteration. The theorem below includes both full and modified Newton iteration for the same problem, where "full" refers to the fact that the approximate Jacobian is evaluated at every iteration. We first prove the main convergence result (Theorem 4.1 below), and then discuss its applicability to the initialization problems of Sections 2 and 3. In the last subsection, we comment on the use of Newton-Krylov iteration to solve the above initialization problems. 4.1. Newton iteration convergence. We consider the convergence of the x iteration and we include both types of Newton iterations by taking ae x k for full Newton iteration, or - x for modified Newton iteration x is fixed. The function F (x) is a general function here, and it is assumed that there exist smooth matrix-valued functions - J(x; h) and C(x) such that - h of interest. The following theorem says that this iteration converges under mild smoothness assumptions on the functions F and C. The norm k \Delta k used here is arbitrary. Theorem 4.1. Let F : R N ! R N be continuously differentiable in an open convex set D ae R N . Assume that (a) there exists x 2 D such that F (x (c) there exists ae ? 0 such that the neighborhood N(x condition in N(x ; ae) with constant fl; and (d) there exist matrix-valued functions - J(x; h) and C(x), for all h - 0 and x 2 D, related by with C(x) satisfying a Lipschitz condition in N(x ; ae) with constant fl c . Then there exist constants ffl ? 0 and - h ? 0 such that for x h, and any - x 2 N(x ; ffl) in the modified Newton case, the sequence generated by (4.1) is well-defined and converges to x . Under these conditions, the iterates obey )k. In the full Newton case, and in the modified Newton case, The proof is an extension of the proof in Dennis and Schnabel [11], p. 90, which treats the full Newton case with exact Jacobian. The main complication is due to the inaccuracy in the iteration matrix. Before giving the proof, we give three lemmas that will be useful. In all three, the hypotheses of the theorem are assumed. Lemma 4.2. If ffl - minfae; 1=(2fifl)g, - Proof. First, note that by the Lipschitz condition on F 0 , Then, by the perturbation relation (3.1.20) in Dennis and Schnabel [11], p. 45, F 0 (-x) is nonsingular and Lemma 4.3. If ffl - minfae; 1=(2fifl)g, then for any - Proof. By Lemma 4.2, we have using (4.3) we have Again, by the perturbation relation (3.1.20) in [11], - J(-x; h) is nonsingular and Lemma 4.4. For ffl - minfae; 1=(2fifl)g, Proof. We have The norm of the first term is bounded by xk using Lemma 4.3 and the Lipschitz condition on F 0 . The second term is bounded by 4hfiC 0 since kC(-x)k - C 0 as in the previous lemma. Proof of Theorem 4.1. We will derive the recurrence (4.4), which gives linear convergence in all cases, and q-superlinear convergence in the limit as Let ae oe Then by Lemmas 4.2 and 4.3, F 0 (x) and - J(x; h) are both nonsingular with h. The value of ffl is also a measure of the nonlinearity of the problem. We will prove the bound (4.4) by induction on the iteration number k. For 0 - h - h and any well-defined and we have Of the two terms in the final equation (4.6), the first is bounded using Lemma 4.1.12 of Dennis and Schnabel [11], p. 75, which says that kF (x the norm of the first term is bounded by 2fiflkx . The second term can be bounded using Lemma 4.4, which gives a bound of 4fi(flkx on the norm of the matrix coefficient. Thus we obtain and we have shown (4.4) for Note that since - x 0 and x 0 are both in N(x ; ffl), we have using (4.5), we have and so the Jacobian - well-defined and nonsingular. The general induction step goes exactly as with we obtain which is (4.4). Again, we have Thus x showing that the iteration is well-defined. The fact that gives the linear convergence of the sequence fx k g. 2 4.2. Application to DAE systems. As explained in Section 2, our central objective is to solve both of the initial condition problems with the help of mechanisms already in place for the integration of the DAE system itself. The general time step within the DASSL and DASPK solvers involves the solution of linear systems J \Deltax = R in which the matrix is the DAE system iteration In order to use values of J inside a Newton or modified Newton iteration for solving the nonlinear problem F must derive a relationship between the Jacobian matrix F 0 (x) and J . We have the following lemma, which generalizes similar relationships derived in earlier sections. Lemma 4.5. Assume there exists a projection matrix P d such that G(t; Define the projection matrix P a j I \Gamma P d and the function F (x) by with y 0;d given. We then have for all x. Proof. From (4.11), we have Next, with all the partial derivatives evaluated at all (t; This then proves the lemma. In DASPK, starting from input initial guesses y 0 and y 0 corresponding initial value of x is x We pick a suitably small value of h, set 1=h, and define J(x; h) to be the matrix in Lemma 4.5, which satisfies (4. with Note that - so in the Newton iteration (4.1) based on - J(x; h), the correction is In DASPK, when direct methods are selected, then J(t; supplied by the user (possibly in approximate form), or generated by difference quotients, and J \Gamma1 is realized by the LU method. In this case, 0 ) is fixed, and therefore (4.14) represents a modified Newton method Theorem 4.1 can be applied to this iteration. If one assumes differentiability of G with respect to y and y 0 , and that the partial derivatives of G with respect to y and y 0 are locally Lipschitz continuous, then for well-posed initialization problems of the type discussed in Sections 2 and 3, it is clear that the assumptions of the theorem hold. Thus, the iteration on x will converge given h small enough and a good enough initial guess x 0 . 4.3. Newton-Krylov iteration. When using a Newton-Krylov iteration to solve the initialization problems of Sections 2 and 3, we use preconditioned GMRES as the linear iteration with finite-difference approximations involving G(t; to approximate the action of J on an arbitrary vector, and the preconditioner approximates J \Gamma1 . Once GMRES computes an approximate solution p k such that small enough, the step \Deltax k is given by \Deltax This then implies that small. The reason finite differences of G are used above (instead of F ) is that the GMRES solver in DASPK uses finite differences of G to approximate J times an arbitrary vector for the DAE time step. Thus, we are able to apply machinery that is already available, and the user only need be concerned with J , not F 0 . Because of the relationship between - J and F 0 given by Lemma 4.5, it is also clear that a good preconditioner for J will suffice in the iteration. The above considerations lead us to consider the convergence of the following inexact Newton iteration for a general function F (x), where for with 1. In the general inexact Newton setting, the manner in which the step increment s k is computed is unimportant. We only need to know that such an s k can be found. Once again, we assume there exist smooth matrix-valued functions - J(x; h) and C(x) such that - of interest. The following theorem says that this iteration converges under mild smoothness assumptions on the functions F and C. Theorem 4.6. Let F : R N ! R N be continuously differentiable in an open convex set D ae R N . Assume that conditions (a)-(d) of Theorem 4.1 hold. Then there exist constants ffl ? 0 and - such that for x h, and any 0 - 1, the sequence generated by (4.15) is well-defined and converges linearly to x . Proof. Since the assumptions (a)-(d) of Theorem 4.1 hold, we can choose ffl and - h as in (4.5). Thus, for x h, we have - is nonsingular, the existence of an s 0 satisfying guaranteed. Given such an s 0 , we have ks Hence, it follows that ks 1, we can choose h smaller (if necessary) so that j +4fi(1+j)hC 0 ! 1. With the residual norm condition (4.16) on s 0 , the rest of the proof follows along the lines of the proof of Theorem 2.3 in Dembo et. al. [10]. 5. The Linesearch Algorithm. In order to improve the robustness of the Newton algorithm discussed above, we also employ a linesearch backtracking algorithm. Consider a general function Let x and ffi in R N be such that the residual norm condition holds, where is the Euclidean norm. The vector ffi can be thought of as an approximate solution of the Newton equations F 0 obtained using either a direct solve with an approximate Jacobian or an iterative method such as GMRES. Given such a ffi , it is shown in Brown and Saad [6] that ffi is a descent direction for f at x, i.e., that Given ffi a descent direction for f at x, we employ the following backtracking algorithm. Algorithm 5.1: Given 1. 2. If f(x exit. Otherwise, go to the next step. 3. Choose - 2 [' min -; ' max -], set - -, and go to step 2. The global convergence of this algorithm used in connection with an inexact Newton iteration is discussed at length in [6]. The simplest choice for the ''s is to take ' 1=2, and this makes -=2. We use this choice in the implementation here, and also use so that only a small decrease in f is required. Given f defined in (5.1), we have and so in the above algorithm if ffi is the exact Newton step at x, i.e., Hence, in this case and the condition in Step 2 of Algorithm 5.1 is simply Next, if is the GMRES solution at the m-th step when applied to F 0 then it is shown in [5] that and the condition in Step 2 of Algorithm 5.1 is In the present context, we want to solve the nonlinear system F by (2.9) or (3.9). However, we have no direct measure on the size of the F that is directly available. The weighted root-mean-square (WRMS) norm used in DASPK for norms of y suggest that we solve instead the problem where the matrix A is the current approximate system Jacobian matrix J of (2.4) in the direct case, or the preconditioner P in the Krylov case, and D is a diagonal matrix containing the weights to be used in the WRMS norm. Thus, ~ F is just the square of the WRMS norm of A \Gamma1 F . In either case, it is likely that ~ F (x) is well-scaled in the WRMS norm. The direction vector ffi that is available to us is the Newton correction given by (2.10) or (3.13). Thus S from (3.12) in the case of Initialization Problem 1, or - in the case of Initialization Problem 2. In both cases, we expect - but the question arises then as to whether or not ffi will be a descent direction for ~ F at the current approximate solution x. An easy calculation gives using ~ if we can assure that - I is small, it follows that ffi will be a descent direction for ~ F at x. 6. Implementation. We implemented the algorithms described above for Initialization Problems 1 and 2 as new options in the general-purpose DAE solver DASPK [7]. Initialization Problem 1 has been implemented for the more general class of index-one systems described in Section 3.3. Here we will give a few details concerning the implementation, and describe briefly how to use the new options. We will assume here that the reader is familiar with the use of DASSL and DASPK. Detailed descriptions of those solvers can be found in [2] and [7], respectively. These solvers normally require the initial t, y, y 0 to be consistent. Within the dependent variable vector Y in DASPK, we denote by Y d the differential variables, and denote by Y a the algebraic variables. By specifying the input parameter INFO(11), DASPK will solve one of the following two initialization problems: Initial values are already consistent (default). Given Y d , calculate Y a and Y 0 d . If this option is specified, the user must identify for DASPK the differential and algebraic components of Y. This is done by setting (for I is a differential variable, and is an algebraic variable. 2. Solve Initialization Problem 2: Given Y 0 , calculate Y . In either case, initial values for the given components are input, and initial guesses for the unknown components must also be provided as input. The algorithm for Problem 1 requires an initial stepsize or scaling, h, to determine As a first approximation, we try the initial stepsize h 0 which is used by DASSL and DASPK ([2], p. 128). Since we do not know in advance if this value is small enough to achieve convergence of the modified Newton iteration, we set up a loop, starting with . If the initialization fails, we divide h by 10. If the initialization fails for MXNH (nominally = 5) different values of h, the code returns an error flag to the user program. In our experience, if the initialization succeeds, it usually succeeds with the initial choice h 0 . For Initialization Problem 2, we always set there is no such loop on h. In either case, once the initialization has been completed, we reset the initial stepsize h 0 for the first step of DASPK based on the newly computed initial values, using the formula in [2]. For a given value of c, the initialization problem is solved with either a modified Newton method or an inexact Newton method [10] similar to that used in the general time step. It has been augmented by the linesearch algorithm described above for improved global convergence. In both the case of Initialization Problem 1 as given in Eq. (3.9), and Problem 2 as given by Eq. (2.9), we must solve a system where F (x) is the residual of the DAE system at t 0 , y, y 0 , and x represents the variables for which we are solving. A Jacobian matrix (or preconditioner matrix, in the Krylov case) is obtained either by finite-difference approximations or by calling a user subroutine to calculate the Jacobian, depending on the option specified. The routines to specify the DAE and the Jacobian/preconditioner are exactly the same ones which are needed for the time integration. The Newton iteration is given in terms of an approximation to the system Jacobian J by where - is the relaxation steplength (0 ! - 1) from the linesearch algorithm given in Section 5. (For Initialization Problem 2, the scaling matrix - S is absent.) The code is organized so that the Newton solver is independent of which initialization problem is being solved. After a vector has been calculated, a separate routine is called to construct and apply the increment \Deltax as follows: ffl For Problem 1, we increment y 0 by \Gamma-P a p and increment y 0 0 by \Gamma-cP d p. ffl For Problem 2, we increment y 0 by The meaning of J in (6.2) depends on the choice of methods. In the case of direct methods, the value of J is the approximation to the system Jacobian evaluated (by difference quotients or user-supplied routine) at the start of the iteration. Then the evaluation of J involves a call to a back-substitution routine. In the case of Krylov methods, however, J refers to the exact system Jacobian at the current values of y and y 0 , and J \Gamma1 F (x) is evaluated by a call to a routine for the preconditioned GMRES method [16]. This makes use of the preconditioner P supplied by the user, evaluated at the start of the iteration. In both cases, the inaccuracy of the fixed approximation (J or P ) to the system Jacobian is an additional potential cause of difficulty for the Newton iteration. The complete algorithm actually involves three loop levels for Problem 1, and two levels for Problem 2. At the innermost level, up to MXNIT Newton iterations are performed with a given value of h and a given value of the Jacobian or preconditioner. The iteration is considered to have converged if the scaled residual is small in norm: ae where A is the current approximate system Jacobian J in the direct case, and the preconditioner matrix P in the Krylov case. Here the test constant EPCONI is is the tolerance for the Newton iteration in the subsequent time steps, and EPINIT is a "swing factor" nominally equal to 0.01. The norm used throughout is the weighted root-mean-square (WRMS) norm in which the weights are formed from the user-supplied tolerances (see [7]). The values ae m from the mth iteration are used to infer a convergence rate, If convergence is not achieved in MXNIT iterations, the strategy for repeated attempts depends on RATE. If convergence failed, but RATE - 0:8 (the iterations are converging, but slowly), then we retry the Newton iteration with the current values of y and y 0 and a new value for A (i.e. for J or P ), up to a limit of MXNJ such attempts. In addition, in the case of the Krylov method, if the GMRES solver failed to converge after at least two Newton iterations, but RATE 1, the Newton iteration is retried with a new value for P . If the limit of MXNJ retries is reached, we reduce h and retry the iteration (again with a new A and the current y and y 0 ) in the case of Problem 1, or give up and return an error flag in the case of Problem 2. If convergence of the inner Newton iteration failed but RATE ? 0:8 (or some other recoverable failure occurred), we retry the iteration with a reduced value of h and the initial y and y 0 (Problem 1) or give up (Problem 2). The total number of iterations performed can therefore be as large as MXNH*MXNJ*MXNIT in Problem 1, and MXNJ*MXNIT in Problem 2. Currently we have set We have set the case of direct methods, and in the case of Krylov methods. However, all four of these controls are optional inputs to DASPK, so that a user may specify different values. In addition, an option is provided to turn off the linesearch algorithm. Actually, an additional level of logic has been added around the initialization algorithm described above. The reason for it is that the error weights involved in all convergence and error tests depend on the current solution vector: Thus, while the initialization algorithm may have succeeded using the weights evaluated at the initial guess, those weights may differ greatly from the updated values using the converged y vector. Since updating the weights at every iteration seems rather extreme, we have adopted the following scheme: With weights set using the input y vector, the initialization algorithm is called, and if it succeeds, we update the weights and call it a second time. If it again succeeds, we update the weights again, and proceed to the first time step. If either initialization fails, an error flag is returned to the user. In the case of the Krylov method, on the second initialization call, the preconditioner is not updated unless and until there is a convergence failure. 7. Numerical Experiments. We tested the initialization algorithm on several problems and found that it performed much as expected. In the course of development and debugging, we used a simple index-one system of size 2, having a known analytic solution. For both the first and second initialization problem types, and for a wide range of initial guesses, the initialization algorithm converged within the limits imposed, for both the direct and Krylov method options. All attempts to integrate the system without the initialization option failed except when the initial values were consistent. For a more realistic test, we used a model of a multi-species food web [3], in which mutual competition and/or predator-prey relationships in a spatial domain are simulated. Here we consider a 2-species model, species 1 being the prey and species 2 being the predator, and with the predator assumed to have an infinitely fast reaction rate. Specifically, the model equations for the concentration vector are: with The interaction and diffusion coefficients (a could be functions of (x; general. The choices made for this test problem are as follows: and The domain is the unit square 10. The boundary conditions are of homogeneous Neumann type (zero normal derivatives) everywhere. The coefficients are such that a unique stable equilibrium is guaranteed to exist when derivatives appear in the equations for species 2 [3]. Empirically, a stable equilibrium appears to exist for (7.1) when ff and fi are positive, although it may not be unique. In our tests on this problem we take and 100, for which there is considerable spatial variation in the solution. The PDE system (7.1), together with the boundary conditions, was discretized with central differencing on an L \Theta L mesh, as described in [7]. We have taken which is quite sufficient for accurate spatial resolution. The resulting DAE system G(t; Y; Y 0 The tolerances used were were run on a Sun Sparc-10 workstation. 7.1. Initialization Problem 1. In the tests on this problem reported in [7], the initial conditions were taken to be mildly peaked functions that nearly satisfy the constraint equations: ae The predator value c determined by the equation f 2 (x; is an approximate quasi-steady state (QSS) value. The original DASPK solver has no difficulty with this problem, without further adjustment of the initial values. However, we expect that in a typical application of this type it is impractical to find such accurate initial values. So for our tests, we will prescribe a flat value predas the initial guess in the input Y array, and invoke the new algorithm for Initialization Problem 1. For the present problem parameters, the QSS values of c 2 at time are all within 10% of so we vary c pred We will report here only tests with the Krylov method (GMRES) option in DASPK, and as a preconditioner we use a product of a spatially-based factor and a reaction-based factor. In the notation of [7], this is given by Here R and S are (respectively) the reaction and diffusion terms of the right-hand side of the DAE system, so that the problem has the form G(t; Y; Y 0 I I 1 is the identity matrix with 0 in place of 1 in positions corresponding to the components c 2 ). The spatial factor in P SR consists of 5 Gauss-Seidel iterations, and the reaction factor uses difference quotient approximations for the diagonal blocks. For the DASPK input parameters relating to the Krylov method, default values were specified. In Table 7.1 below, we summarize the results of the DASPK tests with the new initialization algorithm incorporated in it. For each value of c pred (with QSS denoting the values in (7.6)), the tabulated quantities are: number of Newton iterations in the initial condition calculation number of linear iterations in the initial condition calculation total number of Newton iterations to complete the integration total number of linear iterations to complete the integration total number of residual evaluations to complete the integration. The numbers NNI0 and NLI0 measure the cost of the initialization algorithm, while NNI, NLI, and NRE measure the total cost of solving the problem. Convergence (to correct values) in the initialization was achieved at a very reasonable additional cost for pred Evidently, the convergence region for the initialization of this problem is strongly skewed to the high side, but does permit errors of at least 40% on the low side. In the case c pred the algorithm converged, but to the value c which corresponds to a solution that is valid but different from the one of interest here. For comparison, when the initial condition calculation option was not selected, only the QSS initial values were successful, and in that case the total cost figures were 709. These are slightly larger than with the initialization, indicating that even the approximate QSS values from (7.6) are somewhat in error. The unmodified DASPK solver, when run with its initial condition option on, was also unable to solve any case except the QSS initial values, and in that case the total costs were 971. The failed cases either halted in the initialization algorithm, or (when the initialization option was off) failed in the first time step with either repeated corrector convergence failures or repeated error test failures. 2 On the basis of experience with these tests, however, we have changed the default value of NRMAX, the maximum number of GMRES restarts, from 2 to 5. c pred failed in I.C. calculation Table Test results for new initialization algorithm on food web problem 7.2. Initialization Problem 2. In these tests, we specify the initial time derivatives y 0 to be 0, i.e., we are posing the steady-state problem for (7.1). Since we have no explicit time-dependence in the right-hand sides, once the consistent initial values are determined, the solution to the DAE problem is constant in time. This type of problem is much harder than Initialization Problem 1, because of the absence of the time derivative operator. Moreover, the preconditioners devised in for the DAE problem itself are less useful here. We first describe tests using the direct method. These specified a banded Jacobian, generated internally by difference quotients, where the two half-bandwidths are equal to simplicity, the initial guesses for the discrete c i values were taken to be spatially flat values with prey Because the subsequent time integration is not an issue here, we stopped it at We performed tests for a variety of values of ff and fi, revealing, as in the case of Problem 1, a nontrivial region of convergence in each case. Table 7.2 below (upper half) gives the results for the case where the tabulated counter NNI0 is defined as before. Convergence is achieved with no difficulty (always using the full Newton step) for (at least) the values prey In an interval about c prey and in the interval c prey the algorithm fails to find a solution. In an interval about c prey converges to an incorrect solution (that has negative values of c i ). In an interval about c prey converges to the correct solution, but with difficulty, in that the linesearch algorithm must choose vales of - ! 1. For reference, we note that the true steady state values of c 1 in this case range from 9.9 to 66. For this 2-D problem, using a Jacobian with the full bandwidth is quite costly. In an attempt to reduce costs, we also tested with half-bandwidths equal to 1, corresponding to an approximate Jacobian that ignores the diffusion terms. However, the results were completely unsuccessful. The resulting lumped tridiagonal preconditioner is evidently too inaccurate. In considering tests with the Krylov method for this problem, the choice of a preconditioner is problematical. In terms of the form I the true Jacobian for the steady state problem is Since the initialization algorithm sets user-supplied preconditioner, the choice P SR of (7.7) used for Problem 1 is undefined. We therefore use \GammaR Y , a block-diagonal matrix involving only the reaction Jacobian elements. We again tried a variety of values of ff and fi, and provided flat initial guesses (7.8). However, for the larger values of these parameters, it was found that convergence of the GMRES iteration was much slower than in the case of Initialization Problem 1. This is to be expected, since the diffusion terms contribute significantly to the system but are completely absent in the preconditioner. In order to achieve convergence, we therefore increased the Krylov subspace parameters over their default values, setting the maximum size of the Krylov subspace (MAXL) to 20, and the number of GMRES restarts allowed (NRMAX) to 19. This allows a total of 400 GMRES iterations on each linear system. For values of c prey the algorithm appears to fail, while for values of prey (at least), it converges to the correct solution. c prey linear method NNI0 NLI0 Notes direct - fails in I.C. calculation direct 11 - incorrect solution direct 11 - linesearch min direct - fails in I.C. calculation 50 direct 11 - direct 11 - direct 12 - 50 Krylov - fails in I.C. calculation Table Test results for food web problem, Initialization Problem 2 In all of the cases tabulated, we compared the computed solution vector from the initialization algorithm with that from a more accurate solution with the direct method, integrated with tighter tolerances to is virtually at steady state. All of the values from the Problem 2 tests had errors less than the tolerances imposed. For example, for prey the maximum relative error observed was about Users of DASPK should be cautioned that Initialization Problem 2 is more difficult than Initialization Problem 1, and that some extra effort may be necessary. By comparison with Problem 1 and with the time integration, convergence of the algorithm for Problem 2 is more sensitive to the initial guess and to the quality of the approximate Jacobian J or preconditioner P . If the J or P used in the time steps is a good approximation only in the limit c ! 1 as was the case in the Problem 1 food web tests, a different preconditioner for the steady-state initialization problem (where should be seriously considered. The user can easily determine in JAC and PSOL whether the preconditioner has been called for a steady-state initial condition calculation because the parameter CJ will be equal to zero (it is nonzero in any other situation) and branch accordingly to the appropriate preconditioner. --R Developing Software for Time Dependent Problems using the Method of Lines and Differential-Algebraic Integrators Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations Decay to Uniform States in Food Webs A Local Convergence Theory for Combined Inexact-Newton/Finite-Difference Projection Methods Hybrid Krylov Methods for Nonlinear Systems of Equations Convergence Theory of Nonlinear Newton-Krylov Algorithms Using Krylov Methods in the Solution of Large-Scale Differential-Algebraic Systems Consistent Initial Conditions for Linear Time Varying Singular Systems A Computational Method for General Higher-Index Nonlinear Singular Systems of Differential Equations Numerical Methods for Unconstrained Optimization and Nonlinear Equations A Shooting Method for Fully-Implicit Index-2 Differential-Algebraic Equations Approximation Methods for the Consistent Initialization of Differential-Algebraic Equations Zur Theory und Numerischen Realisierung von L-osungmethoden bei Differentialgleichungen mit Angekoppelten Algebraischen Gleichung The Consistent Initialization of Differential-Algebraic Systems GMRES: A Generalized Minimal Residual Algorithm for Solving Nonsymmetric Linear Systems --TR --CTR Alan C. Hindmarsh , Peter N. Brown , Keith E. Grant , Steven L. Lee , Radu Serban , Dan E. Shumaker , Carol S. Woodward, SUNDIALS: Suite of nonlinear and differential/algebraic equation solvers, ACM Transactions on Mathematical Software (TOMS), v.31 n.3, p.363-396, September 2005 C. T. H. Baker , C. A. H. Paul , H. Tian, Differential algebraic equations with after-effect, Journal of Computational and Applied Mathematics, v.140 n.1-2, p.63-80, 1 March 2002 D. A. van Beek , V. Bos , J. E. Rooda, Declaration of unknowns in DAE-based hybrid system specification, ACM Transactions on Modeling and Computer Simulation (TOMACS), v.13 n.1, p.39-61, January
differential-algebraic equations;consistent initial conditions
300162
An Efficient Newton-Type Iteration for the Numerical Solution of Highly Oscillatory Constrained Multibody Dynamic Systems.
In this paper we present a coordinate-split (CS) technique for the numerical solution of the equations of motion of constrained multibody dynamic systems. We show how the CS technique can be implemented within the context of commonly used solution methods, for increased efficiency and reliability.A particularly challenging problem for multibody dynamics is the numerical solution of highly oscillatory nonlinear mechanical systems. Highly stable implicit integration methods with large stepsizes can be used to damp the oscillation, if it is of small amplitude. However, the standard Newton iteration is known to experience severe convergence difficulties which force a restriction of the stepsize. We introduce a modified coordinate-split (CM) iteration which overcomes these problems. Convergence analysis explains the improved convergence for nonlinear oscillatory systems, and numerical experiments illustrate the effectiveness of the new method.
Introduction The equations of motion of a constrained multibody system can be written as [10] are the generalized coordinates, - 1 , - 2 , ., -m ] are the Lagrange multipliers, M(q) 2 IR n\Thetan is the mass-inertia matrix, f 2 IR n is the force applied to the system, - dt is the velocity and - is the acceleration vector. The constraints are m smooth functions of q, whose Jacobian is assumed of full row-rank. We assume that G(q)M(q)G T (q) is symmetric and positive definite for every q 2 IR n to obtain a consistent physics represented by (1.1). The degrees of freedom for the system (1.1) is Equation (1.1) is a well-known index-3 DAE [3, 13]. Many methods have been proposed for modeling multibody systems. Direct numerical integration of the index-3 DAE (1.1) suffers from the well-known difficulties inherent in the solution of high-index DAEs [13]. One way to lower the index involves introducing derivatives of the constraint g(q), along with additional Lagrange multipliers -. This yields the stabilized index-2 or GGL formulation of the constrained equations of motion [8] which has been widely used in simulation. The Lagrange multiplier variables - and - fulfill the role of projecting the solution onto the position (1.3d) and the velocity (1.3c) constraints, respectively. Equations (1.3) and related systems have been solved by a variety of methods. Here we will consider solution by implicit numerical methods such as BDF or RADAU. A closely related approach is based on explicitly projecting the numerical solution onto the constraints [18, 20, 22, 23] and involves many of the same issues for the implementation that are considered here. Many of the numerical methods for multibody systems solve the system (1.3) directly. It is also possible to eliminate the Lagrange multipliers and reduce the size of the system to the number of degrees of freedom. One way to accomplish this begins with the stabilized index-2 system (1.3). Suppose that G(p) is full-rank on the constraint manifold 0g. Then one can find an annihilation matrix P (q) 2 IR (n\Gammam)\Thetan such that P (q)G T Premultiplying (1.3a) and (1.3b) by P (q) yields an index-1 DAE There is a potential gain in efficiency for this formulation due to the size-reduction of the nonlinear system, compared to (1.3). An important practical consequence of (1.4) is that (-) have been eliminated from the DAE, via multiplication of (1.3a, 1.3b) by the nonlinear P (q). Thus, the error test and Newton iteration convergence test in a numerical implementation of (1.4) no longer need to include (-). These higher-index variables can cause problems in the direct numerical solution of (1.3). One could in principle also consider removing (-) from the test in the solution of (1.3), however it is not usually possible to justify this action, particularly in the case of the Newton convergence test. Elimination of these variables from the Newton convergence test in the solution of (1.3) can lead to a code which sometimes produces incorrect solutions. It is the fact that multiplying by the nonlinear P (q) eliminates (-) from the nonlinear system, which allows these variables to be excluded from the tests in the solution of (1.4). Direct numerical solution of presents some challenges. First we must have a means of generating P (q) which is reliable and cheap. Further, we note that the Jacobian matrix for the Newton iteration involves complicated terms which arise from the derivatives of P (q). We need a means of generating the Jacobian matrix. Finally, practical issues such as the error test and Newton convergence test must be considered. Our approach for obtaining a cheap representation of P (q) is based on a coordinate- splitting of the variables. A widely-used method which is related in the sense of also making use of a splitting of the coordinates is the generalized coordinate partitioning method [22]. In order to obtain the independent generalized coordinates, the Jacobian G is calculated at an assembled configuration q and an LU-decomposition of G is carried out to identify a nonsingular m \Theta m sub-matrix GY , where such that X 2 IR n\Thetap and Y 2 IR n\Thetam . The columns of X and Y constitute the Cartesian basis for IR n . The implicit function theorem assures that the dependent variables y can be uniquely determined by the constraint g(q), at least locally, as a function of the remaining generalized coordinates x, i.e., thus are declared to be independent coordinates. The twice differentiable function arbitrary x in some neighborhood of the assembled configuration. Differentiating twice the constraints (1.1c) with respect to time, then multiplying (1.1b) by GM \Gamma1 and substituting for G - v from the twice differentiated constraints to solve for -, we obtain dGv dq Substituting the solution -(q; v) into (1.1), and eliminating the dependent variables y, - y, and - y, yields n-m differential equations dh dx which is a state-space form representation of (1.1) [7, 14]. However, this differs substantially from the approach we outline here because P (q) associated with this method is not orthogonal to G T (q). Hence the index-reduction by differentiating the constraints and projecting to the invariant space must be carried out explicitly. In particular, this requires forming the derivative of the velocity constraints (i.e., the acceleration constraints) explicitly. Another method for (1.4) has been proposed by [9, 18, 19, 20], where P (q) is chosen to be an orthonormal basis of the local tangent space of the constraint manifold. Choosing a smoothly varying P (q) is required and may cause some practical difficulties. Direct numerical solution of (1.4) via our coordinate-split approach yields an efficient and reliable method for solving equations of motion for most multibody mechanical systems. However, there is a class of multibody systems which present additional computational challenges. These are the problems with high-frequency nonlinear os- cillations. Highly oscillatory components are often used to model devices with strong potential energy. Typical examples of such problems arise from modeling flexible multibody mechanical, and molecular dynamic systems. For many problems, oscillations of a sufficiently small amplitude are not important for the model, but they severely restrict the stepsize for numerical methods. For these types of problems, stiffly stable implicit numerical integration methods can be used to damp out the oscillation [17]. However, the stepsize may still be severely restricted due to difficulties in converging the Newton iteration for larger stepsizes. We have studied this class of oscillating problems in [24]. The solutions are composed of a low-amplitude high-frequency oscillation around the smooth solution [17, 21]. Along the smooth solution, the eigenstructure of the local Jacobian matrix varies smoothly. However, along the solutions which are nearby to the smooth solution, the local eigenstructure oscillates with the high frequency, and is very badly behaved. The standard Newton iteration inside a damping numerical method starts from a predictor which is on a nearby solution, and attempts to find the smooth solution. It evaluates its Jacobian matrix on the nearby solution, which determines the direction it takes toward the smooth solution. Unfortunately, these Jacobian matrices do not yield good directions for nonlinear oscillating problems as described above, unless the predictor is already extremely close to the smooth solution. Thus, the standard Newton method must be coupled with a severe reduction in the timestep to achieve an adequate predictor. In Section 2, we outline the CS-iteration carried out by an efficient method for its derivative. For the purpose of finding the smooth solution, we introduce a modification to the Newton iteration, i.e., the CM-iteration. This iteration is easy to implement, effective for non-oscillatory problems, and particularly effective for nonlinear highly oscillatory problems. The basic idea of the CM-iteration is that there are terms in the Jacobian which involve derivatives of the projection onto the constraint manifold. These terms are large and complicated to compute, but small on the slow manifold [21]. The CM-iteration sets these terms to zero, yielding a reliable direction towards the smooth solution for the Newton-type iteration. We prove the convergence of the CM-iteration and give an error estimate for the numerical solution. In Section 3 we describe in more detail the structure of nonlinear oscillatory mechanical systems, and derive estimates for the rates of convergence of the CS and CM-iterations applied to these oscillatory systems. The difference in convergence rate explains why the CM-iteration is highly effective for oscillatory systems, and shows that its rate of convergence for non-oscillatory systems is similar to that of the CS iteration. In Section 4, numerical experiments are given which demonstrate the effectiveness of these methods, particularly for oscillatory nonlinear mechanical systems. 2 The Coordinate-Split Technique In this section we present the coordinate-split (CS) technique, which defines P (q) in (1.4a) and (1.4b) via coordinate-splitting, and computes this matrix cheaply. Although at first glance it would appear that implementation of this method would be difficult due to complications in computing the derivatives of P (q), we show that the special form of the pseudo-inverse can be used to give a much simpler derivation of the Jacobian. The construction of the annihilation matrix P (q) involves the solution of a class of pseudo-inverses of the constraint Jacobian G(q). Given a smooth vector-valued function r(q), a effective way to obtain the projected vector P (q)r is to use a splitting of the original coordinates. Definition 2.1 [Coordinate-Splitting Matrix] Let X and Y be the matrices whose columns constitute the standard Cartesian basis of IR n\Thetan such that k(G(q)Y bounded in a neighborhood U 0 of some q 0 , which is on the constraint manifold 0g. The p \Theta n coordinate-splitting matrix for (1.1) is defined by Remark 2.1 Note that X and Y are piecewise constant with respect to q 0 2 M. From the construction of the CS matrix P (q), one can easily see that P (q)G T for all q 2 IR n , i.e., P (q) is orthogonal to range(G T ). Furthermore, the row vectors of P (q) are orthonormal, i.e., P (q) T P is the identity matrix in IR p . The computation of P (q) can be carried out using the LU-factorization or QR- factorization of the constraint Jacobian matrix [12]. Then the projected vector P (q)r can be computed relatively cheaply. In addition, directly applying the formulas given in [11] (Theorem 4.3, pp. 420), we obtain dq dq )s; with where P (q) is defined by (2.1) and r(q) 2 IR n\Theta1 . Using (2.1) and (2.2), the coordinate-split iteration for solving the nonlinear system at each time step can be carried out. Applying, for example, a BDF formula to yields the nonlinear system ae h is the discretization operator, and h the stepsize of the time discretization. Given an initial prediction (q (0) applying Newton-type methods to (2.3) requires the solution of a linear system such that \Deltaq n and \Deltav n are the increments of q n and v n , @vn and We remark that the Coordinate-Split iteration leads to a natural and reliable error estimator for the numerical integration method. In particular, the local error estimator can be based on the independent coordinates and velocities only. To analyze the solution of (2.4), we rewrite the first two equations of (2.4), i.e., corresponding to the derivatives of (2.3a) and (2.3b), \Deltaq n \Deltav n where the 2n \Theta 2n matrix J h is h( dM(qn) dvn Since for small enough h, J h is invertible under the assumption of M(q n ) nonsingular, the solution of (2.4) can be computed by \Deltaq n \Deltav n where Thus, (\Deltaq n ; \Deltav n ) can be obtained by the successive solution of two linear systems, and \Deltaq n \Deltav n The CS iteration is an efficient formulation of the Newton iteration for multibody systems, so standard convergence theorems apply. We will now state conditions to ensure the convergence of the CS iteration in the context of numerical integration methods for (1.4). For simplicity we consider, instead of the second-order constrained equations of motion (1.1), a first-order system since the convergence of (2.9) can be trivially extended to (1.1). Applying stiffly stable numerical methods, the convergence result is well-known, see [13] pp. 494-498. Convergence of discretization methods for the index-1 system, obtained by applying the coordinate-splitting matrix P (q) to (2.9a), is also well- developed. By the construction of P (q), it is easy to see that the solution of the CS iteration is equivalent to that of the local state-space ODE of the independent coordinate x [7]. Applying a linear discretization operator ae h with stepsize h to (2.10) and scaling (2.10a) by h yields a nonlinear system where the residual function is r h (q; The convergence of the CS iteration can be carried out on a smooth constraint manifold M. Assume that for any q 0 2 M, there exist h 0 and X 2 IR p\Thetan and Y 2 IR m\Thetan such that is where J Similarly, we assume that for some C 2 , where q 1 and q 2 are in a neighborhood U(q 0 ) of q 0 . Convergence of the CS iteration can be assured for a sufficiently accurate initial guess. Under the assumptions (2.13) and (2.14), a sufficient condition for convergence requires that the numerical integration satisfies dr h dq dq )s for some C 3 ? 0 in a neighborhood of the true solution q [6]. For highly oscillatory dynamic systems, the stepsize of a numerical method may be restricted by the error test to follow the oscillation. Applying a stiffly stable numerical method to (2.10), such as BDF of order - 2, one may be able to damp the oscillation and take a larger stepsize to follow the trajectory of the equilibrium, However, convergence of the Newton iteration requires a further restriction on the stepsize. Depending on how close the predictor is to the equilibrium of highly oscillatory components, the Newton direction imposed by the Jacobian can excite the high-frequency oscillations. When applying the Newton method directly to the discretization of the Lagrangian form (2.9), an even more severe problem in Newton convergence is observed, and illustrated by the numerical experiments in Section 4. The limitation on the stepsize due to the Newton convergence failures for highly oscillatory nonlinear multibody systems can be overcome via a modification to the CS iteration which we call the CM iteration. The CM iteration In large-scale multibody mechanical systems, most of the unwanted oscillations are due to the noise of high-frequency forces, where the amplitude is well below the solution tolerance. However, small perturbations in the position can cause drastic changes in the Newton direction. This results in difficulties for convergence of Newton-type methods. To remedy this problem in the CS iteration, we reduce the noise from the oscillations by setting ( dP (q) in the Newton iteration matrix, since it is the main source contributing to the rapidly changing Newton direction. This term is large away from the smooth solution but negligible on the smooth solution. The CM iteration approximates the Newton direction of (2.10) via an oblique projection to the unconstrained ODE for a q 0 close to the solution q, e.g., G(q 0 )G T (q) invertible. When applying a stiffly stable numerical integrator to highly oscillatory problems, this modification, for q 0 close enough to the smooth solution, overcomes the difficulties in the CS iteration. Applying a stiffly stable discretization method to (2.16) coupled with constraint (2.10b) leads to the nonlinear system A convergence result for the modified CS iteration, denoted by CM , is given next. We first give an upper bound on the difference between the derivative of the projected vector P (q)r(q) and the projected derivative P (q)( dr(q) Lemma 2.1 Suppose conditions (2.13) and (2.14) hold. Then for is the disc in IR n with center q 0 and radius % 0 , dq dq Proof. From (2.2), dq dq dq )sk: Since the row vectors of P (q) are p orthonormal vectors in IR n , applying the Cauchy inequality gives dq dq for all q 2 D(q Condition (2.13), with h ! 0, implies the result in Convergence of the CM iteration and an estimate of the distance between the solutions of (2.11) and (2.17) are given in the following. Theorem 2.1 Suppose conditions (2.13)-(2.15) hold for some h 0 in a neighborhood of q , such that fq j g ! q is generated by the CS iteration. Choosing - sequence f-q k g generated by the CM iteration dq , converges to - q . Furthermore, the distance between - q and q is bounded above by for some moderate constant C. Proof. Convergence of f-q k g follows immediately by noting that the CM iteration is an inexact Newton method [5] with the property that the terms which the CM-modification deletes from the Jacobian, hence the perturbation to the Newton iteration, can be made as small as we want by taking the initial guess accurate enough. Next, we show the estimate (2.20). Since the CS and CM iterations converge to q and - respectively, we have Subtracting from both sides of the above equation we obtain Expanding around q 0 yields dq dq dq dq r h (q). In matrix form, the above equations become O( - By the assumption that - J is invertible, we can write ):Note that since dP when the constraints g(q) are linear, fq k g of the CS iteration and f-q k g of the CM iteration are the same in that case. In general, the rate of convergence of the CM iteration is superlinear, using the Dennis-Mor'e Characterization Theorem [6]. 3 Rate of convergence for highly oscillatory multi-body systems High frequency oscillatory forces often appear in the modeling of vehicle suspension systems, modal analysis in structural dynamics, or modeling of oscillations in computer-aided engineering etc. For simplicity, we consider the constrained dynamic system of (1.1) with a dominant oscillatory force may be, for example, the coefficients of stiff springs; i.e., In practice, j(q) is usually oblique towards KerP (q), i.e., the oscillatory force(s) acts on both the independent and the dependent coordinates. For the purpose of obtaining a smooth solution with large stepsizes, we will show that the CM iteration can be very effective for many classes of nonlinear oscillatory forces. Deformation forces are the most common potential forces that can produce small amplitude high-frequency oscillations. They are usually linear with respect to the local coordinates [4, 25]. For these reasons, we consider the class of oscillatory forces of the form where the components of B and b 0 are slowly varying. In particular, B and b 0 may be functions of some constraint-driven generalized coordinates. For example, B(') in the 2D bushing problem in [24] has the form \Gammak y sin ' k x cos ' k '54 are positive constants. When '(t) is smooth or constrained, assumption (3.2) is valid. Using a linear oscillatory force, the Lagrange equations of motion of the multibody system can be written as @(q;v) k. From assumption (2.14) on the constraint manifold, we can also assume dq for all q. In the context of the CS iteration, the problem of convergence of the Newton iteration can be explained by analyzing the reduced potential function. The reduced potential of (3.1) is reduced potential force generated by (3.6) is dq At each iteration, the reduced potential force acts along the normal direction of the constraint manifold. The gradient of the correction term yields dq Applying Y T to (3.8) gives dq and applying X T to (3.8) yields dq )s: When high-frequency oscillations appear in the system, e.g., ffl ! 0, the reduced potential force also becomes oscillatory if Y T r is nonzero. This is the general case when the solution is not at an equilibrium position. Nevertheless, convergence of the CS iteration can be achieved by using a small enough stepsize [17]. For small stepsizes, a convergence result for the CM iteration can be obtained provided the assumptions of Theorem 2.1 are valid. In many applications, following the oscillations is not of interest. Instead, one wants to use a large time step to damp out the oscillations of small amplitude but high frequency. For this reason, we now consider only the multistep numerical integration methods that are strictly stable at infinity and A-stable, such as the lower order (i.e., - 2) BDF methods [13]. The convergence of L-stable implicit Runge-Kutta methods to the smooth solution of the highly oscillatory ODE of multibody mechanical systems can be found in [17]. Here we focus on the convergence of the CM iteration for constrained multibody systems with oscillatory forces when applying the above-mentioned linear multistep methods. Numerical solutions on the slow manifold can be evaluated using the equilibrium of (3.1), i.e., the slow solution [2, 15] satisfies and the smooth solution is its asymptotic expansion to some order of ffl around the manifold 0g. In the linear form, the smooth solution of (3.1) is not far from k. For the strongly damped numerical solution 1. During the iterative solution onto the slow manifold, the constraints may not be satisfied, which causes a large reaction force in the form of (3.7). This may cause oscillations in the CS iteration, while the CM iteration annihilates these nonlinear oscillations generated by the reduced potential. This yields a superior performance of the CM iteration as compared to the CS iteration for computing the smooth solution of (3.1). The result is explained in the following. Theorem 3.1 Consider the numerical solution of (3.1), with j(q) linear, and h the stepsize of the stiffly stable multistep integration method. Assume the starting values -neighborhood of the smooth solution. If both the CS and CM iterations converge to q and - respectively, then the rate of convergence of the CS iteration oe (CS) compared to that of the CM iteration oe (CM) is given by k, and k. In the case that the constraints are linear, the two iterations yield the same result. Proof. Recall that the CS iteration is a Newton iteration for the solution of . Using the notation defined in (2.8), and comparing the Jacobian matrix for the CS iteration at iteration k with the Jacobian at the solution of the CS iteration, we obtain For equation (3.1) solved by a multistep method with leading coefficient fi using the CS iteration, dq and . Thus, from (3.9), the local rate of convergence of the CS iteration is given, via the Contraction Mapping Theorem [6], by Now, recall that the CM iteration is a Newton iteration for the solution of Comparing the Jacobian matrix for the CM iteration at iteration k with the Jacobian at the solution of the CM iteration, we obtain where for problem (3.1), fiI \GammahI Noting that in a - -neighborhood of the smooth solution, fiI \GammahI equation (3.11) yields Thus, By a similar argument, this result holds for all linear numerical integration methods.4 Numerical Experiments 4.1 Point-mass with oscillatory force The first example is a simple constrained multibody system under the influence of a highly oscillatory force. Consider a unit point-mass constrained to the 2D unit circle, using and the constraint equation 1). The equations of motion are is the applied force. Differentiating the constraint with respect to time, an explicit form of the multiplier - is obtained by For a highly oscillatory force f(q), one can see that -(t) is oscillating with the frequency of f(q), and with amplitude proportional to the magnitude of kfk. The numerical experiments are carried out using BDF of order - 2 in DASSL [3], where the local error estimation has been modified. For the stabilized index-2 DAE denoted by GGL, the local error is estimated using only the position, i.e., q. Moreover, we have also included some experiments where the Newton convergence test of GGL has been modified to exclude the multipliers. The corresponding numerical solution is denoted by GGL . For the coordinate-split and modified coordinate-split iterations, denoted by CS and CM , respectively, the local error is estimated using the independent variable X T q, as recommended in [24]. The CM iteration updates the matrix P (-q) when a new Jacobian is required. Linear oscillation Let a unit gravitational force act along the negative y-direction, and apply a linear oscillatory force There is a stable equilibrium at 0]. The natural frequency of the system is ffl , and no dissipative force is present. The numerical solution has been carried out with a moderate solution tolerance . For a 0 to 0:25 second simulation, the results of several combinations of the stiffness coefficient ffl are presented in Table 4.1, where the initial values are 0]. The CM iterations show better efficiency than those of CS, GGL and GGL in all cases, i.e., comparing the numbers of function and Jacobian evaluations in Table 4.1. In the Table, etfs and ctfs denote the number of failures of the error test and Newton convergence test, respectively, in DASSL. Comparing the results of GGL with those of GGL, we observe an improved Newton convergence. As ffl ! 0, i.e., for higher frequencies of the oscillation, the CM iteration becomes even more efficient. In Figure 5.1, we plot the total energy of each numerical solution. The CM iteration achieves the strongest damping because DASSL is able to increase the stepsize faster with the CM iteration. Linear spring force In the next test, we replace the linear oscillatory force in the previous constrained system by a spring forceffl 2 l attachment point of the spring, l 0 the natural length, and 1 the stiffness coefficient, as shown schematically in Figure 5.2. Method TOL ffl no: steps no: fevals: no: jevals: no: etfs: no: ctfs: Table 4.1: Results of the Constrained Point-Mass with a Linear Oscillatory Force Time (Logarithmic Scale) Total Energy (EPSILON=1.e-6, TOL=1.e-3, order=1,2) CM CS GGL GGL* Figure 4.1: Total Energy Comparison of Linear Oscillatory Force Example; and Method TOL ffl no: steps no: fevals: no: jevals: no: etfs: no: ctfs: Table 4.2: Results of the Constrained Point-Mass with an Oscillatory Linear Spring Force For unit mass and unit gravitational force, we set the spring attached to (0; \Gamma0:5) and the natural length l 0:4, such that the equilibrium is at (0; \Gamma1; 0; 0). Using the initial conditions [0:04471; \Gamma0:999; 0; 0], the results of the 0-0:05 second simulation by the GGL, GGL , CS, and CM iterations are shown in Table 4.2. Because DASSL is able to increase the stepsize, and hence damp the solution faster with the CM iteration, the CM method is quite effective in these tests. In Figure 5.3, we plot the total energy of each solution. The numerical solutions of x, w, and - are presented in Figure 5.4. 4.2 Two-body pendulum with bushing The second example is a two-body pendulum in 2D Cartesian coordinates. Six generalized coordinates, locate the centers of mass and the orientation of the bodies. The first body is grounded, and the second body is constrained such that the distance between a point A of the first body and another point B of the second body is fixed, and its orientation is held constant. This leads to five constraint equations Attachment Point Spring Y Point-Mass (0.0, Figure 4.2: Constrained Point-Mass with a Linear Spring Time Total Energy v.s. Time CM GGL (dot) GGL* (solid) Figure 4.3: Total Energy Comparison of Oscillatory Spring Example; x-velocity Velocity Time lambda Multiplier x-coordinate Position Figure 4.4: Results of Oscillatory Spring Example; where l AB and ' are constant, and such that in the local reference coordinate systems of body 1 and body 2, respectively. In this example, we use l for the constraint equations (4.1). We apply a nonlinear oscillatory force formulated using nonlinear beam theory [4]. This type of force arises commonly in flexible multibody dynamics [25]. As described in (3.2), the deformation force between the ith and jth components is a function of the relative displacement of the reference frames X 0 j , as shown schematically in Figure 5.5. Typically, the relative displacement is measured by are constant vectors with respect to the origins of the force reference frames in their respective local coordinate systems, i.e., are the corresponding origins in a global coordinate system and A i and A j are the transformation matrices from the global to the local coordinate system [10]. The are calculated as l) is the component of the kth row and lth column of A ij . The matrix A ij is the relative orientation matrix of two force reference frames, i.e., B i and B j are constant. The relative velocity is the time derivative of the relative displacement and the relative angular velocity is are the angular velocities of bodies i and j respectively. Using the above defined notation, the force acting between the ith and jth components due to the deformation can be written as where K f is a 3 \Theta 3 structural stiffness matrix and C f is the 3 \Theta 3 damping coefficient matrix. Similarly, the torque acting between the components is Zi' Zj' Deformation force reference frames Component i Component j Figure 4.5: Deformation Force of a Flexible Body where K - and C - are analogous to K f and C f . Note that the force and torque in this form are linear functions of the relative displacement (d ij and the relative Here, the 2D bushing force has stiffness matrix are O(1), and damping matrix where c x , c y , and c ' are O(1). For this 2D bushing example, (3.3) becomes ffl4 The attachment points of the force device are s 0= [0:5; 0] and s 0= [\Gamma0:5; 0] in the body-fixed reference frames of bodies 1 and 2, respectively. The bushing force introduces oscillatory applied forces, causing small oscillations of the numerical solution, and yielding highly oscillatory multipliers in the index-2 DAE (1.3). The multipliers associated with the highly oscillatory components exhibit high-frequency oscillations with large amplitude. The standard convergence test of the Newton iteration depends heavily on these multipliers. Therefore, we modified the convergence test in DASSL to exclude the test for the multipliers. In addition, the multipliers are computed in the GGL by applying the pseudo-inverse (GY ) \GammaT Y T to r and to is the predictor in DASSL, and ae h is the discretization operator of BDF. The local error is estimated by the predictor-corrector difference of (X T q; X T v) for CS, CM , and GGL , and of (q; v) for GGL. Using the initial values numerical results with are shown in Table 4.3, where 10. For this moderate stiffness all the methods perform well. Note that the constraint violation with these initial values is O(10 \Gamma3 ). This implies that the difference of the constraint reaction force at the initial value q 0 and that of a q on the constraint manifold is According to Theorem 3.1, the rate of convergence of the CS iteration is proportional to ffi ffl O(h). Increasing numbers of convergence test failures in DASSL are expected as ffl ! 0. In this example, frequent convergence test failures occured when We observe the same difficulties in the Newton convergence of the GGL and GGL iterations. On the other hand, the CM iteration with its better Newton convergence, as explained by Theorem 3.1, is able to take much larger time steps, and the nonlinear oscillation is damped effectively. In Table 4.4, the results of are shown. In Figure 5.6, we plot the stepsize taken by DASSL for GGL, GGL , CS, and CM using the stiffness coefficient Method TOL no: steps no: fevals: no: jevals: no: etfs: no: ctfs: Table 4.3: Results of Two-Body Pendulum with a Bushing Force, Method TOL no: steps no: fevals: no: jevals: no: etfs: no: ctfs: Table 4.4: Results of Bushing Problem, time stepsize GGL .x. CS -o- GGL* -. Figure Time Steps Used in Solving the Bushing Problem, --R Projected implicit Runge-Kutta methods for differential-algebraic equations Asymptotic Methods in the Theory of Nonlinear Oscillations Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations John Wiley Numerical Methods for Unconstrained Optimization and Nonlinear Equations On the error control for multistep methods applied to ODEs with invariants and DAEs in multibody dynamics Automatic integration of the Euler-Lagrange equations with constraints Index reduction methods for differential-algebraic equations The differentiation of pseudo-inverses and nonlinear least squares problems whose variables separate Matrix Computations Solving Ordinary Differential Equations II: Stiff and Differential- Algebraic Problems Computer Aided Kinematics and Dynamics of Mechanical Systems Volume Perturbation Methods in Applied Mathematics The Variational Principles of Mechanics Integration of stiff mechanical systems by Runge-Kutta methods On the numerical solution of the Euler-Lagrange equations On the numerical solution of the Euler-Lagrange equations On a geometric interpretation of differential-algebraic equations approach to the torsion dynamics of macromolecules Generalized coordinate partitioning for dimension reduction in analysis of constrained dynamic systems Constrained equations of motion in multibody dynamics as ODEs on manifolds Computational challenges in the solution of nonlinear oscillatory multibody dynamic systems Dynamics of articulated structures --TR --CTR B. Fox , L. S. Jennings , A. Y. Zomaya, On the modelling and computation of nonlinear multibody cable systems, International Journal of Computers and Applications, v.28 n.2, p.154-161, April 2006
highly oscillatory systems;error bound;differential-algebraic equations;initial value problems;multibody systems
300169
Exponential Integrators for Large Systems of Differential Equations.
We study the numerical integration of large stiff systems of differential equations by methods that use matrix--vector products with the exponential or a related function of the Jacobian. For large problems, these can be approximated by Krylov subspace methods, which typically converge faster than those for the solution of the linear systems arising in standard stiff integrators. The exponential methods also offer favorable properties in the integration of differential equations whose Jacobian has large imaginary eigenvalues. We derive methods up to order 4 which are exact for linear constant-coefficient equations. The implementation of the methods is discussed. Numerical experiments with reaction-diffusion problems and a time-dependent Schrdinger equation are included.
Introduction . The idea to use the exponential function of the Jacobian in a numerical integrator is by no means new, but it has mostly been regarded as rather impractical. Since the mid-eighties, Krylov subspace approximations to the action of the matrix exponential operator have, however, been found to be useful in Chemical Physics [16, 20, 22] and subsequently also in other fields [6, 8, 9, 21, 24, 29]. On the numerical analysis side, the convergence of such Krylov approximations was studied in [4, 5, 13, 26]. It was shown in [13], and previously in [4] for the symmetric case, that Krylov approximations to exp(-A)v converge substantially faster than those for the solution of linear systems v, at least unless a good preconditioner is available. Such linear systems arise in the numerical integration of stiff differential equations by standard integrators. For large problems, their solution often dominates the computational work. For nonlinear differential equations, the exponential of the Jacobian combined with Krylov approximations has previously been used in generalizations of Adams- type multistep methods in [8]. On the other hand, the use of matrix exponentials has for a long time been prominent in the exponential fitting literature, see e.g. [7, 17], and [1, 2] as recent examples. In this paper, we study new numerical methods for the integration of large stiff systems of nonlinear initial value problems The methods proposed here use matrix-vector multiplications '(-A)v, where A is the Jacobian of f , - is related to the step size, and This choice allows us to obtain methods that are exact for constant-coefficient linear problems Mathematisches Institut, Universit?t T-ubingen, Auf der Morgenstelle 10, D-72076 T-ubingen, Germany. E-mail: marlis@na.uni-tuebingen.de, lubich@na.uni-tuebingen.de, hubert@na.uni-tuebingen.de We remark that Krylov subspace approximations to '(-A)v converge about as fast as those for exp(-A)v, see [13]. Potential advantages for exponential integrators can thus originate from two different sources: Computing '(-A)v can be less expensive than solving and the exponential integration method itself may behave more favorably than standard integrators. The latter case occurs in particular for mildly nonlinear differential equations whose Jacobian has large imaginary eigenvalues, e.g., wave equations, Schr-odinger equations, flexible mechanical systems, and oscillatory electric circuits. Standard stiff integrators either damp high frequencies or map them to one and the same frequency (or nearly so) in the discretization, neither of which may be desirable. In Section 2 we give some simple methods of order 2 that are exact for (1.2) or for linear second-order differential equations. They include new symmetric methods, which appear useful for long-time integration of conservative, time-reversible problems. In Section 3 we consider a class of methods that would reduce to explicit Runge-Kutta methods if were replaced by '(z) j 1, and to Rosenbrock- Wanner methods for We give order conditions, both for exact and inexact Jacobian, and derive sufficient and necessary conditions to ensure that (1.2) is solved exactly. In Section 4 we extend the methods to differential-algebraic systems. We derive order conditions up to order 3 for such problems and for singularly perturbed systems. In Section 5 we construct methods of classical order 4 which are exact for (1.2) and have further favorable properties when applied to stiff problems. In particular, we use a reformulation that reduces the computational work for the Krylov processes. Section 6 deals with implementation issues. Important topics are how to take into account the computational work and storage requirements of the Krylov process in the step size control, and when to stop the Krylov process. Based on the considerations of Sections 5 and 6, we have written a code exp4, which can be obtained via anonymous ftp from na.uni-tuebingen.de in the directory pub/codes/exp4. In Section 7 we describe numerical experiments with this code for reaction-diffusion problems and for a Schr-odinger equation with time-dependent Hamiltonian, which show both the scope and the limitations of using Krylov approximations in exponential integrators. In a final section we discuss conclusions and perspectives for the methods proposed in this article. We will describe the methods only for autonomous differential equations (1.1). For non-autonomous problems y the methods should be applied to the extended formally autonomous system obtained by adding the trivial differential equation t The methods are then exact for linear differential equations whose inhomogeneity is linear in t. 2. Simple methods of order 2. 2.1. The exponentially fitted Euler method. The prototype exponential method, which seems to have appeared repeatedly in the literature under various disguises, is (2. where h is the step size, The method is of order 2, and exact for linear differential equations (1.2). 2.2. A symmetric exponential method. For long-time integration of conservative time reversibility is an important property. A symmetric method of order 2 is given by the two-step formula with given by (2.2). The method is exact for linear problems (1.2) provided that the starting values y 0 and y 1 are exact. The method can be viewed as a generalization of the explicit midpoint rule, to which it reduces for characteristic roots of the method applied to y are e h- and \Gamma1 which shows that the method is A-stable. The oscillatory error component (\Gamma1) n can be eliminated by taking the average of two successive values, (y n as an approximation to 2.3. A cosine method for second-order differential equations. We now consider For the linear problem the exact solution satisfies with the entire function This motivates the scheme with which is a symmetric method of order 2 for (2.4). Because of (2.6), the scheme is exact for linear problems (2.5). Derivative approximations that are exact for (2.5) are obtained via where \Gammaz \Gammaz 3. Higher-order exponential one-step methods: Order conditions and stability. In this section we study a general class of exponential integration methods introduced in [13]. Starting with y 0 as an approximation to y(t 0 ), an approximation to computed via s Here are the coefficients that determine the method. The internal stages can be computed one after the other, with one multiplication by '(flhA) and a function evaluation at each stage. The scheme would become an explicit Runge-Kutta method for '(z) j 1 (and a Rosenbrock-Wanner method for the choice As in the exponential Euler method (2.1), we choose instead the function (2.2). 3.1. Order conditions when using the exact Jacobian. Our aim now is to construct higher-order methods. The order conditions for the exponential methods can be derived similarly to Rosenbrock-Wanner methods, see, e.g., [12, Section IV.7]. Therefore, we only state the conditions here. For abbreviation we define Theorem 3.1. An exponential method (3:1)-(3:3) with is of order p iff s for elementary differentials - up to order p. Here, \Phi j (-) and the polynomials P - (fl) are listed in Table 3:1 for p - 5. The only difference to the order conditions for Rosenbrock-Wanner methods is in the polynomials P - (fl). Theorem 3.2. The method (3:1)-(3:3) is exact for linear differential equations (1:2), iff for all These conditions can be fulfilled if fl is the reciprocal of an integer. Then only a finite number of these conditions are needed. The others are satisfied automatically because for sufficiently large n, both sides of (3.5) then vanish. Proof. For the linear problem (1.2), both the exact and the numerical solution depend analytically on h. Since only the elementary differentials f , f are nonvanishing for (1.2), it thus suffices to show that their order conditions are given by (3.5). Like for Rosenbrock methods, one obtains that they are of the form (3. Elementary differential - k;l ff jk ff jl 1=3 f 000 (f; f; f) k;l;m ff jk ff jl ff jm 1=4 f (4) (f; f; f; f) f 000 (f 0 f; f; f) Table Order conditions for exponential methods up to order 5 where P n\Gamma1 is a polynomial of degree at most n \Gamma 1 which depends on the choice of ' but not on the method coefficients. It remains to show that P n\Gamma1 (fl) is given by the right-hand side of (3.5). If then the method applied to (1.2) is just a Runge-Kutta method with coefficients fi jk and weights b i . From the order conditions for Runge-Kutta methods, we thus have The exponential Euler method (2.1) is a one-stage method (3:1)-(3:3) with b Obviously, method. Since we already know that the exponential Euler method is exact for (1.2) we conclude from (3.6) that Similarly, two consecutive steps of the exponential Euler method with step size h=2 can be viewed as one step of a two-stage method (3:1)-(3:3) with 1=2. For such a method, (3.7) is valid for n ? 2. As before, we conclude from (3.6) that Continuing this argument for 3; steps of the exponential Euler method with step sizes Elementary differential - Af k;l ff jk ff jl 1=3 k;l ff jk ff kl 1=6 k;l ff jk fl kl \Gammafl =4 k;l AAf k;l Table Order conditions for exponential W-methods up to order 3 It follows that P n\Gamma1 (fl) is given by the right-hand side of (3.5). 3.2. Order conditions for inexact Jacobians. One may also want to use the method with an approximate Jacobian A. This requires further restrictions on the method parameters. For order 3 the conditions are given in Table 3.2. They are the same as for W-methods, see [12, p. 124], except for different polynomials in fl. If the first five conditions of Table 3.2 are satisfied, then the method is of order 3 when for the analogous situation in W-methods. 3.3. Stability. When the method is exact for linear differential equations, it is trivially A-stable. Much more can then in fact be shown about stability, including the practical situation where '(flhA)v is computed only approximately. Consider a perturbed method (3.1)-(3.3) applied to the linear problem (1.2): Here, ffi i is a perturbation at the ith stage, and e y 0 is a perturbed starting value. Subtracting from the unperturbed scheme yields for the error " It is easy to see that s is a polynomial of degree k with p k whose coefficients are products of In particular, when the numerical range of A is contained in the left half- plane, then we have the stable error recurrence s The stability analysis could be extended to nonlinear problems y Lipschitz-bounded g, to singularly perturbed problems, and to nonlinear parabolic problems in a similar way to what has been done for Rosenbrock methods, cf. [10, 18, 30]. 4. Exponential methods for differential-algebraic and singularly perturbed problems. As with Rosenbrock-Wanner methods [12, Section VI.3], the method (3.1)-(3.3) can be extended to differential-algebraic equations z invertible by applying it formally to the singularly perturbed differential equation and letting ffl ! 0 in the scheme. This will give us the following method: l i I 0 \Gammag z g y I I \Gammaf z g \Gamma1 z I y g z l i z g y , where the Jacobians are evaluated at (y and v i are defined by z 0 l j Finally we set z 0 s l i The derivation uses the auxiliary assumption that the eigenvalues of g z have negative real part. The Jacobian of (4.2) is block diagonalized by I +O(ffl) fflf z g \Gamma1 z \Gammag z g y +O(ffl) I +O(ffl) viz., ffl g z +O(1) Since '( flh z the method (3.1)-(3.3) applied to (4.2) reads l i z l i We note that I 0 I 0 ffl I I \Gammaf z g \Gamma1 z I lead to the above method (4.3). Remark. The matrix B need not be computed when one uses Krylov methods to approximate '(flhB)u. Matrix vector multiplications with B are cheap when the action of g \Gamma1 z is inexpensive to compute. For example, this is the case in constrained mechanical systems, cf. [12, p. 542], a Here, q and v are position and velocity variables, respectively, a is acceleration and - represents the Lagrange multipliers. In this system, g z corresponds to In suitable multibody formulations, linear equations with this matrix can be solved in an amount of work proportional to the dimension. When the exponential method is exact for linear differential equations with constant inhomogeneity, then method (4.3)-(4.5) is exact for linear differential-algebraic equations with constant matrices F y ; F z ; G y ; G z (G z invertible) and constant vectors b; c. Apart from a direct calculation, this may be seen as follows: When the eigenvalues of G z have negative real part, the exactness is again obtained by letting ffl ! 0 in the singularly perturbed problem, which is solved exactly by the method. From this case, the exactness in the general situation of invertible G z follows by analytical continuation. In general, the application of this scheme to differential-algebraic equations results in an order reduction to order 2, unless the method coefficients satisfy additional conditions. Theorem 4.1. The method (4:3)-(4:5) is convergent of order 3 for the differential-algebraic equation (4:1) if it satisfies the order conditions of Table 3:1 up to order 3, (3:5), and in addition where [! jk The additional order condition is the same as for Rosenbrock methods applied to (4.1) [12, p. 446]. Instead of giving a cumbersome formal proof of the theorem, we make the reappearance of condition (4.6) for exponential methods plausible as follows: Like the order conditions of Section 3, also the differential-algebraic order conditions are of the same form as for Rosenbrock methods, but possibly with different right-hand sides involving fl. We know that the theorem is valid for z). The appearance of the ! jk is related only to the term (flhg z ) \Gamma1 in (4.3), which is independent of '. The terms ff jk are also unrelated to '(flhB). Therefore, the condition remains the same as for Rosenbrock methods. The differential-algebraic order condition (4.6) is important not only for differential-algebraic systems but also for stiff differential equations. For example, the third-order error bound of Rosenbrock methods for singularly perturbed problems (4.2) in Theorem of [10] can be shown to be valid also for exponential methods. 5. Construction of fourth-order methods. 5.1. Reduced methods. We recall that one step of the exponential method evaluated in the form (3.1)-(3.3) contains s multiplications of '(flhA) with a vector. Since this vector is different in each of these s steps, the approximation with a Krylov subspace method requires the construction of bases of s Krylov spaces with respect to the same matrix A but with different vectors. This turns out to be prohibitively expensive. One may think of exploiting techniques for solving linear systems with multiple right-hand sides [25, 27], but in our experiments the savings achieved were minor. Therefore, we will present an alternative formulation of the method. A key point for the construction of efficient methods is that one can compute recursively from '(z): Once we have computed '(flhA), we can thus compute '(jflhA)v for any integer j ? 1 with the expense of matrix vector multiplications. The recurrence (5.1) is equally useful for the more interesting case where '(jflhA)v is approximated by Krylov methods. The Krylov subspace approximation is of the is the matrix containing the Arnoldi (or Lanczos) basis of the mth Krylov subspace with respect to A and v, and Hm is the orthogonal (oblique) projection of A to the mth Krylov subspace, which is an m \Theta m upper Hessenberg (block tridiagonal, respectively) matrix. Further, e 1 is the first m-dimensional unit vector. The iteration number m is typically very small compared to the dimension of the matrix A, so that the matrix '(flhH m ) can be computed quite cheaply (see x6 for details). Then the recurrence (5.1) can be used to compute '(jflhH m )e 1 by performing matrix vector multiplications with the small matrices Hm and '(flhH m ). If we denote the identity matrix of dimension m by I m , then We can exploit the recurrences (5.1) by reformulating the method. For this we introduce auxiliary vectors s Note that for corresponds to a first-degree Taylor expansion of f around y 0 . Hence the vectors d i are usually small in norm and would vanish for linear f . With (3.4) and (5.3) we have s Because of (5.1) we can choose fi kl such that for All the coefficients fi kl are uniquely determined by (5.4). In order to apply the recurrence formulas (5.1) in (5.4) we further choose which gives This reduces the number of f-evaluations and of evaluations of '(flhA) by a factor of n compared to the general scheme (3.1)-(3.3). This is particularly important when this reduced method is combined with a Krylov process for approximating '(flhA)v since in this case we need to compute a basis of a new Krylov space only at every nth intermediate step. Moreover, since the vectors d i are usually small in norm, the Krylov approximation of '(iflhA)d nj+1 (j - 1) typically takes only few iterations to achieve the required accuracy. The cost for building up the Krylov space of A with respect to the vector f(y 0 ) thus dominates the computational cost. We note finally that we can reorganize the computations in (5.4) as ~ and we can use the values ~ k l in (3.2) and (3.3), with appropriately modified weights: ~ and 5.2. Methods of order 4. Next we show that the reduced scheme proposed above still allows the construction of higher-order methods. Here, we concentrate on start with a 3-stage method for uses 2 function evaluations per step. The parameters fi kl satisfying (5.4) are given by To fulfill the conditions for order 4, there remain two free parameters ff 3;1 ; ff 3;2 , and the weights 4. The order conditions from Table 3.1 have a unique solution This yields the scheme On k 3 we have omitted the tilde corresponding to (5.5). This method is of order 4, and exact for linear differential equations (1.2). However, it is only of first order when used with inexact Jacobian and of second order when applied to DAEs. Moreover, it is impossible to construct an embedded method of order 3, which makes it hard to perform a reliable estimation of local errors for step size control. The only cheap variant is to use the exponential Euler method (2.1), which is only of order 2 and thus tends to overestimate the local error. The method (5.7) with embedded (2.1) is however of interest as a very economical method in situations where the time step is not restricted by accuracy, but only by the convergence of the Krylov process for computing '(hA)f(y 0 ). We note that k 3 is usually well approximated in a low dimensional Krylov space, because d 3 is often much smaller in norm than f(y 0 ). A more sophisticated method can be constructed with using 3 function evaluations per step. The parameters for (5.4) are given by With these parameters fi kl , all the order conditions (3.5) for linear problems are satisfied automatically for For our method we choose to evaluate the function f at both end points and at the middle of the time interval, i.e.,X The solution is obtained by first solving the order condition up to order 4 from Table 3.1. The equations for f 00 (f; f) and f 0 f immediately yield b the conditions for f f) and (4.6) result in a linear system with four equations for the unknowns b j , 7. This system has the unique solution which also satisfies the second order W-condition. From the equation for f we obtain b It remains to fulfill the equation for further we satisfy the third-order W-condition for f 0 f 0 f in order to obtain order 3 when the approximation to the Jacobian is O(h) close to the true Ja- cobian. This yields ff 2. We still have some freedom so that we can solve the fifth-order conditions for f 000 (f 0 f; f; f) and f 00 (f 0 f 0 f; f ). This gives ff other fifth-order conditions can be satisfied, we now minimizeX 7;j which yields ff This construction gives us the following method: Again, we have omitted the tilde on k used in (5.5). We summarize the properties of this method in a theorem. Theorem 5.1. The scheme (5:8) is of order 4 for differential equations (1:1), and exact for linear differential equations (1:2). It converges of order 3 for differential-algebraic equations (4:1) and to smooth solutions of singularly perturbed problems (4:2) uniformly for ffl - h 2 . For differential equations (1:1), it is of second order when used with inexact Jacobian, and of order 3 when the approximation to the Jacobian is O(h) close to the true Jacobian. The method satisfies three of the order-5 conditions. The residuals of the other conditions appear to be rather small, the largest one being 0:1. Although the scheme (5.8) is a 7-stage method, it requires only three function evaluations. When using Krylov approximations, the computational cost is dominated by computing k 1 . As discussed before, the reason is that k 2 , k 3 , k 5 , and k 6 can be computed recursively from (5.1) or the more stable recurrence (6.2) below, and that k 4 to k 7 are typically well approximated in very low dimensional Krylov subspaces, because d 4 and d 7 are usually much smaller in norm than f(y 0 ). For these reasons, and because of its superior theoretical properties, we prefer (5.8) to a "standard" 3-stage fourth-order scheme of type (3.1)-(3.3). 5.3. Embedded methods. We have constructed two embedded methods with different properties for the scheme (5.8). The first one is of order 3 for differential equations (1.1) and differential-algebraic equations (4.1), and exact for linear equations (1.2). Solving the third-order conditions of Table 3.1 and condition (4.6), and choosing gives the embedded scheme This method does not satisfy the fourth-order conditions, except that for f 0 f 0 f 0 f . It is however only of order 1 as a W-method, i.e., when used with inexact Jacobian. The second embedded method is of order two as a W-method. It is not exact for linear differential equations (1.2), and it does not satisfy the third-order conditions of Table 3.1. It reads e 5.4. Dense output. Like for Runge-Kutta and Rosenbrock methods, a continuous numerical solution defined via s with polynomials b i satisfying b i This approximation is of order iff s for all elementary differentials - of order ae - p, see [12, p. 452]. For the 3-stage method (5.7) a continuous numerical solution of order 3 is given by For the 7-stage method (5.8) a continuous numerical solution of order 3, which is also of order 3 for differential-algebraic equations and of order 2 when used with inexact Jacobian, is given by The actual computation uses s are defined as in (5.6) and ~ k i are the k i from (5.8). 6. Implementation issues. 6.1. Step size control. The step size control for the scheme (5.8) uses the two embedded methods proposed in Section 5.3. As an estimate for the local error, we choose the minimum of the local error estimates of these two methods. A step size selection strategy due to Gustafsson, see [12, p. 31-35] and the Radau5 code [12, p. 550ff], then yields a new step size proposal h err . However, if Krylov subspace methods are used to approximate the matrix exponential operator, then in addition to the local error estimate it is necessary to take the work and storage requirements of the Krylov process into account. We propose the following strategy: First choose a suitable "window" [-; M ] for the number of Krylov steps m required in the approximation of k (recall that in reduced methods, the overall work of the Krylov processes is dominated by this first Krylov process). In this window we choose a desirable number of Krylov steps m opt . We preserve the actual step size h of the integration method whenever m 2 [-; M ]. If m ? M the new Krylov step size is reduced until the required accuracy is achieved with an m 2 [-; M ]. in two consecutive steps, we set where we have found 1=3 as a reasonable value in our numerical experiments. It also turned out that a more drastical enlargement of the step size is possible if m is very small for more than two consecutive steps. For example we used in the last j time steps. Finally we choose the new step size as 6.2. Savings from previous steps. The scheme may reuse the Jacobian of a previous time step as an approximation to the actual Jacobian. This is done if the local error of the embedded method (5.10) is acceptable and in addition h kry - h err , i.e., the step size is determined by the Krylov process. Further savings can be achieved if the Jacobian A and the step size h are the same as in the previous time step. We then write If f(y n ) is close to f(y n\Gamma1 ), then the initial vector for the Krylov process is small in norm and thus the Krylov process becomes less expensive. 6.3. Stopping criterion for the Krylov method. We need to decide when the Krylov approximation (5.2) is to be considered sufficiently accurate. Since exact errors are inaccessible, the stopping criterion in the iterative solution of linear systems usually based on the residual instead of the error of the mth iterate For Galerkin-type methods like FOM and BiCG, the residual vectors can be computed from where hm+1;m is the (m+1;m) entry of Hm+1 , and [ \Delta ] m;1 denotes the (m; 1)-entry of a matrix. Using Cauchy's integral formula, the error of the mth Krylov approximation to '(-A)v can be written as Z where \Gamma is a contour enclosing the eigenvalues of -A and -Hm , cf. [13]. Thus, the can be interpreted as a linear combination of errors e m (-) of linear systems. Replacing e m (-) by r m (-) in this formula, we get a generalized residual Z which can be computed at no additional cost. This suggests to use ae m instead of the unknown error ffl m in the stopping criterion. The use of ae m was also proposed by Saad [26], who used a different derivation that is plausible only for small k-Ak. In the scheme (5.8), the Krylov approximations to k j are multiplied by the step size h. It is therefore reasonable to stop the iteration if tol is the weighted norm used in the integrator: with are the given absolute and relative error tolerances. In our numerical experiments we found that (6.1) is on the safe side, but sometimes rather pessimistic. Then it may pay off to apply an idea attributed to Shampine in [12, p. 134], which consists in using a smoothed residual instead of the true residual. Since solving a linear system with coefficient matrix prohibitively expensive when A is large, one can perform a smoothing in the m-dimensional subspace and use instead of (6.1) for m - 5, say. For smaller m, this criterion may be overly optimistic when -A has large norm. 6.4. Computation of '(-Hm ). To reduce the computational costs, we evaluate figures in an index sequence, e.g., m 2 f1; 2; 3; 4; 6; 8; 11; 15; 20; 48g. This sequence is chosen such that the computation of '(-Hm ) is about as expensive as the total of the previously computed '(-H j ), since the computation of If A is Hermitian, then Hm is Hermitian tridiagonal. In this case, one can simply diagonalize Hm . In the non-Hermitian case, we suggest to use Pad'e approximation similarly to the third method described in [19] to compute the matrix exponential. Here, the matrix is first scaled by a factor of 2 \Gammak such that k2 \Gammak -Hm k ! 1=2. Then we evaluate the approximation to '(z) for the scaled matrix: 26 z Next, '(-Hm ) is computed recursively from '(2 \Gammak -Hm ) by applying the following coupled recurrences: This recurrence is stable for all z in the left half-plane, whereas (5.1) becomes unstable for large jzj because of the multiplication with z. Alternatively, in the non-Hermitian case, one can use a formula due to Saad [26, Section 2.3]: exp exp(-Hm This appears favorable when the dimension m is not too small. 7. Numerical experiments. We have implemented the method (5.8) with (and approximations in a Matlab code exp4. The program is written in the format used in the Matlab ODE suite [28], which is available via anonymous ftp on ftp.mathworks.com in the pub/mathworks/toolbox/matlab/funfun directory. The code exp4 can be obtained from na.uni-tuebingen.de in the pub/codes/exp4 directory. A C version of exp4 is also available from this ftp site. 7.1. A reaction-diffusion equation with nonstiff chemical reaction: the Brusselator. To illustrate the behavior of the exponential integrator with Krylov approximations to '(flhA)v in the transition from a nonstiff to a stiff problem, we have chosen the two-dimensional Brusselator [11, pp. 248ff]: @t together with Neumann boundary conditions @n @n and initial conditions The Laplacian is discretized on a uniform 100 \Theta 100 grid by central differences, so that the dimension of the resulting ODE problem is 20; 000. The eigenvalues of the discretized Laplacian lie between \Gamma80; 000 and zero. We present numerical experiments with three different values of the diffusion coefficient which mark the transition from a nonstiff to a stiff problem. The solution of the problem for shown in the movie on pp. 250ff in [11]. In Figs. 7.1-7.3 we show work-precision diagrams for our exponential integrator exp4, and for the explicit Runge-Kutta integrator ode45 from the Matlab ODE suite [28], which is based on a fifth-order method of Dormand and Prince [3]. The vertical axis shows the error at the end point the horizontal axis gives the exp4 error flops Fig. 7.1. Brusselator for flops error exp4 Fig. 7.2. Brusselator for exp4 error flops Fig. 7.3. Brusselator for number of flops. The markers \Theta for exp4 and ffi for ode45 correspond to the error While the computational work of the nonstiff integrator increases drastically with growing ff, the performance of exp4 is considerably less affected. 7.2. A reaction-diffusion equation with stiff chemistry: the Robertson example. The following example shows the behavior of the exponential integrator for a very stiff problem. We consider the Robertson reaction [12, pp. 3f] with one-dimensional diffusion: together with Neumann boundary conditions u The diffusion coefficient is chosen as . The second spatial derivative is discretized on a uniform grid with points. In this problem, the stiffness originates from the reaction terms. We have chosen such a small problem because we intend to illustrate the influence of the Krylov approximation procedure to the performance of the integrator. In Fig. 7.4 we show the step sizes as a function of time in a double logarithmic scale with and without Krylov approximation of '(flhA)v. As this example has only dimension 90, '(flhA) can here be computed by diagonalization. For comparison, we also show the step size of the explicit integrator ode45 and the stiff integrator ode15s from the Matlab ODE suite [28], which uses a variant of a method. All the methods have been run with the same tolerances atol=rtol= \Gamma6 . It is seen that in this example the step size is always limited by the Krylov process. The step size restriction does not appear very severe on the considered time interval. Similar step size sequences are obtained for the Krylov-approximated exponential method for higher-dimensional versions of the problem. However, the limits of the Krylov approach show up when the integration is continued to very long times. There, the step size remains essentially on the level seen at the right-most part of Fig. 7.4. It has been observed that this behavior is largely due to roundoff error effects. 7.3. A Schr-odinger equation with time-dependent potential. As an example of a problem whose Jacobian has large imaginary eigenvalues we consider, following [23], the one-dimensional Schr-odinger equation for with the Hamiltonian This equation models an atom/molecule interacting with a high intensity CW laser. The parameter values used were 100. The initial value was /(x; exp4 without Krylov exp4 with Krylov step size time Fig. 7.4. Step sizes versus time for the Robertson example. which corresponds to the eigenstate of the unforced harmonic oscillator to the lowest energy level. Semi-discretization in space is done by a pseudospectral method with Fourier modes on the space interval x 2 [\Gammaa; a] for with periodic boundary conditions. This leads to the non-autonomous linear system of differential equations for diag Here, y j (t) is an approximation to /(x N , FN is the discrete Fourier-transform operator, and a diag(0; The Jacobian is full but matrix-vector multiplications are obtained with O(N log N) flops using FFT. In Fig. 7.5 we show the work-precision diagram at the standard nonstiff and stiff solvers ode45 and ode15s from the Matlab ODE suite, and for a Matlab implementation of Hairer and Wanner's [12] Radau5 implicit Runge-Kutta code. The codes were used with tolerances atol=rtol= The surprisingly good behavior of the stiff integrators ode15s and radau5 is due to the following matrix-free implementation: In the simplified Newton iterations the Jacobian was approximated by i=2F so that the linear systems could be solved in O(N log N) operations using FFT. Therefore, the computational cost per time step was essentially the same as for an explicit method. Using the full Jacobian would make the implicit methods completely inefficient for this problem. We note, however, that the performance of the versions with the simplified Jacobian deteriorates when the parameters - and - increase. The exponential code exp4 is clearly superior to the explicit integrator ode45. For accuracy requirements more stringent than 10 \Gamma4 , Fig. 7.5 shows an advantage for exp4 error flops Fig. 7.5. Work-precision diagram for the Schr-odinger equation. exp4 also with respect to the implicit methods in their optimized versions discussed above. This stems from the fact that exp4 is able to take much larger time steps than the other integrators. In computations with Schr-odinger equations with time-independent Hamiltonian, the use of Chebyshev approximations to the matrix exponential operator is very popular [16]. We therefore also implemented a version of exp4 where the Arnoldi process is replaced by a Chebyshev approximation. In our numerical experiments the Chebyshev version needed about twice as many flops as the Arnoldi-based implementation. [We thank S. Gray for pointing out references [16] and [23].] 8. Conclusions and perspectives. In this paper we have introduced new integration methods which use matrix-vector multiplications with the exponential of the Jacobian. In particular, we have studied Rosenbrock-like exponential methods. Since a straightforward implementation of these methods is computationally expensive, we have identified a subclass of "reduced" methods which are reformulated such that they allow for an efficient implementation. Two promising fourth-order methods, which are exact for linear constant-coefficient problems, have been given in formulas (5.7) and (5.8). The method (5.8), which offers superior properties at slightly higher cost per time step, has been implemented with Krylov subspace approximations to the matrix exponential operator in a code exp4. This implementation requires only function evaluations and matrix-vector multiplications with the Jacobian. Numerical experiments and theoretical considerations indicate that exponential integrators are highly competitive for the following problem classes of large systems of initial-value problems: Mildly stiff problems (e.g., reaction-convection-diffusion problems with nonstiff reaction terms): The most efficient traditional methods are explicit integrators which are used despite stability restrictions of the step size. For the special case where the eigenvalues of the Jacobian are on the negative real axis, the high-stage Runge-Kutta- Chebyshev methods of van der Houwen and Sommeijer [14, 31] are known to be very successful. Here, the theory in [5, 13] and [31] tells us that the number of necessary matrix-vector multiplications with the Jacobian in Krylov iterations for exponential methods and the number of function evaluations in Runge-Kutta-Chebyshev methods needed to attain stability are both of the magnitude of hkAk. However, the Krylov methods take advantage of clustered eigenvalues and of vectors with small components in some eigendirections. There is no restriction to problems with eigenvalues near the real axis for the exponential methods with Krylov approximations, and much larger time steps than with standard explicit Runge-Kutta methods (such as the Dormand- Prince methods) can be taken. Stiff problems (e.g., reaction-diffusion problems with stiff reaction terms): For high-dimensional systems, the standard approach is to use implicit methods (such as BDF or Radau) where the linear systems are solved iteratively with the help of a hopefully good and cheap preconditioner. If - and only if - an efficient preconditioner is available, those methods are clearly favorable over the exponential methods proposed here, since it is not known how to precondition the iterative computation of the matrix exponential operator. Due to the superlinear error reduction of the Krylov approximations to the matrix exponential, exponential methods are often competitive even without a preconditioner. We hope that future developments will allow to effectively use ideas of preconditioning in the computation of the exponentials and hence further enlarge the range of stiff problems on which exponential methods are efficiently applicable. Highly oscillatory problems (e.g., wave equations, Schr-odinger equations, elasto- dynamics, and oscillatory electric circuits): Here, the proposed exponential methods are able to resolve high frequencies to the required error tolerance without the severe time step restrictions of standard schemes. Time step restrictions of an often milder type still occur because of nonlinear effects and because of limitations of the iteration number in the Krylov process. The latter are less severe when the eigenvalues of the Jacobian are clustered. The good resolution of high frequencies with exponential methods is in contrast to usual implicit integrators used with large time steps, which either damp high frequencies or map them to one and the same frequency (or nearly so) in the discretization. It will be interesting to see how the new methods perform in real-life scientific problems. --R Sufficient conditions for uniformly second-order convergent schemes for stiff initial-value problems A new efficient numerical integration scheme for highly oscillatory electric circuits A family of embedded Runge-Kutta bounds in the simple Lanczos procedure for computing functions of symmetric matrices and eigenvalues Krylov subspace approximations of eigenpairs and matrix functions in exact and computer arithmetic Krylov methods for the incompressible Navier-Stokes equations Verallgemeinerte Runge-Kutta Verfahren zur L-osung steifer Differentialgleichungen A method of exponential propagation of large systems of stiff nonlinear differential equations Efficient solution of parabolic equations by Krylov approximation methods of Rosenbrock methods for stiff problems studied via differential algebraic equations Solving Ordinary Differential Equations I Solving Ordinary Differential Equations II On Krylov subspace approximations to the matrix exponential operator On the internal stability of explicit m-stage Runge-Kutta methods for large values of m Rosenbrock methods using few LU-decompositions Propagation methods for quantum molecular dynamics Generalized Runge-Kutta processes for stable systems with large Lipschitz con- stants Linearly implicit time discretization of non-linear parabolic equations Nineteen dubious ways to compute the exponential of a matrix New approach to many-state quantum dynamics: The recursive- residue-generation method Applications of the Lanczos algorithm Unitary quantum time evolution by iterative Lanczos reduction The solution of the time dependent Schr-odinger equation by the (t On the Lanczos method for solving symmetric systems with several right hand sides Analysis of some Krylov subspace approximations to the matrix exponential operator The Matlab ODE suite Expokit: Software package for computing matrix exponentials Explicit Runge-Kutta methods for parabolic partial differential equations --TR --CTR Xin-Yuan Wu , Jian-Lin Xia, New vector forms of elemental functions with Taylor series, Applied Mathematics and Computation, v.141 n.2-3, p.307-312, 5 September S. Koikari, An error analysis of the modified scaling and squaring method, Computers & Mathematics with Applications, v.53 n.8, p.1293-1305, April, 2007 R. Weiner , B. A. Schmitt , H. Podhaisky, Parallel 'Peer' two-step W-methods and their application to MOL-systems, Applied Numerical Mathematics, v.48 n.3-4, p.425-439, March 2004 Philip W. Livermore, An implementation of the exponential time differencing scheme to the magnetohydrodynamic equations in a spherical shell, Journal of Computational Physics, v.220 n.2, p.824-838, January, 2007 A. Schmitt , R. Weiner, Design, analysis and testing of some parallel two-step W-methods for stiff systems, Applied Numerical Mathematics, v.42 n.1, p.381-395, August 2002 X.-Y. Wu , J.-L. Xia , F. Yang, A dynamic method for weighted linear least squares problems, Computing, v.68 n.4, p.375-386, September 2002 Ya Yan Lu, Computing a matrix function for exponential integrators, Journal of Computational and Applied Mathematics, v.161 n.1, p.203-216, 1 December Jrg Wensch, Krylov-ROW methods for DAEs of index 1 with applications to viscoelasticity, Applied Numerical Mathematics, v.53 n.2, p.527-541, May 2005 Marlis Hochbruck , Alexander Ostermann, Exponential Runge-Kutta methods for parabolic problems, Applied Numerical Mathematics, v.53 n.2, p.323-339, May 2005 Z. Jackiewicz , H. Podhaisky , R. Weiner, Construction of highly stable two-step W-methods for ordinary differential equations, Journal of Computational and Applied Mathematics, v.167 n.2, p.389-403, 1 June 2004 Jrg Wensch , Fernando Casas, Extrapolation in lie groups with approximated BCH-formula, Applied Numerical Mathematics, v.42 n.1, p.465-472, August 2002 Tobin A. Driscoll, A composite Runge-Kutta method for the spectral solution of semilinear PDEs, Journal of Computational Physics, v.182 n.2, p.357-367, November 2002 M. Lintner, The eigenvalue problem for the 2D laplacian in H-matrix arithmetic and application to the heat and wave equation, Computing, v.72 n.3-4, p.293-323, May 2004 S. Krogstad, Generalized integrating factor methods for stiff PDEs, Journal of Computational Physics, v.203 n.1, p.72-88, 10 February 2005 M. Caliari , M. Vianello , L. Bergamaschi, Interpolating discrete advection-diffusion propagators at Leja sequences, Journal of Computational and Applied Mathematics, v.172 n.1, p.79-99, 1 November 2004 F. Carbonell , J. C. Jimenez , R. Biscay, A numerical method for the computation of the Lyapunov exponents of nonlinear ordinary differential equations, Applied Mathematics and Computation, v.131 n.1, p.21-37, 10 September 2002 Roger B. Sidje, Expokit: a software package for computing matrix exponentials, ACM Transactions on Mathematical Software (TOMS), v.24 n.1, p.130-156, March 1998 Hvard Berland , Brd Skaflestad , Will M. Wright, EXPINT---A MATLAB package for exponential integrators, ACM Transactions on Mathematical Software (TOMS), v.33 n.1, p.4-es, March 2007 M. A. Botchev , D. Harutyunyan , J. J. W. van der Vegt, The Gautschi time stepping scheme for edge finite element discretizations of the Maxwell equations, Journal of Computational Physics, v.216 August 2006 Elena Celledoni , Arieh Iserles , Syvert P. Nrsett , Bojan Orel, Complexity theory for lie-group solvers, Journal of Complexity, v.18 n.1, p.242-286, March 2002 M. Tokman, Efficient integration of large stiff systems of ODEs with exponential propagation iterative (EPI) methods, Journal of Computational Physics, v.213
high-dimensional differential equations;numerical integrator;matrix exponential;krylov subspace methods
300180
Circumventing Storage Limitations in Variational Data Assimilation Studies.
An application of Pontryagin's maximum principle data assimilation is used to blend possibly incomplete or nonuniformly distributed spatio-temporal observational data into geophysical models. Used extensively in engineering control theory applications, data assimilation has been introduced relatively recently into meteorological forecasting, natural-resource recovery modeling, and climate dynamics. Variational data assimilation is a promising assimilation technique in which it is assumed that the optimal state of the system is an extrema of a carefully chosen cost function. Provided that an adjoint model is available, the required model gradient can be computed by integrating the model forward and its adjoint backward. The gradient is then used to extremize the cost function with a suitable iterative or conjugate gradient solver.The problem addressed in this study is the explosive growth in both on-line computer memory and remote storage requirements of computing the gradient by the forward/adjoint technique which characterizes large-scale assimilation studies. Storage limitations impose severe limitation on the size of assimilation studies, even on the largest computers. By using a recursive strategy, a schedule can be constructed that enables the forward/adjoint model runs to be performed in such a way that storage requirements can be traded for longer computational times. This generally applicable strategy enables data assimilation studies on significantly larger domains than would otherwise be possible, given the particular hardware constraints, without compromising the outcome in any way. Furthermore, it is shown that this tradeoff is indeed viable and that when the schedule is optimized, the storage and computational times grow at most logarithmically.
Introduction Data assimilation has relatively recently become an important tool in many areas of geophysics, such as weather and climate forecasting[1-6]; model sensitivity-to-parameter studies[7,8], in the inclusion of field data sets into theoretical model-studies [9-11]. In weather forecasting field data that may be spatially and/or temporally heteregeneous is continuously blended into dynamical models as soon as the field data is available. the result has been a significant improvement of the predictive capabilities of today's weather models [1,12]. Ocean forecasting has thus far not met the comparable success of its atmospheric counterpart. Reasons for this are (1) the spatial and temporal scales of the relevant oceanic dynamics are several orders of magnitude smaller and larger, respectively; (2) oceanic data gathering is at present very limited in coverage and sometimes of incompatible quality, (3) boundary fluxes at the air/sea interface are poorly understood and yet have a major influence on oceanic flows, and lastly, (4) the computing demands of oceanic forecasting have only recently become marginally suitable for some but not all of the types of studies at reasonable resolutions. A specific approach to data assimilation is called variational data assimilation [12]. An objective function is defined which provides a norm of the distance or misfit of the state set to observational data. The state set may comprise model predictions, parameters, boundary data and/or initial conditions. The misfit is usually weighted in order to account for measurement errors, model uncertainties, etc. The object is to find the state set that extremizes the objective function. This is usually done as a constrained optimization problem which is generally solved iteratively by some extention of Newton's method or a descent algorithm. The optimization problem requires the computation of the gradient of the model with respect to the state set. One of the alternative strategies that accomplishes the calculation of the gradient is the "adjoint method" [3]. Provided an adjoint to the tangent linear model exists, the process of computing the gradient involves integrating the original model forward in time (the forward problem) recording the model's history, and then using the history in the adjoint model to integrate backwards in time back to the point of origin (the adjoint problem). Along the way the partial differentials that comprise the gradient of the results at some t final with respect to the state set at some particular time step are multiplied in reverse order until the adjoint model reaches the origin once again. By the chain rule, the multiplication will yield the gradient, and it will do so at a computational cost roughly twice that of the forward problem. As described above, the adjoint method is what we will call the "conventional approach." Its main advantage is its low computational cost. However, its disadvantage is that it quickly encounters computer memory storage problems even in low resolution studies. In this paper we present an alternative to the conventional approach which will circumvent in a significant way the storage problems of the adjoint method at the expense of a possibly greater, but manageable computational expense. The problem is motivated in Section 2. The alternative gradient method is presented in Section 3 and is compared to the conventional approach. Section 4 demonstrates how such alternative is implemented in practice in an ocean climate problem and we describe how it compares to the conventional approach in terms of computational effort and memory usage. The last section summarizes the findings, provides details of the strategy's computer implementation and details of where to obtain code that implements the method. [2]. Statement of the Problem For the sake of clarity we will assume that the physical problem in question can be modelled by an evolutionary equation. The physical m-dimensional real domain is R with boundary @R. The discrete evolution parameter is so that physical time marches according to i\Deltat. The goal is to find the state set which minimizes the misfit of equation-to-field-data. The semi-discretized "forward problem" is where the completely or partially unknown U and V are the initial and boundary data for the state set which minimize an objective function. The "reverse problem" is the adjoint of (2.1), If the forward problem is a semi-discretization of an evolution equation, we think of u i and with domain R \Theta T as vectors of the state variables and their adjoints, where i is the time step index. Equations (2.1) and (2.3) will be solved in some high level computer language such as Fortran or C. Define k as the set of computer memory addresses required to represent the vector set fug and fu g at index location i, so that u j and u have temporary memory locations s j and s k respectively. It is assumed that s s We will call this temporary computer storage medium as the "register". Let f and f be the representations of F and F respectively in some high level computer program, or "program" for short. These take the form of subroutines, functions, etc. The action of f . Define the m- and t- norms as the memory and time of execution of some program Q as kQkm and kQk t respectively. As will be evident in what follows, these norms will amount to simple direct sums. The register memory of the state set is it will be safe to assume that kS km - R. The other type of memory that will play an important role in the analysis is the available memory external to the program. This is usually some external storage device such as a memory disk, tape, etc. For simplicity we shall call this recording device the "tape" and it will be assumed to have a fixed memory size T . The distinction between a non-recording program procedure f i and the same procedure which records the state set on tape will be indicated as - f i . It will be convenient to define the following specific m- and t- norms: 0-i-n 0-i-n 4 J.M. RESTREPO, G. K. LEAF, A. GRIEWANK the maximum memory required to restore f i given S and the maximum computing time (wall-clock time) to execute f i . It is worth noting that - is essentially fixed, regardless of the number of processors while - can vary significantly depending on the number of processors. Since f is a linear mapping on S , it can be assumed that where - and - refer respectively to analogous norms to (2.4) of f and - f , and the c's are positive multiplicative constants. Note that kf i k - R since the subroutines may require working registers. In the discretization and coding of a typical evolution equation, for example of a climate or metereology problem, we can identify f i as the collection of subroutines and functions that take the state set from time t i to t i+1 (forward integration) in which kf i km and kf i k t are approximately the same for each level thus equal to - and - respectively. In the same fashion f i is the collection of subroutines that take the state set from time t i to (reverse integration) in which kf are approximately the same for each level thus equal to - and - respectively. Let us consider the memory and the time norms of two strategies which may be used in the n\Gammastep gradient computation by the adjoint method. In one strategy the minimal memory norm is achieved by recording nothing on tape. It requires stepping forward from u 0 to un using f i , followed by a single reverse step from un to using f n . Start again from u 0 forward to un\Gamma1 using f i followed by a reverse f from un\Gamma1 to un\Gamma2 . The process is repeated until the reverse integration reaches step 0 once again. The t- and m- norms for this strategy are respectively where only register memory is used. For simplicity we are ignoring here, as we will do from now on, the register memory that is used for working arrays, etc. For an explicit fourth-order Runge-Kutta time integration scheme for example, this register memory can be significant, but can be easily accounted in the estimates provided. Another strategy is the conventional approach, which steps forward from u 0 to un using steps in reverse using f reading the appropriate state variables from tape. The time and memory norms for the latter strategy are Hence the conventional approach yields the adjoint as a fixed multiple of the time for the forward program. However, the tape grows linearly in both number of steps and size of the state set, which for typical geophysical applications will quickly overwhelm even the largest storage capabilities of computer facilities [13]. [3]. Recursive Adjoint Method The recursive strategy is specifically designed to circumvent the storage limitations of the conventional adjoint method at the expense of a larger computational effort. The computational effort will be defined more precisely below, but for now it suffices to know that the computational effort is directly proportional to the wall-clock time, which in turn depends on the number of processors. One strategy that reduces the tape size is to produce the gradient using the usual forward/adjoint sweep but recording less often than is really required. While this alternative saves some tape space, it produces a degraded gradient. It will be shown below that the gradient produced by the recursive method will be identical to its nondegraded counterpart obtained in the conventional way. The description that follows will present a heuristic explanation of the theoretical development that appears in [14]. The basis of this strategy is to limit the tape size to dR, , where d - n snapshots (snaps, for short) of states fug at any given point during the program execution. This is done by carefully over-recording. It requires at most an additional r-fold increase in additional full forward unrecorded computations or "reps". The recursive strategy or "schedule" is not unique. However, from Theorem 6.1 due to Griewank [14], among the partitioning algorithms the "binomial partitioning" schedule is optimal. The theorem states that an n-step gradient calculation using the adjoint method can be solved recursively using up to d - 0 snaps and at most r - 0 reps if and only if d!r! Note that n(d; d) and n(0; To illustrate the sense in which this method is optimal we appeal to Stirling's formula, and find that for a fixed d or r, or To see more clearly the relationship between n and the number of snaps and reps, a contour plot of ln n as a function of the number of snaps and reps based on (3.1) appears in Figure 1. Since the values that the binomial takes are discrete, the contours appear jagged. The figure clearly illustrates the logarithmic rate of growth given in (3.2). In particular, when then they are growing as log 4 n. The schedule for appears in Figure 2 and is worth explaining in some detail. Note that s Along the horizontal is the number of reps and along the vertical the time step i. The tree structure of the schedule is evident. Horizontal lines are drawn at locations in which recordings are performed. As is evident, when reading the figure from left to right, there 6 J.M. RESTREPO, G. K. LEAF, A. GRIEWANK reps3.054.577.6210.713.716.819.822.925.9 27.4 29 30.5 Figure 1. Contours of ln n versus snaps d and reps r. are 5 self-similar groups or pennants. The top pennant and the first to be executed has 3 snaps at recording occurs at s and the recording at time step Execution requires a forward sweep from 56. The state at 51 is restored once more and a forward sweep to 55 follows. A forward/adjoint from 55 to 56 and back again to 55 is executed then. The first pennant is completely swept by repeating the last two steps until the adjoint reaches 51. State 36 is then restored and a forward sweep follows, recording at the second uppper-most triangle is swept through, state 36 is recovered, a forward sweep follows, recording at completing the first pennant state 1 is restored, a forward sweep is initiated that ends at s recording along the way at s +1. At this point, the schedule should be obvious. the last pennant is performed when s 2. Note that at no instant will the depth of the recording be more than 3 records long, and in addition, that if the tape is thought of as a stack, the order of the records is maintained due to its last-in-first-out nature. It is evident from the figure that there are a total of 1 forward recorded sweep, 1 adjoint reverse sweep and r forward unrecorded sweeps. From Figure it may be concluded that the t-norm and m-norm of the recursive schedule 'i 'i 'i 3 'i 'i 5 'i 6 'i 'i 8 'i 9 'i 'i 11 'i 'i 12 'i 'i 14 'i 15 'i 'i 17 'i 'i 19 'i 'i 21 'i 'i 22 'i 'i 'i 'i 'i 'i 28 'i 29 'i 'i 'i 'i 33 'i 34 'i 'i 36 'i 'i 37 'i 'i 'i 'i 42 'i 43 'i 44 'i 'i 'i 'i 48 'i 'i 'i 52 'i 53 'i 54 'i 'i 56 Figure 2. Schedule for are, respectively, since dR. The first expression on the right hand side of equations (3.2) and (3.3) hold generally for any n(d; r), d - 0 and r - 0 recursive adjoint problem and the far right hand side for any general recursive adjoint problem involving the evolution equation typically encountered in climate or metereology studies. Also note that if the number of reps r and sweeps d are similar that R log 4 n: 8 J.M. RESTREPO, G. K. LEAF, A. GRIEWANK Table 1. Schedule details for several sets of d, r and n. Comparison of (3.2) and (2.6) lead to a working measure of the "computational effort" which is directly proportional to the wall-clock time: a convenient measure is the total number of forward steps. We shall employ this measure in this and in the following section, in which a comparison between the recursive and the conventional approach is effected. The performance of the recursive method compared to the conventional one may be assessed graphically. Figure 3 illustrates the relation of the memory, measured in snaps, and the wall-clock time, assuming it is proportional to the effort. The conventional approach is represented by the left-most curve. All other curves represent different snap and rep combinations. In both the conventional as well as the recursive case the memory required to solve a problem will be equal to d- , where - is defined as before and depends on the resolution and the number of spatial dimensions in the problem. The effort, on the other hand, for the conventional case is basically n, while in the recursive strategy it depends on the choice of snaps and reps. From left to right the recursive strategy curves correspond to decreasing the number of snaps. The line-connected curve in the lower corner corresponds to the case of snaps and reps being equal. The conventional case is in effect the limit of snaps d equal to n in the recursive strategy. As can be surmized, the curves reflect the previously-mentioned characteristic of the recursive method, that the effort increases for the recursive method when fewer snaps are used. Hence, in practice, the user wants to maximize the number of snaps in the calculation rather than the number of reps. log(effort)41220283644snaps Figure 3. Conventional versus Recursive strategy comparison. The added effort due to increased reps r. From left to right, the conventional case, then 3. The curve represented by stars corresponds to r = d. Figure 4 shows a comparison of the conventional strategy, the left-most solid curve, to the recursive strategy with regards to the effort given by n. The slope of the recursive curves gets closer to the slope of the conventional case the more snaps are used. Note that in the conventional case the number of snaps is equal to n. Hence, this figure shows the clear advantage of the recursive method with regards to memory. Specifically, whereas an increase in n in the conventional case leads to an increase in tape usage, the recursive strategy enables the user to consider a wider range of n for a fixed tape size dR. The J.M. RESTREPO, G. K. LEAF, A. GRIEWANK feasability of this latter strategy is dictated by the speed of the machine or the willingness to pay for the higher effort involved. Compare this to the previous figure which shows the price payed in higher wall-clock times, the smaller the number of snaps is employed. It may be that the effort required in large problems is significant, but this must be weighed against the fact that these problems may be simply impossible to consider with the conventional strategy. log(effort)2.06.010.0log(n) conventional d=2 d=3 Figure 4. Comparison of the conventional and recursive strategy. Effort versus n. The memory requirement of the conventional case is n. The recursive curves are labelled according to the number of snaps d used. Natural logarithms are used. [4]. Application to a Quasi-Geostrophic Ocean Problem The recursive procedure's viability will be demonstrated by applying it to a quasi-geostrophic model [15] [16], which was considered in Tziperman and Thacker's study [13], hereon referred to as T&T. The dimensionless equations over a unit-square box in x and y are where /(x; are the streamfunction and the vorticity, - (x; y) is the wind stress. J(\Delta; \Delta) is the symbol for the Jacobian of its arguments, and \Delta is the Laplacian operator. The dimensionless real parameters R, ffl b , and ffl h are the Rossby number, the bottom friction factor and the horizontal friction factor respectively. The state variables evolve in time t and are subject to no-flux and no-stress boundary conditions at the edges of the box. The equations were discretized using multi-grid finite-difference techniques. The formulation was first-order accurate in time and second-order accurate in space. In what follows it will be understood that the state variables are only defined on the uniformly discretized grid in x and y. We will omit explicit mention that these quantities are discretized in space for the sake of clarity. On a discrete time grid i\Deltat, the state variables i i and / i evolve to a steady state e /. Following T&T, an assimilation problem is defined as follows. The observational data will be the steady-state vorticity e i which is independent of time. The state set is taken to be the forcing term curl- , the initial vorticity i 0 , and the parameters ffl b and ffl h . The observations e are determined from a particular (fixed) choice of friction factors effl b and effl h , initial vorticity i 0 and forcing curle- . The system is then integrated forward in time until a steady-state is reached at which point the observations are recorded. For purposes of this artificial assimilation problem, we now "forget" the state set values which produced the observations. The task of the assimilation will then be to reconstruct the state set which generated the observations. To this end, a cost function is chosen which measure the fit of the model result to the observations. Since the observations represent the steady-state, the cost function should measure the departure of the model from steady-state as well as the departure from the observations. In T&T the authors use the following discrete cost function: where the sum is meant to indicate a sum over all the discrete values of the variables over the unit box. The first term measures the deviation from the observations, while the second term in conjunction with the first measures the deviation from steady-state. The matrices C and D are the inverse of the covariance matrices of the observations. The final time step n is arbitrary in this problem. It is chosen to be sufficiently large so that steady-state is achieved. A small value of n reduces the computational cost per optimization iteration however, it increases the number of optimization iterations. Since the number of recorded histories depends on the number of time steps n, the storage requirements are reduced when n is small. In fact, in T&T In their experiment such a choice is possible since the assimilation occurs at just one time level. In the general case, assimilations may occur at multiple time levels, in which case the number of time steps used is determined by the problem and cannot be arbitrarily chosen. The optimization task is to find the state set fcurl-; for which H n is a minimum subject to the constraints of the model equations. A common strategy for computing the minimum is to introduce Lagrange multipliers and the corresponding Lagrange functions for which we seek an unconstrained extremum. A gradient-based iterative algorithm such as the conjugate gradient method was then applied to this unconstrained problem. J.M. RESTREPO, G. K. LEAF, A. GRIEWANK For the discrete quasi-geostrophic model, the Lagrange function has the form ae @i @t @x oe The descent algorithm requires the calculation of the gradient of L n with respect to the state set. The gradient involve the Lagrange multipliers f- which are determined from the gradients of L n with respect to fi g. Equating these gradients to zero generates the adjoint equations for f- which may be symbolically expressed as where \Psi is the forcing term arising from the gradients of the cost function with respect to g. The discrete adjoint equations are integrated backwards in time to generate the Lagrange multipliers - i used in computing the gradients of the cost function as needed by the conjugate gradient procedure. Thus, in the conventional approach, each conjugate gradient iteration requires a forward integration of n steps, which generates the value of the cost function, followed by a backward integration of the adjoint equations. This adjoint integration generates the gradients used in the conjugate gradient iteration. It is noted that the state set is required to effect the calculation of the Lagrange multipliers. Ordinarily the state set at each time step i is required for the calculation in the adjoint problem, hence these are recorded in the forward sweep. Since only the state variables are time-dependent in this particular problem, we need only record the state variables i at each time step. The remaining components of the state set need to be recorded only once during the forward-backwards sweep. The observations were synthesized by running the discretized version of (4.1) to steady-state using To demonstrate the performance of the recursive forward-backward integration strategy for the calculation of the gradient we compared model runs of this experiment using T&T's original multigrid Fortran code against a version of the code which was identical in all respects to T&T's code except for a subroutine that generates the schedule and minor modifications to the program to enable us to carry the schedule out. As a first step, we thoroughly verified that our program results yielded identical results to the conventional case. The wall-clock time was negligibly higher for the recursive program running in the conventional mode, reflecting the additional computational expense of generating the schedule. In the experiments to be reported, the optimality tolerance for the NAG conjugate gradient routine was set to 10 \Gamma3 in all model runs. The square of / summed over the box was the residual in the calculation. The forward run used to create the observations stepped in time until the residual was below 10 \Gamma7 . The multigrid depth was fixed at 4 levels for all experiments that follow. The codes were executed on a Sparc 10/51 running SunOS 4.1.3U1. The Fortran Sun compiler used was Fortran Version 1.4 with optimization memory (floats)100300500700n Figure 5. Comparison of the conventional and recursive strategy on the T&T problem. Tape versus n. In the recursive strategy the snaps was held fixed at 5. The recursive strategy has a fixed tape length of 1089 floats. flags turned off. All runs were performed in double-precision arithmetic. Wall-clock times reported encompass the solution to the full problem. In all experiments performed the answers from both strategies were identical. Figure 5 shows a comparison of tape usage for the conventional and the recursive strat- egy. In the recursive trials the snap count was held fixed at 5, explaining why its curve for tape usage is a vertical straight line. As mentioned previously, for the conventional case the tape usage is proportional to the number of time steps n. From Figure 5 the tape for the conventional case. It follows from this experiment that if there was a fixed amount of tape on a particular machine, that the conventional approach would be impossible for sufficiently large problems. Figure 6 shows the wall-clock time for the same experiment. In all trials the conjugate gradient procedure converged in three iterations. The conventional wall-clock time seconds, the recursive version took 14 J.M. RESTREPO, G. K. LEAF, A. GRIEWANK time (seconds)100300500700n Figure 6. Comparison of the conventional and recursive strategy for the T&T problem. Wall-clock versus n. In the recursive strategy the snaps was held fixed at 5. The rightmost curve corresponds to the recursive strategy. longer to complete and it's growth is not linear. Table 2 contains further information on this particular set of trials. Another typical problem in which the recursive strategy would prove useful is illustrated by the following example. In this assimilation problem we have some flexibility in choosing the integration time, since the only requirement is that it must be longer than n , where is the minimum number of steps for a steady-state solution. This is precisely the type of problem investigated in Tziperman and Thacker's study [13]. Suppose that for a particular resolution the problem "fits" and thus can be solved on a particular machine using the conventional approach. In order to double the spatial resolution, the conventional strategy would require a four-fold increase in tape storage. The doubly-resolved experiment no longer could be performed on this particular machine. However, the problem could be solved using the recursive approach so long as the maximum tape length is not exceeded. Table 2. Ratio of the wall-clock time for the recursive conventional approach versus n and number of reps for the T&T problem. Suppose that the maximum tape length on this machines is 60984 floats. This is the actual requirement of the singly-resolved T&T problem with spatial grid with 4 refinement levels. Table 3 provides the results of several runs using the recursive strategy for the doubly-resolved problem. Supposing that the conventional procedure could be could be carried out, for the tape length for the doubly-resolved problem would be 236600 floats and it would have taken 40:42 seconds to execute. The table demonstrates that the doubly-resolved problem can be succesfully carried out in two to four times the amount of time that it would take to run the conventional procedure assuming that it could be possible to compute conventionally in the first place. Table 3. Wall-clock time and tape length for the recursive conventional approach versus n in the T&T problem for a doubling of resolution. time (secs) tape (floats) snaps reps [4]. Conclusions We have shown in this study how a recursive strategy due to Griewank [14] for the adjoint-method calculation of the gradient may be applied to large-scale geophysical variational data assimilation studies. The main result is that significantly larger assimilation studies can be performed using this recursive strategy than is possible using the conventional forward-adjoint methods, given the physical limitations of available computer storage hardware, at the expense of a reasonable additional computational effort (or wall-clock time). Furthermore, the procedure yields the gradient with no degradation as compared J.M. RESTREPO, G. K. LEAF, A. GRIEWANK to the conventional approach. In theory, when the number of snaps and reps, i.e. the number of storage units (measured in R), and the number of additional unrecorded forward runs, are equal, these are both bounded by log 4 n, where n is the number of time steps in the evolution equation. In practice, the strategy is best used by picking the maximum number of snaps that the particular computer hardware can manage, thus minimizing the number of reps. It is remarked that s are elements of Z + , is not a complete covering of Z . Furthermore, the distance between neighboring elements of the set gets larger the larger n is. The reader may thus be wondering what is the strategy when options may be viable: (1) pick an n 2 Z n which is greater than or equal to the required number of time steps in the problem, fixing d, say, and adjusting r so that n is slightly greater than n; (2) pick a finer (or coarser) time discretization; Circumventing storage limitations by far outweigh the relatively minor complication presented by the fact that Option (1) is the simplest and is suitable in the T&T problem. We foresee that the recursive strategy would be simplest to implement in problems like steady-state climate, hydrology, oil-recovery, etc., and least straightforward in problems like metereological forecasting, earthquake forecasting, and the like. For the forecasting problems perhaps an alternative partitioning algorithm with a denser set Z n may be considered more appropriate. Insofar as computer program design, the best strategy for large-scale problems is to construct programs that are as compute-intensive as possible and the least memory-intensive. This yields the greatest variation in the computational effort for any given choice of snaps and reps. This is especially true in parallelized programs because the computational effort will drop the greater the number of processors used, whereas the storage requirements remain fixed independent of the number of processors. The implementation of the recursive strategy requires minimal modifications of conventional codes that compute forward and adjoint problems. The requirements are that four modules be provided, namely (1) a forward module that runs without recording the state set between a specified starting and an ending time step; (2) a module that computes a single unrecorded forward and a single adjoint step, given a specific time step; (3) a module that records to tape the state set at the current time step; and (4) a module that retrieves from tape the last recorded state set. An additional module, which is to be considered the driver, runs the above-mentioned modules according to the recursive schedule. The driver requires as input the total number of time steps, the number of snaps and the number of reps. One approach in the implementation of the schedule driver is to have the schedule computed only once at the top of the program. The schedule instructions are saved in integer arrays which are then called in sequence to drive the four modules. The benefit of precomputing the schedule is not warranted in some applications, since the schedule module increases insignificantly the overall computational effort. The preferred alternative is to use the schedule driver to control the above-mentioned modules thus not wasting register memory for the schedule arrays needed in the first approach that could otherwise be used in the adjoint problem. An estimate of the additional memory for the integer schedule arrays of the first approach is as follows: a "schedule array" with the instruction directives of size 2rn is required, plus one or two arrays of similar size which direct the recording and accessing of snaps from tape. The total register overhead is then in the order of 4rn integers. The user's particular application will clearly dictate which of these alternatives works best. This schedule driver is available via anonymous ftp from info.mcs.anl.gov. The file is called /pub/tech reports/restrepo/schedule.tar.Z. Alternatively, the schedule software is available in either Fortran or C versions from the word-wide-web in the software section of http://www.mcs.anl.gov/people/restrepo/index.html. J.M. RESTREPO, G. K. LEAF, A. GRIEWANK --R Metereological Data Assimilation for Oceanographers. Variational Four Dimensional Analysis Using Quasi-Geostrophic Con- straints Finding the Steady State of a General Circulation Model Through Data Assimilation: Application to the North Atlantic Ocean Newton's Method with a Model Trust Region Modifications Solution of Nonlinear Finite Difference Ocean Models by Optimization Methods with Sensitivity and Observational Strategy Analysis The Role of Integration Time in Determining a Steady State through Data Assimilation An Adjoint Method for Obtaining the Most Rapidly Growing Perturbation to Oceanic Flows Fitting Dynamics to Data Variational Assimilation of Meteorological Observations with the Adjoint Vorticity Equation An Optimal Control-Adjoint Equations Approach to Studying the Oceanic General Circulation Achieving Logarithmic Growth in Temporal and Spatial Complexity in Reverse Automatic Differentiation Driven Ocean Circulation- Part 2 --TR --CTR Andreas Griewank , Andrea Walther, Algorithm 799: revolve: an implementation of checkpointing for the reverse or adjoint mode of computational differentiation, ACM Transactions on Mathematical Software (TOMS), v.26 n.1, p.19-45, March 2000 Patrick Heimbach , Chris Hill , Ralf Giering, An efficient exact adjoint of the parallel MIT general circulation model, generated via automatic differentiation, Future Generation Computer Systems, v.21 n.8, p.1356-1371, October 2005 Yanhua Cao , Jiang Zhu , Zhendong Luo , I. M. Navon, Reduced-Order Modeling of the Upper Tropical Pacific Ocean Model using Proper Orthogonal Decomposition, Computers & Mathematics with Applications, v.52 n.8-9, p.1373-1386, October, 2006 Matthias Heinkenschloss, A time-domain decomposition iterative method for the solution of distributed linear quadratic optimal control problems, Journal of Computational and Applied Mathematics, v.173 n.1, p.169-198, 1 January 2005
gradient;variational data assimilation;storage;recursion;adjoint model;natural resources recovery;climate;meteorology
300255
Selected Research Issues in Decision Support Databases.
A flurry of buzzwords awaits anyone investigating database technology for decision support: data warehouse, multidimensional and dimensional database, on-line analytical processing, star schema, slicing, dicing, drill-down and roll-up. We introduce the area via an example based on a long-ago project to design a repository on energy information for the US Department of Energy. Once we have introduced some terminology, we explore research issues associated with decision-support databases, including representation, modeling, metadata, architectures and query processing. The purpose of this paper is to provide researchers with the background they need to contribute to this area.
Introduction Decision-support databases raise issues that are often quite distinct from those encountered in transaction processing systems. In this paper we present what we regard as important areas for research and development for decision-support databases, particularly those aspects that arise from the dimensional view of data. Some of the new focus on decision-support databases is due to the continued drop in prices of hardware and system software, particularly disk storage and memory. These lower prices in turn have fueled an interest in data warehousing, as companies find it economically feasible to keep large amounts of historical data on line. It is no longer prohibitive to duplicate data from operational databases into a central warehouse. Another reason for adding decision-support capabilities to relational products has This research was supported in part by NSF grants IRI-9118360 and IRI-9509955. This research was by NSF grant IRI-9119446 been the difficulty of supporting both decision support and transaction processing queries in one environment, especially a distributed environment. Once companies bring a data warehouse on line, they of course want to derive a competitive advantage from it, which has created a demand for tools to probe and analyze such data resources. Some of the most popular tools are those which support a dimensional view of data, including statistical and OLAP techniques. Statistical and scientific databases have long supported operations that have only recently been discovered by OLAP vendors and researchers [SHO97]. We will provide references to this previous work, although our main focus is on OLAP queries. In this paper we have tried to encompass both the academic and industrial perspectives, noting where possible the state of commercial progress in these areas. However, it is hard to track every new development, and products are progressing rapidly, so we are bound to be incomplete or somewhat out of date in places. We begin in the next section by describing a real-life example of a decision-support database, in order to illustrate the new twist that the dimensional view brings to data management. This view of data is not well supported by data models traditionally associated with database management systems, such as hierarchical and relational. While structurally the dimensional view resembles tabular models, many of the data manipulations that arise in this view have not been well supported in conventional data manipulation languages such as SQL. Sometimes they are expressible, but only with convoluted queries or with poor performance [GRA96]. We illustrate common kinds of operations on dimensional data in the context of our example, as they may be unfamiliar to readers used to standard relational databases. These limitations of conventional DBMS languages with regard to dimensional manipulations have been known for some time, and the market has responded in different ways. Some companies have brought out products with specialized storage managers for dimensional data that store it compactly and make dimensional operations on it efficient. Other companies provide tools that operate on top of existing relational DBMSs. These tools extract data and present it in a dimensional way, often with graphical interfaces that allow direct application of dimensional operators. Of course, extending standard relational systems is another approach, but most vendors have responded slowly. We think there are several factors that account for this slow movement. One is that popular database benchmarks, such as TPC-C and TPC-D, capture only limited aspects of dimensional manipulations, hence have not been a feature or performance driver for dimensional capabilities. Second, new features may be deprecated if they are not part of the SQL standard, and it is often a glacial process to extend that standard. Finally, suitable access methods and performance support may be lacking in the underlying implementations, and such enhancements are expensive. This is an exciting time for dimensional analysis of warehoused data. The research community has only recently responded to the commercial proliferation of tools, and the commercial community is still in turmoil over which of the approaches outlined in this paper is most appropriate. We hope that this paper provides the research community some guidelines as to which topics in this fruitful field are ripe for picking. Motivating Example In response to the Arab oil embargo of 1973, and the resulting energy shortage, the started gathering data on energy import, export, production, transport, storage and use in the US, down to the level of individual oil wells and pipelines, in some cases. One of the authors (DM) participated in this effort. States and energy companies were required to report monthly data on production, energy in storage, conversion, and so forth. The purpose of this data gathering effort was that in times of future energy shortage or dislocation (such as a flood blocking a rail line and halting coal deliveries), federal decision makers would be able to assess the severity of a problem, predict its extent (both temporally and geographically) and suggest actions to ameliorate it (generate more electricity at gas-fired power plants and have coal-fired plants back off, for example). In practice, the data were nearly useless for supporting decision-makers with an urgent problem to solve. The difficulty was that the data, though timely and comprehensive, had been assembled in somewhere between 51 and 53 separate databases. (We never got a definitive count.) These databases did not interoperate. (Remember, it was the mid-1970's.) When an energy emergency arose, the response was to dump the contents of various databases to paper, and stick piles of printouts into a room with a bunch of people, who would try to compare and collate it manually. About two weeks later, the people would emerge from the room with some kind of assessment of the problem, by which time the problem had either resolved itself or become a crisis. Thus, although the DOE had the information they needed to analyze energy emergencies, they could not bring it effectively to bear in support of decision-makers analyzing those emergencies. Having the data partitioned into 50 or so independent databases was probably necessary, in order to divide and conquer the problem of data modeling and collection for such a broad area. Enter the Energy Emergency Management Information System (EEMIS) [CRO79a, CRO79b, CRO79c, DAC79]. The goal of EEMIS was to pull data out of the 50-odd individual databases into a single database, where cross-sector analyses could be answered without consuming several boxes of paper. EEMIS was to be what today we would call a data warehouse-a central repository that combines and summarizes data from multiple sources on an enterprise-wide basis. In the case of EEMIS, the enterprise was all the energy in the United States. The job of producing the conceptual model for EEMIS was contracted to the Technology Assessment Group of the Department of Energy and Environment at Brookhaven National Laboratory in New York state. The staff there had one look at it and promptly subcontracted the job to a group of professors and graduate students at the State University of New York at Stony Brook. They struggled with the design problem for a semester, and came up with a design that was a cross between a relational and hierarchical schema, with about 145 field types and 190 segments. From a high level, the domain didn't seem that complex. There were types of energy whose amounts were measured at certain time periods, for energy facilities and transportation links. For example, There were 635,000 barrels of Saudi Arabian Light crude oil in the Exxon storage facility at Bergen, New Jersey at the end of April, 1978, or 2.43 million cubic feet of natural gas moved between the Getty Bastion Bay gas processing plant and the Lake Charles LNG terminal in June, 1975. It seems simple enough. Why the need for hundreds of fields and record types? The problem was all the summary data that was needed. As a simple example, while oil well production figures were reported monthly, in addition, quarterly and yearly totals were of interest. Life gets a bit more complex when considering forms of energy. There are individual energy types, such as Aviation Gasoline, Propane and Labuan Light Crude Oil. Energy types belong to energy groups, such as Gasoline, Light Products and Foreign Crude. Groups form categories, for instance, Wet Gas and Crude Oil. From categories there are sectors, such as coal, petroleum and natural gas. At the top of the hierarchy is the "Universal" form of energy. (See Figure 1.) Facilities were more complicated still, as there were two ways to classify them, by function and by geographic location. Function classified a facility as to what role it played in the energy chain of import or extraction, conversion, storage, and export or consumption. Examples of facility functions are crude storage, refinery, underground natural gas storage and military consumer base. Functions are further combined into sectors, such as petroleum, natural gas or large consumer. (See Figure 2.) Top Sector Category Group Type Universal Coal Petroleum Electricity Natural Gas Crude Oil Oil Product Wet Gas Dry Gas Foreign Domestic Gasoline Light Products Labuan Light Aviation Leaded Propane Ethane Figure 1. The Hierarchy of Energy Forms Geographically, the primary grouping was by political boundary: county, state, region (Pacific Northwest, Mid-Atlantic), nation. However, there were also non-political areas, such as oil fields, that cut across state or even regional boundaries. Transportation links were handled similarly to facilities. A link was categorized by its mode (pipeline, rail, barge, truck, oxcart, etc.), the functions of the source and destination facilities it connected, and its geographic location. The last was problematic, as a pipeline, say, could cross many areas. Finally, there was a grand classification over both facilities and links called "RES (for Reference Energy System, a particular model). It was a broad classification that spanned energy sectors and had classifications such as "extraction", "transmission" and "refining and conversion." One of the big debates during the database design was whether or not to store aggregated values. On the one hand, computing, say, a national total of all petroleum production over a five-year period from monthly information on individual refineries would take an unacceptable amount of time. However, precomputing and storing all possible aggregations of interest would be prohibitive in space usage. Furthermore, it was not clear that we could predefine all the aggregates needed, since arbitrary groupings in the time dimension (e.g., November 1973-April 1974) might be of interest. In the end, we provided for the schema to store many aggregate values, but did not assume that the data would actually be precomputed for all of them. (Some of the aggregates were already present in the component databases being integrated, and we wanted to be able to capture those values at least.) We had an inkling that there should be a way to manage the precomputation and use of aggregates to make time-space tradeoffs. For example, it probably wouldn't make sense to store both regional and state aggregates, as the former can be computed quickly from the latter. However, perhaps this aspect should be dealt with at the physical design level, rather than being fixed in the logical design. 3 Dimensional Databases and OLAP Our goal in this Section is to illustrate and define the OLAP style of access to dimensional databases. Our goal is not to be comprehensive, but only to provide Top Sector Function Individual All Petroleum Natural Gas Large Consumer Import-Export Crude Storage Refinery Military Base Pennzoil, Rosewell, PA Gulf, Toledo, OH Figure 2. The Hierarchy of Facility Functions enough background to help the reader understand the research issues we raise in Section 4. A more through treatment can be found in [KIM96]. A recent survey [SHO97] demonstrates clearly that many if not all of these concepts have been in use by the statistical database community for years, although the emphases have been somewhat different: the statistical community has emphasized modeling issues while the OLAP community has emphasized performance. The commercial and application segments of the database community have recognized for a while a frequent pattern of base facts and aggregate dimensions occurring in decision-support databases [DEM94, FIN95, FRA94, KIM95, SQU95, KIM96]. The research community has only recently focused its attention on this area [GRA96, HAR96, SAL95]. (However, there has been a history of work in processing aggregation queries [CHA95].) There are dozens of front-end and back-end products currently on the market to support datasets of this form. Let us be a bit more precise in our characterization. In this paper, we define a dimensional database 3 (DDB) as one that stores one or more kinds of base facts, and connects them to dimensional information [MEK96]. We construe DDB more broadly than just On-Line Analytical Processing (OLAP) tools. In particular, it does not imply a particular representation for the fact and dimension information. The base facts typically contain numeric fields, which queries aggregate via summary, taking optima (max and min), computing averages and so forth, via the classifications defined in the dimensional information. The dimensional information can also be used to select subsets of the base facts. The EEMIS database had base facts on amounts and costs of energy, and dimensional information on time, energy form, and link and facility function and geography. 4 The dimensional information consists of one or more independent dimensions, each of which can be structured as multiple levels of granularity. A dimension hierarchy represents one aspect for classifying the base facts, and the levels represent finer or coarser grouping of base facts along their respective dimensions. In the EEMIS database, there is an energy form dimension, with levels of energy type, group, category, sector and top, as shown in Figure 3(a). The levels along a dimension need not form a strict hierarchy, however. Figures 3(b) and 3(c) show dimensions where 3 Originally the term multi-dimensional database was used for what we call dimensional database. However, lately the term multi-dimensional database has come to be identified exclusively with ROLAP architectures, defined in Section 4.3 below. 4 There is another kind of dataset that could be called dimensional, as found in many scientific and engineering applications. There the dimensions of the dataset represent continuous independent variables, such as time, latitude, longitude and altitude, and values at the interstices are measurements of dependent variables, such as temperature or pressure. While such datasets offer interesting challenges of their own, we do not include them in what we mean by DDBs. some of the levels contain incomparable groupings over lower levels. For example, in the time dimension, days can be grouped into weeks and months, but week and month boundaries do not line up. (In fact, weeks and years don't line up exactly, but some commercial calendars have conventions for making them line up.) Most DDB tools have a component to let a database designer declare and populate the dimensions when setting up a database, but end users might still want to define new groupings dynamically, such as combining months into two-month periods. We will refer to the alternative values within one level of a dimension as labels, though we do not mean to imply they are always strings. For instance, "Coal" is a label at the sector level of the energy-form dimension. We point out here that we know of no strictly syntactic characterization of when a particular database is a DDB, such as a certain schema pattern. All examples of DDBs we are aware of include a time dimension, which follows from their being directed at analyzing or characterizing a business process, which is by nature an ongoing activity. However, not every database with a temporal aspect is a DDB, nor is every decision support database or data warehouse. The common access patterns characterize a DDB as much as the structural features. DDBs may be used to generate standard reports, or support a particular canned application, but more interesting is their use in On-Line Analytical Processing (OLAP) [COD94, THE95]. OLAP is ad hoc, exploratory data analysis, where a decision-maker is seeking patterns, trends, anomalies, correlations and so forth in order to better understand the history, current status or future of some aspect of the enterprise. OLAP usage of data is best characterized by the sequences of operations that users perform, rather than just the style of single queries. (The terminology we use is borrowed mainly from Kenan Technologies [KEN94] and Ralph Kimball [KIM96].) In this paper, we will use "OLAP" to refer to a particular style of access to DDBs. We do not intend it to indicate a particular form of database schema or a particular software architecture, nor do we equate it with all decision-support access to databases. Top Sector Category Group Type Figure 3. Levels Within Different Dimensions Nation Region State County Location Oil Field Gas Field Day Week Month Quarter Year (a) Energy Form (b) Geographic Area (c) Time An OLAP session will often start with browsing, or "surfing", the database, looking at different parts of it until some item of interest appears. For example, in the EEMIS database, a user might start by looking through petroleum shipments quarter by quarter and country by country. End-user OLAP tools generally let users view data in a spreadsheet-style display, with labels from one or more dimensions on the rows and columns, and base values or aggregates of those values in the cells. In Table 1 we see a fragment of the display, with labels for nations across the top, and petroleum energy groups and calendar quarter down the left side. The cells contain values for the amount of import of a given energy group in a given quarter from each country. Imports Albania Algeria Angola . foreign crude Q1 1973 22.0 106.2 55.3 . Q2 1973 23.4 88.9 46.7 . gasoline Q1 1973 9.2 18.0 0.0 . Q2 1973 5.3 17.2 0.0 . light products Table 1. One View of EEMIS Information Once an area of interest is found, the user may tune his or her view of it. One way to modify the view is via ranging (or "data dicing"), where a subset of the fact data is selected based on labels along certain dimensions, attributes connected with those labels (such as the sulfur content of an energy type), or values of the cell data. In Table 2, the view has been limited to three countries, the foreign crude group and calendar quarters from 1976. In this case, we are depicting the entire display, rather than just a fragment of it. Imports Algeria Gabon Venezuela foreign crude Q1 1976 122.5 43.7 309.5 Q2 1976 101.4 11.2 266.2 Imports Algeria Gabon Venezuela Q3 1976 96.0 50.3 300.1 Q4 1976 118.1 53.0 288.3 Table 2. View Modified with Range Selections Another kind of view modification is rotation (also called "data slicing" or "pivoting", though we have seen the term slicing used for both rotation and selection). Rotation allows the user to change which dimensions occur along each side. Table 3 shows the result of rotating the nation labels to the left of the view, with energy group nested underneath, and bring the calendar quarters to the top. Imports Q1 76 Q2 76 Q3 76 Q4 76 Algeria foreign crude 122.5 101.4 96.0 118.1 Gabon foreign crude 43.7 11.2 50.3 53.0 Venezuela foreign crude 309.5 266.2 300.1 288.3 Table 3. View Modified via Rotation The other main kind of OLAP manipulation is to shift the level of aggregation along the dimensions. Going to a lower level of aggregation is called drilling down, while going to a more aggregated view is called rolling up. For example, in Table 3, the user may wonder about the dip in imports from Gabon in the second quarter, and could decide to drill down to the energy type level under Gabon, and perhaps roll up the quarters in the time dimension to yearly totals, as shown in Table 4. (Note that it is possible to have more than one level of aggregation showing for a dimension at one time.) The modified view shows that exports of one type of crude, Gamba, dropped to zero during the second quarter of 1976, perhaps because of a break in a pipeline or problems at a shipping port. Drilling down and rolling up need not be limited to levels in the dimension hierarchies. Attributes of dimensions can be used to group values. For example, the crude oil energy category could be split up into low-, medium- and high-sulfur- content oil, or nations could be grouped into OPEC and non-OPEC members. Imports Q1 76 Q2 76 Q3 76 Q4 76 1976 Imports Q1 76 Q2 76 Q3 76 Q4 76 1976 Algeria foreign crude 122.5 101.4 96.0 118.1 438.0 Gabon foreign crude 43.7 11.2 50.3 53.0 158.2 Anguille 8.1 7.1 9.5 8.0 32.7 Gamba 30.6 0.0 35.5 38.3 104.4 Mandji 5.0 4.1 5.3 6.7 21.1 Venezuela foreign crude 309.5 266.2 300.1 288.3 1164.1 Table 4. Drilling Down and Rolling Up Many other forms of aggregation can be used in manipulating DDB data, besides simple sums: rankings, percentiles, extrema, running totals, and so forth. Other forms of derived data, such as differences and ratios, are also of interest. We note here that base facts will not always be summable values. For example, sums of inventory levels at points in time do not make sense, though other kinds of aggregation do apply, such as averages and minima. Base facts need not even be numbers. A DDB of sales or order information might include a code for mode of payment, if its finest level of information were individual transactions. We have touched on the fundamentals of DDBs, and will now consider some of the research issues they engender. Research Issues In this section we discuss various research issues raised by the DDB paradigm. In some cases these issues are relevant only for OLAP queries, and we identify those cases. We begin with external issues, including how the data is to be represented and the importance of metadata. Then we consider internal issues such as query processing, parallelization and materialized views 4.1 Representation Given the kinds of information and operations common for a DDB, what are the possible logical representations for DDB data? In this section we describe three possible representations for DDB data: a classical schema, like the one used by EEMIS, a so-called star or snowflake schema which is relational but better suited to OLAP-style queries, and a non-relational, array or cube representation well suited to OLAP-style queries. 4.1.1 The Original Schema In retrospect, the recommended design for the EEMIS data warehouse was not well matched to OLAP-style queries. The structure of the data tended to overly reflect the organization of the component data sources, which were biased to the reporting structure of the data. That structure tended to overdecompose data relative to the way that users wanted to access it. The EEMIS schema was also biased towards certain dimensions, based on where new labels are likely to be added to a level. For example, new facilities are not added frequently, nor are new energy types, but new time periods are added every month. Thus, EEMIS ended up with hierarchical schemas with facility information at the top, then energy form information, and time periods at the bottom. For example, Figure 4 shows a simplified version of the schema for an oil product bulk terminal (a kind of storage facility). Facilities with different functions ended up being represented in different hierarchies, because they had different attributes. This organization supports roll-ups along the temporal dimension adequately, and roll-ups across energy type are not too bad to compute. Roll-ups over facility location or sector are difficult because records from different hierarchies are involved. 4.1.2 Stars and Snowflakes DDBs implemented in relational DBMSs usually have a schema that does not emphasize one dimension over another. Instead, there is a logical schema build around a fact table that is linked to one or more dimension tables. Although the arrows of Figure 4's hierarchical schema are quite similar to those of Figure 5, those of Figure one-directional access to data. The simplest form is often called a star schema-the base fact table is portrayed in the center, and the dimension Bulk Terminal Facility ID Location Facility Name Company Total Capacity Figure 4. Hierarchical Schema for Oil Product Bulk Terminal Energy Type Code Product Type On Date Quantity Type on Hand From Date To Date Quantity Received tables arrayed around it, as shown in Figure 5. The ENERGY FACT records contain foreign keys for the three dimension tables. Usually, a relational schema needs to be more complicated than this, because of the richness of information in some dimensions. It may be that a dimension has independent subdimensions, such as the location and function aspects of the facility dimension, or that storing labels for all hierarchy levels in a single table creates redundant information. For instance, rows in ENERGY FORM will repeat the relationship between an energy group and its category many times. The redundancy can be worse if there are attributes functionally determined by associated labels, such as the name of the energy commission for a state. Thus, following the tenets of normal forms, the dimension tables can be broken out further, becoming a snowflake schema, as in Figure 6. There are other variations on the theme. Many OLAP-style queries can be answered using SQL queries against star and snowflake schemas, via joins of the fact table with one or more dimension tables, grouping and filtering on label fields and aggregating on fact fields. However, such queries can be expensive to compute, and SQL cannot express all varieties of aggregates without extensions or use of multiple statements [GRA96]. Facility Amount Figure 5. Relational Star Schema for Energy DDB Energy Facts Energy Form Time Period 4.1.3 Array Representation A third approach is adopted by some DDB products that have their own storage managers. That approach is to store the base fact values in a n 1 by by . by n k array, where n is the number of labels at the lowest level in the i th dimension, there being k dimensions in all. The representation has the advantage that label information is stored once, external to the array, and the array stores only base values. Ranging can be done by indexing into the array. The exact set of cells for a particular roll-up can be calculated easily as well. A downside is that base facts might not be dense in all dimensions. For example, crude oil energy types are generally associated with single countries. Gabon exports Gamba crude oil, but no other country does, so the intersection of Gamba and any other country will always have a zero value. Thus, sparse array structuring techniques are needed for space efficiency. This approach works best with base facts of constant size, such as numeric values. Research Issues: We raise a few issues here about representing DDB fact data with standard relational tables versus a customized representation, such as arrays. 1. Does the representation allow the fact data to be decomposed into a union of small structures? Having smaller pieces can make data more manageable, for archiving and reorganization, for example. Relational tables are easily split into segments. Many relational databases have support for physical partitions of a single table already, usually in support of parallel access or evaluation. These implementations vary greatly in sophistication and functionality [INF96, ORA97, SYB98]. SQL databases are starting to provide union views, which means partitioning could take place at the logical level. Any dimension or group of dimensions could be used for decomposing a fact table. Most array representations would seem amenable to partitioning only along the dimension that varies most slowly in the physical layout. Facility Amount Figure 6. Snowflake Schema for Energy DDB Energy Facts Energy Type Time Period Energy Group Facility Function Facility Location State 2. Whether the fact data is sparse or dense relative to the cross product of dimension labels seems to have a great affect on whether tabular or array representation is more space efficient. The tabular representation has the advantage of just not storing a row for a combination of dimensions where no fact value is present, whereas some array representations will devote space to fact values whether they are present or not. On the other hand, the tabular representation explicitly stores dimensional information (at least keys) for each fact, whereas such information is implicitly associated with facts in the array representation, and not stored as part of the fact structure. Neither of the arguments above is the last word-there are schemes to compress tables with frequent repetition of column values between successive rows, and sparse array representations are in use in some DDB products. Are there any other natural representations for DDBs? Would object-oriented representations help here? 4.2 Modeling Issues While the dimensional view of data captures much of the modeling complexity of the EEMIS database, there are still some issues not addressed. 4.2.1 Non-Uniform and Non-Tree Hierarchies The dimension hierarchies we presented showed uniform depth in classification. In fact, that was an oversimplification. For example, in the geographic hierarchy, there was no breakdown for regions, states and counties for foreign countries. Hence, one could drill down on the United States, but not on, say, Saudi Arabia. In the energy form hierarchy, there was no differentiation at the category, group or type levels for electricity-kilowatts are kilowatts. Also, while the EEMIS hierarchies had uniform levels across them, that arrangement may have been artificial. In the geographic dimension, not every facility had an associated oil or gas field. There is no a priori reason to expect that the natural levels of classification for production facilities would be the same as for energy consumers. In fact, the consumption sector in EEMIS could have used an additional level of classification based on size. The relationship between labels at one level in a dimension to a higher (more aggregated) level need not be many-to-one, though our examples have had that structure. The higher level could represent overlapping categorizations of the lower level, giving a many-to-many relationship between labels at the two levels. For example, a store may have groupings of products such as "economy size," "seasonal" and "promotional," where a single product could belong to all three groupings. Research Issue: How can DDB models and tools accommodate non-uniform dimension hierarchies? Can the different representations described previously handle many-to-many categorizations? Can a many-to-many categorization be reduced to several many-to-one categorizations? 4.2.2 Instances, Intervals and Time Shifts The time dimension has some of the most complex semantics. While the finest granularity in EEMIS for that dimension was monthly reports, "April 1976" did not mean the same thing in all contexts. In some cases, it means a value associated with the entire month of April (or a one-month period ending in April), such as for production from a gas well. In other cases, it means a measurement at a particular time in the month, such as quantity on hand at a storage facility. In the EEMIS data sources, the dates of measurement were not uniform within a month. Thus, it was possible that storage facility A reported figures for 10 April, and facility B reported for Figures for A and B might count the same oil twice, if it moved between A and B between the 10 th and the 25 th . It may be that such problems are more a manifestation of poor design of reporting protocols rather than inherent modeling problems, or that different aspects of time are handled adequately by current temporal data models. However, different data sources that are feeding into a data warehouse may well have different time conventions, and features for interpolation and adjustment would be useful. Note that simply going to a finer granularity for the lowest level in the time dimension could cause a great expansion in the size of the fact data Research Issue: Are current approaches to time in databases adequate for DDBs, or are new capabilities needed? 4.2.3 Regularizing Data The data being combined in a DDB may not have uniform domains for the values being aggregated by OLAP queries. For example, a company tracking sales might count individual items at retail outlets, but use case lots in recording institutional sales. Obviously, the units have to be reconciled before aggregating across retail and institutional segments. In the EEMIS domain, different energy sectors had different ways of measuring energy: barrels of petroleum, cubic feet of natural gas, tons of coals, kilowatt-hours of electricity. Combinations across sectors demanded conversion to a common measure, such as BTUs. (The conversion is non-trivial in some cases-the BTUs in a barrel of crude oil depend on the specific gravity of its energy type.) Converting everything to common units as it enters the DDB is probably not acceptable, as a user wants to see the normal units when looking at a single sector. Not all regularization problems are simple unit conversions. There may be different conventions for descriptive labels in different parts of a business. Converting to a common system upon entry into the DDB would again deprive users of looking at data in its most natural form, and might also lose information if disparate attributes have to be mapped into a "least common denominator" domain. Another possible problem is overlapping of data represented at a lower level. For example, one dimension level might represent the number of physicians in each department of a hospital. If a physician can belong to more than one department, a sum at this level may obtain more than the number of physicians in the hospital. The problem of regularizing data was first investigated by the statistical database community [LES97]. In [KIM96], Kimball offers solutions for accessing facts associated with heterogeneous dimensions(different insurance products in his example) which allows for custom facts and custom dimension attributes. The approach yields a complicated design and requires high maintenance (add a new product line and you have to add tables to the database and possibly modify tools that access it). Research Issue: Are there simple methods of allowing heterogeneity of data at lower levels of detail and easy addition of new classes, while automatically regularizing it on roll up to higher levels of aggregation? Specialization The hierarchies found in DDBs are not the same as the specialization hierarchies supported in object-oriented databases (OODBs). Dimensional hierarchies ultimately are used to relate states of data items-which instances at a finer level combine to form an aggregate instance at a coarser level. OODB hierarchies concern operations and express relationships between types, not instances. That is, such a hierarchy could express that the "Crude Oil Terminal" type specializes the "Energy Storage Facility" type in that any operation defined on the latter type is also defined on the former. But such a subtype relationship does not induce connections between instances of those types, for example, that the "amount-in-storage" value of CrudeOilTerminal C1 contributes to the "amount-in-storage" value of EnergyStorageFacility E2. Object hierarchies are good for capturing semantics of data items that aren't wholly identical in structure. There were places in the EEMIS design where an OO-style hierarchy would have been useful. There are many similarities between an oil refinery and a natural gas processing plant. It would have been helpful to capture that transportation links are in fact a kind of storage facility for "in-transit" energy. The amount of coal on a rail line or oil in a pipeline can be non-trivial. Current approaches to DDBs demand uniformity in the dimensional entities, which may mean omitting information in order to fit a common pattern. Research Issue: Can the DDB view of data be combined with object-oriented models to allow some heterogeneity in dimensional information, while capturing commonalities for broad aggregates? 4.2.4 Modeling strategies The classic relational modeling strategies, e.g., E-R diagrams, are inadequate for DDB schemas. One problem is that DDB modeling really starts with determining the business processes to be tracked, what granularity of data is needed to model those processes, and which parts of that data are changeable, which are not specifically addressed by conventional data modeling techniques. Also, classical relational modeling favors normalized data, whereas dimensional data is typically unnormalized (e.g., a relational model of Figure 5 would repeat the association of Oil Product with Petroleum many times). The loss of performance from non-normalized data is minimal since dimensions are typically small. Furthermore, classical relational modeling does not group data by facts and dimensions, which is crucial to DDB performance and to process modeling. New approaches to Dimensional Modeling have been described for relational databases [KIM96] and OLAP [BUL96]. Discussions regarding aggregate design are available [MAD96]. However, there is a great leap from description and examples to execution. The bulk of the dimensional design happening today is conducted by consultants who simply have a knack for modeling. Systematic, well-defined approaches available to the public for dimensionally modeling processes are lacking. Bitter debate continues regarding even the use of dimensional modeling. Criteria for designing DDB models need to be developed, analogous to ER diagrams and normal forms for relational models. These criteria could help to answer questions such as which attributes belong in which dimensions (e.g., should the data of Figure 1 be in a single dimension or one dimension per sector?), and whether to store different kinds of values in separate fact tables. A final consideration is that DDB databases are not populated directly from applications, but rather are uploaded from OLTP databases. Thus the design of the DDB schema may be constrained by what data is actually in the OLTP schema. A graphical technique developed for statistical databases [RAS90] may be helpful as a component of new modeling strategies and tools which support them. Research issues: New modeling strategies and design tools are needed to support OLAP applications. 4.3 Metadata The underlying data sources that are used to create a DDB are never as uniform as the DDB schema would indicate. First off, there are issues of completeness. The various states and companies reporting data to the DOE varied greatly in how promptly they supplied information. Thus, a particular reporting period might have base data missing for multiple months. Decision-makers need to use the partial data nonetheless. The problems are how to compute functions such as averages when values are missing, and how to indicate to a user that a particular aggregate was computed from incomplete data. The obvious solution is to use some default values for missing data, but this can give misleading results, e.g. if zero is used as a default numeric value. A more challenging solution is to use metadata to indicate how each aggregate should handle missing data, e.g., computing an average only on available data and informing the user somehow about how much data is missing. Another problem is that some data sources do not record data at the lowest level of granularity in all dimensions. Some of the EEMIS data sources bottomed out at the group level along the energy form dimension, and at the state level in the facility- location subdimension. Thus, it would not be possible to drill down to arbitrary levels in the EEMIS data everywhere in the database. The query execution mechanism must adapt to this situation, for example, by informing the user that certain drilldowns are not possible and why. A third problem is that certain label values might not be present explicitly in a data source. A database on crude oil imports might not contain "crude oil" as an explicit value in any field. This is an issue in any database, but is especially important in dimensional databases where metadata, such as which relations are fact tables and which are dimensions, is even more critical. Research Issues: What kinds of metadata are needed to capture the variability in data completeness and granularity that is sure to arise in a DDB? How can end-user tools exploit that metadata to properly annotate results and indicate legality of operations? 4.4 Architectures Several software architectures have been proposed to support OLAP querying of DDBs [RED95]. We list some of them below. 1. Some products provide special storage structures to hold the array representation described in Section 4.1.3 [KEN94, ESS98, MIC98]. Those structures, typically dimensional arrays with some way to efficiently store sparse data regions, can be augmented with indexes on labels and precomputed aggregates along some dimensions. This architectural approach is sometimes labeled MOLAP, for "multidimensional OLAP". These special storage structures are well suited to OLAP applications, since they require less storage (labels are stored only once for the corresponding slice of the array) and they can respond quickly to OLAP requests (since data is typically clustered and aggregated ideally for OLAP queries). However, there are questions of scaleability with this approach; estimates of the size of database which can be handled with these dimensional array structures range currently from 1 to 50 Gigabytes [INF96, MIC98]. MOLAP architectures can generally populate their specialized structures with extracts from relational databases. 2. Other products, typically based on relational databases, respond to OLAP queries by reading data directly from relational storage structures. These products are highly scaleable, but can suffer from poor performance on OLAP queries. To avoid this, some products use extensive bit-mapping techniques [SYB98], and some apply additional parallel technology [INF98, ORA98]. These are sometimes called ROLAP architectures, for "Relational OLAP." Some relational databases have been tuned to OLAP use, with heavy indexing, optimizations for batch update and bulk access, and extending the query language and processor with new features [RED95]. Conventional systems [INF96, ORA98, SYB98] are being augmented to handle OLAP style queries, but in a limited way. They focus on providing improved algorithms and indexing (cf. Section 4.5.3). Other vendors specialized for OLAP style access [RED97, ESS98] claim to consider the whole environment in a different, more comprehensive way. To some degree this is debated in a DBP&D article "High Noon for the TPCD" [BAL97], as RedBrick believes the DSS benchmark (developed by conventional RDBMS representatives) does not test the things it should for the environment. Each camp satisfies the needs of different users: conventional systems have the advantage of scalability to the terabyte range and the use of legacy systems, whereas vendors specialized for OLAP provide better performance. Which approach is most effective in which cases? 2a. Some OLAP tools [STG97, MIC98, PLA97] read raw data from relational databases but also store some heavily used data in aggregated form. (The database community would call such aggregated data a materialized view.) Performance is much better if the database administrator is wise enough to identify which data will be used heavily, and at what dimensional levels it is aggregated. This architecture is a variant of ROLAP, since the cached data is typically stored in relational tables. 2b. A more sophisticated version of architecture 2a is to interpose an intelligent query manager between the OLAP tool and the DDB, which can perform semantic query optimizations not supported by the query processor of the underlying DBMS and cache results of previous queries. An example of the former is rewriting a query against a union view to access only one of the component tables. An example of the latter is holding on to the rows used to compute an aggregate, in case the user decided to drill down on the same selection of data. This technique of dynamically caching retrieved data will be effective if there is locality to reference patterns, which seems to be the case with OLAP queries (cf. Section 4.5.1 ). Note that with any of these architectures, the OLAP interface itself might keep a specialized structure in main memory to organize and cache data. Research Issues: What are the trade-offs between such architectures? When does it make sense to have a specialized DDB-oriented DBMS, versus conventional systems augmented to handle such applications? 4.5 Query Processing OLAP queries on DDBs present a rich domain for research on query processing and access methods, as well as query language design. 4.5.1 Query Patterns Typical OLAP-type sessions result in sequences of related queries, with high likelihood of overlap. Thus there is a kind of "locality" to the queries. This locality is exemplified by the names of common operations such as roll up and drill down, which imply that the data used is related to that for the previous request. Query optimization of these query patterns is not quite the same as multiple query optimization, where the queries are known all at once. Thus, strategies to take advantage of the locality of sequences of requests must speculatively store previous query results or subexpressions. Proposals on how to organize such information are starting to appear [SAL95, HAR96]. OLAP requests often want data aggregated at multiple levels in the same answer. The Data Cube [GRA96] is an approach to improve relational database support for OLAP- type requests by extending SQL to express such patterns and providing a specialized operator to compute them. As we better understand OLAP-type queries, it will be important to develop benchmarks to capture them. OLAP benchmarks are beginning to be developed [OLA98], though the initial benchmarks are individual queries instead of patterns of several queries. Another issue for benchmarks is adequately capturing the effects of data skew in the test dataset. By data skew we mean here the degree to which facts are sparse or dense over the cross product of dimension labels. A good benchmark would reveal sensitivity to data skew. Research Issues: What other techniques can be applied to sequences of overlapping OLAP queries? Are there new auxiliary access structures that would aid in evaluating these kinds of queries? Does the DataCube extension to SQL adequately cover the space of OLAP requests, or are there common forms of OLAP requests that are still hard or impossible to express in SQL even with that extension. What are actual patterns of customer OLAP queries? What are appropriate benchmarks of query sequences? 4.5.2 Materialized Views Different users of OLAP interfaces will often issue queries over the same subsets of data and will perform similar aggregations over them, for example a time slice for the most recent year's data or a roll up by states. This commonality makes it likely that storage of materialized views will be effective in reducing the cost of queries, which use all, or part of those views. Some commercial vendors [INF97] have implemented the storage of materialized views, and replication mechanisms implicitly support materialized views by allowing replicated data to be specified by a query [STA94]). Recently Red Brick has introduced a sophisticated version of materialized view storage in its Vista System [RED97]. The research community has contributed to these issues [MUG96]. There are three primary questions here: which views to materialize, how to update the materialized views, and how to incorporate the views into query processing. Some work has been done on the first problem [HAR96], developing algorithms for choosing the best n views to materialize, for a given n. This static approach has limited usefulness over the lifetime of a DDB, since subsets and aggregates of interest change over time. There is a lot of advantage to be gained just by looking at materialized views that are aggregates over base tables (as is done in Red Brick's Vista), but materialized views with selections and joins also deserve attention here. The second question has been studied extensively in the past, primarily for OLTP applications [CKP95, HGM95]. OLAP applications bring new problems to bear. Since many OLAP applications are read only, or data changes only periodically and with batch updates, the update problem is quite different from OLTP environments, where individual updates to base data happen continually. For example, if there are batched updates to a materialized view it may not be worthwhile to update the view, but to invalidate and rebuild it either lazily (when requested) or eagerly. Concerning the third issue, the query optimizer needs to recognize equivalences among expressions and know when to modify a query to go to the materialized view, or simplify it to use one part of a decomposition. Current relational systems generally require intervention from outside the database to revise queries, either by a programmer rewriting queries to take advantage of database structures, or with an intelligent driver that sits between the OLAP interface and the database, as in architecture 2b in Section 4.3. In some situations it will be necessary to store large numbers of materialized views, and the optimizer will be challenged to search through all these views to determine which are relevant to the presented query, and whether it pays to use them. Research Issues: Are there effective dynamic algorithms that materialize and dematerialize views according to the needs of the current query workload? How can the determination of which view to materialize and which tables to restructure best be automated? How can the batch mode of DDB updates yield simpler algorithms for updating views? Can algorithms be developed which effectively decide between updating and invalidating a view? How should query optimizers be modified to take advantage of such auxiliary information? What indexes or other structures can be imposed on the set of materialized views, to provide adequate access to materialized views? 4.5.3 Aggregate transforms and bit structures There is also much work to do on improving conventional relational query processing techniques to perform better on decision-support queries in general, such as are typified by the TPC-D benchmark. Some of our own work [BIL97] has shown the efficiency of query transforms aimed at aggregates, the addition of a bit-join operator, and specialized search heuristics. Certain parts of these queries contribute very little to the overall evaluation time, but consume large amounts of optimization time. Quickly finding a "good enough" plan is better than taking forever to get the optimal plan for such subexpressions. CCA's Model 204 DBMS originally developed a family of techniques for accelerating the performance of complex queries [ONE87]. These techniques encode critical aspects of data (e.g., which facilities are in the Northwest region) in bit vectors, then use those bit vectors to dramatically improve the performance of queries that formerly had to scan the entire facility table. Current database vendors [SYB98, ORA98, INF98] have implemented some of these techniques and claim that they improve the performance of decision-support queries by factors of 50 or more. Similar bit encoding techniques have been used by the statistical database community for many years [WLO85, WLO86]. Research Issues: Are there new optimization techniques better suited to optimizing new structures such as bit structures? Are bit-encoding techniques as effective in dimensional schemas as they have been in OLTP schemas? How do they compare with other techniques such as materialized aggregate views? 4.6 Parallel DBMSs Parallel DBMSs have been very effective at speeding up queries against schemas and query loads that are typical in Decision Support applications, such as OLAP queries. These DBMSs use both interquery and intraquery parallelism. In order to achieve scaleable performance, the data must be spread over multiple discs, so multiple arms can be used as higher speeds are needed. There are many delicate issues to be resolved in implementing a parallel DBMS and in the physical design of data. Research Issues: How effective will parallel DBMSs be with star and snowflake schemas? Will any of their internals need to be changed to be effective for such schemas? Guidelines for physical data design in parallel DBMSs are well known for OLTP schemas [GHA92]. Will different distribution criteria be more appropriate for star schemas? 4.7 Information System Management A data warehouse or repository to support a DDB is almost surely part of a larger information system, as the warehouse needs to be populated from somewhere, and that somewhere is generally the operations database or databases of an enterprise. We will refer to these databases that provide information to a warehouse as source databases. Many system management issues arise from the movement of data from the source databases to the warehouse. The transfer process itself can take a non-trivial amount of time, as the data need to be extracted from the source databases, run through cleaning and checking routines, probably restructured, and loaded into the warehouse. Even then, the job may not be done, as there are probably indexes and derived datasets (precomputed aggregates and other materialized views) to update. In large companies, with international operations, it may not be feasible to shut down the warehouse to queries while new data is being added. There may similar restrictions on source databases, in that they can't prohibit updates while data is being extracted. Note that putting the load operation inside a standard transaction is not really a solution. While a transaction would provide isolation of concurrent queries from the new data being loaded, durability of the data being loaded must be provided at a finer granularity. If the load transaction fails, it is not acceptable to lose hours of work. Another problem is global synchronization. The data for the warehouse is likely being drawn from several source databases. While those sources may each be internally consistent, one can not be assume that they are synchronized with each other. For example, in the warehouse is drawing data from an Energy Production source and an Energy Storage source, there is no guarantee that the data from the two sources is current to the same point of time, even if those two sources are accessed simultaneously. We suspect the solution to these problems lies in breaking large warehouse loads into smaller pieces, while controlling visibility to loaded increments until the full load is completed. A naive example would be to express a warehouse table as a union view. New data being loaded would be placed into a new table in increments. With the advent of partitioning, some vendors [ORA98] allow new data to be stored in separate tables, and then added to the larger table all at once as a partition. Although not intended for this purpose, it might be possible to use the partitioning mechanism to insert updates into a separate table over several transactions (initial loads from different sources plus corrections) then add the new data all at once. Issues are likely to arise if the update cycle does not match the partitioning strategy (days versus months, for example) or updates occur naturally across all partitions not just one. Parallel load utilities (insert/update/delete/bulk loads) from vendors [ORA98, INF98] allow the load to be a whole transaction. Administrators have to work hard to remove errors before the load runs. Otherwise catching errors during the load produces two bad options:(1) allowing the load to continue skipping over input errors which leave users exposed to incomplete data , or (2) aborting the load, which delays the load and wastes resources. What is needed is consistency over a series of transactions, not just one transaction. Then the first option could be taken, several input sources could be used, and the errors corrected before users see the data. Research Issues: What mechanisms will support simultaneous queries and batch loads to warehouses? How can indexes and views be constructed to better support updates from batch loads? Can views and indexes be segmented the same way as data, so only parts of these auxiliary structures are affected when base data is updated? Are there methods using existing modeling and query facilities that provide the equivalent of segmented loads? 5 Summary and Future Work While dimensional database applications have been around for decades, there has been a recent increase of interest fueled by the need for data warehouses and the popularity of OLAP. We have set forth research issues in the areas of representation, architecture, query, modeling and metadata, and there are surely dozens more problems of which we are not yet aware. In addition to attacking the research issues we have presented, it would be useful to prioritize these and related issues. First, it would be useful to have precise characterizations of dimensional databases and of OLAP applications, more specific than those we have provided in Section 3. Next, the claims we have made in Section 4, about the usefulness of many techniques to OLAP applications, should be measured with respect to those characterizations of DDB and OLAP. Finally, based on this foundation, the various data structures proposed in Sections 4.1 and 4.5 should be evaluated. 6 Acknowledgments The authors would like to thank Lois Delcambre, Kaye Van Valkenburg and the DISC Decision-Support study group for ideas and help that went into this paper. We also thank the referees for many useful suggestions. --R This paper is a revised and expanded version of a previous workshop presentation " High Noon for TPC-D," OLAP Database Design: a New Dimension An overview of cost-based optimization of queries with aggregates Optimizing queries with materialized views. The conceptual model for EEMIS. The conceptual model for EEMIS. EEMIS data sector correspondence with conceptual database design. Methodology for coding the Energy Emergency Management Building the Data Mart. A drill-down analysis of dimensional databases Performance Analysis of Alternative Multi-Attribute Declustering Strategies Implementing data cubes efficiently. The Stanford Data Warehouse Project. An introduction to dimensional database technology. ACM SIGMOD Record 24(3) The Data Warehouse Toolkit Warehouse Design in the Aggregate Bringing Knowledge to Bear: Challenges for Decision Support Makers Divide and Aggregate: Designing Large Warehouses http://www. http://olapcouncil. Model 204 Architecture and Performance Red Brick Systems. Red Brick Demonstrates Industry's First and Only Aggregate-Aware RDBMS for Data Warehouse Applications at <Year>1997</Year> Builder Forum User Meeting OLAP and Statistical Databases: Similarities and Differences Replication: DB2 http://www. Bit Transposition for Very Large Scientific and Statistical Databases --TR
dimensional;databases;decision-support;data warehouse;multidimensional
300521
The integrality of speech in multimodal interfaces.
A framework of complementary behavior has been proposed which maintains that direct-manipulation and speech interfaces have reciprocal strengths and weaknesses. This suggests that user interface performance and acceptance may increase by adopting a multimodal approach that combines speech and direct manipulation. This effort examined the hypothesis that the speed, accuracy, and acceptance of multimodal speech and direct-manipulation interfaces will increase when the modalities match the perceptual structure of the input attributes. A software prototype that supported a typical biomedical data collection task was developed to test this hypothesis. A group of 20 clinical and veterinary pathologists evaluated the prototype in an experimental setting using repeated measures. The results of this experiment supported the hypothesis that the perceptual structure of an input task is an important consideration when designing a multimodal computer interface. Task completion time, the number of speech errors, and user acceptance improved when interface best matched the perceptual structure of the input attributes.
Figure 2: Proposed Applications for Direct Manipulation and Speech Contrastive Functionality A study by Oviatt and Olsen [1994] examined how people might combine input from different devices in a multimodal computer interface. The study used a simulated service transaction system with verbal, temporal, and computational input tasks using both structured and unstructured interactions. Participants were free to use handwriting, speech, or both during testing. This study evaluated user preferences in modality integration using spoken and written input. Among the findings, it was noted that simultaneous input with both pen and voice was rare. Digits and proper names were more likely written. Also, structured interaction using a form-based approach were more likely written. However, the most significant factor in predicting the use of integrated multimodal speech and handwriting was what they called contrastive functionality. Here, the two modalities were used in different ways to designate a shift in context or functionality. Input patterns observed were original versus corrected input, data versus command, and digits versus text. For example, one modality was used for entering original input while the other was reserved for corrections. While this study identified user preferences, a follow-up study explored possible performance advantages [Oviatt 1996]. It was reported that multimodal speech and handwriting interfaces decreased task completion time and decreased errors for certain tasks. Theory of Perceptual Structure Along with key principles of multimodal interfaces, the work we present is also based on an extension of the theory of perceptual structure [Garner 1974]. Perception is a cognitive process that occurs in the head, somewhere between the observable stimulus and the response. This response is not just a simple representation of a stimulus, because perception consists of various kinds of cognitive processing with distinct costs. Pomerantz and Lockhead [1991] built upon Garner's work to show that by understanding and capitalizing on the underlying structure of an observable stimulus, it is believed that a perceptual system could reduce these processing costs. Structures abound in the real world and are used by people to perceive and process information. Structure can be defined as the way the constituent parts are arranged to give something its distinctive nature. It often involves redundancy. Relying on this phenomenon has led to increased efficiency in various activities. For example, a crude method for weather forecasting is that the weather today is a good predictor of the weather tomorrow. An instruction cache can increase computer performance because the address of the last memory fetch is a good predictor of the address of the next fetch. Software engineers use metrics from previous projects to predict the outcome of future efforts. While the concept of structure has a dimensional connotation, Pomerantz and Lockhead [1991] state that structure is not limited to shape or other physical stimuli, but is an abstract property that transcends any particular stimulus. Using this viewpoint, information and structure are essentially the same in that they are the property of a stimulus that is perceived and processed. This allowed us to apply the concept of structure to a set of attributes that are more abstract in nature. That is, the collection of histopathology observations. Integrality of Stimulus Dimensions Garner documented that the dimensions of a structure can be characterized as integral or separable and that this relationship may affect performance under certain conditions [Garner 1974; Shepard 1991]. The dimensions of a structure are integral if they cannot be attended to individually, one at a time; otherwise, they are separable. Whether two dimensions are integral or separable can be determined by similarity scaling. In this process, similarity between two stimuli is measured as a distance. Subjects are asked to compare pairs of stimuli and indicate how alike they are. For example, consider the three stimuli, A, B, and C. Stimuli A and B are in dimension X (they differ based on some characteristic of X). Similarly, stimuli A and C are in the Y dimension. Given the values of dx and dy, which each differ in one dimension, the value of dxy can be computed. The distance between C and B, which are in different dimensions, can be measured in two ways as diagrammed in Figure 3. The city-block or Manhattan distance is calculated by following the sides of the right triangle so that dxy dy. The Euclidean distance follows the Pythagorean relation so that dxy This value is then compared to the value between C and B given by the subjects. If the given value for dxy is closer to the Euclidean distance, the two dimensions are integral. If it is closer to the city-block distance, the dimensions are separable. Euclidean Metric: dxy =(dx City-Block Y Dimension dy dxy dx Figure 3: Euclidean Versus City-Block Metrics Integrality of Unimodal Interfaces Considering these principles, one research effort tested the hypothesis that performance improves when the perceptual structure of the task matches the control structure of the input device [Jacob et al. 1994]. The concept of integral and separable was extended to interactive tasks by noting that the attributes of an input task correspond to the dimensions of an observable stimulus. Also, certain input attributes would be integral if they follow the Euclidean metric, and separable if they follow the city-block metric. Each input task involved one multidimensional input device, either a two-dimensional mouse or a three-dimensional tracker. Two graphical input tasks with three inputs each were evaluated, one where the inputs were integral location, y location, and size) and the other where the inputs were separable location, y location, and color). Common sense might say that a three-dimensional tracker is a logical superset of a two-dimensional mouse and therefore always as good and sometimes better than a mouse. Instead, the results showed that the tracker performed better when the three inputs were perceptually integral, while the mouse performed better when the three inputs were separable. Application of Perceptual Structure to Multimodal Interfaces Previous work on multimodal interfaces reported that such interfaces should result in performance gains [Cohen 1992]. Also, it was reported that a multimodal approach is preferred when an input task contains a shift in context [Oviatt and Olsen 1994]. This shift in context suggests that the attributes of those tasks were perceptually separable. In addition, the theory of perceptual structures, integral and separable, was extended with the hypothesis that the perceptual structure of an input task is key to the performance of unimodal, multidimensional input devices on multidimensional tasks [Jacob et al. 1994]. Their finding that performance increased when a separable task used an input device with separable dimensions suggests that separable tasks should be entered with separate devices in a multimodal interface. Also, since performance increased when integral tasks were entered with an integral device suggests that a single device should be used to enter integral tasks in a multimodal interface. Based on these results, a follow-on question was proposed to determine the effect of integral and separable input tasks on multimodal speech and direct manipulation interfaces. Predicted results were that the speed, accuracy, and acceptance of multidimensional multimodal input would increase when the attributes of the task are perceived as separable, and for unimodal input would increase when the attributes are perceived as integral. Three null hypotheses were generated. (H10) The integrality of input attributes has no effect on the speed of the user. (H20) The integrality of input attributes has no effect on the accuracy of the user. (H30) The integrality of input attributes has no effect on acceptance by the user. In this experiment, the theory of perceptual structure was applied to a multimodal interface similar to Jacob et al. [1994]. One important difference is that Jacob et al. used a single multidimensional device while we used multiple single dimensional devices. Note that we viewed selecting items with a mouse as a one-dimensional task, while Jacob viewed selecting an coordinate with a mouse as a two-dimensional task. The attributes of the input task correspond to the dimensions of the perceptual space. The structure or redundancy in these dimensions reflects the correlation in the attributes. Those dimensions that are highly correlated are integral and those that are not are separable. The input modality consists of two devices: speech and mouse input. Those input tasks that use one of the devices are using the input modality in an integral way and those input tasks that use both devices are using the input modality in a separable way. This is shown in Figure 4. Input Device Perception Modality Speech Only Integral Unimodal Mouse Only Integral Unimodal Speech and Mouse Separable Multimodal Figure 4: Input Device Perception Versus Modality Histopathologic data collection in animal toxicology studies was chosen as the application domain for user testing. Applications in this area include several significant hands-busy and eyes-busy restrictions during microscopy, necropsy, and animal handling. It is based on a highly structured, specialized, and moderately sized vocabulary with an accepted medical nomenclature. These and other characteristics make it a prototypical data collection task, similar to those required in biomedical research and clinical trials, and therefore a good candidate for a speech interface [Grasso 1995]. Methodology Independent Variables The two independent variables for the experiment were the interface type and task order. Both variables were counterbalanced as described below. The actual input task was to enter histopathologic observations consisting of three attributes: topographical site, qualifier, and morphology. The site is a location on a given organ. For example, the alveolus is a topographical site of the lung. The qualifier is used to identify the severity or extent of the morphology, such as mild or severe. The morphology describes the specific histopathological observation, such as inflammation or carcinoma. Note that input task was limited to these three items. In normal histopathological observations, there may be multiple morphologies and qualifiers. These were omitted for this experiment. For example, consider the following observation of a lung tissue slide consisting of a site, qualifier, and morphology: alveolus, multifocal, granulosa cell tumor. The three input attributes correspond to three input dimensions: site, qualifier, and morphology. After considering pairs of input attributes, it was concluded that qualifier and morphology (QM relationship) were related by Euclidean distances and therefore integral. Conceptually, this makes sense, since the qualifier is used to describe the morphology, such as multifocal, granulosa cell tumor. Taken by itself, the qualifier had little meaning. Also, the site and qualifier (SQ relationship) were related by city-block distances and therefore separable. Again, this makes sense since the site identified what substructure in the organ the tissue was taken from, such as alveolus or epithelium. Similar to SQ, the site and morphology (SM relationship) was related by city-block distances and also separable. Based on these relationships and the general research hypothesis, Figure 5 predicted which modality would lead to performance, accuracy, and acceptability improvements in the computer interface. Data Entry Task Perception Modality Enter Site and Qualifier Separable Multimodal (SM) Enter Site and Morphology Separable Multimodal (QM) Enter Qualifier and Morphology Integral UnimodalFigure 5: Predicted Modalities for Computer-Human Interface Improvements The three input attributes (site, qualifier, morphology) and two modalities (speech, mouse) yielded a possible eight different user interface combinations for the software prototype as shown in Figure 6. Also in this table are the predicted interface improvements for entering each pair of attributes (SQ, SM, QM) identified with a ?+? or ?-? for a predicted increase or decrease, respectively. The third alternative was selected as the congruent interface, because the choice of input devices was thought to best match the integrality of the attributes. The fifth alternative was the baseline interface, since the input devices least match the integrality of the attributes. Modality Site Qual Morph SQ SM QM Interface 1. Mouse M M M - 2. Speech S S 3. Both M S Congruent 4. Both S M 5. Both S S M - Baseline 7. Both S 8. Both Figure Possible Interfaces Combinations for the Software Prototype The third and fifth alternatives were selected over other equivalent ones, because they both required two speech inputs, one mouse input, and the two speech inputs appeared adjacent to each other on the computer screen. This was done to minimize any bias related to the layout of information on the computer screen. It might have been useful to consider mouse-only and speech-only tasks (interface alternatives one and two). However, because of performance differences between mouse and speech input, any advantages due to perceptual structure could not be measured accurately. The three input attributes involved reference identification, with no declarative, spatial, or computational data entry required. This includes the organ sites, which may be construed as having a spatial connotation. However, most of the sites used selected were not spatial, such as the epithelium, a ubiquitous component of most organs. Sites were also selected from a list as opposed to identifying a physical location on an organ, and were identified beforehand with each slide. This should have minimized any built-in bias toward either direct manipulation or speech. There are some limitations in using the third and fifth alternatives. Note in Figure 4 and in Figure 5 that both the input device and the input attributes can be integral or separable. Figure 7 describes the interface alternatives in these terms. Note that the congruent interface compares a separable device with separable attributes and an integral device with integral attributes. The baseline interface compares a separable device with integral attributes and a separable device with separable attributes. However, neither interface compares an integral device with separable attributes. Relationship Device Attributes Alternative 3 (Congruent) SQ Separable Separable SM Separable Separable QM Integral Integral Alternative 5 (Baseline) SQ Separable Integral SM Separable Separable QM Separable Integral Figure 7: Structure of Input Device and Input Attributes One other comment is that these specific user-interface tasks were not meant to identify the optimal method for entering data. In fact, many pathologists would probably consider using two input devices to enter histopathology observations counterproductive. The goal of this effort was not to develop an optimal user interface modality, but instead to discover something about the efficiency of multimodal interfaces. Dependent Variables The dependent variables for the experiment were speed, accuracy, and acceptance. The first two were quantitative measures while the latter was subjective. Speed and accuracy were recorded both by the experimenter and the software prototype. Time was defined as the time it took a participant to complete each of the 12 data entry tasks and was recorded to the nearest millisecond. Three measures of accuracy were recorded: speech errors, mouse errors, and diagnosis errors. A speech error was counted when the prototype incorrectly recognized a spoken utterance by the participant. This was because the utterance was misunderstood by the prototype or was not a valid phrase from the vocabulary. Mouse errors were recorded when a participant accidentally selected an incorrect term from one of the lists displayed on the computer screen and later changed his or her mind. Diagnosis errors were identified as when the input did not match the most likely diagnosis for each tissue slide. The actual speed and number of errors was determined by analysis of diagnostic output from the prototype, recorded observations of the experimenter, and review of audio tapes recorded during the study. User acceptance data was collected with a subjective questionnaire containing 13 bi-polar adjective pairs that has been used in other human computer interaction studies [Casali, Williges, and Dryden 1990; Dillon 1995]. The adjectives are listed in Figure 8. The questionnaire was given to each participant after testing was completed. An acceptability index (AI) was defined as the mean of the scale responses, where the higher the value, the lower the user acceptance. User Acceptance Survey Questions 1. fast slow 8. comfortable uncomfortable 2. accurate inaccurate 9. friendly unfriendly 3. consistent inconsistent 10. facilitating distracting 4. pleasing irritating 11. simple complicated 5. dependable undependable 12. useful useless 6. natural unnatural 13. acceptable unacceptable 7. complete incomplete Figure 8: Adjective Pairs used in the User Acceptance Survey Subjects Twenty subjects from among the biomedical community participated in this experiment as unpaid volunteers between January and February 1997. Each participant reviewed 12 tissue slides, resulting in a total of 240 tasks for which data was collected. The target population consisted of veterinary and clinical pathologists from the Baltimore-Washington area. Since the main objective was to evaluate different user interfaces, participants did not need a high level of expertise in animal toxicology studies, but only to be familiar with tissue types and reactions. Participants came from the University of Maryland Medical Center (Baltimore, MD), the Veteran Affairs Medical Center (Baltimore, MD), the Johns Hopkins Medical Institutions (Baltimore, MD), the Food and Drug Administration Center for Veterinary Medicine (Rockville, MD), and the Food and Drug Administration Center for Drug Evaluation and Research (Gaithersburg, MD). To increase the likelihood of participation, testing took place at the subjects' facilities. The 20 participants were distributed demographically as follows, based on responses to the pre-experiment questionnaire. The sample population consisted of professionals with doctoral degrees (D.V.M., Ph.D., or M.D.), ranged in age from 33 to 51 years old, 11 were male, 9 were female, 15 were from academic institutions, 13 were born in the U.S., and 16 were native English speakers. The majority indicated they were comfortable using a computer and mouse and only 1 had any significant speech recognition experience. The subjects were randomly assigned to the experiment using a within-group design. Half of the subjects were assigned to the congruent-interface-first, baseline-interface-second group and were asked to complete six data entry tasks using the congruent interface and then complete six tasks using the baseline interface. The other half of the subjects were assigned to the baseline-interface-first, congruent-interface-second group and completed the tasks in the reverse order. Also counterbalanced were the tissue slides examined. Two groups of 6 slides with roughly equivalent difficulty were randomly assigned to the participants. This resulted in 4 groups based on interface and slide order as shown in Figure 9. For example, subjects in group B1C2 used the baseline interface with slides 1 through 6 followed by the congruent interface with slides 7 through 12. Counterbalancing into these four groups minimized unwanted effects from slide order and vocabulary. First Task Second Task Interface Slides Interface Slides B1C2 Baseline 1-6 Congruent 7-12 B2C1 Baseline 7-12 Congruent 1-6 C1B2 Congruent 1-6 Baseline 7-12 Congruent 7-12 Baseline 1-6 Figure 9: Subject Groupings for the Experiment Materials A set of software tools was developed to simulate a typical biomedical data collection task in order to test the validity of this hypothesis. The prototype computer program was developed using Microsoft Windows 3.11 (Microsoft Corporation, Redmond, WA) and Borland C++ 4.51 (Borland International, Inc., Scotts Valley, CA). The PE500+ was used for speech recognition (Speech Systems, Inc., Boulder, CO). The hardware came on a half-sized, 16-bit ISA card along with head-mounted microphone and speaker, and accompanying software development tools. Software to drive the PE500+ was written in C++ with the SPOT application programming interface. The Voice Match Tool Kit was used for grammar development. The environment supported speaker-independent, continuous recognition of large vocabularies, constrained by grammar rules. The vocabulary was based on the Pathology Code Table [1985] and was derived from a previous effort establishing the feasibility of speech input for histopathologic data collection [Grasso and Grasso 1994]. Roughly 1,500 lines of code were written for the prototype. The tissue slides for the experiment were provided by the National Center for Toxicological Research (Jefferson, AK). All the slides were from mouse tissue and stained with H&E. Pictures were taken at high resolution with the original dimensions of 36 millimeters by 24 millimeters. Each slide was cropped to show the critical diagnosis and scanned at two resolutions: 570 by 300 and 800 by 600. All scans were at 256 colors. The diagnoses for the twelve slides are shown in Figure 10. Slide Diagnosis (Organ, Site, Qualifier, Morphology) 3 Ovary, Media, Multifocal, Granulosa Cell Tumor Urinary Bladder, Wall, Diffuse, Squamous Cell Carcinoma 5 Urinary Bladder, Epithelium, Focal, Transitional Cell Carcinoma 6 Urinary Bladder, Transitional Epithelium, Focal, Hyperplasia 8 Adrenal Gland, Cortex, Focal, Carcinoma 9 Pituitary, Pars Distalis, Focal, Cyst 12 Liver, Parenchyma, Focal, Hepatocelluar Carcinoma Figure 10: Tissue Slide Diagnoses The software and speech recognition hardware were deployed on a portable PC-III computer with a 12.1 inch, 800x600 TFT color display, a PCI Pentium-200 motherboard, RAM, and 2.5 GB disk drive (PC Portable Manufacturer, South El Monte, CA). This provided a platform that could accept ISA cards and was portable enough to take to the participants' facilities for testing. The main data entry task the software supported was to project images of tissue slides on a computer monitor while subjects entered histopathologic observations in the form of topographical sites, qualifiers, and morphologies. Normally, a pathologist would examine tissue slides with a microscope. However, to minimize hands-busy or eyes-busy bias, no microscopy was involved. Instead, the software projected images of tissue slides on the computer monitor while participants entered observations in the form of topographical sites, qualifiers, and morphologies. While this might have contributed to increased diagnosis errors, the difference in relative error rates from both interfaces could still be measured. Also, participants were allowed to review the slides and ask clarifying questions as described in the experimental procedure. The software provided prompts and directions to identify which modality was to be used for which inputs. No menus were used to control the system. Instead, buttons could be pressed to zoom the slide to show greater detail, adjust the microphone gain, or go to the next slide. To minimize bias, all command options and nomenclature terms were visible on the screen at all times. The user did not need to scroll to find additional terms. A sample screen is shown in Figure 11. In this particular configuration, the user would select a site with a mouse click and enter the qualifier and morphology by speaking a single phrase, such as moderate, giant cell. The selected items would appear in the box above their respective lists on the screen. Note that the two speech terms were always entered together. If one of the terms was not recognized by the system, both would have to be repeated. A transcript for the congruent and baseline interfaces for one of the subjects is given in Figure 12 and Figure 13. Figure 11: Sample Data Entry Screen Time Device Action Comment Mouse Press button to begin test. Mouse Click on ?media? 7 Speech ?Select marked giant cell? 14 Mouse Click on ?press continue? button Mouse Click on ?follicle? 29 Speech ?Select moderate hyperplasia? Recognition error 36 Speech ?Select moderate hyperplasia? Mouse Click on ?press continue? button Mouse Click on ?media? 50 Speech ?Select moderate inflammation? 57 Mouse Click on ?press continue? button Mouse Click on ?wall? Speech ?Select marked squamous cell carcinoma? 71 Mouse Click on ?press continue? button Mouse Click on ?epithelium? 81 Speech ?Select moderate transitional cell carcinoma? Mouse Click on ?press continue? button Task 6 94 Mouse Click on ?transitional epithelium? Speech ?Select marked transitional cell carcinoma? 104 Mouse Click on ?press continue? button Figure 12: Congruent Interface Transcript Time Device Action Comment Mouse Press button to begin test. Mouse Click on ?medulla? Incorrect action Speech ?Select medulla mild? Mouse Click on ?pheochromocytoma? Mouse Click on ?press continue? button ?Select cortex marked? Recognition error Mouse Click on ?pheochromocytoma? 42 Speech ?Select cortex marked? Mouse Click on ?press continue? button Task 3 70 Speech ?Select pars distalis moderate? 76 Mouse Click on ?granulosa cell tumor? Mouse Click on ?press continue? button ?Select lobules marked? Mouse Click on ?vacuolization cytoplasmic? Mouse Click on ?press continue? button Task 5 97 Speech ?Select parenchyma moderate? Recognition error Mouse Click on ?hemangiosarcoma? 103 Speech ?Select parenchyma moderate? Mouse Click on ?press continue? button Task 6 114 Speech ?Select parenchyma marked? Recognition error Mouse Click on ?hepatocellular carcinoma? 124 Speech Click on ?press continue? button 128 Mouse Click on ?press continue? button Figure 13: Baseline Interface Transcript Procedure A within-groups experiment, fully counterbalanced on input modality and slide order was performed. Each subject was tested individually in a laboratory setting at the participant's place of employment or study. Participants were first asked to fill out the pre-experiment questionnaire to collect demographic information. The subjects were told that the objective of this study was to evaluate several user interfaces in the context of collecting histopathology data and was being used to fulfill certain requirements in the Ph.D. Program of the Computer Science and Electrical Engineering Department at the University of Maryland Baltimore County. They were told that a computer program would project images of tissue slides on a computer monitor while they enter observations in the form of topographical sites, qualifiers, and morphologies. After reviewing the stated objectives, each participant was seated in front of the computer and had the headset adjusted properly and comfortably, being careful to place the microphone directly in front of the mouth, about an inch away. Since the system cam with a speaker-independent vocabulary provided with the PE500+ speech recognition engine, there was no need to enroll or train the speech recognizer. However, a training program was run to allow participants to practice speaking typical phrases in such a way that the speech recognizer could understand. The objective was to become familiar speaking these phrases with reasonable recognition accuracy. Participants were encouraged to speak as clearly and as normally as possible. Next, each subject went through a training session with the actual test program to practice reading slides and entering observations. Participants were instructed that this was not a test and to feel free to ask the experimenter about any questions they might have. The last step before the test was to review the two sets of tissue slides. The goal was to make sure participants were comfortable reading the slides. This was to ensure that the experiment was measuring the ability of subject to enter data, not their ability to read slides. During the review, participants were encouraged to ask questions about possible diagnoses. For the actual test, participants entered two groups of six histopathologic observations in an order based on the group they were randomly assigned to. They were encouraged to work at a normal pace that was comfortable for them and to ask questions before the actual test began. After the test, the user acceptance survey was administered as a post-experiment questionnaire. A summary of the experimental procedure can be found in Figure 14. Task Pre-experiment questionnaire and instructions training Step 3 Application training Step 4 Slide review Step 5 Evaluation and quantitative data collection Step 6 Post-experiment questionnaire and subjective data collection Figure 14: Experimental Procedure Results For each participant, speed was measured as the time to complete the 6 baseline interface tasks, the time to complete the 6 congruent interface tasks, and time improvement (baseline interface time - congruent interface time). The mean improvement for all subjects was 41.468 seconds. A t test on the time improvements was significant A comparison of mean task completion times is in Figure 15. For each subject, the 6 baseline and 6 congruent tasks are graphed. A two-factor ANOVA with repeated measures was run as well. A 2 x 4 ANOVA was set up to compare the 2 interfaces with the 4 treatment groups. The sample variation comparing the baseline interface times to the congruent interface times was significant (p = .028). The ANOVA showed that the interaction between interface order and task order had no significant effect on the results Three types of user errors were recorded: speech recognition errors, mouse errors, and diagnosis errors. The baseline interface had a mean speech error rate of 5.35, and the congruent interface had mean of 3.40. The reduction in speech errors was significant (paired two-tailed). A comparison of mean speech error rates by task is shown in Figure 16. Similar to task completion times, a two-factor ANOVA with repeated measures was run for speech errors to show that the sample variation was significant and that the interaction between interface order and task order had no significant effect on the results Mouse errors for the baseline interface had mean error rate of 0.35, while the congruent interface had mean of 0.45. Although the baseline interface had fewer mouse errors, these results were not significant (paired two-tailed). For diagnosis errors, the baseline interface had mean error rate of 1.95, and the congruent interface had mean of 1.90. Although the rate for the congruent interface was slightly better, these results were not significant (paired t(19) For analyzing the subjective scores, an acceptability index by question was defined as the mean scale response for each question across all participants. A lower AI was indicative of higher user acceptance. One subject's score was more than 2 standard deviations outside the mean AI and was rejected as an outlier. This person answered every question with the value of 1, resulting in a mean AI of 1. No other subject answered every question with the same value, suggesting that this person did not give ample consideration. With this outlier removed, the baseline interface AI was 3.99 and the congruent interface was 3.63, which was a modest 6.7% improvement. The result was significant using the 2x13 ANOVA and the interaction between groups was not (p = .999). A comparison of these values is shown in Figure 17. Comparison of Mean Task Completion Times Task Baseline Interface Congruent Interface Figure 15: Comparison of Mean Task Completion Times Mean Speech Error Rates Task Baseline Interface Congruent Interface Figure Comparison of Mean Speech Errors Acceptability Index by Question4.0 Acceptability Index2.00.0 fast dceocpaponecflnmsernciaeudsptsntrauleaeidbnrntalegyetl cofamcfiolitratatibnlge suimsepfluel acceptable Question Baseline Interface Congruent Interface Figure 17: Comparison of Acceptability Index by Question Discussion The results of this study showed that the congruent interface was favored over the baseline interface. This supported the hypothesis that the perceptual structure of an input task is an important consideration when designing a multimodal computer interface. As shown in Figure 7, the QM relationship compared entry of integral attributes with an integral device in the congruent interface and a separable device in the baseline interface. Based on this, the three null hypotheses were rejected in favor of alternate hypotheses stating that performance, accuracy, and user acceptance were shown to improve when integral attributes are entered with a single device. However, since separable attributes were not tested with both integral and separable devices, no conclusion can be made about whether it was advantageous to enter separable attributes with either a single device or multiple devices. With respect to accuracy, the results were only significant for speech errors. Mouse errors showed a slight improvement with the baseline interface, but these were not significant. This was possibly because there were few such errors recorded. Across all subjects, there were only mouse errors compared to 175 speech errors. A mouse error was recorded only when a subject clicked on the wrong item from a list and later changed his or her mind, which was a rare event. Diagnosis errors showed a slight improvement with the congruent interface. There were diagnosis errors, but the results were not statistically significant. Diagnosis errors were really a measure of the subject's expertise in identifying tissue types and reactions. Ordinarily, this type of finding would suggest that there is no relationship between perceptual structure of the input task and the ability of the user to apply domain expertise. However, this cannot be concluded from this study, since efforts were made to avoid measuring a subject's ability to apply domain expertise by allowing them to review the tissue slides before the actual test. As stated earlier, 175 speech errors were recorded for the 240 data entry tasks. Each task consisted of an average of 4 words, yielding an error rate of about 18%. Contributing to this rate was the fact that this was the first time most subjects used a speech recognition interface. A general understanding with speech recognition is that phrases with less syllables or that sound alike will have higher error rates. In the experiment, speech was used for entering the site and qualifier (SQ) in the baseline interface and the qualifier and morphology (QM) in the congruent interface. The average QM phrase was about 20% longer than the average SQ phrase syllables versus 8.2 syllables). However, both phrases were reasonably long and all of the sites and morphologies had very unique pronunciations. Based on user training before the experiment, the greatest source of recognition errors was from qualifiers. This was most likely because the qualifiers consisted of shorter terms, many of which sounded alike. Since qualifiers were part of both the SQ and QM phrases, it was concluded that differences between sites and morphologies did not contribute significantly to the error rate. Pearson correlation coefficients were computed to reveal possible relationships between the dependent variables. This includes relationships between the baseline and congruent interface, relationships with task completion time, and relationships with user acceptance. A positive correlation of time between the baseline interface and congruent interface was probably due to the fact that a subject who works slowly (or quickly) will do so regardless of the interface (p < .001). The positive correlation of diagnosis errors between the baseline and congruent interface suggests that a subject's ability to apply domain knowledge was not effected by the interface (p < .001) since the slides were reviewed beforehand. The lack of correlation for speech errors was notable. Under normal circumstances, one would expect there to be a positive correlation, implying that a subject who made errors with one interface was predisposed to making errors with the other. Having no correlation agrees with the finding that the user was more likely to make speech errors with the baseline interface, because the interface did not match the perceptual structure of the input task. When comparing time to other variables, several relationships were found. There was a positive correlation between the number of speech errors and task completion time (p < .01). This was expected, since it took time to identify and correct those errors. There was also a positive correlation between time and the number of mouse errors. However, due to the relatively few mouse errors recorded, nothing was inferred from these results. No correlation was observed between task completion time and diagnosis errors since the slides were reviewed before the test. Several relationships were identified between the acceptability index and other variables. Note that for the acceptability index, a lower score corresponds to higher user acceptance. A significant positive correlation was observed between acceptability index and the number of speech errors (p < .01). An unexpected result was that no correlation was observed between task completion time and the acceptability index. This suggests that accuracy is more critical than speed, with respect to whether a user will embrace the computer interface. No correlation was found between the acceptability index and mouse errors, most likely due to the lack of recorded mouse errors. A significant positive correlation was observed between the acceptability index and diagnosis errors (p < .01). Diagnosis errors were assumed to be inversely proportional to the domain expertise of each subject. What this finding suggests is that the more domain expertise a person has, the more he or she is likely to approve of the computer interface. Summary A research hypothesis was proposed for multimodal speech and direct manipulation interfaces. It stated that multimodal, multidimensional interfaces work best when the input attributes are perceived as separable, and that unimodal, multidimensional interfaces work best when the inputs are perceived as integral. This was based on previous research that extended the theory of perceptual structure [Garner 1974] to show that performance of multidimensional, unimodal, graphical environments improves when the structure of the perceptual space matches the control space of the input device [Jacob et al. 1994]. Also influencing this study was the finding that contrastive functionality can drive a user's preference of input devices in multimodal interfaces [Oviatt and Olsen 1994] and the framework for complementary behavior between speech and direct manipulation [Cohen 1992]. A biomedical software prototype was developed with two interfaces to test this hypothesis. The first was a baseline interface that used speech and mouse input in a way that did not match the perceptual structure of the attributes while the congruent interface used speech and mouse input in a way that best matched the perceptual structure. The results of this experiment supported the hypothesis that the perceptual structure of an input task is an important consideration when designing a multimodal computer interface. Task completion time, accuracy, and user acceptance all increased when a single modality was used to enter attributes that were integral. It should be noted that this experiment did not determine whether or not a unimodal speech-only or mouse-only interface would perform better overall. It also did not show whether separable attributes should be entered with separate input devices or one device. A group of 20 clinical and veterinary pathologists evaluated the interface in an experimental setting, where data on task completion time, speech errors, mouse errors, diagnosis errors, and user acceptance was collected. Task completion time improved by 22.5%, speech errors were reduced by 36%, and user acceptance increased 6.7% for the interface that best matched the perceptual structure of the attributes. Mouse errors decreased slightly and diagnosis errors increased slightly for the baseline interface, but these were not statistically significant. User acceptance was related to speech recognition errors and domain errors, but not task completion time. Additional research into theoretical models which can predict the success of speech input in multimodal environments are needed. This could include a more direct evaluation of perceptual structure on separable data. Another approach could include studies on minimizing speech errors. The reduction of speech errors has typically been viewed as a technical problem. However, this effort successfully reduced the rate of speech errors by applying certain user-interface principles based on perceptual structure. Others have reported a reduction in speech errors by applying different user-interface techniques [Oviatt 1996]. Also, noting the strong relationship between user acceptance and domain expertise, additional research on how to build domain knowledge into the user interface might be helpful. Acknowledgements The authors wish to thank Judy Fetters and Alan Warbritton from the National Center for Toxicological Research for providing tissue sides and other assistance with the software prototype. The authors also thank Lowell Groninger, Greg Trafton, and Clare Grasso for help with the experiment design, and Tulay Adali, Charles K. Nicholas, and Anthony W. Norcio for serving as doctoral dissertation committee members at the University of Maryland Baltimore County. Finally, the authors thank those who graciously participated in this study from the University of Maryland Medical Center, the Baltimore Veteran Affairs Medical Center, the Johns Hopkins Medical Institutions, and the Food and Drug Administration. --R HCI and the Inadequacies of Direct manipulation Systems. Effects of Recognition Accuracy and Vocabulary Size of a Speech Recognition System on Task Performance and user Acceptance. The Role of Natural Language in a Multimodal Interface. The Role of Voice in Human-Machine Communication The Challenge of Spoken Language Systems: Research Directions for the Nineties. Spoken Language Interaction: Effects of Vocabulary Size The Processing of Information and Structure. Automated Speech Recognition in Medical Applications. Feasibility Study of Voice-Driven Data Collection in Animal Drug Toxicology Studies Integrality and Separability of Input Devices. Design Guidelines for Speech Recognition Interfaces. Automatic Speech Recognition - Can it Improve the Man-Machine Interface in Medical Expert Systems? International Journal of Biomedical Computing Multimodal Interfaces for Dynamic Interactive Maps. Integration Themes in Multimodal Human-Computer Interaction Pathology Code Table Reference Manual An Introduction to Speech and Speaker Recognition. Perception of Structure: An Overview. Integrality Versus Separability of Stimulus Dimension: From an early Convergence of Evidence to a Proposed Theoretical Basis. Direct manipulation: A Step Beyond Programming Languages. Sparks of Innovation in Human-Computer Interaction --TR Effects of recognition accuracy and vocabulary size of a speech recognition system on task performance and user acceptance An Introduction to Speech and Speaker Recognition The role of natural language in a multimodal interface HCI and the inadequacies of direct manipulation systems Integrality and separability of input devices The role of voice in human-machine communication Multimodal interfaces for dynamic interactive maps Sparks of Innovation in Human-Computer Interaction --CTR Stuart Goose , Sandra Sudarsky , Xiang Zhang , Nassir Navab, Speech-Enabled Augmented Reality Supporting Mobile Industrial Maintenance, IEEE Pervasive Computing, v.2 n.1, p.65-70, January Taeyong Moon , Gerard J. Kim, Design and evaluation of a wind display for virtual reality, Proceedings of the ACM symposium on Virtual reality software and technology, November 10-12, 2004, Hong Kong Jonghyun Ryu , Gerard Jounghyun Kim, Using a vibro-tactile display for enhanced collision perception and presence, Proceedings of the ACM symposium on Virtual reality software and technology, November 10-12, 2004, Hong Kong Emilio Schapira , Rajeev Sharma, Experimental evaluation of vision and speech based multimodal interfaces, Proceedings of the 2001 workshop on Perceptive user interfaces, November 15-16, 2001, Orlando, Florida Stephen Boyd Davis , Huw Jones, Screen space: depiction and the space of interactive media, Proceedings of the sixth Eurographics workshop on Multimedia 2001, p.165-176, September 08-09, 2001, Manchester, UK
medical informatics;speech recognition;natural-language processing;integrality;multimodal;separability;direct manipulution;pathology;perceptual structure;input devices
300896
Sensitivity Analysis of Optimization Problems Under Second Order Regular Constraints.
We present a perturbation theory for finite dimensional optimization problems subject to abstract constraints satisfying a second order regularity condition. This is a technical condition that is always satisfied in the case of semi-definite optimization. We derive Lipschitz and Holder expansions of approximate optimal solutions, under a directional constraint qualification hypothesis and various second order sufficient conditions that take into account the curvature of the set defining the constraints of the problem. We show how the theory applies to semi-infinite programs in which the contact set is a smooth manifold and the quadratic growth condition in the constraint space holds, and discuss the differentiability of metric projections as well as the Moreau-Yosida regularization. Finally we show how the theory applies to semi-definite optimization.
Introduction In this paper we present a theory that allows to compute the asymptotic expansions of the optimal value function v(u), as well as the optimal or "nearly optimal" solutions x(u) of parametric optimization problems of the form f(x; u) subject to G(x; u) 2 K: While the theory is fairly complete in the framework of mathematical programming where the set K is polyhedral, the question is far from being settled in general, particularly when dealing with infinite dimensional problems. The differentiability properties of v(u) and x(u) strongly depend on the second order behavior of the unperturbed optimization problem, namely, quadratic growth and second order optimality conditions. Therefore, an essential difficulty in the general setting comes from the curvature (in a properly defined sense) that may appear with non-polyhedral constraint sets K. A number of generalized notions of polyhedricity have permitted to develop a perturbation theory for some relevant classes of infinite dimensional optimization problems [3, 13, 18]. Nevertheless, the curvature terms seem unavoidable for such problems as semi-infinite programming (i.e. minimization problems with an infinite number of inequality constraints) or semi-definite optimization. The latter is the particular case of (P u is the space of p \Theta p symmetric matrices, and is the cone of positive semi-definite matrices. When f and G are affine functions, the semi-definite optimization problem is known as the linear matrix inequalities (LMI) problem (LMI) Min where A - 0 is used to denote A 2 S p . This is an important particular case which has been recognized in the past few years as a very convenient framework for optimization problems arising in various fields [7, 8]. However, relatively few papers have considered sensitivity analysis of such problems. The best results obtained so far, which are due to [26], provide explicit formulas for the expansion of the value function, solution and multiplier, under rather restrictive hypothesis which permit the use of the implicit function theorem. An alternative approach for treating these difficult problems by taking into account the curvature of K, has emerged recently [3, 4, 9, 14, 15]. The novelty in this approach is the use of second order tangent sets and a second order property of the set K, called (inner) second order regularity, introduced in [3]. In [4] we discussed the weaker condition of outer second order regularity, under which there is no gap between second order necessary and sufficient optimality conditions. In the present paper we explore the implications and limitations of inner regularity in connection with sensitivity analysis of optimal solutions of perturbed optimization problems. RR n-2989 4 J. Fr'ed'eric Bonnans , Roberto Cominetti , Alexander Shapiro We begin by studying the sensitivity results in the abstract setting (P u ). We then show how they apply in the framework of semi-infinite programming, and particularly for semi-definite optimization problems. Before proceeding with the abstract results, let us illustrate some of them through an elementary example where the computations can be carried out explicitly. Example. Consider the family of convex semi-definite problems Min where ff is a given nonnegative constant, and u 2 IR is a real parameter. When the above problem has a unique optimal solution - which satisfies Slater's condition. Moreover, there exists a unique Lagrange multiplier and the second order growth condition (hence the strong second order sufficient holds. The linearized problem, which captures the first order behavior of the optimal value function, is given by Min with unique optimal solution - ff) if ff ? 0, and no solution if When ff ? 0 Theorem 4.1 (see section 4) applies: since the linearized problem has a unique optimal solution, the same holds for the auxiliary second order approximating problem and we get When Theorem 5.1 applies, leading to an expansion of the form u). We will discuss this case in section 7. Our perturbation analysis is based on: (i) a concept of second order regularity, (ii) second order sufficient optimality conditions, and (iii) the directional constraint qualification introduced in [3]. We distinguish between three basic cases, in the spirit of [3, 5]. The first and second cases, illustrated in the example above, are when the strong and weak (second sufficient optimality conditions hold, leading respectively to Lipschitz and H-older stability of optimal trajectories. The third case is when the set of Lagrange multipliers is empty, and the optimal solutions are once again H-older stable of degree 1=2. The derived results are similar to those obtained for nonlinear programming problems, except for the additional terms related to the curvature of the set K. The paper follows the method of upper and lower estimates of the objective function [3, 5, 12, 14, 22, 23]. The upper estimates are those obtained in [3]. The novelty lies in the theory of lower estimates and the expansion of approximate solutions. INRIA Sensitivity analysis of optimization problems under second order regular constraints 5 Preliminaries In this section we review some known results on first order sensitivity analysis and second order optimality conditions, that are needed in the sequel. We also fix the notations used throughout the paper. 2.1 Basic notation We consider the parametrized family of optimization problems (P u mappings of class C 2 . The space of "decisions" X is assumed to be finite dimensional, U is a topological vector space of "parameters", and the "constraint" set K is a nonempty closed convex subset of the Banach space Y with topological dual Y . The feasible set, optimal value, and set of optimal solutions of (P u ) are denoted respectively Similarly, given an optimization problem (P ), we denote by \Phi(P ), v(P ) and S(P ), the feasible set, the optimal value, and the set of optimal solutions of (P ). For we view the corresponding optimization problem (P 0 ) as unperturbed and assume that it has an optimal solution x We shall consider perturbations along a fixed direction d 2 U , that is to say, we investigate the local behavior of the optimal value and optimal solutions of the problems (P td we say that a point is an "-optimal solution of (P u ". For a nonnegative valued function "(t) we shall also consider trajectories x(t) of "(t)-optimal solutions of (P td ). The support function of T ae Y at y 2 Y is oe(y Tg is the distance function to T . The tangent and normal cones to the set K at the point y 2 K are defined as fy Finally, for a function IR, we denote by h 0 (y; d) its directional derivative If h 0 (y; d) exists for every d 2 Y we say that h is directionally differentiable at y, and we define (when it exists) the parabolic second order directional derivative RR n-2989 6 J. Fr'ed'eric Bonnans , Roberto Cominetti , Alexander Shapiro 2.2 First order analysis Optimality conditions for (P u ) are usually stated in terms of the associated Lagrangian and generalized Lagrangian The Fritz John necessary conditions for a local minimum x of (P u ) are The set g u (x) of generalized Lagrange multipliers (ff; -) 6= (0; may be empty when Y is a general Banach space. However g in two important cases: when Y is finite dimensional and also when K has a non empty interior [17, 28]. If the multiplier ff in (2.3) is non zero, then we can take and the corresponding first order necessary conditions become The set u (x) of Lagrange multipliers satisfying (2.4) is non empty and bounded [19, 28], whenever the following constraint qualification, due to Robinson [20], holds Let us summarize the first order differentiability properties of the optimal value function v(u) and the optimal solutions. To this end, for the given perturbation direction d 2 U and the (unperturbed) optimal solution x we consider the following linearization of the family of problems (P td ), together with its dual (cf. [1, 27]) (DL d ) Max The directional constraint qualification at the point x 0 in the direction d, which is essentially Robinson's constraint qualification for (PL d ), is (cf. [1] and [3, Part I]) It is clear that (CQ) implies (DCQ), and that both conditions are equivalent if INRIA Sensitivity analysis of optimization problems under second order regular constraints 7 Theorem 2.1 Suppose that (DCQ) holds. Then there is no duality gap between problems lim sup Moreover, the common value v(PL d which case the set S(DL d ) of optimal solutions of (DL d ), is a non empty weak compact subset of Furthermore, if there exists an o(t)-optimal trajectory - x(t) of (P td ) such that k-x(t)\Gammax 0 O(t), then the directional derivative v 0 (0; d) exists and v 0 (0; d) = v(DL d ). In the latter case coincides with the set of accumulation points of the differential quotients (x(t)\Gammax 0 )=t where x(t) ranges over the set of all possible o(t)-optimal trajectories of (P td ). For a discussion of this result and relevant references, the reader is referred to [6]. 2.3 Second order optimality conditions Let us briefly state the theory of second order optimality conditions for the unperturbed problem (P 0 ). To this end we skip the argument u, and all derivatives are understood with respect to x only. Recall that the second order tangent set to K at the point y 2 K in the direction z 2 TK (y) is defined as and that (under some first order qualification conditions) a second order necessary optimality condition is given by (see [4, 9, 15]) sup is the critical cone Unfortunately, for sufficient conditions it is not enough to change the weak inequality in (2.7) into a strict one, but one needs the following concept (see [4]), Definition 2.1 A set A ae Y is an upper second order approximation set for K at the point in the direction z 2 TK (y) with respect to a linear mapping sequence being a convergent sequence in Y and fq k g ae X satisfying t k q k ! 0, the following condition holds lim RR n-2989 8 J. Fr'ed'eric Bonnans , Roberto Cominetti , Alexander Shapiro If this holds for any M , i.e. (2.8) is satisfied for any sequence y that t k # 0 and t k r k ! 0, we say that A is an upper second order approximation set for K at y in the direction z. A sufficient condition for x 0 to be a local optimum is (see [4]) sup where A(h) is any upper second order approximation set for K at the point G(x 0 ) in the direction DG(x 0 )h with respect to the linear mapping DG(x As a matter of implies the following quadratic growth condition at x 0 : there exist a constant c ? 0 and a neighborhood N of x 0 such that Notice that (2.9) requires the set g (x 0 ) to be nonempty, i.e. it implies that the corresponding first order necessary conditions hold at x 0 . We refer to (2.9) as the generalized second order sufficient condition, and to the term oe(-; A(h)) appearing in (2.9) as the sigma term. K (y; z) is contained in every upper second order approximation set A, the gap between (2.7) and (2.9) reduces to a change from weak to strict inequality whenever one can take K (h). This remark leads to the following concept (see [4]) Definition 2.2 We say that the set K is second order regular at a point y 2 K in a direction z 2 TK (y) with respect to a linear mapping the second order tangent set K (y; z) is an upper second order approximation set to K at y in the direction z with respect to M . If this holds for every linear mapping M and every direction z, we simply say that K is second order regular at y. Various conditions ensuring this second order regularity are discussed in [4]. In particular it is shown that the cone S p of p \Theta p symmetric positive semi-definite matrices is second order regular at every point y . Remark. Let us point out that the second order regularity used in [4] concerns the outer second order tangent sets, so that the above concept should rather be called inner second order regularity. Since in this paper we deal exclusively with the inner version, we shall omit the term "inner". 3 Lipschitzian and H-older directional stability of optimal solutions In this section we discuss quantitative stability of optimal or "nearly optimal" trajectories for (P td ). We start our discussion with Lipschitzian stability where perturbations of optimal INRIA Sensitivity analysis of optimization problems under second order regular constraints 9 solutions are of the same order as perturbations of parameters. For that purpose we need to strengthen the second order sufficient conditions (2.9) in the following way sup where A(h) is an upper second order approximation set for K at the point G(x in the direction D x G(x with respect to the linear mapping We refer to (3.1) as the strong second order sufficient conditions. These conditions were formulated for nonlinear programming problems (i.e., without the "sigma" term) in [23]. In the Banach space framework they were used in [27], also without the "sigma" term. Let us remark that (3.1) can only hold if the set S(DL d ) of optimal solutions of the problem (DL d ) is non empty, which implies of course that the set 0 multipliers is non empty. Clearly the strong second order sufficient conditions depend on the chosen direction d, unless the set 0 singleton or the constraint mapping G(x; u) does not depend on u. When K is second order regular at G(x 0 ; 0), we can take Theorem 3.1 Let - x(t) be an O(t 2 )-optimal trajectory of (P td ) converging, as t # 0, to a point satisfying the (DCQ). Suppose that and that the strong second order sufficient conditions (3.1) hold. Then - x(t) is Lipschitz stable at x 0 , i.e. for t - 0, Proof. We argue by a contradiction. Suppose that (3.3) is false and choose a sequence and the space X is finite dimensional, we can assume by passing to a subsequence if necessary, that h k converges to a point h 2 X n f0g. )-optimal and under (DCQ) we have v(td) - I]), we get the left hand side in the previous inequality is - k D x f(x hence we obtain D x f(x get We can write x k in the form x (D x G(x RR n-2989 J. Fr'ed'eric Bonnans , Roberto Cominetti , Alexander Shapiro Since A(h) is a second order approximation set to K at the point G(x in the direction and with respect to the linear mapping (D x G(x since (D x G(x denotes the unit ball in Y . Let us now use the strong second order sufficient conditions (3.1) to select - 2 S(DL d ) such that for some - ? 0. It follows from (3.5) that (D x G(x By using the second order expansion (D x f(x together with (3.6) and (3.7), and since D x L(x Since v(PL d last inequality contradicts (3.2), and hence the proof is complete. Remarks. Assumption (3.2) holds under the (DCQ) and if the following conditions are satisfied ([3, 24]): the linearized problem (PL d ) has an optimal solution - h(d) such that In case the optimal solution - h exists, condition (3.9) holds if the second order tangent set empty. If the space X is reflexive (in particular finite dimensional), then existence of an optimal solution of (PL d ) is a necessary condition for Lipschitzian stability (3.3), [3]. As we shall see in the next section, second order sufficient conditions of the type (3.1), with are "almost" necessary for having the Lipschitzian stability (3.3). For nonlinear programming, where the sigma term vanishes, this was already observed in [23]. INRIA Sensitivity analysis of optimization problems under second order regular constraints 11 As we already mentioned, the generalized second order sufficient conditions (2.9) do not guarantee Lipschitzian stability of optimal solutions. Nevertheless these conditions imply H-older stability of degree 1=2. The proof of the following result is similar to the previous one and is based on the upper estimate v(td) - instead of the stronger bound (3.2) (cf. [3]). Theorem 3.2 Let - x(t) be an O(t)-optimal trajectory of (P td ) converging, as t # 0, to a point satisfying the (DCQ). Suppose that the generalized second order sufficient conditions (2.9) hold. Then for t - 0, 4 Second order expansions of the first kind In this section we obtain a quadratic expansion for the optimal value function v(td) and a first order expansion for optimal solutions. To obtain an upper estimate of v(td) we consider paths of the form If the path x(t) is feasible, an expansion of G(x(t); td) leads to (cf. [3]) and where A similar expansion of the objective function leads to the following optimization problem By minimizing it further with respect to h 2 S(PL d ) we obtain (see [3] for details), Proposition 4.1 Let x be an optimal point satisfying (DCQ) and suppose 0 ;. Then for t - 0, lim sup The dual problem of (PQ d;h ) can be written in the form, RR n-2989 J. Fr'ed'eric Bonnans , Roberto Cominetti , Alexander Shapiro It is possible to show by methods of convex analysis that under (DCQ) and assuming that the sets T 2 K (h; d) and 0 are non empty, for all h 2 S(PL d ) there is no duality gap between (PQ d;h ) and (DQ d;h ) and their common value is finite (cf. [21],[3]). The upper estimate (4.5) has the following lower counterpart in which the set T 2 is replaced by an upper second order approximation. Proposition 4.2 Let x (DCQ). For each h 2 S(PL d ), let A(h; d) be an upper second order approximation set for K at in the direction DG(x 0 ; 0)(h; d) with respect to D x G(x 0 ; 0). Suppose that 0 empty and that there exists an lim inf where v(Q d ) is the optimal value of the problem Proof. The proof is similar to the one of Theorem 3.1. Consider a sequence t k # 0 and stable at x 0 we have that h k are bounded so that, passing to a subsequence if necessary, we may assume that h k ! h for some h 2 X , for which it is not difficult to show that h 2 S(PL d ) (see [3]). We can write x using the second order expansion (D x G(x we may deduce Similarly we also get It follows from (4.8) that h-; D x G(x where the term o(1) can be taken independently of - since S(DL d ) is bounded. By adding half times t 2 k of the above term to the right hand side of (4.9), and since D x L(x we obtain INRIA Sensitivity analysis of optimization problems under second order regular constraints 13 arbitrary and h 2 S(PL d ), we obtain (4.6) as claimed. Recall that sufficient conditions for Lipschitzian stability of optimal solutions are discussed in Theorem 3.1. The lower estimate (4.6) coincides with the upper estimate (4.5) if for every h 2 S(PL d ) the second order tangent set T 2 K (h; d) can serve as an upper second order approximation set, that is, under the additional condition of second order regularity. Thus we deduce the following second order expansion of the optimal value function. Theorem 4.1 Let x (DCQ). Suppose that 0 empty, that there exists an o(t 2 )-optimal trajectory - x(t) of (P td ) such that that for every h 2 S(PL d ) the set K is second order regular at G(x 0 ; 0) in the direction d) with respect to D x G(x (i) For t - 0, where v(Q d is the optimal value of the problem (ii) Every accumulation point - h of being an o(t 2 )-optimal trajectory of (P td ), is an optimal solution of the problem (Q d ). If in addition -(t) is a Lagrange multiplier associated with x(t), then every weak accumulation point of -(t) belongs to S(DL d ). be an optimal solution of (Q d ) and let - w be a corresponding optimal solution of (assuming that such optimal solutions exist). Then there exists an o(t 2 )-optimal trajectory for (P td ) of the form - Proof. From propositions 4.1 and 4.2 it follows that lim inf From the computation in the proof of proposition 4.2, it follows that any limit point of solution of (Q d ). As oe(-; T 2 This proves (i). If - h is an accumulation point of then as we mentioned in the proof of proposition 4.2, - h 2 S(PL d ) and the first part of statement (ii) follows from (4.11) and (4.5). Let - be a weak accumulation point of -(t), where -(t) is a Lagrange multiplier associated with x(t). It is easily proved that - is a Lagrange multiplier associated with x 0 . From the inequalities h - and a first order expansion of G(x(t); td) \Gamma G(x As - h is feasible for (PL d ), and - is feasible for the dual problem (DL d ), statement (ii) follows. Because of (DCQ), it follows by [3, Part I, Theorem B.2] that there exists a feasible path - x(t) of (P td ) of the form specified in (iv). Moreover, f(-x(t); statement (iv) follows. The following is an immediate consequence of the assertion (ii) in the above theorem. RR n-2989 14 J. Fr'ed'eric Bonnans , Roberto Cominetti , Alexander Shapiro Corollary 4.1 Suppose that, in addition to the assumptions of theorem 4.1, problem (Q d ) possesses a unique optimal solution h . Let - x(t) be an o(t 2 )-optimal trajectory of (P td ) such that O(t). Then - x(t) is right side differentiable at and the corresponding right side derivative is equal to h . Let us give a sufficient condition for uniqueness of the optimal solution of the problem (Q d ). Let us observe first that for any -, the function /(z) := \Gammaoe(-; T 2 K (y; z)) is convex. Indeed, consider z convexity of K, we have that and hence were arbitrary elements of the corresponding second order tangent sets, we obtain that the function oe(-; T 2 K (y; \Delta)) is concave, and hence /(\Delta) is convex. It follows that if, for every - 2 S(DL d ), the Hessian D 2 positive definite over the linear space generated by the (convex) set S(PL d ), then the max-function of the problem (Q d ) is strictly convex over this linear space and hence S(Q d ) is a singleton. The right side derivative of - x(t), at can be viewed as the directional derivative, in the direction d, of the corresponding o(kuk 2 )-optimal solution - x(u) of (P u ). Note also that if there exists an O(t 2 )-optimal trajectory - x(t) of (P td ) which is Lipschitz stable at x 0 , then The above inequality and (4.5) can hold together only if inf h2S(PLd is the recession cone of S(PL d ) (provided S(PL d ) is non empty), and since under (DCQ) we have v(PQ d;h that under these assumptions the following second order conditions sup are necessary for Lipschitzian stability of optimal solutions. Note the similarity of (4.15) with the strong second order conditions (3.1). Theorem 4.1 extends previous results obtained in the framework of nonlinear programming [1, 5, 23]. The main difference between the results presented in Theorem 4.1 and those obtained in the nonlinear programming setting is the additional curvature term ("sigma" term) and the assumption of nonemptiness of S(PL d ). The condition (DCQ) and the existence of Lagrange multipliers (which follows from the strong second order sufficient condi- tions) imply that (PL d ) has a finite value and that its dual (DL d ) has an optimal solution. INRIA Sensitivity analysis of optimization problems under second order regular constraints 15 In the nonlinear programming setting, the corresponding optimization problem (PL d ) is linear and it has optimal solutions as soon as its optimal value is finite. However, for general non polyhedral sets K we have to postulate that S(PL d ) is non empty. If this is not true, then as we mentined earlier, o(t)-optimal trajectories are not Lipschitz stable. In that case we may apply the analysis of the second kind that follows. 5 Expansion of the second kind In this section we discuss situations where approximate optimal solutions are H-older stable of degree 1=2 (see Theorem 3.2) and the set of Lagrange multipliers is non empty. Then it is convenient to consider paths of the form It follows that Expanding G(x(t); td) in a similar way we obtain that if the path x(t) is feasible, then and where We need an additional assumption. We say that the strong directional constraint qualification (SDCQ) holds if (DCQ) is satisfied and, given a path x(t) of the form (5.1) and such that (5.3) and (5.4) hold, then for close to 1 one can find z z, and a feasible path x fl (t) satisfying x In [3, Part II], where this assumption was introduced, it was proved that (SDCQ) is a consequence of (DCQ) whenever the set K has a nonempty interior, which is the case for semi-definite and semi-infinite optimization. Note also that (SDCQ) is satisfied whenever (CQ) holds. Consider the problem ae Min z2X 2Df(x oe and its dual (D 2 f2D RR n-2989 J. Fr'ed'eric Bonnans , Roberto Cominetti , Alexander Shapiro Theorem 5.1 Let - x(t) be an o(t)-optimal trajectory for (P td ) converging to a point x Suppose that the set of Lagrange multipliers 0 that for every h 2 C(x 0 ) the set K is second order regular at G(x 0 ; 0) in the direction with respect to D x G(x and that the following (weak) second order conditions hold sup Then: x(t) is H-older stable of degree 1/2, i.e. (ii) There is no duality gap between problems (Q 2 d ) and (D 2 d ), and their common value d ) is less than or equal to 2v(PL d ). (iii) The optimal value function can be expanded as (iv) If h 2 X is an accumulation point of t \Gamma1=2 (v) If (Q 2 d ) has an optimal solution z) and (CQ) holds, then there exists an o(t)-optimal trajectory x(t) of (P td ) such that Proof. By the second order conditions (5.7) and the second order regularity of the set statement (i) follows from Theorem 3.2. Assertion (ii) and the upper estimate are consequences of [3, Part II, Theorem 3.1]. To prove the converse inequality in (5.9) let be an arbitrary sequence. Letting x k := - x(t k ) and using part (i), by passing to a subsequence if necessary, we may assume that t \Gamma1=2 Hence we may write x An expansion of G(x d) similar to (5.2) and the second order regularity of K lead to D x G(x and Since we have D x f(x Using D x L(x INRIA Sensitivity analysis of optimization problems under second order regular constraints 17 This being true for any - 2 0 f2D Together with (5.9) this proves (5.8), i.e. (iii), as well as h 2 S(D 2 It remains to prove (v). It follows from (CQ) that there exists a feasible path of the form o(t). Computing the expansion of f(x(t); td), we find that x(t) is an o(t)-optimal trajectory, and the proof is complete. It may be surprising to observe that under quite natural assumptions (directional constraint qualification and the standard second order sufficient conditions), the first order expansion (5.8) of the optimal value function involves the second order information, included in the problem (D 2 d ), and perturbed optimal solutions are not Lipschitz stable. This is already true for nonlinear programming problems. In that case the above theorem reduces to results presented in [12] and [5]. The upper estimate (5.9) was obtained in the Banach space framework in [3]. Note that if the second order conditions (4.15) hold, then are optimal solutions of the problem (D 2 d ) and hence v(D 2 Therefore we obtain the following Corollary 5.1 Suppose that the assumptions of Theorem 5.1 hold as well as the second order conditions (4.15). Then for t - 0, 6 Expansion of the third kind In this section we discuss a situation similar to the one considered in the previous section except that the set of Lagrange multipliers is assumed to be empty. We consider a point satisfying the Fritz John optimality conditions, i.e. we assume that the set g generalized Lagrange multipliers is non empty. These two conditions, 0 imply that if (ff; -) 2 g We consider again paths of the form (5.1). The main difference from the previous case is that now variations of the optimal value function are of order O(t 1=2 ), and for can be negative. Consider the following subset of the critical cone It is worth pointing out that when 0 assuming (SDCQ), a point h belongs to C 2 only if (see [3, Part II]) RR n-2989 J. Fr'ed'eric Bonnans , Roberto Cominetti , Alexander Shapiro Theorem 6.1 Let - x(t) be an o(t)-optimal trajectory of (P td ) converging to a point x satisfying the Fritz John optimality conditions (2.3) and the (SDCQ). Suppose that the set of Lagrange multipliers 0 empty, that for every h 2 C(x 0 ) the set K is second order regular at G(x 0 ; 0) in the direction D x G(x with respect to D x G(x 0 ; 0), and that the generalized second order sufficient conditions (2.9) hold with K (h). Then: x(t) is H-older stable of degree 1/2, i.e. (ii) The optimal value function may be expanded as where v(Q 3 d ) is the optimal value of the problem (iii) If h is an accumulation point of t \Gamma1=2 The proof of this theorem is similar to that of Theorem 5.1 and will be omitted (see also [3, Part II]). Theorem 6.1 extends similar results obtained for nonlinear programming problems in [2]. 7 Applications and examples In this section we discuss some applications and particular examples of the developed theory. 7.1 Second order regularity in semi-infinite programming Let us first show that Theorem 4.1 itself can be used to verify second order regularity of a set defined by an infinite number of inequalities. Suppose that for every x 2 X the function concave and that the mapping G(x) does not depend on u, and consider the set \Theta := fu where \Phi := fx Kg. Since the functions f(x; \Delta) are concave, the set \Theta is convex. Clearly the set \Theta can be also defined in the form \Theta v(u) := inf x2\Phi f(x; u) is the corresponding optimal value function. Consider a point u 0g the set of minimizers of f(\Delta; and in the later case the set \Delta 0 is the set of minimizers of f(\Delta; Suppose that there exists a compact set \Sigma such that for all u in a neighborhood of u 0 and some ff ? v(u 0 ), INRIA Sensitivity analysis of optimization problems under second order regular constraints 19 We refer to this assumption as the inf-compactness condition. By Danskin theorem [11], under the inf-compactness condition, the optimal value function v(u) is directionally differentiable at its directional derivative is given by We assume that \Delta 0 is non empty and denote We also assume that the following second order growth condition holds for the function there exist a neighborhood N of \Delta 0 and c ? 0 such that Theorem 7.1 Suppose that the Slater condition holds, i.e. there is - u such that f(x; - u) ? 0 for all x 2 \Phi, that the set \Delta 0 is non empty and finite, that the inf-compactness condition and the second order growth condition (7.3) hold, that for every x the (CQ) holds and for every h 2 C(x 0 ) the set K is second order regular at G(x 0 ) in the direction DG(x 0 )h with respect to DG(x 0 ). Then the set \Theta is second order regular at u 0 and, if in addition \Theta d) is the optimal value of the problem Min Proof. Consider a point x As we mentioned earlier, x 0 is a minimizer of f(\Delta; subject to the constraint G(\Delta) 2 K and hence can be viewed as an optimal solution of the corresponding (unperturbed) problem (P u0 ). Note that in the present case the constraint mapping G(\Delta) does not depend on u. By restricting the optimization problem to a neigh- borhhod of x 0 , we obtain from Theorem 4.1 that the corresponding optimal value function - v(u) can be expanded as where - x0 (d; w) is the optimal solution of the problem Min fD The additional term D u in the above expansion appears since the optimal value function is expanded now along the parabolic curve (with the additional term 1t 2 w), and this term is equal to D u since G(\Delta) does not depend on u. Note also that the set RR n-2989 J. Fr'ed'eric Bonnans , Roberto Cominetti , Alexander Shapiro of the corresponding Lagrange multipliers is non empty because of the (CQ) and that existence of Lipschitz stable optimal solutions is ensured by the second order growth and inf-compactness conditions. Such analysis can be performed at every point of the set \Delta 0 and the optimal value function v(u) is given by the minimum of the optimal value functions corresponding to points x Consequently we obtain that the optimal value function v(u) is second order directionally differentiable and its second order directional derivative given by the minimum of functions - x0 (d; w), x Because of the Slater condition this implies (7.4), as proved in [4]. Note that, under the Slater condition, T \Theta (u 0 0g. Therefore if \Theta d) is empty. Also if v 0 \Theta d) is the whole space U . Consequently, in order to show second order regularity of \Theta, we have to consider only the case when v 0 Consider a sequence u r k such that Consider also a point x and a path using the second order expansion of G(x(t)), it is not difficult to see that such a path can be feasible, for small t - 0, only if By the Robinson-Ursescu stability theorem, because of the (CQ), the above condition is also sufficient for existence of such feasible path. Let x k := x(t k z k be such that G(x k where the term o(t 2 k ) can be taken uniformly in z for z in a bounded subset of X . Moreover, where \Xi is the set formed by those z 2 X satisfying (7.7). By duality the minimum in (7.9) is equal to the maximum in (7.5) and hence Since the above inequality holds for any x by the Slater condition and (7.4) it follows that r k 2 T 2 \Theta which proves the second order regularity assertion. 7.2 Differentiability of metric projections As an another application of Theorem 4.1, let us consider the question of directional differentiability of metric projections. Let K be a convex closed subset of IR n and for a point denote by PK (u) the point in K closest to u (with respect to the Euclidean norm can be defined as the optimal solution of the problem Min INRIA Sensitivity analysis of optimization problems under second order regular constraints 21 and is called the metric projection of u onto K. There are examples of a convex set K in IR 3 (and even in IR 2 ) such that the corresponding metric projection is not directionally differentiable at a point u 0 62 K ([16, 25]). The vector u in (7.10) can be viewed as a perturbation parameter in a neighborhood of a given point u 0 . Let us observe that all assumptions of Theorem 4.1 hold, provided the set K is second order regular at the point x 0 := PK (u 0 ). For a given direction d 2 IR n , the auxiliary problem (Q d ) can be written in the form Min By the discussion following Corollary 4.1, we have that the objective function in (7.11) is strongly convex. Since it is assumed that the set K is second order regular at x 0 , the second order tangent set T 2 we have that oe(-; T 2 valued for all h 2 C(x 0 ). It follows that the objective function in (7.11) is also finite valued for h 2 C(x 0 ) , and hence the optimization problem (7.11) possesses a unique optimal solution. We obtain the following result (see Corollary 4.1). Theorem 7.2 Suppose that the convex set K ae IR n is second order regular at the point directionally differentiable at where h is the optimal solution of the problem (7.11). 7.3 An application to semi-definite programming Consider, for example, the space S p of p \Theta p symmetric matrices equipped with the scalar product and the corresponding (Frobenius) norm kAk := ij . It is shown in [4] that the set S p of positive semi-definite matrices is (inner) second order regular at every point. Therefore the theory presented in this paper can be applied in a straightforward manner to semi-definite programming problems. Consider the cone K := S p and a point . If B is positive definite, then B belongs to the interior of S p and in that case TK singular, then is an n \Theta s matrix whose columns an orthonormal basis of the null space of B. Furthemore, consider H 2 TK (B). If the matrix E T HE is positive definite, then the second order tangent set T 2 K K is the Moore-Penrose pseudo inverse of B, and being an orthonormal basis of the null space of the s \Theta s matrix E T HE (see [26] for a discussion and derivation of these formulas). RR n-2989 22 J. Fr'ed'eric Bonnans , Roberto Cominetti , Alexander Shapiro For example, consider the metric projection PK (\Delta) onto the set K := S p . It is well known that PK i is the spectral decomposition of A (i.e. ff i and e i are eigenvalues and corresponding orthonormal eigenvectors of A), I 0g. It follows from Theorem 7.2 that PK (\Delta) is directionally differentiable at every point A 2 S p even if A has several zero eigenvalues. Suppose that A 62 S p . The directional derivative P 0 K (A; D) is then given by the optimal solution of the corresponding auxiliary problem which we now calculate. We have that the corresponding Lagrange multipler is given by If I + is empty, i.e. the matrix A is negative semi-definite, then K i and it follows from (7.13) that (cf. [26]) Therefore the auxiliary problem can be written in the form Min where \Gamma2 tr hi P and is the corresponding critical cone given by is the matrix whose columns are the vectors e i , is the matrix whose columns are e i , . Alternatively the cone C can be written in the form We see that the objective function in (7.14) is quadratic and that C is a linear space iff the set I 0 is empty, i.e. iff A does not have zero eigenvalues. Therefore we obtain that PK (\Delta) is differentiable at A 62 K iff A does not possess zero eigenvalues. Example. Consider the example discussed in the introduction. When ff ? 0 all calculations are simple, as computing second order terms is not necessary. When Theorem INRIA Sensitivity analysis of optimization problems under second order regular constraints 23 5.1 applies. The critical cone is -, and the Lagrangian simplifies to L(x; -; , The auxiliary problem (D 2 d ) reduces to Min "' The cost function of this subproblem is the sum of two nonnegative functions. Therefore it has the unique optimal solution - It follows that any o(u)-optimal trajectory x(u), u - 0, satisfies u). As a matter of fact, by direct computation we find that the perturbed problem has a unique optimal solution - --R First and second order sensitivity analysis of nonlinear programs under directional constraint qualification conditions Directional derivatives of optimal solutions in smooth nonlinear pro- gramming Perturbed optimization in Banach spaces I: a general theory based on a weak directional constraint qualification Second order necessary and sufficient optimality conditions under abstract constraints D'eveloppement de solutions exactes et approch'ees en programmation non lin'eaire Optimization problems with perturbations Linear Matrix inequa- lities tangent sets and second order optimality conditions Tangent sets to unilateral convex sets The Theory of Max-Min and Its Applications to Weapons Allocation Problems Directional behavior of optimal solutions in nonlinear mathematical programming How to differentiate the projection on a convex set in Hilbert space. On sensitivity analysis of nonlinear programs in Banach spaces An envelope-like effect of inifinitely many inequality constraints on second order necessary conditions for minimization problems a discontinuous envelope function and a non-differentiable nearest point mapping On the existence and nonexistence of Lagrange multipliers in Banach spaces First order conditions for general nonlinear optimization Stability theorems for systems of inequalities Conjugate Duality and Optimization Perturbation theory of nonlinear programs when the set of optimal solutions is not a singleton Sensitivity analysis of nonlinear programs and differentiability properties properties of metric projections On Lipschitzian stability of optimal solutions of parametrized semi-infinite programs Directionally nondifferentiable metric projection First and second order analysis of nonlinear semidefinite programs Sensitivity analysis of parametrized programs under cone constraints Regularity and stability for the mathematical programming problem in Banach spaces --TR --CTR Jong-Shi Pang , Defeng Sun , Jie Sun, Semismooth homeomorphisms and strong stability of semidefinite and Lorentz complementarity problems, Mathematics of Operations Research, v.28 n.1, p.39-63, February Defeng Sun, The Strong Second-Order Sufficient Condition and Constraint Nondegeneracy in Nonlinear Semidefinite Programming and Their Implications, Mathematics of Operations Research, v.31 n.4, p.761-776, November 2006
parametric optimization;semi-definite programming;directional constraint qualification;semi-infinite programming;directional differentiability;sensitivity analysis;metric projection;optimal value function;second order optimality conditions
301117
Predictive analysis of a wavefront application using LogGP.
This paper develops a highly accurate LogGP model of a complex wavefront application that uses MPI communication on the IBM SP/2. Key features of the model include: (1) elucidation of the principal wavefront synchronization structure, and (2) explicit high-fidelity models of the MPI-send and MPI-receive primitives. The MPI-send/receive models are used to derive L, o, and G from simple two-node micro-benchmarks. Other model parameters are obtained by measuring small application problem sizes on four SP nodes. Results show that the LogGP model predicts, in seconds and with a high degree of accuracy, measured application execution time for large problems running on 128 nodes. Detailed performance projections are provided for very large future processor configurations that are expected to be available to the application developers. These results indicate that scaling beyond one or two thousand nodes yields greatly diminished improvements in execution time, and that synchronization delays are a principal factor limiting the scalability of the application.
INTRODUCTION This paper investigates the use of the parallel machine model called LogGP to analyze the performance of a large, complex application on a state-of-the-art commercial parallel platform. The application, known as Sweep3D, is of interest because it is a three-dimensional particle transport problem that has been identified as an ASCI benchmark for evaluating high performance parallel architectures. The application is also of interest because it has a fairly complex synchronization structure. This synchronization structure must be captured in the analytic model in order for the model to accurately predict application execution times and thus provide accurate performance projections for larger systems, new architectures, or modifications to the application. One question addressed in this research is which of variants of the LogP model [4] is best suited for analyzing the performance of Sweep3D on the IBM SP system. Since this version of Sweep3D uses the MPI communication primitives, the LogGP model [2] which includes an additional parameter, G, to accurately model communication cost for large pipelined messages, turned out to provide the requisite accuracy. Possibly due to the blocking nature of the MPI primitives, the contention at message processing resources is negligible and thus recent extensions to LogP for capturing the impact of contention [7,12] are not needed. In previous work [4,6,7], the LogP models have been applied to important but fairly simple kernel algorithms, such as FFT, LU sorting algorithms, or sparse matrix multiply. Two experimental studies have applied the model to complex full applications such as the Splash benchmarks [9, 11]. However, in these studies, the effects of synchronization on application performance and scalability were measured empirically rather than estimated by the model. Many other previous analytic models for analyzing application performance are restricted to simpler synchronization structures than Sweep3D (e.g., [8]). One exception is the deterministic task graph analysis model [1], which has been shown to accurately predict the performance of applications with complex synchronization structures. The LogGP model represents synchronization structures more abstractly than a task graph. A key question addressed in this research is whether the more abstract representation is sufficient for analyzing a full, complex application such as Sweep3D. We construct a LogGP model that not only captures the synchronization structure but also elucidates the basic synchronization structure of Sweep3D. Similar to the approach in [2], we use communication micro-benchmarks to derive the input parameters, L, o, and G. However, as we show in section 3, deriving these parameters is somewhat more complex for MPI communication on the SP/2 than for the Meiko CS-2; thus explicit models of the MPI-send and MPI-receive primitives are developed. Although the LogGP input parameters are derived from four-processor runs of Sweep3d, the LogGP model projects performance quite accurately up to 128 processors, for several fixed total problem sizes and several cases of fixed problem size per processor. The model also quickly and easily projects performance for the very large future processor configurations that are expected to be available to the application developers. * This research is supported in part by DARPA/ITO under contract N66001-97-C-8533. Computer Sciences Technical Report #1392, University of Wisconsin-Madison, February 1999. To appear in Proc. 7 th ACM SIGPLAN Symp. on Principles and Practice of Parallel Programming (PPoPP '99), Atlanta, GA, May 1999. We show several interesting results that can be derived from the analysis. Section 2 provides a brief overview of the Sweep3D application. Section 3 derives the models of MPI-send and MPI-receive and the parameter values that characterize communication cost. Section 4 presents the LogGP equations for Sweep3D, as well as the modifications that are needed when the application utilizes the multiprocessor SMP nodes of the SP/2. In the latter case, there are two types of communication costs: intra-cluster and inter- cluster. Section 5 provides model validation results as well as performance projections for future systems. Section 6 provides the conclusions of this work. 2. Sweep3D Sweep3D is described in [10]. A detailed task graph showing the complex synchronization among the tasks in the version of the code that is analyzed in this paper, is given in [5]. Here we give a simple overview of this version of Sweep3D, including only the aspects that are most relevant to the LogGP model. The structure of the algorithm will be further apparent from the LogGP model presented in section 4. As its name implies, the Sweep3D transport calculations are implemented as a series of pipelined sweeps through a three dimensional grid. Let the dimensions be denoted by (i,j,k). The 3D grid is mapped onto a two-dimensional array of processors, of size m-n, such that each processor performs the calculations for a partition in the i and j dimensions of size it-jt-k, as shown in Figure 1. Note that, due to the problem mapping in Figure 1, the processors in the processor grid of Figure 2 will be numbered p i,j where i varies from 1 to n and indicates the horizontal position of the processor. A single iteration consists of a series of pipelined sweeps through the 3D grid starting from each of the 8 corners (or octants) of the grid. The mapping of the sweeps to the two dimensional processor grid is illustrated in Figure 2. If mo denotes the number of angles being considered in the problem, then each processor performs it-jt-k-mo calculations during the sweeps from each octant. To create a finer granularity pipeline, thus increasing parallelism in the computation, the block of data computed by a given processor is further partitioned by an angle blocking factor (mmi) and a k-plane blocking factor (mk). These parameters specify the number of angles and number of planes in the k-dimension, respectively, that are computed before boundary data is forwarded to the next processor in the pipeline. Each processor in the interior of the processor grid receives this boundary data from each of two neighbor processors, computes over a block based on these values, and then sends the results of its calculations to two neighbor destination processors, determined by the direction of the sweep. In the optimized version of Sweep3D that we analyze, once all blocks at a given processor are calculated for the sweeps from a given pair of octants, the processor is free to start calculating blocks for sweeps from the next pair of octants. For example, the lower left corner processor can start to compute the first block of the sweep for octant 7 after it has computed its last block of the sweep originating from octant 6. This will be shown in greater detail in the LogGP model of Sweep3D in section 4. The pipelined sweep for octant 8 completes one iteration of the algorithm for one energy group. In the code we analyze, twelve iterations are executed for one time step. The target problems of interest to the ASCI program involve on the order of groups and 10,000 time steps, for grid sizes on the order of 10 9 or twenty million (e.g., 280-280-255). We can scale the model projections to these problem sizes, as shown in section 5. 3. Communication Parameters: L, o, G Before we present the LogGP model of Sweep3D for the SP/2, we derive models of the MPI-send and MPI-receive communication primitives that are used in the application. The MPI-send/receive models are needed in the LogGP model of Sweep3D, and are also needed to derive two of the communication parameters values, namely the network Latency (L), and the processing overhead (o) to send or receive a message. The communication structure of Sweep3D is such that we can ignore the gap (g) parameter, as the time between consecutive message transmissions is greater than the minimum allowed value of inter-message transmission time. Below we give the roundtrip communication times for MPI communication on the IBM SP, which are measured using simple communication micro-benchmarks. The value of G (Gap per byte) is derived directly from these measurements. We then discuss how we modeled the SP/2 MPI-send and MPI-receive primitives using the L, o, and G parameters, followed by a description of how the values of L and are derived. A significant result is that we derive the same values of L and G (but different values of o) from the Fortran and the C micro-benchmark measurements. This greatly increases our confidence in the validity of the MPI communication models. Figure 1: Partitioning the 3D Grid in the i and j Dimensions Figure 2: The Sweeps for each Octant it jt (Processor Grid) 3.1 Measured Communication Times The roundtrip communication time as a function of message size for a simple Fortran communication micro-benchmark is given in Figures 3 (a) and (b). For each data point, a message of the given size is sent from processor A to processor B, received by a process on processor B, and immediately sent back to A. The roundtrip time is measured on A by subtracting the time just before it calls MPI-send from the time that its MPI-receive operation completes. Each figure also includes the results of our model of the roundtrip communication, which is used to derive the L and as discussed below. As can be seen in the figures, the measured communication time increases significantly with message size. Hence, the G parameter is required to accurately model communication cost. Two further points are worth noting from the Figure: . The communication cost changes abruptly at message size equal to 4KB, due to a handshake mechanism that is implemented for messages larger than 4KB. The handshake is modeled below. . The slope of the curve (G) changes at message size equal to 1KB. The message processing overhead (o) is also different for messages larger than 1 KB than for messages smaller than 1KB, due to the maximum IP packet size. Thus, we will derive separate values of G s / G l and of messages. 3.2 Models of MPI-send and MPI-receive The models developed here reflect a fairly detailed understanding of how the MPI-send and MPI-receive primitives are implemented on the SP/2, which we were able to obtain from the author of the MPI software. It might be necessary to modify the models for future versions of the MPI library, or if Sweep3D is run on a different message-passing architecture or is modified to use non-blocking MPI primitives. The models below illustrate a general approach for capturing the impact of such system modifications. Since the SP/2 system uses polling to receive messages, we can assume the overhead to send a message is approximately the same as the overhead to receive a message, o. For messages smaller than 4KB, no handshake is required, and the total end-to-end cost of sending and receiving a message is modeled simply as: where the values of G and o depend on whether the message size is larger or smaller than 1KB. For messages larger than 4KB, the end-to-end communication requires a "handshake" in which just the header is initially sent to the destination processor and the destination processor must reply with a short acknowledgment when the corresponding receive has been posted. If the receive has been posted when the header message is sent, the end-to-end cost is modeled as follows: Note that the processing overhead for receiving the ack is modeled as being subsumed in the processing overhead for sending the data. If the corresponding receive has not yet been posted, a additional synchronization delay will be incurred. This delay is modeled in the next section. In addition to the total cost for communication given above, the LogGP model for Sweep3D requires separate costs for sending and receiving messages. For message size less than 4KB: where the value of o depends on the message size. For message size greater than or equal to 4KB: The receive cost includes the time to inform the sending processor that the receive is posted, and then the delay for the message to arrive. 3.3 Communication Parameter Values Using the above equations for Total_Comm and the measured round-trip communication times, we can derive the values of L, which are given in Table 1. The values of G s and G are computed directly from the slope of the curve (in Figure for the respective range of message sizes. To derive L and o, we solve three equations for Total_Comm (for message sizes less than 1KB, between 1-4KB, and greater than 4KB, respectively) in three unknowns (L, Applying this method to the roundtrip time measurements obtained with C micro-benchmarks yields the same values of L and G as for the measurements Figure 3: MPI Round Trip Communication Message Size Time (usec)1003005000 2000 4000 6000 8000 10000 Message Size Time (usec) Measured Modeled obtained with Fortran benchmarks, although the value of o is different, as shown in Table 1. This greatly increases our confidence in the validity of the above models of the MPI communication primitives. Using the parameter values derived in this way, the measured and modeled communication costs differ by less than 4% for messages between 64-256KB, as shown in Figure 3. Note that although the measured and modeled values seem to diverge at message size equal to 8KB in figure 2(a), figure 2(b) shows that the values for message sizes above 8KB are in good agreement. 4. The LogGP Model of Sweep3D In this section we develop the LogGP model of Sweep3D, using the models of the MPI communication costs developed in section 3. We first present the model that assumes each processor in the m-n processor grid is mapped to a different SMP node in the SP/2. In this case, network latency is the same for all communication. We then give the modified equations for the case that 2-2 regions of the processor grid are mapped to a single (four-processor) SMP node in the SP/2. The round-trip times and parameter values computed in section 3 were for communication between processors in different SMP nodes. The same equations can be used to compute intra-node communication parameters. 4.1 The Basic Model The LogGP model takes advantage of the symmetry in the sweeps that are performed during the execution, and thus calculates the estimated execution time for sweeps from one octant pair and then uses this execution time to obtain the total execution time for all sweeps, as explained below. During a sweep, as described in section 2, a processor waits for input from up to two neighbor processors and computes the values for a portion of its grid of size mmi - mk - it - jt. The processor then sends the boundary values to up to two neighbor processors, and waits to receive new input again. Using costs associated with each of these activities, we develop the LogGP model summarized in Table 2, which directly expresses the precedence and send/receive synchronization constraints in the implemented algorithm. The time to compute one block of data is modeled in equation (5) of Table 2. In this equation, W g is the measured time to compute one grid point, and mmi, mk, it and jt are the input parameters, defined in section 2, that specify the number of angles and grid points per block per processor. Consider the octant pair (5,6) for which the sweeps begin at the processor in the upper-left corner of the processor grid, as shown in Figure 2. Recall that the upper-left processor is numbered p 1,1 . To account for the pipelining of the wavefronts in the sweeps, we use the recursive formula in equation (6) of Table 2 to compute the time that processor p i,j begins its calculations for these sweeps, where i denotes the horizontal position of the processor in the grid. The first term in equation (6) corresponds to the case where the message from the West is the last to arrive at processor p i,j . In this case, the message from the North has already been sent but cannot be received until the message from the West is processed due to the blocking nature of MPI communications. The second term in equation (6) models the case where the message from the North is the last to arrive. Note that StartP and that the appropriate one of the two terms in equation (6) is deleted for each of the other processors at the east or north edges of the processor grid. The Sweep3D application makes sweeps across the processors in the same direction for each octant pair. The critical path time for the two right-downward sweeps is computed in equation (7) of Table 2. This is the time until the lower-left corner processor p 1,m has finished communicating the results from its last block of the sweep for octant 6. At this point, the sweeps for octants 7 and 8 (to the upper right) can start at processor p 1,m and proceed toward . Note that the subscripts on the Send and Receive terms in equation (7) are included only to indicate the direction of the communication event, to make it easier to understand why the term is included in the equation. The send and receive costs are as derived in section 3.2. The critical path for the sweeps for octants 7 and 8 is the time until all processors in the grid complete their calculations for the sweeps, since the sweeps from octants 1 and 2 (in the next iteration) won't begin until processor p n,1 is finished. Due to the symmetry in the Sweep3D algorithm, mentioned above, the time for the sweeps to the Northeast is the same as the total time for the sweeps for octants 5 and 6, which start at processor p 0,0 and move Southeast to processor p n,m . Thus, we compute the critical path time for octants 7 and 8 as shown in equation (8) of Table 2. Equation (8) represents the time until processor p n,m has finished its last calculation for the second octant pair. The processor Table LogGP Model of Sweep3D Message Size: - 1024 > 1024 Table 1. SP/2 MPI Communication Parameters directly to its East, p n-1,m , must start computing, calculate and communicate all needed results from the blocks for both octants, and then wait for processor p n,m to receive the results from the last block of these calculations and compute the results based on this block. Due to the symmetry between the sweeps for octants 1 through 4 and the sweeps for octants 5 through 8, the total execution time of one iteration is computed as in equation (9) of Table 2. The equation for T 5,6 contains one term [(m-1)L], and the equation for T 7,8 contains two terms [(m-1)L and (n-2)L], that account for synchronization costs. These synchronization terms are motivated by the observation that measured communication times within Sweep3D are greater than the measured MPI communication cost discussed in section 3. The (m-1)L term in T 5,6 and T 7,8 captures the delay caused by a send which is blocked until the destination processor posts the corresponding receive. This delay accumulates in the j direction; thus the total delay at 1,m depends on the number of processors to its North (m-1). Furthermore, this synchronization cost is zero for the problems with message sizes smaller than 4KB, since in this case, the processor sends the message whether or not the corresponding receive has been posted. The second synchronization delay in T 7,8 , (n-2)L, represents difference between when a receive is posted, and when a message is actually received from the sending processor. Since a processor receives from the North after the West on a southeast sweep, it is more likely to wait for the message from the West. Since this delay is cumulative over all processors in the i dimension, at processor p (n-1),m we model this delay as (n-2)L. Notice that this receive synchronization term is 0 for processors on the west edge of the processor grid since there are no processors to its West from which to receive a message. This is why it was not included in the T 5,6 expression above. 4.2 The Model for the Clustered SMP Nodes A few modifications to the above model are needed if each 2-2 region of processor grid is mapped to a single four-processor SMP cluster in the IBM SP/2, rather than mapping each processor in the grid to a separate SMP node. These changes are outlined here, in anticipation of the next generation of MPI software for the SP that will support full use of the cluster processors. Let L local denote the network latency for an intracluster message, remote denote the latency for an intercluster message, and L local + L remote )/2. In the following discussion, are assumed to be the same for intra-cluster and inter-cluster messages, but the equations can easily be modified if this is not the case. Let L and R be subscripts that denote a model variable (e.g,. TotalComm, Send, or Receive) that is computed using L local or L remote , respectively. Using this notation, the modified equations that compute the execution time of Sweep3D are given in Table 3 and described below. Recall that processor numbering starts from 1 in both the i and j dimensions. Also recall that, for processor p i,j , i denotes its horizonal position in the processor grid. If both i and j are even, then all incoming messages are intra-cluster and all outgoing messages are inter-cluster. The vice versa is true if both i and j are odd. This means that StartP i,j is computed with TotalComm L , Receive L , and Send L (for the incoming messages) in the former case, and with TotalComm R , Receive R , and Send R in the latter case. For i odd and j even, the variables in the first term of StartP i,j are for inter-cluster communication and the communication variables in the second term are for intra-cluster communication. The vice versa is true for i even and j odd. The Send and Receive variables in the equations for T 5,6 and T 7,8 are all intra-cluster variables, assuming that the number of processors in each of the i and j dimensions is even when mapping 2-2 processor regions to the SMP clusters. The synchronization terms in T 5,6 and T 7,8 are computed using L avg . These are the only changes required in the model. The modified model has been validated against detailed simulation [3]. However, since we cannot yet validate them with system measurements (because efficient MPI software for intra-cluster communication doesn't yet exist), only results for the case that each processor is mapped to a separate SMP node are given in this paper. Nevertheless, the changes to the model for full cluster use are simple and illustrate the model's versatility. Furthermore, these equations can be used to project system performance for the next generation MPI software. 4.3 Measuring the Work (W) The value of the work per grid point, W g , is obtained by measuring this value on a 2x2 grid of processors. In fact, to obtain the accuracy of the results in this paper, we measured W g for each per-processor grid size, to account for differences (up to 20%) that arise from cache miss and other effects. Since the Sweep3D program contains extra calculations ("fixups") for five of the twelve iterations, we measure W g values for both of these iteration types. Although this is more detailed than the creators of LogP/LogGP may have intended, the increased accuracy is substantial and needed for the large scale projections in section 5. Furthermore, our recursive model of Sweep3D only represents the Table 3: Modified LogGP Equations for Intra-Cluster Communication on the SP/2 sweeps of the Sweep3D code. In addition, we measure the computation time before and after this main body of the code (i.e., between the iterations for a time step). These computation times, denoted W before and W after , are measured during a single processor run of a specific problem size. All model parameters are thus measured using simple code instrumentation and relatively short one, two, and four-processor runs. In the next section we investigate how accurately the model predicts measured execution time for the Sweep3D application. 5. Experimental Results In this section we present the results obtained from the LogGP model. We validate the LogGP projections of Sweep3D running time against measured running time for up to 128 processors and then use the LogGP model to predict and evaluate the scalability of Sweep3D to thousands of processors, for two different problem sizes of interest to the application developers. Unless otherwise stated the reported execution times are for one energy group and one time step with twelve iterations in the time step. In Figure 4 we compare the execution time predicted by the LogGP model to the measured execution time for the Fortran version of Sweep3d on up to 128 SP/2 processors, for fixed total problems sizes (150-150-150 and 50-50-50), and k-blocking mk, equal to 10. As the number of processors increases, the message size and the computation time per processor decrease, while the overhead for synchronization increases. For these problem sizes and processor configurations, the message sizes vary from over 16KB to under 1KB; there is remarkably high agreement between the model estimates and the measured system performance across the entire range. Figure 5 shows that the larger problem size achieves reasonably good speedup (i.e., low communication and synchronization overhead) on 128 processors while the smaller problem size does not. Note that the model is highly accurate for both cases. In Figure 6, we show the predicted and measured application execution time as a function of the number of processors on the SP/2, for two different cases of fixed problem size per processor. In Figure 6(a) each processor has a partition of the three-dimensional grid that is of size 20-20-1000. In Figure 6(b), each processor has a partition of size 45x45x1000. In these experiments, the total problem size increases as the number of processors increases. The agreement between the model estimates (a) Problem size: 150-150-150 (b) Problem size: 50-50-50 Figure 4: Validation of the LogGP Model for Fixed Total Problem Size (a) Up to 128 processors (b) Up to 2500 processors Figure 5: Sweep3D Speedups for Fixed Total Problem Sizes in Figure 4 Code, mk=10, mmi=3)501500 50 100 150 Processors Time (Sec) Model Processors Time Processors Processors and the measured execution time is again generally excellent for the level of abstraction in the model. However these results show that the model is less quantitatively accurate when mk=1. We have verified for many configurations that the LogGP model is qualitatively accurate in determining whether the execution time with mk=1 is higher or lower than the execution time with mk=10. We have also verified that the model is quantitatively accurate for values of mk larger than 10. The results for 45x45x1000 also illustrate that the C version of the code (which was created from the Fortran version using f2c) is somewhat slower than the Fortran code. Although the absolute performance for C differs, the performance trends that we report in this paper for the Fortran code are also observed in the C code and model projections. Figure 7 shows the projected execution time of Sweep3D with a fixed problem size per processor, as the system is scaled to the thousands of processors that are expected to be available at ASCI sites in the near future. Two fixed per-processor problem sizes are considered: 6-6-1000 and 14-14-255. In both cases, the model predictions have been validated to 2500 processors using simulation (not shown). The measured execution times for the 6-6-1000 case illustrate an unexplained system anomaly in which measured execution time suddenly increases for a given small increase in the number of processors. This anomaly has occurred for only a couple of the fixed per-processor grid sizes we have examined. Note that the anomaly occurs even though the problem size per processor is fixed, and thus it seems unlikely that it can be explained by cache behavior or message size. One of the hazards of modeling (analytic or simulation) is that such anomalous system behavior cannot be predicted. However, the model estimates show that the jump in execution time is not due to expected communication or synchronization costs. Detailed examination of the system implementation is required to discover, and hopefully correct, the cause of the anomaly. As in figure 6, figures 7(a) and (b) predict excellent scaling in the case where memory usage per processor is kept constant. Nevertheless, solving the 10 9 problem size with 6-6-1000 grid points per processor requires 27,000 processors. The results in Figure 7(a) suggest that the execution time, scaled up to groups and 10,000 time steps will be prohibitive for this problem configuration. (a) 20-20-1000 (b) 45-45-1000 Figure Validation of the LogGP Model, Fixed Problem Size Per Processor (a) 6-6-1000 Figure 7: Projected Sweep3D Execution Time, Fixed Problem Size Per Processor (mmi=3, mk=10)40012000 100 200 300 400 500 Number of Processors Time (sec) C Measured mk=10 C LogGP mk=10 C Measured mk=1 C LogGP mk=1 Measured mk=10 FOR LogGP mk=10 Measured mk=1 FOR LogGP mk=150150250 Number of Processors Time Number of Processors Time Number of Processors Time (sec) Measured LogGP Figure 8 gives the projected execution time of Sweep3D as the system is scaled to 20,000 processors, for two different total problem sizes of interest to the application developers. In this case, the projected execution times, for a single time step involving 12 iterations, are scaled up by a factor of 30 to reflect the fact that the computation of interest to the scientists involves energy groups rather than one. Note that the problem size per processor decreases as the number of processors increases, and thus the Sweep3D configurations with larger mk have higher performance. The LogGP model can be used to determine which values of the Sweep3D configuration parameters (i.e., mmi and yield the lowest execution time for given processor configurations and problem sizes. One key observation from the results in Figure 8 is that there is a point of greatly diminishing improvement in execution time as the number of processors is increased beyond one or two thousand. A second key observation from Figure 8(b) is that even for optimal values of the Sweep3D configuration parameters and an unlimited number of processors, solving the billion grid point problem for time steps appears to require a prohibitive execution time using the current algorithm. To investigate the causes of the limited scalability in Figures 7 and 8, Figure 9 shows a breakdown of the execution time for each of the problem sizes in Figure 8. This breakdown shows how much of the critical path execution time is due to computation, non-overlapped synchronization, and non-overlapped communication. A key observation is that as the system is scaled synchronization delays become a significant and then dominant factor in execution time. (These synchronization delays are modeled by the (m-1)L and (n-1)L terms in equations (7) and (8) of Table 2.) Modifications that reduce the synchronization costs would be highly desirable for solving the very large problems of interest. For example, a simple modification that might be explored is to use a non-blocking form of MPI-send. However, more fundamental algorithmic changes that reduce synchronization delays may be needed. Figure 10 shows that this could yield greater benefit than improved processor technology, due to the difficulty of speeding up communication latencies. (a) 20 Million Grid Points (b) 1 Billion Grid Points Figure 8: Projected Sweep3D Execution Times, Fixed Total Problem Size (One Time Step, (a) 20 Million Grid Points (b) 1 Billion Grid Points Figure 9: Projected Sweep3D Execution Time: Communication and Synchronization Costs (One Time Step, Number of Processors Time LogGP mmi=1, mk=1 LogGP mmi=3, mk=1 LogGP mmi=6, mk=1 LogGP mmi=1, mk=10 LogGP mmi=3, mk=10 LogGP mmi=6, mk=105001500250035000 5000 10000 15000 20000 25000 Number of Processors Number of Processors total comp comm synch10003000500070000 5000 10000 15000 20000 25000 Number of Processors 6. Conclusions The principal contribution of this research is the LogGP model for analyzing and projecting the performance of an important application that has a complex synchronization structure. For this wavefront application, the LogGP equations that capture the principal synchronization costs also elucidate the basic pipelined synchronization structure, illustrating an abstraction capability in this domain that is comparable to the simplicity of the communication parameters (L, o, and G). This research provides a case study in which the model validates extremely well against measured application performance, and further illustrates the potential of the LogGP model for analyzing a wide variety of interesting applications including the important class of wavefront applications. The most significant results obtained for the Sweep3D application studied in this paper are as follows. First, scaling beyond one or two thousand processors yields greatly diminished returns in terms of improving execution time, even for very large problem sizes. Second, solving problem sizes on the order of 10 grid points with groups and 10,000 time steps appears to be impractical with the current algorithm. Finally, synchronization overhead is a principal factor in limiting scalability of the application. Future work includes generalizing the model presented in this research to create a re-usable analytic model of wavefront applications executing on production parallel architectures, developing a model to the shared-memory version of Sweep3D, and developing LogGP models of applications with other complex synchronization structures. --R "Analyzing the Behavior and Performance of Parallel Programs" "LogGP: Incorporating Long Messages into the LogP Model" "LogP: Towards a Realistic Model of Parallel Computation" "POEMS: End-to-end Performance Design of Large Parallel Adaptive Computational Systems" "Fast Parallel Sorting Under LogP: Experience with the CM-5" "LoPC: Modeling Contention in Parallel Algorithms" "The Effects of Latency, Occupancy, and Bandwidth in Distributed Shared Memory Multiprocessors" "Solution of the First-Order Form fo the 3-D Discrete Orginates Equation on a Massively Parallel Processor" "Effects of Communication Latency, Overhead, and Bandwidth in a Cluster Architecture" "LoGPC: Modeling Network contention in Message Passing Programs" --TR LogP: towards a realistic model of parallel computation Analyzing the behavior and performance of parallel programs LogGP Predicting application behavior in large scale shared-memory multiprocessors Fast Parallel Sorting Under LogP Effects of communication latency, overhead, and bandwidth in a cluster architecture Poems The Effects of Latency, Occupancy, and Bandwidth in Distributed Shared Memory Multiprocessors --CTR Ewa Deelman , Gurmeet Singh , Mei-Hui Su , James Blythe , Yolanda Gil , Carl Kesselman , Gaurang Mehta , Karan Vahi , G. Bruce Berriman , John Good , Anastasia Laity , Joseph C. Jacob , Daniel S. Katz, Pegasus: A framework for mapping complex scientific workflows onto distributed systems, Scientific Programming, v.13 n.3, p.219-237, July 2005 Fumihiko Ino , Noriyuki Fujimoto , Kenichi Hagihara, LogGPS: a parallel computational model for synchronization analysis, ACM SIGPLAN Notices, v.36 n.7, p.133-142, July 2001 Gabriel Marin , John Mellor-Crummey, Cross-architecture performance predictions for scientific applications using parameterized models, ACM SIGMETRICS Performance Evaluation Review, v.32 n.1, June 2004 Daniel Nurmi , Anirban Mandal , John Brevik , Chuck Koelbel , Rich Wolski , Ken Kennedy, Grid scheduling and protocols---Evaluation of a workflow scheduler using integrated performance modelling and batch queue wait time prediction, Proceedings of the 2006 ACM/IEEE conference on Supercomputing, November 11-17, 2006, Tampa, Florida Kirk W. Cameron , Rong Ge, Predicting and Evaluating Distributed Communication Performance, Proceedings of the 2004 ACM/IEEE conference on Supercomputing, p.43, November 06-12, 2004 Ruoming Jin , Gagan Agrawal, Performance prediction for random write reductions: a case study in modeling shared memory programs, ACM SIGMETRICS Performance Evaluation Review, v.30 n.1, June 2002 Vikram Adve , Rizos Sakellariou, Application Representations for Multiparadigm Performance Modeling of Large-Scale Parallel Scientific Codes, International Journal of High Performance Computing Applications, v.14 n.4, p.304-316, November 2000 Rajive Bagrodia , Ewa Deelman , Thomas Phan, Parallel Simulation of Large-Scale Parallel Applications, International Journal of High Performance Computing Applications, v.15 n.1, p.3-12, February 2001 David K. Lowenthal, Accurately Selecting Block Size at Runtime in Pipelined Parallel Programs, International Journal of Parallel Programming, v.28 n.3, p.245-274, June 2000 Det Buaklee , Gregory F. Tracy , Mary K. Vernon , Stephen J. Wright, Near-optimal adaptive control of a large grid application, Proceedings of the 16th international conference on Supercomputing, June 22-26, 2002, New York, New York, USA Vikram S. Adve , Rajive Bagrodia , James C. Browne , Ewa Deelman , Aditya Dube , Elias N. Houstis , John R. Rice , Rizos Sakellariou , David J. Sundaram-Stukel , Patricia J. Teller , Mary K. Vernon, POEMS: End-to-End Performance Design of Large Parallel Adaptive Computational Systems, IEEE Transactions on Software Engineering, v.26 n.11, p.1027-1048, November 2000 Ruoming Jin , Gagan Agrawal, A methodology for detailed performance modeling of reduction computations on SMP machines, Performance Evaluation, v.60 n.1-4, p.73-105, May 2005 Vikram S. Adve , Mary K. Vernon, Parallel program performance prediction using deterministic task graph analysis, ACM Transactions on Computer Systems (TOCS), v.22 n.1, p.94-136, February 2004
particle transport applications;parallel algorithms;logp model;parallel application performance
301118
Performance prediction of large parallel applications using parallel simulations.
Accurate simulation of large parallel applications can be facilitated with the use of direct execution and parallel discrete event simulation. This paper describes the use of COMPASS, a direct execution-driven, parallel simulator for performance prediction of programs that include both communication and I/O intensive applications. The simulator has been used to predict the performance of such applications on both distributed memory machines like the IBM SP and shared-memory machines like the SGI Origin 2000. The paper illustrates the usefulness of COMPASS as a versatile performance prediction tool. We use both real-world applications and synthetic benchmarks to study application scalability, sensitivity to communication latency, and the interplay between factors like communication pattern and parallel file system caching on application performance. We also show that the simulator is accurate in its predictions and that it is also efficient in its ability to use parallel simulation to reduce its own execution time which, in some cases, has yielded a nearlinear speedup.
INTRODUCTION Accurate and efficient performance prediction of existing parallel applications on multiple target architectures is a challenging problem. Both analytical and simulation approaches have been used successfully for this purpose. Whereas analytical solutions have the advantage of efficiency, they also suffer from the limitation that many complex systems are analytically intractable. Although simulation is a widely applicable tool, its major limitation is its extremely long execution time for large-scale systems. A number of simulators, including Parallel Proteus [22], LAPSE [13], SimOS [30], Wisconsin Wind Tunnel [28], and MPI-SIM [26] have been developed to control the execution time of simulation models of parallel programs. The simulators typically use direct execution to reduce the cost of simulating sequential instructions and use parallel discrete event simulation to exploit parallelism within the simulator to reduce the impact of scaling up the target configuration being simulated. Most existing program simulators were designed to study CPU-intensive parallel programs. However, inadequate parallel I/O performance has become a significant deterrent to the overall performance of many applications and a number of solutions have been proposed to improve parallel I/O performance [10, 29. The ability to include I/O and CPU-intensive applications in a unified performance prediction environment thus appears to have significant value. We have developed COMPASS (COMponent-based PArallel System Simulator), a portable, execution driven, asynchronous parallel discrete event simulator that can be used to predict the performance of large-scale parallel programs, including computation and I/O intensive applications, targeted for execution on shared-nothing and shared memory architectures, as well as SMP clusters. In particular, simulation modules have been developed to predict the performance of applications as a function of communication latency, number of available processors on the machine of interest, different caching strategies for parallel I/0, parallel file system characteristics, and alternative implementations of collective communication and I/0 commands. The simulator is being used for detailed program simulations within the POEMS project [12]. POEMS (Performance Oriented End-to-end Modeling System) is a collaborative, multi-institute project whose goal is to create and experimentally evaluate a problem solving environment for end-to-end performance modeling of complex parallel/distributed systems. This paper describes the simulator and its use in evaluating the performance of large- scale, complex applications as a function of various system characteristics. As we demonstrate, the simulator is not only accurate, but is also fast due to its ability to run in parallel. Where we can, we use real world applications; however, in some cases we have used synthetic benchmarks to highlight a particular feature of the simulator. We show the simulator's portability and accuracy by validating the tool on two platforms (the distributed memory IBM SP and the shared memory SGI Origin 2000) for a range of synthetic and real world applications. For instance, we show that the predicted execution time of an ASCI kernel called Sweep3D [32] was within 5% of the measured execution time on both architectures. Second, we demonstrate the scalability of the tool itself. A major impediment to widespread use of program simulators is their execution (in)efficiency. We show that COMPASS can effectively exploit parallel model execution to dramatically reduce the execution time of a simulation model, without sacrificing accuracy. In particular, we show that, for a configuration of an application kernel called Sweep3D and a target machine with 64 processors, the simulator reduces the slowdown factor from 35 using sequential simulation to as low as 2.5 using a parallel simulator running on 64 processors. Further, the larger amounts of memory available on a parallel platform allowed us to conduct scalability studies for target configurations that were at least two orders of magnitude larger than those obtained with a sequential machine. For instance, for the same Sweep3D application, memory constraints of a sequential simulator would have limited us to simulating a target architecture of at most 13 processors for a 150 3 problem size. Using the memory available to us on the 128-node SP, we were able to predict the performance of Sweep3D for up to 1600 processors. Having established the simulator's accuracy and scalability, we demonstrate some of its capabilities. 1. We use the simulator to predict the scalability properties of an application using standard measures of scalability that include isoefficiency and scale-up as a function of the number of processors. 2. We analyze the behavior of an application as a function of the communication latency of the target architecture. We demonstrate that applications such as Sweep3D are not very sensitive to latency variations implying that executing such applications on a network of workstations rather than on a massively parallel system is a reasonable alternative. 3. We show how COMPASS can model the new architectures consisting of clusters of SMPs (such as the newest IBM SP). Even though the hardware for SMP cluster exists, the MPI software is not yet available to exploit the faster communication available among the processors of an SMP node. Using COMPASS we can show how an application would perform on the new architecture, if fast intra-node MPI communications were made available. In particular, using our synthetic benchmarks, we identify a type of application that can run 20% faster when using four 4-way SMPs rather than sixteen processors. 4. Using a synthetic benchmark, we demonstrate the sensitivity of different communication patterns to variations in the communication latencies of a target architecture. 5. Parallel file systems are becoming more complex, allowing both compute- and I/O-node caching. We demonstrate how various caching policies can affect the performance of a benchmark. In particular, for an I/O intensive benchmark, we see that as the network latency degrades, the gains from cooperative caching [10, 7] become negligible. The next section gives a brief description of the simulator. Section 3 describes the benchmarks and the target and host architectures used for the performance study. Section 4 presents results on the validation and scalability of the simulator. Section showcases some of features of the simulator as described in point 1 to 5above. Section 6 discusses related work and concludes with a discussion of our future research directions. 2. COMPASS The goal of the simulator is to enable the simulation of large-scale parallel applications written using MPI and MPI-IO on a variety of high performance architectures. The application program to be simulated is referred to as the target program and the architecture on which its performance is to be predicted is referred to as the target architecture. The machine on which the simulator is executed is referred to as the host machine, which may be sequential or parallel. The simulation environment is composed of several distinct, yet tightly coupled components-the simulation kernel, the MPI communication library simulator (MPI-Sim), the parallel I/O simulator (PIO-Sim) and the parallel file system simulator (PFS- Sim). Each successive component builds upon and extends the capabilities of previous components, expanding the breadth and the depth of the performance issues, which may be investigated with the simulator. The simulation kernel provides the framework; it implements the simulation protocols and provides support for scheduling and execution of threads. MPI-Sim provides the capability to simulate individual and collective MPI communication routines. PIO-Sim extends MPI-Sim's capabilities to include I/O routines as well as providing several implementations of collective I/O, the ability to handle user defined data types that are needed to support complex I/O operations, and a simple I/O service time model. PFS-Sim completes the simulation environment by providing detailed simulation of the parallel file system and of multiple caching algorithms. The simulator itself is portable and runs on a variety of parallel platforms-the IBM SP, the Origin 2000, and the Intel Paragon. The simulation kernel is the heart of the simulation environment. In general, the number of processors in the host machine will be less than the number of processors in the target architecture being simulated, so the simulator must support multi-threading. The kernel on each processor schedules the threads and ensures that events on all processors are executed in their correct timestamp order. A target thread is simulated as follows: the local code is simulated by direct execution [8] and all communication and I/O commands are trapped by the simulator, which uses an appropriate model to predict the execution time for the corresponding activity on the target architecture. The corresponding communication or I/O commands are also executed for consistency with the target program, but the physical time taken for executing this operation is ignored. The use of direct execution for simulation of local code requires that the processors in the host and target machines be similar. However, the interconnection network, parallel I/O system, and file systems on the two architectures may be very different. COMPASS supports most of the commonly used MPI communication routines, such as point-to-point and collective communications. In the simulator, all collective communication functions are implemented in terms of point-to-point communication functions, and all point-to-point communication functions are implemented using a set of core non-blocking MPI functions [27]. The interconnection network model currently ignores contention in the network. More detailed models are being developed, but given the excellent validation obtained with the simpler model for a variety of benchmarks both here and in previous work [26], this was not considered to be a serious limitation. The parallel I/O component of COMPASS simulates the individual and collective I/O constructs provided by MPI-IO. These constructs include creating, opening, closing and deleting a file; most data access (read/write) operations; and a local datatype constructor introduced as part of the MPI-IO specification. The file system component of COMPASS simulates the parallel file system used to service I/O requests generated by the MPI-IO programs. This component is self-contained and may be replaced by a simple disk access model in order to speed up the simulation whenever a detailed system model is not required. However, using the detailed model allows the study of a wide variety of parallel file system configurations. The basic structure and functionality of the file system component is taken from the Vesta parallel file system, a highly scalable, experimental file system developed by IBM [6]. The behavior of the physical disks is simulated by a set of disk models. We have included simple models based on seek time, rotational latency, and data transfer rate as well as a highly detailed model developed at Dartmouth [24]. Detailed system simulations are slow. Parallel simulators can potentially reduce execution time of the model, and provide greater amounts of memory, another necessity for large, detailed simulations. The simulation kernel provides support for sequential and parallel execution of the simulator. Parallel execution is supported via a set of conservative parallel simulation protocols [26]. When combined with the kernel's built-in multi-threading capabilities, this allows the simulator to effectively use however many host processors are available without limiting the size and type of experiments which may be run. The simulator also supports a number of optimizations that are based on an analysis of the behavior of the parallel application. Among the optimizations made available by program behavior analysis is a technique, which allows the simulation protocols described above to actually be turned off, eliminating the costly overhead of global synchronization [in submission]. 3. Benchmarks and Systems 3.1 Real World Application Benchmarks 3.1.1 Sweep3D Sweep3D is a solver for the three-dimensional, time independent, neutron particle transport. The computation calculates the flux of particles through a given region of space, where the flux in any region is dependent on the flux from all the neighboring cells. The three-dimensional space (XYZ) is discretized into three-dimensional cells (IJK). The computation progresses in a wavefront manner from all the eight octants of the space, with each octant containing six, independent angles. The angles correspond to the six, independent directions of the flux (one for each face of a cube-cell). Sweep3D uses a 2D domain decomposition onto a 2D array of processors in the I and J directions. In this configuration, the sweep progresses as a processor computes the flux through the column of cells, then sends the outgoing flux information to its two neighboring processors. In order to improve performance, the K dimension and the angles are divided into blocks, allowing a processor to calculate only part of the values in the dimension and only a few angles before sending the values to the neighboring processors. 3.1.2 NAS Benchmarks The NAS Parallel Benchmarks (NPB) is a suite of parallel scientific benchmarks made available from the Numerical Aerodynamic Simulation (NAS) project at the NASA Ames Research Center [2]. The NAS suite contributes a strong core to our experimental set as it represents a number of well-known, different, real-world, non-vendor-specific codes that can be easily tailored to utilize the COMPASS system. We used the NPB 2.2 release of the software, and included a variety of applications, of which only four: BT, LU, MG, and SP were deemed stable by the authors. BT, SP, and LU compute solutions to systems of discretized Navier-Stokes equations, while MG solves a three-dimensional scalar Poisson equation. The NPB distribution provides a preconfigured set of problem sizes (because of the F77 constraint with dynamic memory) with which these programs can operate. For each application the problem sizes are, in increasing order, S, A, B, and C. Furthermore, the programs can be run in parallel only with a specific number of processors: BT and SP run with 4, 9, and 16 processors, while LU and MG run with 4, 8, and 16. Both the NPB suite and SWEEP3D were originally programmed in Fortran. As MPI-SIM currently supports only C, the programs were first translated using f2c [14]. Subsequently, the translated code was automatically localized, to allow the simulator to simulate multiple simultaneous threads of the target program on a single processor of the host machine. The localizer also converts MPI and MPI-I0 calls to equivalent calls defined within the COMPASS library. The localizer is fully automated and has been used successfully with very large applications. 3.2 Synthetic Benchmarks-SAMPLE Although real world applications or kernels like Sweep3D and NAS are useful benchmarks for simulators such as COMPASS, they have a major disadvantage in that their core algorithms are difficult to understand and it is impossible to modify them to evaluate the impact of alternative types of program structures including computation granularity and communication patterns. While each of these programs provided a means for parameter adjustment, the large granularity at which these changes could be made did not serve our need to measure their performance as a function of specific runtime behavior. Thus, in addition to using these real world benchmarks, we sought to write a synthetic application that allows for the explicit tuning of communication and computation parameters. This effort resulted in SAMPLE (Synthetic Application for Message-Passing Library Environments), a C program that performs precisely changeable amounts of calculation and message-passing inter-process communications suitable for experimental analysis. SAMPLE executes message passing via calls that can be targeted to either COMPASS or the actual MPI library, to facilitate validation. SAMPLE is a simple loop that contains two inner loops: the first is a pure computation loop whose duration can be varied by adjusting the number of floating point divisions executed, while the second is a communication loop that can implement multiple communication patterns by changing the frequency, size, and destination of messages sent (and received) by each process. Message distribution can take on a wide variety of patterns, as described in [17]. Using MPI's point-to-point capability, we implemented a number of these methods, such as wavefront, nearest neighbor, ring, one-to-all, and all-to-all communications. Using predefined metrics, the user can easily change the communication to computation ratio in the program. 3.3 I/O Benchmark Since implementations of the MPI-I/0 standard are not yet widely available, it is hard to find real world applications that stress the parallel I/O simulation capabilities of the simulator; hence a set of synthetic benchmarks were developed for this purpose. The benchmark uses N processes, each mapped to a unique compute node. Each process generates read and write requests for blocks of data of a given size. The interarrival times of the I/O requests are sampled from a normal random distribution with a given mean. The blocks are all in the same file, which is distributed across M I/O nodes, each with D disks (for a total of M*D disks). Each process issues R requests, where for a given c, the first R/c requests are used to warm up the caches. Each of these parameters can easily be modified. 3.4 Host and Target Architectures The SGI Origin 2000 [19] is a multiprocessor system from Silicon Graphics, Inc. The Origin provides a cache-coherent NUMA distributed shared memory layout with two MIPS R10000 processors comprising a processing node multiplexed over a hub chip to reduce memory latency and increase memory bandwidth. Our Origin testbed is small, with only ten 180 MHz R10000 processors sharing 320 MB of memory. Due to its limited number of processors and memory, we could not completely perform the same number and size of experiments as we did on the IBM SP. The IBM Scalable Parallel (SP) system is a scalable multiprocessor that condenses several complete RS6000 workstations into one system [9], forming a shared-nothing collection of processing nodes connected typically by a bidirectional 4-ary 2-fly multistage interconnection network that can achieve simultaneous any-to-any connections [21]. The packet-switched network can use, as an alternative to IP, a protocol named the User Space Communication Subsystem (US CSS) to provide near-constant latency and bandwidth. We have used US CSS as the baseline protocol in all our experiments on the SP2. The new generation IBM SP showcases a cluster architecture where each of nodes of the machine is a 4-way SMP. An example of such a machine is the new IBM SP at Lawrence Livermore National Laboratory. Currently, this machine includes 158 compute nodes each with four 332 MHz 604e processors, sharing 512 MB of memory and attached to 1GB disks. The inter-node communications of the SP give a bandwidth of 100MB/second and a latency of 35 microseconds with the use of SP High Performance Switch TB3 (currently, this performance is possible when the application is running only on one of the four processors of the node). We have simulated the behavior of such a system running MPI applications. The inter-node communications are handled the same way as for the shared-nothing architecture, by modeling the communications between processors as using the high-performance switch. However, the intra-node communications are modeled as using shared memory. As information on the implementation of the MPI constructs designed to exploit shared memory were not yet available for the IBM SP (in fact, in the current implementation processors on a node communicate with each other using the much slower IP!), the COMPASS model is based on the MPI implementation on the SGI Origin 2000 [22]. Certainly, the performance of the application will depend on the exact implementation, but it allows us to demonstrate the capability of the tool in enabling such studies. 4. Validation and Performance of COMPASS 4.1 Validation Our first set of experiments was aimed at validating the predictions of COMPASS for the IBM SP and SGI Origin 2000. Figure 1 is a graph of the execution time of the measured Sweep3D program compared to the execution time predicted by COMPASS. The curves are a function of the number of processors used by Sweep3D and the number of target processors simulated by COMPASS; validation is thus limited to the number of physical processors (on the Origin we have only 10). The COMPASS data is taken as the average of the running times of all multithreaded combinations of the target processor number. (For instance, for eight target processors, the average running time was taken from executions with 1, 2, 4, and 8 host processors.) From the graph it is seen that COMPASS is indeed accurate, correctly predicting the execution time of the benchmark within 5% for the IBM SP and 3% for the O2K, even with multithreaded operation. When conducting scalability studies, it is often the case that the number of available host processors is significantly less than the number of target processors. This results in several simulation threads running on the same processor. Since multithreading might affect the results of the simulation because threads might affect each other's runtime, it is important to study whether such effects exists. To quantify the effect of multithreading on the ability of the simulator to correctly predict the runtime of the application, we simulated Sweep3D using a wide range of host and target processors. As can be seen from Figure 2, even with a relatively high degree of multithreading of 8 target MPI processes to a single host processor, the variation in the predicted runtime is very small (below 2%). Runtime for SWEEP3Don the IBMSP, 50^3problemsize, mk=10, mmi=320601001 2 4 8 Processors Runtime MeasuredRuntime Figure Validation of COMPASS for Sweep3D (IBM SP). Number of Processors Time in Seconds Measured Predicted Figure Validation of COMPASS for Sweep3D (O2K). HostProcessors 2target 4target 8target 16target 64target 128target Figure 2: Effect of COMPASS' Multithreading on Predicted Performance (IBM SP). COMPASS was also validated with the suite of NAS benchmarks. Here we present the results for the SP and BT benchmarks for the Origin 2000. As mentioned earlier, the NAS programs come configured to run in parallel only on a predetermined number of processors and a predetermined set of problem sizes. The processor and memory constraints of our relatively small O2K restricted us only to the S size of these benchmarks. Figure 3 shows the results of the validation experiments for BT and SP (both class S). They show good validation, with accuracy to within 8.5% and 2.1%, respectively, at all points. For 16 processors, the graph shows only the predicted performance since only 8 host processors are available on the machine. Since both Sweep3D and the NAS benchmarks are computationally intensive, we also used the communication-intensive synthetic benchmark (SAMPLE) to validate the communication models. The measured and predicted execution times for the SAMPLE benchmark also showed excellent validation of COMPASS for a variety of configurations. Figure 4 shows a sample run using the wavefront communication pattern and a computation-to-communication ratio of 11 to 1. As seen from the figure, COMPASS accurately predicts running time to within 3 percent; the results were similar for the other patterns and have been omitted for brevity. Validation for the NASSPandBT, O2K0.51.54 9 Number of Processors BTMeas. BTPred. SPMeas. SPPred. Figure 3: Validation for NAS benchmarks (O2K). Validation of SAMPLEon the O2K35452 4 8 Number of Processors Measured Predicted Figure 4: Validation for SAMPLE (O2K). 4.2 Scalability of the Simulator We present a number of results to demonstrate the relative improvement in the performance of the simulator that can be obtained with parallel execution. Figure 5(a) shows the performance of COMPASS when simulating the execution of Sweep3D for problem sizes of 50 3 and 100 3 cells on 64 target processors of the IBM SP. As seen from the figure, the simulator can effectively use additional processors; the parallel simulation on 64 processors achieves a speedup of almost 35 for the 100 3 problem size as compared with the sequential execution time of he simulator. The speedup for the 50 3-problem size is smaller, because, ultimately, the performance of the simulator is bound by the performance of the application. Another metric commonly used to evaluate the performance of a simulator is the slowdown of the simulator relative to the target architecture. We define slowdown(S,T) as (time to simulate the application using S host processors / time to execute the application on T processors). Figure 5(b) shows the slowdown of COMPASS when simulating a target problem size of 50 3 . When the number of host processors is equal to the number of target processors, the simulator has a slowdown factor of less than 3. If the host architecture has fewer available processors than the target machine, the slowdown does get worse, but the overall performance is reasonable. Thus with an I-ratio (number of target processors / number of host processors) of 16 (64 target processors and 4 host processors), the slowdown factor is only 10. speedup of COMPASS running a 64 target processor Sweep3d, mk=10, mmi=3, IBMSP5152535 processors 50^3 100^3 Figure 5 (a): Speedup of COMPASS on the IBM SP (Sweep3D). Slowdownof COMPASS for 50^3SWEEP3D, mk=10, Host Processors Available Figure Slowdown of COMPASS on the IBM SP(Sweep3D). The largest configuration studied with 1600 target processors, using only 64 host processors (I-ratio of 25) yielded a slowdown of only 18. This is considerably better than the slowdown factors that have been reported for other program simulators like WWT [23] and LAPSE [13], where the slowdown factors reported have been as high as 100 for computationally intensive applications. In Figure 6(a), we show the speedup attained by COMPASS for the Origin 2000 while it simulates processors for two problem sizes of Sweep3D. For the Origin 2000, COMPASS achieves near-linear speedup as the number of host processors is increased, reaching a speedup of 7 when 8 host processors are used. The slowdown graph for an 8-target processor configuration is shown in Figure 6(b) and shows that for an I- ratio of 1, the simulator has a slowdown of 2. The slowdown with 4 host processors is slightly above 2, which shows that even if just half of the desired number of processors is available, the simulator runs only about twice slower the application on all target processors would. Speedup of COMPASSRunningSweep3Dwith32 Target Processors Number of host processors 50^3 100^3 Figure of COMPASS on the SGI Origin 2000 (Sweep3D). The speedup and slowdown of COMPASS simulating the NAS benchmarks also show improvements with parallel execution, albeit to a lesser degree. Figures 7(a) and 8(a) show the speedup of the BT and SP applications, respectively. We see that the speedup of the simulator increases progressively as the number of host processors is increased, but the rate of increase as well as the final speedup attained with 8 hosts is lower than those seen with the previous benchmark. The simulator produces a speedup as high as 5.45 for the BT benchmark and 4.38 for the SP benchmark. Similarly, the slowdown curves reach a low of 1.42 and 1.67, respectively, for each application (see Figures 7(b) and 8(b)). Further investigation indicated that these applications did not scale as well as SWEEP3D, and hence the differences in the performance of COMPASS are directly related to the performance of the target program being simulated. The speedup and slowdown experiments show that COMPASS can exploit the parallelism available in the application without adding any considerable overhead. Number of Host Processors 8Target Figure Performance of COMPASS on the SGI Origin 2000 (Sweep3D). Number of Host Processors 4Target 9Target Figure 7(a): Speedup of COMPASS on the SGI Origin 2000 (BT). Number of Host Processors 9 Target Figure 7(b): Slowdown of COMPASS on the SGI Origin 2K (BT). 5. Results and Features of COMPASS Scalability of Sweep3DThe performance study first evaluated the scalability of Sweep3D as a function of various parameters including the size of the problem, the number of processors and as a function of network latency. We have performed this study on the IBM SP using up to 64 host processors. Figure 9(a) demonstrates the scalability of Sweep3D for three problem sizes: 50 3 ,100 3 and 150 3 . For large problems, the study showed that their performance scales well as the number of processors is increased to almost 1600, although the relative improvement in performance drops beyond 256 processors. For the largest problem size, the runtime of the application was shown to be 125 times smaller running on 1,600 processors as compared to running the application on 4 processors. For the smaller problem size with elements, the performance appears to peak at about 1024 processors and subsequently gets worse. This observation was strengthened by the isoefficiency analysis, where the efficiency is defined as speedup (S)/p (number of processors). The isoefficiency function determines at what rate the problem size needs to be increased with respect to the number of processors to maintain a fixed efficiency [16]. A system is highly scalable if the problem size needs to be increased linearly as a function of the number of processors. The total work W is the time to run the algorithm on a single processor, and T p is the time to run the algorithm on p processors. T sum of overhead on all processors) giving the efficiency needs to grow as fE(p) to maintain efficiency E, fE(p) is defined as the isoefficiency function. Speedupof COMPASSRunningSP135 Number of Host Processors 4Target 9Target Figure of COMPASS on the Origin 2K (SP). Slowdown of COMPASSRunning SP261014 Number of Processors 9 Target Figure Slowdown of COMPASS on the Origin 2K (SP). Performanceof Sweep3d, mk=10, mmi=3, IBMSP101000 processors predicted runtime 50^3 100^3 Figure 9(a): Scalability of Sweep3D on the IBM SP. Figure 9(b) shows the isoefficiency function for Sweep3D for various numbers of efficiencies. The graph shows what problem size needed to maintain a given efficiency (20,40,60 or 90%) on a given number of processors. First, we observe that maintaining 90% or even 60% efficiency is hard. However 40% is more manageable. Second, using a large number of processors for a given problem size is not efficient. For example, for the 500,000 (about 22-22-1000) problem size, using less than 16 processors gives the best efficiency (about 90%), using 100 processors results in only 20% efficiency. Since running the problem on only processors might result in slow runtime, a tradeoff between time and efficiency can be made and 36 processors can be used resulting in 60% efficiency. Figure 9(b) also demonstrates that isoefficiency is hard to capture with simple extrapolation. For example, the 40% isoefficiency curves flattens out for the 1.6 million problem size, implying that giving more processors to the application does not improve efficiency. Isoeffiency Functionmk=1,mmi=650015000 100 200 300 400 500 Processors Problem size (in 20% 40% 90% Figure Isoefficiency for Sweep3D on the IBM SP. 5.1 Impact of Latency Variation on Performance We have also studied the effect of communication latency on performance. Figure 10 shows the performance of Sweep3D as the latency in the network is varied, for problem sizes 50 3 and As seen from the figure, a faster communication switch will not have a significant impact on this application-the performance changes by at most 5% for variations in latency between 0 and 10x the current switch latency. With more than processors (128 for the larger problem), the difference is negligible. However, the performance does appear to suffer significantly if the latency is increased by more than a factor of 50, which might be the case if the application is ported to a network of workstations. Latency impacts are much more significant with a small number of processors, because each processor contains a larger portion of the computational region, causing messages to become large and more sensitive to latency. 5.2 Modeling SMP Cluster Architectures. The preceding experiments evaluated application performance on the distributed memory architecture. New architectures, such as the IBM SP cluster architecture use 4-way SMP nodes as described in section 3.4 to exploit both the fast memory access of shared memory systems and the scalability of distributed memory machines. The next set of experiments projects improvements in the execution time of our benchmarks obtained by migrating to this architecture. Since the previous experiments showed that the NAS and Sweep3D benchmarks were relatively insensitive to the communication latency, it was hardly surprising that they did not appear to benefit noticeably from fast intra-node communication (for brevity, we omit these results). However, as demonstrated by the SAMPLE benchmark, for applications that have a higher percentage of communication, the new architecture appears to offer some benefits. 50^3problemsize, mk-10, processors runtime in seconds 0xsp sp 50xp Figure 10(a): Sensitivity of Sweep3D to Latency (Small Problem Size). 150^3Problemsize, mk=10, mmi=3, IBMSP2006001000 processors runtime in seconds 0xsp sp 50xsp 100xsp Figure 10(b): Sensitivity of Sweep3D to Latency (Large Problem Size). Figure 11(a) shows the performance of SAMPLE for a fixed problem size per processor. We can see that the simulator validates well for the one processor per node case ("Meas. Non- SMP" and "COMPASS"). We also notice that we can predict a slightly better performance when running on an SMP node which would have support for fast intra-node communications ("COMPASS for SMP"), even though the current implementation of MPI communications on the SMP nodes has poor performance ("Meas. SMP"). Similarly, Figure 11(b) shows the performance of the SP running SAMPLE as a function of the number of computational iterations. Here, the time for communications is 37% of the total runtime. As the number of iterations increases, the ratio of computation to communication is constant. Again, we see that the predicted SMP performance improves on average by 20% as compared to the single processor per node performance, and we see clear drawbacks to using the intra-node communications as supported currently ("Meas. Current SMP"). Even though MPI on the SP does not support fast intra-node communications, the processors of the SMP do share the same main memory. This might tempt application developers to redesign existing MPI application to use main memory between processors of a node and MPI between nodes. A simulator like COMPASS can help make the decision where such an investment of time and effort would result in better performance. NumberofProcessors Meas. Non-SMP Meas., Current COMPASS COMPASSfor Figure SMP Performance on the IBM SP (SAMPLE with Constant Computation Per Computational Loops Runtime in Seconds Meas. Non-SMP Meas., Current COMPASS COMPASS for Figure SMP Performance on the IBM SP (SAMPLE with Increasing Computation Per Processor). 5.3 Simulating Common Communication Patterns Another set of experiments involved investigating the impact of different communication patterns on program performance through the use of our synthetic benchmark SAMPLE. Scientific programs can produce a wide variety of traffic patterns depending on the algorithm being used, and we sought to understand how these different types of message dispersal affected application performance. The SAMPLE benchmark was used to generate a number of such message-passing schemes for study. The wavefront pattern involves a 2-dimensional mesh with the 0-th processor, residing on the upper-left-hand corner, initializing a communication wave towards the lower-right-hand corner. Using the same mesh layout, the nearest-neighbor dispersal has each processor sending (and receiving) a message from each of its four logically adjacent processors. The ring pattern forms a cycle where a single message token is sent around a logical "ring" of processors. Finally, for the one-to-all pattern, a processor broadcasts a message, that is routed using a broadcast tree to all others. The performance of the various communication patterns was evaluated as a function of communication latency and the number of processors. The host machine selected for the experiments was the Origin 2000 with 8 processors. Figure 12(a) shows the performance of SAMPLE as a function of latency for a target O2K architecture with processors and Figure 12(b) shows the performance as a function of number of processors in the target architecture. As expected, the ring pattern was most sensitive to the latency and processor count as the message traverses sequentially through a ring. The somewhat surprising result was the relative insensitivity of the wavefront and on-to-all communications; however, note that both these patterns do not block the initiator processor. Immediately after initiating the communication, the corresponding process executes the next iteration, which is hence reasonably well overlapped with the communication, producing the observed insensitivity. The slight jump in the predicted execution time with increasing processors was attributed to a change in the depth of the broadcast tree (Figure 12(b)). Sensitivity of Communication Patterns to Latency100300500 Latency (xOrigin) Nearest- neighbor one-to-all ring wavefront Figure Performance of Communication Patterns as a Function of Latency. Scalabilityof CommunicationPatterns901000 20 40 Processors nearest-neighbor one-to-all ring wavefront Figure Performance of Communication Patterns as a Function of Number of Processors (O2K) 5.4 Effect of Latency on Parallel File System Caching Strategies The last experiment demonstrates the use of the simulator in evaluating the impact of architectural features on I/O intensive programs. Cooperative caching techniques were proposed to improve the performance of applications with large I/O requirements [7,10] by suggesting that the caches be, at least partially, managed globally rather than in an entirely local manner. In all cases, compute node (cnodes) and I/O nodes (ionodes) have caches. Base caching simply allows each node to manage only its own cache. Greedy forwarding allows an ionode that has a cache miss to check if any other node is caching the required data (before going to fetch it from the disk). In centrally coordinated caching, portions of the cnode caches are collectively managed by the ionodes. The remaining portion of the cnode cache is managed locally by the cnode. The percentage of coordinately managed cache can be varied (as it is in our experiment). Globally managed caching is similar to 100% coordinate caching, except the strategy for block placement in caches is modified to allow the ionode caches to hold data evicted from the cnode caches. As these caching techniques depend on having efficient access to remote memory in order to improve cache hits rates and application performance, their performance should be dependent on the communication latency in the network. Figure 13 shows the results from a set of experiments designed to measure the impact of changing network latencies of the IBM SP on the cooperative caching techniques supported by COMPASS. In this benchmark, 16 processes on separate compute nodes randomly read and write 512 byte blocks of data. The blocks are all in the same file, which is distributed across 2 I/O nodes, each with 2 disks (for a total of 4 disks). Each process issues 10,000 requests, with the first 5,000 requests being used to warm up the caches and with 80 of the requests being read requests. The graph plots the predicted execution time of the benchmark as the network latency is increased. Caching performance for base caching (no cooperation), greedy forwarding, centrally coordinated (with 40, 80 and 100 percent coordination) and globally managed caching are shown for network latencies of 0, 1, 10, and 100 times the latency of the interconnect. AbsolutePerformanceof CachingTechniques2006000 50 100 NetworkLatency (xSP latency) Base Greedy Global Figure Comparison of Caching Techniques on the IBM SP. Understandably, as the network latency is increased, the predicted execution time of the benchmark also increases. However, this experiment also hints at the extreme sensitivity of the cooperative caching techniques to increased network latency. While it may appear that all caching techniques (even base caching) are equally affected by the increasing network latency, this was not found to be the case. While the absolute difference in predicted execution time diminishes only slightly as the latency is increased, the relative difference between different caching techniques decreases markedly, as shown in Figure 13(b). In effect, as the network becomes slower, the benefit of using cooperative caching is lost and performance degrades to only slightly better than that of base caching. This result has important implications for the use of this technique in large networks of workstations and in the design of hybrid strategies, where the caches are managed cooperatively over small regions of the network rather than over the entire network. Performance of Cooperative CachingRelative toBase Network Latency (x SP latency) Base Greedy Global Figure Performance of Caching Techniques Relative to Base Caching on the IBM SP. 6. Related Work Accurate and efficient performance prediction of existing parallel applications on target machines with thousands of processors is a challenging problem. The first generation of simulators like Proteus [4] used sequential simulation, which were very slow with slowdown factors ranging from 2 to 35 for each process in the target program. This led to many efforts in improving the execution time of program simulators: DP-Sim [25] LAPSE [13], Parallel Proteus [20], SimOS [30], Wisconsin Wind Tunnel [28], Tango [11], and MPI-SIM [26,27] have all been designed for this purpose. The simulators typically use direct execution of portions of the code to reduce the cost of simulating sequential instructions and typically use a variation of the conservative parallel discrete-event simulation [5] algorithm to exploit parallelism within the simulator to reduce the impact of scaling up the target machine size. Many parallel simulators use the synchronous approach to simulation where simulation processes synchronize globally at fixed time intervals in order to maintain program correctness. The interval or quantum is taken to be no larger than the communication latency of the network being simulated. This guarantees that a message sent in one quantum cannot be received until the next interval. This also implies that messages will be processed in a correct order. Some of the synchronous simulators are Proteus, a parallel architecture simulation engine, Tango, a shared memory architecture simulation engine, Tunnel (WWT), a shared memory architecture simulation engine and SimOS, a complete system simulator (multiple programs plus operating system). In terms of simulation of communications, two simulation engines, which use approaches, similar to ours are Parallel Proteus and LAPSE. A distinguishing feature of COMPASS is that it is portable, in part due to being implemented with the use of MPI. Since MPI is readily available on any parallel or distributed system, the simulator is able to use it for data movement and synchronization. On the other hand, LAPSE was designed specifically to run on the Intel Paragon, using the Paragon's native communication primitives. This made LAPSE broad usefulness limited. COMPASS is also fast, having slowdowns of around 2, where Proteus' typical slowdowns are in the range of A number of simulators have also been designed to simulate I/O operations, although most of these have tended to use sequential simulators. A set of collective I/O implementations was compared using the STARFISH [18] simulator, which is based on Proteus. In [3], a hybrid methodology for evaluating the performance of parallel I/O subsystems was described. PIOS, a trace-driven I/O simulator, is used to calculate the performance of the I/O system for a subset of the problem to be evaluated, while an analytical model was used for the remainder. Scalability of distributed memory machines was examined in [31], which used application kernels to investigate network performance and contention. Libraries have also been developed. PPFS [15] is a portable parallel file system library designed to sit on top of multiple UFS instances and provide a wide variety of parallel file system capabilities, such as caching, prefetching, and data distribution. The COMPASS environment described in this paper used the parallel I/O system simulator detailed in [1] and is perhaps the only simulator that combines the ability to do integrated interconnection network, I/O and file system, and scalability studies. It has also been used for the simulation of data parallel programs compiled to message-passing codes [25]. Additionally, the simulator itself is highly scalable, with slowdown factors in the single digits for large target applications and architectures. 7. Conclusions and Future Research We have demonstrated that COMPASS can be used to study a wide range of applications as a function of a variety of architectural characteristics ranging from standard scalability studies through network stress test and parallel I/O properties. We have shown that not only is COMPASS accurate (having validated it on multiple applications and architectures to within a few percent of the physical measurements), but it is also fast achieving excellent performance both on the IBM SP as well as on the SGI Origin 2000. It achieves near-linear speedups for highly parallel applications and suffers only from moderate slowdowns. It has been shown to be useful for a wide range of architectural performance studies that combine the separate areas of I/O and parallel file system performance with interconnection network and communication library simulators. COMPASS is being used for detailed program simulations within the POEMS project. In collaboration with other "POETS" we are working on developing hybrid performance models which combine analytical and simulation modeling techniques. Also, as part of the project, COMPASS will be integrated with a detailed memory and processor model. This will allow us to break away from the dependency of requiring a host processor architecture that is similar to the target processor architecture for direct execution simulation. This will also provide an opportunity to extend the use of parallel simulation techniques for processor and memory simulations 8. ACKNOWLEDGMENTS This work was supported by the Advanced Research Projects Agency, DARPA/CSTO, under Contract F-30602-94-C-0273, "Scalable Systems Software Measurement and Evaluation" and by DARPA/ITO under Contract N66001-97-C-8533, "End-to-End Performance Modeling of Large Heterogeneous Adaptive Parallel/Distributed Computer/Communication Systems." Thanks to the Office of Academic Computing at UCLA and to Paul Hoffman for help with the IBM SP2 as well as to the Lawrence Livermore National Laboratory for use of their IBM SP on which many of these experiments were executed. 9. --R "Parallel Simulation of Parallel File Systems and I/O Programs," "The NAS Parallel Benchmarks 2.0," "A Methodology for Evaluating Parallel I/O Performance for Massively Parallel Processors." "Proteus: A High-Performance Parallel Architecture Simulator," "Distributed Simulation: A Case Study in Design And Verification Of Distributed Programs," "The Vesta parallel file system," "Avoiding the Cache-Coherence Problem in Parallel/Distributed File System," "The Rice parallel processing testbed." Parallel Computer Architecture: A Hardware/Software Approach. "Remote Client Memory to Improve File System Performance." "Multiprocessor Simulation and Tracing Using Tango." "POEMS: End-to-end Performance Design of Large Parallel Adaptive Computational Systems." "Parallel Direct Execution Simulation of Message-Passing Parallel Programs," f2c (Fortran to C converter) "PPFS: A High Performance Portable Parallel File System." "Analysis of Scalability of Parallel Algorithms and Architectures: A Survey," Introduction to Parallel Computing: Design and Analysis of Algorithms. "Tuning STARFISH," "The SGI Origin: A ccNUMA Highly Scalable Server," "ASCI Blue-Pacific IBM RS/6000 TR System at Lawrence Livermore National Laboratory," "Reducing Synchronization Overhead in Parallel Simulation," "MPI Performance Study on the SGI Origin 2000," "Wisconsin Wind Tunnel II: A Fast and Portable Parallel Architecture Simulator," "The Galley Parallel File System." "Parallel Simulation of Data Parallel Programs," "Performance Prediction of Parallel Programs," "Using Parallel Simulation to Evaluate MPI Programs." "The Wisconsin Wind Tunnel: Virtual Prototyping of Parallel Computers." "Improved Parallel I/O via a Two-Phase Runtime Access Strategy." "Using the SimOs Machine Simulator to Study Complex Computer Systems," "A Simulation Based Scalability Study of Parallel Systems," "The ASCI sweep3d Benchmark Code," --TR The rice parallel processing testbed Analysis of scalability of parallel algorithms and architectures Introduction to parallel computing The Wisconsin Wind Tunnel A simulation-based scalability study of parallel systems PPFS The Vesta parallel file system The galley parallel file system Reducing synchronization overhead in parallel simulation Parallelized Direct Execution Simulation of Message-Passing Parallel Programs Using the SimOS machine simulator to study complex computer systems The SGI Origin Poems MPI-SIM Parallel simulation of parallel file systems and I/O programs Parallel Computer Architecture Avoiding the Cache-Coherence Problem in a Parallel/Distributed File System Parallel Simulation of Data Parallel Programs Tuning STARFISH PROTEUS: A HIGH-PERFORMANCE PARALLEL-ARCHITECTURE SIMULATOR Performance prediction of parallel programs --CTR Sundeep Prakash , Ewa Deelman , Rajive Bagrodia, Asynchronous Parallel Simulation of Parallel Programs, IEEE Transactions on Software Engineering, v.26 n.5, p.385-400, May 2000 Clia L. O. Kawabata , Regina H. C. Santana , Marcos J. Santana , Sarita M. Bruschi , Kalinka R. L. J. Castelo Branco, Performance evaluation of a CMB protocol, Proceedings of the 37th conference on Winter simulation, December 03-06, 2006, Monterey, California Rajive Bagrodia , Ewa Deelman , Thomas Phan, Parallel Simulation of Large-Scale Parallel Applications, International Journal of High Performance Computing Applications, v.15 n.1, p.3-12, February 2001 Leo T. Yang , Xiaosong Ma , Frank Mueller, Cross-Platform Performance Prediction of Parallel Applications Using Partial Execution, Proceedings of the 2005 ACM/IEEE conference on Supercomputing, p.40, November 12-18, 2005 Thomas Phan , Rajive Bagrodia, Optimistic simulation of parallel message-passing applications, Proceedings of the fifteenth workshop on Parallel and distributed simulation, p.173-181, May 15-18, 2001, Lake Arrowhead, California, United States Vikram S. Adve , Rajive Bagrodia , Ewa Deelman , Thomas Phan , Rizos Sakellariou, Compiler-supported simulation of highly scalable parallel applications, Proceedings of the 1999 ACM/IEEE conference on Supercomputing (CDROM), p.1-es, November 14-19, 1999, Portland, Oregon, United States Vikram Adve , Rizos Sakellariou, Application Representations for Multiparadigm Performance Modeling of Large-Scale Parallel Scientific Codes, International Journal of High Performance Computing Applications, v.14 n.4, p.304-316, November 2000 Ewa Deelman , Rajive Bagrodia , Rizos Sakellariou , Vikram Adve, Improving lookahead in parallel discrete event simulations of large-scale applications using compiler analysis, Proceedings of the fifteenth workshop on Parallel and distributed simulation, p.5-13, May 15-18, 2001, Lake Arrowhead, California, United States Vikram S. Adve , Rajive Bagrodia , Ewa Deelman , Rizos Sakellariou, Compiler-optimized simulation of large-scale applications on high performance architectures, Journal of Parallel and Distributed Computing, v.62 n.3, p.393-426, March 2002 I-Hsin Chung , Jeffrey K. Hollingsworth, Using Information from Prior Runs to Improve Automated Tuning Systems, Proceedings of the 2004 ACM/IEEE conference on Supercomputing, p.30, November 06-12, 2004 Vikram S. Adve , Rajive Bagrodia , James C. Browne , Ewa Deelman , Aditya Dube , Elias N. Houstis , John R. Rice , Rizos Sakellariou , David J. Sundaram-Stukel , Patricia J. Teller , Mary K. Vernon, POEMS: End-to-End Performance Design of Large Parallel Adaptive Computational Systems, IEEE Transactions on Software Engineering, v.26 n.11, p.1027-1048, November 2000 Murali K. Nethi , James H. Aylor, Mixed level modelling and simulation of large scale HW/SW systems, High performance scientific and engineering computing: hardware/software support, Kluwer Academic Publishers, Norwell, MA, 2004
MPI;application scalability;MPI-IO;parallel program simulation;direct execution;parallel discrete event simulation
301412
Parsimonious Least Norm Approximation.
A theoretically justifiable fast finite successive linear approximation algorithm is proposed for obtaining a parsimonious solutionto a corrupted linear system Ax=b+p, where the corruptionp is due to noise or error in measurement. The proposedlinear-programming-based algorithm finds a solutionx by parametrically minimizing the number of nonzeroelements in x and the error &Verbar;Ax-b-p&Verbar;_1.Numerical tests on a signal-processing-based exampleindicate that the proposed method is comparable to a method that parametrically minimizesthe1 -norm of the solution x and the error &Verbar;Ax-b-p&Verbar;_1, and that both methods are superior, byorders of magnitude, to solutions obtained by least squares as well by combinatorially choosing an optimal solution with a specific number of nonzero elements.
Introduction A wide range of important applications can be reduced to the problem of estimating a vector x by minimizing some norm of the residual vector Ax \Gamma b arising from a possibly inconsistent system of linear equations: where A is an m \Theta n real matrix and b is an m \Theta 1 vector, and both A and b are subject to error. Methods for solving such problems include least squares [15], total least squares [11, 14] and structured total least norm [24, 13]. In this paper we consider the closely related problem of minimizing the 1-norm of the residual vector is subject to error and with the additional condition that only a specified number of columns of A are used. This is clearly a combinatorial problem which is closely related to the NP-hard problem considered by Amaldi and Kann [2] and consisting of solving a consistent system of linear inequalities or equalities with rational entries such that the solution x has a minimal number of nonzeros. We shall solve our problem by a novel method, based on minimizing a concave function on a polyhedral set, that has been successfully used in such machine learning problems as misclassification minimization [17], and feature selection [6] and in data mining [5, 19]. Mathematical Programming Technical Report 97-03, March 1997 - Revised September & November 1997. This material is based on research supported by National Science Foundation Grants CCR-9322479 and CCR-9509085, and Air Force Office of Scientific Research Grant AFOSR-144-GC92. y Computer Sciences Department, University of Wisconsin, 1210 West Dayton Street, Madison, WI 53706, paulb@cs.wisc.edu z Computer Sciences Department, University of Wisconsin, 1210 West Dayton Street, Madison, WI 53706, olvi@cs.wisc.edu. This author gratefully acknowledges the gracious hospitality of the Mathematics Department of the University of California at San Diego during his sabbatical leave January-May 1997. x Computer Science & Engineering, University of California San Diego, La Jolla, CA 92093 jbrosen@ucsd.edu The idea behind using as few columns of A as possible to span b is motivated by the parsimony principle of machine learning, known as Occam's Razor [26, 4], which says in essence: "simplest is best". This principle is highly effective for generalization purposes [16, 25, 30] where, for example, one wishes to use the "solution" x of (1) on new data not represented by the rows of [A b] as would be the case if either A or b is corrupted by noise. The use of the 1-norm will enable us to use a finite algorithm based on the polyhedral concave minimization approach which, as indicated above, has been successfully used on difficult machine learning problems. In particular we will eventually cast the problem as that of minimizing a concave function on a polyhedral set and begin with the following unconstrained minimization problem: min Here e is a column vector of ones, the prime denotes the transpose, j \Delta j denotes the absolute value function applied componentwise to a vector and (\Delta) is the step function applied componentwise also. The step function takes the value 0 if its argument is nonpositive, and the value 1 if its argument is positive. The vector b will be corrupted by a noise vector p in our application. We note immediately that when problem (2) is the classical least 1-norm approximation problem. problem (2) is trivially solved by and is of no interest. We are interested in solutions to problem (2) with - 2 [0; 1) that make e 0 jxj - k for some desired k ! n and such that acceptably small. In fact problem (2) can be viewed as a multiobjective optimization problem [8] with the the two objectives of parsimony in the number of nonzero components of x and smallness of the error kAx \Gamma bk 1 . By letting - range over the interval [0; 1] the cardinality of the nonzero elements of the solution x varies from a maximum of n to 0, while the error kAx will be nondecreasing monotonically. Depending on the problem, one of those x's will be the most desirable. In many of the machine learning applications small values of - such as 0:05 often gave parsimonious results that improved tenfold cross-validation [6]. We shall call problem (2), with a possibly noise-corrupted b, the parsimonious least norm approximation problem (PLNA). Our approach here for solving (2) will be to convert it to a concave minimization problem on a polyhedral set (problem (12) below). We first show that this problem always has a solution (Theorem 2.1 below). We then replace the discontinuous step function in the objective function of below by an exponential smooth function in problem (14) below, just as was done in [18, 6], and relate the two problems. Our novel theorem (Theorem 2.1 below) shows that the continuous problem yields an exact solution of the discontinuous problem once a repeating optimal vertex is identified for increasing but finite values of the smoothing parameter ff. We then prescribe a linear-programming-based successive linearization algorithm SLA 3.1 for the solution of the smooth problem and establish its finite termination in Theorem 3.2. For comparative purposes we shall also employ Vapnik's support vector machine approach [29, 3] of minimizing the size of the solution vector x as well as the error kAx decreasing the VC dimension [29, p 76] (a capacity measure) and improving generalization. We shall do that by parametrically minimizing the 1-norm of x as well as the 1-norm of the error Ax \Gamma b: min We shall call this problem, with a possibly noise-corrupted b, the least least norm approximation problem and solve it by solving the equivalent linear programming formulation: min A word about our notation and background material. All vectors will be column vectors unless transposed to a row vector by a prime superscript 0 . For a vector x in the n-dimensional real space R n , jxj will denote a vector of absolute values of components x of x. The scalar product of two vectors x and y in the n-dimensional real space will be denoted by x 0 y. For a linear program min c 0 x, the notation arg vertex min c 0 x will denote the set of vertex solutions of the linear program. For x 2 R n ; the norm kxk 2 will denote the 2-norm: will denote the 1-norm: For an m \Theta n matrix A; A i will denote the ith row of A and A ij will denote the element in row i and column j. The identity matrix in a real space of arbitrary dimension will be denoted by I ; while a column vector of ones of arbitrary dimension will be denoted by e. The base of the natural logarithm will be denoted by ", and for y \Gammay will denote a vector in R m with component " \Gammay m. For a function f : R n ! R that is concave on R n , the supergradient @f(x) of f at x is a vector in R n satisfying for any y 2 R n . The set D(f(x)) of supergradients of f at the point x is nonempty, convex, compact and reduces to the ordinary gradient rf(x), when f is differentiable at x [22, 23]. For a vector will denote the cardinality of the nonzero elements of x. 2 The Concave Minimization Problem In this section we shall consider the minimization problem min where f is a concave function on R k which is bounded below on S, - is a nonnegative real number, h is a nonnegative vector in R k and S is a polyhedral set in R k not containing straight lines that go to infinity in both directions. Note that if the objective function of (6) is concave (which it is not in general because of the nonconcavity of h 0 jsj ) then by [23, Corollary 32.3.3] problem (6) has a solution and by [23, Corollary 32.3.4] it has a vertex solution since S contains no straight lines that go to infinity in both directions. However despite this lack of concavity we shall show precisely the existence of a vertex solution by a novel approach which approximates the step function on the nonnegative real line from below by an exponential. This smooth approximation will also serve as a means for generating a finitely terminating algorithm at a stationary point of (6). Another important feature is that an exact solution of (6) is obtained from a solution of the smooth approximation for a finite value of the smoothing parameter. We state now our smooth approximation of (6) as follows min where ff is a positive number. We have the obvious relation Hence the smooth problem (7) minimum provides an underestimate to the minimum of problem (6). This fact will be used to establish exact solution of the latter by the former in the following principal theorem of the paper which also provides a method of solution as well. Theorem 2.1 Existence of Exact Vertex Solution for Finite Value of Smoothing Parameter R be bounded below on the polyhedral set S that contains no straight lines going to infinity in both directions, let f be concave on R k , let h - 0 and let - be a fixed positive number. Then for a sufficiently large positive but finite value ff 0 of ff, the smooth problem (7) has a vertex solution that also solves the original nonsmooth problem (6). Proof Note first that the smooth problem (7) is equivalent to the following concave minimization problem min Since the objective function of this problem is concave in (s; z) on R 2k and is bounded below on T, it follows by [23, Corollaries 32.3.3 and 32.3.4] that it has a vertex (s(ff); z(ff)) of T as a solution for each ff ? 0. Since T has a finite number of vertices, one vertex, say (-s; z), will repeatedly solve problem Hence for ff i - ff 0 , where the last inequality follows from (8). Letting i \Gamma! 1 it follows that z s solves (6). Since (-s; - z) is a vertex of T , it follows that - s is a vertex of This theorem immediately suggests an algorithmic approach for solving our problem (2) as follows. We first rewrite (2) as the following equivalent problem min By making the identifications x y problem (12) and hence problem (2) becomes a special case of problem (6) which we shall solve in its smooth version (7). More specifically the smooth version of (2) is the following concave minimization problem: min By solving this problem for a sufficiently large positive ff it follows by Theorem 2.1 that we have solved our original problem (2). We turn our attention now to solving (14) by a finitely terminating successive linearization algorithm. 3 The Concave Minimization Algorithm The finite method that we shall propose is the successive linear approximation (SLA) method of minimizing a concave function on a polyhedral set which is a finitely terminating stepless Frank- Wolfe algorithm [9]. In [18] finite termination of the SLA was established for a differentiable concave function, and in [20] for a nondifferentiable concave function using its supergradient. We state now the SLA for problem (14) which has a differentiable concave objective function. Algorithm 3.1 Successive Linearization Algorithm (SLA) Start with a random x 0 2 R n , Having Stop when By [18, Theorem 4.2] we have the following finite termination result for the SLA algorithm. Theorem 3.2 SLA Finite Termination The SLA 3.1 generates a finite sequence f(x with strictly decreasing objective function values for problem (14) and terminating at an - i satisfying the minimum principle necessary optimality condition 4 Application and Numerical Testing We wish to determine whether x-component suppression or x-norm reduction of an observed linear system which is a corruption of a true system leads to an improved approximation of the true system. One can relate this to a machine learning framework by treating the first system as a training set, and the second system as a testing set [12]. The linear systems used are based upon ideas related to signal processing [10, 28] and more specifically to an example in [1, Equation (8)]. We consider the following true signal We assume that the true signal g(t) cannot be sampled precisely, but that the following observed signal can be sampled: ~ sampled at times : t We further assume that we do not know the true signal g(t) (18), and we attempt to model it as: The problem now is to compute the coefficients x so that we can adequately recover g(t), given only the noisy data ~ g(t i ) (19). Notice that by substituting the following coefficient vector x into (20), - Thus the true linear system (testing set) is then given by: and is solved exactly by x of (21). The observed linear system (training set) number with We will refer to a solution of problem (14), with b of (14) replaced by b computed by the Successive Linearization Algorithm (SLA 3.1) as a PLNA solution. Similarly, we shall refer to a solution of problem (4), with b replaced by b as an LLNA solution. We note here that for all experiments, the value of ff in the negative exponential of (14) is 5.0. Scalars are considered zero if they are in the interval [\Gamma1e \Gamma 8; 1e \Gamma 8]. The components of the initial starting point x 0 for SLA 3.1 were sampled from a normal distribution with mean = 0 and standard deviation = 1. The components of the initial point were sampled then fixed for all runs as: We now focus our attention on four approaches and compare solutions obtained by the PLNA and LLNA methods with solutions obtained by least squares and by a combinatorial search. 4.1 Comparison of PLNA, LLNA and Least Squares We compute solutions of the observed system are defined in (23), by PLNA, LLNA and by least squares. These solutions are then evaluated by the observed system (training set) residual kAx and the true system (testing set) residual kAx \Gamma bk 1 and graphically comparing the recovered signal - g(t) (20) to the true signal g(t) (18). The PLNA solution x(-) of for a given - is computed by solving by SLA 3.1 the concave minimization problem (14) with b replaced by b min The LLNA solution x(-) of Ax = b+p, for a given - is computed by solving the linear program (4) with b replaced by b min The least squares solution is a minimizer of kAx and is a solution to the normal equations: Although the 26 \Theta 10 matrix A defined by (23) has rank 10, the matrix A 0 A is numerically singular with smallest eigenvalue less than 10 \Gamma14 . Thus we resort to a singular value decomposition approach for solving (27). We determine an approximate solution x(ls) to (27) by the following method which utilizes the singular value decomposition [27]. Ordinary MATLAB [21] commands such as our perturbed system give an x with an error compared to given by the method described below, where x is efined by (21) and the perturbation vector p components are sampled from a normal distribution with mean = 0, standard Algorithm 4.1 Least Squares via Singular Value Decomposition. Let A 2 R m\Thetan with - be a small positive tolerance. 1. Determine the economy singular value decomposition of A [21, svd(A,0)], U 2 R m\Thetan R n\Thetan 2. Determine the index r such that oe i - for 3. Set ~ m\Thetar to be the first r columns of U , ~ n\Thetar to be the first r columns of V and ~ r\Thetar to be diag(oe 4. Compute which is a solution to: min For all runs - was fixed at 0.0001, which for our specific matrix A defined by (23), led to in the above algorithm. That is we discarded the last 4 columns of U and V . The PLNA problem (25) and the LLNA problem (26) were both solved for values of - 2 1:0g. Figures display results averaged over 5 noise vectors elements sampled from a normal distribution with mean = 0, standard deviation = 1. The average kpk In Figure 1 we plot averages of kAx(-) for the various values of -, measuring how "well" the PLNA and LLNA solutions solve the corrupted observed linear system. Also plotted is the average of kAx(ls) measuring how "well" the least squares solution (Algorithm 4.1) solves the observed system p. As can be proved, the PLNA and LLNA errors are a non-decreasing functions of - and are worse than the corresponding least squares error. However on the true system the results are reversed. See next paragraph. In Figure 2 we plot averages of kAx(-) \Gamma bk 1 for both PLNA and LLNA for various values of -, measuring how "well" the PLNA solution (25) solves the true linear system. Also plotted is the Suppression Parameter l Observed System ||Ax-b-p||Least Squares PLNA LLNA Figure 1: Average versus -, where x(-) is a PLNA solution (25) in the curve marked PLNA and is an LLNA solution of (26) for the curve marked LLNA, compared with average is the least squares solution (27) by Algorithm 4.1. The results are averaged over 5 noise vectors p. The PLNA and LLNA solutions were computed for values of Suppression Parameter l True System 2.6, 10.7 2.8, 2.8 2.6, 5.3 2.6, 2.2, 4.4 2.4, 1.4 1.8, 4.0 2.2, 1.3 1.8, 4.0 2.0, 1.2 1.8, 3.9 1.6, 1.1 1.6, 3.9 1.0, 1.3 1.0, 0.4 1.00.4Least Squares PLNA LLNA Figure 2: Average kAx(-) \Gamma bk 1 versus -, where x(-) is a PLNA solution (25) in the curve marked PLNA and is an LLNA solution of (26) for the curve marked LLNA, compared with the average is the least squares solution (27) solved by Algorithm 4.1. These results are averaged over 5 noise vectors p. The PLNA and LLNA solutions were computed for values of above/below the curves labelled "PLNA" and "LLNA" at various values of - indicate the average number of nonzero elements in x(-) and when followed by a second number, that number denotes kx(-)k 1 . average of kAx(ls) \Gamma bk 1 , measuring how "well" the least squares solution (Algorithm 4.1) solves In Figure 3 we compare averages of 1-norm distances from the true solution x (21) to the PLNA and LLNA solutions x(-) and the averages of 1-norm distances from x to the least squares solution x(ls). Recall that the true solution x is such that Ax b. Note that for - 0:01, the PLNA and LLNA distances are smaller than the least squares distance. For - 1, x(- 0 and even though kx(-) \Gamma x k 1 is small, this solution is poor from a signal recovery point of view since the zero vector gives the worst discrepancy between the true signal and the recovered signal at 26 discrete points (see Figure 2). In Figure 4(a) we plot the true signal, the observed signal and the signal recovered by solving, for one noise vector p, PLNA (25) with Figure 4(b) displays the true signal, the observed signal and signal recovered for the same problem by least squares solved by Algorithm 4.1. This is probably the most significant result. The signal recovered by both PLNA and LLNA is considerably closer to the the true signal than that obtained by the least squares solution. 4.2 Comparison of PLNA and LLNA with Combinatorial Search In this section, we reformulate our PLNA problem so that the solution x(-) has a fixed number of nonzero elements, for k 2 \Gammay # of nonzero elements of We also formulate the LLNA similarly as follows: Similarly, for k 2 ng, the combinatorial search solution x c is obtained by solving: of nonzero elements of Notice that x c is determined by enumerating all subsets of size k of a set of n elements, or subsets. This is a rather expensive procedure computationally requiring two orders of magnitude more time than PLNA and LLNA. Figure 5 displays results averaged over 5 noise vectors p 2 R m with elements sampled from a normal distribution with mean = 0, standard deviation 20:1777). Plotted are averages of kAx(-) measuring how "well" the PLNA, LLNA and combinatorial solutions solve the observed system. Also plotted are averages of kAx(-) \Gamma bk 1 and kAx c \Gamma bk 1 for each k, measuring how "well" the solutions solve the true system. Figure 6 displays the average 1-norm distance between x of (21) and the solutions obtained by PLNA, LLNA and combinatorial search. The averages are over 5 noise vectors p. Figure 7(a), which for convenience duplicates Figure 4(a), displays the true signal, the observed signal and the signal recovered by solving PLNA (25) for the value of and the signal Suppression Parameter l Distance to True Solution ||x-x ||Least Squares PLNA LLNA Figure 3: Average kx(-) \Gamma x k 1 versus -, where x(-) is a PLNA solution (25) in the curve marked PLNA and is an LLNA solution of (26) for the curve marked LLNA, compared with the average is the least squares solution (27) solved by Algorithm 4.1. The true solution x (21) is such that Ax b. The PLNA and LLNA solutions were computed for values of 012Observed Actual PLNA LLNA (a) Dashed curves are the recovered signal - g(t) with coefficient vector x(-) determined by (25) with 0:3 and kAx(-) \Gamma and by (26) with Observed Actual Least Squares (b) Dashed curve is the recovered signal - g(t) with coefficient vector x(ls) determined by least squares solution (27) solved by Algorithm 4.1. Note: Figure 4: Signal Recovery. Solid curve is the true signal g(t). Circles are the observed signal sampled at discrete times and the dashed curves are the recovered signals. Number of Nonzeros k in Solution x Average Observed True Figure 5: Comparison of PLNA (30) and LLNA (31) with combinatorial search (32). Average is '2' for PLNA and 4 for LLNA. Average kAx c \Gamma bk 1 is '+' for combinatorial solution x c . Number of Nonzeros k in Solution x Average Distance to True ||x-x Figure Comparison of PLNA (30) and LLNA (31) with combinatorial search (32). Average is '2' for PLNA and 4 for LLNA. The true solution x is such that Ax Observed Actual PLNA LLNA (a) Dashed curves are the recovered signal - g(t) with coefficient vector x(-) determined by (25) with 0:3 and kAx(-) \Gamma and by LLNA. Combinatorial Observed Actual (b) Dashed curve is the recovered signal - g(t) with coefficient vector xc determined by combinatorial search with Figure 7: Signal Recovery. Solid curve is the true signal g(t). Circles are the observed signal sampled at discrete times and the dashed curves are the recovered signals. recovered by LLNA (26) for 0:8. Figure 7(b) displays the true signal, the observed signal and signal recovered by combinatorial search solution x c of (32) for 2. 4.3 Observations We make the following observations with respect to the comparison between the PLNA, LLNA solutions and least squares solutions. 1. For all values of - 0:05 tested, the average observed system (training set) residual kAx(ls) \Gamma strictly less than the average kAx(-) LLNA. The least squares Algorithm 4.1 for solving (27) produced "better" solutions to the observed system Figure 1. However: 2. For values of - 2 [0:01; 0:90] tested, the PLNA average true system (testing set) residual strictly less than the average kAx(ls) \Gamma bk 1 indicating that PLNA produced "better" solutions to the true system in comparison with least squares. For values of tested, the average true system residual with solutions determined by LLNA was also strictly less than the corresponding least squares true system residuals. See Figure 2. PLNA with and an average of 2.2 nonzero terms achieved an error reduction of 38.85% over the corresponding error obtained by the least squares solution. LLNA with produced an average 1-norm true system residual that was 52.98% less than the least squares residual. 3. For values of - ? 0:1 tested, the average determined by both PLNA and LLNA, was 2 orders of magnitude less than the average kx(ls) \Gamma x k. Hence the PLNA and LLNA solutions were "closer" to recovering the true signal g(t) (18). See Figure 3. 4. Figure 4, shows the most significant comparison between PLNA, LLNA and least squares: A much more accurate recovery of the true signal by both PLNA and LLNA than by least squares. We note the following with respect to the comparison between the PLNA, LLNA solutions and the solutions obtained by combinatorial search. 1. For 7, the average PLNA kAx(-) \Gamma bk 1 was strictly less than the average kAx c \Gamma the average PLNA kAx(-) \Gamma bk 1 was less than or equal to 1.634 times the average kAx c \Gamma bk 1 . For 7, the average LLNA kAx(-) \Gamma bk 1 was strictly less than the corresponding average true system residual with the combinatorial solutions. For 4, the average LLNA kAx(-) \Gamma bk 1 was less than or equal to 1.114 times the corresponding average kAx c \Gamma bk. See Figure 5. 2. For k - 3, the average kx(-) \Gamma x k 1 , for both PLNA and LLNA, was strictly less than the average by orders of magnitude. For than or equal to average kx c \Gamma x k 1 . See Figure 6. 3. The minimum over of the true system 1-norm residual of 5.3867 occurs for with the solution obtained by combinatorial search. The true system residual for PLNA with and the true system residual for LLNA is 6:0022. We note that when computing the PLNA and LLNA solutions for 2, the first value of - found (by a bisection search) such that the solution has 2 nonzero elements was chosen. This fact accounts for the discrepancy between the true system residuals in Figure 5 and Figure 2. 4. Figure 7 shows recovery of the true signal by both PLNA and LLNA which is as good or even better than the recovered signal by a lengthy combinatorial search. The time needed by each approach to compute a solution was determined by performing a single run on a Sun SparcStation 20 with 96 megabytes of memory running MATLAB 5.1, using the commands "tic" and "toc" [21]. All linear programs were solved with CPLEX [7] interfaced with MATLAB. Solving the PLNA problem with seconds. Solving the LLNA problem with seconds. Determining the least squares solution by Algorithm 4.1 with seconds. Determining the solution by combinatorial search with seconds. Solutions computed by PLNA and LLNA were at most superior or at least comparable to those obtained by combinatorial search (32), yet needing two orders of magnitude less time to compute. 5 Conclusion A theoretically justifiable fast finite algorithm has been proposed for solving linear systems corrupted by noise or errors in measurement. The parsimonious approach (PLNA) attempts to set to zero as many components of the solution vector as possible while minimizing the residual error of the corrupted system, whereas the least norm approach (LLNA) minimizes the norm of the solution as well as the residual. Numerical evidence indicates that both these two approaches lead to solutions with many zero components, and that such solutions may be closer by orders of magnitude to the solution of the underlying uncorrupted system than other solutions of the corrupted system obtained by either least squares or even by a time-consuming combinatorial search for a solution with a minimal number of nonzero components. It is interesting to note that parametricly minimizing the norm of the solution leads also to suppression of its components, and conversely parametrically suppressing components of the solution also leads to a solution with a reduced norm. Most importantly, PLNA and LLNA recover a much more accurate signal than that obtained by least squares and much faster than that obtained by a lengthy combinatorial search. Acknowledgement We are indebted to the referees for constructive comments that led to considerable improvements. In particular we are indebted to a referee who suggested the inclusion of the LLNA approach in our comparative tests. --R The constrained total least squares technique and its application to harmonic superposition. On the approximability of minimizing nonzero variables or unsatisfied relations in linear systems. A support vector machine approach to decision trees. Occam's razor. Clustering via concave minimization. Feature selection via mathematical programming. CPLEX Optimization Inc. Theory of Vector Optimization. An algorithm for quadratic programming. Least Square Estimation With Applications to Digital Signal Processing. An analysis of the total least squares problem. Fundamentals of Artificial Neural Networks. Formulation and solution of structured total least norm problems for parameter estimation. The Total Least Squares Problem Solving Least Squares Problems. Optimal brain damage. Misclassification minimization. Machine learning via polyhedral concave minimization. Mathematical programming in data mining. Solution of general linear complementarity problems via nondifferentiable concave minimization. The MathWorks Introduction to Optimization. Convex Analysis. Total least norm formulation and solution for structured problems. Overfitting avoidance as bias. Readings in Machine Learning. Introduction to Linear Algebra. Discrete Random Signals and Statistical Signal Processing. The Nature of Statistical Learning Theory. The Mathematics of Generalization --TR --CTR Jinbo Bi , Kristin Bennett , Mark Embrechts , Curt Breneman , Minghu Song, Dimensionality reduction via sparse support vector machines, The Journal of Machine Learning Research, 3, 3/1/2003 Glenn Fung , Olvi L. Mangasarian, Data selection for support vector machine classifiers, Proceedings of the sixth ACM SIGKDD international conference on Knowledge discovery and data mining, p.64-70, August 20-23, 2000, Boston, Massachusetts, United States Glenn Fung, The disputed federalist papers: SVM feature selection via concave minimization, Proceedings of the conference on Diversity in computing, p.42-46, October 15-18, 2003, Atlanta, Georgia, USA Glenn M. Fung , Olvi L. Mangasarian , Alexander J. Smola, Minimal kernel classifiers, The Journal of Machine Learning Research, 3, p.303-321, 3/1/2003 Gunnar Rtsch , Ayhan Demiriz , Kristin P. Bennett, Sparse Regression Ensembles in Infinite and Finite Hypothesis Spaces, Machine Learning, v.48 n.1-3, p.189-218, 2002 P. S. Bradley , O. L. Mangasarian , D. R. Musicant, Optimization methods in massive data sets, Handbook of massive data sets, Kluwer Academic Publishers, Norwell, MA, 2002 Gunnar Rtsch , Sebastian Mika , Bernhard Schlkopf , Klaus-Robert Mller, Constructing Boosting Algorithms from SVMs: An Application to One-Class Classification, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.24 n.9, p.1184-1199, September 2002
minimal cardinality;least norm approximation
301463
On learning algorithms and balancing loads in Time Warp.
We present, in this paper, an algorithm which integrates flow control and dynamic load balancing in order to improve the performance and stability of Time Warp. The algorithm is intended for use in a distributed memory environment such as a cluster of workstations connected by a high speed switch. Our flow control algorithm makes use of stochastic learning automata and operates in the fashion of the leaky-bucket flow control algorithm used in computer networks. It regulates the flow of messages between processors continuously throughout the course of the simulation, while the dynamic load balancing algorithm is invoked only when a load imbalance is detected. Both algorithms make use of a space-time product metric and collect the requisite information via a snapshot-based GVT algorithm.We compare the performance of the flow control algorithm, the dynamic load balancing algorithm and the integrated algorithm with that of a simulation without any of these controls. We simulated large shuffle ring networks with and without hot spots and a PCS network on an SGI Origin 2000 system.Our results indicate that the flow control scheme alone succeeds in greatly reducing the number and length of rollbacks as well as the number of anti-messages, thereby increasing the number of non-rolled back messages processed per second. It results in a large reduction in the amount of memory used and outperforms the dynamic load balancing algorithm for these measures. The integrated scheme produces even better results for all of these measures and results in reduced execution times as well.
Introduction The synchronization algorithm for Time Warp [9] involves rolling the simulation back to a previous state if an event arrives at a simulation object (an LP, or logical process) with a timestamp which is smaller than that of a previously processed event. In order to accomplish this, Time Warp periodically records checkpoints of the state of the simulation and sends out anti-messages, whose function it is to cancel events which resulted from the arrival of a straggler (out-of-order) message. It is well known that optimistic simulations can consume a large amount of memory and be subject to an explosive growth in the number of rollbacks during the course of a simulation. The large demands on memory stem from checkpointing the state, sending an anti-message for each output message, and storing input messages which might later have to be canceled. Both of these problems have been the subject of much attention in the research literature. One approach to these problems has been trying to restrain the optimism of the simulation [18] via a global synchronization barrier. In this approach [16], a window of virtual time is defined within which it is permissible to simulate events at LPs provided that they do not violate causality constraints. In probabilistic algorithms each LP determines a blocking period. The amount of time which an LP spends in a blocked state can be determined by estimates of the time at which the next event will arrive or by comparing the costs of rolling back with blocking [8], or by comparing the frequency and cost of rollbacks [2]. A different approach has been via memory manage- ment. The objective of memory management is the reclamation of space from existing objects when fossil collection does not reclaim sufficient space so that the simulation may be allowed to continue. These techniques include cancelback [10], artificial rollback [11], and adaptive memory management [6]. In an attempt to prevent a simulation from running out of memory and increase processor utilization, dynamic load balancing algorithms transfer LPs from heavily loaded processors to lightly loaded ones [3, 1, 4]. A number of metrics have been used to evaluate load, including virtual time progress, the number of non- rolled back events per second [1] and queue length. [7] contains a comparison of the efficacy of three of these metrics. In [14], the authors use a moving window in the same fashion as computer networks. A queuing model is used to determine an initial window size, which is adjusted during the course of the simulation depending on its performance. In a shared memory environment, an integration of this approach with the adaptive memory management scheme is also described. The algorithm described in this paper combines a flow control algorithm with a dynamic load balancing algorithm. The flow control algorithm is executed on a continuous basis, regulating the message traffic between pairs of communicating processors. The algorithm assigns a pool of tokens to each (one way) message flow. In order to send a message, a processor must first acquire a token. When the token pool is depleted, the processor is blocked. The number of tokens in the pool is dynamically updated throughout the course of the simulation by means of a stochastic learning algorithm. The metric which we use is the space-time product at a processor (defined in the next section). Our dynamic load balancing algorithm is employed when, in spite of the use of flow control, a load imbalance is discovered. A condition for load imbalance is checked at each GVT cycle. Our algorithm is targeted towards the use of distributed memory architectures, such as the use of clusters of workstations connected by high-speed switches. By contrast, [14] combines memory management and flow control in a shared memory environment. Section 2 of this paper contains a description of the algorithm(s) as well as some background information on stochastic learning automata, section 3 describes our experiments, and the final section contains our conclusions 2 The Algorithm We make use of the space-time product as our metric for our flow control and dynamic load balancing algorithms. We define the space-time product of each processor at real time t as follows: ST i NEvents is the number of events, NStates is the number of states, sizeof(event) and are the respective size of an event and a state, and LGV T i is the minimum LVT at processor P i . The objective of our algorithm is to control the differences between the space-time products of the processors involved in the simulation. More precisely, we require that where ffic is the maximum allowable difference between two processors and P is a set of processors. In using the space-time product, we are attempting to balance both the memory used by the processors and to keep the processors close to one another in virtual time in order to reduce the possibility of rollbacks. 2.1 Flow control Our flow control scheme is similar to the "leaky bucket" scheme [17] used in computer networks where a counter is associated with each channel. Whenever a packet is sent, the counter is increased. If the counter increases above a fixed threshold, arriving packets are discarded. In our algorithm, each processor is first assigned a number of tokens (or permits). In order to send a message to another processor, a processor makes use of a token, i.e. each time it sends a message, the processor decreases its alloted token pool by one. A separate pool of tokens is assigned to a processor corresponding to each of the other processors. The number of tokens in each of these pools is varied dynamically throughout the course of the simulation. We determine the number of tokens assigned to a processor by means of stochastic learning automata [13]. An SLA consists of stochastic automaton and its surrounding environment, as shown in figure 1. Environment Response Input Input x Action a F { ,p,G} A Stochastic Automaton Figure 1: Stochastic Learning Automaton In order to make use of SLA in a flow control al- gorithm, we must answer the following questions. (1) What is the nature of the control model, i.e. how do the automata interact with one another? (2) Which reinforcement scheme should be used? (3) How often should the reinforcement scheme be invoked? We provide answers to each of these questions in turn. Control model Our control model consists of a collection of automata such that each automaton resides within a processor, and cooperates with the remaining automata to control the flow of messages. Figure 2 contains a portrayal of our model, where A i (t) is defined as the number of events which arrive during the interval [t; t+1) and D i (t-1) the number of departing events during the interval [t-1; t). By defining a "regulation factor" is the maximum number of messages which processor P i may transmit to other processors, is the number of tokens assigned to processor P i at the next interval [t; t+1): l l (t) Environment A (t) A (t) Figure 2: Feedback response between processor P i and its environment Reinforcement scheme We adopted an S-model with an linear reward-inaction scheme (SL RI ) as a reinforcement scheme, based on [12]. The S-model takes continuous values over an interval [0,1]. The probability that processor P i sends a message to processor P k at time t is denoted by p i;k (t) where ,N-1. The essence of our flow control scheme is the computation of the token generation probability p i;j (t); i 6= j for each destination Our equation for updating p i;d (t), where d is the destination processor, is as follows: F j;d (t)p j;d (t)]g; (2) where G(t) is defined as the "gain" for an automaton and automata are involved in the simulation. Each automaton has N-1 actions and receives responses from the rest of proces- sors. We define the regulation factor as the ratio of We define F i;d (t) as the normalized environment response from the destination processor P d at processor F i;d where the space-time product ST i;i of processor P i at real time t is expressed as ST i;i NEvents NEvents is the number of events, NStates the number of states in processor P i , and LGV T i is the minimum LVT in processor P i . The space-time product at each processor is piggybacked onto each message sent to another processor. ST i;d (t) is the most recent value of processor P d 's space-time product ST d;d (t) (piggybacked on messages sent to P i ), and STmax is the maximum space-time product of the simulation system monitored at processor P i at time t. F i;d was defined in this manner to reflect the space-time difference between processors P i and P d . Its value is constrained to lie between 0 and 1 because environ- ment's response in an SLA must be between 0 and 1. In effect, equation (2) assigns a new value to p i;d in proportion to the difference between F i;d and the average of the other F j;d 's, j 6= i. If ST i;i (t) - ST i;d (t), then F i;d (t) is equal to one. If progressing faster than P d or P i consumes more space than P d . We would like processor P i to acquire more tokens in this case. If we interpret this to mean that P d is progressing faster than P i or it requires more memory than P i . Then we would like to assign fewer tokens to the sending processor P i in order to reduce the number of outgoing messages. Thus the value of F i;d is less than 1. It is important to recall that the assignment of tokens to processor P i will not just depend on F i;d , but will also depend upon the mean of the F j;d 's, j 6= d. The gain G(t) for an automaton is computed in the following manner. In our SL RI model, G(t) at each processor is adjusted depending upon its space-time product's closeness to the average value ST . When the automaton which is residing on a processor has a space-time product close to the average ST , G(t) at the processor will be assigned a value which is close to 1. When the automaton has its st farther away from ST , the value of G(t) will be assigned a lower value because control by the automaton is considered to be ineffective. We derived G(t) by modifying Chebyshev's theorem as follows: oe and jst \Gamma In expression (5), when st is within oe of ST , then G(t) is equal to 1. When st is farther away from the average value of ST , G(t) at processor P i will be diminished in proportional to the difference jst Updating interval Action probabilities are periodically updated to reflect responses from the environment. The elapsed time or a number of received responses may be used as a basis for defining the interval. Updating the probabilities too frequently may cause computational overloads for the learning automata, in spite of reflecting recent responses from the environment. On the other hand, infrequent updating may provide obsolete information, inadequate to choose an optimal action from the action set. In our model, action probabilities are updated when the assigned token number is decreased to 0 or when some fixed number (here, 500) of events is received at the processor. 2.2 Dynamic load balancing A number of dynamic load balancing algorithms have appeared in the literature [3, 15, 1, 4]. They differ from one another in several important ways among which are: the metric which they employ to balance the load, the way in which information pertaining to the value of the metric is collected, the number LPs chosen to migrate and the manner in which they are chosen. A number of metrics have been employed in distributed load balancing algorithms. Examples of these metrics include the number of events in an input queue, the rate of processed events at each processor, virtual time progress, and effective utilization. We make use of the space-time product (as previously defined) as our metric. Our algorithm migrates load from the heavily loaded processor(s) to the most lightly loaded processor. We rely on our GVT algorithm [5] to provide information about the space-time product to all of the processors involved in the simulation. In particular, it provides the minimum space-time product st min with its processor id. pid min , an average space-time product value ST , and its standard deviation oe. Each processor actually makes use of an exponentially smoothed version of its space-time product, st n (t+1) as ffst n (t)+(1 \Gamma ff) st n (t) (here, in order to minimize the fluctuation of its space-time product. It is not clear that the mean value ST and its standard deviation oe given by the GVT computation will follow a normal distribution because the number of processors employed in a simulation is too small (e.g., 6). Hence, we use Chebyshev's theorem in which the proportion of observations falling within z standard deviation units with mean ST is at least where oe . If each processor has its st within ST \Sigma zoe 2oe, then the probability of st existing between ST \Sigma 2oe is 0.75 1 . Therefore, we invoke dynamic load balancing when the condition are The choice of which LPs to migrate depends upon the granularity of the LPs, the amount of traffic between neighboring LPs, and the connectivity of the LPs. We chose to migrate a group of 10 LPs at each transfer, based upon experimental results. In our research, LPs which have close topological relations with LPs residing on the destination processor (pid min ) are the only ones chosen for migration. 2.3 Integrated scheme - Flow control and Dynamic load balancing The flow control and dynamic load balancing algorithms both have the same intention, that of keeping the space-time product of the processors close to one another throughout the course of the simulation, i.e. our definition of balancing the workload. In attempting to improve the performance and the stability of our system, we integrate both of these schemes in a complementary fashion. In our integrated scheme both of the algorithms are executed independently of one another. The flow control algorithm exerts control continuously on the outgoing messages from a processor as determined by the action probabilities. The action probabilities are regularly updated as described above. On the other hand, the dynamic load balancing algorithm can be executed at each GVT cycle depending on whether a sufficiently large load imbalance is detected. Hence the intention of the integrated scheme is to allow the flow control to balance the load to the extent that it can. In the event that a sufficiently large load imbalance is still detected during the course of a GVT computation, the load balancing algorithm is invoked to rectify the imbalance. 2.4 GVT computation Our GVT algorithm plays an important part in the gathering and dissemination of information for our load balancing algorithms. It is an extension of Mattern's algorithm [5] which relies upon techniques used to build a global snapshot (consistent cuts) to compute the GVT. An approximate proportion within - \Sigma 2oe in a normal distribution is .955. In [5], we show that it has a superior performance to that of Mattern's algorithm as well as to Bellenot's and algorithms. 3 Simulation results 3.1 Applications In this section we compare the performance of the flow control, the distributed load balancing algorithm and the integrated algorithm with one another to a simulation without any form of control. We make use of the Snapshot(1) GVT algorithm described in [5] in all of our simulations. The simulations were executed on an SGI Origin 2000, which consists of 8 64-bit R10000 processors and 256 MB of memory per processor. We simulated shuffle ring networks and a PCS net-work [5]. The shuffle ring network shown in figure 3 is obtained by modifying a shuffle exchange network. We modified a shuffle exchange network by interconnecting nodes in the first and last column and substituting one of the input buffers with a local source and one of the output buffers with a local sink. The topology gets its name from this modification. 0,3 Figure 3: 4x4 Shuffle Ring Network The PCS is a wireless communication network which provides communications for mobile users. The service area is divided into cells, each of which has a transmitter with a fixed number of channels. A regular hexagon is used to represent a cell. When a user makes a call, a channel is assigned to the user. If all channels are allocated, the call is blocked. If a user moves from one cell to another during a call, a new channel is allocated to provide for a continuation of the call. In our simulation, LPs correspond to cells, and each cell has 500 channels. Calls can be static or mobile. The velocity of a mobile call is assumed to be constant, and its direction can be chosen from one of six direction - east, southeast, southwest, west, northwest, northeast. The velocity and direction of a call are chosen from a uniform distribution and the call completion time is determined by an exponential distribution with a mean of 300. The cell diameter is fixed at 1 km. We used an hexagonal mesh topology which wraps the hexagonal mesh (H-mesh) into a homogeneous graph with an in- and out-degree of six as shown in figure Figure 4: Wrapped hexagonal mesh with n=3 3.2 Comparisons In order to compare each algorithm, we made use of the following performance measures: (1) simulation time, (2) memory used, (3) number and length of rollbacks, (4) number of anti-messages. We simulated the following size networks - a 125x125 SRN (57,862 LPs), a 200x200 SRN (146,672 LPs), and a PCS H(80) (56,884 LPs). In the PCS H(80) network, the number of cells on each peripheral edge of the mesh is equal to 80. Both uniform and non-uniform load distributions were used in the simulation. In order to create a non-uniform load distribution, we made use of "hot spots", or LPs with mean service times equal to one third of the mean service times at the other LPs. Exponential service times were used. The hot spots are randomly distributed throughout the network. 3.3 Experimental results Rollbacks We present results for the number of rollbacks, the length of a rollback and the number of anti-messages produced during the course of a simulation. Table 1 contains the number of rollbacks for each scheme as well as the percentage difference between each scheme and a simulation without any form of control. Results are presented for the 125x125 SRN with and without hot spots, the 200x200 SRN with hot spots and the PCS. 2 The links of edge cells are not depicted in this figure. Table 1: Rollback number at SRN networks and a PCS network Network type % % % Table 2: Anti-messages at SRN networks and a PCS network Network type % % % We see that flow control results in fewer rollbacks than does dynamic load balancing in all of the networks simulated except for the 125x125 SRN without hot spots. The integrated scheme exhibits the best per- formance, with a reduction in the number of rollbacks ranging from 19-52%. In tables 2 and 3, the number of anti-messages and the rollback lengths are recorded. Both tables reveal similar results. Flow control results in fewer anti-messages than does dynamic load balancing. The roll-back length is also shorter than that which results from dynamic load balancing except in the case of the 125x125 SRN. The integrated scheme results in the best performance reducing the rollback length by 8- 59%, while the number of anti-messages are reduced by between 15-91%. The reason that the flow control scheme has a greater success than the dynamic load balancing scheme lies in the fact that when clusters of LPs are moved between processors, it is necessary to temporarily halt the sending of messages to the LPs in the cluster. This results in longer message delays, increases the probability of a rollback occurring and increasing the length of a roll-back when it occurs. In addition, some LPs which formerly communicated with one another in a processor must now make use of inter-processor links, again resulting in larger message delays. The flow control algo- rithm, on the other hand, reacts in a more incremental fashion than does the dynamic load balancing algorithm and does not cause an interruption in processing while it shifts LPs. The exception to this observation is the 125x125 SRN without hot spots, in that it does not reduce the number of rollbacks as much as dynamic load balancing does. The reduction in the rollback length is close to that obtained by dynamic load balancing, although both are relatively small reductions. The reason for this different behavior is to be found in the nature of the simulations. The 125x125 SRN simulation exhibits a more balanced behavior than do the other simulations. The other two simulations have hot spots and the PCS simulation, by its nature, experiences a shifting of load between groups of LPs. The reason for the success of the integrated scheme is its judicious combination of flow control and dynamic load balancing. The flow control scheme reduces the frequency with which the dynamic load balancing algorithm needs to be called as well as the number of LPs which need to be transferred to balance the load. Since it is based on a learning algorithm, it is sensitive to changes in the load distribution between the processors Goodput We define the goodput to be the rate of the number of processed non rolled-back events in the simulation. Analogous to the throughput of a computer network, it is intended to be a measure of the progress a simulation is making in simulated time, and hence a measure of the stability of the simulation. Table 4 contains a comparison of the goodputs for our three algorithms as well as the uncontrolled simu- lation. The table contains results for simulations of the 125x125 and 200x200 SRN's with hot spots and the PCS. The patterns established when we examined roll-backs and anti-messages again assert themselves. Flow control establishes itself as being superior to dynamic load balancing. The integrated algorithm produces better results than do dynamic load balancing or flow control for the SRN simulations. However, it produces results which are intermediate between the other two Table 3: Rollback distances at SRN networks and a PCS network Network type % % % Table 4: Average goodput at SRN networks and a PCS network Network type evts./sec evts./sec % evts./sec % evts./sec % SRN 200x200 (25%) 24,272.9 24,578.2 1.3 28,815.9 18.7 28,915.4 19.1 methods for the PCS simulation. This is because the processing load shifts during the course of the PCS simulation and the dynamic load balancing portion of the integrated algorithm suspends the sending of messages during the transfer of LPs between processors. In the end, the integrated scheme produces goodputs which are 10-21% better than the uncontrolled version of Time Warp. The improvements in goodput generated by the flow control and the integrated algorithms is a result of the reduction in the number and length of the rollbacks and the consequent decrease in the number of anti-messages. Memory Table 5 contains results for the average amount of memory used for the three schemes as well as for the simulation operating without control. As has been the case so far, we see that flow control performs better than dynamic load balancing, and the integrated scheme gives the best performance. The integrated scheme saves 13-20% of the memory used by the uncontrolled scheme. We note that the simulation for the 200x200 SRN uses less memory than the 125x125 SRN simulation. The reason for this is that a smaller GVT was used for the termination condition for the 200x200 SRN simulation Execution times The simulation times of the three schemes and the uncontrolled scheme are contained in table 6. Once again, the percentage differences from the uncontrolled scheme are included in the table. In all cases the integrated scheme provides the best performance with a 13-23% range of improvements when compared to the uncontrolled scheme. On examining this table, we note that flow control does not produce the same level of improvements which we have previously observed. This is because the flow control also regulates the sending of messages, necessarily increasing the delays associated with them. Hence the savings in execution time which results from a decrease in the number and length of rollbacks is somewhat mit- igated. In the integrated algorithm the dynamic load balancing algorithm reduces the reliance upon the flow control algorithm, producing the best results. Our results indicate that the flow control scheme succeeded in reducing the number and length of rollbacks as well as the number of anti-messages, thereby increasing the goodput of the simulation. In short, the flow control algorithm serves to increase the stability of Time Warp. The combination of flow control and dynamic load balancing had a more pronounced effect than flow control or dynamic load balancing alone. This suggests that the algorithm did indeed act in a complementary fashion. The dynamic load balancing algorithm transferred load when the flow control algorithm could not manage to keep the space-time products sufficiently close to one another. By reducing the need to invoke dynamic load balancing, the flow control algorithm decreased the number of times LPs had to be transferred between processors. When LPs are trans- ferred, it is necessary to suspend the sending of messages by LPs involved in the transfer, resulting in an increase in the number and length of rollbacks as well as the number of anti-messages which are sent. In order to validate the usefulness of these algo- rithms, it will be necessary to test them in the context of simulations of real system. We hope to have this opportunity in the near future. Table 5: Used memory at SRN networks and a PCS network Network type bytes bytes % bytes % bytes % Table Simulation progress at SRN networks and a PCS network Network type sec. sec. % sec. % sec. % --R "The Dynamic Load Balancing of Clustered Time Warp for Logic Simulation" "The Adaptive Time-Warp Concurrency Control Algorithm" "Load Balancing Strategies for Time Warp on Multi-User Workstations" "Background Execution of Time Warp Programs" "An Efficient GVT Computation using Snapshots" "An Adaptive Memory Management Protocol for Time Warp Parallel Simulation" "Dynamic Load Balancing for Clustered Time Warp" "Estimating Rollback Overhead for Optimism Control in Time Warp" "Virtual Time" "Virtual Time II: The Cancelback Protocol for Storage Management in Time Warp" "Reducing the State Saving Overhead for Time Warp Parallel Simulation" "Learning Automata Models for Adaptive Flow control in Packet-Switching Networks" "Learning Automata - A Survey" "Adaptive Flow Control in Time Warp" "Dynamic Load Balancing of a Multi-Cluster Simulator on a Network of Workstations" "SPEEDES: Synchronous Parallel Environment for Emulation and Discrete Event Simulation" "New Directions in Communications (or Which Way to the Information Age?)" "Performance Evaluation of the Bounded Time Warp Algorithm" "On the behaviour of stochastic automata with a variable structure" --TR Virtual time Virtual time II: storage management in conservative and optimistic systems An adaptive memory management protocol for Time Warp parallel simulation Dynamic load balancing of a multi-cluster simulator on a network of workstations Background execution of time warp programs The dynamic load balancing of clustered time warp for logic simulation Adaptive flow control in time warp Estimating rollback overhead for optimism control in Time Warp --CTR Tapas K. Som , Robert G. Sargent, Model structure and load balancing in optimistic parallel discrete event simulation, Proceedings of the fourteenth workshop on Parallel and distributed simulation, p.147-154, May 28-31, 2000, Bologna, Italy Johannes Lthi , Steffen Gromann, The resource sharing system: dynamic federate mapping for HLA-based distributed simulation, Proceedings of the fifteenth workshop on Parallel and distributed simulation, p.91-98, May 15-18, 2001, Lake Arrowhead, California, United States Herv Avril , Carl Tropper, On Rolling Back and Checkpointing in Time Warp, IEEE Transactions on Parallel and Distributed Systems, v.12 n.11, p.1105-1121, November 2001 Ewa Deelman , Boleslaw K. Szymanski, Simulating spatially explicit problems on high performance architectures, Journal of Parallel and Distributed Computing, v.62 n.3, p.446-467, March 2002 Boon Ping Gan , Yoke Hean Low , Sanjay Jain , Stephen J. Turner , Wentong Cai , Wen Jing Hsu , Shell Ying Huang, Load balancing for conservative simulation on shared memory multiprocessor systems, Proceedings of the fourteenth workshop on Parallel and distributed simulation, p.139-146, May 28-31, 2000, Bologna, Italy
flow control;time warp;space-time product;dynamic load balancing;stochastic learning automata;stability;GVT
301668
New tiling techniques to improve cache temporal locality.
Tiling is a well-known loop transformation to improve temporal locality of nested loops. Current compiler algorithms for tiling are limited to loops which are perfectly nested or can be transformed, in trivial ways, into a perfect nest. This paper presents a number of program transformations to enable tiling for a class of nontrivial imperfectly-nested loops such that cache locality is improved. We define a program model for such loops and develop compiler algorithms for their tiling. We propose to adopt odd-even variable duplication to break anti- and output dependences without unduly increasing the working-set size, and to adopt speculative execution to enable tiling of loops which may terminate prematurely due to, e.g. convergence tests in iterative algorithms. We have implemented these techniques in a research compiler, Panorama. Initial experiments with several benchmark programs are performed on SGI workstations based on MIPS R5K and R10K processors. Overall, the transformed programs run faster by 9% to 164%.
Introduction Due to the widening gap between processor and memory speed, the importance of efficient use of caches is widely recognized. Loop tiling, which combines strip-mining and loop interchange, is a well-known loop transformation which can be used to increase the This work is sponsored in part by National Science Foundation through grants CCR-950254, MIP-9610379 and by Purdue Research Foundation. To appear in ACM SIGPLAN PLDI99. Copyright c fl1999 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of 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 or intial screen of the document. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept., ACM Inc., fax +1 (212) 869-0481, or permissions@acm.org. reuse of cached data [25]. A variety of other loop transformations such as reversal and skewing have also been proposed to enable loop tiling [23]. Current tiling techniques are generally limited to perfectly-nested loops. Each loop, except the inner-most one, in such a perfect nest contains exactly one inner loop at the next level. A loop nest which contains simple statements between two loop headers, as shown in Figure 1, can be transformed into a perfect nest simply by moving those statements, guarded by appropriately inserted IF conditions, inside the inner loop [23], assuming the inner loop iterates at least once. Unfortunately, many imperfectly-nested loops in numerical programs are not as trivial as the one in Figure 1. A loop may contain several inner loops which are at the same level. For example, the Jacobi program kernel shown in Figure 2(a) has two separate loop nests within the outmost loop. In certain cases, techniques such as peel-and-fusion [13] can transform nontrivial imperfectly-nested loops into perfectly- nested ones, which then may become amenable to tiling. Unfortunately, such techniques only exploit temporal locality within the same iteration of the outer loop, e.g., the T loop in the Jacobi code. (In this paper, the T-loop is called the time-step loop.) Relatively little temporal reuse is exploited because cached data are not reused across different time steps. Current tiling techniques also have difficulties with premature loop exits, such as those caused by convergence tests in iterative numerical algorithms. This paper presents a number of program transformations to overcome the aforementioned difficulties with tiling. We make two main contributions: ffl We define a class of nontrivial imperfectly-nested loops for which we present algorithms to legally and profitably tile the separate loops which are not perfectly-nested in the time-step loop, as in the case of Jacobi. Temporal reuse is thus exploited across different time steps. ffl We present a scheme to permit tiling of loops with premature exits by speculatively executing iterations of the time-step loop before the exit condition can be tested for those iterations. Roll-back statements are inserted to insure correct program results in case the exit condition turns out to be true. The techniques introduced in this paper are particularly suitable for iterative stencil computations in which each matrix element is updated based on the values of the neighboring elements. Such computations are often performed for solving partial differential equations, geometric modeling and image process- ing. Data dependence information required to automate the proposed techniques can be gathered by existing compiler analyses. We have implemented all the proposed techniques within the Panorama compiler. In order to evaluate their effectiveness, we applied the techniques to one well-known numerical computation kernel, Jacobi, and two application programs, tomcatv and swim, from the industrial SPEC95 benchmarks [20]. Overall our program transformation improves the execution speed by 9% to 164% on SGI sequential workstations. Statement Statement END DO Statement S 3 END DO Statement END DO END DO (a) Before transformation. (b) After transformation. Figure 1: A Trivial Imperfect Loop Nest Transformed into a Perfect Loop Nest. In this paper, we consider a uniprocessor computer with a memory hierarchy which includes cache memories at one or more levels. We assume that one of the caches is large enough to store a small number of columns of the considered arrays but not the whole arrays. The secondary caches in typical modern workstations satisfy this assumption and the techniques introduced in this paper aim to improve data reuse on such caches. The rest of the paper is organized as follows. In Section 2, we define a class of imperfectly-nested loops and present our tiling scheme to legally tile such loops. We also present our criteria to determine whether our tiling scheme is profitable. We further discuss techniques to improve profitability of our tiling scheme by loop preprocessing. In Section 3, we present our scheme of speculative execution to allow tiling when the time-step loop contains premature exits. In Section 4, we present experimental results. We discuss related work in Section 5 and conclude in Section 6. Tiling Imperfectly-Nested Loops In this section, we first use Jacobi as an example to give a basic idea of our tiling scheme for imperfectly- nested loops. We then define the class of loops to be handled by the scheme. After that, we present the scheme which legally tiles the imperfectly-nested loops and the criteria to determine whether such tiling END DO END DO END DO END DO END DO (a) Jocobi kernel code (b) Stencil illustration of Jacobi code J2 J2 J2 J2 J2 J2 flow dependence in backward direction along J1 & J2 flow dependence in straight or forward direction along J1 & J2 anti-dependence in backward direction along J1 & J2 anti-dependence in straight or forward direction along J1 & J2 output dependence in backward direction along J1 & J2 output dependence in straight or forward direction along J1 & J2 (c) Iteration Subspace and Dependences Figure 2: Code, Computation Stencil, Dependences and Iteration Subspace of Jacobi Kernel. is profitable. We then discuss techniques to improve the profitability of our tiling scheme by additional loop transformations. After analyzing the complexity of the compiler algorithms, we briefly discuss their extensions. 2.1 The Basic Idea In iterative numerical algorithms, the same array elements are usually accessed repeatedly in different time steps. If the number of array elements is large, then the cache will overflow, which requires the array elements to be fetched repeatedly to the cache in every time step. Using loop tiling, before the work in a time step finishes, the execution moves to the next time step to operate on the array elements recently refer- enced, which avoids cache overflow. The unfinished time step will continue at a later moment. Consider the Jacobi kernel shown in Figure 2(a), which has the convergence test removed to simplify the illustration. We can plot the iteration subspace for the T , J1 , and J2 loops as shown in Figure 2(c). Within each T iteration, complete execution of J1 and J2 loops requires accesses to nearly 2 \Theta (N \Gamma 1) 2 distinct array elements. With sufficiently large N , the cache will overflow, resulting cache misses in the next T itera- tion. To avoid overflow, we can partition the iteration subspace into tiles, as marked by the stair-case lines in Figure 2(c), which are executed in the order from top-left to bottom-right. A properly chosen tile size will make the number of memory locations accessed in each tile fit the cache. A reordered execution sequence is legal only if it satisfies the original data dependences. Figure 2(b) shows Jacobi's computation stencil. Figure 2(c) shows a subset of data dependences. The edges between the iteration points indicate flow, anti- and output dependences. We adopt a value-based definition of flow dependences [25] such that a flow dependence exists from statement S1 to statement S2 if the latter may use the value written by the former. We adopt the traditional definitions of anti- and output dependences [11]. An anti-dependence exists from S1 to S2 if the former should read from a memory location before it is overwritten by the latter. An output dependence exists from S1 to S2 if S2 may overwrite the memory written by S1 . One can similarly define dependences between two variable references, two loop iterations, two program segments and so on [25]. The key to our scheme for tiling imperfectly-nested loops is to find a uniform tile slope such that all flow dependences carried by T are satisfied and to find an offset for each tiled inner loop such that all flow dependences within the same T are also satisfied. The tile shape, as the result, guarantees that no flow dependences will exist from a later-executed tile to an earlier-executed tile. Anti- and output dependences which exist from later-executed tiles to earlier-executed ones can be eliminated by a technique called odd-even duplication of arrays. Unlike full array expan- sion, odd-even duplication will not unduly increase the working-set size which defeats locality. In Figure 2(c), the edge from node n1 to n2 is drawn solid if the J loop index value for n1 is greater than that of , and it is drawn dotted otherwise, where J stands for either J1 or J2 . Only the solid edges will affect the legal tile shape. One can see that a solid flow- dependence edge is within the same tile and that a solid anti-dependence edge may cross two neighboring tiles. However, as shown in Section 2.3, the latter can be removed by odd-even duplication. There exist no solid output dependence edges for Jacobi. 2.2 A Class of Imperfectly-Nested Loops Our general program model is presented in Figure 3(a). The T -loop body contains m J-loops, m - 1. Each J loop may contain arbitrary program constructs. Without loss of generality, all loops are assumed to have step 1. We require each loop J i to take the form of as the lower and upper bounds respectively, where L i and U i are T -invariants and b i is a nonnegative known constant. To make the presentation clean, ITMAX is assumed here to be an even number. We require that any read reference gets its value either always from the same T -iteration or END DO END DO END DO IF (MOD(T; 2):EQ:1) THEN END DO END DO END DO END DO END IF END DO (a) Program Model (b) After Odd-Even Array Duplication IF MOD(T; 2):EQ:1) THEN END DO END DO END DO END DO END IF END DO END DO (c) After Tiling Figure 3: Steps of Tiling an Imperfect Loop Nest always from the previous T -iteration. Hence, any flow dependence should have the distance of either 0 or 1 at loop level T . This is commonly true for the applications of our focus, which use iterative algorithms. Existing compiler techniques for array privatization can determine whether such a condition with flow dependences is satisfied (see [5] for a list of references). In the Jacobi code (Figure 2), read references to A always get the values from the previous T iteration except when which gives the distance 1. Read references to L always get their values from the same iteration, making the distance 0. In Figure 3(a), we assume that B always gets its value from the previous iteration. For simplicity of exposition, in this paper we consider tiling for J i loops only, 1 - i - m, even though they may contain inner loops. The techniques proposed here, however, can be extended to include loops within the J i loops, which will be briefly discussed in Section 2.6. Tth iteration Potential Reuse SLOPE (T+1)th iteration Loop Ji Loop Ji Figure 4: A Portion of A Tile to Illustrate Reuse 2.3 Algorithm for Tiling An Imperfect Loop Nest Given the loop nest in our program model, our goal is to transform it into the form shown in Figure 3(c), where, by the terms in [23], JJ is called the tile- controlling loop, and J i the tiled loops. For conve- nience, we call loop T the time-step loop. The J i loops are tiled with the size NSTEP, and in terms of Figure 2(c), NSTEP is the number of grid points for a tile in J1&J2 direction. SLOPE is the number of grid points by which the tile shifts to the left when the T-index increases by 1. Figure 4 illustrates two instances of loop J i , which shows the shape for a portion of a tile. The potential temporal reuse across T iterations is proportional to the value of NSTEP \Gamma SLOPE. Figure 5 shows the main steps in our tiling tech- nique. In the rest of this subsection, we present the compiler algorithms to implement these steps. 2.3.1 Constructing Subgraph The minimum legal SLOPE is constrained by data dependence distances. There exist extensive studies of the problem of computing the data dependence distance between a pair of array references with respect to their common enclosing loops [25]. Where such distance is not a constant, symbolic analysis can be performed to derive bounds on the distance values [3, 16, 7]. In current literatures, dependence distances are usually defined with respect to loops which contain both of the dependent references. For our program model, this would apply to loop T only. We slightly extend the definition to also include the J i loops. In our program model, suppose there exists a dependence from iteration (T 1 ,J 1 i ) to iteration k ), we say the dependence has a distance vector of specifically, we say the distance with respect to the ! J loops is J 2 i is negative, we say there exists a backward dependence w.r.t. the ! J Existing works on distance-computing cited above can readily be used to compute a lower bound and an upper bound for the distances defined above between references in the same or different J loops. We construct a dependence subgraph [11] for the loop nest in which each node represents a statement within one of the J i loops. Each edge represents a flow, an anti- or an output dependence. Multiple edges may exist from one node to another. Each edge is marked by ffl Construct the dependence subgraph. ffl Calculate the minimum slope. ffl Select the maximum legal tile size and test the profitability. ffl Perform array duplication. ffl Generate the tiled code. Figure 5: Main Steps to Tile a Loop Nest the distance vector (dT ,dJ ), where dT is the distance w.r.t. T and dJ is the lower bound estimated for the possible negative distances w.r.t. J i loops. All the dT values are grouped into three classes: 0, 1 and any value greater than 1. We will not differentiate different dT values which are greater than 1, but denote them as G1 equally. Recall that, in our program model, the flow dependence distance with respect to the T loop can only be 0 or 1. Hence, possible for anti- and output dependences only. If the distance w.r.t. J cannot be negative, then we let dJ be 0. For the Jacobi example (Figure 2), the dependence subgraph is shown in Figure 6(a), where S1 is the statement that computes L and S2 the one that computes A. For easy illustration, in Figure 6(a), we draw one edge to represent the same type of data dependences (flow, anti- or output) from one vertex to another, marking all possible dependence distance vectors. Since loop iterations must be executed in the lexicographical order, any flow dependence edge in the dependence subgraph whose vertices are in the same must have a distance vector (0; 0) or (1; dJ ), and any anti- or output dependence edge must have a distance vector (0; 0), (1; dJ ) or (G1 ; dJ ). If we have a group of anti- or output dependence edges with the same source, same target and same dJ value, then we delete all but one edge that has the minimum dT value. The tile shape determined by the remaining dependence edges will also satisfy the deleted ones. Furthermore, we can condense all the nodes (in the dependence subgraph) which belong to the same J i loop to a single node, resulting in a new graph defined below. This simplified graph filters out dependence information which is unimportant to our tiling scheme, thus improving the efficiency of graph traversal in our technique. Definition 2 The J-loop distance subgraph G l is a graph derived from the dependence subgraph Gd of the given loop nest which conforms to the program model such that 1. Each node J i in G l represents a J i loop in the given loop nest. 2. For each flow dependence edge in Gd with the distance vector (dT ; dJ ), with n1 in loop J i1 and n2 in loop J i2 , if J i1 and J i2 are different nodes in G l , add an edge in G l from J i1 to J i2 with the distance vector (dT ; dJ ). Otherwise, if J i1 and J i2 are the same and dT is J2 (b) (a) anti-dependence flow dependence dependence Figure The Dependence and J-loop Distance Subgraphs of Jacobi equal to 1, add an edge from J i1 to J i2 with the distance vector (dT ; dJ ). 3. For every two nodes n1 and in Gd such that there exist anti- dependence(s) from n1 to with n1 in loop J i1 and n2 in loop J i2 , consider all the anti-dependence edges from n1 to (a) Group the anti-dependence edges such that the edges belonging to the same group have the same dJ value. (b) For each group, take the minimum dT value, denoted as mindT . Add an edge from J i1 to J i2 with the distance vector (mindT 4. Process output dependences in Gd in the same way as in STEP 3.Note that in STEP 3(b), if to G l instead of (mindT ; dJ ). Although such an treatment can potentially produce an over-conservative tile shape, we do not expect cases. For Jacobi's dependence distance subgraph (Figure 6(a)), the J-loop distance subgraph is derived as shown in Figure 6(b). 2.3.2 Calculating Minimum Slope The following algorithms perform loop tiling based on the J-loop distance subgraph. The first algorithm computes the minimum legal tiling slope, SLOPE, and the offsets of J i loop bounds within the same tile. Algorithm 1 Compute the Minimum Legal Tiling Slope and the Offsets. Input: A loop nest, which conforms to our program model, and its J-loop distance subgraph G l . Output: SLOPE, the minimum legal slope for tiling, and the offset for each node in G l . Procedure: ffl STEP A: Compute the offset for every node in G l . - 1. Temporarily remove all anti- and output dependence edges and any edge with 1. - 2. For all nodes in G l without successors, - 3. If all the nodes in G l have been assigned offset values, go to 6. Otherwise, continue to 4. 4. Find any node u in G l whose successors assigned offset values. Each edge is annotated by 5. Go back to 3 - 6. Put all edges removed in Step A.1 back to G l . offset[u]ju; v are nodes in G l flow dependence edge with 1. gFor the Jacobi code (Figure 2(a)), after STEP A.1, there exists only one edge from J1 to J2 , with the distance vector (0; 0). After initializing offset[J2 ] to 0, we have offset[J1 which means that there is no need to adjust loop bounds for either J1 or J2 within the same T iteration. In STEP B, since there exist only two flow dependence edges (from J2 to J1) with 2.3.3 Selecting Tile Size Definition 3 We define WSet(x) as the maximum working set size of any single T iteration in the transformed code (Figure 3(c)), with In any single T iteration of the transformed code, the loop bounds of J i depend on the combination of JJ and T . WSet(x) takes the maximum working set from those produced by all JJ-T combinations. Since the code is yet to be transformed at this compilation stage, we estimate WSet(x) as MemCount i represents the number of different memory locations accessed in x iterations of loop J i . This estimation gives an upper-bound for WSet(x). MemCount i can be estimated during array data flow analysis by merging array regions accessed in each J i loop body [5]. Next, we determine the size of the tile. The objective is to maximize the tile size in order to maximize data reuse within the tile and to prevent anti- and output dependence from crossing backward more than one tile boundary, but the tile should not be so wide that its working set size exceeds the effective cache size [22]. Algorithm 2 Profitability Test and Tile Size Deter- mination Input: A loop nest which conforms to our program model, the J-loop distance subgraph G l , the SLOPE value computed by Algorithm 1, the given cache size CS and ff, the effective-cache factor 1 [22]. Output: The tile size, NSTEP, such that tiling is profitable, and a logical value PROFITABLE. Procedure: 1. If holds for some 1 - i - m, go to STEP 2. Otherwise return from the procedure. 2. Compute and then goto STEP 3. 3. If NSTEP - SLOPE, and return from the procedure. Otherwise, goto STEP 4. 4. Let ju; v are nodes in G l ; ! u; v ? is any anti- or output dependence edge with are nodes in G l ; ! u; v ? is any anti- or output dependence edge with 1.g. If NSTEP ! Otherwise, guarantees that there is an overlap of iteration points for at least one J i loop between adjacent T iterations, i.e., holds for at least one J i loop. STEP 2 guarantees the working set to fit in the effective cache. According to Figure 4, makes NSTEP large enough to allow potential temporal reuse across T iterations. STEP 4 prevents any anti- or output dependence from crossing backward more than one tile boundary. In Jacobi's J-loop distance subgraph (Figure 6(b)), there exist two anti- dependence edges with which have and respectively. Recall that offset[J1 There exist an anti-dependence edge and two output dependence edges with 2.3.4 Array Duplication The next algorithm determines whether any particular anti- or output dependence needs to be removed by duplication. Algorithm 3 Odd-Even Duplication Input: A loop nest which conforms to our program model, the J-loop distance subgraph G l and data flow upward-exposure information. Output: A loop nest with odd-even array duplication inserted (as shown in Figure 3(b)). Procedure: \Theta CS is called the effective cache size, determined by various system factors, which is recommended by the computer vendor based on empirical locality measurement. We chose our experiments. ffl STEP A: For every anti- or output dependence with the distance vector check to see whether (a) then there is no need for odd-even array dupli- cation, and the procedure returns. Otherwise, continue to STEP B. ffl STEP B: Duplicate the T -loop body and insert an IF-statement such that one copy of the loop body becomes the THEN branch and the other copy the ELSE branch. The THEN branch is executed in odd T -iterations and the ELSE branch in the even T -iterations, respectively. ffl STEP C: For each anti- or output dependence with the distance vector condition (a) or (b) in STEP A does not hold, identify the array , say A, which contributes to this dependence. Declare a copy of A. ffl STEP D: Assume A is an original array, and C its new copy. For each write reference to A in the THEN branch, change the referenced array name from A to C. For each read reference to A, if the value is from an odd T -iteration, change A to C. ffl STEP E: Insert proper initialization statements for the new copies of arrays. The regions to be initialized for each newly declared array are upwardly-exposed to the entry of the second T iteration.In the worst case all the arrays could be duplicated. In Jacobi's J-loop distance subgraph (Figure 6(b)), the anti-dependence from J1 to J2 with makes it necessary to duplicate A. The array regions are upwardly exposed to the entry of the second T iteration. Their initial values should be copied to the duplicates. 2.3.5 Tiled Code Generation Based on the calculation of SLOPE, NSTEP and offsets and the loop transformation performed in Algorithm 3, the following algorithm calculates the loop bounds of the tiled J i loops, the modified T loop and the new JJ loop in Figure 3(c). It also forms the loop body for each tiled J i loop. Algorithm 4 Tiled Code Generation Input: (1) The J-loop distance subgraph, G l , (2) SLOPE calculated in Algorithm 1 and NSTEP calculated in Algorithm 2, and (3) the loop nest updated in Algorithm 3, which is in the form shown in Figure 3(b). Output: A tiled loop nest. Procedure: END DO (a) END DO END IF END DO Figure 7: The Tiled J i Loop ffl For every J i loop, whose current loop bounds are respectively, replace the whole loop body by the code segment shown in Figure 7(b) if offset[J represents the original J i loop body except that the loop index variable J i is replaced by K i in ! BODYK i ?. If offset[J i loop body is replaced by the code segment shown in Figure 7(a). ffl The lower bound of JJ loop in the tiled loop nest is mg. The upper bound of JJ loop is mg. The lower bound of the new T loop is max(min fd The upper bound of the new T loop is c ITMAX).The proof of the correctness of Algorithm 4 is sketched in APPENDIX A. Figure 8 shows the Jacobi code transformed by Algorithm 4. Note that since offset[J1 the loop body in Figure 7(a) applies. The T loop can be further im- proved, shown in Figure 9, by loop fusion [14, 25] and forward substitution [2], assuming array L is dead at the exit of the whole loop nest. Improvement by such known techniques will not be discussed in details in this paper. 2.4 Techniques to Improve Profitability A number of compiler techniques can be applied to a given loop nest to shorten the backward dependence distances w.r.t. J i loops and hence to increase the profitability. We present two algorithms in this paper. The first one deals with the problem of incompatible J i loops. Take the example in Figure 10(a). There exists a flow dependence from J2 to J1 such that and hence 1. We say loops J1 and J2 are incompatible because their indices appear in different dimensions of array A. On the other hand, we say loops J1 and I2 are compatible because their END DO END DO IF (MOD(T; 2):EQ:1) THEN END DO END DO END DO END DO END DO END DO END DO END DO END IF END DO END DO Figure 8: Jacobi Kernel Transformed by Tiling with Odd-Even Duplication IF (MOD(T; 2):EQ:1) THEN END DO END DO END DO END DO END IF END DO Figure 9: Tiled Jacobi Kernel Improved by Simple Loop Fusion and Forward Substitution indices appear in the same array dimension. If loops J2 and I2 are permuted as shown in Figure 10(b), then the flow dependence from I2 to J1 has distance vector (1; 0), making the loop nest more profitable to tile. Similarly, loop I1 is said to be compatible with loop J2 and loop I1 and loop J1 can be permuted as shown in Figure 10(c). However, the cache-line spatial locality will suffer due to column-major memory allocation. Array A needs to be transposed [1, 8] in order to restore spatial locality. A formal definition of compatibility is given below. Definition 4 In the program model in Figure 3(a), suppose each J i loop contains s i inner loops, I i;1 , I i;2 , which are perfectly nested within J i from the outmost one to the innermost one. Denote J i by I i;0 . A compatible set is an (m 1)-tuple such that (1) c i is a nonnegative integer, and c m, should appear in the same dimension of some arDO END DO END DO END DO END DO END DO END DO END DO END DO END DO END DO END DO END DO END DO END DO END DO (a) (b) (c) Figure 10: A Example to Illustrate Compatible Set rays, and (3) type equals ROW (or COLUMN) if all the indices appear in the first (or second) dimension. We call this compatible set a row-compatible (or column- compatible) set, respectively. A 2-Dimensional array A is row-associated (or column-associated) with a row- compatible (or column-compatible) set if at least one loop index variable I i;c i in that set appears in the first (or second) dimension in some references to A. 2 The following algorithm checks to see if a combination of array transpose [1, 8] and loop permutation [25] can produce a loop nest which can be profitably tiled. Although there exists an exponential number of possible combinations of permutations of J i loops and array transpose, only a small number of them need to be considered in practice. Algorithm 5 Loop Permutation and Array Transpose to Improve Profitability Input: (1) A loop nest LP which conforms to our program model, (2) comSets, all the compatible sets for LP, (3) a boolean array Outmost Allowed [1 : and an array Perm[1 mg. Outmost Allowed [u][v] indicates whether loop Iu;v can become an outmost loop within the T loop after a legal permutation. If Outmost Allowed of such legal permutation vectors. Output: A transformed loop nest if the algorithm succeeds or the restored original loop nest if the algorithm aborts. Procedure: Profitable permutations are unlikely to exist */ for (each element cs =! c1 ; array transpose on those arrays row-associated with cs. if (Outmost Allowed [i][c i Perform the permutation specified by Perm[i][c applying Algorithm return the transformed loop nest. Undo the permutation and array transpose performed in the above. end for Abort. 2 In Jacobi code (Figure 2(a)), where we have two compatible sets, (0, 0, COLUMN) and (1, 1, ROW). In Figure 10(a), the compatible set (0,1,COLUMN) calls for permutation of loop I2 and loop J2 if Outmost Allowed [2][1] is TRUE. The compatible set (1,0,ROW) calls for transposing array A and permutation of I1 and J1 if Outmost Allowed[1][1] is TRUE. Next, we show that a known loop transformation called circular loop skewing [25] can be used to enhance the profitability of our tiling technique. For example, suppose the code skeleton in Figure 11(a) has a wrapped- around computation stencil which is typical for PDEs with circular boundary conditions. Its iteration sub-space is shown in Figure 11(b). Assume that, within the same time step T , (1) the jth iteration of loop J2 is flow-dependent on the (j \Gamma 1)th, jth and (j iterations of J1 for the first iteration of loop J2 is flow-dependent on the first, second and last iterations of J1 ; and (3) the last iteration of loop J2 is flow-dependent on the (N \Gamma 1)th, Nth and first iterations of J1 . Assume that the flow dependence from J2 to J1 has distance vector with all J i loops are free of loop-carried dependences. We can reduce SLOPE to 1 as follows. We change J2 's iteration order from (1; 2; for We also change J1 's iteration order from (1; 2; to and so on. Such a transformation will eliminate all the backward dependences with resulting in The following algorithm formalizes the circular loop skewing (CLS) technique for profitability enhancement, which circularly skews the bounds of every J i loop to shorten backward distances. It calls the procedure Find CLS Parameter to eliminate all the backward dependences whose distances are less than - in a given loop nest LP. Find CLS Parameter returns ffi, the skewing amount for every J i loop between adjacent T iterations. It also marks fi i , 1 - i - m, on node J i in the J-loop distance subgraph G l , where fi i is the initial skewing amount for each J i when Algorithm 6 Circular Loop Skewing to Shorten Backward Dependences Input: A loop nest LP, which conforms to our program model except that the J i loop index should have the form of L i and U i which are T -invariant, its J-loop distance subgraph G l , the real cache size CS and the effective cache size factor ff. Further, every loop is assumed free of loop-carried dependences. Output: A transformed loop nest if successful. Procedure: Calculate CSg. END DO END DO END DO J2 J2 END DO END DO END DO J2 J2 (a) (b) (c) (d) Figure 11: A Sample Example Transformed by Algorithm Original Loop Nest Skeleton, (b) Simplified Iteration Space Graph before Transformation, (c) Transformed Loop Nest Skeleton, (d) Simplified Iteration Space Graph after Transformation (The code of procedure Find CLS Parameter is presented in APPENDIX B.) for (each J i loop) Assume the lower and upper loop bounds of J i are L i and U i respectively. Change the loop bounds to an assignment J at the beginning of the J i loop body. end for Apply Algorithm 2 to the transformed loop nest. return the transformed loop nest. else Abort. Figure 11(c) shows the transformed code for Figure 11(a) after applying Algorithm 6. Figure 11(d) shows its corresponding iteration subspace. Suppose Procedure Find CLS Parameter performs the following: (1) Initialize Remove all the edges with l . (3) For J1 , since it does not have any predecessors, do nothing. (4) For J2 , increment fi 2 by 1 so the backward dependence distance Restore all the edges with back to G l . (6) After processing the edges with 2.5 Complexity Analysis The construction of the J-loop distance subgraph requires information on array dataflow and dependence distances, which, in the worst case, requires exponential time to compute. However, in practice, such information can be obtained by efficiently implemented schemes (see [5, 25] for a list of references). Algorithm 2 is dominated by working-set computation, which requires array region union operations. Such operations are simpler than constructing the J-loop distance subgraph. Given a J-loop distance subgraph G l = (V; E), Algorithm 1 takes O(jV In Algorithm 3, finding the arrays to be duplicated needs O(jV time and renaming the references takes time proportional to the loop body size. Algorithm 4 takes time multiplied by the loop body size. Algorithm 5 theoretically takes O( by the loop body size. (m and s i are small in practice.) For Algorithm 6, procedure Find CLS Parameter has the worst-case time of O(jV jjEj 2 ). 2.6 Discussion Our techniques can be extended to tile the inner loops within J i loops. Here we take one loop level below J i as an example. With this extension, each J i loop has a perfectly nested inner loop, I i , which has lower bound and upper bound U 0 are both T -invariant and J i -invariant, and c i is a known nonnegative constant. The following changes should be made over previous definitions and algorithms. needs to be extended such that the distance vector is a triple (dT , dJ , dI ) instead of a pair (dT , dJ ). Definition 2 should be extended such that each edge in G l is marked with the new distance vector. Algorithm 1 now computes SLOPEJ and SLOPEI for J i loops and I i loops respectively. Also it needs to annotate G l with offset J and offset I for J i and I i loops respectively. Algorithms 2 now computes NSTEPJ and NSTEPI for J i and I i loops respectively. Definition 3 is extended to define WSet(x;y), x for NSTEPJ and y for NSTEPI . In the new Algorithm 2, we check to see whether WSet(NSTEPJ , fNSTEP I g. If this is true, then we increase NSTEPJ to max fx j WSet(x; NSTEPI ) - ff CSg. ffl Algorithm 3 now duplicates A if condition (a) or (b) is TRUE for either J i or I i . Algorithm 4 needs to generate correct loop bounds for II, I i , in addition to JJ, J i and T . 3 Tiling with Speculative Execution In numerical programs using iterative methods, there often exist convergence tests which may cause the maximum iteration count not to be reached. To enable our tiling algorithms presented above, we present an algorithm to partition the maximum iteration counts END DO END DO GOTO next END IF END DO next: (a) Extended Program Model A chunk from plus exit condition in each T iteration END IF END DO next: (b) Code with Iteration Chunks Initialize B to A. Execute the tiled chunk from to IF (ECOND.EQ.TRUE) THEN GO TO rollback Copy A(or its odd copy C) to backup copy B. IF (ACCUM:EQ:ITMAX) THEN GOTO next END IF END DO GO TO next roolback: Restore A from backup copy B. Execute the original loop nest (Figure 12(a)) from next: (c) Tiled and Speculated Code Figure 12: Tiling with Speculative Execution into chunks such that the exit condition is tested after the execution of a chunk of T -iterations instead of one T -iteration. We then tile the individual chunks. In case of overshooting some T -iterations, the execution is rolled back. In the speculative code, IF statements must be inserted to guard against potential exceptions such as overflow and divided-by-zero. If a possibility of exceptions is detected, the execution rolls back to the latest checkpoint. The model defined in Section 2.2 is hence extended to include a loop exit test, as shown in Figure 12(a). The exit condition can only reference the variables defined either within the same T -iteration or outside the T -loop, and it should not be the source of any T -carried flow dependences. The following algorithm implements the above idea. Algorithm 7 Tiling with Speculative Execution Input: A loop nest which conforms to the program model shown in Figure 12(a). Output: A tiled loop nest. Procedure: ffl STEP A: Estimate the chunk size, LMAX. ffl STEP B: Block the T -loop in Figure 12(a) into chunks of size LMAX as shown in Figure 12(b). ffl STEP C: Tile the chunk using Algorithm 4. ffl STEP D: Transform the loop nest into one shown in Figure 12(c) where the arrays referenced by exit condition are renamed (which is similar to renaming in Algorithm 3).In the transformed code, for every array A which is the source of T -carried flow dependences, we create a backup copy, B, which is an identical copy of A initially. Variable ACCUM accumulates the total T - iterations executed so far. In every iteration of the outmost DO loop, after executing the tiled program with LMAX steps, the condition for rollback is checked. If the execution must rollback, the values stored in B are restored and the computation resumes from the beginning of the (ACCUM+1)th T -iteration, which is the latest checkpoint. Otherwise, A (or its odd copy C) is copied to the backup copy B. If the execution reaches the ITMAXth T -iteration, the outmost DO loop terminates. The tradeoff between the over-shooting cost, the checkpointing overhead and the performance gain by tiling can be reasoned as follows. Let s be the original execution time per time step and let fLMAX be the speedup per time step due to tiling, which accounts for checkpointing overhead amortized over LMAX time steps. Assume that originally it takes T steps to converge. Since we incur a penalty of LMAX iterations when rollback occurs, tiling with speculation will gain in performance if and only if that is, total We currently use the formula e, which equals the estimated time steps per tile, given tile size NSTEP. (In future work, one can certainly experiment with other formulas. For instance, LMAX may vary at distinct computation stages.) In Section 4 we can see that the gain from cache temporal reuse outweighs the loss due to checkpointing and over-shooting. 4 Experimental Evaluation We have implemented our techniques in Panorama compiler [5]. We apply our algorithms to one well-known numerical kernel, Jacobi with convergence test and two SPEC95 benchmarks tomcatv and swim, which run on two SGI uniprocessor workstations, one based on a MIPS R5K processor and the other based on a MIPS R10K. The R5K processor has a 32KB 2-way data cache and 512KB 2-way unified L2 cache. The R10K processor also has a 32KB 2-way L1 data cache, but a 2MB 2-way unified L2 cache. Moreover, the MIPS R10K performs out-of-order instruction ex- ecution, provides data prefetching instructions, and permits multiple pending cache misses. The native compiler is MIPSPro F77 compiler. In all the experiments on the original code and on the peel-and-fused code, we turn on the "-O3" switch which enables a number of loop transformations including interchange, fusion, fission and tiling. For the code generated by our techniques, "-O2" and "-O3" delivers nearly the same performance. (we show "-O2" results here). The original tomcatv and swim programs fail the profitability test. We apply Algorithms 5 and 6 to these two programs before taking the general steps shown in Figure 5. Algorithm 5 finds that tomcatv can be made profitable for tiling by loop permutation and array transpose. Algorithm 6 finds that swim can be made profitable by circular loop skewing. Algorithm 7 applies to Jacobi and tomcatv. (The swim program does not have exit conditions in the time-step loop.) Jacobi code is also further optimized by forward substitution Figure 9). The Jacobi Program We fixed ITMAX to 100 and vary the input matrix size arbitrarily. Based on Algorithm 2, NSTEP is derived as 10, 9 and 7 respectively for and 1279 on the R5K-based workstation. For the same matrix sizes on the R10K-based workstations, NSTEP is derived as 44, 37 and 30 respectively. Table 1 shows the performance results for the original program, peel-and-fusion and the program tiled with Algorithm 4, marked as "Tiling w/ Array Dup. Although based on our tiling technique, array A is dupli- cated, as shown in Figure 8, array L is eliminated after forward substitution (Figure 9), giving no increase of memory usage. For the peel-and-fusion scheme, we manually apply the methods presented in LRW [12] and TSS [6] to choose the tile size with both the real cache size and effective cache size [22]. The best of these four schemes, which gives shortest execution time, is chosen to evaluate peel-and-fusion. From Table 1, tiling with odd-even duplication always performs better than peel- and-fusion. It improves the performance by 70% to 84% in R5K and by 159% to 164% in the R10K over the original code. The tomcatv Program Among the 7 N-by-N arrays in tomcatv, two arrays, are duplicated, increasing the memory usage by 29%. NSTEP equals 5 and 21 for the R5K- and the R10K-based workstations respectively. With the reference input data, tomcatv always runs to the maximum time step, i.e., 750. In order to measure the potential overhead of rollback, we alter the convergence test to trigger rollback for comparison. Different convergence tests result in different number of -iterations executed, both for the untransformed and the transformed programs. The execution time of different versions of tomcatv on the R5K is shown in Table 2, where "Iter. Orig." means the number Table 2: Execution Time (in Seconds) of tomcatv on R5K with Various Convergence Tests Iter. Orig. Iter.Trans. Exec. time Orig. Time Speedup 43 199 204 175 207 1.18 731 736 593 717 1.28 Table 3: Execution Time(in Seconds) of swim Test Exec. Time Speedup Exec. Time Speedup Orig. Prog. 326.85 1.00 625 1.00 Trans. Prog. 215.01 1.52 573 1.09 of T iterations executed in the untransformed code, and "Iter. Trans." means the number of T iterations executed in the transformed code before rolling back. The chunk size LMAX is 5 based on our heuristic. When rollback happens we always incur a penalty of LMAX iterations. However, except for those cases which converge very fast, we still get steady speedup which is up to 1.28. When there is no rollback (the T -loop bound 750 is reached), the speedup is 1.69. On the R10K the original program executes for 366 seconds. The transformed program takes 288 seconds, a speedup of 1.27. With the convergence test altered, the performance comparison is similar to that on the R5K. We also run tomcatv with peel-and-fusion, with which the transformed code takes 649 and 306 seconds on the R5K and the R10K and achieves a speedup of 1.13 and 1.19 respectively over the original program. The swim Program are duplicated for swim. NSTEP equals 5 and 22 for the R5K and the R10K respectively. The performance results are shown in Table 3, where "Orig. Prog." stands for the original program, and "Trans. Prog." represents the transformed program. The R5K has a smaller L2 cache and therefore a smaller which results in less overlap of iteration points between adjacent T iterations within a tile, thus yielding a lower speedup. Peel-and-fusion does not apply directly to swim due to long backward dependence distances. On the R10K, in addition to execution time, we also measure the secondary cache misses using perfex library based on R10K performance counters. Table 4 shows the result where 'LS' stands for the number of dynamic load-store instructions, 'SM' for the number of misses for the secondary cache, and 'MR' for the secondary cache miss ratio. In Jacobi, even with checkpointing, the number of dynamic load-store instructions are reduced due to forward substitution. Table 1: Execution Time (in Seconds) of Different Versions of Jacobi Different Scheme Matrix Size for R5K Matrix Size for R10K Original Time 46 68 102 24.43 44.65 52.93 Peel-and-fusion Time 37 50 82 17.08 27.23 35.76 Tiling w/ Array Dup. Time 25 38 We believe that the difference in the number of load-store instructions between the original code and the peel-and-fusion code is due to the slightly more memory optimization opportunities for the native compiler after peel-and-fusion. For tomcatv, the number of load-store instructions is increased by our technique due to periodical checkpointing. In swim, the added number of load-store instructions is from the expansion of some arrays to make the program conforming to our program model. In all five cases the secondary cache miss rate is dramatically reduced. The gain in temporal locality across T iterations overcomes the loss of more memory instructions, thus improving the overall performance. During the experiments, we applied inter-variable padding (similar to the scheme in [18]) to the tiled swim. This padding reduces cache set conflicts, hence improving speedup from 1.08 to 1.52. We also applied inter-variable padding to all three original programs, but without noticeable performance gain. This is because cache overflow in the original program dominates the performance. 5 Related Work Kodukula et al. propose data shackling [9], which blocks the arrays based on data flow analysis and then forms new loop nests to compute block by block. Although it can tackle certain imperfectly-nested loops, their method does not apply to the stencil computations handled in our work, because updating one block will destroy the boundary data necessary for its adjacent blocks. Manjikian et al. present peel-and-fusion [13]. Their method can partially fuse the adjacent loops within the same T loop and tile the fused loops, but it only exploits locality within the same T loop iteration. Our Algorithm 1 bears some similarity to their peel-factor computation, but they consider dependences within the same T -iteration only, while we further consider dependences across T -iterations. Kodukula and Pingali propose a matrix-based frame-work to represent transformations of imperfectly-nested loops [10] including permutation, reversal, skewing, scaling, alignment, distribution and jamming. Their work does not apply to tiling. Strout et al. discusses the minimum storage requirement to allow flexible loop scheduling such as tiling [21]. Their method does not deal with the imperfectly nested loops handled by our work. Collard proposes a method to speculatively execute while-loops on parallel machines [4]. His objective is to increase parallel process utilization while ours is to tile loops for better memory performance on uniprocessors. We use quite different algorithms. Pugh et al. present a method to handle exit conditions for iterative application in parallel environment [17]. Both works by Collard and by Pugh et al. present interesting ideas to handle loop exit condi- tions, which may be incorporated in our future work. McCalpin and Wonnacott develop a scheme called time skewing, which adopts a value-based flow analysis to optimize for memory locality [15]. Their method first performs full array expansion and forward sub- stitution, and then recompresses the expanded array while preserving data dependences. Their method handles a subset of the imperfectly-nested loops represented by our program model. 6 Conclusion and Future Work In this paper, we have presented new techniques to tile nontrivial imperfectly-nested loops. We handle a class of imperfectly-nested loops which seem quite general in scientific computing. We develop two algorithms to shorten backward dependence distances so as to improve profitability. We also extend our program model to handle exit conditions, which are common in iterative algorithms. We implement our techniques in a Fortran source-to-source compiler, Panorama [5]. Preliminary experimental results show the transformed programs run faster by 9% to 164% than those only optimized by the native compiler. This work has opened several interesting subjects for our future work. The most important ones include the application of the idea of speculative execution to other locality-enhancement techniques and a study of the effect of aggressive locality-enhancement algorithms on the effective cache size. Acknowledgement We thank Chau-Wen Tseng for his careful review before this paper is finalized. --R Data and computation transformations for multiprocessors. Compiler transformations for high-performance comput- ing Symbolic range propa- gation Experience with efficient array data flow analysis for array privatization. Tile size selection using cache organization and data layout. Symbolic Dependence Analysis for High Performance Parallelizing Compilers. A matrix-based approach to the global locality optimization problem Transformations of imperfectly nested loops. The Structure of Computers and Computations The cache performance and optimizations of blocked algorithms. Fusion of loops for parallelism and locality. Improving data locality with loop transformations. Time Skewing: A Value-Based Approach to Optimizing for Memory Local- ity A Practical Algorithm for Exact Array Dependence Analysis. Exploiting Monotone Convergence Functions in Parallel Programs. Eliminating Conflict Misses for High Performance Architectures. Standard Performance Evaluation Corporation Combining loop transformations considering caches and scheduling. Improving Locality and Parallelism in Nested Loops. A data locality optimizing algorithm. High Performance Compilers for Parallel Computing. --TR The cache performance and optimizations of blocked algorithms A data locality optimizing algorithm A practical algorithm for exact array dependence analysis Improving locality and parallelism in nested loops Instruction-level parallel processing Compiler transformations for high-performance computing Tile size selection using cache organization and data layout Improving data locality with loop transformations Exploiting monotone convergence functions in parallel programs Combining loop transformations considering caches and scheduling Fusion of Loops for Parallelism and Locality multi-level blocking Experience with efficient array data flow analysis for array privatization Eliminating conflict misses for high performance architectures Schedule-independent storage mapping for loops Transformations for imperfectly nested loops Structure of Computers and Computations Symbolic range propagation A Matrix-Based Approach to the Global Locality Optimization Problem --CTR Claudia Leopold, On optimal temporal locality of stencil codes, Proceedings of the 2002 ACM symposium on Applied computing, March 11-14, 2002, Madrid, Spain Nawaaz Ahmed , Nikolay Mateev , Keshav Pingali, Synthesizing Transformations for Locality Enhancement of Imperfectly-Nested Loop Nests, International Journal of Parallel Programming, v.29 n.5, p.493-544, October 2001 Shoaib Kamil , Kaushik Datta , Samuel Williams , Leonid Oliker , John Shalf , Katherine Yelick, Implicit and explicit optimizations for stencil computations, Proceedings of the 2006 workshop on Memory system performance and correctness, October 22-22, 2006, San Jose, California David Wonnacott, Achieving Scalable Locality with Time Skewing, International Journal of Parallel Programming, v.30 n.3, p.181-221, June 2002 Roger Espasa , Federico Ardanaz , Joel Emer , Stephen Felix , Julio Gago , Roger Gramunt , Isaac Hernandez , Toni Juan , Geoff Lowney , Matthew Mattina , Andr Seznec, Tarantula: a vector extension to the alpha architecture, ACM SIGARCH Computer Architecture News, v.30 n.2, May 2002 Guohua Jin , John Mellor-Crummey, Experiences tuning SMG98: a semicoarsening multigrid benchmark based on the hypre library, Proceedings of the 16th international conference on Supercomputing, June 22-26, 2002, New York, New York, USA Jingling Xue , Wentong Cai, Time-minimal tiling when rise is larger than zero, Parallel Computing, v.28 n.6, p.915-939, June 2002 J. Hu , M. Kandemir , N. Vijaykrishnan , M. J. Irwin, Analyzing data reuse for cache reconfiguration, ACM Transactions on Embedded Computing Systems (TECS), v.4 n.4, p.851-876, November 2005 Guohua Jin , John Mellor-Crummey , Robert Fowler, Increasing temporal locality with skewing and recursive blocking, Proceedings of the 2001 ACM/IEEE conference on Supercomputing (CDROM), p.43-43, November 10-16, 2001, Denver, Colorado Steve Carr , Soner nder, A case for a working-set-based memory hierarchy, Proceedings of the 2nd conference on Computing frontiers, May 04-06, 2005, Ischia, Italy Nawaaz Ahmed , Nikolay Mateev , Keshav Pingali, Synthesizing transformations for locality enhancement of imperfectly-nested loop nests, Proceedings of the 14th international conference on Supercomputing, p.141-152, May 08-11, 2000, Santa Fe, New Mexico, United States Induprakas Kodukula , Keshav Pingali, Data-Centric Transformations for Locality Enhancement, International Journal of Parallel Programming, v.29 n.3, p.319-364, June 2001 Nawaaz Ahmed , Nikolay Mateev , Keshav Pingali, Tiling imperfectly-nested loop nests, Proceedings of the 2000 ACM/IEEE conference on Supercomputing (CDROM), p.31-es, November 04-10, 2000, Dallas, Texas, United States Gabriel Rivera , Chau-Wen Tseng, Locality optimizations for multi-level caches, Proceedings of the 1999 ACM/IEEE conference on Supercomputing (CDROM), p.2-es, November 14-19, 1999, Portland, Oregon, United States Qing Yi , Vikram Adve , Ken Kennedy, Transforming loops to recursion for multi-level memory hierarchies, ACM SIGPLAN Notices, v.35 n.5, p.169-181, May 2000 Naraig Manjikian , Tarek S. Abdelrahman, Exploiting Wavefront Parallelism on Large-Scale Shared-Memory Multiprocessors, IEEE Transactions on Parallel and Distributed Systems, v.12 n.3, p.259-271, March 2001 Yonghong Song , Rong Xu , Cheng Wang , Zhiyuan Li, Data locality enhancement by memory reduction, Proceedings of the 15th international conference on Supercomputing, p.50-64, June 2001, Sorrento, Italy Kristof Beyls , Erik H. D'Hollander, Intermediately executed code is the key to find refactorings that improve temporal data locality, Proceedings of the 3rd conference on Computing frontiers, May 03-05, 2006, Ischia, Italy A. Ya. Kalinov , A. L. Lastovetsky , I. N. Ledovskikh , M. A. Posypkin, Compilation of Vector Statements of C[] Language for Architectures with Multilevel Memory Hierarchy, Programming and Computing Software, v.27 n.3, p.111-122, May-June 2001 Sriram Krishnamoorthy , Muthu Baskaran , Uday Bondhugula , J. Ramanujam , Atanas Rountev , P Sadayappan, Effective automatic parallelization of stencil computations, ACM SIGPLAN Notices, v.42 n.6, June 2007 Jonathan Weinberg , Michael O. McCracken , Erich Strohmaier , Allan Snavely, Quantifying Locality In The Memory Access Patterns of HPC Applications, Proceedings of the 2005 ACM/IEEE conference on Supercomputing, p.50, November 12-18, 2005 Gabriel Rivera , Chau-Wen Tseng, Tiling optimizations for 3D scientific computations, Proceedings of the 2000 ACM/IEEE conference on Supercomputing (CDROM), p.32-es, November 04-10, 2000, Dallas, Texas, United States Y. Charlie Hu , Alan Cox , Willy Zwaenepoel, Improving fine-grained irregular shared-memory benchmarks by data reordering, Proceedings of the 2000 ACM/IEEE conference on Supercomputing (CDROM), p.33-es, November 04-10, 2000, Dallas, Texas, United States Michelle Mills Strout , Larry Carter , Jeanne Ferrante , Barbara Kreaseck, Sparse Tiling for Stationary Iterative Methods, International Journal of High Performance Computing Applications, v.18 n.1, p.95-113, February 2004 Chung-hsing Hsu , Ulrich Kremer, A Quantitative Analysis of Tile Size Selection Algorithms, The Journal of Supercomputing, v.27 n.3, p.279-294, March 2004 Martha Mercaldi , Steven Swanson , Andrew Petersen , Andrew Putnam , Andrew Schwerin , Mark Oskin , Susan J. Eggers, Instruction scheduling for a tiled dataflow architecture, ACM SIGOPS Operating Systems Review, v.40 n.5, December 2006 Karin Hgstedt , Larry Carter , Jeanne Ferrante, On the Parallel Execution Time of Tiled Loops, IEEE Transactions on Parallel and Distributed Systems, v.14 n.3, p.307-321, March Venkata K. Pingali , Sally A. McKee , Wilson C. Hseih , John B. Carter, Computation regrouping: restructuring programs for temporal data cache locality, Proceedings of the 16th international conference on Supercomputing, June 22-26, 2002, New York, New York, USA Chen Ding , Maksim Orlovich, The Potential of Computation Regrouping for Improving Locality, Proceedings of the 2004 ACM/IEEE conference on Supercomputing, p.13, November 06-12, 2004 Swarup Kumar Sahoo , Sriram Krishnamoorthy , Rajkiran Panuganti , P. Sadayappan, Integrated Loop Optimizations for Data Locality Enhancement of Tensor Contraction Expressions, Proceedings of the 2005 ACM/IEEE conference on Supercomputing, p.13, November 12-18, 2005 Venkata K. Pingali , Sally A. McKee , Wilson C. Hsieh , John B. Carter, Restructuring computations for temporal data cache locality, International Journal of Parallel Programming, v.31 n.4, p.305-338, August Abdel-Hameed A. Badawy , Aneesh Aggarwal , Donald Yeung , Chau-Wen Tseng, Evaluating the impact of memory system performance on software prefetching and locality optimizations, Proceedings of the 15th international conference on Supercomputing, p.486-500, June 2001, Sorrento, Italy D. Cociorva , J. W. Wilkins , C. Lam , G. Baumgartner , J. Ramanujam , P. Sadayappan, Loop optimization for a class of memory-constrained computations, Proceedings of the 15th international conference on Supercomputing, p.103-113, June 2001, Sorrento, Italy Jingling Xue , Xavier Vera, Efficient and Accurate Analytical Modeling of Whole-Program Data Cache Behavior, IEEE Transactions on Computers, v.53 n.5, p.547-566, May 2004 Sandhya Krishnan , Sriram Krishnamoorthy , Gerald Baumgartner , Chi-Chung Lam , J. Ramanujam , P. Sadayappan , Venkatesh Choppella, Efficient synthesis of out-of-core algorithms using a nonlinear optimization solver, Journal of Parallel and Distributed Computing, v.66 n.5, p.659-673, May 2006 Zhiyuan Li , Yonghong Song, Automatic tiling of iterative stencil loops, ACM Transactions on Programming Languages and Systems (TOPLAS), v.26 n.6, p.975-1028, November 2004 Chen Ding , Ken Kennedy, Improving effective bandwidth through compiler enhancement of global cache reuse, Journal of Parallel and Distributed Computing, v.64 n.1, p.108-134, January 2004
optimizing compilers;caches;loop transformations
301669
A Modified Cholesky Algorithm Based on a Symmetric Indefinite Factorization.
Given a symmetric and not necessarily positive definite matrix A, a modified Cholesky algorithm computes a Cholesky factorization permutation matrix and E is a perturbation chosen to make A+E positive definite. The aims include producing a small-normed E and making A+E reasonably well conditioned. Modified Cholesky factorizations are widely used in optimization. We propose a new modified Cholesky algorithm based on a symmetric indefinite factorization computed using a new pivoting strategy of Ashcraft, Grimes, and Lewis. We analyze the effectiveness of the algorithm, both in theory and practice, showing that the algorithm is competitive with the existing algorithms of Gill, Murray, and Wright and Schnabel and Eskow. Attractive features of the new algorithm include easy-to-interpret inequalities that explain the extent to which it satisfies its design goals, and the fact that it can be implemented in terms of existing software.
Introduction . Modified Cholesky factorization is a widely used technique in optimization; it is used for dealing with indefinite Hessians in Newton methods [11], [21] and for computing positive definite preconditioners [6], [20]. Given a symmetric matrix A, a modified Cholesky algorithm produces a symmetric perturbation E such that A + E is positive definite, along with a Cholesky (or LDL T ) factorization of A+E. The objectives of a modified Cholesky algorithm can be stated as follows [21]. O1. If A is "su#ciently positive definite" then E should be zero. O2. If A is indefinite, #E# should not be much larger than positive definite } for some appropriate norm. O3. The matrix should be reasonably well conditioned. O4. The cost of the algorithm should be the same as the cost of standard Cholesky factorization to highest order terms. Two existing modified Cholesky algorithms are one by Gill, Murray, and Wright [11, section 4.4.2.2], which is a refinement of an earlier algorithm of Gill and Murray [10], and an algorithm by Schnabel and Eskow [21]. The purpose of this work is to propose an alternative modified Cholesky algorithm that has some advantages over the existing algorithms. In outline, our approach is to compute a symmetric indefinite factorization # Received by the editors April 26, 1996; accepted for publication (in revised form) by P. Gill June 4, 1997; published electronically July 17, 1998. The research of the second author was supported by Engineering and Physical Sciences Research Council grant GR/H/94528. http://www.siam.org/journals/simax/19-4/30289.html Department of Mathematics, University of Manchester, Manchester, M13 9PL, England (chengsh@ma.man.ac.uk, na.nhigham@na-net.ornl.gov). where P is a permutation matrix, L is unit lower triangular, and D is block diagonal with diagonal blocks of dimension 1 or 2, and to provide the factorization where F is chosen so that D + F (and hence also A + E) is positive definite. 1 This approach is not new; it was suggested by Mor-e and Sorensen [19] for use with factorizations computed with the Bunch-Kaufman [3] and Bunch-Parlett [4] pivoting strategies. However, for neither of these pivoting strategies are all the conditions satisfied, as is recognized in [19]. The Bunch-Parlett pivoting strategy requires O(n 3 ) comparisons for an n-n matrix, so condition (O4) does not hold. For the Bunch-Kaufman strategy, which requires only O(n 2 ) comparisons, it is di#cult to satisfy conditions (O1)-(O3), as we explain in section 3. We use a new pivoting strategy for the symmetric indefinite factorization devised by Ashcraft, Grimes, and Lewis [2], for which conditions (O1)-(O3) are satisfied to within factors depending only on n and for which the cost of the pivot searches is usually negligible. We describe this so-called bounded Bunch-Kaufman (BBK) pivoting strategy and its properties in the next section. There are two reasons why our algorithm might be preferred to those of Gill, Mur- ray, and Wright and of Schnabel and Eskow (henceforth denoted the GMW algorithm and the SE algorithm, respectively). The first is a pragmatic one: we can make use of any available implementation of the symmetric indefinite factorization with the BBK pivoting strategy, needing to add just a small amount of post-processing code to form the modified Cholesky factorization. In particular, we can use the e#cient implementations for both dense and sparse matrices written by Ashcraft, Grimes, and Lewis [2], which make extensive use of levels 2 and 3 BLAS for e#ciency on high-performance machines. In contrast, in coding the GMW and SE algorithms one must either begin from scratch or make nontrivial changes to an existing Cholesky factorization code. The second attraction of our approach is that we have a priori bounds that explain the extent to which conditions (O1)-(O3) are satisfied-essentially, if L is well conditioned then an excellent modified Cholesky factorization is guaranteed. For the GMW and SE algorithms it is di#cult to describe under what circumstances the algorithms can be guaranteed to perform well. 2. Pivoting strategies. We are interested in symmetric indefinite factorizations computed in the following way. If the symmetric matrix A # R n-n is nonzero, we can find a permutation # and an integer so that with Having chosen such a # we can factorize I n-s # . Strictly, (1.2) is not a Cholesky factorization, since we allow D + F to have 2 - 2 diagonal blocks, but since any such blocks are positive definite it seems reasonable to use the term "modified MODIFIED CHOLESKY ALGORITHM 1099 This process is repeated recursively on the (n - s) - (n - s) Schur complement yielding the factorization (1.1) on completion. This factorization costs n 3 /3 operations (the same cost as Cholesky factorization of a positive definite matrix) plus the cost of determining the permutations #. The Bunch-Parlett pivoting strategy [4] searches the whole submatrix S at each stage, requiring a total of O(n 3 ) comparisons, and it yields a matrix L whose maximum element is bounded by 2.781. The Bunch-Kaufman pivoting strategy [3], which is used with the symmetric indefinite factorization in both LAPACK [1] and LINPACK [7], searches at most two columns of S at each stage, so it requires only O(n 2 ) comparisons in total. The Bunch-Kaufman pivoting strategy yields a backward stable factorization [16], but #L# is unbounded, even relative to #A# , which makes this pivoting strategy unsuitable for use in a modified Cholesky algorithm, for reasons explained in section 3. To describe the BBK pivoting strategy [2] it su#ces to describe the pivot choice for the first stage of the factorization. Algorithm BBK (BBK pivoting strategy). This algorithm determines the pivot for the first stage of the symmetric indefinite factorization applied to a symmetric matrix A # R n-n . maximum magnitude of any subdiagonal entry in column 1. there is nothing to do on this stage of the factorization. if |a 11 | # 1 use a 11 as a 1 - 1 pivot else repeat r := row index of first (subdiagonal) entry of maximum magnitude in column i. # r := maximum magnitude of any o#-diagonal entry in column r. if |a rr | # r use a rr as a 1 - 1 pivot rows and columns 1 and r). else if # use # a ii a ri a ri a rr # as a 2 - 2 pivot columns 1 and i, and 2 and r). else until a pivot is chosen The repeat loop in Algorithm BBK searches for an o#-diagonal element a ri that is simultaneously the largest in magnitude in the rth row and the ith column, and it uses this element to build a 2 - 2 pivot; the search terminates prematurely if a suitable The following properties noted in [2] are readily verified, using the property that any 2 - 2 pivot satisfies # a ii a ri a ri a rr # . 1. Every entry of L is bounded by max{1/(1 - #), 1/# 2.78. 2. Every 2 - 2 pivot block D ii satisfies # 2 (D ii 3. The growth factor for the factorization, defined in the same way as for Gaussian elimination, is bounded in the same way as for the Bunch-Kaufman pivoting strategy, namely, by (1 Since the value of # i increases strictly from one pivot step to the next, the search in Algorithm BBK takes at most n steps. The cost of the searching is intermediate between the cost for the Bunch-Kaufman strategy and that for the Bunch-Parlett strategy. Matrices are known for which the entire remaining submatrix must be searched at each step, in which case the cost is the same as for the Bunch-Parlett strategy. However, Ashcraft, Grimes, and Lewis [2] found in their numerical experiments that on average less than 2.5k comparisons were required to find a pivot from a k -k submatrix, and they give a probabilistic analysis which shows that the expected number of comparisons is less than ek # 2.718k for matrices with independently distributed random elements. Therefore we regard the symmetric indefinite factorization with the BBK pivoting strategy as being of similar cost to Cholesky factorization, while recognizing that in certain rare cases the searching overhead may increase the operation count by about 50%. The symmetric indefinite factorization with the BBK pivoting strategy is backward stable; the same rounding error analysis as for the Bunch-Kaufman pivoting strategy is applicable [2], [16]. The modified Cholesky algorithm of the next section and the corresponding analysis are not tied exclusively to the BBK pivoting strategy. We could use instead the "fast Bunch-Parlett" pivoting strategy from [2], which appears to be more e#cient than the BBK strategy when both are implemented in block form [2]. We mention in passing that a block implementation of the SE algorithm has been developed by Dayd-e [5]. Alternatively, we could use one of the pivoting strategies from [8], [9]. 3. The modified Cholesky algorithm. We begin by defining the distance from a symmetric matrix A # R n-n to the symmetric matrices with minimum eigenvalue # min at least #, where # 0: The distances in the 2- and Frobenius norms, and perturbations that achieve them, are easily evaluated (cf. [12, Thms. 2.1, 3.1]). Theorem 3.1. Let the symmetric matrix A # R n-n have the spectral decomposition for the Frobenius norm, and there is a unique optimal perturbation in (3.1), given by MODIFIED CHOLESKY ALGORITHM 1101 For the 2-norm, and an optimal perturbation is #)I. The Frobenius norm perturbation (3.2) is also optimal in the 2-norm. Our modified Cholesky algorithm has a parameter # 0 and it attempts to produce the perturbation (3.2). Algorithm MC (modified Cholesky factorization). Given a symmetric matrix A # R n-n and a parameter # 0 this algorithm computes a permutation matrix P , a unit lower triangular matrix L, and a block diagonal matrix D with diagonal blocks of dimension 1 or 2 such that and A+E is symmetric positive definite (or symmetric positive semidefinite if The algorithm attempts to ensure that if # min (A) < # then # min E) #. 1. Compute the symmetric indefinite factorization PAP using the pivoting strategy. 2. Let D, where # D is the minimum Frobenius norm perturbation that achieves # min ( D) # (thus # D ii is the minimum Frobenius norm perturbation that achieves # min ( D ii +# To what extent does Algorithm MC achieve the objectives (O1)-(O4) listed in section 1? Objective (O4) is clearly satisfied, provided that the pivoting strategy does not require a large amount of searching, since the cost of step 2 is negligible. For objectives (O1)-(O3) to be satisfied we need the eigenvalues of A to be reasonably well approximated by those of D. For the Bunch-Kaufman pivoting strategy the elements of L are unbounded and the eigenvalues of D can di#er greatly from those of A (subject to A and D having the same inertia), as is easily shown by example. This is the essential reason why the Bunch-Kaufman pivoting strategy is unsuitable for use in a modified Cholesky algorithm. To investigate objectives (O1)-(O3) we will make use of a theorem of Ostrowski [18, p. 224]. Here, the eigenvalues of a symmetric n-n matrix are ordered # n # Theorem 3.2 (Ostrowski). Let M # R n-n be symmetric and S # R n-n nonsingular. Then for each Assuming first that # min (A) > 0 and applying the theorem with D and D). Now E will be zero if # min ( D) #, which is certainly true if Next, we assume that # min (A) is negative and apply Theorems 3.1 and 3.2 to obtain Using Theorem 3.2 again, with (3.4), yields D) A final invocation of Theorem 3.2 gives E) # min (LL T )# min ( D) # min (LL T )# and D) # . Hence E) # . We can now assess how well objectives (O1)-(O3) are satisfied. To satisfy objective (O1) we would like E to be zero when # min (A) #, and to satisfy (O2) we would like #E# 2 to be not much larger than # min (A) when A is not positive definite. The su#cient condition (3.3) for E to be zero and inequality (3.5) show that these conditions do hold modulo factors # max,min (LL T ). Inequality (3.6) bounds # 2 (A+E) with the expected reciprocal dependence on #, again with terms # max,min (LL T ). The conclusion is that the modified Cholesky algorithm is guaranteed to perform well if are not too far from 1. Note that, since L is unit lower triangular, e T which implies that 1. For the BBK pivoting strategy we have Furthermore, using a bound from [15, Thm. 8.13 and Prob. 8.5]. These upper bounds are approximately attainable, but in practice are rarely approached. In particular, the upper bound of (3.8) can be approached only in the unlikely event that most of the subdiagonal elements of L are negative and of near maximal magnitude. Note that each causes a subdiagonal element l i+1,i to be zero and so further reduces the likelihood of #L being large. In the analysis above we have exploited the fact that the extent to which the eigenvalues of A and D agree can be bounded in terms of the condition of L. If L is well conditioned then the singular values of A are close to the moduli of the eigenvalues of D. We are currently exploring the application of this fact to the computation of rank-revealing factorizations. MODIFIED CHOLESKY ALGORITHM 1103 4. Comparison with the GMW and SE algorithms. The GMW and SE algorithms both carry out the steps of a Cholesky factorization of a symmetric matrix A # R n-n , increasing the diagonal entries as necessary in order to ensure that negative pivots are avoided. (Actually, the GMW algorithm works with an LDL T factorization, where D is diagonal, but the di#erence is irrelevant to our discussion.) Hence both algorithms produce Cholesky factors of P T E)P with a diagonal E. From Theorem 3.1 we note that the "optimal" perturbation in objective (O2) of section 1 is, in general, full for the Frobenius norm and can be taken to be diagonal for the 2-norm (but is generally not unique). There seems to be no particular advantage to making a diagonal perturbation to A. Our algorithm perturbs the whole matrix, in general. By construction, the GMW and SE algorithms make perturbations E to A that are bounded a priori by functions of n and #A# only. The GMW algorithm produces a perturbation E for which where # 0 is a tolerance, and u is the unit roundo# [11, p. 110]. For the SE algorithm the perturbation is bounded in terms of a certain eigenvalue bound # obtained by applying Gershgorin's theorem: (#), where # is a tolerance, suggested in [21] to be chosen as . The quantity # satisfies # n(#), so (4.2) is a smaller bound than (4.1) by about a factor n. The bounds (4.1) and (4.2) can be compared with (3.5) for Algorithm MC. The bound (3.5) has the advantage of directly comparing the perturbation made by Algorithm MC with the optimal one, as defined by (3.1) and evaluated in Theorem 3.1, and it is potentially a much smaller bound than (4.1) and (4.2) if |# min (A)| # max (A)| and # 2 (LL T ) is not too large. On the other hand, the bound (3.5) can be much larger than (4.1) and (4.2) if # 2 (LL T ) is large. All three algorithms satisfy objective (O1) of not modifying a su#ciently positive definite matrix, though for the GMW and SE algorithms no condition analogous to (3.3) that quantifies "su#ciently" in terms of # min (A) is available. Bounds for that are exponential in n hold for the GMW and SE algorithms [21]. The same is true for Algorithm MC: see (3.6)-(3.8). To summarize, in terms of the objectives of section 1 for a modified Cholesky algo- rithm, Algorithm MC is theoretically competitive with the GMW and SE algorithms, with the weakness that if # 2 (LL T ) is large then the bound on #E# 2 is weak. When applied to an indefinite matrix, the GMW and SE algorithms provide information that enables a direction of negative curvature of the matrix to be produced; these directions are required in certain algorithms for unconstrained optimization in order to move away from nonminimizing stationary points. For an indefinite matrix, Algorithm MC provides immediate access to a direction of negative curvature from the 1104 SHEUNG HUN CHENG AND NICHOLAS J. HIGHAM computed in step 1, and because #(L) is bounded, this direction satisfies conditions required for convergence theory [19]. Finally, we consider the behavior of the algorithms in the presence of rounding errors. Algorithm MC is backward stable because the underlying factorization is [2]: barring large element growth in the symmetric indefinite factorization with the BBK pivoting strategy, the algorithm produces LDL T factors not of P but of a constant. Although no comments on numerical stability are given in [11] and [21], a simple argument shows that the GMW and SE algorithms are backward stable. Apply either algorithm to A, obtaining the Cholesky factorization P apply the same algorithm to P (A+E)P T : it will not need to modify P (A+E)P T , so it will return the same computed R factor. But since no modification was required, the algorithm must have carried out a standard Cholesky factorization. Since Cholesky factorization is a backward stable process, the modified Cholesky algorithm must itself be backward stable. 5. Numerical experiments. We have experimented with Matlab implementations of Algorithm MC and the GMW and SE algorithms. The M-file for the GMW algorithm was provided by M. Wright and sets the tolerance (which is the value of Matlab's variable eps). The M-file for the SE algorithm was provided by E. Eskow and sets the tolerance In Algorithm MC we set # u#A# . The aims of the experiments are as follows: to see how well the Frobenius norm of the perturbation E produced by Algorithm MC approximates the distance -F (A, #) defined in (3.1), and to compare the norms of the perturbations E and the condition numbers of A produced by the three algorithms. We measure the perturbations E by the ratios -F (A, #) |# min (A)| which di#er only in their normalization and the choice of norm. Algorithm MC attempts to make r F close to 1. The quantity r 2 is used by Schnabel and Eskow to compare the performance of the GMW and SE algorithms; since E is diagonal for these algorithms, r 2 compares the amount added to the diagonal with the minimum diagonal perturbation that makes the perturbed matrix positive semidefinite. First, we note that the experiments of Schnabel and Eskow [21] show that the SE algorithm can produce a substantially smaller value of r 2 than the GMW algorithm. Schnabel and Eskow also identified a 4 - 4 matrix for which the GMW algorithm significantly outperforms the SE algorithm: 1538.3 284.9 -2706.6 We give results for this matrix in Table 5.1; they show that Algorithm MC can also significantly outperform the SE algorithm. We ran a set of tests similar to those of Schnabel and Eskow [21]. The matrices A are of the form with the eigenvalues # i from one MODIFIED CHOLESKY ALGORITHM 1105 Table Measures of E for 4 - 4 matrix (5.1). MC GMW SE matrix a) n=25, eig. range[-1,10000] matrix c) n=25, eig. range[-1,1] matrix eig. range[-10000,-1] matrix eig. range[-1,10000] matrix d) n=25, eig. range[-1,1] f) n=25, eig. range[-10000,-1] Fig. 5.1. Measures of E for -, MC -. of three random uniform distributions: [-1, 10 4 ], [-1, 1], and [-10 4 , -1]. For the first range, one eigenvalue is generated from the range [-1, 0) to ensure that A has at least one negative eigenvalue. The matrix Q is a random orthogonal matrix from the Haar distribution, generated using the routine qmult from the Test Matrix Toolbox [14], which implements an algorithm of Stewart [22]. For each eigenvalue distribution we generated di#erent matrices, each corresponding to a fresh sample of # and of Q. We took 100. The ratios r F and r 2 are plotted in Figures 5.1-5.3. Figure 5.4 plots the condition numbers # 2 the condition numbers show a very similar behavior. Table 5.2 reports the number of comparisons used by the BBK pivoting strategy on these matrices for each n; the maximum number of comparisons is less than n 2 in each case. In Figure 5.5 we report results for three nonrandom matrices from the Test Matrix 1106 SHEUNG HUN CHENG AND NICHOLAS J. HIGHAM matrix a) n=50, eig. range[-1,10000] matrix c) n=50, eig. range[-1,1] eig. range[-10000,-1] matrix eig. range[-1,10000] matrix d) n=50, eig. range[-1,1] matrix f) n=50, eig. range[-10000,-1] Fig. 5.2. Measures of E for -, MC -. Table Number of comparisons for BBK pivoting strategy. n: mean 343.9 1432.8 5998.4 Toolbox. Clement is a tridiagonal matrix with eigenvalues plus and minus the numbers n- 1, n- 3, n- 5, . , (1 or 0). Dingdong is the symmetric n-n Hankel matrix with (i, whose eigenvalues cluster around #/2 and -#/2. Ipjfact is the Hankel matrix with (i, Our conclusions from the experiments are as follows. 1. None of the three algorithms is uniformly better than the others in terms of producing a small perturbation E, whichever measure r F or r 2 is used. All three algorithms can produce values of r F and r 2 significantly greater than 1, depending on the problem. 2. Algorithm MC often achieves its aim of producing r F # 1. It produced r F of for the eigenvalue distribution [-1, for each n, and the values of # 2 (LL T ) (not shown here) were approximately 100r F in each such case. MODIFIED CHOLESKY ALGORITHM 1107 matrix a) n=100, eig. range[-1,10000] matrix c) n=100, eig. range[-1,1] eig. range[-10000,-1] matrix eig. range[-1,10000] matrix d) n=100, eig. range[-1,1] matrix f) n=100, eig. range[-10000,-1] Fig. 5.3. Measures of E for -, MC -. However, often r F was of order 1 when # large value of # 2 (LL T ) is only a necessary condition, not a su#cient one, for poor performance of Algorithm MC; in other words, the bounds of section 3 can be weak. 3. The condition numbers # 2 (A+E) vary greatly among the algorithms. Our experience is that for # u#A# Algorithm MC fairly consistently produces condition numbers of order 100/ # u; the condition number is, as predicted by (3.6), much smaller for the random matrices with eigenvalues on the range because the algorithm attempts to perturb all the eigenvalues to #. The condition numbers produced by the GMW and SE algorithms vary greatly with the type of matrix. The fact that r F is close to 1 for the random matrices with eigenvalues in the range [-10 4 , -1] for Algorithm MC is easily explained. Let A be negative definite. Then Algorithm MC computes P Hence matrix a) n=25, eig. range[-1,10000] matrix eig. range[-1,1] matrix c) n=25, eig. range[-10000,-1] Fig. 5.4. Condition numbers # 2 E) for GMW -, SE -, MC -. using (3.7), so r F can exceed 1 only by a tiny amount for Algorithm MC applied to a negative definite matrix, irrespective of # 2 (LL T ). 6. Concluding remarks. Algorithm MC, based on the symmetric indefinite factorization with the bounded Bunch-Kaufman pivoting strategy, merits consideration as an alternative to the algorithms of Gill, Murray, and Wright and Schnabel and Eskow. The results in section 5 suggest that the new algorithm is competitive with the GMW and SE algorithms in terms of the objectives (O1)-(O4) listed in section 1. Algorithm MC has the advantages that the extent to which it satisfies the objectives is neatly, although not sharply, described by the bounds of section 3 and that it can be implemented by augmenting existing software with just a small amount of additional code. Since all three modified Cholesky algorithms can "fail," that is, they can produce unacceptably large perturbations, it is natural to ask how failure can be detected and what should be done about it. The GMW and SE algorithms produce their (diagonal) MODIFIED CHOLESKY ALGORITHM 1109 a) clement(n,1) c) dingdong(n) d) dingdong(n) f) ipjfact(n,1) Fig. 5.5. Measures of E for three nonrandom matrices. Key: GMW -, SE -, MC -. perturbations explicitly, so it is trivial to evaluate their norms. For Algorithm MC, the perturbation to A is (see which would require operations to form explicitly. However, we can estimate #E# using the norm estimator from [13] (which is implemented in LAPACK). The estimator requires the formation of products Ex for certain vectors x, and these can be computed in O(n 2 ) operations; the estimate produced is a lower bound that is nearly always within a factor 3 of the true norm. For all three algorithms, then, we can inexpensively test whether the perturbation produced is acceptably small. Unfortunately, for none of the algorithms is there an obvious way to improve a modified Cholesky factorization that makes too big a perturbation; whether improvement is possible, preferably cheaply, is an open question. Of course one can always resort to computing an optimal perturbation by computing the eigensystem of A and using the formulae in Theorem 3.1. We note that we have approached the problem of modified Cholesky factorization from a purely linear algebra perspective. An important test of a modified Cholesky algorithm is to evaluate it in an optimization code on representative problems, as was done by Schlick [20] for the GMW and SE algorithms. This we plan to do for Algorithm MC in future work. Finally, we mention that a generalization of the modified Cholesky problem motivated by constrained optimization is analyzed in detail in [17]. --R Accurate symmetric indefinite linear equation solvers Some stable methods for calculating inertia and solving symmetric linear systems Direct methods for solving symmetric indefinite systems of linear equations Society for Industrial and Applied Mathematics The factorization of sparse symmetric indefinite matrices Direct solution of sets of linear equations whose matrix is sparse Computing a nearest symmetric positive semidefinite matrix FORTRAN codes for estimating the one-norm of a real or complex matrix The Test Matrix Toolbox for Matlab (Version 3.0) Accuracy and Stability of Numerical Algorithms Stability of the diagonal pivoting method with partial pivoting Modifying the inertia of matrices arising in optimiza- tion Matrix Analysis Modified Cholesky factorizations for sparse preconditioners A new modified Cholesky factorization --TR
modified Cholesky factorization;newton's method;symmetric indefinite factorization;optimization
301971
The computational complexity of knot and link problems.
We consider the problem of deciding whether a polygonal knot in 3-dimensional Euclidean space is unknotted, ie., capable of being continuously deformed without self-intersection so that it lies in a plane. We show that this problem, UNKNOTTING PROBLEM is in NP. We also consider the problem, SPLITTING PROBLEM of determining whether two or more such polygons can be split, or continuously deformed without self-intersection so that they occupy both sides of a plane without intersecting it. We show that it also is in NP. Finally, we show that the problem of determining the genus of a polygonal knot (a generalization of the problem of determining whether it is unknotted) is in PSPACE. We also give exponential worst-case running time bounds for deterministic algorithms to solve each of these problems. These algorithms are based on the use of normal surfaces and decision procedures due to W. Haken, with recent extensions by W. Jaco and J. L. Tollefson.
Introduction The problems dealt with in this paper might reasonably be called "computational topology"; that is, we study classical problems of topology (specifically, the topology of 1-dimensional curves in 3-dimensional space) with the objective of determining their computational complex- ity. One of the oldest and most fundamental of such problems is that of determining whether a closed curve embedded in space is unknotted (that is, whether it is capable of being continuously deformed without self-intersection so that it lies in a plane). Topologists study this problem at several levels, with varying meanings given to the terms "embedding" and "de- formed". The level that seems most appropriate for studying computational questions is that which topologists call "piecewise-linear". At this level, a closed curve is embedded in space as a simple (non-self-intersecting) polygon with finitely many edges. Such an embedding is called a "knot". (Operating at the piecewise-linear level excludes "wild" knots such as those given by polygons with infinitely many edges, but finite total length.) More generally, one may study "links." A link is a finite collection of simple polygons disjointly embedded in 3-dimensional space. The individual polygons are called components of the link and a knot is a link with one component. A continuous deformation is required to be piecewise-linear; that is, it consists of a finite number of stages, during each of which every vertex of the polygon moves linearly with time. From stage to stage the number of edges in the polygon may increase (by subdivision of edges at the beginning of a stage) or decrease (when cyclically consecutive edges become collinear at the end of a stage). If the polygon remains simple throughout this process, the deformation is called an "isotopy" between the initial and final knots. Knot isotopy defines an equivalence relation, called "equivalence" of knots. It is easy to see that all knots that lie in a single plane are equivalent; knots in this equivalence class are said to be "unknotted" or "trivial" knots. While it is "intuitively obvious" that there are non-trivial knots, it is not at all obvious how to prove this. Stillwell [31] traces the mathematical notion of knot back to a paper of A.T. Vandermonde in 1771; the first convincing proof of the non-triviality of a knot seems to be due to Max Dehn [5] in 1910. There are a great many alternative formulations of the notion of knot equivalence. Here are some. 1. One can consider sequences of "elementary moves", which are very simple isotopies that move a single edge across a triangle to the opposite two sides, or vice versa. 2. One can consider "ambient isotopies" that move not only the knot, but also the space in which it is embedded, in a piecewise-linear way. 3. One can consider "homeomorphisms" (continuous bijections that have continuous in- verses) that map the space to itself in a piecewise-linear way, are orientation preserving, and send one knot to the other. One can also study knots or links by looking at their "projections" onto a generic plane. In this way, a knot or link may be represented by a planar graph, called a "knot diagram" or "link diagram", in which all vertices (representing the "crossings" of edges of the polygon) have degree four, and for which an indication is given at each crossing of which edge goes "over" and which edge goes "under". This gives an additional formulation of equivalence: 4. One may consider sequences of "Reidemeister moves", which are simple transformations on the diagram of a knot that leave the equivalence class of the knot unchanged. For more details on piecewise-linear topology, the various formulations of knot and link equiv- alence, and many other aspects of knot theory, we recommend the books of Adams [1] and Burde and Zieschang [4]. In order to study the computational complexity of knot and link problems, we must agree on a finite computational representation of a knot or link. There are two natural representations: a polygonal representation in 3-dimensional space, or a link diagram representing a 2-dimensional projection. A polygonal representation of a link L consists of a set of simple polygons in 3-dimensional space described by listing the vertices of each polygon in order; we assume that these vertices have rational coordinates. We can reduce to the case of integer lattice point vertices by replacing L by a scaled multiple mL for a suitable integer m. This does not change the equivalence class of L. A particularly simple kind of polygonal representation uses only integer lattice points as vertices and edges of unit length, so that the polygon is a closed self-avoiding walk on the integer lattice; a sequence of moves (up, down, north, south, east, west) that traverse the polygon, returning to the starting point without visiting any other point twice. (This formulation was used by Pippenger [22] and Sumners and Whittington [32] to show that "almost all" long self-avoiding polygons are non-trivially knotted.) The size of a polygonal representation L is the number of edges in L; its input length is the number of bits needed to describe its vertices, in binary. A link diagram D is a planar graph with some extra labeling for crossings that specifies a (general position) two-dimensional projection of a link. A precise definition is given in section 3. The size of a link diagram is the number of vertices in D plus the number of isolated loops. These two representations are polynomial-time equivalent in the following sense. Given a polygonal representation L one can find in polynomial time in its input length a planar projection yielding a link diagram D; if L has n edges then the graph D has at most O(n 2 ) vertices. Conversely given a link diagram D with n vertices and l components, one can compute in time polynomial in n + l a polygonal link L with O(n edges that has integer vertices and input length O(n + l) and which projects in the z-direction onto the link diagram D; see Section 7. In this paper we consider knots and links as represented by link diagrams and take the crossing number as the measure of input size. We can now formulate the computational problem of recognizing unknotted polygons as follows: Problem: UNKNOTTING PROBLEM Instance: A link diagram D. Question: Is D a knot diagram that represents the trivial knot? See Welsh [34]-[36] for more information on this problem. The main result of this paper is the following. Theorem 1.1. The UNKNOTTING PROBLEM is in NP. The UNKNOTTING PROBLEM was shown to be decidable by Haken [7]; the result was announced in 1954, and the proof published in 1961. From then until now, we know of no strengthening of Haken's decision procedure to give an explicit complexity bound. We also study the splittability of links. A link is said to be "splittable" if it can be can be continuously deformed (by a piecewise-linear isotopy) so that one or more curves of the link can be separated from one or more other curves by a plane that does not itself intersect any of the curves. We note that this notion remains unchanged if we replace "plane" by "sphere" in the definition. We formulate the computational problem of recognizing splittable links as follows. Problem: SPLITTING PROBLEM Instance: A link diagram D. Question: Is the link represented by D splittable? The SPLITTING PROBLEM was shown to be decidable by Schubert [27] in 1961. We establish the following result. Theorem 1.2. The SPLITTING PROBLEM is in NP. Another generalization of the unknotting problem concerns an isotopy invariant of a knot K called the "genus" g(K) of K. This was defined by Seifert [29] in 1935; an informal account of the definition follows. Given a knot K, consider the class S(K) of all orientable spanning surfaces for K; that is, embedded orientable surfaces that have K as their boundary. Seifert showed that this class is non-empty for any knot K. (We shall assume in this discussion that all surfaces are triangulated and embedded in a piecewise-linear way.) Up to piecewise-linear homeomorphism, an orientable surface is characterized by the number of boundary curves and the number of "handles", which is called the "genus" of the surface. The genus g(K) of the knot K is defined to be the minimum genus of any surface in S(K). Seifert showed that a trivial knot K is characterized by the condition This means that a knot is trivial if and only if it has a spanning disk. The notion of genus gives us a natural generalization of the problem of recognizing unknotted polygons; we formulate the problem of computing the genus as a language-recognition problem in the usual way. Problem: GENUS PROBLEM Instance: A link diagram D and a natural number k. Question: Does the link diagram D represent a knot K with Haken [7] observed that his methods also suffice to show the decidability of the GENUS PROBLEM. We establish the following result. Theorem 1.3. The GENUS PROBLEM is in PSPACE. 2. Historical background The problem of recognizing whether two knots are equivalent has been one of the motivating problems of knot theory. A great deal of effort has been devoted to a quest for algorithms for recognizing the unknot, beginning with the work of Dehn [5] in 1910. Dehn's idea was to look at the fundamental group of the complement of the knot, for which a finite presentation in terms of generators and relations can easily be obtained from a standard presentation of the knot. Dehn claimed that a knot is trivial if and only if the corresponding group is infinite cyclic. The proof of what is still known as "Dehn's Lemma'' had a gap, which remained until filled by Papakyriakopoulos [21] in 1957. A consequence is the criterion that a curve is knotted if and only if the fundamental group of its complement is nonabelian. Dehn also posed the question of deciding whether a finitely presented group is isomorphic to the infinite cyclic group. During the 1950s it was shown that many such decision problems for finitely presented groups (not necessarily arising from knots) are undecidable (see Rabin [23], for example), thus blocking this avenue of progress. (The avenue has been traversed in the reverse direction, however: there are decision procedures for restricted classes of finitely presented groups arising from topology. In particular, computational results for properties of knots that are characterized by properties of the corresponding groups can be interpreted as computational results for knot groups.) Abstracting somewhat from Dehn's program, we might try to recognize knot triviality by finding an invariant of the knot that (1) can be computed easily and (2) assumes some particular value only for the trivial knot. (Here "invariant" means invariant under isotopy.) Thus Alexander [2] defined in 1928 an invariant AK (x) (a polynomial in the indeterminate x) of the knot K that can be computed in polynomial time. Unfortunately, it turns out that many non-trivial knots have Alexander polynomial AK the same as the Alexander polynomial of a trivial knot. Another invariant that has been investigated with the same hope is the Jones polynomial JK (x) of a knot K, discovered by Jones [18] in 1985. In this case the complexity bound is less attractive: the Jones polynomial for links (a generalization of the Jones polynomial for knots) is #P-hard and in FP #P (see Jaeger, Vertigan and Welsh [17]). It is an open question whether trivial knots are characterized by their Jones polynomial. Even this prospect, however, has led Welsh [34] to observe that an affirmative answer to the last open question would yield an algorithm in P #P for recognizing trivial knots, and to add: "By the standards of the existing algorithms, this would be a major advance." The revolution started by the Jones polynomial has led to the discovery of a great number of new knot and link invariants, including Vassiliev invariants and invariants associated to topological quantum field theories, see Birman [3] and Sawin [25]. The exact ability of these invariants to distinguish knot types has not been determined. A different approach to the problems of recognizing unknottedness and deciding knot equivalence eventually culminated in decision procedures. This is based on the study of normal surfaces in 3-manifolds (defined in section 3), which was initiated by Kneser [19] in 1929. In the 1950's Haken elaborated the theory of normal surfaces, and in 1961 published his decision procedure for unknottedness. Schubert [27] extended Haken's procedure to decide the link splitting problem and related problems. Haken also outlined an approach via normal surfaces to decide the knot equivalence problem [33]. The final step in this program was completed by Hemion [10] in 1979. This approach actually solves a more general decision problem, concerning a large class of 3-manifolds, now called Haken manifolds, which can be cut into "simpler" pieces along certain surfaces (incompressible surfaces), eventually resulting in a collection of 3-balls. Knot complements are Haken manifolds. It gave a procedure to decide if two Haken manifolds are homeomorphic [14]. Recently Jaco and Tollefson [15] further simplified some of these algorithms. Apart from these decidability results, there appear to be no explicit complexity bounds, either upper or lower, for any of the three problems that we study. The work of Haken [7] and Schubert [27] predates the currently used framework of complexity classes and hierarchies. Their algorithms were originally presented in a framework (handlebody decompositions) that makes complexity analysis appear difficult, but it was recognized at the time that implementation of their algorithms would require at least exponential time in the best case. More recently Jaco and others reformulated normal surface theory using piecewise linear topology, but did not determine complexity bounds. Other approaches to 3-manifold algorithms include methods related to Thurston's geometrization program for 3-manifolds [8]; these currently have unknown complexity bounds. Our results are obtained using normal surface theory. Among other things we show that Haken's original approach yields an algorithm which determines if a knot diagram with n crossings is unknotted in time O(2 cn 2 ), and that the improved algorithm of Jaco and Tollefson runs in time O(2 cn ), see Theorem 8.1. The complexity class inclusions that we prove require some additional observations. 3. Knots and links A knot is an embedding f although it is usually identified with its image (Thus we are considering unoriented knots.) A link with k components is a collection of k knots with disjoint images. An equivalent formulation regards a knot as an embedding in the one-point compactification S 3 of R 3 , and we will sometimes use this setting. Two knots K and K 0 are ambient isotopic if there exists a homotopy is the identity, each h t is a homeomorphism, and h 1 We shall also say in this case that K and K 0 are equivalent knots. A knot or link is tame if it is ambient isotopic to a piecewise-linear knot or link, also called a polygonal knot or link. We restrict our attention to tame knots and links. Given this restriction, we can without further loss of generality restrict our attention to piecewise-linear manifolds and maps (see Moise [20]). A regular projection of a knot or link is an orthogonal projection into a plane (say that contains only finitely many multiple points, each of which is a double point with transverse crossing. Any regular projection of a link gives a link diagram, which is an undirected labeled planar graph such that: 1. Connected components with no vertices are loops. 2. Each non-loop edge meets a vertex at each of its two ends, and has a label at each end indicating an overcrossing or undercrossing at that end. 3. Each vertex has exactly four incident edges, two labeled as overcrossings and two labeled as undercrossings, and has a cyclic ordering of the incident edges that alternates overcrossings and undercrossings. Conversely, every labeled planar graph satisfying these conditions is a link diagram for some link. Given a link diagram, if we connect the edges across vertices according to the labeling, then the diagram separates into k edge-connected components, where k is the number of components in the link. A knot diagram is a link diagram having one component. A trivial knot diagram is a single loop with no vertices. We define the crossing measure to be the number of vertices in the diagram, plus the number of connected components in the diagram, minus one. For knot diagrams, the crossing measure is equal to the crossing number, which is the number of vertices in the diagram. A trivial knot diagram is the only link diagram with crossing measure zero. All other link diagrams have strictly positive crossing measure. A knot diagram is the unknot (or is unknotted) if there is a knot K having this diagram that is ambient isotopic to a knot K 0 having a trivial knot diagram. 4. An unknottedness criterion Our algorithm to solve the UNKNOTTING PROBLEM, like that of Haken, relies on the following criterion for unknottedness. A knot K is unknotted if and only if there exists a piecewise-linear disk D embedded in R 3 whose boundary @D is the knot K. We call such a disk a spanning disk. We shall actually use a slightly weaker unknottedness criterion, given in Lemma 4.1 below. It does not deal with with a spanning disk of K, but rather with a spanning disk of another knot K 0 that is ambient isotopic to K. Given a knot K, let T be a finite triangulation of S 3 containing K in its 1-skeleton, where the 3-sphere S 3 is the one-point compactification of R 3 , and the "point at infinity" is a vertex of the triangulation. Barycentrically subdivide T twice to obtain a triangulation T 00 , and denote the compact triangulated 3-manifold with boundary obtained by deleting the open regular neighborhood RK of K. Here RK consists of all 0-simplices and open 1-, 2- and 3-simplices whose closure intersects K. The closure RK is a tubular neighborhood of K, that is, a solid torus containing K as its core, and its boundary topologically a 2-torus. Each of RK , MK and are triangulated by simplices in T 00 . We call such a manifold MK a "knot complement manifold". We call a triangulation of above a good triangulation of MK . Similarly we define a good triangulation of a link complement manifold. For any good triangulation of MK , the homology group H 1 since @MK is a 2-torus. We take as generator (1; 0) the homology class of a fixed closed oriented boundary @B of an essential disk B in RK (a "meridian"), and as generator (0; 1) the homology class of a fixed closed oriented circle in @MK that has algebraic intersection 1 with the meridian and algebraic linking number 0 with K (a "longitude"). simple closed curve in @RK whose homology class is the identity in the 3-manifold RK but not in the surface @RK is a meridian. A simple closed curve in @RK whose homology class is the identity in the 3-manifold MK but not in the surface @RK is a longitude. The homology classes of a meridian and longitude are well-defined up to orientation.) A surface S with boundary @S contained in a 3-manifold M with boundary @M is said to be properly embedded if it does not intersect itself and if S " surface S is essential for M if it is properly embedded in M , cannot be homotoped into @M while holding @S fixed, and has fundamental group which injects into the fundamental group of M (what topologists call an "incompressible" surface, see Hempel [11]). In particular, a surface of smallest genus with boundary a longitude of a knot is an example of an essential surface. Lemma 4.1. Let K be a polygonal knot, and take any good triangulation of MK . 1. If K is knotted, then there exists no essential disk in MK . 2. If K is unknotted, then there exists an essential disk in MK , and any such essential disk S has (oriented) boundary @S in a homology class Roughly speaking, Lemma 4.1 replaces the problem of finding a spanning disk for K with that of finding a spanning disk for a longitude. The condition on [@S] has the convenient property that it can be detected by homology with coefficients in Z=2Z. This will play a crucial role in reducing the complexity of our algorithm from PSPACE to NP. Lemma 4.2. If S is a connected triangulated surface embedded in R 3 with Euler characteristic is a topological disk. Indeed, the only compact connected surfaces with Euler characteristic 1 are the disk and the projective plane, and the latter cannot be embedded in R 3 . This lemma will also play a crucial role in reducing the complexity of our algorithm. 5. Normal surfaces Let M be a triangulated compact 3-manifold with boundary @M . Let t denote the number of tetrahedra (that is, 3-simplices) in the triangulation of M . A normal surface of M (with respect to the given triangulation) is a surface S ' M such 1. S is properly embedded in M . 2. The intersection of S with any tetrahedron in the triangulation is a finite disjoint union of triangles and quadrilaterals whose vertices are contained on different edges of the tetrahedron. (There are some differences in the literature in the definitions concerning normal surfaces. Our usage follows Kneser [19], Jaco and Rubinstein [16], Hemion [10] and Jaco and Tollefson [15]. The definitions used by Haken [7] and Schubert [27] are based on a handlebody decomposition of a 3-manifold, rather than a triangulation. We allow a normal surface to have more than one component, and the individual connected components may be orientable or non-orientable. Some authors require a normal surface to be connected, and refer to what we have defined as a system of normal surfaces.) A normal surface has associated to it combinatorial data that specify the number and type of regions (triangles and quadrilaterals) that appear in the intersection of S with each tetrahedron in the triangulation of M . For a given tetrahedron, each of these triangles or quadrilaterals separates the four vertices into two non-empty sets; there are thus seven possi- bilities: four types of triangles, which separate one vertex from the other three, and three types of quadrilaterals, which separate two vertices from the other two. If there are t tetrahedra in the triangulation of M , then there are 7t pieces of combinatorial data (each a non-negative which specify the number of regions of each of the seven types in each of the t tetra- hedra. We represent this combinatorial data as a vector by choosing a fixed ordering of the region types and tetrahedra. We call v(S) the normal coordinates of S. When is a vector v 2 Z 7t the normal coordinates for some normal surface? We shall call such a vector an admissible vector. Admissible vectors satisfy the following conditions: 1. Non-negativity conditions: Each component v i of v (for 2. Matching conditions: Suppose two tetrahedra T and T 0 in the triangulation have a common face F . Each region type in T and T 0 produces either zero or one edge in F , which intersects a given two of the three sides of F . For each pair of sides of F , the number of edges coming from regions in T must equal that coming from regions in T 0 . These conditions each have the form v a 3. Quadrilateral conditions: In each tetrahedron of the triangulation at most one of the three types of quadrilaterals can occur. (If two quadrilaterals of different types occurred in some tetrahedron, they would intersect, contradicting the condition that a normal surface must be properly embedded.) Haken proved that these necessary conditions for a vector to be admissible are also sufficient: Theorem 5.1. Let M be a triangulated compact 3-manifold with boundary, comprising t tetra- hedra. Any integer vector v 2 Z 7t that satisfies the non-negativity conditions, matching conditions and quadrilateral conditions gives the normal coordinates v(S) of some normal surface in M , which is unique up to ambient isotopy. This result characterizes the set WM of all admissible vectors of normal surfaces as a certain set of integer points in a rational polyhedral cone in R 7t . We define the Haken normal cone CM to be the polyhedral cone in R 7t defined by the non-negativity conditions and matching conditions. The points in WM are then just the points in the Haken normal cone CM that satisfy the quadrilateral conditions. The usefulness of normal surfaces is that any surface on a 3-manifold M can be simplified by ambient isotopies and "compressions" (removing a handle - a kind of surgery on the the surface) to an incompressible normal surface. In particular this applies to essential surfaces. The "simplest" normal surfaces are surfaces S such that v(S) cannot be written as v(S non-empty normal surfaces S 0 and S 00 . Haken calls these surfaces fundamental surfaces, and the corresponding vectors v(S) fundamental solutions. Fundamental surfaces are always connected, since otherwise their vectors would be a sum of the vectors of their corresponding components. Such vectors are in the minimal Hilbert basis of the cone CM , which is a finite set (see Schrijver [26] or Seb-o [28]). Haken [7] (Chapter 5) proved the following result. Theorem 5.2. Let M be a triangulated compact 3-manifold M with non-empty boundary @M . If M is irreducible, then any essential surface S in M is ambient isotopic in (M; @M) to an essential normal surface. contains an essential normal surface S then it contains an essential normal surface S 0 that is a fundamental surface, such that the entries of v(S 0 ) are componentwise less than or equal to those of v(S). Any knot complement manifold MK is irreducible (see [13]), and a surface of smallest genus in the class of surfaces whose boundary is a longitude of @MK is an essential surface in MK . Theorem 5.2 implies that there is a fundamental surface that is such a surface of minimal genus for the knot K; if K is unknotted this surface is an essential disk. A normal surface S in M is a vertex surface, and the corresponding vector v(S) is a vertex solution, if v(S) lies on an extremal ray of the Haken normal cone CM . The notion of a vertex surface was introduced by Jaco and Oertel [14]. A vertex surface is minimal if it is a fundamental surface. Jaco and Tollefson [15] (Corollary 6.4) recently obtained the following strengthening of Theorem 5.2 in the case that there is an essential disk. Theorem 5.3. If a triangulated compact 3-manifold M with non-empty boundary @M contains an essential disk, then it contains such a disk that is a minimal vertex surface. The key advantage of this theorem over Theorem 5.2 is that it is possible to test in polynomial time whether a solution to the non-negativity conditions and matching conditions is a vertex solution, just by verifying that non-negativity conditions that are "tight" determine the solution. 6. Bounds for fundamental solutions and Hilbert bases We bound the number and size of fundamental solutions in the Haken normal cone CM of an arbitrary triangulated compact 3-manifold M with boundary @M that contains t tetrahedra. The system of linear inequalities and equations defining the Haken normal cone CM has the where i runs from 1 to 7t, and runs from 1 to some limit that is at most 6t. Lemma 6.1. Let M be a triangulated compact 3-manifold, possibly with boundary, that contains t tetrahedra in the triangulation. (1) Any minimal vertex solution v 2 Z 7t of the Haken normal cone CM has 1-i-7t (2) Any minimal Hilbert basis element v 2 Z 7t of the Haken normal cone CM has 1-i-7t Proof Assertion (1) uses Hadamard's inequality to bound the determinants in an application of Cramer's rule to the equations that determine an extreme ray. Assertion (2) follows easily from assertion (1),using a standard bound, see Seb-o [28], (Theorem 1.1). This lemma give a bound on the "complexity" of a spanning disk when one exists. Specif- ically, it shows that for a diagram of the unknot with n crossings, there exists a triangulated spanning disk with at most 2 cn triangles, for some constant c. Hass and Lagarias [9] have used this bound to show that such an unknot diagram can be transformed to the trivial knot diagram with at most 2 c 0 n Reidemeister moves, for some explicitly given constant c 0 . Snoeyink [30] has announced that there exist polygons with n sides for which any triangulated spanning disk must have at least 2 c 00 n triangles, for some constant c 00 ; as of this writing, however, a gap remains in the proof of this claim. Lemma 6.2. (1) The Haken normal cone CM has at most 2 7t vertex fundamental solutions. (2) The Haken normal cone CM has at most t 7t 2 49t 2 +14t elements in its minimal Hilbert basis. Proof This is an easy counting argument using Lemma 6.1 for (2). 7. Triangulations Given a link diagram D, we show how to construct a triangulated 3-manifold ML where RL is a regular neighborhood of a link L which has a regular projection that is the link diagram D. The construction takes time that is polynomial in the crossing measure of D, and the triangulations of ML and RL each contain O(n) tetrahedra. Lemma 7.1. Given a link diagram D of crossing measure n, one can construct in time O(n log n) a link L in R 3 having regular projection D in the z-direction and a triangulated 3-manifold which has a good triangulation containing at most O(n) tetrahedra. Furthermore the triangulation of @ML is supplied with marked sets of edges for a meridian on each 2-torus component of @ML , and a marked set of edges for an arc joining each pair of 2-torus components of @ML . Proof We first construct a link L in R 3 which is embedded in the 1-skeleton of a triangulated convex polyhedron having O(n) tetrahedra, with all vertices being integer lattice points using integers bounded by O(n), and which projects in the z-direction to the link diagram D. To do this we extend D to a maximal planar graph and then use de Frajsseix et al. [6] to construct a planar embedding of this graph with small integer lattice point vertices. We take two copies of the graph in the plane use them for overcrossings and undercrossing planes, respectively. We can embed this in a triangulated convex polyhedron with the lifted link L in its interior using 840n tetrahedra. We barycentrically subdivide twice to obtain a regular neighborhood of L, remove its interior, and construct the marked edges. Finally we extend to a triangulation of S 3 by coning the triangular faces on the surface of the polyhedron to a point "at infinity". 8. Certifying unknottedness To show that the UNKNOTTING PROBLEM is in NP, we must construct for any unknotted knot diagram D a polynomial length certificate, that can be verified in polynomial time, for the unknottedness of D. The construction of the certificate, and its verification, take place in the following steps. 1. Given a link diagram D, verify that it is a knot diagram. (This can be done in deterministic polynomial time.) 2. Construct a piecewise-linear knot K in R 3 that has regular projection D, together with a good triangulation. From it construct a good triangulation of MK contains t tetrahedra, with and with a meridian marked in @MK . (Use Lemma 7.1.) 3. Guess a suitable fundamental vertex solution v 2 Z 7t to the Haken normal equations for MK . (This solution can be written in polynomial length by Lemma 6.1.) Verify the quadrilateral disjointness conditions. Let S denote the associated normal surface, so 4. Verify that S is an essential disk for @MK . (a) Verify that S is connected by verifying that v is a minimal vertex solution. (b) Verify that S is a disk by verifying that 1. The Euler characteristic can be calculated as an appropriate linear combination of components of v. Since the connected surface S is embedded in R 3 , implies that S is orientable and that @S is homeomorphic to a circle. (c) Verify that S is essential by verifying that the homology class Z). The only possibilities for [@S] in H 1 (@MK ; Z) are (0; 0) or (0; \Sigma1), so this can be done by verifying that the number of intersections of @S with the marked meridian of @MK is odd. This certificate specifies a normal surface which may contain exponentially many pieces, but labels it using the vector v which is of polynomial size, and is able to verify its properties using polynomial time computations on v, using Lemma 4.1 and Lemma 4.2. The correctness of this certificate relies on the result of Jaco and Tollefson [15] given as Theorem 5.3. Without using this result we could still obtain the weaker result that the UNKNOTTING PROBLEM is in \Sigma 2 P. In step 3 we guess a suitable fundamental solution, not known to be a vertex solution. The only step that must be changed is Step 4a, which we change to verify that v is a fundamental solution. This can be done by verifying that all decompositions of the form being solutions of the Haken normal equations for MK , have either v This approach also yields an algorithm to decide unknottedness of a link diagram, which proceeds by systematically searching for a certificate of the kind above. The algorithm generates all vertex solutions sequentially, and deterministically tests the steps of the certificate above on each one. This yields the following result. Theorem 8.1. There is a constant c and a Turing machine that can decide for any n-crossing knot diagram whether it represents the trivial knot in time O(2 cn ) and space O(n 2 log n). For Haken's original approach we obtain the running time bound O(2 cn 2 by finding and testing all fundamental solutions sequentially, using the bound of Lemma 6.2. 9. Certifying splittability We treat the SPLITTING PROBLEM with a modification of the method described above. We use the splittability criterion of Schubert [27] (Satz 4.1), according to which a link is splittable if and only if there is a normal sphere separating two components of the boundary of the link complement. We also use a result of Jaco and Tollefson [15] (Theorem 5.2), according to which, if there is such a normal sphere, then there is one associated to a vertex solution of the Haken normal equations. The construction of the certificate, and its verification, take place in the following steps. 1. Given a link diagram D, construct a piecewise-linear link L in R 3 that has regular projection D. From it construct a good triangulation of ML contains t tetrahedra, with and with a meridian marked in each component of @ML . (Use Lemma 7.1.) 2. Guess a suitable vertex solution v 2 Z 7t to the Haken normal equations for ML . (This solution can be written in polynomial length by Lemma 6.1.) Verify the quadrilateral disjointness conditions. Let S denote the associated normal surface, so 3. Verify that S is a sphere that splits two components of @ML . (a) Verify that S is connected by verifying that v is a minimal vertex solution. (b) Verify that S is a sphere by verifying that 2. (c) Verify that S separates two components T and T 0 of @ML by verifying that the number of intersections of S with the marked arc joining T and T 0 is odd. 10. Determining the genus Finally, the algorithm of section 8 can easily be generalized to solve the GENUS PROBLEM in polynomial space. 1. Given a link diagram D and a genus k, verify as before that D is a knot diagram. 2. Construct a piecewise-linear knot K in R 3 that has regular projection D, together with a good triangulation. From it construct MK contains t tetrahedra, with O(n), with a meridian marked in @MK . 3. Guess a suitable fundamental solution v 2 Z 7t to the Haken normal equations for MK . (Here we use Theorem 5.2.) Verify the quadrilateral disjointness conditions. Let S denote the associated normal surface, so 4. Verify that S is a connected orientable surface @S a circle, with genus g(S) - k and with @S a longitude in @MK . (a) Verify that S is connected by verifying the connectedness of an undirected graph with nodes corresponding to triangles in the triangulation of S and edges joining matching triangles. (b) Verify that S is orientable by verifying the non-connectedness of an undirected graph with nodes representing each of the two sides of triangles in the triangulation and edges joining matching sides of matching triangles. (Since the surface S is embedded and connected in an orientable manifold, S is orientable if and only if it is two-sided.) (c) Verify that @S is a single circle by verifying that it is non-empty and connected (as an undirected graph). (d) Verify that S has genus at most k by verifying that -(S) - Verify that @S is a longitude in @MK by verifying that the homology class (0; 1) in H 1 (@MK ; Z=2Z). This can be done by verifying that the number of intersections of @S with the marked meridian of @MK is odd. In Steps 4a, 4b and 4c, we use the fact that in an undirected graph in which nodes can be written down in polynomial length and in which adjacency of nodes can be tested in polynomial space, the connectedness of the graph can be determined in polynomial space (see Savitch [24]). Since all other steps can clearly be implemented in at most polynomial space, this yields an algorithm for the GENUS PROBLEM in polynomial space. 11. Conclusion We know of no non-trivial lower bounds or hardness results for any of the problems we have discussed; in particular, we cannot even refute the implausible hypothesis that they can all be solved in logarithmic space. There are also a great many other knot properties and invariants apart from those considered here, and for many of them it is a challenging open problem to find complexity bounds. One interesting question is whether the UNKNOTTING PROBLEM is in co-NP. Thurston's geometrization theorem for Haken manifolds implies that knot groups are residually finite [12]. It follows that a non-trivial knot has a non-cyclic representation into a finite permutation group. Unfortunately no way is yet known to bound the size of this group; if the number of symbols in the smallest such permutation group were bounded by a polynomial in the number of crossings, then the UNKNOTTING PROBLEM would be in co-NP. In practice the order of such a group seems to be quite small. Perhaps the most ambitious of the open problems is to determine the complexity of the KNOT EQUIVALENCE PROBLEM (see Waldhausen [33] and Hemion [10]). --R The knot book. "Topological Invariants of Knots and Links" "New Points of View in Knot Theory" Uber die Topologie des dreidimensional Raumes" "How to Draw a Planar Graph on a Grid" "Theorie der Normalfl-achen: Ein Isotopiekriterium f?r den Kreisknoten" "Algorithms for recognizing knots and 3-manifolds" "The number of Reidemeister moves needed for unknotting" The Classification of Knots and 3-Dimensional Spaces "Residual finiteness for 3-manifolds" "An Algorithm to Decide If a 3-Manifold Is a Haken Manifold" "Algorithms for the Complete Decomposition of a Closed 3-Manifold" "PL Equivariant Surgery and Invariant Decompositions of 3-Manifolds" "On the Computational Complexity of the Jones and Tutte Polynomials" "A Polynomial Invariant of Knots via von Neumann Algebras" "Geschlossene Fl-achen in dreidimensionalen Mannigfaltigkeiten" "Affine Structures in 3-Manifolds, V: The Triangulation Theorem and Hauptvermutung" "Knots in Random Walks" "Recursive Unsolvability of Group-Theoretic Problems" "Relationship between Nondeterministic and Deterministic Tape Classes" "Links, quantum groups and TQFTs" Theory of Linear and Integer Programming "Bestimmung der Primfaktorzerlegung von Verkettungen" "A Trivial Knot Whose Spanning Disks Have Exponential Size" Classical Topology and Combinatorial Group Theory "Knots in Self-Avoiding Walks" "Recent Results on Sufficiently Large 3-Manifolds" Complexity: Knots "The Complexity of Knots" --TR Theory of linear and integer programming Knots in random walks Complexity: knots, colourings and counting Efficient Planarity Testing Computers and Intractability Hilbert Bases, Caratheodory''s Theorem and Combinatorial Optimization The Computational Complexity of Knot and Link Problems --CTR Ian Agol , Joel Hass , William Thurston, 3-manifold knot genus is NP-complete, Proceedings of the thiry-fourth annual ACM symposium on Theory of computing, May 19-21, 2002, Montreal, Quebec, Canada Masao Hara , Seiichi Tani , Makoto Yamamoto, Unknotting is in AM co-AM, Proceedings of the sixteenth annual ACM-SIAM symposium on Discrete algorithms, January 23-25, 2005, Vancouver, British Columbia M. Murakami , M. Hara , M. Yamamoto , S. Tani, Fast algorithms for computing Jones polynomials of certain links, Theoretical Computer Science, v.374 n.1-3, p.1-24, April, 2007 J. A. Makowsky , J. P. Mario, The parametrized complexity of knot polynomials, Journal of Computer and System Sciences, v.67 n.4, p.742-756, December
three-dimensional topology;computational complexity;knot theory
302245
Likelihood Ratio Derivative Estimation for Finite-Time Performance Measures in Generalized Semi-Markov Processes.
This paper investigates the likelihood ratio method for estimating derivatives of finite-time performance measures in generalized semi-Markov processes (GSMPs). We develop readily verifiable conditions for the applicability of this method. Our conditions mainly place restrictions on the basic building blocks (i.e., the transition probabilities, the distribution and density functions of the event lifetimes, and the initial distribution) of the GSMP, which is in contrast to the structural conditions needed for infinitesimal perturbation analysis. We explicitly show that our conditions hold in many practical settings, and in particular, for large classes of queueing and reliability models. One intermediate result we obtain in this study, which is of independent value, is to formally show that the random variable representing the number of occurring events in a GSMP in a finite time horizon, has finite exponential moments in a neighborhood of zero.
Introduction When running a simulation, one is often interested in estimating derivatives of a performance measure with respect to parameters of the input distributions (e.g., routing probabilities, time distributions and service time distributions in queueing networks; lifetime distributions and repair time distributions of components in reliability models). One reason for computing derivative estimates is that they are useful for sensitivity analysis. For example, in the reliability context, a designer of a system may want to determine where to focus design efforts to improve overall system performance. In addition, efficient derivative estimation plays an important role in simulation-based optimization algorithms (e.g., see Glynn 1986, 1989a). One approach for estimating derivatives via simulation is the likelihood ratio method (also called the score function method); e.g., see Aleksandrov, Sysoyev, and Shemeneva (1968), Arsham et al. (1989), Glynn (1986,1989a,1990), Reiman and Weiss (1986,1989), Rubinstein (1986,1989), L'Ecuyer (1990,1995), Nakayama, Goyal, and Glynn (1994), and Nakayama (1995). Overviews of this technique may be found in Bratley, Fox and Schrage (1987), Glynn (1987), L'Ecuyer (1991) and Rubinstein and Shapiro (1993). The validity of this technique has been established explicitly for certain performance measures of classes of discrete- space, discrete-time Markov chains (Glynn 1986), discrete-space, continuous-time Markov chains (Reiman and Weiss 1989, and Nakayama, Goyal, and Glynn 1994), and general-state- space Markov chains that have a regenerative structure, also called Harris chains (Glasserman and Glynn 1992). The performance measures that have been studied have mainly been transient ones: performance measures that are based on the behavior of the stochastic process in some time interval from the beginning, the length of which is either fixed or random (a stopping-time). Steady-state performance measures have been studied insofar as they can be expressed as functions of stopping-time based transient performance measures using some regenerative structure. The main impediment in verifying the validity lies in justifying the interchange of derivative and expectation that is required in this method. L'Ecuyer (1990,1995), Reiman and Weiss (1989) and Rubinstein and Shapiro (1993) have general conditions that ensure when this interchange is justified. However, these conditions are difficult to verify in many specific contexts. In this paper, we establish conditions that are readily verifiable in many contexts for the validity of the likelihood ratio method in the setting of generalized semi-Markov processes (GSMPs). A GSMP is a general mathematical framework for modeling many discrete-event systems, and there has been a considerable amount of work studying different aspects of this class of stochastic processes; e.g., see Shassberger (1976), Whitt (1980), Glynn (1989b), Haas and Shedler (1987), and Glasserman and Yao (1992a, 1992b). Also, because their dynamics closely follow those of event-driven simulations, GSMPs have been useful in modeling systems analyzed through simulation and for studying various simulation methodologies; e.g., see Glynn and Iglehart (1988), Glasserman (1991a), and Glasserman and Yao (1992c). In this paper we use the GSMP framework to study the likelihood ratio derivative estimation method applied to finite-time performance measures, i.e., performance measures that are expectations of random variables that can be determined by a fixed time t. The generality of the GSMP framework enables us to verify the applicability of the likelihood ratio derivative estimation method for large classes of reliability and queueing models. In fact, this whole project was initially motivated by the need to do simulation-based derivative estimation in a large class of reliability models of the type in Heildelberger, Shahabuddin, Nicola (1994), Nicola, Nakayama, Heildel- beger and Goyal (1993) and Nicola, Shahabuddin, Heidelberger, Glynn (1993). These are non-Markovian versions of models constructed and analyzed by the SAVE software package (Blum et al. 1993). An alternative method for estimating derivatives using simulation is infinitesimal perturbation analysis (IPA); e.g., see Ho and Cao (1983), Heidelberger et al. (1988), and Glasserman (1991a). Glasserman (1991a,1991b,1991c) established conditions under which this method will give rise to unbiased estimates of derivatives of finite-time performance measures of GSMPs. One main difference between the conditions for IPA and our conditions for the likelihood ratio method is that ours impose restrictions on the basic building blocks (i.e., the transition probabilities, the distribution and density functions of the event lifetimes, and the initial distribution) of the GSMP, whereas those for IPA relate to the underlying structure of the GSMP. We give examples of large classes of stochastic models for which one can justify the validity of the likelihood ratio method but not IPA, due to the limitations posed by the structural conditions. On the other hand, the IPA method admits a larger class of event-time distributions than the likelihood ratio method. Also, the variance of likelihood ratio method derivative estimators grows quite fast as the length of the observation increases; e.g., see Glynn (1987) for results in the setting of discrete-time Markov chains. Thus, for large time horizons t, the likelihood ratio method is statistically inefficient for estimating derivatives. IPA derivative estimators do not suffer from this drawback. The rest of the paper is organized as follows. Section 2 contains a description of the GSMP model with which we will work. Section 3 reviews the basic idea of the likelihood ratio method for estimating derivatives. The section also provides a proof of the validity of the method in the GSMP setting under a set of technical conditions. One intermediate result that is derived here, shows that the random variable representing the number of occurring events in the GSMP in [0; t], has finite exponential moments around the neighborhood of zero. This is done by bounding the GSMP by an age-dependent branching process, and using results on finite exponential moments of such branching processes. Section 4 gives some simple sufficient conditions for our conditions in Section 3 to hold. In particular, we show that the conditions hold in many settings arising in practice. Finally, in Section 5 we explicitly demonstrate that the conditions in Section 3 hold for certain classes of reliability models and queueing network models. Mathematical Model We model the evolution of our stochastic system as a generalized semi-Markov process (GSMP), which we now describe. Our development of the model closely follows Glasserman's (1991a) approach. We denote the (physical) state space of the process by S, where we assume that S is either finite or countably infinite. For example, in the context of multi-class queueing networks, a state in S contains information about the number of customers of each type at each station, along with any description of the queueing at the various stations. We let A denote the set of events. In the example of multi-class queueing networks, the events are the completion of service and external customer arrival at each station. We make the following assumption: A1 The set A is finite. A case where this assumption is not satisfied is the infinite-server queue. For a state s 2 S, we define E(s) as the set of active events in state s; i.e., these are the events that may occur when the system is in state s. In our queueing-system example, a service-completion event at a particular queue is only possible in states in which the server at that queue is busy. We introduce a scalar parameter ' with respect to which derivatives are computed. For example, ' might represent the mean arrival time of customers or a routing probability in a queueing network. After computing the derivative, we then want to evaluate the derivative at the parameter value and \Theta is some open set. We can easily extend our setting of calculating a derivative with respect to a scalar-valued parameter ' to work with computing the gradient with respect to a vector-valued parameter considering each ' (i) separately. For each event e 2 A, we let F ( denote the distribution used to generate event times for e under parameter value '. We assume that each distribution function F ( has a density f( (with respect to Lebesgue measure) and that F (0; initial state is chosen using the probability mass function -( \Delta ; '), and given that a state s is selected as the initial state, we generate event times for each event e 2 E(s) from F ( For each ' 2 \Theta, s 2 S, and e 2 A, let p( \Delta ; s; e; ') be a probability mass function on S. Under parameter value ', if the system is currently in a state s 2 S and some event e 2 E(s) occurs, then the system immediately moves to a new state s 0 2 S with probability p(s the are called the transition probabilities. (The general theory of GSMPs allows for more generality; e.g., see Glynn 1989b.) For any state s 2 S, we define the set of possible clock readings as We identify with an jAj-dimensional vector that we write as c. When the system is in state s, the clock c(e) for any active event e 2 E(s) is run down at rate 0 -(s; e) ! 1. We assume that -(s; e) ? 0 for some e 2 E(s). In most applications -(s; letting -(s; e) assume values other than 1 allows greater modeling capabilities. For example, we can model pre-emptive service by setting -(s; is a service-completion event that is pre-empted in state s. We assume that the clock rates are bounded; i.e., There exists some constant - ! 1 such that the clock rates -(s; e) - for all s 2 S and all e 2 A. In most applications, A2 holds, but one example where it does not is an infinite-capacity open queueing system in which the rate at which the server processes customers is proportional to the queue length. We assume that in each state s 2 S, there is at least one active event e 2 E(s). Given that the system is currently in state s with clock vector c, we define as the holding time in the current state. Also, we define which is the event triggering the transition out of the current state. (Since all of the clock times have continuous distributions, two clocks are never equal with probability one for all parameter values '.) For states s; s 0 2 S and an event e 2 A, let C(s denote the set of events that are active in state s but are cancelled upon the transition to state s 0 triggered by the event e. Then we define the set of new events N (s and the set of old events O(s respectively. After a transition from state s to state s 0 triggered by event e, for each (new) event e 0 a new clock value c(e 0 ) is generated from the distribution F ( Also, for each (old) event we update its new clock value to be c(e immediately after entering state s 0 . Each (cancelled) event e 0 2 C(s originally active in state s but may no longer be active in state s 0 . Note that we allow for the possibility that a cancelled event e 0 is immediately reactivated (i.e., e e)), in which case a new clock value is immediately generated for the event e 0 . We define the discrete-time Markov process f(Y is the n-th state visited and c n is the vector of clock readings just after the n-th transition. The state space of the process is s2S (fsg \Theta C(s)); and its transition probability is as follows: for A ae \Sigma of the form fixed (possibly infinite) real numbers the transition probability from (s; c) to A under parameter value ' is -((s; c); A; Y Y and 1fBg is the indicator function of the probability event fBg. We define our continuous-time GSMP as a piecewise-constant process that stays in state Y n for an interval of length t (Y precisely, let - which is the epoch of the n-th transition. For notational simplicity, define e which is the number of transitions that occur by time t - 0. Then, we define our GSMP Let P ' denote the probability measure governing our GSMP under parameter value ', and be the expectation operator induced by P ' . space of the GSMP, and let F t denote the filtration of the GSMP up to a (deterministic) loosely speaking, the history of the process up to time t); e.g., see Section 36 of Billingsley (1986). Let ff(t; our performance measure, where V (t; ') is some F t -measurable random variable. We will be interested in estimating the derivative d d' ff(t; ') at the parameter be the probability measure of the GSMP when we fix is the expectation operator induced by P ' 0 We now impose some restrictions on the random variable V (t; '): A3 There exists some constant h ? 0 such that V 0 (t; '; !) j d d' -almost 2\Omega and all ' 2 (' h), and there exist random variables W and W 0 such that -probability 1 for all ' 2 (' We show in Section 4 that many performance measures of interest satisfy the above condition. 3 Likelihood Ratio Derivative Method In this section we review the likelihood ratio method for estimating d d' d' which is to be evaluated at the parameter value To compute d like to bring the derivative operator inside the expectation. However, the expectation operator depends on ', and so some care must be taken. Assuming that P ' is absolutely continuous with respect to P ' 0 restricted to the filtration F t , we have that Z Z where L(t; is the Radon-Nykodym derivative of P ' with respect to P '0 restricted to the filtration F t , or simply the likelihood ratio. absolutely continuous with respect to another probability measure Q 2 if the sets of Q 2 -measure 0 are also of Q 1 -measure 0; e.g., see Section 32 of Billingsley 1986.) This is known as a "change of measure," and Glynn (1989) and Damerdji (1994) established its validity for GSMPs in certain contexts. Thus we have expressed the performance measure ff(t; ') as an expectation of some random quantity taken with respect to a probability measure that is independent of the parameter '. The key question that remains now is whether we can bring the derivative operator inside the expectation; i.e., whether d d' d d' Assumption A1 of L'Ecuyer (1990) and Assumption A1 0 (k) of L'Ecuyer (1995) (see also Rubinstein and Shapiro 1993) provide conditions when (2) holds on a general probability space. However, in the specific context of the GSMP, these are difficult to verify directly. Before answering the interchange question in the GSMP setting, let us first determine the exact form of the likelihood ratio L(t; '). Heuristically, the likelihood ratio L(t; ') is given by Y Y see Glynn and Iglehart (1989) for further details. However, if the above version of the likelihood ratio is used, we would need very restrictive conditions on the distribution functions F to justify the interchange of derivative and expectation. (For example, we would have to change A5 below to alternatively require f( uniformly on [0; 1) as which is not even satisfied when F is the exponential distribution with mean 1='.) To get around this, we instead work with a slightly modified GSMP, which leads to a different likelihood ratio but does not alter the distribution of V ('; t). We do this by changing the distributions from which clock times are generated: for all e 2 A, define the new distribution function where we recall that t is the time horizon. Note that F (x; e; ') is a mixed (continuous and discrete) distribution that is the same as F (x; e; ') for x - t, and has a point mass of probability - F (- t; e; ') at the point - before, now more than one event can occur at the same time. We can use any rule we want to deal with this. For example, we can order the set of events in some manner, and if more than one event occurs at the same time, we take the "lowest" of these events as the "occurring" event (for determining the next physical state visited, etc. In any case, both the original and the modified GSMP (i.e., the process Z defined in the previous section) have the same distribution of sample paths in [0; t]. Since V ('; t) is only dependent on the sample path of the GSMP from time 0 to t (i.e., it is F t -measurable), using the new distributions for generating clock times does not change the distribution of V ('; t). By applying this approach, we will only require mild conditions on the distribution functions F to prove the interchange. The new likelihood ratio is given by Y Y Y Y Now assuming that (2) holds, we see that applying the product rule of differentiation yields d d' where with d' d' d' d' gives the derivative of a likelihood ratio expression similar to (3), but for the case of a fixed number of transitions (in contrast to a fixed time horizon). Also, Glynn did not establish the validity of the interchange of the derivative and expectation in the likelihood ratio derivative method applied to GSMPs. Now we develop conditions on the basic building blocks of the GSMP under which (2) is valid. (We later give in Section 4 some easily verifiable sufficient conditions for the following conditions to hold.) First, we impose some regularity conditions on the densities generating the event lifetimes. A4 For each event e 2 A, there exists h ? 0 such that the set f (e) independent of ' for ' 2 (' A5 For each event e 2 A such that f (e) 6= ;, for each ffl ? 0 there exists h ? 0 such that uniformly on f (e) as A6 For each event e 2 A such that f (e) 6= ;, there exists h ? 0 such that f( \Delta ; e; ') is differentiable in ' on f (e) for all ' 2 (' \Delta) is uniformly bounded on f (e) \Theta (' Note that Condition A4 does not permit the support of the distribution of the lifetime of an event e to depend on '. Thus, for example, we disallow an event e to have a uniform distribution with support (0; '). We will now present some properties of - are implied by the previous conditions on f( The proof of this lemma may be found in the Appendix. Let - Assume that Condition A4-A6 hold. Then (i) there exists h ? 0, such that - F (e) is independent of ' for ' 2 (' (ii) for each event e 2 A, uniformly on [0; - t] as (iii) for each event e 2 A such that - 0 such that (iv) for each event e 2 A such that - is differentiable in ' for all ' 2 (' F (- t; e; \Delta; ) is bounded on We now impose some regularity conditions on the initial distribution. A7 There exists h ? 0 such that the set - independent of ' for A8 For each ffl ? 0 there exists h ? 0 such that uniformly on - as There exists h ? 0 such that -( \Delta ; ') is differentiable in ' on - for all ' 2 (' uniformly bounded on - \Theta (' Finally, we impose some regularity conditions on the transition probabilities. There exists h ? 0 such that the set 0g is independent of ' for ' 2 (' A11 For each ffl ? 0 there exists h ? 0 such that all uniformly on p as There exists h ? 0 such that p( \Delta ; \Delta; \Delta; ') is differentiable in ' on p for all ' 2 (' \Delta) is uniformly bounded on p \Theta (' In some sense, Conditions A4-A12 ensure that the basic building blocks of our GSMP are well-behaved functions of ' in a neighborhood of ' 0 . Now we establish the validity of (2). Theorem 1 If Conditions A1-A12 hold, then [V (t; ')L(t; ')] is differentiable and (2) is valid. To show that Theorem 1 holds, we will first need to prove the following result which is of independent value. Conditions A1, A2, A4 and A5 hold. Then there exists constants z 0 ? 0 Proof. Observe that N(t) has the same distribution whether we use F ( to generate lifetimes for the event e 2 A. Hence, we work with F ( For the case of systems with no event cancellation, we can show the result using the methods employed in the proofs of Corollary 3.3 of Glasserman (1991a) and Theorem 2.1 on page 155 of Prabhu (1965), that use results from renewal theory. For systems with event cancellation, we need a new approach, which is given below and uses results from the theory of branching processes. We will establish the result by first constructing a new process that bounds N(t). Then we will show that this new process has the same distribution as a multi-type, age-dependent branching process (see, e.g., Athreya and Ney (1972) for a definition). We then bound this multi-type age-dependent branching process by a single-type, age-dependent branching pro- cess, and finally use a result of Nakayama, Shahabuddin, and Sigman (1996). For simplicity, we will assume that all of the clock rates -(s; 1. The proof can be easily generalized when the clock rates are unequal and bounded, as in Condition A2. For each e 2 A, recall that lifetimes of the event e follow a distribution F ( '). Some of the lifetimes may not expire in the GSMP because of event cancellation. In what follows, we frequently will be using the following multi-type, age-dependent branching process. To simplify notation, let 1. The branching process has m different types of objects, indexed by e. Objects of type e have lifetime distributions F ( '). The branching process begins at time 0, at which time one object of each type is born, i.e., a total of m objects are born. Each object lives for a random time (specified by its corresponding lifetime distribution) and then dies. When any object dies, it instantaneously gives birth to exactly one object of each type. The process thus continues. We now construct a sample path of our first bounding process as follows. We begin by generating a sample path of the original GSMP in [0; t]. Then we do the following: ffl In the sample-path generation of the original GSMP, at each transition point (equivalent to an event expiration point of a non-cancelled event, but also includes of events (which may also be a null-set) in A are scheduled. In the new process, at each transition point of the GSMP we schedule each of the other events in A that have not already been scheduled at that transition point. These new events are never cancelled and whenever any of them expire, we start a multi-type branching process of the sort mentioned before. ffl In the original GSMP, events are cancelled. In the new process, we let each of the cancelled events run to expiration. And whenever any of them expires, we again start a multi-type branching process of the kind mentioned before. Let B(t) be the total number of events scheduled in [0; t] in this constructed process. We now claim that this constructed process is a sample path of a multi-type, age-dependent branching process. On first glance this claim may seem incorrect. This is because the event expiration times of cancellable events (if not cancelled) depend on the event expiration times of events that cause the cancellation (by their expiration). Then the independent lifetimes assumption of a branching process seems to be violated. However, a careful argument reveals otherwise. Note that the only difference between the constructed process and an ordinarily generated, multi-type, age-dependent branching process is the order of generation of the lifetimes. In the ordinary case, the lifetimes may have been generated sequentially, i.e., we first generate the lifetimes of each of the m objects in the first generation, then of each of the m 2 objects in the second generation, and so on. In the constructed process, the order in which we generate lifetimes is random. Not only is it random, but the next lifetime one chooses to generate depends on the position and length of the lifetimes already generated. However, the lifetimes themselves are independent of anything in the system and hence the order of generation will not change the distribution of the branching process. Now consider a new branching process defined as follows. The branching process begins at time 0, at which time m objects are born. When any object dies, it gives birth to exactly m objects. The lifetime of each object follows a distribution H, which depends only on ' 0 . We define it as follows. First, define a distribution function G with G(x; for x - 0, and 0 otherwise. Note that if X e has distribution F ( using Condition A4, A5, and part(ii) of Lemma 1 we can easily show that G(x; uniformly on the set [0; t], as Hence, we can choose a sufficiently small h ? 0 such that jG(x; note that ffl - 1=(2m). Now define the new distribution function H as follows: H(x; ' 0 otherwise. Observe that the distribution H( stochastically smaller (see Ross 1983) than G( which implies that H( stochastically smaller than for all ' 2 (' because we assumed that F (0; Note that the above defines a single-type, age-dependent branching process. Let B 0 (t) be the number of objects born up to and including time t, Also, since H( stochastically smaller than G( we have that B 0 (t) is stochastically larger than B(t) for all t - 0 and ' 2 (' Finally, since H(0; ' 0 )m ! 1, we can use Theorem 3.1 of Nakayama, Shahabuddin, and Sigman (1996) to show that there exists some z 0 ? 0 such that so the proof is complete. Proof of Theorem 1. We need to show that for all sufficiently small ffi, the absolute values of the difference quotients are dominated uniformly by a P '0 - integrable random variable. By the mean value theorem, for each sufficiently small ffi, there exists which is finite since jAj ! 1. Choose ffl ? 0 such that Clearly, by Lemma 2, this is possible. Now choose a sufficiently small h ? 0 so that Conditions A3, A4, A6, A7, A9, A10, A12 and part (iv) of Lemma 1 hold; Conditions A5, A8, A11 and part (iii) of Lemma 1 hold for the above ffl; and (7) holds for all jffij - h. Hence in (7), the j's corresponding to these ffi's always lie in (' First consider the term V (t; j)L 0 (t; j). From (5), Y Y F (- t; e; Y Y F (- t; e; \Delta6 6 4 F (- t; e; All of the density functions f( in the above expression are evaluated at points no greater than - t. Now we define sup sup sup By Conditions A1, A4-A12, and part(iii) and (iv) of Lemma 1, M 2 (h), M 4 (h), M 6 (h), and 8 (h) are finite, and M 1 (h), M 3 (h), M 5 (h), and M 7 (h) lie in the interval Then, letting OE 1 with -probability 1 by Condition A3. Repeated applications of the Schwarz inequality yields In addition, using the fact that OE 1 we have that implies that all moments of N(t) exist under P ' 0 and hence Hence, OE(h) is -integrable. Similarly, we can show that jV 0 (t; j)L(t; j)j is uniformly dominated -integrable random variable. Finally, applying the dominated convergence theorem completes the proof. It will be worthwhile comparing our conditions with similar ones in the literature. First, consider the "amiability" condition used in Theorem 3 of Reiman and Weiss (1989). One may use Theorem 3 of Reiman and Weiss to validate the exchange of derivative and expectation only in special cases of our setup, i.e., where ' is present only in one distribution and it never appears as a variable in the performance measure. However, even if we impose these restrictions in our setting, the amiability condition is difficult to verify directly. One can show, only with the help of Lemma 2 and a mean value theorem, that our assumptions (with Condition A3 replaced by the weaker and more tractable assumption used in Proposition 1 below) imply the amiability condition. Secondly, consider assumption (1995). Though the setting used there is different from ours, we can still make some comparisons. For example, our Condition A3 is similar to his conditions on the performance measure. Also, in some sense, our type of distributional conditions imply the distributional conditions in A3(k) of L'Ecuyer; i.e, if our type of distributional conditions hold, then one can use a constant close to 1 as his bounding random variable \Gamma 1i (i) and some constant as his bounding random variable \Gamma 2i (i). If we use N(t) as an analogue to his discrete stopping time - , then an analogous result to Lemma 2 given below will prove that the conditions specified in A3(k) on \Gamma 1i (i) and \Gamma 2i (i) hold. We now compare our conditions to those employed by Glasserman (1991a,1991b) to show the unbiasedness of IPA derivative estimators in the GSMP context. First, note that our conditions mainly impose restrictions on the basic building blocks of the GSMP. On the other hand, the conditions for IPA are primarily on the structure of the GSMP. In particular, Glasserman requires a "commuting condition" which places limitations on the relationship between active events in certain states and the transition probabilities from those states and from possible immediate successor states. The condition essentially ensures that if slightly altering the value of the parameter ' results in a change in the order of two events on a sample path, then the sample path can (in some sense) correct itself on the next event. Moreover, Glasserman does not permit the initial distribution nor the transition probabilities to depend on the parameter '. Another difference is the type of performance measure ff(t; In our results, we restrict V (t; ') to be any F t -measurable random variable that satisfies Condition A3, where t is deterministic. Glasserman allows V (t; ') to be an additive functional up to a time T , but T is allowed to be either deterministic, the time of the n-th transition, or the time of the n-th occurrence of a particular event. Sufficient Conditions for A1-A12 to Hold We now show that our assumptions hold in many settings arising in practice. (In Section 5 we explicitly demonstrate that the following sufficient conditions are satisfied for large classes of reliability and queueing models.) First consider Condition A3. Proposition 1 Suppose Conditions A1, A2, A4 and A5 hold. Also, suppose ff(t; is an F t -measurable random variable such that V 0 (t; '; !) exists for P '0 -almost 2\Omega and all ' 2 (' that satisfies the following: (i) there exist finite constants -probability 1 for all ' 2 (' (ii) there exist finite constants K 3 with -probability 1 for all ' 2 (' Then Condition A3 holds. Proof. We need to show that W j K 1 second moments when the parameter value . But this follows from Lemma 2. We now show directly that many performance measures arising in practice satisfy Condition A3. Proposition 2 Suppose the performance measure ff(t; one of the real-valued function on S with g(s; \Delta ) continuously differentiable for each s 2 S, and either (a) jSj ! 1, or (b) g( and are uniformly bounded on S \Theta (' d' Then Condition A3 holds. Note that V 0 (t; has form (ii). Proof. First note that V (t; ') in (i) and (ii) are F t -measurable. When condition (i) holds, trivially satisfies Condition A3. Now consider form (ii). Assuming that either condition (ii)(a) or (ii)(b) holds and since g(s; \Delta ) is continuously differentiable, we have that for sufficiently small h ? 0, - t, which satisfies Condition A3. Now we show that two rich classes of distributions, the Gamma distribution and the Weibull distribution, with the ' in each case being the scale parameter, satisfy the distributional conditions given in A4-A6. The Gamma distribution is widely used in all types of stochastic modeling; the Weibull distribution is one of the most frequently employed distributions in reliability modeling. Proposition 3 Suppose the lifetime of an event e has a gamma density with shape parameter a ? 0 and scale parameter ' ? 0; i.e., f(x; for the given e, (i) the set fx independent of ' for ' ? 0; uniformly on [0; t] as uniformly bounded on [0; t] \Theta (' 0 =2; 3' 0 =2) . Proof. Part (i) is trivial. For part (ii), note that f(x; e; ')=f(x; which converges to 1 uniformly on [0; t] as For part (iii), note that f 0 (x; a 2a for all x 2 [0; t] and all ' 2 (' 0 =2; 3' 0 =2). Proposition 4 Suppose the lifetime of an event e has a Weibull density with shape parameter a ? 0 and scale parameter ' ? 0; i.e., f(x; Then for the given e, (i) the set fx independent of ' for ' ? 0; uniformly on [0; t] as uniformly bounded on [0; t] \Theta (' 0 =2; 3' 0 =2) . We omit the proof since it is similar to that of Proposition 3. Note that we do not need to consider any distributions that do not depend on the parameter ' when checking if Conditions A4-A6 are satisfied. The same is true for the initial distribution -( Conditions A7-A9, and the transition probabilities p( Conditions A10-A12. The following result shows that if the state space is finite and the convergence and bounds in Conditions A8, A9, A11, and A12 hold, then they are automatically uniform. The proof is trivial and is therefore omitted. Proposition 5 Suppose that jSj ! 1. Then (i) Condition A8 holds if -(s; ')=-(s; ' (ii) Condition A9 holds if for each s 2 S, there exists some h ? 0 (which may depend on s) such that - 0 (s; \Delta)=-(s; \Delta) is bounded on (' (iii) Condition A11 holds if for each (s (iv) Condition A12 holds if for each (s 0 ; s; e) 2 p , there exists some h ? 0 (which may depend on s) such that p 0 is bounded on (' 5 Examples We now give some examples of systems for which Conditions A1-A12 hold. The first example deals with a large class of reliability models, and the second example considers a large class of multiclass queueing networks. 5.1 Reliability Models Consider the class of reliability models studied in Heidelberger, Shahabuddin, and Nicola (1994), Nicola, Shahabuddin, Heidelberger, and Glynn (1993), and Nicola, Nakayama, Heidelberger, and Goyal (1993). These are systems composed of K components, where each component can fail and get repaired. Component lifetimes and repair times are generally distributed. There are R classes of repairmen in the system, each consisiting of a finite number of repairmen. The repair of each component is assigned to one repairman class. The repair strategy used by a repairman class may be pre-emptive or non-pre-emptive priority with FCFS or random order service used between members of the same priority class. We allow for the following interpen- dencies among the components. First, the operation of an operational component may depend on certain other components being operational. In addition, the repair of a failed component may depend on certain other components being operational. Also, the failure of a component may cause other components to fail instantaneously with certain probabilities. This is called failure propagation, which is an example of how cancelled events arise. The system is considered operational if certain sets of components are operational. The physical state of the system after the nth transition is given by Y n is 1 or 0 depending on whether the ith component is operational or failed after the n-th transition, and Q (j) n is the repair queue at the j-th repairman class. Note that jSj ! 1. It is easy to see that the process fZ As we previously mentioned, the system is considered operational if certain sets of components are operational. More formally, U is the set of operational states and F is the set of failed states. The system is considered operational at time t if otherwise, it is considered down. We assume that at time in the system are operational and new (i.e., all components have age = 0). Thus, the initial distribution is independent of the parameter ', and so Conditions A7-A9 are automatically The events in the system are either component failures or component repairs. Clearly, 1 as there are a maximum of 2K events in the entire system since each of the K components can have a failure and repair event associated with it. Hence, Condition A2 is satisfied since jSj ! 1. If there is no failure propagation in the system then the outcome of any event e, given that the system is currently in some state s, is fixed; i.e., p(s for exactly one state s 0 and 0 otherwise. However, if we have failure propagation in the system then there may be some randomness in the final state reached from any given state after an event, and Proposition 5 provides sufficient conditions for Conditions A11 and A12 to hold. The transient performance measures in which one may be interested are the unreliability and the expected interval unavailability. The unreliability is the probability of a system failure before some fixed time t. Hence, in this case ff(t; is of form (i) in Proposition 2 and A is the event fZ s 2 F for some s - tg. Thus, Condition A3 holds. The interval unavailability is the fraction of time in [0; t] that the system is down. In this case, ff(t; is of form (ii) in Proposition 2 with g(Z s Fg=t. Note that g(Z s ; ') is independent of ' and therefore V 0 (t; '; -probability 1, and so Condition A3 is satisfied. In the reliability setting one is usually interested in the derivatives of the performance measures with respect to (i) parameters of the failure time distribution of individual compo- nents; (ii) parameters of the repair time distribution of individual components; (iii) the failure propagation probabilities. For the first two cases, the likelihood ratio derivative estimation method is applicable if the distributions that depend on the parameter with respect to which the derivative is taken satisfy Conditions A4-A6. Some special cases where these conditions are satisfied are when the distribution and the parameter are as in Propositions 3 and 4. In the third case, the density functions f( are independent of the parameter ', and so Conditions A4-A6 are automatically satisfied. Also, p(s typically will be of the form are constants. Clearly, Condition A10 is satisfied for ' 2 (0; 1). Since jSj and jAj are finite, we only have to check the conditions given in Proposition 5. For the particular form of p(s these conditions are satisfied for all For this class of reliability systems, it turns out that Glasserman's (1991a,1991b) conditions for the unbiasedness of IPA derivatives typically are not satisfied. In particular, Glasserman assumed that events are never cancelled, but this could occur in this setting since we allowed for failure propagation. Also, his "commuting condition" will not hold for many repair strategies. For example, if there is only one repairman who fixes all failed components in a first-come first-served fashion, then this condition will be violated. Moreover, Glasserman's work does not cover performance measures such as the unreliability. However, IPA can admit many more event-time distributions. For example, one can use a repair time that is uniformly distributed over (0; ') (the ' also being the parameter) in IPA, but it is not allowed by the results in this paper. 5.2 Queueing Networks Consider a multiclass queueing network where service times for each customer class at each station are generally distributed random variables. We assume that there is a finite number of servers at each station, and that each customer class uses Markovian routing; i.e., when a customer of type i completes service at station j, he immediately goes to station k with probability R i (j; k). We consider both open and closed networks. For the case of open networks, we assume that the arrival process of a class at each station is a renewal process with generally distributed inter-renewal times. The events in the system are customer arrivals (one for each customer class at each station) and customer service completions (one for each customer class for each server at each station). Hence, again the event set is finite. In most applications Condition A2 is satisfied. As mentioned earlier, one situation in which it is not is in an open network with the service rate of customers at a station is proportional to the number of customers in the system. If we assume that the network is closed and always starts in the same customer configura- tion, then the initial distribution is independent of the parameter ', and so Conditions A7-A9 are automatically satisfied. Similarly, if we assume that the network is open and always starts with no customers present, then the initial distribution is independent of the parameter ', and Conditions A7-A9 automatically hold. Some of the performance measures of interest in such systems are (i) the expected time-average queue length over [0; t] at a given station; (ii) for the case of open networks, the expected time-average number of customers over [0; t] in the entire system; (iii) for the case of open networks, the probability that total number of customers in the system exceeds some threshold in time interval [0; t] (if the network has a finite combined buffer, then this is the probability that there is at least one customer loss due to buffer overflow in [0; t]). We now show that Condition A3 holds for each of the above performance measures. Since in all cases V (t; ') is independent of ' and V 0 (t; '; only have to show that E '0 [(V (t; 1. For case (iii), this is obvious. Case (i) for closed networks is also obvious. For case (i) for open networks and case (ii) and no customers are initially in the system, this follows from Lemma 2 when Conditions A2, A4 and A5 hold. This is because, say for case (ii), if we let Q(s) be the total number of customers in the system at time s, then Q(s)ds -t N(s)ds -t and so Proposition 1 implies that Condition A3 holds under Conditions A2, A4 and A5. One may be interested in the derivatives of the performance measures with respect to (i) a parameter of the service time distribution of a class at a particular station; (ii) in the case of open networks, a parameter of the interarrival-time distribution of a certain customer class at a particular station; (iii) the routing probability of a certain customer class at a particular station. As in the case with the reliability models, for the first two cases, the likelihood ratio derivative estimation method is applicable if the distributions that depend on the parameter with respect to which the derivative is taken satisfy Conditions A4-A6. Some widely used cases when these conditions are satisfied are when the distribution and the parameter are of the type given in Proposition 3 and Proposition 4. In the third case, for the case of closed networks, due to the finiteness of the state space, we can again apply Proposition 5. For the case of open networks, Proposition 5 is no longer useful as now the state space is no longer finite. However, since the number of stations is finite and since there is Markovian routing, there are only finitely many different values that the assume. Hence, to show that Conditions A11 and A12 hold, we only have to make sure that each of the transition probabilities is continuous at ' 0 , and that each of the in some neighborhood of ' 0 . These conditions hold if p(s is of the form c 1 are constants. For the multi-class queueing systems considered here, Glasserman's (1991a,1991b) conditions for unbiasedness of IPA derivatives typically are not satisfied. Specifically, his "com- muting condition" will not hold for multi-class networks of our generality. For example, if a particular station that is visited by more than one customer class is fed by more than one source, then this condition is violated. Also, Glasserman's work does not cover performance measures such as the probability of a buffer overflow occurring before time t. Finally, Glasserman disallows the routing probabilities (more generally, the state-dependent transition probabilities) to depend on the parameter '. However, as we mentioned before, IPA admits many more event-time distributions. We should mention that Conditions A1-A12 will hold for more general queueing networks. For example, it can be shown that they typically are valid when there is state-dependent routing. 1 A Appendix Proof of Lemma 1: 1 The work of the first author was supported in part by NSF CAREER Award DMI-96-24469 and by NJIT SBR Grant No. 421180. The work of the second author was supported in part by NSF Grant DMS-95-08709 and by NSF CAREER Award DMI-96-25291. The authors would like to thank the area editor, associate editor, and two referees for their helpful and detailed comments. (i) Obvious. (ii) We wish to show that for any ~ ffl ? 0 there exists ffi ? 0, such that for all ' satisfying From Conditions A4 and A5, for any ~ ffl ? 0, there exists than the h is Condition A4), such that for all ' satisfying or for all x 2 f (e). From Condition A4, for x 2 [0; - all ' satisfying Therefore (10) still holds. Choose . Hence from (10), for any ~ ffl ? 0 there exists ffi ? 0, such that for all ' satisfying we have that or - for all y 2 [0; - t]. Subtracting - from each term and using the fact F (y; we get (9). (iii) This follows immediately from part (ii) of the Lemma. (iv) By Conditions A4 and A5, for any ~ffl ? 0, there exists than the h in Condition A4) such that f(x; e; ') - f(x; and x 2 f (e), define D(ffi; Conditions A4 and A6, there exists a h 2 smaller than h 1 , such that for all ' 2 (' exists and jf 0 (x; ffl)Kf some constant K ? 0. From part(iii) of Lemma 1, there exists h 3 such that for all ' 2 Choose the h in part (iv) of Lemma 1 to be min(h )=2. By the mean value theorem, for all ' 2 (' as shown in the previous paragraph, f 0 (x; e; ') exists), for all sufficiently small ffi there exists all we have that Also Z Then by the dominated convergence theorem, for all ' 2 (' 0 \Gammah; ' 0 +h), R R R R --R "Stochastic Optimization," "Sensitivity Analysis and the " Probability and Measure System Availability Estimator (SAVE) Language Reference and User's Manual A Guide to Simulation (2nd "Maximum Likelihood Ratio Estimation for Generalized Semi-Markov Pro- cesses," Gradient Estimation Via Perturbation Analysis "Structural Conditions for Perturbation Analysis Derivative Estimates: Finite Time Performance Indices," "Structural Conditions for Perturbation Analysis of Queuing Systems," "Gradient Estimation for Regenerative Processes," and Wilson "Monotonicity in Generalized Semi-Markov Processes," "Generalized Semi-Markov Processes: Antimatroid Structure and Second-Order Properties," "Some Guidelines and Guarantees for Common Random Numbers," "Stochastic Approximation for Monte Carlo Optimization," Likelihood ratio gradient estimation: an overview. "Optimization of stochastic systems via simulation," IEEE Press "A GSMP Formalism for Discrete-Event Systems," "Likelihood Ratio Derivative Estimators for Stochastic Systems," "Simulation Methods for Queues: An Overview," "Importance Sampling for Stochastic Simulations," "Regenerative Generalized Semi-Markov Processes," "Convergence Properties of Infinitesimal Perturbation Analysis Estimates," "Bounded Relative Error in Estimating Transient Measures of Highly Dependable Non-Markovian Systems," "Optimization and Perturbation Analysis of Queueing Networks," "Note: On the Interchange of Derivative and Expectation for Likelihood Ratio Derivative Estimators," "Asymptotics of Likelihood Ratio Derivative Estimators in Simulations of Highly Reliable Markovian Systems," "Likelihood Ratio Sensitivity Analysis for Markovian Models of Highly Dependable Systems," "A Note on Exponential Moments for "Fast Simulation of Highly Dependable Systems with General Failure and Repair Processes.," "Fast Simulation of Steady State Availability in Non-Markovian Highly Dependable Systems," "Sensitivity Analysis via Likelihood Ratios," IEEE Press "Sensitivity Analysis for Simulations via Likelihood Ratios," New York "The Score Function Approach for Sensitivity Analysis of Computer Simulation Models," Sensitivity analysis and performance extrapolation for computer simulation models. Discrete Event Systems: Sensitivity Analysis and Stochastic Optimization by the Score Function Method "On the Equilibrium Distribution of a Class of Finite-State Generalized Semi-Markov Processes," "Continuity of Generalized Semi-Markov Processes," --TR --CTR Sigrn Andradttir , Paul Glasserman , Peter W. Glynn , Philip Heidelberger , Sandeep Juneja, Perwez Shahabuddin, 1962--2005: A professional appreciation, ACM Transactions on Modeling and Computer Simulation (TOMACS), v.17 n.2, p.6-es, April 2007 Pierre L'Ecuyer , Valrie Demers , Bruno Tuffin, Rare events, splitting, and quasi-Monte Carlo, ACM Transactions on Modeling and Computer Simulation (TOMACS), v.17 n.2, p.9-es, April 2007
gradient estimation;Generalized Semi-Markov Processes;simulation
302948
A Robust Competitive Clustering Algorithm With Applications in Computer Vision.
AbstractThis paper addresses three major issues associated with conventional partitional clustering, namely, sensitivity to initialization, difficulty in determining the number of clusters, and sensitivity to noise and outliers. The proposed Robust Competitive Agglomeration (RCA) algorithm starts with a large number of clusters to reduce the sensitivity to initialization, and determines the actual number of clusters by a process of competitive agglomeration. Noise immunity is achieved by incorporating concepts from robust statistics into the algorithm. RCA assigns two different sets of weights for each data point: the first set of constrained weights represents degrees of sharing, and is used to create a competitive environment and to generate a fuzzy partition of the data set. The second set corresponds to robust weights, and is used to obtain robust estimates of the cluster prototypes. By choosing an appropriate distance measure in the objective function, RCA can be used to find an unknown number of clusters of various shapes in noisy data sets, as well as to fit an unknown number of parametric models simultaneously. Several examples, such as clustering/mixture decomposition, line/plane fitting, segmentation of range images, and estimation of motion parameters of multiple objects, are shown.
Introduction Traditional clustering algorithms can be classified into two main categories [1]: hierarchical and partitional. In hierarchical clustering, the number of clusters need not be specified a priori, and problems due to initialization and local minima do not arise. However, since hierarchical methods consider only local neighbors in each step, they cannot incorporate a priori knowledge about the global shape or size of clusters. As a result, they cannot always separate overlapping clusters. Moreover, hierarchical clustering is static, and points committed to a given cluster in the early stages cannot move to a different cluster. Prototype-based partitional clustering algorithms can be divided into two classes: crisp (or hard) clustering where each data point belongs to only one cluster, and fuzzy clustering where every data point belongs to every cluster to a certain degree. Fuzzy clustering algorithms can deal with overlapping cluster boundaries. Partitional algorithms are dynamic, and points can move from one cluster to another. They can incorporate knowledge about the shape or size of clusters by using appropriate prototypes and distance measures. These algorithms have been extended to detect lines, planes, circles, ellipses, curves and surfaces [2, 3, 4, 5]. Most partitional approaches use the alternating optimization technique, whose iterative nature makes them sensitive to initialization and susceptible to local minima. Two other major drawbacks of the partitional approach are the difficulty in determining the number of clusters, and the sensitivity to noise and outliers. In this paper, we describe a new approach called Robust Competitive Agglomeration (RCA), which combines the advantages of hierarchical and partitional clustering techniques [6]. RCA determines the "optimum" number of clusters via a process of competitive agglomeration while knowledge about the global shape of clusters is incorporated via the use of prototypes. To overcome the sensitivity to outliers, we incorporate concepts from robust statistics. Overlapping clusters are handled by the use of fuzzy memberships. The algorithm starts by partitioning the data set into a large number of small clusters which reduces its sensitivity to initialization. As the algorithm progresses, adjacent clusters compete for points, and clusters that lose the competition gradually vanish. However, unlike in traditional hierarchical clustering, points can move from one cluster to another. RCA uses two different sets of weights (or memberships) for each data point: the first one is a set of probabilistically constrained memberships that represent degrees of sharing among the clus- ters. The constraint generates a good partition and introduces competition among clusters. The second set of memberships is unconstrained or possibilistic [8, 9, 10], and represents degrees of "typicality" of the points with respect to the clusters. These memberships are used to obtain robust estimates of the cluster prototypes. The organization of the rest of the paper is as follows. In section 2, we briefly review other related approaches. In section 3, we present the RCA algorithm. In section 4, we illustrate the power and flexibility of RCA to incorporate various distance measures. In section 5, we describe the application of RCA to segmentation of range images. In section 6, we formulate a multiple model general linear regression algorithm based on RCA and apply it to simultaneous estimation of motion parameters of multiple objects. Finally, section 7 contains the conclusions. Related Work Most prototype-based partitional clustering algorithms such as K-Means and Fuzzy C-Means assume that the number of clusters, C, is known. Moreoever, since they use a least squares criterion, they break down easily (i. e., the prototype parameter estimates can be arbitrarily wrong [11]) in the presence of noise. The goal of clustering is to identify clusters in the data set. This implicitly assumes that we have a definition for a valid cluster. Thus, the idea of break down [11] can be extended to the clustering domain via the use of validity [12]. When the number of clusters, C, is known, the ideal cluster breaks down only when the outliers form a valid cluster with a cardinality higher than the cardinality, min , of the smallest good cluster. This gives us the theoretical breakdown point of N min =N , where N is the number of points in the data set. Recent solutions to robust clustering when C is known can be divided into two categories. In the first category are algorithms that are derived by modifying the objective function of FCM [13, 14, 10]. These algorithms are still sensitive to initialization and other parameters [12]. The algorithms in second category incorporate techniques from robust statistics explicitly into their objective functions. A notable non-fuzzy clustering algorithms in this category is the K-Medoids algorithm [15]. Bobrowski and Bezdek [16] proposed an L 1 -norm-based fuzzy clustering algorithm which also falls into this category. However, there is no mention of robustness in this paper. A variation of this algorithm that is motivated by robustness can be found in [17]. Another early fuzzy clustering algorithm (on which RCA is based) is the Robust C-Prototypes (RCP) algorithm [18], which uses the M-estimator [19]. The Fuzzy Trimmed C Prototypes algorithm [20] uses the least trimmed squares estimator [21], the Robust Fuzzy C Means (RFCM) algorithm [22] again uses the M-estimator in a different way, and the Fuzzy C Least Median of Squares (FCLMS) algorithm [23] uses the least median of squares estimator [21]. FTCP and FCLMS can achieve the theoretical breakdown point of N min =N with a trivial modification to their objective functions. However, in theory, they both require an exhaustive search. To reduce the computational complexty, a heuristic search is used in [20]and a genetic search is used in [23]. When C is unknown, one way to state the clustering problem is: find all the valid clusters in the data set (see [12] for a more precise definition). In this case, the ideal algorithm will not break down because it will identify all the "good" clusters correctly (say by exhaustive search), in addtion to some spurious ones. An alternative way to state the problem is: identify only all the valid clusters formed by the good data. In this case, the ideal algorithm will break down when the outliers form a valid cluster, giving us the breakdown point of N minval =N , where N minval is the minimum number of points required to form a valid cluster. Note that a given clustering algorithm may not achieve these theoretical breakdown points. The traditional approach to determining C is to evaluate a certain global validity measure of the C-partition for a range of C values, and then pick the value of C that optimizes the validity measure [25, 1, 26, 27]. An alternative is to perform progressive clustering [28, 27, 5], where clustering is initially performed with an overspecified number of clusters. After convergence, spurious clusters are eliminated, compatible clusters are merged, and "good" clusters are identified. Another variation of progressive clustering extracts one cluster at a time [29, 30]. These approaches are either computationally expensive, or rely on validity measures (global or individual) which can be difficult to devise. Robust approaches to clustering when C is unknown treat the data as a mixture of components, and use a robust estimator to estimate the parameters of each component. The Generalized MVE (GMVE) [29] which is based on the Minimum Volume Ellipsoid estimator [21], the Model Fitting (MF) algorithm [31], and the Possibilistic Gaussian Mixture Decomposition (PGMD) algorithm [30] are some examples. In the above approaches, the data set is classified into a set of "inliers", i.e., points belonging to a cluster, and a set of "outliers". Since the set of outliers includes points from other clusters, the proportion of outliers can be very high. Therefore, even the use of a robust estimaor with the theoretical-best breakdown point of 50% is not sufficient to make these algorithms highly robust. To overcome this problem, these algorithms consider the "validity" of the cluster formed by the inliers, and try to extract every valid cluster in the data set. In order to guarantee a good solution, the GMVE and PGMD use many random initializations. Cooperative Robust Estimation (CRE) [32] and MINPRAN [33] are two other robust model-fitting approaches that fall into this category. The CRE algorithm attempts to overcome the low breakdown point of M-estimators by initializing a large number of hypotheses and then selecting a subset of the initial hypotheses based on the Minimum Description Length (MDL) criterion. The CRE technique assumes that the scale (' in [32]) is known. MINPRAN assumes that the outliers are randomly distributed within the dynamic range of the sensor, and the noise (outlier) distribution is known. Because of these assumptions, CRE and MINPRAN do not easily extend to the clustering domain. If the data is expected to have multiple curves, MINPRAN seeks one curve/surface at a time. In [12] the relation between the above progressive approaches and other robust clustering algorithms are explored. When the clusters overlap, the idea of extracting them in a serial fashion will not work. Removing one cluster may partially destroy the structure of other clusters, or we might get "bridging fits" [33]. Fig. 2(a) shows one such noisy data set with two crossing clusters. The algorithm we propose is designed to overcome this drawback. Moreover, all the current algorithms use hard finite rejection [34], i.e., points within an inlier bound are given a weight of 1, and points outside the bound are given a weight of zero. This means that these algorithms do not handle the "region of doubt" [21] very well. To overcome this problem, we use smooth [34, 21] or fuzzy rejection, where the weight function drops to zero gradually. 3 The Robust Competitive Agglomeration (RCA) algorith 3.1 Algorithm Development be a set of N vectors in an n-dimensional feature space with coordinate axis labels C-tuple of prototypes each of which characterizes one of the C clusters. Each fi i consists of a set of parameters. The Fuzzy C-Means algorithm [2] minimizes: subject to In (1), d 2 ij represents the distance of feature vector x j from prototype fi i , represents the degree to which x j belongs to cluster i, is a C \ThetaN matrix called the constrained fuzzy C-partition matrix, and m 2 [0; 1) is known as the fuzzifier. Jm , which is essentially the sum of (fuzzy) intra-cluster distances, has a monotonic tendency, and has the minimum value of zero when C=N . Therefore, it is not useful for the automatic determination of C. To overcome this drawback, we add a second regularization term to prevent overfitting the data set with too many prototypes. The resulting objective function JA is: which is minimized subject to the constraint in (2). In (3), the second term is the negative of the sum of the squares of the cardinalities of the clusters, and is minimized when the cardinality of one of the clusters is N and the rest of the clusters are empty. With a proper choice of ff, we can balance the two terms to find a solution for C. JA is still not robust, since the first term is a Least Squares objective function. Therefore, we robustify JA to yield the objective function for the proposed RCA algorithm as follows: In (4), ae i () is a robust loss function associated with cluster i, and w represents the "typicality" of point x j with respect to cluster i. The function ae i () corresponds to the loss function used in M-estimators of robust statistics and w i () represents the weight function of an equivalent W-estimator (see, [11], for example). This particular choice for robustification is motivated by the need to keep the computational complexity low. The loss function reduces the effect of outliers on the first term, and the weight function discounts outliers while computing the cardinalities. By selecting d ij and the ff prudently, JR can be used to find compact clusters of various types while partitioning the data set into a minimal number of clusters. To minimize JR with respect to the prototype parameters, we fix U and set the derivative of JR with respect to fi i to zero, i.e., 0: (5) Further simplification of (5) depends on ae i () and d ij . Since the distance measure is application dependent, we will return to this issue in Section 4. To minimize (4) with respect to U subject to (2), we apply Lagrange multipliers and obtain We then fix B and solve st st ae s (d 2 st Equations (7) and (2) represent a set of of N \ThetaC +N linear equations with N \ThetaC +N unknowns st , and - t ). A computationally simple solution can be obtained by computing the using the memberships from the previous iteration. This yields: st 2ff \Theta ( st Solving for - t using (8) and (2), and substituting in (8), we obtain the following update equation for the membership u st of feature point x t in cluster st st ff ae s (d 2 st st st where u RR st is the degree to which cluster s shares x t (computed using robust distances), and st is a signed bias term which depends on the difference between the robust cardinality, of the cluster of interest and the weighted average of cardinalities kt . C kt The bias term, u Bias st , is positive(negative) for clusters with cardinality higher(lower) than average, and hence the membership of x t in such clusters will appreciate(depreciate). When a feature point x j is close to only one cluster (say cluster i), and far from other clusters, we have N i - N j , or u Bias implying no competition. On the other hand, if a point is roughly equidistant from several clusters, these clusters will compete for this point based on cardinality. When the cardinality of a cluster drops below a threshold, we discard the cluster, and update the number of clusters. It is possible for u ij to become negative if N i is very small and point x j is close to other dense clusters. In this case, it is safe to set u ij to zero. It is also possible for u ij to become larger than 1 if N i is very large and feature point x j is close to other low cardinality clusters. In this case it is clipped to 1. This practice is customary in optimization theory. The process of agglomeration, controlled by ff, should be slow in the beginning to encourage the formation of small clusters. Then it should be increased gradually to promote agglomeration. After a few iterations, when the number of clusters becomes close to the "optimum", the value of ff should again decay slowly to allow the algorithm to converge. Therefore an appropriate choice of ff in iteration k is. ij In (10), ff and j are functions of the iteration number k, and the superscript used on ij , and w ij to denote their values in iteration k \Gamma 1. A good choice for j is is the initial value, - is the time constant, and k 0 is the iteration number at which j starts to decrease. In all examples presented in this paper (except in section 5 where these parameters were fine-tuned for best performance), we choose proper initialization, these values are reasonable regardless of the application. Initialization issues are discussed in section 7. 3.2 Choice of the weight function In curve/surface fitting or linear regression, it is reasonable to assume that the residuals have a symmetric distribution about zero. Therefore, we choose Tukey's biweight function [11] given by if jr where r ij stands for the normalized residual defined as: r c \Theta MAD i In (12)-(14), r ij is the residual of the j th point with respect to the i th cluster, Med i is the median of the residuals of the i th cluster, and MAD is the median of absolute deviations [11] of the i th cluster. In other words, in each iteration, the data set X is crisply partitioned into Med i and MAD i are estimated for each cluster. When distances (rather than residuals) are used, the symmetric distribution assumption does not hold. We suggest a monotonically non-increasing weight function w [0; 1] such that w i (d 2 is a constant, and T i and S i are given by Choosing w results in the following weight function: The corresponding loss function can be shown to be In (17) K i is an integration constant used to make all ae i () reach the same maximum value. This choice ensures that all noise points will have the same membership value in all clusters. Fig 1 shows the plot of the weight function and the corresponding loss function. In (14), (16), and (17), c is a tuning constant [11] which is normally chosen to be between 4 and 12. When c is large, many outliers will have small nonzero weights, thus affecting the parameter estimates. On the other hand, if c is small, only a subset of the data points will be visible to the estimation process, making convergence to a local minimum more likely. As a compromise, we start the estimation process with a large value of c, and then decrease it gradually as function of the iteration number (k), i.e., with c 0 =12, c min =4, and \Deltac=1. The RCA algorithm is summarized below. Fix the maximum number of clusters Initialize the prototype parameters, and set Repeat Compute Estimate T i and S i by using (15); Update the weights w ij by using (13) or (16); Update ff(k) by using (10); Update the partition matrix U (k) by using (9); Compute the robust cardinality N If Update the number of clusters C; Update the tuning factor c by using (18); Update the prototype parameters; Until prototype parameters stabilize 4 Examples of Distance Measures As mentioned in section 3.1, RCA can be used with a variety of distance measures depending on the nature of the application. In this section, we discuss distance measures suitable for ellipsoidal clusters and hyperplanes. 4.1 Detection of Ellipsoidal Clusters To detect ellipsoidal clusters in a data set, we use the following distance measure [35, 36]. In (19), c i is the center of cluster fi i , and C i is its covariance matrix. (See [37] for an interpretation of d 2 Cij .) Using (5), it can be shown that the update equations for the centers c i and the covariance matrices C i are If we assume C reduces to the Euclidean distance. This simplified version can be used when the clusters are expected to be spherical. Fig. 3 illustrates RCA using d 2 Cij . Fig. 3(a) shows a synthetic Gaussian mixture consisting of 4 clusters of various sizes and orientations. Uniformly distributed noise constituting 40% of the total points was added to the data set. Fig. 3(b) shows the initial 20 prototypes superimposed on the data set, where "+" signs indicate the cluster centers, and the ellipses enclose points with a Mahalanobis distance less than 9. These prototypes were obtained by running the G-K algorithm [36] for 5 iterations. After 2 iterations of RCA, 9 empty clusters are discarded (see Fig. 3(c)). The number of clusters is reduced to 6 after 3 iterations, and to 4 after 4 iterations. The final result after a total of 10 iterations is shown in Fig. 3(d). To illustrate the ability of RCA to handle non-uniform noise, Fig. 4 shows the result of RCA on a data set containing Gaussian clusters with roughly 25% noise. To illustrate the ability of the RCA algorithm to detect overlapping clusters, in Fig. 2(b) we show the result of RCA on the data set in Fig. 2(a). The algorithm converged in 10 iterations. 4.2 Detection of Linear Clusters To detect clusters that resemble lines or planes, we use a generalization of the distance measure proposed in [3, 2]. This distance is given by where e ik is the k th unit eigenvector of the covariance matrix C i . The eigenvectors are assumed to be arranged in ascending order of the corresponding eigenvalues. The value of - ik in (22) is chosen dynamically in every iteration to be - is the k th eigenvalue of C i . It can be shown that for the distance measure in (22), the update equations for c i and C i are given by (20) and (21) respectively. Fig. 5(a) shows an image consisting of 10 line segments in a noisy background. Fig. 5(b) shows the 20 initial prototypes obtained by running the AFC algorithm [3] for 5 iterations. After 2 iterations of RCA, the number of clusters drops to 15 as shown in Fig. 5(c). After 9 iterations, the number of clusters reduces to the "optimal" number and the algorithm converges after a total of 12 iterations. The final result is shown in Fig. 5(d). 5 Application to Range Image Segmentation 5.1 Planar Range Image Segmentation Since planar surface patches can be modeled by flat ellipsoids, the distance measure d 2 in (19) can also be used to find the optimal number of planar patches. To avoid missing tiny surfaces, we start by dividing the image into non-overlapping windows of sizes W s \ThetaW s . Then, we apply RCA in each window with to estimate the optimal number of planar patches within the window. Finally, we pool the resulting (say M) prototypes to initialize the RCA algorithm with C=M . Because of the nature of d 2 Cij , planar surfaces with non-convex shapes may be approximated by several planar patches, or several spatially disconnected planar patches may be approximated by a single cluster. Therefore, after RCA converges, we merge compatible clusters [27] that are adjacent. We then perform connected component labeling on each cluster, and assign different labels to disjoint regions. The above RCA-based algorithm was tested on two standard data sets, ABW data set and perceptron data set, that were created for bench-marking range image segmentation algorithms [38]. Each set contains 40 images of size 512\Theta512, and has been randomly divided into a 10-image training set and a 30-image testing set. We use the performance measures developed by Hoover et al. [38] to evaluate the performance of RCA. These measures rely on comparing the Machine Segmented (MS) image and the Ground Truth (GT) image, and classify the regions into one of the 5 categories: correct detection, over-segmentation, under- segmentation, missed, and noise. The accuracy of the segmentation is quatified by computing the average and standard deviation of the differences between the angles made by all pairs of adjacent regions that are instances of correct detection in the MS and GT images. The above data sets and performance measures have been used in [38] to compare the University of South Florida (USF), University of Edinburgh (UE), Washington State University (WSU), and University of Bern (UB) segmentation algorithms. Here, we will reproduce the same set of experiments and include the RCA algorithm in the comparison. In the training phase, we fine-tuned the parameters of RCA as follows: window size used in the initialization W initial number of prototypes in each window C (j (see (10)). These parameters are optimal for both ABW and Perceptron data sets. Since the Perceptron data is more noisy, we use c 4, and for the ABW data, c 8. Also, to reduce computations, all images were subsampled in the x and y directions by a factor of 3. These parameters are all then fixed in the testing phase. Fig 6(a) shows the intensity image of one of the ABW test images. The segmented range image is shown in Fig 6(b). The shaded gray regions correspond to background points that are ignored during segmentation. Fig. 7 shows an example from the Perceptron data set. As in [38], we compute the performance metrics of the five segmentation algorithms while varying the compare tool tolerance from 51% to 95%. Due to space limitation, we only show plots of the correct detection measure (Fig 8). The performance measures using an 80% compare tolerance for all five segmenters are listed in Table 1 for the ABW data and Table 2 for the Perceptron data. RCA compares very well with the best segmenters. Among the 5 planar surface segmenters in the comparison, UE, WSU, and RCA have the capability to segment curved surfaces. RCA has the additional advantage that it can handle irregularly spaced sparse data as well (e.g. range data computed from stereo methods). 5.2 Quadric Range Image Segmentation Let the i th prototype fi i , represented by the parameter vector p i , define the equation of a quadric surface as p T and is a 3-D point. Since the exact distance from a point x j to a quadric surface fi i has no closed-form expression, we use the approximate distance [39, 40] given by is the Jacobian of q evaluated at x j . To avoid the all-zero trivial solution for the following constraint may be chosen [39] Starting from (5), it can be shown that the use of d Aij leads to a solution of p i based on the following generalized eigenvector problem: F i and G To obtain a reliable initialization, we divide the image into small non-overlapping win- dows, and apply RCA in each window with C=1. Finally, we pool the resulting prototype parameters to initialize the RCA algorithm. Initially, there might be several initial prototypes corresponding to the same surface. However, due to competition, only one of these surfaces will survive. The examples used in this section consist of some 240\Theta240 real and some synthetic range images 1 . A sampling rate of 3 in the x and y directions was used to reduce computations. were used to estimate the initial prototypes. Fig. 9(a) shows a synthetic range image of a plastic pipe. Fig. 9(b) shows the initial 36 surface patches. These patches were generated after assigning each point to the nearest prototype. Fig. 9(c) shows the final results, where each each surface is displayed with a different gray value, and the boundaries are shown in black. Fig. 10(a) shows a real range image of three plastic pipes of different sizes and orientations. The final results of the RCA algorithm consisting of the correctly identified surfaces are shown in Fig. 10(b). To test the robustness of RCA, Gaussian noise (with oe=4) was added to the image in Fig. 9(a), and about 10% of the data points were randomly altered to become outliers. The These images were obtained from Michigan State University and Washington State University via anonymous ftp. results are shown in Fig. 11, where noise points (i.e. points with zero weight (w ij ) in all clusters) are shown in black. 6 Estimation of Multiple Motion Groups and Segmen- tation In this section, we show how RCA can be used to perform multiple model linear regression, and apply it to estimation of the motion parameters of multiple motion groups. 6.1 General Linear Regression The General Linear Regression (GLR) [41] for solving a set of homogeneous equations for motion parameters can be written as: is the design matrix with x is the parameter vector, and is the residual vector. Since the system is homogeneous, we can fix fi and reformulate the GLR model as: N-dimensional vector with every component equal to 1, can be solved by the least squares minimization: min fi with the solution: least squares is very sensitive to noise. An alternative is the weighted least squares: min fi with the solution: fi If a data set contains multiple models, the GLR model must be applied repetetively to extract one model at a time. This approach is computationally expensive, requires models to be well separated, needs a high breakdown estimator (since while extracting the i th model, all other models are considered as outliers), and is sensitive to initialization. To deal with these problems, we propose the Multiple-Model General Linear Regression (MMGLR) method, which allows the simultaneous estimation of an unknown number of models. 6.2 Multiple-Model General Linear Regression Let the i th model with the parameter vector fi represented by is the residual corresponding to the j th data vector in the i th model. MMGRL minimizes (4) (where d 2 ij is replaced by r 2 subject to the constraint in (2). Solving (5) corresponding to this situation leads to @ iN ). The resulting update equation for the parameters is: In linear regression, it is customary to use the studentized residuals r where h jj is the j th diagonal element of the hat matrix Huang et al. [41] showed that the corresponding hat matrix for GLR is H To extend this principle to the MMGLR, we compute C hat matrices (i. e., one per model), as The residuals can be normalized as r jj . However, this normalization introduces a bias towards noise points (w ij - 0) or points belonging to other models In this case h (i) jj - 0, and hence no normalization takes place. Also, residuals will be inflated for points which are typical of the i th model since they are divided by a factor smaller than one. Therefore, we modify the normalization process as follows: r otherwise where h In other words, points which are known to be atypical of the th model, are forced to receive the maximum possible inflation factor. MMGLR can be used to estimate the motion parameters of multiple objects in the same scene. The instantaneous velocity - p(t) of a point located on the surface of a translating object rotating with an instantaneous angular velocity is characterized by - is a vector involving translation. Let (X(t); Y (t)) be the 2-D prespective projection of p(t) onto the image plane at Z=1, and let (u(t); v(t)) denote its projective instantaneous velocity. Motion estimation consists of solving for ! and k using a set of N observations their corresponding . This can be done by solving N ]; a Once h has been determined, the motion parameters and k can be easily obtained [42]. Since h is 9-dimensional and represents a set of homogeneous equations, we need only 8 observations to solve for the optical flow [42]. When a scene consists of C independently moving objects, the motion of each object can be characterized by a different vector h i . In this situation, we need to solve Ah solves this set of equations where X and fi i correspond to A and h i respectively. It finds C automatically. MMGLR requires an overspecified number (C) of initial parameter estimates. We obtain each one of these estimates by solving on a randomly selected subset of 8 observa- tions. These C estimates are then pooled together to initialize the MMGLR algorithm. To ensure a reliable result, the initial number of models C needs to be high. However, since C decreases drastically in the subsequent iterations, this method is still efficient. Since MMGLR allows points to move from one model to another, and since fuzzy rejection allows points to change from inliers to outliers and vice versa smoothly, we can afford to use a smaller number of initializations than algorithms based on hard rejection. In both experiments described in this subsection, we use C=50. Fig. 12(a) shows a synthetic 3-D scene consisting of 4 touching rigid objects, each undergoing a motion with different rotational and translational velocities. Fig. 12(a) displays the subsampled and scaled true optic flow field. We contaminated this optic flow field with Gaussian noise (SNR=70), and additionally altered 20% of the observations randomly to make them outliers. The resulting optic flow field is shown in Fig. 12(b). MMGLR succeeds in determining the correct number of motion groups in the scene. It also estimates their motion parameters accurately, as shown in Table 3. Fig. 12(c) shows the segmented optic flow field where each motion group is represented by a different symbol. The correctly identified outliers (points having zero weight w ij in all models) are shown as black dots in Fig. 12(c). The recovered optic flow field is shown in Fig. 12(d). Figs. 13(a) and 13(b) show two 512\Theta512 subimages of the 13 th and 14 th frames in a motion sequence [43] containing a moving truck. In this experiment, the background motion (due to camera panning) is treated as another motion group to create a multiple motion scenario. We selected target points on the vehicle, and another 30 points from the background. The matches of these 60 points were computed using a robust matching algorithm [44] and verified manually. To illustrate the robustness of MMGLR, we added another 10 target points with erroneous matches. All 70 points are marked '+' in Figs. 13(a) and 13(b). The target points and their matches were first converted from pixel coordinates to image coordinates, and then calibrated [43]. Finally, all target points were integrated to form the mixture data set f(X is the image coordinates of the i th target point in the 13 th frame, and displacement vector. The "ground truth" for the vehicle motion is unknown. Also, since the rotation angle of the truck is too small (about 5 could not be estimated reliably using two-view point correspondence and three-view line correspondence algorithms [45]. Since we are testing the robustness of MMGLR and its ability to detect multiple models, and not the performance of the linear optic flow algorithm, we compare our results with those obtained when the linear optic flow algorithm is supplied with the correct data subset for each motion (see Table 4). MMGLR was first run with only the 60 good target points, and then with the added outliers. In both cases, the algorithm was able to detect the correct number of motion groups (=2) and estimate their parameters correctly. Fig. 14 shows the partition of the optic flow field where the two motion groups and the detected outliers are denoted by different symbols. 7 Discussion and Conclusions 7.1 General Comments RCA is an attempt at addressing the three main issues of partitional clustering algorithms (the difficulty in determining the number of clusters, sensitivity to initialization, and sensitivity to outliers), without sacrificing computational efficiency. RCA minimizes a fuzzy objective function in order to handle overlapping clusters. Constrained fuzzy memberships are used to create a competitive environment that promotes the growth of "good" clusters. Possibilistic memberships [10]are used to obtain robust estimates of the prototype parame- ters. Concepts from robust statistics have been incorporated into RCA to make it insensitive to outliers. To handle the region of doubt, and to reduce the sensitivity to initialization, RCA uses soft finite rejection. The agglomerative property makes it relatively insensitive to initialization and local minima effects. By using suitable distance measures, we can apply this algorithm to solve many computer vision problems. The choice of ff in (10) is quite critical to the algorithm. However, ff can be chosen by trial and error to produce stable results for a given application. The variety of examples presented in this paper show that this is possible, and that RCA can provide robust estimates of the prototype parameters even when the clusters vary significantly in size and shape, and the data set is contaminated. 7.2 Computational Complexity The RCA algorithm has a computational complexity similar to that of FCM [2], which is O(NC) in each iteration. Here, N is the number of data points, and C is the number of clusters. However, additional time is required to estimate the weight function w(d 2 ) which requires us to compute the median of the squared distances twice (first to compute the median, then to compute the MAD). The median of a data set can be computed iteratively using This procedure converges in O(log N) passes through the data set. Since the distribution of the squared distances does not change significantly in one iteration, this procedure converges even faster when the median of the previous iteration is used to initialize the computation of the median of the current iteration. Thus, the overall complexity can be estimated as O(N log N +NC) per iteration, or O(NK(logN +C)), where K is the number of iterations. It is to be noted that the value of C varies from C max to C final . Except for the application to motion analysis, in all other cases we use a standard algorithm such as FCM to initialize RCA. Therefore, the initialization overhead is O(NkC max ), where k is a small (- 5) integer. 7.3 Breakdown Issues As discussed in section 2, when C is known, the breakdown point is N min =N , and when C is unknown, the breakdown is either undefined or N minv al =N . These results were derived by the use of validity, and an ideal clustering algorithm would use a validity measure and an expensive exhaustive search to achieve this level of robustness [12]. However, validity measures are hard to define in practice unless the distribution of the good points is known. Moreover, deviations from the assumed distribution can occur with widely varying degrees in real applications, and it is hard to choose thresholds when their optimal values can vary widely among different data sets, and even among clusters in the same data set. RCA is a general purpose algorithm that attempts to achieve robustness with reasonable computational complexity. This is the rationale behind the choice of the M-estimator to robustify RCA. This choice limits the breakdown point of RCA to 1 , where p is the dimensionality of the parameter vector to be estimated. However, since RCA starts with a large mber of initial prototypes, it is possible to increase its robustness under certain conditions. RCA uses the initial prototypes to generate a partition. The algorithm consists of updating the weight function for each component of the partition, then updating the memberships, and then finally updating the prototypes. This process is repeated until convergence. Since the weight function uses the median and MAD, it can tolerate up to 50% noise points (within the component) provided it starts with a good initialization. Let there be C actual clusters. Let the good points from the k th actual cluster be given the label "k", let the noise points be labeled "0". Let the (hard) partition corresponding to the C max initial prototypes be labeled as follows. If a given component has only noise points, it is labeled "0", otherwise it is labeled "i", where i is the label of the majority of good points in the component. Let P max i denote the largest component with the label i. For the RCA algorithm to give robust results, we require an initialization that satisfies the following conditions. (i) There exists at least one component that has the label i, for all The prototype corresponding to P max i is a good point of the i th actual cluster. (iii) The largest component labeled "0" is smaller than P contains more than 50% of points labeled "i". Since the cluster region by definition is denser than the noise region, by using a sufficiently large number of prototypes, it is usually possible to achieve an initialization to meet these conditions in practice. Initial prototypes placed in the cluster region will naturally have larger cardinalities and those in the noise region will have smaller ones. Conditions (i)-(iv) need to be satisfied in the following iterations as well, to guarantee that the algorithm will converge to a correct result. However, since cardinalities are replaced by robust cardinalities in the subsequent iterations, it becomes easier to satisfy these conditions. When the components coalesce and form the final result, each noise point will be crisply assigned to one of the components while computing the weight function. In the worst case, all noise points can be assigned to the smallest cluster. Therefore, conditions (iii) and (iv) above translate to the requirement that the number of noise points be smaller than the cardinality of the smallest cluster. Thus, when (i)-(iv) are satisfied, RCA can achieve the theoretical breakdown point. A similar discussion applies to non-point prototypes as well, with minor modifications. In this case, each initial prototype can be generated with n data points, where n is the number of parameters in the prototype. 7.4 Initialization Issues From the above discussion, it is clear that initialization plays a very important role in the RCA algorithm. The initialization procedure necessarily varies with the type of prototypes used, the distance measure used, the type of data, and finally the application. We now outline some guidelines for initialization. We can compute a theoretical value for the initial number of clusters, C max , as follows. Let there be C exp number of actual clusters expected in the data set, let N i denote the cardinality of cluster i, and let n be the number of points required to generate a prototype. If we randomly pick n points to generate a prototype, then the probability p that we pick C exp good prototypes, one from each cluster, is given by QCexp . If this selection is repeated K times, the probability that one of these selections generates good prototypes for all C exp clusters is given by P . For a given value of P g , we can compute the value of K as, log (1\Gammap) e, and C max can be estimated as C This value of C max grows exponentially with C exp and n, and therefore is unrealistic. In practice, an existing clustering algorithm (such as FCM [2], GK [36], AFC [3]) can be used for initialization. At the end of such an initialization, although not all C max prototypes are expected to be good, we can assume that each of the C exp clusters has a fairly high probability, P init i , of being represented by one of the C max initial prototypes. For example, consider the case of finding lines in a 2-D data set, i.e. 2. If there are N total points, there are N(N possible ways to pick a pair of points, and hence N(N possible random initializations for a line. However, most of these initializations involve points that are far away from each other and constitute poor initializations. On the other hand, an algorithm such as AFC will use only nearby points, and the probability that two nearby points belong to the same line is high. If the data set is an image, then by dividing the image into small windows and applying a conventional clustering algorithm with a suitable number of clusters in each window can dramatically increase the value of P init . The probability that all C exp clusters are represented by the initialization is given by i . In this case, a much smaller number of initial clusters will suffice. Based on the above discussion, we suggest the following rules of thumb. For general clus- choose C max - N 10\Lambdan , and use a simple clustering algorithm (such as FCM) to generate the initial prototypes. Since good points are by definition in dense regions, this initialization can be expected to meet the conditions discussed in the previous sub-section. The case of plane and surface fitting can be handled by dividing the image into small windows and applying a suitable clustering algorithm in each window. In the case of regression, the above initialization techniques are no longer applicable. Hence, we use a random sampling procedure to generate the prototypes. Because of this randomness, we require a larger value for C max . In our applications, we set C max - N Acknowledgments The authors would like to thank the anonymous reviewers for their valuable comments. This work was partially supported by a grant from the Office of Naval Research (N00014- 96-1-0439). --R Algorithms for Clustering Data Pattern Recognition with Fuzzy Objective Function Algorithms "Use of the adaptive fuzzy clustering algorithm to detect lines in digital images," "Adaptive fuzzy c-shells clustering and detection of ellipses," "Fuzzy and possibilistic shell clustering algorithms and their application to boundary detection and surface approximation," "A robust clustering algorithm based on competitive agglomeration and soft rejection of outliers," "Clustering by competitive agglomeration," "Fuzzy sets as a basis for a theory of possibility," Possibility Theory: An Approach to Computerized Processing of Uncertainty "A possibilistic approach to clustering," Robust Statistics the Approach Based on Influence Functions "Fuzzy clustering and robust estimation," Finding Groups in Data: An Introduction to Cluster Analysis "c-means clustering with the l 1 and l 1 norms," "The fuzzy median and the fuzzy mad," "A robust clustering algorithm based on the m- estimator," Robust Statistics John Wiley "Fuzzy and robust formulations of maximum- likelihood-based gaussian mixture decomposition," "A genetic algorithm for robust clustering based on a fuzzy least median of squares criterion," "Some new indices for cluster validity," "Unsupervised optimal fuzzy clustering," "Fitting an unknown number of lines and planes to image data through compatible cluster merging," "Progressive fuzzy clustering algorithms for characteristic shape recognition," "Robust clustering with applications in computer vision," "Gaussian mixture density modeling, decomposition and applications," "A highly robust estimator through partially likelihood function modeling and its application in computer vision," "Cooperative robust estimation using layers of support," "Minpran: A new robust estimator for computer vision," "Fuzzy clustering with a fuzzy covariance matrix," "Fuzzy and possibilistic clustering methods for computer vision," "An experimental comparison of range image segmentation algorithms," "Estimation of planar curves, surfaces, and nonplanar space curves defined by implicit equations with application to edge and range image segmentation," "A comparison of fuzzy shell-clustering methods for the detection of ellipses," "Optic flow field segmentation and motion estimation using a robust genetic partitioning algorithm," "A simplified linear optic flow-motion algorithm," "A sequence of stereo image data of a moving vehicle in an outdoor scene," "A robust technique for matching two uncalibrated images through the recovery of the unknown epipolar geometry," "Vehicle-type motion estimation from multi-frame images," --TR --CTR Ujjwal Maulik , Sanghamitra Bandyopadhyay, Performance Evaluation of Some Clustering Algorithms and Validity Indices, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.24 n.12, p.1650-1654, December 2002 Raffaele Cappelli , Dario Maio , Davide Maltoni, Multispace KL for Pattern Representation and Classification, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.23 n.9, p.977-996, September 2001 Sanghamitra Bandyopadhyay , Ujjwal Maulik, An evolutionary technique based on K-means algorithm for optimal clustering in RN, Information SciencesApplications: An International Journal, v.146 n.1-4, p.221-237, October 2002 Ana L. N. Fred , Anil K. Jain, Combining Multiple Clusterings Using Evidence Accumulation, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.27 n.6, p.835-850, June 2005 M. Scionti , J. P. Lanslots, Stabilisation diagrams: pole identification using fuzzy clustering techniques, Advances in Engineering Software, v.36 n.11-12, p.768-779, November 2005 Miin-Shen Yang , Kuo-Lung Wu, A Similarity-Based Robust Clustering Method, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.26 n.4, p.434-448, April 2004 Cheng-Fa Tsai , Chun-Wei Tsai , Han-Chang Wu , Tzer Yang, ACODF: a novel data clustering approach for data mining in large databases, Journal of Systems and Software, v.73 n.1, p.133-145, September 2004 Bogdan Gabrys, Agglomerative Learning Algorithms for General Fuzzy Min-Max Neural Network, Journal of VLSI Signal Processing Systems, v.32 n.1-2, p.67-82, August-September 2002 A. K. Qin , P. N. Suganthan, Robust growing neural gas algorithm with application in cluster analysis, Neural Networks, v.17 n.8-9, p.1135-1148, October/November 2004 Ana L. N. Fred , Jos M. N. Leito, A New Cluster Isolation Criterion Based on Dissimilarity Increments, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.25 n.8, p.944-958, August Gianluca Pignalberi , Rita Cucchiara , Luigi Cinque , Stefano Levialdi, Tuning range image segmentation by genetic algorithm, EURASIP Journal on Applied Signal Processing, v.2003 n.1, p.780-790, January Geovany Araujo Borges , Marie-Jos Aldon, Line Extraction in 2D Range Images for Mobile Robotics, Journal of Intelligent and Robotic Systems, v.40 n.3, p.267-297, July 2004 Jun Liu , Jim P. Y. Lee , Lingjie Li , Zhi-Quan Luo , K. Max Wong, Online Clustering Algorithms for Radar Emitter Classification, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.27 n.8, p.1185-1196, August 2005 Martin H. C. Law , Mario A. T. Figueiredo , Anil K. Jain, Simultaneous Feature Selection and Clustering Using Mixture Models, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.26 n.9, p.1154-1166, September 2004 Kuo-Lung Wu , Miin-Shen Yang, Alternative learning vector quantization, Pattern Recognition, v.39 n.3, p.351-362, March, 2006 Kuo-Lung Wu , Miin-Shen Yang, Mean shift-based clustering, Pattern Recognition, v.40 n.11, p.3035-3052, November, 2007 Ozy Sjahputera , James M. Keller , J. Wade Davis , Kristen H. Taylor , Farahnaz Rahmatpanah , Huidong Shi , Derek T. Anderson , Samuel N. Blisard , Robert H. Luke , Mihail Popescu , Gerald C. Arthur , Charles W. Caldwell, Relational Analysis of CpG Islands Methylation and Gene Expression in Human Lymphomas Using Possibilistic C-Means Clustering and Modified Cluster Fuzzy Density, IEEE/ACM Transactions on Computational Biology and Bioinformatics (TCBB), v.4 n.2, p.176-189, April 2007 Mohamed Ben Hadj Rhouma , Hichem Frigui, Self-Organization of Pulse-Coupled Oscillators with Application to Clustering, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.23 n.2, p.180-195, February 2001 Jian Yu, General C-Means Clustering Model, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.27 n.8, p.1197-1211, August 2005 Anil K. Jain , Robert P. W. Duin , Jianchang Mao, Statistical Pattern Recognition: A Review, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.22 n.1, p.4-37, January 2000 Jasit S. Suri , Sameer Singh , S. K. Setarehdan , Rakesh Sharma , Keir Bovis , Dorin Comaniciu , Laura Reden, A note on future research in segmentation techniques applied to neurology, cardiology, mammography and pathology, Advanced algorithmic approaches to medical image segmentation: state-of-the-art application in cardiology, neurology, mammography and pathology, Springer-Verlag New York, Inc., New York, NY, 2001
robust clustering;robust statistics;motion estimation;optimal number of clusters;range image segmentation;linear regression;fuzzy clustering;competitive clustering
303080
Edge-Connectivity Augmentation Preserving Simplicity.
Given a simple graph G=(V,E), our goal is to find a smallest set F of new edges such that G=(V,E\cup F) is k-edge-connected and simple. Recently this problem was shown to be NP-complete. In this paper we prove that if OPT_P^k$ is high enough---depending on k only---then OPT _S^k= OPT_P^k$ holds, where OPT_S^k$ (OPT_P^k$) is the size of an optimal solution of the augmentation problem with (without) the simplicity-preserving requirement, respectively. Furthermore, OPT_S^k- OPT _P^k\leq g(k) holds for a certain (quadratic) function of k. Based on these facts an algorithm is given which computes an optimal solution in time O(n4) for any fixed k. Some of these results are extended to the case of nonuniform demands as well.
Introduction In the last decade several graph augmentation problems have been investigated. Especially the connectivity augmentation problems attracted considerable attention due to the various connections to the so-called network design problems which model the survivability problems of (telephone or computer, etc) networks. In these problems a graph (or digraph) G and a target connectivity number k are given and the goal is to find a smallest set F of new edges which makes G k-edge-connected, that is, for which the augmented graph k-edge-connected and jF j is as small as possible. (Sometimes the goal is to increase vertex-connecivity of G. In this paper we consider only edge-connectivity problems, unless stated otherwise.) Note, that the set F of new edges may contain parallel edges and edges which are parallel to edges of G, as well. The edge-connectivity augmentation problem - and a number of its extensions - can be solved efficiently. Several polynomial algorithms have been developed, see [6], [17], [20] Department of Mathematics and Computer Science, Odense University, Campusvej 55, DK-5230 Odense, Denmark. The second author was supported by the Danish Natural Science Research Council grant no. 28808. and also [2], [9], [16], just to mention some important results. (For a survey of this area see [7].) However, there are several versions of the connectivity augmentation problem which remained open. Sometimes the goal is to increase the connectivity by maintaing certain properties of the starting graph G. Depending on these properties, one obtains problems of very different nature. For example, Kant and Bodlaender [13] consider the problem where the goal is to increase vertex-connectivity and the planarity of G is to be preserved (and they prove that this version is NP-complete). Hsu and Kao [10] want to maintain bipartiteness while increasing a variant of vertex-connectivity of a graph (and they show that this can be done in polynomial time). Recently, Gabow, Szigeti and the authors proved in [1] that edge-connectivity can be optimally increased in polynomial time preserving bipartiteness (or in general, l-partiteness). In this paper we deal with another property to be preserved: the simplicity of G. As it is mentioned in [7], "it is an important open problem to find algorithms that do not add parallel edges". Partial results in this direction have been obtained by Frank and Chou [8], Naor et al. [17], Taoka et al. [18], and Watanabe and Yamakado [19] - the details are given below -, but the complexity of the general problem was still open. Very recently the second author proved that the simplicity preserving k-edge-connectivity augmentation problem is NP -complete, even if the starting graph is already 1)-edge-connected. However, we shall prove that the problem becomes polynomially solvable if the target connectivity k is fixed. We shall give an O(n 4 ) algorithm for this variant. E) be an l-edge-connected simple graph such that jV j 1. The simplicity preserving k-edge-connectivity augmentation problem is to find a smallest set F of new edges which makes G k-edge-connected without creating parallel edges, that is, must be a k-edge-connected simple graph and subject to this jF j must be minimal. Such an F is called an optimal simple augmentation of G (with respect to k). The very first paper which deals with a similar problem is due to Frank and Chou from 1970. In [8] they solve the simplicity preserving edge-connectivity augmentation problem in the special case where the starting graph G has no edges - but the target connectivity may be non-uniform, that is, the edge-connectivity requirements may be different between different pairs of vertices. Besides the solution of this version - which is in fact a construction problem rather than an augmentation problem - there are some recent results which all deal with small target connectivity values k or solve some very special case for general k. Let us denote the size of a smallest k-edge-connected (k-edge-connected and simple) augmentation of a graph G by OPT k S (G), respectively). Obviously OPT k S for any k and any graph G. It can be checked easily, that the linear-time 2-edge-connectivity augmentation algorithm of Eswaran and Tarjan [4] does not create parallel edges, thus solves the simplicity- preserving version, too, for 2. It was proved in [19] that OPT k P holds for as well, by showing a polynomial algorithm which solves the 3-edge-connectivity augmentation problem optimally without creating parallel edges. Figure 1: OPT 4 2. This is not the case in general. As it was observed already in [18], OPT k may hold if k - 4, see Figure 1. On the other hand, it was also shown in [18] that moreover, in these special cases we have In [17] it was observed that OPT k and the minimum degree in G is at least k. Besides the construction of a polynomial algorithm for any fixed k our goal in this paper is to show that there exist functions f; N such that if OPT k then OPT k P (G), and OPT k graph G. These results are presented in Section 3. Specializing our proofs to the case where l we give simpler proofs for (extensions of) some results of [18] in Section 4. In Section 5 we indicate how our main results can be extended to the case where local edge-connectivity demands must be satisfied. 2 Terminology and some basic results In this section we first introduce the basic notation and definitions and then list those theorems and algorithms (mostly from Frank's paper [6]) which we shall use in our proofs. We shall assume that the reader is familiar with the results of [6]. E) be an undirected graph. For two disjoint subsets X and Y of V the number denotes the number of edges between X and Y and we define the degree of a subset X as d(X) := set consisting of a single vertex v is simply denoted by v. Thus d(v) stands for the degree of v. The degree-function of a graph G 0 will be denoted by d 0 . An edge connecting the vertices x and y will be denoted by xy. Sometimes xy will refer to an arbitrary copy of the parallel edges between x and y but this will not cause any confusion. Adding or deleting an edge e from a graph G is often denoted by G e, respectively. Adding (or deleting) a set Y of vertices to a set X of vertices is denoted by X respectively). For a set F of edges denotes the set of endvertices of edges of F . The subgraph of G induced by a subset X of vertices is denoted by G[X]. Let \Delta(G) denote the maximum degree of the graph G. For a vertex v we use N(v) to denote the set of vertices adjacent to v. A subpartition of V is a collection of pairwise disjoint subsets of V . The operation splitting off a pair vs; st of edges (v 6= t) from a vertex s means that we replace the edges vs; st by a new edge vt. A complete splitting from a vertex s (with even degree) is a sequence of d(s)=2 splittings of pairs of edges incident to s. A graph E) is k-edge-connected if The edge-connectivity of G is the largest integer k for which G is k-edge-connected. The local edge-connectivity -(u; v) between two vertices u; v is the maximum number of pairwise edge-disjoint paths. We recall the following well-known equalities. Proposition 2.1 Let E) be a graph and X;Y ' V . Then s; E) be a graph with a special vertex s such that (1:1) holds, that is, the edge-connectivity of G within V is at least k. We say that a pair of edges vs; st is an admissible pair if after splitting off vs and st condition (1:1) still holds. Otherwise vs; st form a non-admissible pair. It is easy to see that vs and st are non-admissible if and only if there exists a set v; t 2 X ae V such that d(X) - k + 1. Such a set is called dangerous. The following result of Lov'asz [14, Problem 6.53.] - Theorem 2.2(a) below - is an important tool in [6]. Here we formulate a kind of extension, as well - part (b) of Theorem 2.2 -, which will be used in some of our arguments. The proof follows easily from the proof of part (a) given in [6, pp.35-36]. Theorem 2.2 Suppose that (1:1) holds in E) and d(s) ? 0 is even. Then (a) [14] for every edge st there exists an edge su such that the pair st; su is admissible. (b) for every edge st the number of edges which are non-admissible with st is at most k +1. Proof: We prove part (b). Following Frank's proof of part (a) we observe that for every edge sv for which st and sv is a non-admissible pair the vertex v is either contained in a unique maximal dangerous set M containing t, or contained in one of two maximal dangerous sets X;Y whose intersection contains t. Since the edge sv contributes to the Figure 2: This graph G shows that the Successive Augmentation Property does not hold. G. The edge is the unique optimal augmentation with respect to degree of M (or to the degree of X or Y ), we obtain that in the former case there are at most k edges which are non-admissible with respect to st, and in the latter case, using (1:2a) we get which implies d(X 2, from which d(s; (X Most of the results in this paper are based on Frank's algorithm from [6] which solves the augmentation problem without simplicity requirement and uses the splitting operation as the main tool. Note, that this algorithm does not find all the intermediate optimal augmentations but only an optimal k-edge-connected augmentation. The other previously mentioned algorithms either use a one-by-one augmentation approach- like [2], [17], [20] - or are based on Frank's algorithm [9], [16]. We say that the Successive Augmentation Property holds for a certain augmentation problem if for any increasing sequence of target-connectivities there exists an increasing sequence F 1 ae ::: ae F k of solutions such that F i is optimal with respect to k i . For example this property holds for the edge-connectivity augmentation problem of graphs and digraphs (with uniform demands), see [3], [20]. Since the Successive Augmentation Property does not hold for simple augmentations (see Figure 2), using Frank's algorithm seems to be promising for attacking the general case. We describe now Frank's algorithm [6] which gives an optimal solution for any given (not necessarily simple) graph E) and target connectivity k, provided that there is no simplicity-preserving requirement. Frank's algorithm (PHASE 1) Add a new vertex s to V and a set F of new edges between s and some vertices of V such that (1:1) holds in G F is minimal (wrt. inclusion) subject to (2:1) and (2:2): (2:3) (Remark: It is easy to see that such an F exists. It was shown in [6] that )there exists a subpartition of V such that jF is odd in G 0 , add a new parallel edge between s and v for some with d 0 (s; v) - 1. (Remark: In Frank's original algorithm the extra edge which makes d 0 (v) even can be added between s and any v 2 V . However, this small modification in Phase 2 will be essential in our algorithm.) admissible pairs of edges incident to s in arbitrary order, maintaining (1:1). When s becomes isolated, delete s. (Remark: In the third phase every edge can be split off by Theorem 1.2.a. The resulting graph is an optimal k-edge-connected augmentation of G since after the second phase 3 Simplicity preserving augmentation with uniform demands Our idea is to modify the third phase of Frank's algorithm by introducing some additional rules which will determine the order of splittings. In certain cases not every admissible pair will be allowed to be chosen. As we shall see this will make it possible to avoid the creation of parallel edges and hence to maintain simplicity provided that d 0 (s) is high enough at the beginning of the third phase. Clearly, if we preserve simplicity during phase 3, the resulting augmenting set will be optimal for the simplicity-preserving version, too. If one wants to maintain simplicity while using Frank's algorithm, only those admissible pairs st; su may be split off for which t and u are not adjacent in the original graph and for which there is no new edge between t and u (that is, the pair st; su has not been chosen yet for another edge st and another su). We call such an admissible pair legal. We say that a complete splitting from s is feasible if the resulting graph is simple and k-edge-connected. E) be the starting graph and let k - 2 be the target-connectivity. Theorem 3.1 Let G be a graph at the end of the second phase of Frank's algorithm and suppose that holds. Then there exists a feasible complete splitting from s. Proof: Let S denote the set of neighbours of s. We claim that in the subgraph induced by S each vertex has at most k neighbours. To see this let us consider an edge st 2 F . Since F is obtained from a minimal set - F satisfying (2:1 \Gamma 2:3) by adding at most one edge e parallel to an edge of - F , there exists a set X ae V for which t 2 X and Each edge between t and some vertex in S \Gamma X contributes to the degree of X, and each neighbour y of t in S " X contributes to the degree of X by at least one by the existence of the edge sy. Thus Condition (2:2) implies that jSj - 3k 3 . Since \Delta(H ) - k, there exists - see the easy exercise [14, Problem 8.1] - a subset T ae S with jT which is independent in H. Our proof of the existence of a feasible complete splitting will follow from the analysis of the following algorithm which is a modified version of the third phase of Frank's algorithm. The goal is to split off only legal pairs until s becomes isolated. After each splitting step we update S and H as follows. If we split off a pair st; su then first the edge tu will be added to H. Then, if the edge st (or su) was the last copy of the edges between s and t (between s and u, respectively) then we delete t (u) from S and from H, as well. Thus the current graph H before the next split means the graph of "forbidden edges" updated this way. Clearly, if we can always find a pair which is legal in the current H, we obtain a feasible complete splitting. The algorithm has four parts, executed in the following order. (1) Split off legal pairs of edges st; su of the form t 2 T and u there are no parallel edges between s and any vertex of T . (But keep one copy of each edge st, t 2 T .) (2) Split off legal pairs of edges sv; su of the form v; u long as possible. (3) Split off all the edges su with u with an edge st, t 2 T , for which st; su is a legal pair. off the remaining edges st; su (of the form t; Let us prove why this algorithm terminates with a complete feasible splitting. First observe that the proof of Theorem 2.2 (b) combined with the proof of (2:5) above implies the following statement. 3.2 Let st be an edge and let 2 W be a subset of vertices of the current H such that t. Then st; su is a legal pair for some 3.2 and the inequality implies that we can always find legal pairs to split off following the rule of part (1), which shows that part (1) can be executed. By Claim 3.2 we obtain that at the end of phase (2) the size of the current is at most k + 1. Thus in phase (3) at most k(k must be split off for which are sufficient to maintain feasibility by Claim 3.2. Since phase (3) can also be executed. Then the current H, induced by T , is an independent set and after an arbitrary splitting H always remains independent, since in phase (1) we deleted the parallel edges between s and vertices of T . Thus in phase (4) we are allowed to split off admissible pairs in arbitrary order, which will yield a (feasible) complete splitting by Theorem 2.2 (a). \Pi. Thus we obtain the following corollary, showing that there exists a function f(k) such that there exists an optimal solution for the k-edge-connectivity augmentation problem without the simplicity-requirement which preserves simplicity provided that the optimum value is at least f(k). Theorem 3.3 If OPT k If k is small, it is possible to sharpen the previous rough bound on f(k). Using a more precise analysis we can even obtain the sharp value in the special case found already in [18], using a different approach). These details are given in Section 3. Theorem 3.4 OPT k any starting graph G and any target connectivity k. since for any jV j there exist k-edge-connected simple graphs which are (almost) k-regular. Obviously E(H) contains a set of edges which makes G k-edge-connected preserving simplicity. Thus we may assume that jV (G)j - 4k \Gamma 3. The proof is based on a version of Frank's algorithm. In the last phase certain edges will not be split off in pairs but will be replaced by one or two new edges using an other operation. The first two phases are the same. At the beginning of phase 3 we have a set F of new edges incident to s for which OPT k holds. In phase 3 first let us split off legal pairs as long as possible. By Claim 3.2 the number of neighbours of s is at most no more legal pairs can be found. At this point there is at most one edge of F which can be deleted without violating (1:1). If there is such an edge, let us delete it. In the rest of the procedure instead of splitting off pairs of edges we try to replace every edge incident to s by one or two edges on V , maintaining (1:1) and preserving simplicity. be an edge in the current G 0 . The criticality of e - with respect to (1:1) - implies that there exist sets x us call such a set x-tight in the former case and s-tight in the latter case. In G 0 there is a unique minimal x-tight set X and there is a unique minimal set Y , with respect to a fixed edge st. Furthermore, (1:1) holds in G for any edge e Proof: Let X be a minimal x-tight set and X 0 be an x-tight set which does not contain X. In this case by (1:1) and (1:2b) we obtain a contradiction. This proves that X is unique. The uniqueness of Y can be proved similarly. be two vertices and e be an edge and suppose that (1:1) does not hold in G violates (1:1), then W is x-tight in G 0 and y 0 2 W must also hold. From this it follows that is an s-tight set in G 0 , which does not contain Y , a contradiction, which proves the claim. \Pi. Clearly, if X or Y \Gamma s has size at least k, there exist two vertices such that x 0 and y 0 are non-adjacent in G 0 . Then replacing sx by e maintains (1:1) and preserves simplicity. Suppose that X and Y \Gamma s have size at most k \Gamma 1. There are at most are adjacent to x or to some vertex in Y \Gamma s, since each such vertex contributes to the degree of X or Y \Gamma s. Since we assumed jV there exists a vertex w which is not adjacent to x and to some vertex y of replacing e by xw and wy preserves simplicity and it is easy to see that it maintains (1:1), as well. Thus substituting the remaining at most k(k incident to s in G 0 by at most edges we obtain a solution with size at most jF The graph K , defined as the disjoint union of two complete graphs K k+1 and K k=2 , connected by k=2 independent edges, show that the biggest possible gap between OPT k and OPT k P is indeed a quadratic function of k. (It is easy to check that OPT k Hence the difference in question is k 2 Also note that following the algorithmic part of the proof of the previous theorem one obtains a 4-approximation algorithm (that is, an algorithm which gives a solution of size at most 4OPT k S (G)) for the simplicity-preserving k-edge-connectivity augmentation problem, provided that k ! n=4. (Its running time is polynomial even if k is not fixed.) The idea of our algorithm for the augmentation problem with the simplicity requirement is the following. If OPT k P is large enough, we can simply follow the algorithmic proof of Theorem 3.1 which gives a solution with size OPT k creating parallel edges, thus it is obviously an optimal simple augmentation. If OPT k P is small, a trivial way of finding an optimal solution is to check every possible augmenting set with size less than OPT k However, although the number of such sets is a polynomial function of n for fixed k, the exponent still depends on k. To avoid this, we prove that when we check all the possible augmenting sets we may restrict the set T of possible end-vertices of augmenting edges to a set of size h(k) for an appropriate function h of k, and that such a T can be fixed in advance in constant time for any fixed k. A set X ae V is deficient in E) (with respect to the target-connectivity k. A set S ' V is a covering of the deficient sets if for every deficient set X. It follows from the correctness of Frank's algorithm - and also from Claim 3.5 - that for every covering S ' V there exists an optimal solution F with V for the problem without simplicity requirement. This implies that if the optimum value is m, we can easily find a set S of vertices in G - the covering S, formed by the end-vertices of the new edges at the end of Phase 1 of Frank's algorithm will do - with size at most 2m, such that there exists an optimal solution F with V Although in the simplicity-preserving version a covering S does not have this property in general - consider the graph on Figure 1 -, we can find a relatively small subset T in this case, too, such that there exists an optimal solution F S with V To see this, let G be the starting graph and let S be a covering of the deficient sets of G. For each vertex y of G let us fix a set L(y) ' N(y) of vertices such that minfjN(y)j; 2kg. For each vertex t 2 S we define a subset - M t of vertices of V as follows. The vertex t itself belongs to - t if and only if d(t) - 2k \Gamma 1. A vertex x to - only if there exists an xt-path P of length at most k for which d(v) - for every (v [ L(v)). (It is not hard to see that We claim that is a set with the required property. Note, that S ' T holds and jT j - jSjh(k). (The existence of such a set with size at most jSjh 0 (k) follows immediately from our previous results. However, to construct an efficient algorithm, we need to find such a set in advance, without knowing an optimal solution.) Theorem 3.6 There exists an optimal simplicity-preserving solution F with V Proof: Let us choose an optimal simplicity-preserving solution F with jV as small as possible. If this number is zero, we are done. If not, there exists an edge for which at least one of its end-vertices is not in T . Without loss of generality assume that . If we subdivide e by a new vertex s and then apply Claim 3.5, we observe that in G [ F \Gamma e we have precisely two (disjoint) minimal deficient sets A; B, for which a 2 A and b 2 B and for any edge e is k-edge-connected. Thus it is enough to prove that there exists a vertex is not adjacent to a in G[F . To prove that such a vertex t exists, it is sufficient to see that since dG[F replacing e by e 0 would yield an optimal simple augmenting set F 0 with jV contradicting the choice of F .) First let us prove that S " C 6= ; for every component C of the subgraph G[B]. Since B is deficient in G [ e, it is deficient in G as well. Thus, since S covers the deficient sets, component C of G[B], the set C is not deficient in G. Thus, since each edge between C and contributes to d(B), we obtain Now let t 2 S be vertex in the component of G[B] which contains b and let P be (the set of vertices of) a tb-path in G[B]. Let b 0 be the vertex of P closest to t on P which is not included in - M t and let P 0 denote the subpath of P with end-vertices t and b 0 . Then k, we are done, since jT " Bj - k follows. Assume now that jP or by the definition of - M t and b 0 there exists a z 2 M t with d(z) - 2k. In the former case we let z = t. Then we obtain that at least k vertices from L(z) belong to B, otherwise dG a contradiction. Hence The proofs of the previous three theorems lead to an algorithm whose running time is O(n 4 ), provided that the target-connectivity k is fixed. Let us scetch the algorithm and estimate the running time. The input graph is E). First we add a new vertex s and construct a set F of new edges - and compute OPT k of Frank's algorithm. This can be done in time O(n 2 ) by applying the method of Nagamochi and Ibaraki, see [16]. If we proceed as described in Case II below. Otherwise we are in Case I, where OPT S (G) - Theorem 3.4. In this case we identify a set of vertices as we did before Theorem 3.6. From the algorithmic point of view, this can be done by computing a restricted BFS-tree from each vertex of S. (The set S, which consists of the neighbours of s, has size at most 3k 4 in this case.) Thus the number of steps we need to find T depends on k only. The last phase of Case I is just a series of k-edge-connectivity tests. We check for each possible set of new edges F 0 of size at most (and with V simple and k-edge-connected and choose the smallest good augmentation. Clearly, the number of possibilities is a function of k, and by Theorem 3.6 we find at least one good augmenting set. The number of steps in one of these tests in O(n 2 ) [16]. Now let us analyze Case II. By Theorem 3.3 OPT k holds. First we identify set T of vertices which is independent in G[S] and has size k 2 1. This can be done by a greedy search in linear time. Then we follow the four parts of the algorithmic proof of Theorem 3.1: first split off pairs of edges incident to s between T and . For this we use the so-called s-based connectivity algorithm from [16] as a subroutine to test whether a pair is legal or not. One of these tests requires time O(n(m log n)) and the total number of tests in this first part depends on k only. In the second part we split off pairs whose end-vertices are in S \Gamma T as long as possible. This requires at most k(k s-based connectivity tests. (There are at most k edges from each vertex v 2 S to s and by 3.2 after at most k +2 tests we can find a legal pair for each sv, if there is any.) The remaining two parts consist of some further s-based conectivity test: we split off all pairs and then within T . These calculations imply the following theorem. Theorem 3.7 The simplicity-preserving k-edge-connectivity augmentation problem can be solved in O(n 4 fixed k. \Pi. 4 Augmenting from 3 to 4 In this section we give a full solution for the special case when G is 3-edge-connected and we want to make it 4-edge-connected. As we remarked, is the smallest target value where OPT P and OPT S may be different. Our goal is to find the exact values of the functions f and g in this case. The proof implies an algorithm which does not use a series of 4-edge-connectivity tests like in Case I of the algorithm of the general case. The main result of this section, Theorem 4.7, was already obtained by Taoka et al. in [18] - where most of the proofs are omitted - using a different approach which does not seem to work for arbitrary values of the target connectivity. We included this section to show how our method provides a fairly easy complete proof of this result. set X of vertices in a graph G with edge-connectivity k is called critical if holds. The following easy lemma is left to the reader. Lemma 4.1 Let G be simple and 1)-edge-connected but not k-edge-connected. Then every minimal critical set has size one or at least k. \Pi. Lemma 4.1 shows that if X and Y are two disjoint critical sets, then there exist two vertices which are non-adjacent, unless both X and Y are singletons. This suggests that if the goal is to increase the connectivity by one, without creating new parallel edges, only those minimal critical sets have an important role which are singletons. The following lemma will make it possible to assume that every minimal critical is a singleton. Lemma 4.2 Let E) be a simple graph which is 1)-edge-connected but not k-edge-connected. There exists a 1)-edge-connected simple graph G such that (1) Every minimal critical set in G is a singleton, i.e. has size one. Proof: First note that for a minimal critical set X and for a critical set Y either holds by Proposition 2.1. This implies that the minimal critical sets of G are pairwise disjoint. Suppose that G contains a minimal critical set which is not a singleton. Let X those minimal critical sets of G which are not singletons. By Lemma 4.1, each X i has size at least k. Form a new graph G from G by adding a new vertex x i and joining it by edges to different vertices of X i for each We claim that G , which is easily seen to be 1)-connected, has the properties (1)-(3) above. Every critical set in G contains a minimal critical set and we have added a new vertex x i for each of the original non-singleton minimal critical sets and the new x i is itself critical in G . Hence it follows that the minimal critical sets in G are precisely the original singleton critical sets plus the vertices x This proves (1) and implies that during the first two phases of Frank's algorithm the same number of new edges are added to G and to G , which gives (2). Now let us consider an optimal simple k-edge-connected augmentation F of G. Let us form a set F of new edges from F by replacing every edge connecting two sets X i and X j by x i x j and every edge e which enters some y. It is easy to see that the graph G simple and k-edge-connected. This gives OPT k (G). To prove the other inequality first observe that it follows from the fact that each X i has size at least k that if u is an edge in an optimal simple augmentation F of G , then in G there is at least one vertex in X i which is non-adjacent to u. Similarly, is an edge in F , then we can find vertices so that uv is not an edge in G. Now define the following set of new edges F to be added to G: let F contain all those edges of F which connect vertices of V . Furthermore, for each edge of contain an edge from u to a non-neighbour of u in for each edge of type x contain an edge uv such that uv 62 E and We claim that G is k-edge-connected which will imply that OPT k (By the construction, F does not contain edges parallel to edges of E. It is easy to see that F itself does not contain parallel edges, but to prove the inequality it is enough to observe that deleting one copy of two parallel edges in F does not destroy k-edge-connectivity.) Suppose not and let W be a set whose degree in G 00 is 1. Then W is critical in G as well and if W " U 6= ; for some minimal critical set U (in none of the edges in F leave W we obtain that in G the set obtained by adding to W each of the vertices x i for which X i ' W has degree a contradiction. This proves (3). \Pi. In the next four lemmas we consider a graph G obtained by applying the first and the second phase of Frank's algorithm starting from a simple graph E) on at least five vertices so that G is 3-edge-connected (but not 4-edge-connected) and The goal is to find OPT 4 S (G) and an optimal augmenting set. By Lemma 4.2, we can assume that all the neighbours of s in G 0 have degree 3 in G (i.e. they form singleton critical sets). that a set ; 6= X ae V is critical in 4. A set X will be called dangerous if d holds. Note that since G is already 3-edge-connected every dangerous set X has d 0 (s; X) - 2. This fact is used several times in the sequel. Lemma 4.3 The following holds for every x 2 S. (1) If dH (x) - 2, then for every non-neighbour u of x in H, the pair sx; su is legal for splitting. (2) There is at most one maximal dangerous set among those which contain x and at least one other neighbour of s. In particular there is at most one non-neighbour y of x in H for which the pair sx; sy is not legal for splitting. (3) Either dH or sx is in at most two pairs sx; su and sx; sv which are not legal for splitting. Type I Type II Type III Figure 3: The exceptional cases when d 3. For each of the three types, every non-empty subset of L has degree at least 4. Proof: Suppose that dH (x) - 2 and that X is a dangerous set containing x and some E(H). Then in G the set X \Gamma x has degree at most 2 contradicting the fact that G is 3-edge-connected. This proves (1). To prove (2) suppose that x is contained in two maximal dangerous sets A and B. Then it follows from Proposition 2.1 that in G 5: It is not difficult to check by a parity argument that all these equalities cannot hold at the same time. This contradiction shows that x is contained in at most one maximal dangerous set. Finally, observe that (3) follows easily from (1) and (2). \Pi. Lemma 4.4 If d 0 2, then there exists a feasible complete splitting of s, unless G 0 is of type I,II or III in Figure 3. Proof: If then every admissible complete splitting of s will involve adding the edges uv and uw, where and u is the vertex with two edges from s. Hence, by Theorem 2.2 a feasible complete splitting exists if and only if dH and this is easily seen to be the case if and only if G 0 is not of type I,II or III in Figure 3. Thus we can assume below that 4. By Theorem 2.2, we may assume that jE(H)j - 1. Suppose first that dH (v) - 1 for each v 2 H and let uv 2 E(H). Let w; z be the remaining vertices in S. It follows from Lemma 4.3 (2) that at least one of the pairs su; sw and su; sz is legal for splitting and since the remaining pair of vertices in H are not adjacent this leads to a feasible complete splitting of s. Now we may assume that H contains the edges uv; uw. Let z be the fourth vertex of S. It follows from Lemma 4.3 that the pair su; sz is legal for splitting and hence, since v and w are not adjacent, there is a feasible complete splitting of s. \Pi. Lemma 4.5 If d 0 4, then there exists a legal splitting unless d 0 G 0 is of type II in Figure 3. Proof: If d 0 easily from Lemma 4.3 that there exists a legal splitting. Hence we may assume that d 0 Suppose first that It follows from Lemma 4.3 that if there is no legal splitting, then some x 2 S has degree 3 in H. Let u; v; w be the remaining vertices of S. Since G is 3-edge-connected and has at least five vertices, we may assume w.l.o.g. that u and v are not adjacent. If either u or v is adjacent to w, then su; sv is legal, by Lemma 4.3 (1). Hence we can assume that H is a star with center x. By Lemma 4.3 (2), at least one of the pairs su; sv, or su; sw will be a legal splitting. first note that if x is the vertex with two edges from s, then there is no dangerous set containing x and some other neighbour of s. Hence, it follows that if there is no legal splitting involving x, then xy; xz 2 E(H). In this case G + s is of type II in Figure 3. \Pi. Lemma 4.6 If d 0 can be made 4-edge-connected preserving simplicity by adding at most two edges. Proof: If the two remaining neighbours u; v of s are non-adjacent then uv makes G 4-edge-connected, thus we can assume that uv 2 E. By our assumption d 0 holds. If G contains a vertex a that is not adjacent to any of u; v, then by adding the edges ua; av we get a new graph that is simple and 4-edge-connected. If no such vertex exists then jV must hold. Now it is easy to see that adding any pair of edges joining u to a non-neighbour of u and v to a non-neighbour of v will make the graph 4-edge-connected. \Pi. Theorem 4.7 [18] For every 3-edge-connected graph G on at least five vertices the following holds (ii) If OPT 4 Proof: Let G be the graph returned by phase 2 of Frank's algorithm. Note that if we are able to perform a sequence of legal splittings with the effect of adding a set of edges F 0 to G while preserving simplicity, then it follows from Theorem 2.2 and the fact that at the end of phase 2 of Frank's algorithm OPT 4 that the following holds: and Hence, if we can show that OPT 4 will follow that OPT 4 (G)). We will use this observation several times below. We first prove (i). By Lemma 4.2 we may assume that all minimal critical sets of G are singletons. By Lemma 4.6 we may also assume d 0 4. Now we use Lemma 4.5 to perform legal splittings until we have d 0 in the current G 0 . If at this point we have must hold and by Lemma 4.4 either there exists a feasible complete splitting, or G 0 is of type I,II or III in Figure 3. It is not difficult to see that in the latter case have OPT 4 So from this and the observation above we get that if (G). Hence we may assume that now it follows from Lemma 4.5 that we can still find one more legal splitting at this point. Then applying Lemma 4.6 we obtain that OPT 4 are sufficient. Thus in all of the cases we get that OPT 4 This proves (i). To prove (ii) suppose that OPT 4 and that G 6= K 3;3 (for which we clearly have 1). By Lemma 4.5 and our remark at the beginning of the proof, it follows that it is sufficient to prove that if OPT 4 As above we let G be the graph returned by phase two of Frank's algorithm. By Lemma 4.2 we may assume that all minimal critical sets of G are singletons and by the remark above we can assume that d 0 6, the graph G is 3-regular and 3-connected, thus - since we excluded K 3;3 - it is the prism (that is, the complement of a cycle of length six), for which the desired equality trivially holds. Suppose that there are at least 7 vertices in V . Since G is 3-edge-connected and each neighbour of s has degree 3 in G, it follows that jE(H)j - 7 and if must be at least 4 edges from S to Case 1: shall argue that we can always find a legal splitting with the property that after making this splitting at most two edges remain in the new graph H. By Lemma 4.4 this implies that there exists a feasible complete splitting of s and hence (G). If has two vertices u; v of degree 3 and, by Lemma 4.3, there is a legal splitting for the edge su (recpectively, sv) with every edge sw where w is a non- neighbour of u (respectively, v). Hence we may assume that u and v are adjacent, because otherwise we can eliminate six edges by performing one legal splitting. Since G is 3-edge- connected, u and v cannot have two common neighbours x; y since then the degree of the set would be at most two in G. If u and v have no common neighbours then it is easy to check that there is a legal splitting (involving one of the edges su; sv) such that at most two edges remain in H afterwards, because su (sv) can be split off with the edge from s to each of the two neighbours of v (u). So we can assume that u and v have precisely one neighbour x in common. Now it is easy to check, using Lemma 4.3 that we can always find a legal splitting that eliminates at least five edges from H. If either each of the vertices in H have degree 2 and it follows from Lemma 4.3 (1) that the desired legal splitting exists, or there is a vertex u of degree 3 in H. Since G is 3-edge-connected, we cannot have all 6 edges of H inside the graph induced by u and its neighbours and hence, again, by Lemma 4.3, the desired legal splitting exists. If has a vertex of degree 2, then it is easy to see that we can find a legal splitting eliminating all but two edges in H. Finally, if each vertex has degree 1 in H, then every legal splitting has the desired property. Case 2: follows that at the end of phase 2 of Frank's algorithm we have two parallel edges between s and some vertex v 2 S. Let wg. Since we started from a 3-edge-connected graph G, the vertices fx; (all of which, by our assumption, have degree 3 in G) do not induce a K 4 . Hence it follows from Lemma 4.3 that there is a legal splitting for s which involves two vertices in the set fx; say w.l.o.g. z; w. Now the remaining neighbours of s, fv; x; yg induce a graph with at most 2 edges, since G 0 is 4-edge-connected and each of the vertices in S has degree 3 in G. Now, by Lemma 4.4, either there is a feasible complete splitting of s in the actual G 0 , or G 0 is of type I, II, or III in Figure 3 in which case we argued above in the proof of (i) that Hence, by the remark at the beginning of the proof we have shown that OPT 4 (G). \Pi. It can be verified - by analyzing the algorithm of [17], say - that any simple graph G has an optimal simple 3-edge-connected augmentation G 0 for which OPT 4 This, and the results of this section show that We conjecture that if the starting graph is already 1)-edge-connected, the function in Theorem 3.3 can be replaced by a linear function of k. Perhaps would do. 5 Non-uniform demands The augmentation problem without the simplicity-preserving requirement is solvable in polynomial time even if the target connectivity is not uniform but is given by a symmetric on pairs of vertices of the starting graph E). (And the goal is to find a smallest set F of new edges such that in G the local edge-connectivity -(u; v) is at least r(u; v) for any pair (u; v) of vertices.) This more general version was also solved by Frank in [6]. For every subset X of V let us define g. (For simplicity, to avoid the so-called marginal components [6], we assume that r(u; v) - 2 for each pair u; v 2 V .) By Menger's theorem the extended graph (or the augmented graph) satisfies the requirements if and only if holds. Like in the uniform-demand case, Frank used the same splitting-off idea in his proof. In fact, the algorithm he gave is identical to the algorithm of the uniform case except that after adding k parallel edges between a new vertex s and each vetex of V , during the deletion part in phase 1 one must maintain (5:1) instead of (1:1) and during the splitting off in phase 3 the local edge-connectivities must be preserved everywhere between pairs of vertices in V . (For more details we refer to [6].) The corresponding phase 3 can be done by the following theorem, which is due to Mader. We say that two edges st and su form an admissible pair in E) if after splitting off st and su the local edge-connectivities remain the same between vertices of V . (Note, that splitting off never increases the local edge-connectivity.) Theorem 5.1 [15] Let s; E) be a connected undirected graph with d(s) 6= 3 for which there is no cut-edge incident to s. Then there is an admissible pair st; su of edges. In this section our goal is to prove the counterparts of Theorems 3.1, 3.3 and 3.4 by showing that in the case of the simplicity-preserving version of the non-uniform augmentation problem there exist similar functions f 0 (k) and g 0 (k) like f(k) and g(k) in the uniform case and the problem is solvable in polynomial time if k is fixed. We shall use a similar approach we used for the uniform case. In fact, the crucial part of the generalization is to prove that a similar statement (Lemma 5.4 below), corresponding to Theorem 2.2(b) holds in this case, too. This will ensure that the number of edges which are non-admissible with respect to some fixed edge st can be bounded by a function of k. However, to prove this we must modify the concept of admissibility and also phase 3 of Frank's algorithm (in the non-uniform case). The reason is that although the goal is to satisfy (5:1) only, the solution given by Frank's algorithm will guarantee more, it will maintain the local edge-connectivities of the extended graph constructed in phase 2. On the other hand, by this extra property of the solution it is easy to see that certain optimal augmentations can not be obtained by Frank's algorithm. For example, let G be the disjoint union of two stars K 1;m and let r(u; for each pair u; v of vertices. Then the optimal solution must be a set of m independent edges between the two stars - although any set of m independent edges on the leaves would be a good augmenting set provided that there are at least two edges connecting the two stars. Moreover, in the simplicity-preserving version sometimes the minimum number of new edges to be added to satisfy the requirements after the first two phases of Frank's algorithm - given by the local edge-connectivities in G more than the optimum value with respect to the original demands given by the function r. For example, the first two phases of Frank's algorithm applied to the graph on Figure 4 add the edges sx; sy; sv; sz. Then, although there exists a proper augmenting set of size two (xy and vz), there is no legal splitting in phase 3, since - 0 (a; must also be maintained. a y z Figure 4: r(x; If one wants to preserve simplicity, as well, in phase 3 it is better to work with the following less restrictive definition of admissibility. s; E) be a graph for which (5:1) holds, where the function R is defined by the non-uniform requirements, as before. Then we say that two edges st and su form an R-admissible pair (or an admissible pair, if R is clear from the context) if splitting off st and su does not violate (5:1). A set ; 6= X ae V is tight if holds. If we say that X is dangerous. Let s(X) := R(X). It is easy to see that st; su is an admissible pair if and only if there is no dangerous set X with t; u 2 X. Now we list some results we shall use from [5] and [6]. Proposition 5.2 [6] For every pair X;Y ' V at least one of the following inequalities holds: It is easy to check that the proofs of [5, Claims 4.2, 3.2, 4.3] work the same way if we use our definition of admissibility. Thus we can obtain three similar statements. The first one gives that if X is a dangerous set (with respect to some edge st), then d(s; X) To state the lemma corresponding to [5, Claim 3.2] we need one more definition. (The third claim we get will be mentioned in the proof below.) The contraction of a subset X of vertices in a graph E) means that we delete X and replace it by a new vertex vX and then add dG (v; X) new parallel edges between each . The resulting graph is denoted by G=X. After the contraction of some subset X, we define the new requirement function r 0 in G=X as expected: r 0 (v X. The corresponding function R 0 on the subsets of defined by r 0 . Lemma 5.3 Let T be a tight set. A pair st; su of edges is R-admissible in G if the corresponding pair of edges is R 0 -admissible in G=T . \Pi. Now we are ready to prove the lemma we need. Lemma 5.4 Suppose that s; E) is 2-edge-connected. Then for every edge st the number of edges su for which the pair st; su is non-admissible is at most 2k Proof: Let S denote the set of neighbours of s and let W ae S denote those neighbours u for which st and su form a non-admissible pair. By one of our previous remarks this means that there exists a family F of dangerous sets, each containing t, which covers every vertex of W . Let us fix such a family for which jF j is minimal and subject to this is maximal. We shall prove that jF j - holds. (Note, that by [5, Claim 4.3], two dangerous sets cannot cover the whole S.) First we claim that every dangerous set induces a connected subgraph. To see this assume that X is dangerous and has two components X 1 and X 2 , such that - without loss of generality - R(X) is attained on a pair u by 2-edge-connectivity, a contradiction. Let us consider a tigh set M 1 and a dangerous set M 2 , both containing t. For these two sets (5:2b) cannot hold since otherwise by Proposition 2.1 a contradiction. (We used that by the existence of the edge st.) Thus (5:2a) must hold by Proposition 5.2, which implies that s(M From this it follows that if M 2 is also tight, then are both tight (note, that M 1 [M 2 6= V ). Another consequence is that if M 2 2 F , then must hold, otherwise 2 - would follow by the choice of F . These observations imply that if there exists a tight set which contains t then there exists a unique maximal tight set M containing t. Moreover, if such a tight set M exists, then M is a subset of every member of F and d(s; M) - holds. By Lemma 5.3 the contraction of a tight set does not decrease the number of edges which are non-admissible with respect to st. Thus in the rest of the proof we shall assume that every tight set is a singleton. We say that a pair X;Y of members of F is an a-pair if (5:2a) holds for X and Y . Otherwise the pair is a b-pair. If X;Y 2 F is an a-pair, we get since by the choice of F . This shows that their intersection must be tight. Therefore must hold for each a-pair X;Y . Suppose now that X;Y is a b-pair and Y; Z is an a-pair. We claim that then X;Z must be a b-pair. For suppose X;Z is an a-pair. Then is disjoint from (X [ Y Furthermore, there is precisely one edge - the edge st - from X " Y to by the inequality From this it follows that there is no edge between M and Z \Gamma M , hence Z is not connected, contradicting the fact that every dangerous set induces a connected graph. Hence F can be partitioned into subfamilies F 1 ; :::; F r such that X;Y is a b-pair if and only if X and Y are in different subfamilies. Suppose that one of these subfamilies F i has size at least k. Since each member in this subfamily is connected and (X \GammaM )"(Y \GammaM for different members X;Y 2 F i , M has at least k different neighbours in V . Since M is connected to s, as well, k - contradiction. Thus each subfamily in the partition has size at most k \Gamma 1. This implies that if jF there must be three sets X;Y;Z 2 F such that they are pairwise b-pairs. Since for a b-pair X;Y the sets are both tight, and hence singletons, the minimality of F , implies that there exists a set N such that holds. Using (5:2b) this gives that the only edge that leaves N in G is st, a contradiction. Hence we obtain jF 2. Since d(s; for each X 2 F and d(s; t) - k, the number of edges which are non-admissible with respect to st is at most k(2k \Gamma From Lemma 5.4, following the proof ideas of Theorems 3.1, 3.3 and 3.4 one can obtain the corresponding results for the non-uniform version, that is, the existence of the functions below. The details, which are similar, are omitted, but some remarks must be added. First of all, we modify Frank's non-uniform algorithm in such a way that - except the last part, where only a small number of edges are present - in phase 3 we split off edges which form admissible pairs in the sense we defined. This is necessary, since otherwise Lemma 5.4 is not valid (see the example of two stars at the beginning of this section). Furthermore, the points where we need more involved arguments are the extension of Claim 3.5 and the existence of simple graphs with maximum degree satisfying the non-uniform demands. (In the latter case a result from [8] can be referred to.) Also note that our assumption r - 2 implies that the 2-edge-connectivity condition in Lemma 5.4 is fulfilled. Theorem 5.5 Let be a graph at the end of the second phase of Frank's (non-uniform) algorithm such that holds. Then there exists a feasible complete splitting from s, where feasibility is meant with respect to (5:1). \Pi. Theorem 5.6 If OPT k holds. \Pi. Theorem 5.7 OPT k any starting graph G and non-uniform demands with v)g. \Pi. So far we have no proof for a counterpart of Theorem 3.6. This would improve the efficiency of the algorithm like Theorem 3.6 did in the uniform case. 6 Remarks In this last section some remarks are made related to possible extensions of the simplicity- preserving edge-connectivity augmentation problem. The "subset-problem", where the goal is to find a simplicity-preserving augmentation which makes a subset X ae V k-edge-connected was mentioned as the next open problem to be studied (at least for [18]. Observe, that this is a special case of the non-uniform demand version. (On the other hand, the subset-problem can be solved by just slightly modifying our proofs of the uniform case, as well.) For the directed version of our problem a similar function f(k) - like in Theorem 3.1 - does not exist. In [12] a family G k i of digraphs was shown for any k with i - OPT k Our arguments do not apply for the vertex-cost version of the simplicity-preserving augmentation problem. (Without the simplicity requirement it can be solved by Frank's algorithm, see [6].) This is the consequence of the small modification we made in phase 2 of the algorithm. (Consider a star K 1;m , where m is odd, 2, and the weights are uniformly 2 except the center v of the star, whose weight is 1.) Some of the above results are valid in the more general case when the starting graph G is not simple, but the augmenting set F must not contain parallel edges and edges which are parallel to edges of G. These details are omitted. Finally we remark that the version where the augmenting set F must not contain parallel edges, but a new edge may be parallel to an edge of the starting graph, remains open. --R Parallel and fast sequential algorithms for undirected edge augmentation Successive edge-connectivity augmentation problems Computing 5 On a theorem of Mader Augmenting Graphs to Meet Edge-Connectivity Requirements Connectivity augmentation problems in network design Connectivity considerations in the design of survivable net- works Applications of a poset representation for edge-connectivity and graph rigidity Optimal augmentation for bipartite componentwise biconnectivity in linear time Augmenting directed graphs preserving simplicity Planar graph augmentation problems A Reduction Method for Edge-Connectivity in Graphs A Fast Algorithm for Optimally Increasing the Edge-Connectivity Simplicity preserving augmentation of the edge-connectivity of a graph A linear time algorithm for smallest augmentation to 3-edge-connect a graph Journal of Computer and System Sciences 35 --TR --CTR Hiroshi Nagamochi , Toshihide Ibaraki, Graph connectivity and its augmentation: applications of MA orderings, Discrete Applied Mathematics, v.123 n.1-3, p.447-472, 15 November 2002
edge-connectivity augmentation of graphs;network design;combinatorial optimization;connectivity
303158
Visualizing implicit queries for information management and retrieval.
In this paper, we describe the use of similarity metrics in a novel visual environment for storing and retrieving favorite web pages. The similarity metrics, called Implicit Queries, are used to automatically highlight stored web pages that are related to the currently selected web page. Two experiments explored how users manage their personal web information space with and without the Implicit Query highlighting and later retrieve their stored web pages. When storing and organizing web pages, users with Implicit Query highlighting generated slightly more categories. Implicit Queries also led to faster web page retrieval time, although the results were not statistically significant.
Figure 1. Data Mountain with Implicit Query results shown (highlighted pages to left of selected page). graphics (e.g., a company logo) that users might associate in memory with that page. To take advantage of this, we present a visualization that allows users to manually create a spatial layout of the thumbnails of their documents in a 3D environment. As an organizational aid to the user, we use document similarity metrics and visual highlighting cues to indicate that web pages are semantically related in this personal information space. This paper will compare two such metrics, one user-driven and one content-driven, used to determine web page similarity relations during sensemaking tasks. Current web browsers try to alleviate the sensemaking problems raised above through the use of bookmarks or favorites mechanisms, wherein users store the URLs of interesting web pages in order to build a personalized information space. Despite these user interface mechanisms, a 1998 survey of over 10,000 web users revealed that one of the most common problems users have with the web is organizing the information that they gather there [7]. In CHI 99 15-20 MAY 1999 Papers related research, Abrams, et al. [1] studied the bookmark archives and personal Web habits of users and made recommendations for improving the design of existing favorites management systems. Abrams surveyed 322 Web users, and analyzed the bookmarks of 50 Web users in detail. He found that bookmarks were used to reduce the cognitive load of managing URL addresses (by aiding memory and keeping history), to facilitate access, and to create information spaces for personal and group use. Bookmarks were often added sporadically-perhaps not surprisingly when too many favorite pages were piling up in a user's list. Almost 40% of those studied used no organization and simply left web pages in the order they were added to the favorites list; 50% used a hierarchy of one (30%) or more (20%) levels. Most users organized at the time they created a bookmark and cleaned up only occasionally. The initial use of folders began after a user had about 35 bookmarks. Abrams also found that 50% of the bookmarks had been visited in the last 3 months; 67% in the last 6 months; and 97% in the last year. Some ease of use recommendations provided by Abrams included providing aids in the browser for semi-automatic filing, time- or usage-based orderings, and much better tools for helping users in their organizing task. These findings provided the primary motivation for the research described in this paper. We describe a new interaction that helps users quickly recognize and use the categorical structure they need to organize their favorite web pages. The interaction technique includes the Data Mountain [13], a novel visual environment for laying out personal web pages in a 3D space (described below), and an Implicit Query technique which shows the user which items are related to their current interest. Our Implicit Query algorithms determine similarities among web pages, and present the results in a visual format that has been observed to be useful and usable. This approach allows users to focus on relevant items instead of searching through large numbers of pages in the space. We have initially applied this idea to interaction with documents on the Web, although the interaction technique could be applied to any electronic document management task. The Data Mountain is a (3D) document management system (see Figure 2). The design and implementation of the Data Mountain is described in [13], so only a short overview of the environment will be provided here. Currently the Data Mountain is being used as an alternative to a web browser's favorites or bookmark mechanism. It should be understood that other forms of documents should work equally well in the new environment. The Data Mountain uses a planar surface (tilted at degrees; see Figure 2), on which documents are dragged. A document being dragged remains visible so that the user is always aware of the surrounding pages. The user can place Figure 2: Data Mountain with 100 web pages. her web pages (or documents) anywhere on the surface. In practice, the user creates meaning by organizing the space in which she lays out these documents. In our study, each user was allowed to freely choose an organizational method and adjust it at any point throughout the study. When the user clicks on a page stored on the Data Mountain, the page is animated forward to a preferred viewing position, as shown in Figure 1. When in the preferred viewing position, another click will put the page back on the Data Mountain in its last known location. In practice, a click on a URL would allow the user to follow that link. Also, a stored page can be moved at any time by dragging it with the mouse. Since the page is visible during the move, the user knows where the page will be when the drag is terminated. The movement is continuous and constrained to the surface of the Data Mountain. When a user moves a page around on the Data Mountain, it is likely to bump into other pages. Objects are not allowed to intersect, and the user's dragging action is not constrained. Instead, we handle collisions by displacing previously placed pages, thus continually maintaining a minimum distance between all pages, and transitively propagating displacement to neighbors as necessary. The user dragging the page continually sees what state will result when the drag is terminated (i.e., there is no animated settling time). This displacement technique also ensures that pages never get fully obscured. There are a number of cues designed to facilitate spatial cognition. The most obvious are the 3D depth cues of perspective view, accompanying size differences, and occlusion, particularly when pages are being moved. Simple, circular landmarks on the surface of the Data Mountain also offer spatial cues, which may or may not be utilized during page placement or retrieval. Less obvious, but also quite important, are the shadows cast by web pages. Papers CHI 99 15-20 MAY 1999 Subtle but pervasive spatial audio cues accompany all animations and user actions to reinforce the visual cues. The sound effects are highly dynamic. For example while dragging a page, the user hears a humming sound that changes pitch based on the speed at which the page is moved. With careful use of the timbre, stereo and attenuation of the humming sound, users are thus provided an additional spatial location indicator. Finally, as the user moves a page, other pages that move out of the way as needed are accompanied by yet another distinctive sound. For identification purposes, we provided a pop-up labels similar to tool-tips to display web page titles. The title appears as soon as the mouse moves over a page. In order to support users' information management and retrieval tasks on the World Wide Web (WWW), we use what we call Implicit Queries. Implicit Queries are generated automatically, based on the current focus of the user's attention. In our system, the web page that the user has currently selected is the basis for queries launched implicitly in the background. Much richer models of users' interests are easy to incorporate as well [6], but were not needed for this experiment. Web pages that are similar to the currently selected page are then highlighted to aid users' organization and use of their web information space. Figure 1 shows an example where the selected page has something to do with entertainment. For this particular user, most of the entertainment-related pages are on the left side of the layout and are highlighted so that the pattern is easily seen, yet not distracting. In color, this highlighting is very obvious-it is much less obvious in a black and white reproduction, so Figure 1 has been retouched to make clear where the highlighting is. Prior work on similarity metrics in the user interface A number of previous systems (for example, Spire [18] and Galaxy of News [11]) have used document similarity metrics as a way to organize (or lay out) documents, bringing similar documents closer together. Information access in these systems is achieved primarily by navigation. The Data Mountain differs fundamentally by allowing the user to determine the layout of the documents, and the Implicit Query mechanism highlights related documents in the context of the user-defined organization. By maintaining spatial consistency with the user's organization, our system is able to more effectively leverage human spatial memory [13]. Many systems show the results of explicit queries from users, usually as ranked lists. Some systems post the results of an explicit search against a known structure [4]. These structures may be expert-generated hierarchies or automatically derived (e.g., from the link structure of a Web site or by a statistical analysis of inter-item similarities). The resulting structures are shown using a variety of representations - clusters, 2D and 3D spaces, tree-maps.All of these systems take a known structure and show how search results fit into that organization. While these approaches are similar to ours in that respect, it is important to note that the organizing structures used by these systems are generated by domain experts or statistical methods and not by the user. In contrast to these systems that use explicit queries, we have developed an interaction technique which relieves the user from having to generate an explicit query and so reduces the amount of cognitive processing required to retrieve related information. Much less work has been done on Implicit Queries and interfaces to them. The Remberance Agent by Rhodes and Starner from MIT [12] described an approach similar to our general Implicit Query idea. They implemented a continuously running process which monitored what a user was reading and automatically sent this information to a backend server which indexed personal information such as email, notes and papers. The query consisted of whatever information was being read or typed into the current emacs buffer. The results were presented as a ranked list of titles in a separate window, and were thus very limited compared to our Data Mountain. Schilit et al. [15] developed the XLibris system to support what they call active reading. Reading was enhanced by computation using a kind of Implicit Query mechanism. Highlights made by the user via pen markings were used to issue an automated query for related materials. It is not clear that the use of highlighting to drive search is optimal, since people highlight and annotate for many different reasons [9]. The results are shown as thumbnails in the margin, which provides a local context, but no global inter-item similarities are shown as in the Data Mountain. Our work on visualizing the results of Implicit Queries combines two ideas in a novel and a powerful way. We use a rich visual representation of objects and their inter-relations on the user-determined spatial layout of the Data Mountain along with Implicit Queries for information management. In addition, we empirically evaluate the usefulness of our system to support users in information organization and retrieval tasks. Previous research on highlighting techniques Much research has been performed on the usefulness of highlighting in attracting attention to relevant information in a display [17]. For instance, it is well known that the techniques of reverse video, color, boldness (or brightness), underlining, and flashing are all effective highlighting techniques, although some of them can actually be disruptive if applied inappropriately. For our Implicit Query highlighting, we examined over 20 highlighting techniques, some inspired by previously reported research [5, 10]. Based on our informal observations of which techniques were more most effective without causing undue disruption, we chose to implement a simple green outline to display which web pages were related to the currently selected web page. CHI 99 15-20 MAY 1999 Papers Finally, it should be noted that we have chosen a binary approach to highlighting similarities in the web pages stored on the Data Mountain, as opposed to the continuous approaches we considered. We chose a binary approach purposefully, as we were concerned about the possibly distracting effect that Implicit Query highlighting would have on the user's primary task. We also assumed that a binary approach would lessen the decision-making burden on users. However, we have prototyped many designs that show the relevance score along a continuum in the visualization. USER STUDIES OF We tested our visualization and Implicit Query user interface ideas in two studies. The first study examined how users managed and stored 100 favorite web pages with and without Implicit Queries during their web page interactions. It was our hypothesis that the Implicit Query algorithms and highlighting would provide a useful guide to users during their web page organization. Although users were not required to follow the query recommendations in any way, we further hypothesized that users would indeed group together the highlighted pages. In addition, it was hypothesized that Implicit Query highlighting would improve memory of where pages were stored spatially on the data mountain, due to subjects' having spent more time attending to related pages and considering the suggestions proffered by the system. This hypothesis was based on the theoretical notion of levels of processing [2]. According to this theory, information can be processed more or less deeply, ranging from a shallow analysis (attention to surface features) to a deeper, semantic analysis. Information that is processed more deeply has been shown to be more likely to be remembered over time. In these studies, we also explored two similarity metrics to drive the Implicit Queries. Looking at the content (word) overlap of pages generated one metric, while the other was derived from a group of subjects' previous organizations of the same web pages. We expected that the Implicit Query suggestions coming from subjects' previous organizational strategies might be the best case for a similarity metric, and so hypothesized a performance advantage for this algorithm. In the second study, we examined whether or not this system guidance during web page organization would actually benefit subsequent retrieval of those previously stored favorite web pages. Any retrieval time advantages will be realized over and over again as subjects repeatedly revisit the page later. Methods Subjects Thirty-five subjects of intermediate web ability and who were experienced Microsoft Internet Explorer" 4.0 (IE4) users at work or home participated in the experiment. All users were required to successfully answer a series of screening questions pertaining to web browser and Internet knowledge in order to qualify for participation. The number of females and males was balanced. 15 subjects organized their web pages with no Implicit Query mechanism. 20 subjects were aided by one of two Implicit Query algorithms subjects used algorithm 1 or IQ1; 11 used algorithm 2 or IQ2). The experimental sessions involved two studies, an organizational phase and a retrieval phase. For clarity, methods and results of the two phases will be described separately as Experiment 1 and Experiment 2. The Methods for Experiment 1, the organizational phase, are described below. Material One hundred web pages were used in this study; 50 of the pages came from PC Magazine's list of top web sites (and so were likely to have been seen by at least some of the participants) and 50 pages were selected randomly from the Yahoo!" database. The web pages were downloaded onto a web server located on the computer the subject worked at. We used two algorithms to generate a set of matching pages for each web page in the study, a co-occurrence algorithm and a content-based algorithm. IQ1 - co-occurrence similarity. The first similarity measure was derived from a page-page co-occurrence matrix based on seven previous subjects' categorizations. Only subjects whose categorizations were relatively clear and discrete spatially were used for this algorithm's derivation. We counted the number of times that a pair of pages co-occurred in the same cluster - this number varied between 0 and 7. This algorithm essentially tells the user, Other people thought these pages were related. IQ2 - content-based similarity. For the content-based similarity computations, the popular vector space model from information retrieval was used [14]. Documents were pre-processed to remove the HTML markup. Words on a standard stop list of common words along with 10 web-specific words were omitted, and white space or punctuation was used to delimit words. Each document was represented as a vector of words with entries representing the frequency of occurrence of a word in that document. The similarity between documents was measured by taking the dot product of the document vectors divided by the lengths of the vectors. Once we generated these two measures of similarity, we set a threshold for each algorithm. Only web pages that matched the target web page at a level of similarity above the threshold were recommended as related to the user. We wanted the two algorithms to recommend roughly the same average number of matches per page. The thresholds we chose generated, on average, 4.2 and 4.3 matches per page respectively. In the co-occurrence algorithm (IQ1), this threshold produced 39 pages that had no match above the threshold. There were 28 pages that had no match above the threshold for the content-based algorithm (IQ2). To indicate which pages were identified as matching the page being viewed, we highlight the related pages with a Papers CHI 99 15-20 MAY 1999 bright green frame as shown in Figure 1. Highlighting automatically occurs when subjects are presented with a new page for storage during the first phase of the study. Selecting any page on the Data Mountain causes its related pages to be highlighted. Procedure Subjects were shown 100 web pages sequentially (order was randomized for each subject) and asked to store them on the Data Mountain. They were allowed to create any organization they wanted and were encouraged to create a personally meaningful structure that mimicked how they stored favorite web pages at home. Subjects were told that they would have to use their organization for a retrieval task in the second half of the test. For the subjects who were in the Implicit Query conditions, related pages were highlighted according to the IQ1 or IQ2 algorithms. We briefly interrupted each subject in the Implicit Query conditions to discuss the green highlighting after 10 minutes of their organization phase had elapsed. We asked them if they had noticed the highlighting, and what they thought it was for. We then explained its purpose and informed participants that they were free to use or ignore the suggestions. Some subjects noticed the highlighting, figured out its purpose and requested validation of their assumption before 10 minutes had passed, which motivated an early intervention. When this occurred, we discussed it with the subjects at the time of their request. The discussion time, on average, took less than 1 minute. After all 100 pages had been saved on the Data Mountain, the subjects were given time to fine-tune their organization until they were personally satisfied with it. The main independent variable of interest in Experiment 1 was the between subjects variable of which Implicit Query matching algorithm was used (no Implicit Query, IQ1, or IQ2). The number and type of categories, organization time, and subjective satisfaction ratings were the dependent measures of interest. Results Influences on information management behavior Most subjects adopted an organization based on semantic categories. Some of these subjects augmented this with temporal or alphabetic cues as well. Five users stored files alphabetically and one used no apparent organization. Table 1 shows the number of subjects following each of the observed organizational strategies. For subjects who categorized using a strategy other than alphabetic, we asked them to circle and label their categories. Number of categories The average number of categories for each group is shown in Table 2. Subjects in the Implicit Query conditionscreated slightly more categories than did subjects without the Implicit Query highlighting during the organization phase of the study, although this difference was not statistically significant, F(2,27)=1.31, p=.28. Because we had to remove subjects who alphabetized from this analysis, the test was not very sensitive. If we pool these results with those of another condition (not reported here) that used the same organizational procedure and stimuli, but different retrieval cues, there were reliable differences in the number of categories, Implicit Query Condition Semantic Alphabetic Unknown Implicit Query IQ1-: Co- occurrence based IQ2: Content based Table 1. Number of participants that used a particular organizational strategy while storing web pages. Implicit Query Condition Avg. # of Categories (Standard Deviations in parentheses) IQ1: Co-occurrence based 15.8 (5.8) IQ2: Content based 13.6 (5.9) Table 2. Averages and standard deviations for the number of categories observed in each Implicit Query condition. Overlap of category concepts Subjects' organizations were analyzed for their amount of overlap with each other. In order to do this, we used the layouts that subjects had circled and labeled for us. We identified 20 categories that subjects used very frequently, and reduced their category structures into these 20 categories. In order to check our data reduction procedure, we compared two authors' classification efforts on the same layouts for inter-rater reliability. On average, we obtained 90% agreement across Implicit Query conditions for two independent observers. One subject was primarily responsible for the inter-rater disagreement, and for this subject the 2 raters only agreed 50% of the time. Once it was determined that the categorization scheme was a reliable one, subjects' clusters were analyzed for consistency. We found no reliable differences in how often subjects agreed with each other in terms of categories maintained during the storage phase of the study F(2,26)=.164, p=.85. In other words, having an Implicit Query mechanism did not result in more or less agreement between subjects and their organizational schemes. CHI 99 15-20 MAY 1999 Papers Organizing Time Although subjects were not encouraged to be efficient during the organization phase of the experiment, we did record organization times across Implicit Query conditions. Organization time includes both the time used to initially place and organize web pages and the time to reorganize pages after the initial storage. The average organization times were 52 minutes for IQ0, 71 minutes for IQ1 and 81 minutes for IQ2. The effect is marginally reliable 2.88, p=.07. This is not surprising, given that Implicit Query users often considered whether or not to follow the system recommendation for where to store a web page, and they created somewhat more categories, both of which could have taken extra time. Most of the total organization time was spent during initial placement (an average of 53 minutes across all conditions) and substantially less time during reorganization (an average of 15 minutes across all conditions). The variance in reorganization time was quite large, due primarily to two subjects. The subjects who alphabetized in IQ1 and IQ2 each took over an hour to reorganize their alphabetized layouts, which is an interesting finding in itself and warrants further research. One subject moved thumbnail images more than 1000 times! In our prototype it was difficult to reorganize because no grouping of objects was allowed. If subjects who alphabetized are removed, the organization time differences between conditions decrease. (The alphabetizers in IQ0 did not take exceptionally long during reorganization.) Questionnaire measures Participants provided a variety of subjective ratings about the user interface and the interaction techniques at the end of the study session. One subject is not included in the analysis of the Implicit Query condition 2 due to her not filling out any answers on the questionnaire. A multivariate ANOVA (using Implicit Query condition as a between subjects factor and each questionnaire item as a multivariate response) revealed a reliable interaction between Implicit Query condition and only one questionnaire item, F(2,31)=7.09, p=0.003. The questionnaire item that drove this effect, I was satisfied with my organizational scheme; 1=Disagree, 5=Agree, accounted for over 31% of the variance in the data. Scheffe post-hoc analyses showed that subjects in the no Implicit Query (IQ0) and the co- occurrence-based algorithm (IQ1) groups were not different from each other on this questionnaire item (average ratings 3.6, SD=0.22 and 4.0, SD=0.28, respectively). Subjects in the content-based algorithm (IQ2) condition, however, were less satisfied than the other two groups (average rating = 2.6, SD=0.25). A few questionnaire items pertained only to the Implicit Query visualization, and so only groups IQ1 and IQ2 responded to these questions. Analyses of these results revealed that the co-occurrence algorithm built from previous subjects' organizations of the 100 web pages was rated as significantly less distracting than the content-based algorithm (IQ2), t(18)=-2.04, p=.01, two- tailed. Subjects' ratings of the IQ1 highlighting as more useful than IQ2 reached borderline significance, t(18)=1.8, two-tailed. No other significant effects emerged from analysis of the questionnaire data. Discussion The results of the organization phase of this study were mixed, and suggest that good Implicit Queries in the user interface in the storage of information during web interaction might lead to slightly more detailed categorization at the cost of significantly longer storage times. According to Levels of Processing Theory [2], the increased time spent in information management could result in a deeper encoding of subjects' web page organizations on the Data Mountain and might therefore subsequent web page retrieval in both speed and accuracy. Questionnaire data suggested that subjects were equally satisfied with their organizations with no Implicit Query or with co-occurrence based Implicit Query, but were significantly less satisfied with content-based Implicit Query. In Experiment 2, we assessed whether or not the presence of the Implicit Query highlighting during web page storage improved web page retrieval performance. We compared the IQ0, IQ1 and IQ2 groups on average retrieval times, the number of incorrect pages retrieved, and the number of failed retrieval attempts for the 100 web pages. It is extremely important to note here that the Implicit Query highlighting was disabled for this phase of the experiment. In other words, a subject's target web page did not highlight during its retrieval trial, nor were web pages that might be related to the target highlighted. While such highlighting would be desirable in practice, we felt it would be too beneficial for experimental purposes. Methods Subjects, Materials and Procedure The same thirty-five subjects participated in the second study. After a short break following the organizational study, the subjects started retrieval. For the second study, participants were shown a retrieval cue consisting of the textual title of the web page, and asked to find the corresponding page on the Data Mountain. The retrieval cue was presented in a small, rectangular window below the display window of the Data Mountain. The cues were presented in a random order for each subject. If a subject could not find the target page within two minutes, the subject was instructed to proceed to the next retrieval trial. Since the Implicit Query highlighting was not enabled during this phase of the experiment, there are no visible differences in the user interface among the experimental conditions in this phase. Papers CHI 99 15-20 MAY 1999 The three primary dependent measures used in Experiment were web page retrieval time, the number of incorrect pages selected, and the number of failed attempts to retrieve a web page. Retrieval time (or reaction time) was defined as the time to select the correct item. Incorrect selections referred to the total number of pages selected that were not the target page, not including failed retrieval trials. Failed retrievals occurred when the subject either took longer than two minutes for retrieval or chose to stop searching for an item. Results Retrieval Time Only trials in which subjects found the correct web page within the allotted two-minute timeframe are included in the reaction time analysis for both sessions. Figure 3 shows the retrieval time results. For each subject we computed a median response time. The average retrieval time across subjects was 9.5 seconds (SD=8.5) for the subjects with no Implicit Query algorithm, 6.8 seconds (SD=2.01) for the co-occurrence algorithm, and 7.3 (SD=2.14) seconds for the content-based algorithm. The difference between the three conditions was not significant, F(2,32)=0.73, p>.05. The high variance in IQ0 was primarily responsible for the failure of this effect to be reliable. Effects As expected, there is large variability in the time required to retrieve individual web pages. The average RT for individual web pages ranges from 4.9 seconds (for the NASA Home Page) to 24.3 seconds (for the Mercury Center Home Page). In general, the pages that were fastest to retrieve were either very distinctive semantically or visually. Popularity of a web page may have had additional effects, but the effect was not large (average retrieval time for 50 popular web pages =12.7, randomly chosen web pages average=12.9). Incorrect Selections On average there were very few visits to incorrect pages. The average number of incorrect retrievals in the no Implicit Query algorithm condition = 3.5 (SD=3.6), the IQ1 and for the IQ2 algorithm the average number of incorrect retrievals = 4.7 (SD=3.6). There were no significant differences in the average number of incorrect pages retrieved across the 3 conditions, F(2,32)=.78, p=.47. Failed Retrievals There were an average of 4.8 (SD=3.1) trial failures in the no Implicit Query condition, compared to an average of 2.0 (SD=2.4), on average, in the IQ1 algorithm and 5.0 (SD=6.1) in the IQ2 algorithm, and this difference was once again not statistically significant, F(2,32)=1.6, p=.2.Web Page Retrieval TimeAverage RT (seconds)106 IQ 22Implicit Query Condition Figure 3. Average retrieval times (including standard error of the mean) for the 3 IQ conditions. Discussion It is important to reiterate that no Implicit Query highlighting was used during retrieval in Experiment 2. (We suspect retrieval times in IQ1 & 2 would be reduced even further if highlighting were used during retrieval). Results obtained in Experiment 2 suggest that Implicit Query highlighting during storage can facilitate subsequent retrieval, but the effects were not reliable. Retrieval times were variable both across items and subjects, and additional experimental power will be necessary to fully understand this tendency. Retrieval time differences are important because typical uses of any one piece of information will have one storage incident and many subsequent retrievals. By reducing retrieval time at the expense of storage time, we can shift and reduce overall cognitive load for the user when finding previously viewed information for the task at hand. A concern about the generality of these results is that we tested subjects' retrievals on the same day that they stored the web pages, an unlikely scenario in everyday web page access. In subsequent studies in our laboratory, we brought subjects back 6 weeks and 6 months after they stored their web pages on the Data Mountain. There was no decrement in performance when subjects returned and were asked to retrieve their web pages after either a 6-week period or a 6- month period of disuse. Details of these further studies are forthcoming. CONCLUSION This paper reported two studies that examined users' web page organizations and later retrievals using a combination of two interaction techniques, the Data Mountain and Implicit Queries. Previous research [13] had already demonstrated enhanced performance for web page retrieval in the Data Mountain, when compared to current browser favorites mechanisms (one-dimensional visual text lists). The use of a passive and subtle Implicit Query aid CHI 99 15-20 MAY 1999 Papers influenced subjects at organization time. They took longer and created somewhat more categories. There are indications of influence at retrieval time, even when no Implicit Query cue is present. Future work will focus on user interface visualizations for queries in much larger information spaces to see if more powerful results can be obtained in those domains. We will also continue to investigate the influence that Implicit Queries have on individual users' organizational styles. For instance, there was some indication that users without Implicit Queries tended to use an alphabetic organizational strategy more often. We will examine the use of alternative highlighting mechanisms, and explore the use of Implicit Queries at the time of retrieval as well as storage. This future work will be carried out using alternative 3D visual metaphors for visualizing the query results. ACKNOWLEDGMENTS We thank the User Interface Research Group at Microsoft and Kevin Larson for their help and valuable comments on this paper. We thank Paul Jaye for his help in data analysis. --R Information archiving with bookmarks: Personal web space construction and organization Levels of processing: A framework for memory research. Textual information retrieval. Clusters on the World Wide Web: Creating neighborhoods of make- believe GVU's 9th WWW User Survey Information Seeking in Electronic Environments. Toward an ecology of hypertext annotation Generalized pointing: Enabling multiagent interaction Galaxy of news: An approach to visualizing and understanding expansive news landscapes. A continuously running automated information retrieval system. Data Mountain: Using Spatial Memory for Document Management Beyond paper: Supporting active reading with free form digital ink annotations Sorting out searching: A user-interface framework for text searches Screen Design. Visualizing the Non-Visual: Spatial analysis and interaction with information from text documents --TR Galaxy of news Information seeking in electronic environments Cat-a-Cone Sorting out searching Information archiving with bookmarks Beyond paper Generalized pointing Toward an ecology of hypertext annotation Clusters on the World Wide Web Data mountain Introduction to Modern Information Retrieval Visualizing the non-visual --CTR Susan Dumais , Edward Cutrell , Raman Sarin , Eric Horvitz, Implicit queries (IQ) for contextualized search, Proceedings of the 27th annual international ACM SIGIR conference on Research and development in information retrieval, July 25-29, 2004, Sheffield, United Kingdom Andy Cockburn , Bruce McKenzie, Evaluating the effectiveness of spatial memory in 2D and 3D physical and virtual environments, Proceedings of the SIGCHI conference on Human factors in computing systems: Changing our world, changing ourselves, April 20-25, 2002, Minneapolis, Minnesota, USA Andy Cockburn , Bruce McKenzie, 3D or not 3D?: evaluating the effect of the third dimension in a document management system, Proceedings of the SIGCHI conference on Human factors in computing systems, p.434-441, March 2001, Seattle, Washington, United States Robert DeLine , Amir Khella , Mary Czerwinski , George Robertson, Towards understanding programs through wear-based filtering, Proceedings of the 2005 ACM symposium on Software visualization, May 14-15, 2005, St. Louis, Missouri Robin Senior , Roel Vertegaal, Augmenting conversational dialogue by means of latent semantic googling, Proceedings of the 7th international conference on Multimodal interfaces, October 04-06, 2005, Torento, Italy Jones , Harry Bruce , Susan Dumais, Keeping found things found on the web, Proceedings of the tenth international conference on Information and knowledge management, October 05-10, 2001, Atlanta, Georgia, USA Reiner Kraft , Chi Chao Chang , Farzin Maghoul , Ravi Kumar, Searching with context, Proceedings of the 15th international conference on World Wide Web, May 23-26, 2006, Edinburgh, Scotland Reiner Kraft , Farzin Maghoul , Chi Chao Chang, Y!Q: contextual search at the point of inspiration, Proceedings of the 14th ACM international conference on Information and knowledge management, October 31-November 05, 2005, Bremen, Germany
classification;similarity;categorization;information retrieval;information management;information visualization
303650
Optimal Control of Thermally Convected Fluid Flows.
We examine the optimal control of stationary thermally convected fluid flows from the theoretical and numerical point of view. We use thermal convection as control mechanism; that is, control is effected through the temperature on part of the boundary. Control problems are formulated as constrained minimization problems. Existence of optimal control is given and a first-order necessary condition of optimality from which optimal solutions can be obtained is established. We develop numerical methods to solve the necessary condition of optimality and present computational results for control of cavity- and channel-type flows showing the feasibility of the proposed approach.
Introduction . The control of viscous flows for the purpose of achieving some desired objective is crucial to many technological and scientific applications. In the past, these control problems have been addressed either through expensive experimental processes or through the introduction of significant simplifications into the analyses used in the development of control mechanisms. Recently mathematicians and scientists have been able to address flow control problems in a systematic, rigorous manner and established a mathematical and numerical foundation for these problems; see [1-2], [4-5], [8-9], [11], and [15-18]. This work was supported in part by the Air Force Office of Scientific Research under grants AFOSR F49620-95-1-0437 and AFOSR F49620-95-1-0447. y Center for Research in Scientific Computation, Department of Mathematics, North Carolina State University, Raleigh, NC 27695-8205 (kito@eos.ncsu.edu and ravi@eos.ncsu.edu). K. ITO AND S.S. RAVINDRAN The control of vorticity has significant applications in science and engineering such as control of turbulence and control of crystal growth process. In this article we consider the minimization of vorticity in viscous incompressible thermally convected flows using boundary temperature as control mechanism. We formulate the control problem as a constrained optimization problem for steady viscous incompressible thermally convected flow, namely that of computing a boundary temperature on a part of the boundary that minimizes the vorticity in the fluid. The constraint is the system of equations that represents steady viscous incompressible Navier-Stokes equations coupled with the energy equation. The choice for the cost is a quadratic functional involving the vorticity in the fluid so that a minimum of that functional corresponds to the minimum possible vorticity subject to the constraints. We then prove the existence of an optimal control and derive the first-order necessary conditions characterizing the control. Once the necessary optimality conditions are derived, we develop numerical methods to solve such conditions and present numerical results showing the feasibility of the approach for cavity and channel type flows. 1.1. The governing equations of a thermally convected flow. The class of thermally convective flow we consider is modelled by Boussinesq equations whose derivation is based on certain assumptions about the thermodynamics and the thermal effects on the flow. The first one is that variations in density is negligible except for the body force term aeg in the momentum equations, where ae is the density and the vector g is the constant acceleration of gravity. We next assume that the density ae in the term aeg can be given by are reference temperature and density, respectively, T is the absolute temperature and fi is the thermal expansion coefficient. Furthermore, we assume that in the energy equation, the dissipation of mechanical energy is negligible and the viscosity -, the heat conductivity -, the thermal expansion coefficient fi and the specific heat at constant pressure c p are constant. Then under these assumptions the steady flow is governed by following equations: where\Omega is a bounded open set and the heat source is assumed to be zero. If we assume there is a length scale ', a velocity scale U and a temperature scale in the flow, then one can define nondimensional Prandtl number Reynolds number Re according to x / x=', u OPTIMAL CONTROL OF THERMALLY CONVECTED FLUID FLOWS 3 obtain the following nondimensional form of Boussinesq equations. Re \Deltau Re 2 where g is now a unit vector in the direction of gravitational acceleration. 1.2. Statement of the optimal control problem. Let us next state the optimal control problem we consider \Omega jr \Theta uj 2 subject to the state Re Re 2 ReP r with the boundary conditions as follows. are disjoint portions of the boundary \Gamma of the domain\Omega\Gamma where are given on the boundary and g is a temperature control by the radiational heating or cooling. In the cost functional J , the term R\Omega jr \Theta uj 2 d\Omega is a measure of vorticity \Theta u in the flow, the term R is the measure of the magnitude of the control which is also required for the rigorous mathematical analysis of the control problem and the penalizing parameter ffi adjusts the size of the terms in the cost. The flow quantities u, T and p denote as usual the velocity, temperature and pressure, respectively. The outline of the paper is as follows. In x2, we give a variational formulation of the state equations and study their wellposedness. We believe it is new since it deals with nonhomogeneous boundary conditions. In x3 the existence of optimal solutions and first order optimality conditions for optimal control problems are established. x4 deals with computational methods to solve the necessary conditions of optimality. Finally, in x5, we present numerical results for control of cavity and channel flows using boundary temperature controls. 4 K. ITO AND S.S. RAVINDRAN 1.3. Notations. Throughout, C or C i (where i is any subscript) denotes a constant depending only the domain\Omega which is assumed to be a bounded set in R I 2 with smooth boundary \Gamma. We denote by L 2(\Omega\Gamma the collection of square-integrable functions defined on Z \Omega q @x ff 1@x ff 22 L Vector-valued counterparts of these spaces are denoted by bold-face symbols, e.g., H are the restriction to the boundary of H We denote the norms and inner products for H tively. The L 2 or L inner product is denoted by (\Delta; \Delta). We denote the norms and inner products for H r (\Gamma) or H r (\Gamma) by k \Delta k r;\Gamma and (\Delta; \Delta) r;\Gamma , respectively. The L 2 (\Gamma) or L 2 (\Gamma) inner product is denoted by (\Delta; \Delta) \Gamma . be the divergence free subspace of H 1 defined by and H 0 is the completion of V 0 with respect to L norm and is given by The space H 0 is equipped with the norm k \Delta k 0 and V 0 is equipped with juj 1 be the subspace of H defined by and set 1 be the strong dual spaces of V 0 and V 1 , respectively, and h\Delta; \Deltai denote the dual product on either V Throughout the mathematical discussions, for the sake of convenience we set b Re ReP r and b Re 2 which are not to be confused with the physical quantities such as kinematic viscosity and conductivity. We define the following bilinear and trilinear forms a 0 (u; Z\Omega Z\Omega Z\Omega OPTIMAL CONTROL OF THERMALLY CONVECTED FLUID FLOWS 5 Z and Z We have the coercivity relations associated with a 0 (\Delta; \Delta) and a 1 (\Delta; \Delta): a 0 (u; and which are a direct consequence of Poincar'e inequality. 2. Weak Formulation. In this section we discuss the weak variational formulation of the Boussinesq system (1.2) and establish the existence of weak solutions. It follows from the Hopf extension (see [10]) that for each ffl ? 0, there exists a function (\Omega\Gamma such that r \Delta provided that the boundary data u In the sequel we will take . Let T 2 H 1(\Omega\Gamma be a function such that T any function (u; T satisfying the inhomogeneous boundary condition can be represented by We then obtain a weak variational form of (1.2). For a A solution (u; is called a weak solution of (1.2) if equation (2.1) is Regarding the bilinear form b 0 (\Delta; \Delta; \Delta), we have the following results. Lemma 2.1. For 1(\Omega\Gamma , the trilinear form b 0 (\Delta; \Delta; \Delta) satisfies 6 K. ITO AND S.S. RAVINDRAN Proof. The first inequality follows from the Holders inequality. We obtain The second result follows from Green's formula provided that r \Delta It follows from the proof of Lemma 2.1 that and for 2.1. Wellposedness. In this section we prove the existence of a weak solution to (2.1). Theorem 2.2. Given exists a weak solution (u; to (2.1) and Moreover, if g(x), T 0 (x) and T 1 (x) are bounded below by T 1 and bounded above by T 2 almost everywhere then almost everywhere in\Omega for every solution. Proof. Step I (Existence): We show that (2.1) has a solution (u; Given linear equations by (2:6a) a 0 (u; v) where First, we show that (2.6) has a unique solution (w; we show that the solution map S on V 0 +u defined by S(b is the unique solution to (2.6), has a fixed point by Sch-auder fixed point theorem. The fixed point the corresponding solution T solution to (2.1). We first note, from Lemma 2.1 and (2.5), that the bilinear form oe 1 (\Delta; \Delta) defined by OPTIMAL CONTROL OF THERMALLY CONVECTED FLUID FLOWS 7 on It thus follows from Lax-Milgram theorem that the equation for Setting in (2.6b), we have It follows from (2.5) that b 1 (b u; /; a 1 (/; /)+2 b -h k/k 2 This implies Similarly, letting From the definition of j and /, it follows that kTk 0 - C 6 which is independent of b Next, we define the bilinear form oe 0 (\Delta; \Delta) on V 0 \Theta V 0 by It then follows from Lemma 2.1, (2.4) and the inequality that oe 0 (\Delta; \Delta) is bounded and V 0 -coercive. Thus, by Lax-Milgram theorem, the equation for has a unique solution w in (2.6a) and using the estimate kTk 0 - C 6 , we get be a closed convex subspace of H 1(\Omega\Gamma2 defined by Then it follows from (2.7) that S maps from \Sigma\Sigma \Sigma into \Sigma\Sigma \Sigma . Moreover, the solution map S is compact. In fact, if b converges weakly to b 8 K. ITO AND S.S. RAVINDRAN is compactly embedded into be the corresponding solution of (2.6), respectively to b u k and b u. Then we have for Setting we have from Lemma 2.1 and (2.5) that which implies kT Similarly, we have and thus ju by Sch-auder fixed point theorem (see [20]) there exists at least one solution to (2.6). Let us next derive the appriori estimate. Setting in (2.6b) we obtain a 0: Equivalently, a 1 ('; Then using the coercivity and continuity properties of a 1 (\Delta; \Delta) and b 1 (\Delta; \Delta; \Delta) and the antisymmetry property of b 1 (\Delta; \Delta; \Delta), it follows that for some constant C 11 independent of b u. From (2.7)-(2.8), we obtain the appriori estimate for some constant C. Step II (L 1 estimate): We show that if T 1 - almost everywhere x for every solution (u; to (2.1). In fact, letting in the second equation of (2.1) and using the same arguments as above, we obtain where Thus, we obtain k/k 2 Similarly, one can prove that choosing the test function OPTIMAL CONTROL OF THERMALLY CONVECTED FLUID FLOWS 9 We also have the uniqueness of solutions under the smallness assumption on u and Theorem 2.3. If g(x), T 0 (x) and T 1 (x) are bounded below by T 1 and bounded above by T 2 almost everywhere and if jT are sufficiently small, then (2.1) has a unique solution in Z. Proof. Suppose are two solutions to (2.1). Then letting e and e a a for (v; /) 2 V. Setting T , we obtain, using (2.4) and (2.5), that a and a This implies (b and Hence if then je uj From Theorem 2.2 and (2.7), we have Thus, if jT sufficiently small then (2.1) has a unique solution in Z. K. ITO AND S.S. RAVINDRAN 3. Existence of Optimal Controls and Necessary Optimality Conditions. In this section, we show the existence of optimal solutions for the minimization problem (1.1)- and estabilish a necessary optimality condition. Let us first assume that C is a closed convex subset of L 2 (\Gamma 1 ). For example C can be defined to be almost everywhere g or us denote the set Let us define the cost functional J (u; T ; g) to be and cast the control problems in the following abstract setting: For Z \Theta C with Minimize J (x) subject to where the equality constraint represents the state equations (2.1), (b ff Tg; v) for (v; /) 2 V, where Then, we have the existence of solutions to the optimal control problem. Theorem 3.1. Consider the minimization problem: Minimize where C is a closed convex subset of L 2 (\Gamma 1 ). Assume that the function I is convex and lower semicontinuous and satisfies " '(z) - c 1 kzk 2 I the minimization problem has a solution. OPTIMAL CONTROL OF THERMALLY CONVECTED FLUID FLOWS 11 Proof. Let C be a minimizing sequence. Since is uniformly bounded in k and thus from (2.9) so is k(u Hence there exists a subsequence of fkg, which will be denoted by the same index, such that weakly to (u; T ; g) 2 Z \Theta C, since V \Theta L 2 space and C is a closed and convex set. Since H 1 (\Omega\Gamma is compactly embedded into 4(\Omega\Gamma0 it follows from Lemma 2.1 that and which implies (u; T ) 2 S(g). Now, since " ' is convex and lower semicontinuous it follows from [3] that (u; T ; g) minimizes (3.1). Assume that x denotes an optimal pair of (3.1). Then we have the following theorem. Theorem 3.2. Assume that x is a regular point in the sense that Then there exists Lagrange multipliers (ii such that for (v; /) 2 V and Proof. It follows from [14] that if (3.2) is satisfied, then there exists a Lagrange multipliers (ii such that for all (v; that is for all (v; /) 2 V and j 2 C. Setting (v; (3.5), we obtain (3.3). Concerning the regular point condition (3.2), we have 12 K. ITO AND S.S. RAVINDRAN Lemma 3.3. If g 2 int (C) then the regular point condition (3.2) is equivalent to the following condition. Suppose Proof. If g 2 int (C) then (3.2) is equivalent to the linear is a unique solution to Then, since H 1 (\Omega\Gamma is embedded compactly to L 4(\Omega\Gamma2 by Lemma 2.1, F is compact. Thus, it follows from Banach closed range and Riesz-Schauder theorems that E 0 surjective if and only if ker(G which is equivalent to (3.6). Finally, if and the cost functional is given as in (1.1) then (3.3)-(3.4) can be equivalently written as a 0 (ii ff (ii for all (v; /) 2 V. To facilitate the computational discussion, let us collect the necessary conditions of optimality (2.1) and (3.7) and recast them by using the vector decomposition of L (see [10]), L 2 and by introducing pressure p and adjoint pressure -. We obtain: For a OPTIMAL CONTROL OF THERMALLY CONVECTED FLUID FLOWS 13 a 0 (ii +(r \Theta u; r \Theta c(ii ff (ii The system (3.8)-(3.9) forms the necessary conditions of optimality that optimal states and control must satisfy. This system will also be called the optimality system. 4. Computational Methods. In this section we describe a computational method to find the optimal control by solving the optimality system (3.8)-(3.9). 4.1. Finite Element Approximations. A finite element discretization of the optimality system (3.8)-(3.9) is defined in the usual manner. First one chooses families of finite dimensional subspaces X h ae H 1(\Omega\Gamma and S h ae L 2(\Omega\Gamma4 We let X 0 These families are parameterized by a parameter h that tends to zero; commonly, h is chosen to be some measure of the grid size. These finite dimensional function spaces are defined on an approximate domain\Omega h . For simplicity we will state our results in this section by We assume that these finite element spaces satisfy the following approximation properties (see, [7, 10]): there exist an integer k and a constant C, independent of h, v, q and /, such that and Here we may choose any pair of subspaces X h and S h such that X 0 h and S 0 h can be used for finding finite element approximations of solutions of the Navier-Stokes equations with homogeneous Dirichlet conditions. Thus, we make the following standard assumptions, which are exactly those employed in well-known finite element methods for the Navier-Stokes equations. Next, we assume the inf-sup condition: there exists a constant C, independent of h, such that sup R\Omega d\Omega 14 K. ITO AND S.S. RAVINDRAN This condition assures the stability of finite element discretizations of the Navier-Stokes equations and also that of the optimlity system (3.8)-(3.9). The references [9] and [6] may also be consulted for a catalogue of finite element subspaces that meet the requirements of the above approximation properties and the inf-sup condition. We also define Z h to be Once the approximating subspaces have been chosen, we look for an approximate optimal solution h \Theta X h \Theta X 0 h \Theta S 0 h \Theta X h \Theta Z h by solving the discrete optimality system of equations a a +(r \Theta u We next briefly sketch the proof of optimal error estimates. We first prove optimal error estimates for the approximations of the linearized optimality system. Then by a careful choice of spaces and operators we can fit the optimality system into the framework of Brezzi- Rappaz-Raviart theory (see [10]). By verifying all the requirements of that theory, we obtain optimal error estimates for the approximation of the optimality system of equations. Theorem 4.1. Assume (\Omega\Gamma is a nonsingular solution of the optimality system (3.8)-(3.9). Then for each sufficiently small h, the approximate optimality system (3.10) has a unique solution h \Theta X h \Theta X 0 h \Theta S 0 h \Theta X h in a neighborhood of (u; such that We employ Newton's iteration method to solve this finite dimensional nonlinear system of equations. OPTIMAL CONTROL OF THERMALLY CONVECTED FLUID FLOWS 15 4.2. Newtons Method. The Newton's method based on exact Jacobian for solving the discrete optimality system is given as follows: Triangulate the flow domain with a sufficiently small mesh size h; choose finite element spaces X h and S h ; choose an initial guess n ) from the following discrete system of equations: a a +(r \Theta u At each Newton's iteration, we solve the linear system of equations by Gaussian eliminations for banded matrices. Under suitable assumptions, Newton's method converges at a quadratic rate to the finite element solution convergence of Newton's method is valid within a contraction ball. In practice we normally first perform a few successive approximations and then switch to the Newton's method. The successive approximations are defined by replacing the second, fourth, fifth and sixth equations in the Newton's iterations by a a +(r \Theta u In the case of the uncontrolled Navier-Stokes equations, the solution is unique for small Reynolds numbers and the successive approximations converge globally and linearly; see K. ITO AND S.S. RAVINDRAN [7]. However, in the present case of an optimal system of equations for the Navier-Stokes equations, the solution is not shown to be unique and the successive approximation is not shown to be globally convergent, even for small Reynolds numbers. Our numerical experience seems to suggest that the global convergence of the successive approximations for the optimality system is still valid for small Reynolds numbers. Thus the combined successive approximations-Newton iterations gives an effective method for solving the discrete optimality system of equations. 5. Computational Results. We will consider two test examples for vorticity minimization using boundary temperature control. Both examples are related to optimization and control of vapuor transport process for crystal growth. Some related works are reported in [19], [13] and [5]. In [19], tracking temperature field in an ampoule using boundary temperature control is considered, tracking a desired history of the freezing interface location/motion in conduction driven solidification process using temperature control is considered [13] and some optimal control problems in combustion are discussed in [5]. 5.1. Numerical Example 1. In this example, we consider the control of vorticity in a backward-facing-step channel flow. The vorticity is caused by the injection of flow at the inlet of the channel and we try to control the vorticity or the recirculation rather by adjusting the temperature at the top and bottom walls. A schematic of the backward- facing-step channel is shown in Figure 1. The height of the step is 0.5 and that of the outflow boundary is 1. The length of the very bottom of the channel is 5 and the total horizontal length is 6. Figure 3 demonstrate the flow situation for high Reynolds numbers which is computed with and the following boundary conditions for velocity and temperature. @n @n @n The parameters were taken as follows: Re = 200, The computational domain is divided into around 350 triangles with refined grid near the corner, see Figure 2. The finite element spaces X h and X h are chosen to be piecewise quadratic elements (for u h and T h ) defined over triangles and the space S h is chosen to be piecewise linear element (for p h ) defined over the same triangles. A recirculation appears at the corner region whose size increases with increasing Reynolds number. The objective is to shape the recirculation region by applying temperature control on the very top boundary \Gamma top and bottom boundary \Gamma bottom . We take the corner region of the Figure 1, for vorticity minimization. The control is computed by solving the optimality system (3.9)-(3.10) by applying finite element and Newtons method described in x4.1-2. The parameter in the functional was chosen as and the adjoint state variables ii i, - and - were discretized OPTIMAL CONTROL OF THERMALLY CONVECTED FLUID FLOWS 17 using the same way as their state counterparts. At each Newton iteration a banded Gaussian elimination was used to solve the resulting linear system. We obtain the optimal solution typically in 7 Newton iterations. Figure 4 gives the controlled velocity field u h , Figures 5 and 6 are the blow-up of the uncontrolled and controlled flows, respectively, at the corner of the backward-facing-step. Figures 7 and 8 are the control distributions on the top and bottom boundaries. The values of the integral R\Omega jr \Theta uj 2 d\Omega without and with controls were .94 and .51, respectively. We see that we achieved a reduction of 45.74% in the L 2(\Omega\Gamma2671/ of the vorticity. 5.2. Numerical Example 2. This example is motivated by the transport process in high pressure chemical vapour deposition (CVD) reactors (see [10-11] and [6]). A typical vertical reactor, shown in Figure 9, is a classical configuration for the growth of compound semiconductors by metalorganic vapor phase epitaxy. The reactant gases are introduced at the top of the reactor and flow down to the substrate (\Gamma 2 ) which is kept at high temperature. This means that least dense gas is closest to the substrate and the flow is likely to be affected by buoyancy driven convection. In order to have uniform growth rates and better compositional variations, it is essential to have flow field without recirculations. Our objective here is to minimize the vorticity by adjusting the temperature at the side walls in order to obtain a flow field without recirculations and thereby obtain better vertical transport. The geometry of the prototype reactor, depicted in Figure 9, has two outlet portions, and an inlet, \Gamma i , whose widths are 1/3. The size of the susceptor region \Gamma 2 and that of the side walls \Gamma 1 are 1; the height of the inlet port \Gamma s is 1/3. The boundary conditions for computations were as follows: For the uncontrolled flow computations, we take throughout the computations in this problem we take the Reynolds number to be Re = 100, the Prandtl number to be 1. For the discretization, the finite element spaces were chosen to be the same as in the previous example. We performed simulations with several values of Gr=Re 2 for the uncontrolled case. The flow situations are shown in Figure 10a)-15a) and the corresponding vorticity in L 2 norm is given in Table-I. Two standing circulation appear near the susceptor due to natural convection which did not appear at all when Gr=Re 2 - 1. For the control simulations heating/cooling control was applied to the side walls \Gamma 1 with fixed inflow rate and vorticity cost was minimized with the parameter 0:01. This control problem was solved using our optimal control techniques. K. ITO AND S.S. RAVINDRAN The resulting flow fields for various Gr=Re 2 values are shown in Figure 10b)-15b) and the corresponding vorticity in L 2 norm is given in Table-I. The control values on the side walls are given in Figure 16a)-b). We see, in Figure 10b)-15b), significant reduction in recirculation for the controlled flow. Our computational experiments (not reported here) indicate that for Gr=Re 2 AE 1, thermal control mechanism on the side walls with fixed flow rates may be less effective for the elimination of recirculation. Uncontrolled Vorticity 0.1983 0.2600 0.3505 0.4712 0.6186 0.7878 Controlled Vorticity 0.1126 0.1174 0.1113 0.1123 0.1147 0.1183 Table I. Uncontrolled and Controlled Vorticity in L 2 norm for different Gr=Re 2 6. Conclusion. In this article we studied vorticity minimization problem in fluid flows using boundary temperature controls. We formulated the problem as constrained minimization problem with cost functional being the vorticity in the flow. We proved the existence of optimal solution and the existence of Lagrange multipliers. The necessary conditions of optimality was given characterizing the controls and optimal states. Newton's method combined with mixed finite element method is used to solve the necessary conditions of optimality. We finally solved two canonical problems demonstrating the feasibility of the approach. OPTIMAL CONTROL OF THERMALLY CONVECTED FLUID FLOWS 19 --R Optimal Control of Navier-Stokes Equations Analysis of Convex Variational Problems Existence of Optimal Controls for Viscous Flow Problems Transport Phenomena in Vertical Reactors for Metalor- ganic Vapor Phase Epitaxy Finite Element Methods for Viscous Incompressible Flows Analysis and Finite Element Approximation of Optimal Control Problems for the Stationary Navier-Stokes Equations with Dirichlet Controls Finite Element Methods for Navier-Stokes Equations Optimal Control of Thermally coupled Navier-Stokes equations Mathematical Issues in Optimal Design of a Vapour Transport Reactors Control of the Freezing Interface Motion in Two-dimensional Solidification Process Using the Adjoint Method First and Second Order Necessary and Sufficient Optimality Conditions for Infinite-dimensional Programming Problems Numerical Solutions of Optimal Boundary Control Problems for Navier-Stokes Flows An Optimal Control Problem in Exterior Hydrodynamics Optimal Design of Nonlinear Parabolic Systems. New York --TR
flow control;finite element methods;temperature control;optimization;navier-stokes equations
303657
Space-Time Continuous Analysis of Waveform Relaxation for the Heat Equation.
Waveform relaxation algorithms for partial differential equations (PDEs) are traditionally obtained by discretizing the PDE in space and then splitting the discrete operator using matrix splittings. For the semidiscrete heat equation one can show linear convergence on unbounded time intervals and superlinear convergence on bounded time intervals by this approach. However, the bounds depend in general on the mesh parameter and convergence rates deteriorate as one refines the mesh.Motivated by the original development of waveform relaxation in circuit simulation, where the circuits are split in the physical domain into subcircuits, we split the PDE by using overlapping domain decomposition. We prove linear convergence of the algorithm in the continuous case on an infinite time interval, at a rate depending on the size of the overlap. This result remains valid after discretization in space and the convergence rates are robust with respect to mesh refinement. The algorithm is in the class of waveform relaxation algorithms based on overlapping multisplittings. Our analysis quantifies the empirical observation by Jeltsch and Pohl [SIAM J. Sci. Comput., 16 (1995), pp. 40--49] that the convergence rate of a multisplitting algorithm depends on the overlap.Numerical results are presented which support the convergence theory.
Introduction . The basic ideas of waveform relaxation were introduced in the late 19th century by Picard [18] and Lindel-of [11] to study initial value problems. There has been much recent interest in waveform relaxation as a practical parallel method for the solution of stiff ordinary differential equations (ODEs) after the publication of a paper by Lelarasmee and coworkers [10] in the area of circuit simulation. There are two classical convergence results for waveform relaxation algorithms for ODEs: (i) for linear systems of ODEs on unbounded time intervals one can show linear convergence of the algorithm under some dissipation assumptions on the splitting ([15], [14], [4] and [9]); (ii) for nonlinear systems of ODEs (including linear ones) on bounded time intervals one can show superlinear convergence assuming a Lipschitz condition on the splitting function ([15], [1] and [3]). For classical relaxation methods (Jacobi, Gauss Seidel, SOR) the above convergence results depend on the discretization parameter if the ODE arises from a PDE which is discretized in space. The convergence rates deteriorate as one refines the mesh. Jeltsch and Pohl propose in [9] a multi-splitting algorithm with overlap, generalizing the eliptic analysis of O'Leary and White in [17] to the parabolic case. They prove results (i) and (ii) for their algorithm, but the convergence rates are mesh de- pendent. However they show numerically that increasing the overlap accelerates the convergence of the waveform relaxation algorithm. We quantify their numerical results by formulating the waveform relaxation algorithm at the space-time continuous level using overlapping domain decomposition; this approach was motivated by the work of Bj-rhus [2]. We show linear convergence of this algorithm on unbounded time intervals at a rate depending on the size of the overlap. This is an extension of the first classical convergence result (i) for waveform relaxation from ODEs to PDEs. Discretizing the algorithm, the size of the physical overlap corresponds to the overlap of the multi-splitting algorithm analyzed by Jeltsch and Pohl. We show furthermore that the convergence rate is robust with respect to mesh refinement, provided the physical overlap is hold constant during the refinement process. Giladi and Keller [8] study superlinear convergence of domain decomposition algorithms for the convection diffusion equation on bounded time intervals, hence generalizing the second classical waveform relaxation result (ii) from ODEs to PDEs. It is interesting to note that, using multigrid to formulate a waveform relaxation algorithm, Lubich and Osterman [13] prove linear convergence for the heat equation independent of the mesh parameter. In section 2 we consider a decomposition of the domain into two subdomains. This section is mainly for illustrative purposes, since the analysis can be performed in great detail. In section 3 we generalize the results to an arbitrary number of subdomains. In section 4 we show numerical experiments which confirm the convergence results. Although the analysis presented is restricted to the one dimensional heat equation, the techiques applied in the proofs are more general. Future work successfully applies these techniques to higher dimensional problems and to nonlinear parabolic equations. 2. Two Subdomains. 2.1. Continuous Case. Consider the one dimensional heat equation on the interval [0; L], where we assume f(x; t) to be bounded on the domain [0; L] \Theta [0; 1) and uniformly H-older continuous on each compact subset of the domain. We assume furthermore that the initial data u 0 (x) and the boundary data g 1 (t), g 2 (t) are piecewise continuous. Then (2.1) has a unique bounded solution [5]. We consider in the following functions in with the infinity norm The maximum principle, and a corollary thereof, establishing the steady state solution as a bound on the solution of the heat equation are instrumental in our analysis. Theorem 2.1. (Maximum Principle) The solution u(x; t) of the heat equation attains its maximum and minimum either on the initial line or on the boundary at attains its maximum in the interior, then u(x; t) must be constant. Proof. The proof can be found in [21]. Corollary 2.2. The solution u(x; t) of the heat equation (2.1) with f(x; and satisfies the inequality Proof. Consider ~ solving ~ The solution ~ u of (2.3) does not depend on t and is given by the steady state solution ~ By construction we have ~ and on the boundary in the kernel of the heat operator, we have by the maximum principle for the heat equation ~ on the whole domain [0; L]. Hence Likewise ~ and is in the kernel of the heat operator. Hence Therefore we have Now the right hand side does not depend on t, so we can take the supremum over t, which leads to the desired result. To obtain a waveform relaxation algorithm, we decompose the into two overlapping in figure 2.1. The solution u(x; t) of (2.1) can now x Fig. 2.1. Decomposition into two overlapping subdomains. be obtained from the solutions v(x; t) which satisfy the equations @t and @w @t First note that are solutions to (2.4) and (2.5). Uniqueness follows from our analysis of a Schwarz type iteration introduced for eliptic problems in [19] and further studied in [12] and [6]. We get @t and @t consider the error equations @d k+1 @t and @e k+1 The following Lemma establishes convergence of the Schwarz iteration on the interfaces of the subdomains in L 1 . Using the maximum principle convergence in the interior follows. Lemma 2.3. On the interfaces the error of the Schwarz iteration decays at the rate Proof. By Corollary 2.2 we have jjd k+2 (x; \Delta)jj 1 - x fiL and Evaluating (2.11) at and (2.10) at combining the two we obtain inequality (2.8). Inequality (2.9) is obtained similarly. For any function g(\Delta; t) in L 1 ([a; b]; L 1 ) we introduce the norm a-x-b Theorem 2.4. The Schwarz iteration for the heat equation with two subdomains converges in L 1 ([a; b]; L 1 ) at the linear rate jjd 2k+1 (\Delta; \Delta)jj 1;1 - jje 2k+1 (\Delta; \Delta)jj 1;1 - Proof. Since the errors d k and e k are both in the kernel of the heat operator they obtain, by the maximum principle, their maximum value on the boundary or on the initial line. On the initial line and the exterior boundary both d k and e k vanish. Hence Using Lemma 2.3 the result follows. 2.2. Semi-Discrete Case. Consider the heat equation continuous in time, but discretized in space using a centered second order finite difference scheme on a grid with n grid points and n+1 . This gives the linear system of ODEs where the n \Theta n matrix A (n) , the vector valued function f (t) and the initial condition are given by . 1 We note the following property of A (n) for later use: let p := (p A (n) A (n) We denote the i-th component of a vector valued function v(t) by v(i; t) and v(t) - u(t) is understood component wise. We establish now the discrete analogs of the Maximum Principle and Corollary 2.2: Theorem 2.5. (Semi-Discrete Maximum Principle) Assume u(t) solves the semi-discrete heat equation (2.14) with are non-negative for t - 0 and u(i; Proof. We follow Varga's proof in [20]. By Duhamel's principle the solution u(t) is given by Z te A (n) (t\Gammas) f(s)ds The key is to note that the matrix e A (n) t contains only non-negative entries. To see why write A contains only non-negative entries and I (n) is the identity matrix of size n \Theta n. We get e A (n) J l where the last expression has clearly only non-negative entries. Since the matrix exponential in (2.18) is applied only to vectors with non-negative entries, it follows that u(t) can not become negative. Corollary 2.6. The solution u(t) of the semi-discrete heat equation (2.14) with satisfies the inequality Proof. Consider ~ solving @~ u @t ~ with ~ . Using the properties (2.16) and of A (n) and the linearity of (2.20) we find that the solution ~ u of (2.20) does not depend on t and is given by the steady state solution ~ The difference OE(j; t) := ~ satisfies the equation and hence by the discrete maximum principle OE(j; Thus Likewise from /(j; t) := ~ Hence we can bound the modulus of u by Now the right hand side does not depend on t, so we can take the supremum over t, which leads to the desired result. We decompose the domain into two overlapping and\Omega 2 as in figure 2.2. We assume for simplicity that ffL falls on the grid point a and fiL on bc bc bc x Fig. 2.2. Decomposition in the semi-discrete case. the grid point fiL. For notational convenience we define y z As in the continuous case, the solution u(t) of (2.14) can be obtained from the solutions which satisfy the equations @t and @w Applying the Schwarz iteration to (2.21) and (2.22) we obtain @t consider the error equations @d k+1 d and @e k+1 @t e The following Lemma establishes convergence of the Schwarz iteration on the interface nodes of the subdomains in L 1 . Using the discrete maximum principle convergence in the interior then follows. Lemma 2.7. On the interface gridpoints a and b the error of the Schwarz iteration decays at the rate Proof. By Corollary 2.6 we have jje and Evaluating (2.28) at a and (2.27) at a and combining the two we get Now using we get the desired result. The second inequality (2.26) is obtained similarly. For any vector valued function h(t) in L 1 1!j!n Theorem 2.8. The Schwarz iteration for the semi-discrete heat equation with two subdomains converges in L 1 at the linear rate jjd 2k+1 (\Delta; \Delta)jj 1;1 - jje 2k+1 (\Delta; \Delta)jj 1;1 - Proof. By Corollary 2.6 we have Using Lemma 2.7 the result follows. 3. Arbitrary number of subdomains. We generalize the two subdomain case described in section 2 to an arbitrary number of subdomains N . This leads to an algorithm which can be run in parallel. Subdomains with even indices depend only on subdomains with odd indices. Hence one can solve on all the even subdomains in parallel in one sweep, and then on all the odd ones in the next one. Boundary information is propagated in between sweeps. Consider N subdomains\Omega i of so that all the subdomains overlap, as in figure 3.1. We assume also that fi i - ff i+2 for so that domains which are not adjacent do not overlap. The solution u(x; t) of (2.1) can be obtained x Fig. 3.1. Decomposition into N overlapping subdomains. as in the case of two subdomains by composing the solutions v i (x; which satisfy the equations where we have introduced for convenience of notation the two functions v 0 and v N+1 which are constant in x and satisfy the given boundary conditions, namely v 0 (x; (t). The system of equations (3.1), which is coupled through the boundary, can be solved using the Schwarz iteration. We get for @t where again v k and consider the error equations (compare figure 3.2) e i+2 e i\Gamma2 e ff i\Gamma2 ff Fig. 3.2. Overlapping subdomains and corresponding error functions e i @e k+1 with e k For the following Lemma, we need some additional definitions to facilitate the notation. We define ff and the constant functions Lemma 3.1. The error e k+2 i of the i-th subdomain of the Schwarz iteration (3.3) decays on the interfaces at the rate jje k+2 jje k+2 the ratios of the overlaps are given by Proof. By Corollary 2.2 we have jje k+2 Since this result holds on all the subdomains\Omega i , we can recursively apply it to the errors on the right in (3.7), namely Substituting these equations back into the right hand side of (3.7) and evaluating (3.7) at leads to inequality (3.4). Evaluation at leads to inequality (3. This result is different from the result in the two subdomain case (Lemma 2.3), because we cannot get the error directly as a function of the error at the same location two steps before. The error at a given location depends on the errors at different locations also. This leads to the two independent linear systems of inequalities, where the inequality sign here means less than or equal for each component of the vectors - k+2 and j k+2 . These vectors and the matrices D and E are slightly different if the number of subdomains N is even or odd. We assume in the sequel that N is even. The case where N is odd can be treated in a similar way. For N even we have and the banded and pN Note that the infinity norm of D and E equals one. This can be seen for example for D by looking at the row sum of interior rows, The boundary rows however sum up to a value less than one, namely A similar result holds for the matrix E. Since the infinity norm of both D and E equals one, convergence is not obvious at first glance. In the special case with two subdomains treated in section 2 the matrices E and D degenerate to the scalar q 1 which is strictly less than one and convergence follows. In the case of N subdomains the information from the boundary needs to propagate inward to the interior subdomains, before the algorithm exhibits convergence. Hence we expect that the infinity norm of E and D raised to a certain power becomes strictly less than one. We need the following Lemmas to prove convergence. Lemma 3.2. Let r(A) 2 IR p denote the vector containing the row sums of the p \Theta p square matrix A. Then Proof. Let . Then we have A n+1 Lemma 3.3. Let A be a real p \Theta q matrix with a ij - 0 and B be a real q \Theta r matrix the sets I for the product C := AB we have I Proof. We have, since a ik ; b kj - 0 a Hence for fixed only if I Lemma 3.4. D k and E k have strictly positive entries for all integer k - N \Gamma1Proof. We show the proof for the matrix D, the proof for E is similar. The row index sets I i (D) are given by I even oe even oe even oe The column index sets are given by even oe We are interested in the growth of the index sets I i (D k ) as a function of k. Once every index set contains all the numbers 1 the matrix D k has strictly positive entries. We show that every multiplication with D enlarges the index sets I i (D k ) on both sides by two elements, as long as the elements 1 and are not yet reached. The proof is done by induction: For D 2 we have using Lemma 3.3 I even oe even oe even oe Now suppose that for k we obtained the sets I even oe even oe even oe Then for applying Lemma 3.3 again I i (D k+1 )= even oe even oe even oe Hence every row index set I i (D k ) grows on both sides by 2 when D k is multiplied by D, as long as the boundary numbers 1 and are not yet reached. Now the index set I 1 (D k has to grow most to reach the boundary number we need for the number of iterations 1for the matrix D k to have strictly positive entries. The infinity norm of a vector v in IR n and a matrix A in IR n\Thetan is defined by 1-j-n 1-i-n Lemma 3.5. For all k ? N there exists Proof. We prove the result for D; the proof for E is similar. We have from (3.11) and (3.12) that By Lemma 3.4 D k has strictly positive entries for any k - N 2 . Note also that jjD k jj 1 - 1 since jjDjj 1 - 1. Now by Lemma 3.2 we have since D k 1 and r N (D) ! 1. Remark: It suffices for each row index set to reach one of the boundaries, either 1 or N \Gamma 1, for the infinity norm to start decaying. Hence it is enough that there are no more index sets I i (D k ) (compare the proof of Lemma 3.4) such that 2 so that the requirement k - N \Gamma1 2 can be relaxed to k ? N \Gamma3 4 . We now fix some k ? N \Gamma3and set Lemma 3.6. The vectors - and j satisfy Proof. By induction on (3.8), using that the entries of D, E, - k and j k are non-negative, we get Taking norms on both sides and applying Lemma 3.5 the result follows. Theorem 3.7. The Schwarz iteration for the heat equation with N subdomains converges in the infinity norm in time and space. We have jje 2km+1 jje 2km+1 Proof. We use again the maximum principle. Since the error e k i is in the kernel of the heat operator, by the maximum principle e k attains its maximum on the initial line or on the boundary. On the initial line e k jje 2km+1 jje 2km+1 Using Lemma 3.6 the result follows. Note that the bound for the rate of convergence in Theorem 3.7 is not explicit. This is unavoidable for the level of generality employed. But, if we assume for simplicity that the overlaps are all of the same size then we can get more explicit rates of convergence. We set r The matrices D and E then simplify to ~ pr pr pr pr pr pr pr In this case we can bound the spectral norm of ~ D and ~ E by an explicit expression less than one. We use common notation for the spectral norm, namely Lemma 3.8. The spectral norms of ~ D and ~ are bounded by Proof. We prove the bound for ~ D. The bound for ~ can be obtained similarly. We can estimate the spectral norm of ~ D by letting ~ and F has only O(N) nonzero entries and these are equal to 1. In fact jjF jj Using that the eigenvalues of J are given by the spectral norm of ~ D can be estimated by since Lemma 3.9. Assume that all the N subdomains overlap at the same ratio r 2 (0; 0:5]. Then the vectors - and j satisfy Proof. The proof follows as in Lemma 3.6. Note that r = 0:5, which minimizes the upper bound in Lemma 3.9, corresponds to the maximum possible overlap in this setting, namely fi Figure 3.2. Theorem 3.10. The Schwarz iteration for the heat equation with N subdomains that overlap at the same ratio r 2 (0; 0:5] converges in the infinity norm in time and space. Specifically we have jje 2k jje 2k Proof. From the proof of Theorem 3.7 we have jje 2k+1 jje 2k+1 Since the infinity norm is bounded by the spectral norm we get jje 2k+1 jje 2k+1 Using Lemma 3.9 the result follows. The results derived above for the continuous heat equation remain valid as in the two subdomain case, when the heat equation is discretized. Details of this analysis can be found in [7]. 4. Numerical Experiments. We perform numerical experiments to measure the actual convergence rate of the algorithm for the example problem To solve the semi-discrete heat equation, we use the Backward Euler method in time. The first experiment is done splitting the 3] into the two 3] for three pairs of values 0:52)g. Figure 4.1 shows the convergence of the algorithm on the grid point b for 0:01. The solid line is the predicted convergence rate according to Theorem 2.8 and the dashed line is the measured one. The measured error displayed is the difference between the numerical solution on the whole domain and the solution obtained from the domain decomposition algorithm. As initial guess for the iteration we used the initial condition constant in time. We also checked the robustness of the method by refining the time step and obtained similar results. We solved the same problem (4.1) using eight subdomains which overlap by 35%. Figure 4.2 shows the decay of the infinity norm of - k . The dashed line shows the measured decay rate and the solid line the predicted one. Note that in the initial phase of the iteration the error stagnates, since information has to be propagated across domains. Acknowledgments We thank Gene Golub for showing us how to prove Lemma 3.8 and Olavi Nevanlinna, Morten Bj-rhus and Sigitas Keras for many interesting discussions. Iteration k at grid point Fig. 4.1. Theoretical and measured decay rate of the error for two subdomains and three different sizes of the overlap Iteration k Infinity norm of xi^k Fig. 4.2. Theoretical and measured decay rate of the error in the case of eight subdomains --R The Use of Runge-Kutta Formulae in A Note on the Convergence of Discretized Dynamic Iteration Parallel and Sequential Methods for Ordinary Differential Equations The One-Dimensional Heat Equation Domain Decomposition Algorithms Analysis of Parallel Algorithms for Time Dependent Partial Differential Equa- tions Waveform relaxation with overlapping splittings The Sur l'application des m'ethodes d'approximations successives 'a l"etude des int'egrales r'eeles des 'equations diff'erentielles ordinaires. On the Schwarz Alternating Method Convergence of Dynamic Iteration Methods for Initial Value Problems Remarks on Picard-Lindel-of Iterations Domain Decomposition and Iterations in Parabolic Problems Sur l'application des m'ethodes d'approximations successives 'a l"etude de certaines 'equations diff'erentielles ordinaires Matrix Iterative Analysis Partial Differential Equations of Applied Mathematics --TR --CTR D. Firsov , S. H. Lui, Domain decomposition methods in image denoising using Gaussian curvature, Journal of Computational and Applied Mathematics, v.193 n.2, p.460-473, 1 September 2006 S.-H. Lui, On monotone iteration and Schwarz methods for nonlinear parabolic PDEs, Journal of Computational and Applied Mathematics, v.161 n.2, p.449-468, 15 December
overlapping Schwarz;multisplitting;domain decomposition;waveform relaxation
303658
Asymptotic-Induced Domain Decomposition Methods for Kinetic and Drift Diffusion Semiconductor Equations.
This paper deals with domain decomposition methods for kinetic and drift diffusion semiconductor equations. In particular accurate coupling conditions at the interface between the kinetic and drift diffusion domain are given. The cases of slight and strong nonequilibrium situations at the interface are considered and numerical examples are shown.
Introduction Semiconductor device simulations are usually done on the basis of drift diffusion or hydrodynamic equations. However in view of the ongoing miniaturization of semiconductor devices a more accurate modelling of the physics seems to be necessary. This is achieved by kinetic semiconductor equations. We refer to the books of Markowich et al. [16] and Selberherr [18] for a detailed description of semiconductor equations and further references. However, it is in general not necessary to model the whole region in the device by the computationally expensive kinetic equation. Only in particular sensitive regions, where the solution is far away from an equilibrium state, as for example in boundary layers, kinetic equations have to be employed. In the remaining regions of the device the usual drift diffusion equation may be valid, and will lead to sufficiently accurate results. Domain decompositon methods are a natural tool to design in this case accurate numerical codes with reasonable computation times solving both types of equations in their respective domains. This can be achieved similiar to the field of gas dynamics, where domain decomposition methods have lead to the development of hybrid codes for kinetic and hydrodynamic equations. Examples can be found in [3, 15]. The general aim is to approximate the global kinetic solution by the solution of the domain decomposition problem, computed with the hybrid code, as accurately as possible, saving in this way a considerable amount of computing time. Once the locations of the kinetic and drift diffusion domains in the device are known, the main point of the problem is to obtain the correct coupling conditions at the interface between the two regions. In the present paper the physics of the semiconductor device is assumed to be described by a kinetic transport equation. We restrict here to kinetic semiconductor equations with a linear collision term and given electric field. However the following analysis should be extendable to nonlinear equations and selfcon- sistent treatments of the electric field. In section 2 we state the physical problem and the equations describing it. In section 3 we state coupling conditions for equilibrium situations at the inter- face. Using the equality of fluxes, a condition that is due to Maxwell in the gas dynamics case and to Marshak in the radiative transfer case, or simply the equality of moments at the interface and an O(ffl 2 ) approximation of the distribution function, where ffl is the mean free path, one obtains correct results. These conditions are proven to yield O(ffl) approximations for a model situation. In section 4 nonequilibrium situations at the interface are considered. Using asymptotic analysis similiar to the usual boundary layer considerations as, e.g., in Bardos et al. [1] and Bensoussan et al. [2] for neutron transport, Cercignani [4] and Sone and coworkers [19] in the gas dynamics case and Poupaud [17], Golse/Poupaud [8] and Yamnahakki [20] for semiconductor equations, we develop accurate coupling conditions in this case by an analysis of the interface layer between the two domains. This leads to kinetic linear half space problem. The essential point is then to find a fast approximate solution procedure of the space problem. This will be discussed in the appendix. It is an extension of the work done in Golse/Klar [7] and related to the so called variational meth- ods, see Loyalka [14] and Golse [6] for gas dynamics and Larsen, Pomraning [13] in the radiative transfer case. In section 5 we show some numerical results for a one dimensional model problem. As one can see in the simulations the developed coupling conditions lead to a very accurate approximation of the kinetic solution by the solution of the domain decomposition problem. 2 The Basic Equations We consider a domain D s in R 3 representing the semiconductor device geometry. D s is divided into two not overlapping subdomains D 1 and D 2 , with smooth boundaries @D s and the interface I The basic description of the physics in the device is given by the following linear semiconductor Boltzmann equations in D (v are the distribution functions of the electrons in D i , x 2 e.g. Markowich et al. [16] for a discussion of these equations. is the electric field multiplied by the absolute value of the elementary charge and divided by the effective mass. Z is the collision operator with and where ' is the temperature of the device. models the generation recombination process. Defining Z and Z we get The global kinetic solution is then defined by the solution of equations (1) in with the initial and boundary conditions and where n(x) is the outer normal at @D s at the point x and and The interface condition is simply continuity of the distribution functions for The mean free path is assumed to be small such that an approximation of the kinetic equation by the drift diffusion equation is valid there, see, e.g., Poupaud [17] for a mathematical treatment. This means, f 2 (x; v; t) is approximated by ae(x; t)M(v), where ae(x; t) fulfills with the diffusion coefficient Z where h i is the solution of Z and the mobility We set in the following to simplify the notation. The aim is now to approximate the global kinetic solution by the solution of the following coupling problem: In D 1 the kinetic equation (1) is solved with the above inital conditions in D 1 and the boundary condition at @D 1 " @D s . In D 2 the drift diffusion equation (2) is solved with initial conditions and boundary conditions Equiping these equations with coupling conditions at the interface I will lead to a properly stated problem. The solution depends however strongly on the type of coupling conditions employed. In the next sections we discuss several possibilities and investigate them. Coupling Conditions for Near Equilibrium States For equilibrium states at the interface coupling conditions can be straightforwardly obtained. One starts by defining a 'macroscopic distribution function' approximating the kinetic distribution function in D 2 to O(ffl 2 ). Using an approximation to O(ffl) leads without overlapping of the domains to obviously wrong results, see section 5, Figure 1. Assuming, as in [1, 2, 17], that f 2 in D 2 is of the form substituting it into the scaled equations (1) leads to Q(f (0) Q(f (1) Therefore due to (3) and due to the properties of the collision kernel, see, e.g., Poupaud [17] we obtain This means that the O(ffl) macroscopic distribution function would be given for f macro (x; v; (4) leads to f (1) Therefore we get for x 2 D 2 f macro (x; v; as the O(ffl 2 ) macroscopic distribution function in D 2 . Using the latter one, one obtains the following conditions: The equality of moments: Determine ae(-x; t); - I by Z Z f macro (-x; v; t)dv Z The ingoing function for the kinetic region is given by for is the outer normal at @D 1 at - x. The Maxwell-Marshak conditions: Determine ae(-x; t); - I by Z Z Z with n(-x). The ingoing function for the kinetic region is given as before. The solution of equation (1) in D 1 and (2) in D 2 with the initial, boundary and coupling conditions as above will be called the solution of the coupling problem. It can be found numerically by a standard Schwarz type iteration procedure: One determines the coupled solution by solving in turn the equations in the two domains. In each step the above interface conditions are used. This is repeated until a stationary state is obtained. See Klar [12] for an investigation of the coupled solution and of the iteration procedure in a general case. In the following we show for a model situation that these coupling conditions lead to a correct approximation in case of near equilibrium situations. We consider the stationary kinetic equationsffl i (v with ffl. The stationary drift diffusion equation is for with x 2 D 2 . We restrict to a slab x 2 D sub-domains are B]. The boundary conditions are f(A; ae field is of the form Equation (5) in D 1 is coupled to equation (6) in D 2 by one of the above coupling conditions. f 1 and ae denote the coupled solution in the respective domains. The reference solution is the global stationary kinetic solution, i.e. the solutions f of the kinetic equation (5) in D 1 and D 2 with We denote the global solution by f(x; v; t); x 2 D s . One can then prove: Theorem 1 The solution of the coupling problem for the stationary equations (5) and (6) with one of the above coupling conditions at the interface is an O(ffl) approximation of the global stationary kinetic solution in the whole domain, i.e. where C is some constant. We need a trivial lemma: Let ae(x) be the solution of the drift diffusion equation (6) in D the Dirichlet boundary data ae(0) at Then the value @ x ae(0) is given by with and Proof of the Theorem: We restrict to the Maxwell-Marshak conditions. They give together with the Lemma Z Z Z and for From (7) we obtain 'Z Substituting this into (8) a short calculation gives for the following reflecting boundary condition for the kinetic part of the coupled solution Z with Considering now the kinetic equation in D 1 with the fixed boundary conditions ae A at A and the above reflecting boundary condition at 0, we observe that the approximation of this kinetic problem for small ffl by a drift diffusion equation is similar to a problem in neutron transport, that has been treated in Bensoussan et al. [2], section 3.6. A straightforward extension of the results obtained there leads to an O(ffl) approximation of the kinetic solution f 1 in D 1 with the above reflecting boundary conditions at 0 by a drift diffusion equation with the following boundary condition at with Z Z dv Z Z dv Z Z Z Z Z Z dvH Z Z Z Z This gives as the boundary condition for a drift diffusion approximation of f 1 in D 1 . Considering now the global kinetic solution in [A; B] we know that it is approximated to O(ffl) by the global drift diffusion equation, see [17]. However, the solution of the global drift diffusion equation in D s is in D 1 equal to the solution of the drift diffusion equation in D 1 with the above boundary condition at 0. This can be seen by an easy calculation. Therefore finally we get an O(ffl) approximation of the global kinetic solution by the coupled solution in D 1 . The corresponding property in D 2 is then obvious. This result shows, that the equality of moments or fluxes is appropriate for near equilibrium situations at the interface. If this is not the case, they might give wrong results as shown in section 5. In the next section we develop accurate however easy to handle coupling conditions for this case. Coupling Conditions for Nonequilibrium States In contrast to section 3 non equilibrium situations might prevail here at the interface between the two domains. We use here not only an O(ffl 2 ) approximation in the bulk of the device, but also on the boundaries and interfaces to develop the correct conditions. This includes an analysis of the interface layer between the two domains. We concentrate in this section on the interface layer neglecting the boundary layers. Proceeding similarly as in the usual boundary layer treatment, see the references in the introduction, one assumes the macroscopic distribution function in D 2 to be the same as in the last section plus an additional interface layer term concentrated around the interface I with a thickness of the order of a mean free are interface layer coordinates given by the x be the point on the interface closest to x. The coordinate along the normal to the interface is y 0 , i.e. is the outer normal at @D 1 at - I. The interface itself is parametrized by ff i , i.e. depend on the point x. See, e.g., [4],[19] for details on boundary layer coordinates. Requiring that the kinetic equation in D 2 is fulfilled by f macro to O(ffl 2 ), i.e., we obtain the following equations by substituting f macro from (9) into (10) and comparing terms of the same order in ffl: Up to order ffl \Gamma 1 we get the following halfspace problem at - x with n(-x). To order 1 we obtain and another halfspace problem at the interface point - x with y 2 [0; 1): Remark that equation (12) is fulfilled since To order ffl we must have and a linear half space problem for - W must be fulfilled. Equation (14) is solvable, if the drift diffusion equation is fulfilled by ae(x; t). Assuming continuity of the distribution functions at the interface to O(ffl 2 ), i.e., for we obtain from (9) that the sum of the ingoing functions for the half space problems for v has to fulfill The splitting of this sum into -(0; ff arbitrary. We choose, and since the following becomes simpler for this choice. Moreover, the asymptotic values of the halfspace problems must fulfill since the interface layer term should vanish in the bulk. We introduce two more notations: be the solution of the half space problem (11) at - x with we define the asymptotic value which is independent of v and the Albedo operator Let ~ now be the solution of the half space problem (11) at the interface point - x with ingoing function ~ From (16) and (17) we have From This means, ae(-x; t); - I is determined by the condition Knowing this is an equation for ae(-x; t). Looking at equation (9) and keeping equation (15) in mind one finds the ingoing function for the Boltzmann region for - \Delta(r x ae(-x; The second equality is due to (16) and the definition of the Albedo operator. Knowing ae this is an equation for f 1 giving f in terms of f It is easily handeled in the framework of the Schwarz iteration procedure mentioned in the last section. It is now most important to have a fast however accurate enough solution procedure to find the asymptotic state and the outgoing distribution of the half space problem. We remark, that solving the whole half space problem, for ex- ample, by a standard discretization procedure would need a lot of computing time, in particular, since it has to be solved at each point of the interface. In the appendix this will be achieved by a generalization of a procedure, we developed in Golse/Klar [7], leading to easy to evaluate, however accurate coupling conditions. These conditions yield a considerable improvement compared to the ones obtained by equalizing moments or fluxes as in section 3. We mention that in Golse [5] and Klar [11] coupling conditions for the coupling of the Euler equations to the Boltzmann equation have been developed and investigated that are also based on the analysis of a kinetic half space problem. A different approach can be found in Illner/Neunzert [10]. Another remark concerns the situation, when the kinetic domain shrinks to 0 and only the drift diffusion equation is solved in the whole domain. In this case the outgoing function is no longer needed and the condition on ae becomes a standard slip boundary condition. An extensive treatment of such boundary conditons for the gas dynamic case is given in the work of [18]. Here we mention also the work of [20] on second order boundary conditions for the drift diffusion equation. Using these boundary conditions one obtains a good quality of approximation in the bulk of the device, but obviously no resolution of the solution in the kinetic regions. Finally, if higher order conditions are required, one may go to higher order in the asymptotic expansion. However, this is very tedious and in most cases it will not be necessary due to other limitations on the accuracy of the solution. 5 Numerical Results In this section we investigate the coupling condition proposed in section 4 numerically and compare them to the ones obtained by the equality of moments or fluxes. The equality of moments or fluxes is straightforwardly implemented. The coupling conditions based on the half space analysis are approximated by the following: +fflL a - a (1; ff where L a x (k(\Delta)) is defined in (27) for arbitrary k and - - a (1; v; t) is given by formula (33). The equation for the ingoing function for the Boltzmann region D 1 is explicitely \Delta(r x ae(-x; - a (0; ff where A a determined by (29) for arbitrary k and - - a (0; ff be approximated by 0. In the following figures we calculated two examples. The solutions of the kinetic and drift diffusion equations are determined by a scheme using a straightforward explicit upwind discretization. To find the coupled solution we used, as mentioned before, a Schwarz iteration procedure solving in turn the equations in the kinetic and drift diffusion domain. The kinetic equation is equation (1) in the slab D We have choosen a relaxation model for the collision kernel,i.e. 1. The electric field E(x; t) was choosen equal to The density of the electrons is shown for a fixed time T such that a stationary state is obtained. In Figure 1 we consider an equilibrium situation. We take 3. The boundary conditions are f 1 (0; v; The interface is choosen at We show the global kinetic solution, i.e. the reference solution, with mean . Moreover the solution of the coupling problem is shown, i.e., the solution of the kinetic equation with ffl 1 in D 1 and the solution of the drift diffusion equation in D 2 . They are coupled together with the Maxwell-Marshak condition using a first and second order approximation of the distribution function in D 2 as explained in section 2. The boundary conditions at for the drift diffusion equation are also found by the Maxwell Marshak approximation at the boundary using an asymptotic expansion up to the corresponding order. Obviously the first order approximation is completely wrong as was to be ex- pected. The other types of coupling conditions, i.e. the equality of moments and the halfspace conditions, do in this case not differ very much from the Maxwell Marshak conditions.11.41.82.2 x KINETIC / DRIFT DIFFUSION Kinetic Second Order First Order Figure 1: Equilibrium situation - Maxwell-Marshak conditions In Figure 2 the same kinetic equation is shown but the boundary condition at 3. The interface between kinetic and aerodynamic domain is here located at The mean free paths are ffl three types of coupling conditions at the interface are shown. The boundary conditions at for the drift diffusion equation are derived by the procedure corresponding to the one used for the coupling condition. In this situation a nonequilibrium situation prevails at the interface. The advantage of a more exact analysis at the interface is clearly seen.11.41.82.2 x KINETIC DRIFT DIFFUSION Kinetic Marshak Halfspace Moment Figure 2: Nonequilibrium situation - Comparison of different coupling condition In Figure 3 the same as in Figure 2 is shown however we plotted only the region around the interface.1.051.151.251.351.45 x KINETIC DRIFT DIFFUSION Kinetic Marshak Halfspace Moment Figure 3: Nonequilibrium situation - Interface region 6 Appendix Approximate Solutions of Linear Half Space Problems In this section we derive approximations for the asymptotic values and outgoing distributions of the halfspace problem (11) with arbitrary ingoing function and of problem (13) with ingoing function 0. Approximation of the solutions of (11): The equation under consideration is with Z In the following we will consider the above problem at a fixed boundary point - x with normal i.e. we consider We proceed now with the extension of a scheme derived for simple model equations in Golse/Klar [7]. Determination of the asymptotic value: We consider a slightly more general equation introducing a velocity shift : with e.g. Greenberg et al. [9] this equation has a unique solution, if u is bigger than 0. If u is smaller than 0 it is necessary to fix the to an arbitrary constant to obtain uniqueness of the solution. We assume u ? 0. The adjoint equation to equation (20) is Z The reason for considering this equation will become clear in the following. The condition on the flux is needed in this case to ensure uniqueness due to the above considerations. We derive now an approximate series for /: Shifting velocities using the definition of Q and the fact that \Phi(\Gammav; Z Z This equation will now be solved approximately by solving macroscopic equations derived by a Chapman-Enskog type procedure: An approximate equation for Z is obtained in the following way: Integrating (22) gives @ y Z Z A short calculation using the selfadjointness properties of the collision operator, see [17], gives Z Z Z Z Z Approximating now / by its mean value, i.e. / - ae 1 M gives Z with D R R Using (23) and (24) we get This can be solved explicitely with two free parameters yielding D u y +B: The first approximation / 1 of the solution / of equation (22) is then obtained by approximating /(w) in R \Phi(v; w)/(w)dw by ae 1 M(w) and solving the resulting equation explicitely. A and B are determined by Z the closest analogue to R The / approximation can be iterated: From (22) and (25) we obtain the equation for the remainder \Gamma[ Z Z one can derive in a similar way as above an approximate equation for ae 2 , namely Z Z ae 2 is again uniquely determined up to 2 Parameters. The approximation / 2 of given by the solution of Z The two parameters in the solution of (26) are determined by the condition Z Going on one obtains a series Z where Z and Z Assuming that this series converges, it can be easily seen by summing up the 's, that the series is equal to the solution / of the adjoint equation (22). Hence one only has to transform v and u backwards, v ! \Gammav; u ! \Gammau to get the desired approximation of (21), /(y; v). Let ' be a solution of (20) and / one of (21) , then Z Z Z Z Z Z Z 0: Using this we get Z Z and substituting gives Z Z (v1 +u)?0 Or with since '(1; v)M \Gamma1 (v) is independent of v Z (v1 +u)?0 where /(0; v) is approximated by the series derived above. In this way one obtains an approximation of the asymptotic value Taking only the first step of the above procedure, i.e., and the limit for u tending to 0 one obtains after some calculations the following approximation for the asymptotic value L - L a R R Z (v R R dv The first term in this formula is exactly the Maxwell-Marshak approximation. This shows that actually the Maxwell-Marshak condition is a first approximation of the asymptotic value of the solution of the halfspace problem. Approximation of the outgoing distribution: We consider equation (19) directly. Now the asymptotic value '(1; v) is known from the above procedure. We derive for (19) in the same way as above the macroscopic equation The solution is ae some constant since ae 1 must be finite at infinity. Then the first approximation ' 1 of the solution of (19) is obtained by solving This gives y To obtain ' 1 (1; we have to put B equal to '(1; v)M \Gamma1 . Hence, we get for This can be approximated by the method derived above. To obtain in this way the first nontrivial approximation of the outgoing distribution we have to iterate the procedure once more: Considering the equation for \Gamma[ Z Z one derives the second step gas dynamics equation: Z Z As before approximated by the solution ' 2 of Z with Hence, solving this equation we obtain for approximation for the outgoing distribution '(0; v) of (19). Approximating the asymptotic value '(1; ff i ; v) of (18) by L a x (k(\Delta)) yields in this way the following approximation for the Albedo operator of equation (18): A a Z x (k(\Delta))M (w)]dw: Approximation of the higher order halfspace problem (13): We consider finally the second relevant half space problem for - at the interface point - namely is the boundary layer function defined in section 4 that solves (11) with ingoing function rough approximation procedure for this equation will be given in the following: We start by approximating -(y; ff by the above procedure. Remarking that -(1; ff is equal to 0 formula (28) gives \Deltan Putting this into equation (30) we obtain an approximate equation for - With the same procedure as before we derive an approximate equation for R Z with D as before, - R and the mean value Z Z \Deltan y g(-x; v; t)dv: Solving (32) with ae(0; and the requirement of boundedness at infinity gives ae(y; ff in particular the following approximation for - - a (1; ff Z Z (w - a (0; ff is then the first approximation of - Obviously here a more sophisticated approximation could be performed at the expense of obtaining conditions that are more difficult to treat from a computational point of view. Acknowledgements I am grateful to F. Golse, H. Neunzert and R. Wegener for helpful discussions. --R Diffusion Approximation and Computation of the Critical Size Boundary Layers and Homogenization of Transport Processes Numerical Coupling of Non-conservative or Kinetic Models with the Conservative Compressible Navier-Stokes Equations The Boltzmann Equation and its Applications Applications of the Boltzmann Equation Within the Context of Upper Atmosphere Vehicle Aerodynamics Knudsen Layers from a Computational Viewpoint A Numerical Method for Computing Asymptotic States and Outgoing Distributions for Kinetic Linear Half Space Problems Linking Kinetic and Aerodynamic Descriptions Convergence of Alternating Initial and Boundary Conditions for Equilibrium Diffusion Theory Approximate Method in the Kinetic Theory in Phys Report for the Hermes Project DPH 6174/91 Diffusion Approximation of the Linear Semiconductor Equa- tion Analysis and Simulation of Semiconductor Devices Asymtotic theory of a Steady Flow of a Rarefied Gas Past Bodies for Small Knudsen Numbers Second order boundary conditions of Drift Diffusion Equations of Semiconductors --TR
kinetic semiconductor equations;asymptotic analysis;domain decomposition methods;drift-diffusion equation
303660
The Perfectly Matched Layer in Curvilinear Coordinates.
In 1994 Brenger showed how to construct a perfectly matched absorbing layer for the Maxwell system in rectilinear coordinates. This layer absorbs waves of any wavelength and any frequency without reflection and thus can be used to artificially terminate the domain of scattering calculations. In this paper we show how to derive and implement the Brenger layer in curvilinear coordinates (in two space dimensions). We prove that an infinite layer of this type can be used to solve time harmonic scattering problems. We also show that the truncated Brenger problem has a solution except at a discrete set of exceptional frequencies (which might be empty). Finally numerical results show that the curvilinear layer can produce accurate solutions in the time and frequency domain.
Introduction . Finite element, finite difference or finite volume discretizations of scattering problems are faced with the problem of truncating the infinite domain problem without introducing excessive error into the computed solution. Usually an artificial boundary is introduced on which a special absorbing boundary condition is used that reduces the reflection of waves incident on the artificial boundary. The key is to find boundary conditions that do not ruin the stability of the computation, are not too expensive and are acceptably accurate. It is difficult to satisfy these three competing criteria. Low order boundary conditions are usually stable, but in order to obtain sufficient accuracy the absorbing boundary must be far from the scatterer making the computation costly. Higher order conditions are more complex to implement and sometimes have stability problems (for a survey of absorbing boundary conditions see [16, 14]). Another approach to terminating the computational domain is to surround the scatterer by an absorbing layer. In the past such layers have had to be unacceptably large to control spurious reflections from the surface and interior of the layer (see for example [20]). However, in 1994, B'erenger [2] showed how to perturb the Maxwell system to provide a perfectly matched absorbing layer (abbreviated to PML for the rest of this paper) for electromagnetic scattering RR n3049 4 Francis Collino et Peter Monk problems. His approach constructs an absorbing half-space such that waves incident from the standard Maxwell medium are not reflected from the half space independent of their frequency and direction of propagation. In the PML, the wave is absorbed and decays exponentially with distance into the layer. Thus the PML layer itself can be truncated to form a narrow absorbing slab with a low reflection for any angle of incidence. The scatterer can then be surrounded by perfectly matched slabs to truncate the scattering domain. This approach is easy to implement and is very effective. It has already been the subject of numerous of papers [18, 1, 5, 12, 11, 13, 25, 26, 23, 21, 15, 7, 4, 24, 3]. However, to our knowledge, there has been very little theoretical analysis of the method. Of particular interest from the point of view of this paper is the paper of Chew and Wheedon [6] in which they show that the B'erenger PML can be constructed via a complex change of variables (see also [8]). We shall develop this viewpoint in the paper and show how to extend this idea to include a PML with a variable absorption coefficient (as is used in practice) and we shall show that method can be used in curvilinear coordinates (see also [8]). We shall show how the coordinate change is related to evaluating a continuation of the solution into the complex plane such that the solution becomes evanescent. This justifies the change of variables approach. In this paper we shall show how to view the PML as a complex change of variables in the time harmonic scattering problem. Using this observation we shall construct a PML layer in cylindrical coordinates (in fact in two space dimensions) for the time dependent and time harmonic problems. For some scatterers the use of circular absorbing boundaries can improve the efficiency of the scheme by decreasing the area that must be meshed. We shall demonstrate how the construction of the PML is related to special function expansions of the solution and also provide a partial theoretical analysis of the time harmonic problem. Our methods extend to three dimensions and to ellipsoidal coordinates. These aspects will be reported in future papers. INRIA The PML in Curvilinear Coordinates 5 Perfectly matched layers and change of variable As discussed in the introduction, in [2] B'erenger proposes a new absorbing layer model called the perfectly matched layer (PML), which has the astonishing property of generating no reflection at the interface between the free medium and the artificial absorbing medium. In this section we shall show how B'erenger's PML can be viewed as a complex change of variables applied to the Maxwell system. In particular for the 2D Maxwell's equations, the design of the PML in the region x ? 0 is as follows. The propagation of a transverse electric wave is governed by @H z @t @y @x @t @x @t @y (1) The construction of an absorbing layer in the right half space (i.e. in the region performed in two steps. First, we split the magnetic component into two parts according to and rewrite equations (1) as @H zy @t @y @H zx @t @x @t @x @t @y At this stage, equations (2) and (3) are equivalent to the initial problem. In the second step, a damping factor oe(x), introduced in each equation in those places where the normal derivative operator @ x appears and the other parts of the equations remain unchanged: @H zy @t @y @H zx @t @x @t @H z @x @t @H z @y RR n3049 6 Francis Collino et Peter Monk System (4) is B'erenger's PML model. If we look for the time harmonic solutions with frequency !, we get @y @x H z @x H z @y H zy We can rewrite this system of equations with the only unknown being " H z . We have H zy @y @x or H z @ @x H z @x In the region where oe is zero, we recover the well known property that the magnetic field of a non-stationary 2D transverse electric wave satisfies the Helmholtz equation. Inside the layer, we remark that the PML model consists in making the simple substitution @ @x \Gamma! @ @ @x Z xoe()d (7) in the initial equation, whereas the tangential derivatives are left unchanged. Equation (6) can be easily solved (even if oe is not constant), we get z R x(1+ ioe() )d dk y ; y z The solutions appears as a superposition of right-going evanescent plane waves. The waves propagate without any reflection even if the variations of oe are strong. In particular, at the interface reflection occurs as the wave INRIA The PML in Curvilinear Coordinates 7 penetrates the PML. After propagating a distance ffi in the y direction the k y component of the signal is damped by a factor y for the propagating waves (i.e. jk y y for the evanescent waves (i.e. jk y j ? !). In case of a finite PML (it is necessary to truncate the PML to obtain a problem that can be solved numerically), a Dirichlet boundary condition is added at the right extremity, say ffi. The solutions can now be sought as z x x )d e ikx R ffi(1+i oe() R ffi(1+i oe() )d z located above the support of the initial conditions. These solutions are obtained by combination of plane waves which vanish at are continuous at The expression of the coefficient of reflection R(k y ) is obtained by writing down the continuity of the tangential component of the electric field which gives R ffi(1+i ioe() d R ffi(1+i oe() d RR n3049 8 Francis Collino et Peter Monk or R ffi(1+i oe() We recover B'erenger's result for the expression of the coefficient of reflection induced by a PML of width ffi. A direct inspection of this formula would lead us to pick oe to be the largest possible which would allow us to obtain a reflection as weak as desired. However, this nice property is no longer true when a discretization scheme for solving numerically the equations is used. As the matter of fact, see [8], the discretization of the equations makes the layers slightly imperfectly matched. The numerical dispersion induces a reflection at the interface which is an increasing function of oe\Deltax. Thus, oe has to be chosen small enough to control this numerical reflection coefficient and large enough to obtain a low reflection coefficient (due to the Dirichlet condition on the wall at In square domains, B'erenger's PML for 2D transverse electric waves is constructed with the help of two damping functions oe x (x) and oe y (y) satisfying oe s oe s Equation (4) is replaced by @H zy @t @y @H zx @t @x @t @x @t @y Following the same developments as above, we obtain the stationary solution as the solution of @ @y H z @y @ @x H z @x 0: A direct inspection shows that the Green's function for this equation is given by iH (1)' ~ INRIA The PML in Curvilinear Coordinates 9 where Z xoe x (s)ds; ~ Z yoe y (s)ds This is one key to understanding the nice properties of the PML model. This model is simply obtained using a complex change in variables applied to the original equation. The axes x; y 2 R are moved into two paths in the upper complex plane. The existence of an analytical extension of the Green's function in this upper complex plane allows us to properly define " H z . The exponential decay of this extension ensures the damping effect of this transformation on the solution. We end up this section by giving a variational formulation for the harmonic B'erenger's PML model with Dirichlet boundary conditions. The problem is posed in D n\Omega where\Omega is a perfectly conducting scatterer entirely contained in (] \Gamma The problem is to find " H z such that d x d y @ @x dx Hz @x @ @y dy Hz @y H z @ \Gammag s 2 where g is a given function and oe x (x); d y oe y (y): If the variational formulation of the above problem is simply Z\Omega d x d y Z\Omega / d y d x H z @x @x Z\Omega / d x d y H z @y @y Z @\Omega gF ds RR n3049 Francis Collino et Peter Monk This formulation can be discretized by a finite element method in the usual way way. Concerning the existence and uniqueness of the solution, a result similar to those we will obtain for B'erenger's PML in curvilinear coordinates (see Theorems 1 and 2), can be obtained. In conclusion of this preliminary section, we have shown that the PML model can be interpreted by a change in variables and that the corresponding model can be put in a variational form suitable for a finite element method. With this in mind, we can now begin our study of a PML model in curvilinear coordinates. 3 The time-harmonic scattering problem In this paper we will develop a curvilinear PML for a simple electromagnetic scattering problem using the change of variable technique introduced in the previous section. Let\Omega be a smooth bounded domain in the plane, and assume that the boundary of\Omega is a perfectly conducting scatter. The problem we shall consider is to compute the transverse electromagnetic field scattered from the boundary of \Omega\Gamma We shall start with the frequency domain problem. Let " denote the magnetic field scattered by H satisfies the Helmholtz equation in the exterior of \Omega\Gamma where the wave number is the frequency of the incident field, ffl is the dielectric constant and the permeability of the surrounding medium. On the perfectly conducting boundary, Neumann boundary data is given: @ = g on where is the unit outward normal to\Omega and g is a given smooth function derived from the incoming or incident field. Finally the scattered field must satisfy the Sommerfeld radiation condition uniformly in all directions: @ae INRIA The PML in Curvilinear Coordinates 11 is the radial coordinate. For sufficiently smooth g problem has a unique solution H (R 2 n \Omega\Gamma (see for example [9]). Let us assume that\Omega is contained in the interior of the circle of radius a 0 . Then for the solution H can be written using separation of variables: a n is the Hankel function of first kind and order zero, and ae exp(i'). This series converges uniformly for r a 0 [9]. To obtain the B'erenger PML layer in cylindrical coordinates, we want to extend the solution given by (20) to the complex plane such that the wave becomes evanescent as the imaginary part tends to infinity. Suppose ~ ~ ae r and ~ ae i are real. The desired asymptotic behavior of the Hankel functions is Cm ik~ae exp (i!( ~ exp (\Gammak ~ aej !1: This implies that the correct half-plane is With this observation in mind, we define the complex radius ~ ae. We choose a ? a 0 and a real (artificial) absorption coefficient parametrized by ae satisfying a and oe(ae) ? 0 for ae ? a, then ~ a ds if ae a ae if a We also assume that lim a Note that d~ae dae if ae a RR n3049 12 Francis Collino et Peter Monk It will prove convenient to define oe by a ds if ae a Then ~ ae and ae are related by d as follows ~ Now we can define the B'erenger solution " n\Omega as follows: We need to derive a boundary value problem satisfied by " n\Omega satisfies the standard Helmholtz equation. Across the circle normal derivative are continuous. Thus it remains to derive an equation in jxj ? a 0 . In this region " H B is a sum of Hankel functions and hence satisfies the Helmholtz equation (17) but using ~ ae in place of ae ~ ae @ @~ae ~ ae @ @~ae ~ ae We can start by using the chain rule: @~ae @ae @ae @~ae =d @ae Hence using this result and (21) we can rewrite (23) in terms of ae. We obtain: dae /d @ @ae dae d @ @ae dae which we rewrite slightly as @ @ae dae d @ @ae d dae INRIA The PML in Curvilinear Coordinates 13 It is convenient (from the point of view of implementation in a standard finite element code) to transform this equation back to rectangular coordinates to obtain where A is the following matrix function: d d sin 2 (') cos(') sin(') d d d d sin d If ae a 0 we define A = I (the identity matrix), and The problem of computing the B'erenger solution " H B is thus the problem of finding " that r @ = g on uniformly bounded as jaej !1 (28) Here the boundedness assumption has replaced the standard Sommerfeld condition at infinity (because the solution is assumed to be decaying at infinity). We can now state and prove our first theorem: Theorem 1 There exists a unique solution of the B'erenger problem (26)-(28) given by (22). Remark. This theorem shows that the solution of the curvilinear B'erenger time-harmonic scattering problem is the desired physical solution of the standard scattering problem in the neighborhood of the scatterer. Proof: Existence is not a problem since we have constructed the boundary value problem (26)-(28) so that (22) (derived from the known solution of the standard scattering problem) is a solution. To prove uniqueness we can modify the standard proof as follows. We set then using the fact that (26) is just the Helmholtz equation in D a 0 we can use Green's theorem applied to D a 0 to show that if Z @r @r ds RR n3049 14 Francis Collino et Peter Monk But for r ? a hence is a sum of Hankel functions: (a Since we assume that oe is chosen so that =(k~ae) ! 1 as ae ! 1 the large argument asymptotics of the Hankel functions (note shows that H (2) unbounded as ae ! 1. Hence to satisfy the radiation condition (28) we must require b using the Hankel function expansion in (29) shows that where we have used the fact that ~ ae on a 0 ae a. Using the non-vanishing of the Wronskian of the two Hankel functions we conclude that a n. Hence " and a standard continuation argument shows that " n\Omega (see for example [9]). This completes the proof.The boundary value problem (26)-(28) is still not suitable for computation since it is posed on an infinite domain. However truncation of this problem is not as delicate as for the standard scattering problem since the solution decays exponentially outside the circle ae = a. For example we can impose the Dirichlet boundary condition on a suitably large radius circle containing the scatter (in three dimensions this would be equivalent to specifying that the tangential component of the magnetic field vanishes on the artificial boundary), Let On the outer boundary we impose the Dirichlet boundary condition Then the first boundary value problem we shall approximate numerically is to H B such that (26) is satisfied in D b with boundary data given by (27) on @\Omega and by (30) on the artificial boundary As we shall see, better numerical behavior can be obtained if we use an absorbing boundary condition on the outer boundary. So to further improve INRIA The PML in Curvilinear Coordinates 15 the efficiency of our numerical experiments we use a simple absorbing boundary condition on the artificial boundary. We impose the Sommerfeld radiation condition suitable for the evanescent Hankel function: @ae Then the field " the Robin problem (26), (27) and (31). The obvious questions are whether the problems outlined above have unique solutions and whether their solution is close to the solution of the infinite domain B'erenger problem (in particular we want to know if the solution is close to the true scattering solution close to \Omega\Gamma/ In particular, does the absorbing boundary condition improve the method. We can provide a partial answer to the first of these questions as the following theorem shows but we have been unable to prove the approximation property. Before stating the theorem we define the constant M ? 0 by We will prove our theorem by allowing complex valued ! in the following set ae C which contains the positive real axis with the exception of physically interesting values of ! lie): r =M Recall that Theorem 2 Suppose . Then: 1. The boundary value problem (26), (27) and (30) on D b has a unique solution " H B in H 1 (D b ) for every real k except possibly for a discrete set of values of k. 2. The same conclusion holds if " the Robin problem (26), (27) and (31). RR n3049 Francis Collino et Peter Monk Remark. We have been unable to rule out the possibility that a unique solution fails to exist for some real k. Proof: The proof of the two conclusions of the theorem are almost identical, so we will prove only the case of the Robin problem which is more interesting in practice. The proof rests on the analytic Fredholm theorem (see [10]). First we pose the B'erenger problem (26), (27) and (31) as a weak problem on the space (for the Dirichlet problem we would use the subspace Z Z @\Omega uv ds and ! Z uv ds then we seek " Now we define two operators for all u; v 2 H 1 (D b ). Both operators are well defined by the Riez representation theorem. Note that because d, d and k depend on !, the operators A and B depend on !. Since the coefficients defining A are analytic at each ! 2 U , the operator A is analytic in !. Next we show that A \Gamma1 exists and is continuous by using the Lax-Milgram lemma. The continuity of A is obvious so it remains to show that A is strongly coercive. But and so strong coercivity is proved if there is a positive constant ffi (possibly depending on !) such that INRIA The PML in Curvilinear Coordinates 17 For any u 2 H 1 (D b ) Z Z a 0 !jxj!b But from the definition of the B'erenger layer: Z a 0 !jxj!b a 0 d d @ae d A d' dr: It thus suffices to show that min where ffi is independent of ae but can depend on !. We shall prove the above inequality for !(d=d), the other inequality being similar. Note that if d d Hence !(d=d) is a monotonic function of ! r and so d d min min min r =M then d d r r Hence !(d=d) Having proved the strong coercivity of A, we can now conclude that A is invertible for any ! 2 U . The operator B is compact, because if the following boundary value problem: @w @ @\Omega @w @r = \Gammaikdu on RR n3049 Francis Collino et Peter Monk Since d and d are functions in L1 (D b ), standard elliptic regularity theory implies that jjwjj H 1(\Omega\Gamma but since H 2(\Omega\Gamma is compactly embedded in H 1 (\Omega\Gamma we conclude that B is compact. Furthermore B is an operator valued analytic function of k for all k. Now let G 2 H 1 (\Omega\Gamma be defined by then the B'erenger problem is equivalent to finding " 1(\Omega\Gamma such that A \Gamma1 is bounded, A \Gamma1 B is compact (and an operator valued analytic function of k) and so the analytic Fredholm alternative theorem is applicable. It remains to decide between the alternatives of this theorem. To do this shall prove that a solution of the B'erenger problem exists when Once this is proved, the theorem is proved since the analytic Fredholm theorem implies that exists except possibly for a discrete set of exceptional wavenumbers. the functions d and d are real and positive since Hence the matrix A is real and uniformly positive definite (when dd ? 0. The weak problem is to find " But in this case the bilinear form associated with this problem is coercive since if Hence the Lax-Milgram lemma shows that a unique solution exists for (34).2 INRIA The PML in Curvilinear Coordinates 19 4 The Time Dependent Problem. B'erenger first proposed his PML for the time dependent Maxwell system. Here we describe how to generalize B'erenger's PML to allow for an annular absorbing layer in the time domain. The scattering problem is again to predict transverse mode scattering from an infinite perfectly conducting cylinder occupying the region\Omega described in the previous section (although, as we have seen, the details of the scatterer are unimportant from the point of view of developing the PML equations). We assume that at the fields vanish for x an incident wave interacts with the scatterer to produce a scattered electromagnetic field where the electric field and the magnetic field H M satisfy the two dimensional Maxwell system @y in R 2 n\Omega @x in R 2 n\Omega @t in R 2 n\Omega with zero initial data and boundary data appropriate for a perfectly conducting obstacle: where fl is a given function (which is determined by the incident electromagnetic field). As we have seen in the previous section, the curvilinear B'erenger PML can be derived by writing the frequency domain equations in curvilinear co-ordinates and changing variables. We start by writing the Maxwell system in cylindrical coordinates. For a ae the electric field magnetic field H M satisfy ae @t =ae @t @ae RR n3049 Francis Collino et Peter Monk @t @ @ae ae To derive the B'erenger medium, we move to the frequency domain. If we assume that E M ae exp(\Gammai!t) and similarly for the remaining variables we obtain the time harmonic Maxwell system: ae =ae @ae @ae ae @'A For the time dependent problem, we proceed analogously to the previous section. The B'erenger system is just the standard Maxwell system, written using ~ ae in place of ae (the fields now carry the superscript B to indicate that we are considering a B'erenger medium): ~ ae @~ae ae@ @ @~ae ae Note that if we use (35) and (36) to eliminate " ae and " ' from (37) we obtain (25). As in the case of the time harmonic problem, we want to derive the equivalent of this system using real coordinates. Using (24) implies that (36) can be written: @ae We can easily rewrite (35) using the fact that ~ dae to obtain: ae =ae INRIA The PML in Curvilinear Coordinates 21 It remains to rewrite (37). We define the auxiliary B'erenger variable " H (ae) by d @ @ae Expanding the derivative, we can rewrite (37) as ae @ @~ae ae We can then change variables back to ae and add and subtract (1=dae)(@=@ae) " to both sides to obtain d d @ae dae@ @ @ae ae Hence H (ae) \Gammaae@ @ @ae ae @'A and this becomes @ae ae Collecting the equations (38), (39), (40) and (41) we obtain the following time harmonic B'erenger system: ae =ae @ae ae@ @ @ae ae @'A @ @ae RR n3049 22 Francis Collino et Peter Monk Finally, we can move back to the time domain to obtain: ae @t ae @t @ae @t @ @ae ae @H (ae) @t @ae 5 Numerical Results 5.1 A Special Case of the Time Harmonic Problem In the special case of a concentric circular scatterer we can solve the standard scattering problem and B'erenger problem using special functions. We will use this case to examine the improvement gained by using the Robin problem over the Dirichlet problem. Let us suppose that the scatter\Omega is a circle of radius a 0 . First let us consider the standard scattering problem of computing " H such that (17), (18) and (19) are satisfied in the case when the scatterer\Omega is a disk of radius a 0 and the boundary data is @ae on This problem has the solution a where a INRIA The PML in Curvilinear Coordinates 23 If we truncate the domain using a circle of radius b, use a B'erenger layer in use the Dirichlet condition on ae = b we must solve r @ae @ae Let use denote by ~ aej ae=b , then the above problem has the solution a B exp(in') where a B When the problem is not uniquely solvable. Of course the solution H B is independent of the details of the B'erenger layer and depends only on ~ ae b . This is not the case when numerical methods are used to discretize the B'erenger layer since there will be spurious reflections from within the layer and the layer must be designed to minimize these (as well as reach the desired value of ~ ae b ). We can evaluate the error in the B'erenger solution on the circle ae = a 0 by computing the relative error: In practice we truncate the series using \Gamma10 n 10. Arbitrarily we choose We plot the error as a function of ~ ae in Figure 1. When ~ ae is real (i.e. when there are eigenvalues for the annular domain and RR n3049 Francis Collino et Peter Monk these show up clearly as peaks in the error surface. As the imaginary part of ~ ae increases the error decreases and can be made arbitrarily small if the imaginary part is large enough. In Figure 2 we show the error as a function of the real part of ~ ae for fixed imaginary part. By deciding on a desired error level, one can find an appropriate value of ~ ae b . In the subsequent sections we actually use the Robin boundary condition on the outer boundary. In this case (for the circular scatterer of radius a 0 ) we solve the following problem: r @ae @ exp(ikx) @ae @ae This problem has the solution a B exp(in') where a B When the problem is not uniquely solvable. We could not prove existence or uniqueness for this B'erenger problem in general but our calculations suggest that for the annulus existence and uniqueness only fail at the problem becomes a pure Neumann problem). This accounts for the error spike towards ~ shown in Figure 3. Compared to Figure 1 we can see that there are no other eigenvalues for the range of ~ ae considered here. The error curves shown in Figure 4 (compared to Figure 2) show that the error obtained using the Robin boundary condition is much smaller than the error obtained using Dirichlet boundary conditions. This justifies our use of the Robin condition in the numerical results presented later in this section. INRIA The PML in Curvilinear Coordinates 2513500.40.800.20.4 Real part Imaginary part Figure 1: Here we plot the relative L 2 error defined by (46) between the exact solution of the time harmonic scattering problem for a circle and the B'erenger solution using a Dirichlet outer boundary. We show the error as a function of ~ ae b . When ~ ae b is real there are eigenvalues for the annular domain and these show up as peaks in the error surface. As the imaginary part of ~ ae b increases, the error decreases. Away from the real axis we see no evidence of lack of existence or uniqueness for the B'erenger problem. RR n3049 26 Francis Collino et Peter Monk Real part Imaginary Real part Figure 2: Here we plot the relative L 2 error defined by (46) between the exact solution of the time harmonic scattering problem for a circle and the B'erenger solution using a Dirichlet outer boundary. We show the error as a function of In the top panel =(~ae b and in the bottom panel =(~ae b the error is reduced to approximately 3%. INRIA The PML in Curvilinear Coordinates 2713500.40.800.20.4 Real part Imaginary part Figure 3: Here we plot the relative L 2 error defined by (46) between the exact solution of the time harmonic scattering problem for a circle and the B'erenger solution using a Robin outer boundary. We show the error as a function of ~ ae b . For ~ small the error is large but for a sufficiently large real or imaginary part the error can be made arbitrarily small. Apart from when evidence of lack of existence or uniqueness for the B'erenger problem. RR n3049 28 Francis Collino et Peter Monk Real part Imaginary Imaginary Figure 4: Here we plot the relative L 2 error defined by (46) between the exact solution of the time harmonic scattering problem for a circle and the B'erenger solution using a Robin outer boundary. We show the error as a function of In the top panel =(~ae b and in the bottom panel =(~ae b Compared to Figure 2 we see that the use of a Robin condition on the outer boundary improves the error in the B'erenger solution. For example we can reduce the error to approximately 3% by using =(~ae b when we use the Dirichlet boundary condition. INRIA The PML in Curvilinear Coordinates 29 5.2 Time harmonic problems The purpose of this section is to show that the Cartesian and cylindrical B'eren- ger PML layers can be used to compute near field solutions of the Helmholtz equation (and hence by a suitable transformation the far field). We shall only show the results of one numerical experiment since we will provide a more detailed numerical test of the curvilinear method for the time domain problem (where the B'erenger method is most popular and where the behavior of the Cartesian layer is well known). For this test, we compute the field scattered from a perfectly conducting metal obstacle in transverse polarization. This corresponds to Neumann data imposed on the metal wall. The incoming wave is " exp(ikx). The scatterer is contained in the box \Gamma2 the speed of light to be unity so wave number is 6:2832. The grid used is shown in Figure 5 where the outer radius of the circle is the maximum diameter of elements in the mesh is 0:279. Note that the grid is not aligned with Cartesian or radial coordinate system, which is convenient from the point of view of using a standard mesh generator. Cubic isoparametric elements are used to discretize the problem. For the Cartesian case we use a simple Newumann boundary condition on the outer boundary (it would be more usual in this case to use a rectangular outer boundary but we want to make comparisons with a single grid). For the curvilinear PML we use the modified Sommerfeld radiation condition being used on the outer boundary (ie., we are solving the Robin problem (26), (27) and (31)). We choose oe(s; In all cases we choose oe In the Cartesian case we use oe(x; 2:5) and d y This implies that the layer is half a distance unit from the scatterer. For the curvilinear case we use Figure 6 shows contours of the real part of " computed by a capacitance matrix technique that matches the finite element solution to an integral equation solution outside the grid (thus handling the infinite domain accurately) RR n3049 Francis Collino et Peter Monk inlet.nopo 1373 POINTS COIN COIN 5.500 6.548 Figure 5: The mesh used in the numerical experiments reported on the time harmonic wave equation. INRIA The PML in Curvilinear Coordinates 31 Matched FE/Nystrom Real Part Figure The real part of the scattered field computed using a matched finite element - integral equation code. RR n3049 Francis Collino et Peter Monk Berenger, Cartesian PML Real Part -0.577853 Figure 7: The real part of the scattered field computed using the Cartesian B'erenger absorbing layer. INRIA The PML in Curvilinear Coordinates 33 Berenger, curvilinear PML Real Part -0.577828 Figure 8: The real part of the scattered field computed using the curvilinear B'erenger absorbing layer. RR n3049 34 Francis Collino et Peter Monk [19]. Figure 7 shows the real part of the B'erenger solution " using the Cartesian layer, and 8 shows the real part of the B'erenger solution " using the curvilinear layer. Clearly the near field (for example in the scatterer) computed using both B'erenger layers is similar to the capacitance matrix solution in Figure 6. But, as expected, the B'erenger solution dies away rapidly in the absorbing layer. Furthermore, in both cases, the contours of the solution show no abrupt curvature changes when the B'erenger layer is entered which indicate that the layer is "perfectly" matched. Figure 9 shows the real part of the scattered field along the x axis computed using the matched finite element and integral equation approach. Figure shows the corresponding result for the Cartesian and curvilinear B'erenger media. The solutions are similar for jxj ! 2:5 (this is for coordinate values from 2.5 to 7.5 on the one dimensional plots) but the B'erenger result dies away quickly once the B'erenger medium is reached. These results give numerical support to the claim that the rectilinear and curvilinear B'erenger method can be used to compute time harmonic solutions. 5.3 Time Dependent System In this section we shall investigate in some detail the curvilinear B'erenger method for the time dependent problem. Figure 12 shows a schematic of the grid used for the numerical tests of the curvilinear PML. Inside the circle of a we use isoparametric quadrilateral N'ed'elec elements without lumping [22]. Outside for a use isoparametric quadrilateral N'ed'elec elements with an extra unknown associated with the centroid of the elements. The curved segments of the mesh (for example in the B'erenger layer) are approximated by piecewise linear approximations. This means that there is some geometric error in approximating the B'erenger layers. The arrangement of degrees of freedom for the elements is shown in Figure 13. The magnetic degrees of freedom (for H or H (ae) ) are associated with the centroid of the elements and we use mapped piecewise constant basis functions for the fields. The electric degrees of freedom for E ae and E ' are associated with edges of the mesh. INRIA The PML in Curvilinear Coordinates 35 Matched FE/Nystrom Magnitude -0.005759950.5684321.142620.0 2.5 5.0 7.5 10.0 Figure 9: The real part of the scattered field computed using the matched finite element - integral equation approach. Here we plot the solution along the line on the x axis corresponds to the left outer boundary of the domain). The break in the solution is due to the perfectly conducting scatterer. RR n3049 36 Francis Collino et Peter Monk Berenger, Cartesian PML Magnitude -0.577853 Figure 10: The real part of the scattered field computed using the Cartesian B'erenger absorbing medium. Here we plot the solution along the line The break in the solution is due to the perfectly conducting scatterer. INRIA The PML in Curvilinear Coordinates 37 Berenger, Curvilinear PML Magnitude -0.577828 -0.004380230.5690681.142520.0 2.5 5.0 7.5 10.0 Figure 11: The real part of the scattered field computed using the curvilinear B'erenger absorbing medium. Here we plot the solution along the line The break in the solution is due to the perfectly conducting scatterer. RR n3049 38 Francis Collino et Peter Monk Circle r=a Circle r=a' Annular Standard Maxwell Zone Zone Beringer Circle r=b Figure 12: A schematic of the grid used. Inside the circle ae = a up to the scatterer we use standard linear N'ed'elec elements on isoparametric quadrilaterals. Outside four sided isoparametric B'erenger elements are used. INRIA The PML in Curvilinear Coordinates 39 (a) (b) Figure 13: A schematic showing the arrangement of degrees of freedom for the elements. The electric field unknowns are associated with edges in the mesh. The magnetic field unknowns are associated with centroids of the elements. (a) Standard N'ed'elec element, (b) B'erenger element. On the outer edge of the domain (when we use the first order absorbing boundary condition: ffl. Note that this boundary condition is note the same as the Sommerfeld absorbing boundary condition used in the frequency domain calculations, but it is easier to implement for finite element methods. Now let us detail the discrete problem. Let D b denote the bounded domain including the B'erenger layer. Let h be a mesh of linear isoparametric quadrilaterals of maximum edge length h approximating the domain D b as described above. Then the finite element space U h satisfies U h ae and is constructed using the standard space of isoparametric linear edge ele- ments. Let U \Gammag where \Gamma is the surface of the scatterer (in the results shown later the boundary is the circle of radius 0.1). h be the corresponding set of mapped piecewise constant functions containing r \Theta U h . Let \Deltat ? 0 represent the time step (which must be sufficiently small compared to h for stability). Then we RR n3049 Francis Collino et Peter Monk h and H 1=2 h approximate the fields at respectively (the field H 1=2 h is computed from E 0 h and H 0 by a Runge-Kutta step applied to the Maxwell system) and H (ae);1=2 (we denote by (:; :) the L inner product for vector or scalar functions and use standard x and y components of the electric field): \Deltat ffloe n \Theta r \Theta H n+1=2 where (if Next H (ae);n+1=2 computed via@ @ H (ae);n+3=2 @ @ae ';h denotes the ' component of E n+1 h . This computation is only carried out in the B'erenger layer (the derivative of E n+1 ';h is well defined by virtue of having an annular grid in the B'erenger layer). Finally H n+3=2 INRIA The PML in Curvilinear Coordinates 41 Note that we have not used a centered difference for the B'erenger term here. Numerical experiments show that this choice gives a better solution than the standard symmetric average of B'erenger variables, but is likely to be method dependent. 5.4 Scattering from a circle. We consider an infinite domain problem of scattering of a plane wave off a circular perfect conductor. We assume that the incident plane wave is given by where g is given by This wave is incident on a perfectly conducting circular cylinder of radius 0.1m centered at the origin. We choose Using special function theory, an exact solution is available for this problem [17]. For the numerical problem we take an annular domain with inner radius 0.1m and an outer radius of 0.3m. On which describes how the incident field scatters off of a perfect conductor. The grid used has mesh points distributed uniformly in the (r; ') plane, i.e. the mesh points are (r and RR n3049 42 Francis Collino et Peter Monk Figure 14: The base mesh used in the numerical experiments reported later on the time dependent Maxwell system. Additional layers of cells are added to form the B'erenger layer. INRIA The PML in Curvilinear Coordinates 43 A typical grid is shown in Figure 14 with N This is the base mesh used for the calculations shown next. The B'erenger boundary layer is implemented by adding extra layers of cells outside the base mesh. We use a total of N layer layers. The radial size the these cells is the 0:2=N r (ie. the same as for the cells in the base mesh). The time step used is \Deltat = 0:01 and the mesh size (measured as the longest edge in a quadrilateral) ranges from approximately near the scatterer to on the outer layer of the base mesh. The solution is computed for 7. In Figure 15 we show a plot of H(x; against t at the point (x; (\Gamma0:206; \Gamma0:0104). This is a grid point for the magnetic field. We can compute a solution that is not degraded by mesh termination by computing on a grid in which 150 extra layers have been added to the base mesh and in which the B'erenger variables are set to zero. In this case the relative L 2 error is 0:18%. Using the simple first order ABC (with 9 extra layers) gives a relative error of 15:5%. We have tried three layers shown in Table 1. In each case oe is computed by where oe 0 is the value in the first B'erenger layer, i is the index of the layer, fl is the growth factor, and h l is the radial mesh size in the layer. From Table 2 we can see that our time domain results produce solutions that have less than a tenth of the error of the first order absorbing boundary condition results. Unfortunately, with the time step of \Deltat = 0:01 the error in the B'erenger solution is about four times the error in the underlying finite element method. With a smaller time step this can be reduced to approximately twice the underlying error suggesting that the phase error in the finite element method is polluting the results. 6 Conclusion. In this paper we have presented a method for implementing the B'erenger PML in curvilinear coordinates. Our theory and numerical experiments suggest that such a layer can be used in the frequency domain with a standard finite element method. In the time domain the layer can also be used and gives more accurate RR n3049 44 Francis Collino et Peter Monk Time t Magnetic Field Exact Solution First Order Absorbing BC Berenger Layer #1 Berenger Layer #2 Berenger Layer #3 Figure 15: A graph of H(x; against t at (x; show the result of using a three different B'erenger layers with 9 shells in each layer. The results are compared to an exact solution and the solution computed using a first order absorbing boundary condition. INRIA The PML in Curvilinear Coordinates 45 Index of shell layer 1 9 0.2097152 0.4194304 0.8589935 Table 1: This table gives the value of h l oe for each ring in the three different B'erenger layers used in the paper. Thickness layer 1 layer 2 layer 3 6 1.03 0.92 (0.54) 1.03 9 0.74 (0.42) 0.92 (0.54) 0.80 (0.48) Table 2: This table shows the relative L 2 error (as a percentage) in the solution at layers with various thicknesses. The structure of each layer is given in Table 1, and the thickness is the number of rings (N layer )added to the base mesh. The finite difference error is 0.18% (computed on a very large grid such that reflections from the outer boundary do not pollute the solution). Numbers in parenthesis are for \Deltat = 0:001. RR n3049 Francis Collino et Peter Monk results than the first order absorbing condition. These results indicate that it is worthwhile to test curvilinear B'erenger layers in three dimensional time harmonic computations which we are currently doing. Much remains to be done. The theoretical analysis of the B'erenger system is incomplete. The presence (or absence hopefully) of exceptional frequencies needs to be investigated further, and an error estimate for the layer needs to be derived. Finally other discretization schemes (for example the curvilinear method in [24]) could be investigated to find the one best suited to the B'erenger layer. INRIA The PML in Curvilinear Coordinates 47 --R A comparison of the Berenger perfectly matched layer and the Lindman higher-order ABC's for the FDTD method A Perfectly Matched Layer for the Absorption of Electromagnetics Waves Perfectly matched layer for the FDTD solution of wave-structure interaction problems Proof of perfectly matched layer conditions in three dimensions Modified Berenger PML absorbing boundary condition for FD-TD meshes A 3D perfectly matched medium from modified Maxwell's equations with stretched coordinates Perfectly matched layer for the paraxial equation. Integral Equation Methods in Scattering Theory Behavior of Berenger's ABC for evanescent waves Implementation of Berenger absorbing boundary conditions in TLM by interfacing FDTD perfectly matched layers Generalized perfectly matched layer-An extension of Berenger's perfectly matched layer boundary condition Non reflecting boundary conditions Modification of Berenger's perfectly matched layer for the absorption of electromagnetics waves in layered media Initial boundary value problems for hyperbolic systems The theory of electromagnetism Validation and extension to three dimensions of the Berenger PML absorbing boundary condition for FD-TD meshes An analysis of the coupling of finite element and Nystrom methods in acoustic scattering Approximation of radiation boundary condi- tions A comparison of three mixed methods for the time dependent Maxwell equations Perfectly matched absorbing boundary conditions based on anisotropic lossy mapping of space Numerical implementation and performance of perfectly matched layer boundary condition for waveguide structures --TR --CTR Lin Zschiedrich , Roland Klose , Achim Schdle , Frank Schmidt, A new finite element realization of the perfectly matched layer method for Helmholtz scattering problems on polygonal domains in two dimensions, Journal of Computational and Applied Mathematics, v.188 n.1, p.12-32, 1 April 2006 Marcus J. Grote , Christoph Kirsch, Nonreflecting boundary condition for time-dependent multiple scattering, Journal of Computational Physics, v.221 n.1, p.41-62, January, 2007 Bjrn Sjgreen , N. Anders Petersson, Perfectly matched layers for Maxwell's equations in second order formulation, Journal of Computational Physics, v.209 n.1, p.19-46, 10 October 2005 Bradley Alpert , Leslie Greengard , Thomas Hagstrom, Nonreflecting boundary conditions for the time-dependent wave equation, Journal of Computational Physics, v.180 n.1, p.270-296, July 20, 2002 A. Bendali , Y. Boubendir , M. Fares, A FETI-like domain decomposition method for coupling finite elements and boundary elements in large-size problems of acoustic scattering, Computers and Structures, v.85 n.9, p.526-535, May, 2007 Frdric Nataf, A new approach to perfectly matched layers for the linearized Euler system, Journal of Computational Physics, v.214 n.2, p.757-772, 20 May 2006 Fang Q. Hu, A perfectly matched layer absorbing boundary condition for linearized Euler equations with a non-uniform mean flow, Journal of Computational Physics, v.208 n.2, p.469-492, 20 September 2005 A. Bermdez , L. Hervella-Nieto , A. Prieto , R. Rodrguez, An optimal perfectly matched layer with unbounded absorbing function for time-harmonic acoustic scattering problems, Journal of Computational Physics, v.223 n.2, p.469-488, May, 2007 Adrianus T. de Hoop , Robert F. Remis , Peter M. van den Berg, The 3D wave equation and its Cartesian coordinate stretched perfectly matched embedding - A time-domain Green's function performance analysis, Journal of Computational Physics, v.221 n.1, p.88-105, January, 2007 Dan Givoli , Beny Neta, High-order non-reflecting boundary scheme for time-dependent waves, Journal of Computational Physics, v.186 n.1, p.24-46, 20 March
perfectly matched layer;finite element;absorbing layer
305008
Integrated Range Comparison for Data-Parallel Compilation Systems.
AbstractA major difficulty in restructuring compilation, and in parallel programming in general, is how to compare parallel performance over a range of system and problem sizes. Execution time varies with system and problem size and an initially fast implementation may become slow when system and problem size scale up. This paper introduces the concept of range comparison. Unlike conventional execution time comparison in which performance is compared for a particular system and problem size, range comparison compares the performance of programs over a range of ensemble and problem sizes via scalability and performance crossing point analysis. A novel algorithm is developed to predict the crossing point automatically. The correctness of the algorithm is proven and a methodology is developed to integrate range comparison into restructuring compilations for data-parallel programming. A preliminary prototype of the methodology is implemented and tested under Vienna Fortran Compilation System. Experimental results demonstrate that range comparison is feasible and effective. It is an important asset for program evaluation, restructuring compilation, and parallel programming.
Introduction The most significant question with parallel machines is the same today as it has been for many decades: How can software applications take advantage of hardware parallelism [1]. Traditionally, distributed memory architectures have been programmed using message passing where the user is responsible for explicitly inserting communication statements into a sequential program. The development of parallel languages such as Vienna Fortran [2], Fortran D [3] and High Performance Fortran (HPF) [4] improved the situation by providing high-level features for the specification of data distributions. Among others the Vienna Fortran Compilation System (VFCS) [5] and Fortran D compilation system [3], have been developed to support such languages and to automatically generate a message passing program. However, current technology of code restructuring systems inherently lacks the power to fully exploit the performance offered by distributed memory archi- tectures. The primary motivation of parallel processing is high performance. Effectiveness and efficiency of restructuring compilation are the current barriers for the success of a simple, high-level programming model approach. Restructuring a program can be seen as an iterative process in which a parallel program is transformed at each iteration. The performance of the current parallel program is analyzed and predicted at each iteration. Then, based on the performance result, the next restructuring transformation is selected for improving the performance of the current parallel program. This iterative process terminates when certain predefined performance criteria are met or as a result of explicit user intervention. Integrating performance analysis with a restructuring system is critical to support automatic performance tuning in the iterative restructuring process. The development of a fully compiler integrated performance system for scalable parallel machines is especially challeng- ing. In a scalable environment, the performance of a program vary with data distribution, system size (number of processors), and problem size. A superior program implementation is only superior over a range of system and problem size. Predicting the performance of parallel programs and integrating performance indices automatically into a restructuring compiler are two major challenges facing researchers in the field [6]. Moreover, current performance analysis and visualization tools are targeted at message-passing programming models where parallelism and interprocessor communication are explicit. They fall short in supporting high-level languages and are not readily integrated into restructuring compilers. Two major functionalities of data-parallel restructuring compilers are the distribution of data arrays over processors and the choice of appropriate restructuring transformations. A key question of realizing these two functionalities is how to predict the scaled performances of a small number of data distributions and transformations automatically, so that appropriate optimization decisions can be made. In order to compare relative performance over a range of problem and system sizes, scalability prediction is proposed as a solution in this study. Scalability is the ability to maintain parallel processing gain when system and problem size increase. It characterizes the scaling property of a code on a given machine. A slow code with a good scalability may become superior when system and problem size scale up. The system sizes for which the performance ranking of different code changes are called crossing points. In this paper we introduce the concept of range comparison, which is concerned with the determination of crossing points. Based on analytical results given in Section 3.2, automatic crossing point prediction and automatic range comparison are studied in this research. An iterative algorithm is first derived to predict the scalability and crossing point on a given parallel platform. Then, the connection between the iterative algorithm and an existing static performance estimator, P 3 T [7], is discussed. A preliminary prototype of automatic range comparison is implemented under the Vienna Fortran Compilation System (VFCS). Finally, two applications are tested with two different data distributions to verify the correctness and feasibility of the range comparison approach. While current experimental results are preliminary, they clearly demonstrate the feasibility and effectiveness of the range comparison approach for program restructuring. This paper is organized as follows. VFCS and its performance estimation tool are introduced in Section 2. The concept of scalability, performance crossing point and range comparison are presented in Section 3. An iterative algorithm for automatic performance prediction is described in detail. Experimental results are given in Section 4 to illustrate how the newly proposed algorithm can be integrated within VFCS in order to predict the crossing point automatically. Finally, Section 5 concludes with a summary Compilation System VFCS is a parallelizing compiler for Vienna Fortran and High Performance Fortran. VFCS is integrated with several tools for program analysis and transformation, and among others provides a parallelization technique which is based upon domain decomposition in conjunction with the Single-Program-Multiple-Data (SPMD) programming model. This model implies that each processor is executing the same program based on a different data domain. The work distribution of a parallel program is determined - based on the underlying data distribution - according to the owner-computes rule which means that the processor that owns a datum will perform the computations that make an assignment to this datum. Non-local data referenced by a processor imply communication which is optimized by several strategies [5] such as extracting single element messages from a loop and combine them into vectors (communication vectorization), removing redundant communication (communication fusion), and aggregating different communication statements (communication aggregation). The analysis described in this paper is targeted towards regular computations, such as stencil computations, and relies heavily on compile-time analysis and optimization as provided by VFCS. 2.1 performance estimator is an integrated tool of VFCS which assists users in performance tuning of regular programs at compile time. P 3 T is based on a single profile run to obtain characteristic data for branching probabilities, statement and loop execution counts. It is well known [9, 10, 11, 12] that the overhead to access non-local data from remote processors on distributed memory architectures is commonly orders of magnitude higher than the cost of accessing local data. Communication overhead is, therefore, one of the most important metrics in choosing an appropriate data distribution. communication overhead by two separate performance parameters: number of data transfers and amount of data transferred. For the sake of brevity, only issues of static estimation of communication overhead are discussed in this section. Interested readers may refer to [7, 8, 13] for more information regarding the other performance parameters of P 3 T . Note that in Section 4 we define communication time that combines the P 3 T parameters mentioned above and various machine specific metrics. Number of Data Transfers The number of data transfers is a critical parameter which reflects the high message startup costs on most distributed memory architectures. Commonly the overhead for communication is decreasing if it can be hoisted outside of a nested loop. Moreover, communication inside of a specific loop body in many cases implies that the loop is sequentialized due to synchronization between the processors involved in the communication. P 3 T carefully models the loop nesting level at which a communication is placed, array access patterns, data dependences and distribution, control flow, and compiler communication optimizations (e.g., communication vectorization and fusion) in order to determine the number of data transfers with high accuracy. For communication that can be hoisted outside a loop nest we assume the loosely synchronous communication model [14] which implies that all involved processors communicate simultaneously. For such a communication statement the number of data transfers is determined by the maximum number of data transfers across all involved processors. For communication that cannot be hoisted outside a loop nest due to a data dependence we assume that it sequentializes the loop at which the communication is placed as well as all data transfers implied by the communication. The number of data transfers for such a communication is given by the sum of data transfers across all processors involved in the communication. Amount of Data Transferred The current generation of distributed memory architectures reduces the impact of the message length on the communication overhead. For applications that transmit small data volumes, the startup cost is the predominate communication cost factor. However, for increasing data volumes transmitted, the message transfer time per byte and in turn the amount of data transferred becomes the first order performance effect. In order to provide a highly accurate estimate for the amount of data transferred (given in bytes) as induced by a parallel program, P 3 T estimates the number of non-local data elements accessed and incorporates machine specific data type sizes. For this purpose, P 3 T examines the loop nesting level at which a communication is placed, array access patterns, data dependences and distributions, control flow, and compiler communication optimizations. As the compiler specifies the communication pattern at the source code level, the target architecture can be for the most part - except for data type sizes - ignored. Consequently, this parameter ports easily to a large class of distributed memory architectures. Performance Range Comparison While execution time is an important performance metric for optimizing parallel programs, its comparison bonds to a specific pair of system and problem size. Execution time alone is not sufficient for performance comparison over a range of system and problem sizes. Scalability has been recognized as an important property of parallel algorithms and machines in recent years [15]. Several scalability metrics have been proposed [16, 17, 18]. However, scalability has been traditionally studied separately as an independent property. Only very recently has the relation of scalability and execution time been studied and the concept of range comparison been introduced [19, 20]. Unlike conventional execution time comparison in which performance is compared at a particular system and problem size, range comparison compares the performance of programs over a range of system and problem size via scalability and performance crossing point analysis. To fully understand the concept of range comparison, some background of scalability and crossing point analysis needs to be introduced. 3.1 Isospeed Scalability A major driving force behind parallel computing is to solve large problems fast. Traditionally, execution time is the measure of choice for fixed-size problems. Execution time by itself, however, is not adequate for scalable computing where problem size scales up with system size. Speed, defined as work divided by time, has been proposed as an alternative primary metric for scalable computing 1 . Average speed is the achieved speed divided by the number of processors used. Average speed is a quantity that ideally would be unchanged with scaled system size. The following definition was first given in [16]. (Isospeed Scalability of Algorithm-Machine Combination) An Algorithm-Machine Combination is scalable if the achieved average speed of the algorithm on the given machine can remain constant with the increasing number of processors, provided the problem size can be increased with the system size. For a large class of Algorithm-Machine Combinations (AMCs), the average speed can be maintained by increasing the problem size. The necessary problem size increase varies with algorithm- machine combinations. This variation provides a quantitative measurement for scalability. Let W be the amount of work of an algorithm when p processors are employed in a machine, and let W 0 be the amount of work of the algorithm when processors are employed to maintain the average speed, then the scalability from system size p to system size p 0 of the algorithm-machine combination is: Where the work W 0 is determined by the isospeed constraint. Finally, let T p (W ) be the time for computing W work on a p processors system, equation (2) shows how scaled execution time can be computed from scalability, Three approaches have been proposed to determine scalabilities [16]. They are: computing the relation between problem size and speed, directly measuring the scalability, and predicting scalability with certain predetermined parameters. While all of the three approaches are practically important, scalability prediction seems to be less expensive and benefits most from compiler support. The parallel execution time T p (W ) can be divided into two parts: the ideal parallel processing time and parallel processing overhead, T 1 How to define work, in general, is debatable. For scientific applications, it is commonly agreed that the floating point (flop) operation count is a good estimate of work. where T s is the sequential execution time, \Delta is the computing capacity, defined as time per unit of work, of a single processor. The parallel processing overhead T contains the load imbalance overhead, communication overhead, and other possible parallelism degradations. By the definition of scalability (see (1)), scalability can be predicted if and only if the scaled work size, W 0 , can be predicted. A prediction formula has been given in [21] to compute where a is the achieved average speed and T 0 is the parallel processing overhead on p 0 proces- sors. When parallel degradation does exist (i.e. T 0 is traceable. T 0 necessary and sufficient condition of equation 4. When T 0 is achieved with processing overhead T 0 general is a function of problem size. With unknowns on both sides of the equation, using formula (4) for scalability prediction is not a straightforward task. 3.2 Performance Crossing Point and Range Comparison Theorem 1 gives a relation between scalability and execution time of two different algorithm- machine combinations. It has been analytically proven and experimentally confirmed in [19]. Theorem 1 If algorithm-machine combinations 1 and 2 have execution time ff \Delta T and T , respec- tively, at the same initial state (the same initial system and problem size), then combination 1 has a higher scalability than combination 2 at a scaled system size if and only if the execution time of combination 1 is smaller than the ff multiple of the execution time of combination 2 for solving W 0 at the scaled system size, where W 0 is the scaled problem size of combination 1. Theorem 1 shows that if an AMC is faster at the initial state and has a better scalability than that of others then it will remain faster over the scalable range. Range comparison becomes more difficult when the initially faster AMC has a smaller scalability. When the system size scales up, an originally faster code with lower scalability can become slower than another code with a better scalability. Finding the fast/slow crossing point is critical for optimizing performance and choosing efficient data distributions and program transformations in a data-parallel environment. Finding the superiority/inferiority crossing point, however, is very difficult. The definition of crossing point is problem size and system size dependent. Definition 2 gives a formal definition of crossing point based on the isospeed scalability [20]. (scaled crossing point) For any ff ? 1, if algorithm-machine combinations 1 and 2 have execution time ff - T and T respectively at the same initial state, then we say a scaled system size 0 is a crossing point of combinations 1 and 2 if the ratio of the isospeed scalability of combination 1 and combination 2 is greater than ff at p 0 . Let AMC 1 have execution time t, scalability \Phi(p; p 0 ), and scaled problem size W 0 . Let AMC 2 have execution time T , scalability \Psi(p; p 0 ), and scaled problem size W . By Definition 2, p 0 is the crossing point of AMC 1 and 2 if and only if In fact, by equation (2), when \Phi(p; Notice that since combination 2 has a smaller execution time at the initial state, t p (W superiority/inferiority changing in execution time gives the meaning of performance crossing point. The correctness of Theorems 2 and 3 is proved in [20]. Theorem 2 If algorithm-machine combination 1 has a larger execution time than algorithm- machine combination 2 at the same initial state, then, for any scaled system size p 0 , p 0 is a scaled crossing point if and only if combination 1 has a smaller scaled execution time than that of combination 2. Since two different algorithm-machine combinations may have different scalabilities, their performances may cross at crossing point p 0 with different scaled problem sizes, W 0 6= W . Scaled crossing point is different from the equal-size crossing point where performance crosses with the same problem size. Theorem 3 gives a relation between the scaled crossing point and equal-size crossing point. Theorem 3 If algorithm-machine combination 1 has a larger execution time than algorithm- machine combination 2 at the same initial state and p 0 is not a scaled crossing point, then combination 1 has a larger execution time than that of combination 2 for solving W 0 at the system size is the scaled problem size of combination 1. Theorem 3 gives the necessary condition for equal-size performance crossing with an initial system size of p: if p 0 is an equal-size crossing point of p it must be a scaled crossing point of p. On the other hand, if p 0 is not a scaled crossing point of p, it is not an equal-size crossing point of p. No performance crossing will occur before the scaled crossing point even in terms of equal-size performance. Theorem 3 provides the mean of range comparison. Based on the above theoretical findings Figure 1 gives the procedure of range comparison in terms of scalability. 3.3 Automatic Crossing-Point Prediction The procedure of range comparison listed in Figure 1 is in terms of scalability. Scalabilities of different code implementations, or different algorithm-machine combinations in general, still need to be determined for range comparison. Scalabilities of different algorithmic implementations can be pre-stored for performance comparison. In many situations, however, premeasured results of scaled systems are not available and predictions are necessary. We propose an iterative method listed in Figure 2 to compute W 0 and to predict the scalability automatically. We assume that the underlying application is scalable and its work W is a monotonically increasing function of a scaling parameter (input data size). We also assume that parallel overhead T o is either independent of parameter n (ideally scalable) or is monotonically increasing with n (parallel degradation exists). The iterative algorithm consists of three parts: the main program and two subroutines for computing the function of OE(W ) and the inverse of OE(W ). Function OE(W ) is implied by equation (4). Mathematically, the iterative algorithm is to find a fixed point of OE(W ) such that proof of correctness of the algorithm is provided in the Appendix. Our correctness proof does not give the convergence rate of the iteration algorithm. Like most iterative methods, the convergence rate of the algorithm is application dependent. It depends on the properties of function f(n). For most scientific computations, f(n) is a low degree polynomial function and the algorithm converges very fast. Our experimental results show that the algorithm only requires three to five iterations to converge to a solution with an error bound of Assumption of the Algorithm: Assume algorithm-machine combinations 1 and 2 have execution time ffT and T respectively at the same initial state, where ff ? 1. Objective of the Algorithm: Predict if combination 2 is superior over the range of system sizes from p to p 0 , where Range Comparison Begin Determine the Scalability of combination 1 Determine the Scalability of combination 2 If Combination 2 is superior over the range ! Else 0 is a scaled crossing point EndfIfg EndfRange Comparison g Figure 1. Range Comparison Via Performance Crossing point 4 Automatic Performance Comparison Under VFCS We have implemented a prototype version of the iterative algorithm within VFCS for predicting the scalability and execution time of a parallelized code. The functionalities of P 3 T and VFCS have been fully implemented as described in Section 2. Figure 3 shows the structure of the scalability prediction within VFCS. The input program is parallelized, instrumented by VFCS, and a message passing code is generated. This code is then compiled and executed on the target parallel machine. A performance analysis tool analyzes the tracefile obtained and computes (initial) performance indices which are then used by scalability prediction. Finally, scalability prediction implements the iterative algorithm as described in Section 3. At each iteration of the algorithm the problem size is specified, the source code is automatically parallelized, performance indices ( number of transfers Z and the amount of data transferred D) are estimated by P 3 T , and scalability prediction is performed. This process iterates until the algorithm converges. Experimental results show that our approach provides an effective solution for capturing the scaling properties of a parallel code and supports optimizing data-parallel programs. Two cases are presented in detail in this section to illustrate how the iterative algorithm is used within the VFCS environment and how the prediction is carried out automatically. The experiments have been carried out on an iPSC/860 hypercube with processors. The parallel processing overhead T used in the scalability iteration algorithm, as described in Section 3, contains communication overhead and load imbalance. We choose two codes, Jacobi and Redblack, both of which contain several 2 dimensional arrays and imply good load balance. T contains only the communication time that can be obtained by the formula Assumption of the Algorithm: Assume work W and overhead T are increasing functions of the scaling parameter n, is a constant, and assume the parallel code under study has been executed on the target machine with W work and p processors. Objective of the Algorithm: Compute the scalability from system size p to p 0 , where with an error of ffl ? 0. Iterative Method Begin Initial Value: W Compute Begin Iteration (k=0; k++) until Else do Begin Iteration (k=0; k++) until EndfIfg EndfIterative Methodg Begin Solve Compute Compute EndfSubroutine OE(W )g Begin Compute Solve Figure 2. An Iterative Method for Predicting Scalability TTracefile Compute T'o Compute ComputeW' k NO YES Compute VFCS Parallelize Z, D, MP code Instrum. Execution W,T ,T ,Z,D,T K=1 Compute performance indices Scalability Prediction Source code Figure 3. Scalability prediction within VFCS where Z and D are predicted at compile time for any problem size W using P 3 T . The machine specific parameters, ae and fi, are the startup time and the transfer time per message byte, respectively. represents the additional overhead for each network hop and h is the number of hops. Jacobi and Redblack, have been parallelized by VFCS and their performance measured on 4 processors of an iPSC/860 hypercube. The performance indices obtained and needed for computing the initial state of the scalability prediction are given by the work W , the total execution time on p processors T p , the computation time T c and the communication overhead T . The execution models of Jacobi and Redblack based on equation (3) are as follows: and We assume that the computations of Jacobi and Redblack are uniformly distributed across all processors. The computing rate W and the average speed a can be determined by the measured computation time and total execution time. The initial value of the prediction algorithm, p , is computed based on the work W and Starting with iteration new input data size n obtained for k - 0. The communication overhead T 0 and the scaled are predicted using (6) and (4), respectively. Scalability from processors p to processors determined when the terminating condition is satisfied for a fixed ffl ? 0 used in our experiments). Otherwise the method iterates with the new parameter Tables show the measured and predicted scalability of Jacobi algorithm with two different data distribution strategies: two-dimensional block distribution and column-wise distribution of all program arrays to a two-dimensional and one-dimensional processors array, respectively. The difference in percentage between the predicted and measured values is given in the third column of the tables. Meas. Pred. Meas. diff. Pred. Meas. diff p=8 1.000 1.000 0% 0.842 0.819 2.7% Table 1. Jacobi: two-dimensional distribution, predicted and measured scalability Meas. Pred. Meas. diff. Pred. Meas. diff p=8 1.000 1.000 0% 0.796 0.808 1.5% Table 2. Jacobi: column distribution, predicted and measured scalability The experimental results confirm that our predicted scalabilities are very accurate and the variations of scaled performance for various data distributions are also captured. Table 3 shows the predicted and measured scalability values of the Redblack algorithm with two-dimensional distribution. Tables 4, 5 and 6 present the predicted execution times versus the Meas. Pred. Meas. diff. Pred. Meas. diff Table 3. Redblack: two-dimensional distribution, predicted and measured scalability measured ones for Jacobi with two-dimensional block distribution, one dimensional distribution and Redblack with two-dimensional block distribution, respectively. The initial problem size used in Tables 1 to 6 is determined by the asymptotic speed [22] for best performance, where chosen. We have measured the average execution time required for a single iteration (covering parallelization, P 3 T and scalability prediction) of Fig. 3. For Redblack the parallelization time accounts for 0:7 secs, P 3 T for 0:3 secs and scalability prediction for 0:1 secs. Overall, every iteration took approximately 1:1 secs which remains constant for changing problem Meas. diff. Table 4. Jacobi 2D: Predicted and Measured Execution times (in -s) Meas. diff. Table 5. Jacobi C: Predicted and Measured Execution times (in -s) size. The execution time of Redblack can be written as ffT 4 2:975. According to Tables 1, 2, and 3, the scalability of Jacobi is higher than that of Redblack. Therefore, by Theorem 1, the smaller initial execution time and larger scalability shows that Jacobi scales better than Redblack which is confirmed by measured results as given in Tables 4, 5, 6. A more interesting result is given by the two different Jacobi versions. From Tables 1 and 2, we can see that the 2D distribution implementation has a larger initial execution time and a better scalability, on than that of column-wise distribution. According to Theorem 2, there will be a crossing point at some scaled system size p 0 . However, in this case the crossing point is greater than 16 and cannot be confirmed by our prototype implementation. Figure 4 shows that there is no crossing point for range of 4 to 16 processors. As pointed out in [21], scaled performance is more sensitive for small applications, where increasing system size will cause more noticeable change of communication/computation ratio. For Jacobi, the communication/computation ratio increases with the decrease of problem size. At the initial state where 20, the execution time for Jacobi with column-wise distribution strategy is given by T 4 -s and for Jacobi with 2D distribution it is ffT 4 Redblack 2D Meas. diff. Table 6. Redblack 2D: Predicted and Measured Execution times (in -s) Execution Time 2D distribution Column distribution Figure 4. No equal-size crossing point for Jacobi with starting point 1:267. Considering the scalability results of Tables 7 and 8, we see that for the 2D distribution scales better than that of column-wise distribution. The ratio between the two predicted scalabilities, 0:652 0:373 1:747, is greater than ff. Therefore, by Definition 2, crossing point where the execution time of 2D distribution becomes less than that of column-wise distribution. This crossing point is due to the communication behavior involved on iPSC/860 for confirmed by the measured execution times as shown in Figure 5.a. p=4 1.000 0.652 0.548 Table 7. Predicted scalability for Jacobi with 2D distribution p=4 1.000 0.373 0.333 p=8 1.000 0.893 Table 8. Predicted scalability for Jacobi column-wise distribution In order to verify whether the crossing point for is an equal-size crossing point, we measured both codes with In accordance with Theorem 3, corresponds to an equal-size crossing point. The results are shown in Figure 5.b. Execution Time 2D distribution Column distribution Processors600.01000.01400.0 Execution time 2D distribution Column distribution (a) (b) Figure 5. Scaled crossing point (a) and equal-size crossing point (b) for the Jacobi with n=20 5 Conclusion There are many ways to parallelize a program, and the relative performance gain of different parallelizations strategies varies with problem size and system size. Comparing the performance of different implementations of an algorithm over a range of system and problem sizes is crucial in developing effective parallelizing compilers and ultimately in reducing the burden of parallel programming. In this study a practical methodology is developed for automatic range comparison and it is tested in a data-parallel compilation system. The proposed methodology is built on rigorous analytical models which are both correct and efficient. Experimental results confirm its effectiveness as part of a parallelizing compiler. This paper offers several contribution. First we identify the importance and feasibility of range comparison in data-parallel compilation systems; next an iterative algorithm is developed to experimentally predict the scalability of algorithm-machine combinations and to enable automatic range comparison. an existing static estimator, is modified to integrate automatic range comparison into a data-parallel compilation systems. Finally, the range comparison approach is tested as part of Vienna Fortran Compilation System. Our experimental results demonstrate the feasibility and high potential of range comparison in a parallelizing compiler. The concept and analytical results given in Section 3.1 and 3.2 are very general. They are applicable to any algorithm-machine combinations. The scalability prediction algorithm given in Section 3.3 assumes that the workload is a deterministic function of a scaling factor n. While this assumption is quite reasonable, the algorithm requires an estimation of the parallel processing overhead. The algorithm has been tested with P 3 T static performance estimator under Vienna Fortran Compilation System. Due to the availability of VFCS and P 3 T , the experimental results presented in this paper are limited on the 16 node iPSC/860 available at University of Vienna. The integrated range comparison methodology introduced in this research, however, is general. It can be adopted for large parallel systems as well as for other advance compilation systems [23]. Appendix Proof of Correctness This appendix gives a formal proof of the correctness of the iterative algorithm listed in Figure 2. Proof: If T o is independent of n, then . The scalability is 1. By the If instruction in the main program we are done. Otherwise by assumption both the computation work W and the parallel processing overhead T are monotonically increasing functions of the scaling parameter n and , and therefore, OE According to equation (4), a problem size W 0 is the scaled problem size for maintaining the isospeed if and only if a Since both f and g are increasing functions of n, so are f \Gamma1 and g \Gamma1 . Also, since a; 4; and p are constants during the scalability prediction process, relation (7) implies that W increases if and only if T increases. Therefore, we can conclude that OE and OE \Gamma1 are also increasing functions of W . By the definition of scalability (1), if the initial value W satisfies equation (7) then the ideal scalability, scalability equals one, is reached. Since the parallel processing overhead T does not decrease with n, we should have the inequality W 0 - W 0 . If W are done with the If instruction in the main program. Otherwise, the iterative method needs to be used to find W 0 such that W Case 1 in the main program), use the iterative method is an increasing function, inductively we have W Also, since W 0 is less than W 0 and OE(W ) is an increasing Inductively we have Therefore we have shown that That is inequalities are preserved for all non-negative integers k if and only if it holds just for the initial value W 0 . Passing limits to both sides of (8) yields that which implies that iteration (8) converges to the true solution W 0 . Case the Else instruction in the main program), As shown in Figure 2, this time the iteration formula is used. Following a similar argument as given in Case 1, we can conclude iteration converge to the solution. The stabaility of the iterative algorithm is analyzed as below. All the b below denote the purturbed values. b a \Delta b p Since both g and f are functions of polynomial, the purturbed function b OE will be very close to OE as long as are small enough, and Now for the iteration W its purturbation is Then , the magnitude of the derivative of OE will be small if the derivative of f is away from 0, i.e. k df(x) Therefore, we can conclude that the iteration W are small enough. And for the definition of f , k df(x) easily satisfied. By similar arguments, the iteration W are small enough. The requirement k dg(x) c is not always satisfied. But when it is not satisfied, by the definition of the function g, the parallel overhead T will not increase much from the original overhead T will be close to W And in this case the inverse iteration W used by the algorithm. Acknowledgment The authors are grateful to Mr. Yu Zhuang for his help in strengthening the proof of correctness of the iterative algorithm and to the anonymous referees for their constructive comments on the revision of the paper. --R "The next 10; 000 2 years," "Programming in Vienna Fortran," "Fortran D language specification." "High performance Fortran language specification version 1.0." Vienna Fortran Compilation System - Version 2.0 - User's Guide "An integrated compilation performance analysis environment for data parallel programs," Automatic Performance Prediction of Parallel Programs "Estimating and optimizing performance for parallel programs," "Buffer-safe communication optimization based on data flow analysis and performance prediction," "A unified framework for optimizing communication in data-parallel programs," "A communication placement framework with unified dependence and data-flow analysis," "TAU," "A static parameter based performance prediction tool for parallel programs," Solving Problems on Concurrent Processors "Development of parallel methods for a 1024- processor hypercube," "Scalability of parallel algorithm-machine combinations," Introduction to Parallel Computing "Performance metrics: Keeping the focus on runtime," "The relation of scalability and execution time," "Performance range comparison via crossing point analysis," "Performance prediction: A case study using a scalable shared-virtual- memory machine," "Performance considerations of shared virtual memory machines," "Communication overhead: Prediction and its influence on scalability," --TR --CTR Xian-He Sun, Scalability versus execution time in scalable systems, Journal of Parallel and Distributed Computing, v.62 n.2, p.173-192, February 2002 Thomas Fahringer , Bernhard Scholz , Xian-He Sun, Execution-driven performance analysis for distributed and parallel systems, Proceedings of the 2nd international workshop on Software and performance, p.204-215, September 2000, Ottawa, Ontario, Canada
scalable computing;performance evaluation;parallel compiler;software systems
305009
Redundant Synchronization Elimination for DOACROSS Loops.
AbstractCross-iterations data dependences in DOACROSS loops require explicit data synchronizations to enforce them. However, the composite effect of some data synchronizations may cover the other dependences and make the enforcement of those covered dependences redundant. In this paper, we propose an efficient and general algorithm to identify redundant synchronizations in multiply nested DOACROSS loops which may have multiple statements and loop-exit control branches. Eliminating redundant sychronizations in DOACROSS loops allows more efficient execution of such loops. We also address the issues of enforcing data synchronizations in iterations near the boundary of the iteration space. Because some dependences may not exist in those boundary iterations, it adds complexity in determining the redundant synchronizations for those boundary iterations. The necessary and sufficient condition under which the synchronization is uniformly redundant is also studied. These results allow a parallelizing compiler to generate efficient data synchronization instructions for DOACROSS loops.
Introduction Concurrent execution of loops with cross-iteration data dependences, termed DOACROSS loops, allows us to exploit more loop-level parallelism beyond the vector loops and the DOALL loops in application programs. As the machine size is becoming larger, exploitingmore parallelism in a programbecomes more important. However, efficient data synchronization is required to support such an execution model. Some commercially available multiprocessors such as the Alliant FX series already provide architectural and hardware support for executing DOACROSS loops efficiently. There can be many cross-iteration data dependences in a DOACROSS loops. Each of such data dependences needs to be enforced by explicit synchronization in order to satisfy the original memory access order in the program. However, many of such synchronizations are redundant because of the transitive nature of the data dependences between statements. Eliminating such redundant data synchronization has several advantages. First, having fewer data synchronizations allows us to use the system resources, such as the synchronization registers in the Alliant machines, more effectively. Second, data synchronization usually requires long communication delays between processors. Fewer synchronizations will cause fewer processor stalls. Third, fewer data synchronizations mean fewer synchronization instructions need to be generated, which can make the code size smaller. In this paper, we propose an efficient algorithm to identify redundant synchronizations in multiply-nested DOACROSS loops which very often have multiple statements in their loop body. We also address the nonuniformity in the redundancy on the boundary iterations in the multidimensional iteration space, which is caused by the possible backward dependence directions in some inner loop levels. The nonuniformity in redundancy can make the enforcement of such data dependences very complicated. A necessary and sufficient condition to identify redundant synchronization that does not have a nonuniformity problem is also presented in the paper. Our presentation is organized as follows. In Sections 2 and 3, we describe our algorithms, starting with the single loop and following with multiple loop cases. Discussions and a summary of previous research in this area are given in Section 4. Section 5 concludes our presentation. tree edge forward edge (d) SEODFS search tree (b) Control Path Graph (CPG) (c) Iteration Space Dependence Graph (ISDG) DO I=1,100 END DO (a) Single loop Figure 1: Simple loop example. redundant synchronization elimination 2.1 Loops with straight control flow We first look at a simple case of a singly-nested loop with no branches in its loop body (Figure 1a). To identify redundant synchronizations among statements of different iterations, we build a Control Path Graph (CPG). The CPG of the loop is a two-dimensional graph where each column represents an iteration, and the nodes in a column are the statements of the iteration. Because we assume each iteration of the DOACROSS loop is executed sequentially in one processor, there is a control flow edge from one statement to its immediate successor in the same iteration (represented by the broken edges in Figure 1b). The solid edges represent loop-carried (cross-iteration) data dependences. The number of rows is determined by the number of statements in one iteration while the number of columns is is the longest distance of all data dependences. The loop in Figure 1a has loop-carry data dependences of distances 1 and 2. Figure 1b shows the corresponding CPG in the shaded area. There are three columns because 2. [8] shows that to identify redundant data dependences in a single loop, we only need to examine In [4], Krothapalli uses a Sequential Execution Order Depth First Search (SEODFS) algorithm on an Iteration Space Dependence Graph (ISDG), where the entire loop body of an iteration is represented by a single node in the ISDG. An edge exists between two nodes if there is any loop-carried dependence between the two iterations. The ISDG of the simple loop can be obtained by collapsing the nodes in each column of the CPG in Figure 1b into one "big" node as in Figure 1c. It is very important to note that every iteration in Figure 1b and Figure 1c has the same incoming edges and outgoing edges except the first (last) few iterations where some incoming (outgoing) edges are missing because of nonexisting dependence sources One important characteristic of ISDG is that it is acyclic. Otherwise, an iteration would have to be executed both before and after another same iteration. A SEODFS differs from a normal Depth-First Search (DFS) in that the successors at the same depth level are examined according to their sequential execution order in the loop. An edge is marked as one of the following (see Figure 1d): ffl a tree edge, if it is on the searching path during the SEODFS, or ffl a forward edge, if there is already a path formed by the tree edges from its tail node to its head node, or ffl a cross edge, if it is neither a tree edge nor a forward edge. The goal of the SEODFS is to find all of the forward edges from the first iteration in the ISDG. It starts the search from the node representing the first iteration. A forward edge represents a transitive edge that corresponds to a redundant synchronization because, by its definition, there is a path (formed with tree edges) from its tail (i.e., the dependence source) to its head (i.e., the dependence sink). Now let us see how we can extend the SEODFS to a CPG. A CPG is also acyclic, similar to an ISDG, Here are some observations: 1. For each node in a CPG, its successor in the same column is always searched before the other successors. 2. It is very important to note that all of the columns (i.e., all of the iterations) have the same dependence pattern. We only need to identify the forward edges from the nodes in the first column. 3. There is no cross edge from the nodes in the first column. The algorithm performing the DFS on a CPG is shown in Figure 2. From the first observation above, we know that when a node is reached, all nodes below it in the same column must be traversed before any node in other columns is traversed. For /* This procedure performs DFS and marks the redundant dependences. The procedure should be invoked by calling check(0,0). Due to the depth-first nature of the procedure, the process checking for the forward edges is actually performed starting from the last statement of an iteration. Mark[iter ] is a marker for each iteration to mark the progress of the checking in each iteration. It is initialized to be N is the total number of statements in the loop body */ procedure check (iter ,start ) begin mark [iter ]=start ; for (i =statement N downto statement start ) begin for (m =all of the dependences with i as their source in the sequential execution order ) begin sink iter =iter +dist [m ]; if (sink iter >Dmax ) then do nothing; /* it is out of range */ else if (mark [sink iter ]- sink [m ]) then /* if sink has been visited*/ if (iter ==0) then /* we only check the dependences from iter 0 */ mark the dependence m as redundant; else check (sink iter ,sink [m ]); /* sink [m ] is first reached, do recursive examination */ end for end for procedure check . Figure 2: DFS algorithm for CPG. each column, we use a marker to record the statement we have just traversed in the column. The markers are initialized to be below the last statement in each column. If an edge whose head statement is lexically later than the marked statement of that column, the edge is a forward edge because according to the DFS algorithm in Figure 2, the head statement must have been visited before, and hence there must be an alternative path from the tail statement to the head statement of the edge. We can mark the edge a forward edge which corresponds to a redundant synchronization. Because every edge will be traversed at most once, the time complexity of this algorithm is O(n 2 ) where n is the number of nodes in the CPG. The storage used is proportional to the sum of the number of dependences and to the number of columns in the CPG. Checking for redundant synchronizations is started with check(0; 0). 2.2 Loops with multiple control flows In this section, we show a general algorithm handles the control branches in a loop. However, we assume there are no exit-loop branches in the loop. Such statements abort loop execution and are discussed in Section 4. With branches, there can be more than one control flow path for each iteration. We have to examine every possible control flow path to make sure that a synchronization is really redundant in all paths. In [8], the author showed that examining CPGs with all possible control flow combinations in the windows of Dmax iterations is necessary and sufficient for determining all redundant synchronization in a single loop. Our algorithm is based on the same approach but it also incorporates the DFS algorithm in the previous section to make the checking of each case easier. We need to identify all possible paths in one iteration and record them in path[][], where path[i][j] is the jth statement in path i. Another array ipath[][] acts as an inverse function of path where ipath[path[i][j]][i]=j. The sequence number of a statement s in path i is given by ipath[s][i]. Finally, iter path[i] gives the control flow path assumed by iteration i in the current CPG. If there is a total of Pcount+1 possible control flow paths in one iteration, the value of iter path[] will range from 0 to Pcount. We also assume that there is no backward jump in the loop so that all of the possible control flow paths can be found with a variation of the depth-first traversal. Figure 3 shows the general algorithm. The algorithm starts with cond check(0). When the examination is finished, synchronization for the dependence m is redundant if count[m] is zero. 3 Doubly-nested loop redundant synchronization elimination In this section, we extend the single loop algorithm to multiply-nested loops. In a single loop, there is only one dimension in the iteration space and all data dependences must point forward. Therefore, if the source and the sink of a dependence fall within the iteration space, all of the iterations between the source and sink iterations are within the iteration space. In a multiply-nested loop, dependences can have a negative direction in some nesting levels other than the outmost level. Synchronization for a dependence that is redundant in the middle of the iteration space may not be redundant in the boundary iterations because some necessary intermediate iterations may be outside of the iteration space. It causes the redundant synchronization checking to be different (or nonuniform) when we are in the boundary iterations of the iteration space. In [4], it is shown that in a doubly-nested loop, if the inner loop has at least pmax +anmin +1 iterations, where pmax is the most positive distance and anmin is the absolute value of the most negative distance in the inner loop, then the redundancy checking is uniform and the redundant synchronization found can be covered in all iterations. However, as pointed out in [11], this is true only when the loop body has only a single statement or the synchronization is done at the iteration level instead of at the statement level. It is because in a CPG, the alternative path to cover a redundant synchronization has to consider the lexical order of the statements while in a ISDG, all statements in an iteration have been grouped together. procedure check (iter ,start ) begin u =ipath [N ][iter path [iter ]]; /* get the sequence number of the last statement N */ =ipath [start ][iter path [iter ]]; /* get the sequence number of the statement start */ mark [iter ]=start ; for (n =u downto v ) begin =path [iter path [iter ]][n ]; /* i is the current statement under examination */ for (m =all of the dependences with i as the source in the sequential execution order ) begin sink iter =iter +dist [m ]; if (sink iter >Dmax ) then do nothing; /* it is out of range */ else if (m 's sink is not in this CPG) then do nothing; else if (mark [sink iter ]- sink [m ]) then /* if sink is covered */ if (iter ==0) then /* we only examine dependences from iteration 0 */ count [m ]++; /* m is redundant in this CPG */ else check (sink iter ,sink [m ]); /* sink [m ] is first reached, do a recursive examination */ end for procedure check . procedure cond check (iter ) begin /* try all possible flow paths for this iteration */ for (p iter path [iter ]=p ; /* if not the last iter, call recursively */ if (iter <Dmax ) then cond check (iter +1); else begin /* this is the last iter, perform redundancy check */ all markers to the bottom */ for (i =all dependences from nodes of the first iteration) begin /* record all the dependences need to be checked */ if (the source and the sink of dependence i are both on the control flow path being examined) count [i ]\Gamma\Gamma; check (0,0); /* start checking */ end for procedure cond check . Figure 3: DFS algorithm for loops with branches. Therefore, an alternative path in the ISDG does not imply an alternative path in the corresponding CPG. A restricted algorithm for the loops with multiple statements is proposed in [11]. It can find a subset of redundant synchronizations that are guaranteed to be redundant throughout the entire iteration space. Unfortunately, that algorithm could also miss many synchronizations that are redundant throughout the iteration space. In this section, we propose a new scheme to identify all uniformly redundant synchronizations in a multiply-nested loop with multiple statements in each iteration. This scheme is based on a necessary and sufficient condition that determines when a synchronization is uniformly redundant. We use a doubly-nested loop for illustration. However, it can be easily extended to multiply-nested loops. Without loss of generality, we also assume the dependence distances of both loop levels are positive. Because our goal is to determine how large an area in iteration space we have to use to generate the CPG for our DFS algorithm, we will show the dependence distance vector space and the iteration space where each node (or point) is an iteration, but the CPG and the DFS algorithm presented in Figure 3 are used when identifying redundant synchronization. It is because our DFS algorithm works on CPG to handle loops with multiple statements, and the synchronization is done at the statement level instead of at the iteration level. 3.1 Dependence slope and synchronization chain First, given a data dependence, we determine what areas need to be checked for the uniform redundancy of the synchronization. a dependence has the source (i and the sink (j in the iteration space, then it has a dependence distance vector ~ Definition 2 The dependence slope of a dependence distance vector ~ D is defined as possible dependence slopes are in the interval (\Gamma1; +1]. The first component of a valid dependence distance vector has to be positive or zero, that is, we must have to have a valid loop execution order. When it is zero (j second component has to be a positive integer or zero, that is, Hence, a slope of \Gamma1 is not possible. region 1 region 2 region 3 region 4 outer loop index I inner loop index J (1) (2) E(b/M,b) y-axis x-axis x=a Figure 4: A 2-D dependence distance vector space. \Gammam \Theta Figure 5: Line equations. Figure 4 shows a dependence represented by a dependence distance vector ~ in a 2-D dependence vector space. Let S denote the set of all dependence distance vectors in the loop and M (\Gammam) be the maximal (minimal) value of all of the dependence slopes. The four lines (1), (2), (3), and (4) in Figure 4 are defined by the equations in Figure 5. The four intersections are points ~ O(0; which form a parallelogram. There are also four regions in Figure 4 that are specified in Figure 6. These regions are well defined when M 6= +1. When regions 1 and 4 are empty sets. It is easy to see that the union of the four regions and the parallelogram ADCO always include all points between lines checking for redundant synchronization in a doubly-nested loop, the areas to the left of and to the right of x = a can region 2 x - a region 3 region 4 x - a Figure Defnitions for regions in Figure 4. be ignored. synchronization chain in the dependence distance vector space is a path P which consists of an ordered set of points f~p i (a ng in the space where each segment ( ~ dependence vector in S. Lemma 1 In Figure 4, there exists no synchronization chain from the point ~ O to a point ~ G in region 1. region 1 is empty and the lemma is true. Otherwise, M 6= +1. Suppose there is a synchronization chain P from ~ O to ~ G is in region 1. Let is the maximum of the dependence slope and each segment (a in P is in S, b (b which contradicts the fact that ~ G is in region 1. Hence there is no synchronization chain from ~ O to a point ~ G in region 1 of Figure 4. 2 Lemma 2 In Figure 4, there exists no synchronization chain from a point ~ G in region 2 to the point ~ D. Proof: From observation 1, \Gammam 6= \Gamma1. Suppose there is a synchronization chain P from ~ D and ~ G is in region 2. Let ng. Since \Gammam is the minimum of the dependence slope and each segment (a in P is in S, b (b an which contradicts the fact that ~ G is in region 2 and b a). Hence there is no synchronization chain that is from a point ~ G in region 2 to ~ D. 2 Similar lemmas can be proved for regions 3 and 4. Theorem 1 shows that the parallelogram ADCO is all we need to examine to find redundant synchronizations. Theorem 1 No synchronization chain P from ~ O to ~ D contains points in region 1, 2, 3, or 4. Proof: If there exists a synchronization chain P from ~ O to ~ containing ~ G in region 1, then the subpath from ~ O to ~ G is a synchronization chain and the end point ~ G is in region 1. This contradicts the result from Lemma 1. Therefore, no synchronization chain P from ~ O to ~ D contains points in region 1. Similar results for regions 2, 3 and 4 can be proved from Lemmas 1 and 2. 2 3.2 The boundary problem of redundant synchronization elimination In the previous section, we see that if there exists an alternative path from ~ O to ~ D, it must follow a synchronization chain that is contained entirely in the parallelogram ADCO. We can use this conclusion to examine every iteration in the iteration space (e.g., Figure 7a). The origin ~ O will correspond to the iteration we are examining (see Figure 7b). However, it is not sufficient to examine ADCO in order to determine if all instances of ~ are redundant. For example, if the origin in Figure 4 corresponds to an iteration at the bottom of the iteration space (as in Figure 7c), then any synchronization chain containing intermediate points in the region FCO would be invalid to cover ~ D. It is because these intermediate points are not in the iteration space of our loop (they are below the x-axis) and will not be executed. This is mainly caused by the negative values in the second component (which corresponds to the inner loop) of some dependence distance vectors. In this section, we will show a sufficient condition followed by a necessary and sufficient condition to determine if the iteration space is large enough to contain an alternative path, that is, a synchronization chain, for a particular dependence. The sufficient condition is easier to understand and to calculate while the necessary and sufficient condition gives more precise redundancy information. We assume a rectangular 2-D iteration space as shown in Figure 7a. The results of the following lemma is useful for later theorems. Lemma 3 The following relations are true in Figure 4, a - h a - a \Gamma b outer loop index inner loop index top middle bottom O (a) iteration space (b) a redundant synchronization (c) a nonredundant synchronization Figure 7: A 2-D iteration space. a - h 0 Proof: The value of h and h 0 , +m \Theta a can be obtained by combining equations of line (1) and (3), (2) and (4), respectively, in Figure 5. Additionally, we have 1 a a )M \Theta a \Gamma b - 0 Therefore, M+m - 0Theorem 2 If a dependence distance vector ~ D(a; b), where a ? 0 and b ? 0, has an alternative path in the trapezoid ADFO, then synchronization for ~ D is unnecessary if the source iteration is in the middle or bottom section of the iteration space in Figure 7a. Proof: If the source of an instance of ~ D is in the middle or the bottom section of the iteration space in Figure 7a then we can align the origin ( ~ O) of Figure 4 to the source iteration and two possible cases arise. If the sink iteration of ~ D is not in the iteration space, then no synchronization is needed. Otherwise, we show that the trapezoid ADFO is entirely in the iteration space. Since there are h rows of iteration in the top section and a - h A is also in the rectangular iteration space. Finally, since a - a \Gamma b F is also in the rectangular iteration space. Because ADFO is a trapezoid and all four corners are inside the rectangular iteration space, the entire trapezoid ADFO is in the iteration space. Since there is an alternative path in ADFO, we conclude that the synchronization for dependence ~ is unnecessary. 2 Theorem 3 If a dependence distance vector ~ D(a; b), where a ? 0 and b ? 0, has an alternative path in the trapezoid OEDC , then synchronization for ~ D is unnecessary if the source iteration is in the top or middle section of the iteration space in Figure 7a. Proof: If the source of an instance of ~ D is in the top or the middle section of the iteration space in Figure 7a then we can align the origin ( ~ O) of Figure 4 to the source iteration and two possible cases arise. If the sink iteration of ~ D is not in the iteration space, then no synchronization is needed. Otherwise, we show that the trapezoid OEDC is entirely in the iteration space. Since there are h 0 rows of iterations in the bottom section and a - h 0 C is also in the rectangular iteration space. Finally, since a - b E is also in the rectangular iteration space. Because OEDC is a trapezoid and all four corners are inside the rectangular iteration space, the entire trapezoid OEDC is in the iteration space. Since there is an alternative path in OEDC , we conclude that the synchronization for dependence ~ D is unnecessary.Theorem 4 If a rectangular iteration space (e.g., Figure 7a) has at least (h+h 0 ) rows and if a dependence ~ D has alternative paths in both trapezoids ADFO and OEDC, respectively, then the synchronization for ~ D is redundant for all iterations, including boundary iterations in the iteration space. Proof: If the rectangular iteration space has at least (h we have the top and bottom sections, and probably a non-empty middle section, as in Figure 7a. From Theorem 2, synchronization for ~ D is redundant in the middle and the bottom sections. From Theorem 3, synchronization for ~ D is redundant in the top and the middle sections. Therefore, synchronization for ~ D is redundant for all iterations. 2 Theorem 4 gives a sufficient condition for a synchronization to be redundant in a large enough iteration space. Besides, h and h 0 can be easily determined from equations. (5) and (6). If the dimensions of an iteration space are known at compile time, the redundancy of synchronizations can be determined by the compiler. On the other hand, if the dimensions of an iteration space depend on the program input, we may generate multiple versions of this loop. A simple test can be placed before the loop to dynamically determine which version to execute and to take advantage of eliminating some redundant synchronizations. Although the precise information of redundant synchronization can be determined by applying the DFS algorithm in Section 2 to the entire iteration space, it is certainly quite time consuming and impractical. Based on the results derived so far, we actually can find a necessary and sufficient condition for a synchronization to be redundant in an iteration space. The condition is specified by a threshold on the height of the iteration space, called critical height. We now describe how to calculate the critical height. Lemma 4 In Figure 4, if ~ D has no alternative path in the rectangle with corners (0; 0), (0; k), (a; k), and (a; 0), where k is a positive integer, then ~ D has no alternative path in the rectangle with corners (0; 0), (0; Proof: It is easy to see that the second rectangle is enclosed entirely in the first rectangle. Therefore, if there is an alternative path in the smaller rectangle, there must be an alternative path in the larger rectangle. 2 The basic idea in finding the critical height is to find, for the trapezoid ADFO, the smallest integer value k which specifies the rectangle containing an alternative path for ~ D. Similarly, k 0 is determined for the trapezoid OEDC except that the rectangle will grow downwards and have two corners fixed at (0; b) and (a; b). Based on the result of Lemma 4, the search for k (k 0 ) can be done efficiently by a binary search in the interval [b; h] ([0; h 0 ]). If no k can be found in the searched interval specifying a rectangle with an alternative path, then ~ D is not redundant no matter how large the iteration space is and the critical height for ~ D equals +1. Otherwise, the critical height for ~ D is k Theorem 5 In a doubly-nested loop, the synchronization for a dependence ~ D is redundant if and only if the iteration space has a height larger than the critical height for ~ D. Proof: We first prove the "if" part. If the iteration space has a height larger than k , we can use a partition scheme similar to that of Figure 7a with h and h 0 being replaced by k and k 0 , respectively. Now the synchronization is redundant in the top and the middle sections because the bottom section provides necessary room to contain an alternative path for ~ with its source iteration in the lowest row of the middle section. Similarly, the synchronization is redundant in the middle and the bottom sections because the top section provides necessary room to contain an alternative path for ~ D with its source iteration in the highest row of the middle section. Therefore, the synchronization for ~ D is redundant for all iterations. We now prove the "only if" part. Suppose on the contrary, the height of the iteration space is less than the critical height. If the critical height is +1, then the synchronization for ~ D is not redundant. Otherwise, let the height be k where r is a positive integer. Let rows beneath the jth row, by the definition of k 0 , these rows are not large enough to contain an alternative path for ~ D with its source iteration in the jth row. Similarly, since there are k rows above the jth row, by the definition of k, these rows are not large enough to contain an alternative path for ~ D with its source iteration in the jth row. Therefore, synchronization for ~ D with its source iteration in the jth row is not redundant, and this implies that synchronization for ~ D is not redundant for all iterations. 2 Implementation issues When h and h 0 are small, Theorem 4 can be satisfied by most loops and should be used for better efficiency. For the two trapezoids ADFO and OEDC in Figure 4 that need examination, the integer loop bounds are not easy to determine. Instead, we should use the rectangle with corners at (0; 0); (0; dhe); (a; dhe), and (a; 0) for ADFO. For OEDC , we use rectangle with corners at (0; b); (a; b); (a; b\Gammah 0 c), and (0; b\Gammah 0 c). These two rectangles actually have a very similar size as it can be shown that b. For each dependence distance vector ~ D(a; b), the number of iterations need to be examined are approximately 2 \Theta a \Theta a \Theta M \Theta b +M \Theta m \Theta a a \Theta M \Theta M \Theta a +M \Theta m \Theta a If there are too many dependences to check, we can trade precision for efficiency by calculating the largest rectangle from all dependences and check every dependence in that rectangle (instead of in their own rectangles). This results in only one pair of h and h 0 . The set of the dependences we thus obtained will be redundant for all iterations if the iteration space has a height larger than h Also some simple optimizations can be done such as checking if the iteration space is large enough to contain both the source and the sink of a dependence. If it is not, then no synchronization is needed. Exit-loop control branches If there is an exit-loop control branch in the loop, it implies that the execution of the later iterations will depend on this branch. In the context of redundant synchronization elimination, since we assume that all statements in an iteration be executed sequentially, we can add a dependence with its source the conditional statement of the branch and its sink the first statement of the next iteration. Then we can use the same algorithm described in Section 2. Higher dimension iteration spaces We have used a doubly-nested loop as our example. To extend the results in the Section 3 to an n\Gammadimensional iteration space, we simply have to modify Definition 2 to define the dependence slope for each dimension. Then we calculate the maximum and the minimum of the slopes in each dimension. An n\Gammadimension region corresponding to the parallelogram ADCO in Figure 4 can thus be found. The higher dimensional version of the sufficient condition is very similar to that specified in Theorem 4 with the exception that now we have different h+h 0 in each dimension. To obtain the critical height of the necessary and sufficient condition in Theorem 5 for each dimension is also straightforward. We need to examine the n different dimensions one by one and search for its critical height. Because the critical heights found in later dimensions also guarantee the existence of the alternative path if there is one, the order of examination is not critical and no backtracking is necessary. Previous works The redundant synchronization elimination problem was first described by Li and Abu-sufah [7, 6] using dominant locks. A lock specifies a dependence relation, and a lock dominates another lock if enforcing the first lock ensures that the second lock is preserved. Three conditions for identifying dominant locks are provided, but they cover only very limited cases. Midkiff and Padua [10, 9] described schemes to generate synchronization instructions in a compiler using test and testset, which are very similar to await and advance instructions used in the Alliant minisupercomputers [1]. They also introduced the Control Path Graph (CPG) to show the ordering imposed by the synchronization and the control dependences on a MIMD machine. To eliminate redundant synchronizations, they used a transitive closure method to check, for a given synchronization, whether the transitive closure of the remaining synchronizations cover it. Because the arcs previously determined redundant have to be checked again, the time complexity of this algorithm is O(Dn 3 is the number of statements in CPG and D is the number of dependences (which is bounded by n 2 ). So the complexity can also be shown as O(n 5 ). For single loop, they showed that the columns of CPG needed is at most Dmax is the largest dependence distance. Shaffer [12] showed an algorithm which can find all the transitive synchronization arcs between tasks. A synchronization is transitive if any other successors of the synchronization source have at least one path to the sink. This algorithm has time complexity of O(n 3 ) where n is the number of nodes in the task graph. The work done by Callahan et al. [2] used data flow analysis and algebraic formulations to determine whether a dependence is properly covered by synchronizations. The synchronization primitives used are post&wait, and they can handle more general program constructs not limited to parallel loops and hence the time complexity is potentially higher. A very efficient algorithm for finding redundant synchronization in DOACROSS loops with uniform dependences is proposed by Krothapalli and Sadayappan [4, 5]. It works on either single statement loops or synchronization at the iteration level instead of the statement level. Because the dependences are uniform in each iteration, only the dependences from the first iteration need to be verified. They used a variation of depth-first search (DFS) to determine the transitive synchronization arcs. This scheme can be extended to multiply-nested loops provided the iteration space is large enough such that the dependences are uniform even with iterations at the boundaries. Given a graph with n nodes with e edges, the depth-first search algorithm has time complexity of O(e) or equivalently, O(n 2 ). That approach is very efficient in finding redundant synchronizations between iterations. However, synchronization at the iteration level is often not very satisfactory because the parallelism provided by overlapping loop iterations in a DOACROSS loop execution is lost. Recently, a scheme proposed by Midkiff and Padua in [11] is equivalent to examining the rectangle with corner (0; 0); (0; b); (a; b), and (a; 0) in Figure 4 for an alternative path of the dependence ~ D. If there is an alternative path for the dependence ~ D in this rectangle, it must be in the parallelogram OEDF (which is the intersection of the two trapezoid ADFO and OEDC). Because it satisfies both Theorems 2 and 3, the synchronization is redundant for all iterations and in this case, k which is exactly the minimal size to have both its source and sink in the iteration space. The uniform redundant synchronizationsthus found are a subset of all uniformredundant synchronizations foundusing the scheme described in the previous section. The number of iterations needed to be examined in the rectangle is a \Theta b - M \Theta a 2 : 5 Conclusion In this paper, we described an algorithm to detect redundant synchronization efficiently for multiply-nested loops with multiple statements. There could also be branches in the loop with multiple control flows. To solve the boundary problem for multiply-nested loops, we used a doubly-nested loop as an example and derived the necessary and sufficient condition for a synchronization to be redundant in the entire iteration space. The scheme is a significant improvement over the previous schemes in the sense that it can efficiently identify all of the redundant synchronization while the previous schemes will be either unable or too inefficient to find them. The results presented in this paper are important for a parallelizing compiler to generate efficient code for DOACROSS loops, --R Alliant Computer System Corp. Analysis of event synchronization in a parallel programming tool. Removal of redundant dependences in doacross loops with constant dependences. Removal of redundant dependences in doacross loops with constant dependences. On reducing data synchronization in multiprocessed loops. A technique for reducing synchronization overhead in large scale multiprocessors. Automatic generation of synchronization instructions for parallel processors. Compiler algorithms for synchronization. Compiler generated synchronization for do loops. A comparison of four synchronization optimization techniques. Minimization of interprocessor synchronization in multiprocessors with shared and private memory. --TR --CTR Antonia Zhai , Christopher B. Colohan , J. Gregory Steffan , Todd C. Mowry, Compiler Optimization of Memory-Resident Value Communication Between Speculative Threads, Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization, p.39, March 20-24, 2004, Palo Alto, California Michiel Ronsse , Koen De Bosschere, Non-Intrusive Detection of Synchronization Errors Using Execution Replay, Automated Software Engineering, v.9 n.1, p.95-121, January 2002 Cheng-Zhong Xu , Vipin Chaudhary, Time Stamp Algorithms for Runtime Parallelization of DOACROSS Loops with Dynamic Dependences, IEEE Transactions on Parallel and Distributed Systems, v.12 n.5, p.433-450, May 2001 Long Li , Bo Huang , Jinquan Dai , Luddy Harrison, Automatic multithreading and multiprocessing of C programs for IXP, Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming, June 15-17, 2005, Chicago, IL, USA
DOACROSS;compiler optimization;redundant synchronization elimination;data synchronization;data dependence
305011
How to Sort N Items Using a Sorting Network of Fixed I/O Size.
AbstractSorting networks of fixed I/O size p have been used, thus far, for sorting a set of p elements. Somewhat surprisingly, the important problem of using such a sorting network for sorting arbitrarily large data sets has not been addressed in the literature. Our main contribution is to propose a simple sorting architecture whose main feature is the pipelined use of a sorting network of fixed I/O size p to sort an arbitrarily large data set of N elements. A noteworthy feature of our design is that no extra data memory space is required, other than what is used for storing the input. As it turns out, our architecture is feasible for VLSI implementation and its time performance is virtually independent of the cost and depth of the underlying sorting network. Specifically, we show that by using our design N elements can be sorted in \Theta({\frac Np} \log {\frac Np}) time without memory access conflicts. Finally, weshow how to use an AT^2-optimal sorting network of fixed I/O size p to construct a similar architecture that sorts N elements in \Theta({\frac N{p}} \log {\frac N{p\log p}}) time.
Introduction Sorting networks are a well studied class of parallel sorting devices. For an early treatment of the subject, see [4, 12]; for recent surveys we refer the reader to [2, 3, 7, 19, 22, 23]. In general, sorting networks are suitable for VLSI realization. This is due, in part, to the fact that the processing elements are typically simple comparators and the structure of the network is fairly regular. Several parameters are used to characterize the quality of a sorting network T . The cost of T , denoted by C(T ), is the number of constant fan-in processing nodes in the network. The depth of denoted by D(T ), is the maximum number of nodes on a path from an input to an output. For Work supported by ONR grant N00014-97-1-0526, NSF grants CCR-9522093 and ECS-9626215, and by Louisiana grant LEQSF(1996-99)-RD-A-16. y Department of Computer Science, Old Dominion University, Norfolk, VA 23529-0162, USA z Istituto di Elaborazione dell'Informazione, C.N.R, Pisa 56126, ITALY x Department of Computer Science, Louisiana State University, Baton Rouge, LA 70803, USA example, Batcher's classic bitonic sorting network and odd-even merge sorting network [4, 5] have cost O(p log 2 p) and depth O(log 2 p), where p is the network I/O size. The time performance of a sorting network is the number of parallel steps performed, which is usually the depth of the network. Ajtai, Koml'os and Szemer'edi [1] proposed a sorting network, commonly called the AKS sorting network, of I/O size p, depth O(log p), and cost O(p log p). Later, Leighton [13] and Paterson [21] developed comparator-based sorting networks of I/O size p, cost O(p), and depth O(log p) that elements in O(log p) time. The AKS network is both cost-optimal and depth-optimal (i.e. time-optimal) in the context of sorting p elements with each comparator used once. It is interesting to note that in spite of the fact that sorting networks of fixed I/O size p have been extensively investigated in the context of sorting p elements, their efficient use for sorting a large number, say N , of elements has not received much attention in the literature. In real-life applications, the number N of input elements to be sorted is much larger than p. In such a situation, the sorting network must be used repeatedly, in a pipelined fashion, in order to sort the input elements efficiently. Assume that the input as well as the partial results reside in several constant- port memory modules. Then, scheduling memory accesses and the I/O of the sorting network becomes the key to achieving the best possible sorting performance. Clearly, if an appropriate answer to this problem is not found, the power of a sorting network will not be fully utilized. The problem of building sorting networks out of smaller components such as p-sorters and mergers has received attention in the literature [7, 8, 15, 20]. Bilardi and Preparata [8] use a tree of of mergers of various sizes to sort using cube-connected cycles. Nassimi and Sahni [15] construct sorting networks by combining mergers of various sizes. Tseng and Lee [25] construct a sorting network of I/O size p 2 using O(p) layers of p-sorters. Recently, Parker and Parberry [20] showed that for arbitrary N , a sorting network of I/O size N can be constructed using p-sorters, thus answering an open question posed in [12]. A related problem, namely that of sorting N elements by repeatedly using a p-sorter, has received attention of late [6, 18, 20]. A p-sorter is a sorting device capable of sorting p elements in constant time. Computing models for a p-sorter do exist. For example, it is known that p elements can be sorted in O(1) time on a reconfigurable mesh of size p \Theta p [11, 14, 16, 17]. A reconfigurable mesh is a multiprocessor system in which the processors are connected by a bus system whose configuration can be dynamically changed to suit computational needs. Beigel and Gill [6] showed that the task of sorting N elements, N - p, N log N log p calls to a p-sorter. They also presented an algorithm to sort N elements using \Theta N log N log p calls to the p-sorter. Their algorithm, however, assumes that the p elements to be sorted by the p-sorter can be fetched in unit time, regardless of their locations in memory. Since, in general, the address patterns of the operands of p-sorter operations are irregular, it appears that the algorithm of [6] cannot realistically achieve the time complexity of O N log N log p , unless one can solve in constant time the addressing problem on realistic machines. To address this problem, Olariu and Zheng [18] proposed a p-sorter-based architecture that allows to sort N elements in O( N log N stricly enforcing conflict-free memory accesses. In conjunction with the results of [6], their result completely resolves the time complexity issue of sorting N elements using a p-sorter. As it turns out, a p-sorter is a much more expensive device than a sorting network, and its use should be avoided whenever possible. Besides, it is not clear whether it is possible to replace the p-sorter with a pipelined sorting network in the architecture of [18], while guaranteeing the same performance. The main contribution of this work is to propose a simple sorting architecture whose main feature is the pipelined use of a sorting network of fixed I/O size to sort an arbitrarily large number N of elements. Specifically, we show that by using our design, N elements can be sorted in log N Our design consists of a sorting network of fixed I/O size p, a set of prandom- access memory modules, and a control unit. The memory access patterns are regular: in one step, elements from two rows of memory modules are supplied as input to the sorting network and/or the output of the sorting network is written back into two memory rows. Our architecture is feasible for VLSI implementation. We then show how to use an AT 2 -optimal sorting network of fixed I/O size p to construct a similar architecture that sorts an arbitrary number N of elements in \Theta( N log N time. An important feature of both architectures is that no extra data memory space is required, other than what is needed for storing the input. The remainder of the paper is organized as follows. In Section 2 we discuss the details of the proposed architecture. In Section 3 we show how to obtain row-merge schedules, a critical ingredient for the efficiency of our design. Section 4 extends the results of Sections 2 and 3 by showing how to use an AT 2 -optimal sorting network of fixed I/O size p to obtain a architecture to log N Finally, Section 5 offers concluding remarks and poses a number of open problems. 2 The Architecture A sorting network can be modeled as a directed graph whose nodes represent processing elements and whose edges represent the links connecting the nodes, as illustrated in Figure 1. The processing elements can be simple comparators or more complex processors capable of performing arithmetic operations. A comparator has two inputs and two outputs and is used to perform a compare- exchange operation. A comparator-based sorting network is a sorting network whose processing elements are comparators. In the remainder of this work, we use the term sorting network to refer exclusively to a comparator-based sorting network. Figure 1 and Figure 2 illustrate Batcher's classic sorting networks, with I/O size 8. As illustrated in Figure 1, two types of comparators are used. For a type 0 comparator, the smaller and larger of the two input numbers emerge, after comparison, at the top and bottom output, respectively. A comparator of type 1 produces the output in reverse order. Unless stated otherwise, we assume that when a sorting network of fixed I/O size p is used to sort p elements, each of its comparators is used exactly once. a I I I I I I I I O O O O O O O a Figure 1: A bitonic sorting network of I/O size 8. I I I I I I I I O O O O O O O Figure 2: An odd-even merge sorting network of I/O size 8. Referring to Figures 1 and 2, we say that a sorting network S is layered if each of its comparators is assigned to one of the D(S) layers L k , 1 - k - D(S), as follows: ffl Assign to layer L 1 the comparators whose inputs are outputs of no comparators in the network and exclude them from further consideration; ffl for every k, 2 - k - D(S), assign to layer L k the comparators whose inputs are outputs of comparators in layers L i and layer L j , 1 - exclude them from further consideration. A simple inductive argument shows that for every k, 2 - k - D(S), every comparator in layer k receives at least one input from a comparator in layer L k\Gamma1 . Therefore, in a layered sorting network the longest paths from the network input to the comparators in layer L k must have the same length. We say that a sorting network S is pipelined if for every k, 2 - k - D(S), all paths from the network input to the comparators in layer L k have the same length 1 . As an illustration, the bitonic sorting network shown in Figure 1 is a pipelined network, whereas the odd-even merge sorting network of Figure 2 is not. The intuition for this terminology is that a pipelined sorting network S of I/O size p can be used to sort sets of p elements concurrently in a pipelined fashion. It is easy to confirm that in a pipelined network S each layer contains exactly pcomparators. In this context, we shall refer to layers as stages and denote them by S 1 Given a sorting network S, one can always introduce additional buffer nodes (latches), if nec- essary, in such a way that the nodes of the resulting network - comparators and latches - can be partitioned into stages S 1 Specifically, for every k, 1 - k - D(S), place all the comparators in layer L k in S k . If one of the two inputs of a comparator c in layer L k is the output of a comparator c 0 in layer L i with a sequence of latch nodes l 0 on the edge from c 0 to c so that l 0 j is in stage S i+j . For each output of a comparator c in layer k such that k ! D(S) that is also the output of the network, we add latch nodes on the output edge. The reader should have no difficulty confirming that in the resulting network all paths from the network input to the nodes in the same layer have the same length. Thus, this transformation converts a non-pipelined network into a pipelined one. For example, after adding latches to the odd-even merge sorting network of Figure 2, we obtain the network shown in Figure 3. Our proposed architecture, that we call the Row-Merge Architecture, (RMA, for short) is illustrated in Figure 4 for 8. The RMA involves the following components: (i) A pipelined sorting network T of fixed I/O size p with inputs I 1 ; I and with outputs (ii) pconstant-port memory modules pcollectively referred to as the data memory. For every k, 1 - k - p, memory module M k is connected to inputs I k and I p +k and to outputs O k and O p 2 +k of the sorting network. 1 The length of a path is taken to be the number of edges on the path. O O O O O O O Figure 3: The odd-even merge sorting network with latches added. O O O O O O O O I I I I I I I I12 3 Control Unit Sorting Memory Modules Network T Figure 4: The Row-Merge Architecture with (iii) A control unit (CU) consisting of a control processor (CP) and of a control memory. The words with the same local address in all memory modules are collectively referred to as a memory row. The N input elements are stored, as evenly as possible, in d 2N consecutive memory rows. Dummy elements of value +1 are added, if necessary, to ensure that all memory modules contain the same number of elements: these dummy elements will be removed after sorting. The read/write operations are carried out in a single instruction (address) stream multiple data stream fashion controlled by the CU. Specifically, the CU is responsible for generating memory access addresses: in every step, the same address is broadcast to all memory modules which use it as the local address for the current read or write operation. We assume that the address broadcast operation takes constant time. The CU can disable memory read/write operations, as necessary, by appropriately using a mask. When operating in pipelined fashion, in a generic step i, p elements from two memory rows are fed into the sorting network; at the end of step the sorted sequence of p elements from these two rows emerges at the output ports of T and is written back into two memory rows. This process is continued until all the input elements have been sorted. To simplify our analysis, we assume that one memory cycle is sufficient for reading, writing, and for comparator operations. This assumption is reasonable if each memory module has, say, two ports for reading and two ports for writing. If each memory module has only one port for both reading and writing, the performance degrades by a small constant factor. Let (a; b) be an ordered pair of memory rows in data memory. In the process of sorting, the elements in memory row a (resp. b) are read into the left (resp. right) half of the network input, and the corresponding elements are sorted in non-decreasing order. Finally, the left (resp. right) half of the resulting sorted sequence emerging at the network output is written back into data memory to replace the original row a (resp. b). It is now clear why we refer to our design as the Row-Merge Architecture. In order to efficiently sort 2N memory rows on the RMA, we wish to identify a finite sequence MS =! (a of pairs of memory rows such that by following this sequence the elements are sorted in row-major order. We call such a sequence MS a row-merge schedule or, simply, a merge schedule. At this time, the reader may wonder about the power of the RMA. In Theorem 1, we provide a partial answer to this question by establishing a lower bound on the time required by any algorithm that sorts N elements using the RMA. Theorem 1 Any algorithm that correctly sorts N elements on the RMA using a sorting network of I/O size p must log N Proof. We ignore the time delay caused by the depth of the sorting network and, consequently, we assume that the sorting network takes O(1) time to sort any group of p elements. This assumption is reasonable, since it can only help up the algorithm. We show that even with this favorable assumption, any sorting algorithm must take \Omega\Gamma N log N For this purpose, we only need to exhibit a particular sequence of N memory rows for which any algorithm operating in the RMA log N Consider an arbitrary sequence real numbers stored in an array A[1:: 2N such that for every The 2N memory rows are assumed to be such that for every p , all the p words in memory row i are equal to a i . Now consider an arbitrary merge schedule MS that correctly sorts the resulting 2N memory rows. From this MS we construct an algorithm B, in the comparison tree model, that sorts the array A. The idea is that algorithm B simulates on A the actions of MS on the set of memory rows. More precisely, when MS sorts memory rows i and j, algorithm B compares and, if necessary, interchanges the entries A(i) and A(j). Now assume that the merge schedule MS sorts the 2N memory rows in o( N log N time. The simulation just described implies that algorithm B sorts the array A in o( N log N this is impossible as the lower bound for sorting 2N elements in the comparison tree model is log N This completes the proof of the theorem. 2 Generating Row-Merge Schedules In order to sort N input elements correctly and efficiently on the RMA, we need to find a merge schedule MS =! (a to guide the computation. The MS specifies, in left to right order, the pairs of memory rows that will be supplied as input to the sorting network, in a pipelined fashion. For example, the ordered pair (a supplied in the first time unit, followed by the ordered pair (a in the second time unit, and so on. For reasons that will be discussed later, we are interested in merge schedules that satisfy the following three conditions: (1) The RMA must sort correctly, if a p-sorter is used instead of the sorting network, that is, for sorting networks of depth one. (2) A row number appears at most once in any subsequence (a of MS. (3) The length of MS should be as close as possible to \Omega\Gamma N log N p ), which is the time lower bound for sorting on the RMA. A p-sorter can be perceived as a sorting network T of I/O size p and depth D(T Therefore, condition (1) is a necessary condition for correctly sorting N elements in general. For if condition (2) is violated, the MS may not guide the pipelined operations to correctly sort the N elements because of possible data dependencies. To see this, consider the pairs of memory rows are updated. It is possible that an element that is originally in row a i is duplicated in both rows b i and row b i+j , while an element that is originally in row b i or row b i+j is lost. Condition (3) impacts the time performance. We now present a general framework for generating row-merge schedules. The central idea of our approach is motivated by the following well-known fact mentioned in [9] and in [12] (p. 241): Proposition 1 For any parallel algorithm using only compare-exchange operations for sorting m elements with m processors, there is a corresponding algorithm for sorting rm elements with m processors, where every comparison in the first algorithm is replaced by a merge-sorting of two lists of r elements in the second. For later reference, we refer to Proposition 1 as the compare-exchange/merge-split principle. Let S be a sorting network of I/O size . Knuth [12] suggested representing S in the way shown in Figure 5(b). Specifically, there are m horizontal lines, each labeled by an integer i. The left and right endpoints of the line labeled i represent, respectively, the i-th input and the i-th output of the network. A comparator, represented by a directed vertical segment originating at line i and ending at line j, causes an interchange of its inputs, if necessary, so that the smaller number appears on line i and the larger number appears on line j. We call this representation the line representation of S. Memory row 1 Memory row 2 Memory row 4 Memory row 3 Memory row 5 Memory row 6 Memory row 7 Memory row 8 (a) (b) Figure 5: Illustrating the correspondence between (a) memory address space and (b) line representation of a network S. Here, S is the sorting network shown in Figure 1 Constructing the line representation of a sorting network S of I/O size m from the graph representation of S is straightforward. We perceive a comparator as a 2 \Theta 2 switch of two states, straight and cross. We assign an input value i to the network input I i , 1 - i - m, and set all switches (comparators) to the straight state. Then, the m input values propagate through the switches. The values j and k received by a switch define the corresponding vertical segment with endpoints on lines j and k in the line representation of S. The type of the corresponding comparator determines the direction of the vertical segment. Figure 6 illustrates this propagation process for the network of Figure 1. A pair of integers and an arrow at the input of each comparator define the directed vertical line segment in the line representation shown in Figure 5(b). I I I I I I I I O O O O O O O Figure Illustrating the method of obtaining the line representation of the network in Figure 1 Assume that the N elements to sort are located in memory rows 1 through m. We generate a merge schedule MS from the line representation and the layer partition of S by the following greedy algorithm. Initially, the inputs to all comparators are unmarked. Let C 1 be an arbitrary FIFO (first- in first-out) queue of comparators at level L 1 . We obtain a FIFO queue C i+1 of comparators in level L i+1 as follows: Set C i+1 to empty. Scan the comparator queue C i in order and for each comparator in C i , mark its two output edges. As soon as the two input edges of a comparator c are marked, include c into layer C i+1 . At this point the reader will not fail to note that comparator c must, indeed, belong to layer L i+1 . This process is continued, as described, until all C have been constructed. Finally, concatenate the C j s to obtain a sequence C of comparators such that C i precedes C i+1 . ks C(S), be the sequence of comparators obtained from S using the greedy algorithm just described. With each comparator c k j whose corresponding directed vertical segment originates at line a j and ends at line b j in the line representation of S, we associate the ordered pair (a MS =! (a be the resulting sequence of ordered pairs corresponding to C. Consider the correspondence between the data memory and the line representation of S such that the horizontal line i corresponds to memory row i. By the compare-exchange/merge-split principle (Proposition 1), we know that the elements in the memory can be sorted in row-major order if we merge the rows sequentially, following the merge schedule MS. Figure 5 illustrates the correspondence between a data memory of four modules, eight words per module (i.e. and the line representation of the network in Figure 1. Applying the greedy algorithm on S shown in Figure 1 as S, we obtain the following merge schedule: In the bitonic sorting network of I/O size m, assuming m to be even, there are exactly mcomparators per layer. As will be shown shortly, if N ? pD(T ), any MS generated by the greedy algorithm from the bitonic sorting network of I/O size satisfies conditions (1) and (2) above and, therefore, can be used to correctly sort N elements on the RMA. However, there exist sorting networks that cannot be used to generate a merge schedule that satisfies condition (2) for This fact restricts the applicability of the MS generating scheme. For example, if no MS generated directly from the network featured in Figure 7 can satisfy condition (2). To remedy this problem, we introduce the concept of augmenting sorting networks.L Figure 7: Line representation of a variant of the bubble sort network. Given an arbitrary sorting network S of I/O size m, the augmented sorting network S 00 of I/O size m derived from S is obtained as follows: ffl Transform S into a pipelined network S 0 by adding latches as described in Section 2; ffl Group the latches in each layer of S 0 into pairs (in an arbitrary way) and replace each pair of latches by "dummy" comparators If m is odd, delete the remaining latch in each stage. The network obtained at the end of this simple algorithm is the desired augmented sorting network S 00 . Clearly, in each layer of S 00 there are exactly b m comparators. To be distinguished from real comparators, dummy comparators are represented by a node labeled d and by a vertical line segment without an arrow, in the graph and line representation, respectively. For an illustration, the augmented network of the odd-even sorting network shown in Figure 2 is given in Figure 8. We will still use our greedy algorithm to generate an MS from an augmented network S 00 . The comparator selection process is exactly as described above. However, the task of translating a comparator sequence into the corresponding MS is slightly modified to accommodate dummy comparators. When we translate the comparator sequence ks ) into MS =! (a is a dummy comparator then the order of the two row numbers involved is arbitrary. When we use an MS generated from an augmented network S 00 , the write operations in step i +D(T are disabled if (a corresponds to a dummy comparator of S 00 . Note that this is possible since, as specified in the Section 2, our architecture supports masked write operations. Operating in this fashion, an MS generated from an augmented network S 00 clearly satisfies condition (1) because of the compare-exchange/merge-split principle (Propositions 1). As we shall prove in Theorem 2, the MS also satisfies condition (2). The length of the MS is the cost of the sorting network using which the MS is generated. Both S and S 00 have the same depth, but S 00 has an increased cost compared with S. We note that, at first, it would seem as though by using S 00 to derive an MS condition (3) will not be satisfied. However, all sorting networks S of I/O size m, known to the authors, including the network. featured in Figure 7, have O(mD(S)) cost; therefore, the cost of S 00 is within a constant factor of the cost of S. To summarize our findings we now state and prove the following important result. Theorem 2 Let S be any sorting network of I/O size 2N=p and let T be any sorting network of I/O size p. If N ? pD(T ) then any merge schedule obtained from the augmented network of S by the greedy algorithm can be used to correctly sort N elements on the Row-Merge Architecture with T as the sorting device in O( N Dummy comparators are introduced for convenience only. They amount to a "no-operation". I O O O O O O O d d d d Figure 8: The augmented odd-even merge sorting network Proof. We only need to show that if N ? pD(T ), any MS generated from the augmented network S 00 of S satisfies condition (2). Let MS =! (a be an arbitrary merge schedule corresponding to the comparator sequence ks ) generated from S 00 by the greedy algorithm. Conceptually, we treat the network S 00 as a data-driven (i.e. data-flow) architecture: the processing elements are precisely the comparators, whose activation is driven by data availability. We say that a comparator c is ready for activation whenever its two inputs are available and it has not yet been used. To prove the theorem, we need to show that for any j such that all comparators preceding c k j have been used but c k j has not yet been used, all the comparators in the subsequence are ready for activation. Let jL i j denote the number of comparators in layer L i of similarly, let jC i j stand for the length of the subsequence C i constructed from the comparators in L i by the greedy algorithm. Clearly, c. Initially, there are exactly b N c comparators, all in C 1 , ready for activation. Consider a arbitrary j, 1, such that all comparators preceding c k j have been used and such that c k j is ready for activation. Suppose that c k j is the r-th comparator in C i . Then, the number of comparators in C i that are ready for activation is, clearly, jL 1. Since each of the first comparators of C i provides at most two inputs to comparators in layer L i+1 and since each comparator of L i+1 receives at least one of its inputs from a comparator in layer L i , it follows that at least the first r \Gamma 1 comparators in C i+1 are ready for activation. Therefore, the total number of consecutive comparators starting from c k j in C is at least jL i j, which is at least b N remaining comparators in C starting from c k j are ready for activation. If b N t such that t ? b N c the input of comparator c ks does not depend on the output of any of comparators c k t\GammaD(T ) in C. With this, we just proved that this MS can be used as a merge schedule for network T . Note also that by our previous discussion the time required to sort N elements is O(s), where s is the cost of S 00 , and it is bounded above by O(mD(S)). This completes the proof of the theorem. 2 We note that Theorem 2 has the following important implications: (a) Any sorting network T whose depth d(T ) satisfies N ? pD(T ) can be used to sort correctly N elements in pipelined fashion. (b) If N - p 2 , any sorting network of depth no larger than p can be used as T . Since the depth of all practical sorting networks of I/O size p is smaller than p, any of these networks can be used as T in the RMA. It is important to note that this implies that the performance of the RMA is virtually independent of the sorting network T used as the sorting device. (c) If N - p 2 , any row-merge schedule generated from the augmented network of any network S by our greedy algorithm can be used to sort N elements correctly; in other words, the correctness of any merge schedule is independent of the sorting network S used to generate it. (d) The time required for sorting N elements is proportional to D(S), the depth of S. We can select T from a wide range of sorting networks, depending on their VLSI feasibility. We also have a wide range of sorting networks to choose from for deriving merge schedules. We know that the depth of both the bitonic and the odd-even merge sorting network of I/O size m is O(log 2 m). Thus, using either of them as S to derive a merge schedule, N elements can be sorted in O( N log 2 N time. It is well known that the depth of the AKS sorting network of I/O size m is bounded by O(log m). Hence, using the AKS network as S, N elements can be sorted in O( N log N Therefore, we take note of the following extension of Theorems 1 and 2. Theorem 3 The Row-Merge Architecture that uses a sorting network of I/O size p and depth at most p as the sorting device can sort N elements, N - p, in \Theta( N log N To the best of our knowledge, most of the known sorting networks, including the AKS network, are defined recursively. The graph representations of recursively defined sorting networks can be constructed in linear time. Given the graph representation of a sorting network S of I/O size 2N we now estimate the time it takes the CU to generate an MS. The comparators in the first layer, of S can be easily identified. Next, the nodes of S can be divided into D(S) layers as described in Section 2. Clearly, this process takes O(C(S)) time. By scanning the nodes of S layer by layer, latches can be added to convert S into a pipelined network S 0 in O( N time. Further, by employing a layer-by-layer scan of the nodes in S 0 , pairs of latches in each layer are combined into dummy comparators to obtain the augmented network S 00 , and this process takes O( N time. It is easy to see that the task of constructing the line representation of S 00 from the graph representation of S 00 can also be carried out in O( N time. Finally, the greedy algorithm is performed on S 00 and this algorithm is essentially a Breath-First search, running in O( N time. Hence, the total time of generating an MS from network S is bounded by O( N It is interesting to note that, even if the MS schedule is available, the RMA needs O( N time to complete the task of sorting N elements. Thus, the time it takes the CU to compute an MS and the time needed by the network T to perform the sorting are perfectly balanced. In other words, the time complexity claimed in Theorem 3 also holds if the computation required for generating an MS is taken into account. It is very important to note that once available, the MS can be used to sort many problem instances. The working space requirement by the control memory is proportional to mD(S) words, each of O(log N) bits. Rather remarkably, the RMA does not require extra data memory space other than what is used for storing the input. 4 The Generalized Row-Merge Architecture In a number of contexts, especially when the VLSI complexity of T is a concern, it is desirable to use an AT 2 -optimal network as a parallel sorting device. The main goal of this section is to show that it is possible to design a sorting architecture that uses an AT 2 -optimal sorting network as its parallel sorting device. As it turns out, the time performance of the new design, that we call the Generalized Row-Merge Architecture (GRMA, for short), is slightly better than that of the RMA discussed in Section 2. The GRMA uses a sorting network T of fixed I/O size p with inputs I 1 ; I outputs . It has p constant-port data memory modules collectively referred to as the data memory. For every k, 1 - k - p, memory module M k is connected to input I k and to output O k . In one parallel read operation, one memory row is read and supplied as input to T ; in one parallel write operation the output of T is written back into one memory row. Just like in the RMA, the memory accesses and the operation of the sorting network T are controlled by the control unit (CU). There are, however, three major differences between the GRMA and the RMA. (a) The GRMA has p memory modules rather than pmemory modules. (b) The sorting network can sort O(D(T memory rows in row-major order in O(D(T (c) For simplicity, we assume that the GRMA operates in a different pipelining mode than the RMA. Specifically, a group of r memory rows are fed into the network in r consecutive time steps and, after sorting, the r rows are written back to memory in r consecutive time steps. After that, another group of r memory rows is fed into the network, and so on. This process is repeated until the elements in all groups of r memory rows are sorted. The value r is proportional to the depth D(T ) of T . (We note here that by changing the control mechanism, the GRMA can also operate in fully pipelined mode, i.e. the network T can be fed continuously.) We select for T Leighton's optimal sorting network [13] which is known to be AT 2 -optimal. This network, which is a hardware implementation of the well known Columnsort algorithm, has I/O size q log q and depth c log q, where c is a constant greater than 1. Two designs were proposed in [13]: one with a value of c significantly smaller than that of the other. Leighton's sorting network sorts an array of size log q \Theta q log q in row-major order in a pipelined fashion. Specifically, in each of the first log q steps, q log q elements are fed into the network, and after c log q steps, these elements emerge, sorted, at the output of the network in log q consecutive steps. Let q be such that log q . We partition the N memory rows into log q super-rows, each containing log qconsecutive memory rows. That is, the i-th super-row consists of memory rows log q+ 1 through i log q. The operation of the GRMA is partitioned into iterations, with two super-rows being sorted in each iteration. Each iteration consists of two phases: ffl a feeding phase during which two super-rows, contains log q memory rows, are fed continuously into the sorting network, and ffl a clearing phase, in which the elements in the sorting network are "drained" out. Let (a; b) be an ordered pair of super-row numbers. The procedure Merge Two Super-rows(a; b) whose details are given in Figure 9 performs the merge-split operation on the super-rows a and b. We use a layered sorting network S of size log q to obtain a merge schedule MS =! be the list of comparators in layer L i of S. We concatenate these lists to obtain a sequence C of comparators such that C i precedes C i+1 . Let ks C(S), be the sequence of comparators obtained from S. Based on C and the line representation of S, we obtain a merge schedule MS. Guided by MS, the sorting process proceeds in non-overlapping iterations, each consisting of a call to procedure Merge Two Super-rows(a; b) to perform a merge-split operation on two super-rows specified by the in MS. By the compare-exchange/merge-split principle, the GRMA sorts N elements correctly. Since each iteration takes O(log q) time, the task of sorting N elements on the GRMA using this MS procedure Merge Two Super-rows(a; b) begin feeding phase */ to log qdo Read row (a\Gamma1) log q+ i and feed this row to the input of T endfor to log qdo Read row (b\Gamma1) log q and feed this row to the input of T endfor idling */ log q do no-op clearing phase */ to log q do Write the output of T into row (a\Gamma1) log q+ i endfor to log q do Write the output of T into row (b\Gamma1) log q+ i endfor Figure 9: The procedure Merge Two Super-rows. takes C(log qS) time. Using the layered AKS network as S, we obtain a valid MS of length O( N log q log N log q ) that can be used to sort N elements on the GRMA takes O( N log N log q O( N log N log p time. An argument similar to that used in the proof of Theorem 1 shows that every algorithm that sorts N elements on the GRMA requires at log N To summarize our findings, we state the following result. Theorem 4 The Generalized Row-Merge Architecture that uses an AT 2 -optimal network of I/O size p as the parallel sorting device sorts N elements, N - O(p log p), in \Theta( N log N Notice that in the case of the GRMA the computation of a merge schedule does not require an augmented network. The length of the merge schedule is somewhat shorter because of using a network S of smaller I/O size and depth, and without dummy comparators. Again, no extra data memory is required other than what is used for storing the input. 5 Conclusions and Open Problems The main motivation for this work was provided by the observation that, up to now, sorting networks of fixed I/O size p have only been used to sort a set of p elements. Real-life applications, however, require sorting arbitrarily large data sets. Rather surprisingly, the important problem of using a fixed I/O size sorting network in such a context has not been addressed in the literature. Our main contribution is to propose a simple sorting architecture whose main feature is the pipelined use of a sorting network of fixed I/O size p for sorting an arbitrarily large data set of N elements. A noteworthy feature of our design is that it does not require extra data memory space, other than what is used to store the input. As it turns out, the time performance of our design, that we call the Row-Merge Architecture (RMA) is virtually independent of the cost and depth of the underlying sorting network. Specifically, we showed that by using the RMA N elements can be sorted in \Theta( N log N memory access conflicts. In addition, we showed how to use an AT 2 -optimal sorting network of fixed I/O size p to construct a similar architecture, termed Generalized Row-Merge Architecture (GRMA) that sorts N elements in \Theta( N log N At this point, we do not know whether or not a better performance can be achieved by removing the restriction on the rigid memory access scheme of the RMA, by allowing more flexible, yet regular, memory access patterns. In such a case, the time lower bounds for both of the RMA and the GRMA no longer hold. As the results of [6] indicate, N elements cannot be sorted in less N log N log p time using any parallel sorting device of I/O size p. It is an interesting open question to close the gap between this lower bound and the time performance offered by our designs. The best performance of the designs proposed in this paper is proportional to the depth of the AKS network, which is used to construct merge schedules. The constant associated with the depth complexity of the AKS network is too large to be considered practical. However, our results reveal the potential of row-merge based simple sorting architectures. Along this line of thought, a long-standing open problem is to obtain a realistic sorting network of logarithmic depth. It is equally important to discover a network of depth c log m log log m, where m is the network I/O size and c is a small constant. Such networks are useful for deriving practically short merge schedules. --R Sorting in c log n parallel steps Parallel Sorting Algorithms Parallel Computation On bitonic sorting networks Sorting p objects with a k-sorter A taxonomy of parallel sorting A minimum area VLSI network for O(log n) time sorting Optimal sorting algorithms for parallel computers Optimal VLSI circuits for sorting An optimal sorting algorithm on reconfigurable mesh The Art of Computer Programming Tight bounds on the complexity of parallel sorting Sorting in O(1) time on a reconfigurable mesh of size p Parallel permutation and sorting algorithms and a new generalized sorting network Sorting p numbers on p A new deterministic sampling scheme with applications to broadcast efficient sorting on the reconfigurable mesh Sorting N items using a p-sorter in optimal time Current progress on efficient sorting networks Constructing sorting networks from k-sorters Improved sorting networks with O(log N) depth Parallel sorting: A bibliography ACM SIGACT News A bibliography of parallel sorting The VLSI complexity of sorting A parallel sorting scheme whose basic operation sorts n elements --TR --CTR Stephan Olariu , Cristina Pinotti , Si Qing Zheng, An Optimal Hardware-Algorithm for Sorting Using a Fixed-Size Parallel Sorting Device, IEEE Transactions on Computers, v.49 n.12, p.1310-1324, December 2000 Giuseppe Campobello , Marco Russo, A scalable VLSI speed/area tunable sorting network, Journal of Systems Architecture: the EUROMICRO Journal, v.52 n.10, p.589-602, October 2006 Classifying Matrices Separating Rows and Columns, IEEE Transactions on Parallel and Distributed Systems, v.15 n.7, p.654-665, July 2004 Shun-Wen Cheng, Arbitrary long digit integer sorter HW/SW co-design, Proceedings of the conference on Asia South Pacific design automation, January 21-24, 2003, Kitakyushu, Japan
pipelined processing;sorting networks;computer architecture;parallel processing;sorting
305093
Asynchronous Parallel Prefix Computation.
AbstractThe prefix problem is to compute all the products $x_1 \otimes x_2 \otimes \cdots \otimes x_k,$ for 1 kn, where $\otimes$ is an associative binary operation. We start with an asynchronous circuit to solve this problem with O(log n) latency and O(n log n) circuit size, with $O(n)\ \otimes\!\!-{\rm operations}$ in the circuit. Our contributions are: 1) a modification to the circuit that improves its average-case latency from O(log n) to O(log log n) time, and 2) a further modification that allows the circuit to run at full-throughput, i.e., with constant response time. The construction can be used to obtain a asynchronous adder with O(log n) worst-case latency and O(log log n) average-case latency.
Introduction There has been a renewal of interest in the design of asynchronous circuits, motivated by the potential benefits of designing circuits in an asynchronous fashion. Asynchronous circuits exhibit average case behavior and can therefore be optimized in a data-dependent fashion. We present asynchronous solutions to the parallel prefix problem that exploit this advantage of asynchronous circuits over their synchronous counterparts to reduce the average case latency of the prefix computation. Let\Omega be an associative operation. The prefix problem is to compute, given x the results The prefix problem can be used to solve a number of problems efficiently. Ladner and Fisher show how the prefix problem can be used to parallelize the computation of an arbitrary Mealy machine [6]. Leighton discusses a number of different problems that can be solved using prefix computations [7]. As a concrete application, we use the method presented in this paper to construct an asynchronous adder with an average-case latency of O(log log n) steps. A variety of synchronous solutions to the prefix problem are discussed by Leighton, all having a latency of O(log n) steps [7]. Winograd has shown that a lower bound on the worst-case time complexity for binary addition is O(log n), where n is the number of bits in the input [10]. Therefore, O(log n) is a lower bound on the latency of any synchronous adder. Gemmell and Harchol construct circuits for binary addition which add correctly with probability which have a latency of O (log log(n =ffl)) steps. They construct an asynchronous adder that always adds correctly with an average-case latency of O(log n) steps [3]. We begin with an asynchronous solution that is very similar to its synchronous counterpart. We improve the performance of this solution by the introduction of pipelining, and by using two competing methods for solving the prefix problem and picking the answer that arrives earliest to produce the output. All the solutions presented have O(n log n) hardware complexity, and worst-case O(log n) time complexity. Supported by the Advanced Research Projects Agency under the Office of Army Research, and in part by a National Semiconductor Corporation graduate fellowship. We use CHP (communicating hardware processes), a variant of CSP [4], to give a high-level description of our circuits (we use circuits to mean asynchronous circuits in the paper). A brief description of CHP is provided in the appendix. 2. The prefix problem To formulate the prefix problem in terms of an asynchronous CHP program, we assume that the inputs arrive on input channels respectively, and that the outputs y are to be produced on output channels Y respectively. The problem can be restated in terms of reading the values x i from the input channels, computing the y i values, and sending these values on the appropriate output channels. In terms of CHP, the immediate solution that leaps to mind is the following program: \Delta\Omega This program is very inefficient for a number of reasons, the most obvious being that there are O(n 2 operations, which correspond to O(n 2 ) circuit elements. But it will serve as a specification for the problem. For the purposes of this paper, we will assume that the operation\Omega has an identity e. This is merely an aid to clarity-it does not detract from the construction in any way. Assume we had a method for constructing a circuit to compute a 1\Omega a dn=2e. We could use these circuits to compute x \Delta\Omega x n by adding a single process that read in the output of the two stages, and performed a single\Omega operation (since the operation is associative). The process would read in two inputs on channels A and B , and produce the desired output on channel C , and is written as: The value x \Delta\Omega x n can be computed using a tree of these UP processes, as shown in Fig. 1. U R U U subtree prefix right subtree prefix left subtree prefix Fig. 1: Tree of "UP" processes. For any input x k , we need the prefix x \Delta\Omega to compute the output y k . Observe that the input to UP at a particular node in the tree is the prefix of the inputs at the leaves of the left and right subtree of the node. The prefix required by the first (leftmost) node of the right subtree can be computed if the prefix required by the first node of the left subtree is known. Assume that this prefix is obtained on another input channel V . Process UP can now be augmented to send the appropriate subtree prefixes back down the tree. The modified UP process is: Notice that the Ld and Rd channels provide exactly the inputs needed by the V channel of the children of a particular UP process, so this collection of processes indeed solves the prefix problem. All that remains is to provide an input to the root of the prefix computation tree, and to read the inputs and produce the final outputs. The V channel at the root of the tree requires the null prefix, which is the identity e and the output of the root is not used by any other process. We can simplify the root process to: where e is the identity of\Omega . The leaves of the prefix computation tree read the inputs, their prefix (from the tree), and produce the appropriate output. A leaf process is written as: A complete solution for the problem when shown in Fig. 2. Since each node in the tree contains a constant number of\Omega computations, and since there are O(n) nodes in the tree, and each node is of bounded fanin, there are O(n)\Omega -computation circuits in the solution. The tree is of depth O(log n), and therefore the time complexity of this solution is O(log n). Ld Rd Ld Rd R UP ROOT U Fig. 2: Solution to the prefix problem. Observe that the sequencing between U !(x\Omega y) and V ?p is enforced by the environment of the UP process. We can therefore split the process into two parts that execute in parallel. However, the obvious split would cause variable x to be shared between the two processes. We introduce a local channel C which is used to copy the value of x . The new UP process is: These two processes are identical! We therefore can write: Using a similar technique, we can rewrite the LEAF process as: We compile each process in the tree using standard techniques introduced by Martin [9]. We begin by rewriting the processes using handshaking expansions . This transformation eliminates all communication on channels, and replaces them with handshake protocols that implement the synchronization and data communication [8]. For the circuit to be quasi-delay-insensitive, it must function correctly even if the inputs to the circuit do not arrive at the same time. Therefore, each input must be encoded using a delay-insensitive (unordered) code. In such a code, the value of the input changes from a neutral value to a valid value without any intermediate values that are valid or neutral [9]. Different valid values are used to encode different inputs. We use the functions v(\Delta) and n(\Delta) to denote the validity and neutrality of the code. C * is the concurrent assignment of some bits of C such that the result is an appropriate valid value without any intermediate value being valid or neutral, and C + is the concurrent assignment of some bits of C such that the result is a neutral value without any intermediate value being neutral or valid. The exact nature of these operations depends on the encoding scheme and operation\Omega . A prefix computation is initiated by the environment by setting the inputs to some valid value. The environment then waits for the outputs to become valid, after which the inputs are reset to a neutral value. The next input is supplied after the outputs are reset to a neutral value. The handshaking expansions for the processes that comprise the prefix computation are: The handshaking expansions given above can be compiled into a quasi-delay-insensitive asynchronous circuit by the techniques outlined by Martin [9]. The resulting circuits are very similar to those shown in [6], and can be used in synchronous implementations as well. In the programs presented here, we use a binary tree for the prefix computation. The method presented can be easily extended so that the tree is k-ary. 3. Pipelining The solution presented above has the drawback that the tree can only perform one prefix computation at a time. To permit the tree to operate simultaneously on multiple inputs, we can pipeline the prefix computation. Observe that since we must wait for the output to become valid before resetting the input, the protocol we have chosen earlier cannot be pipelined. To circumvent this problem, we introduce an additional acknowledge signal for each input and each output. The environment is now permitted to reset the inputs after receiving an acknowledge from the circuit, and can send the next input after the acknowledge signal has been reset. small modification, the handshaking expansion for each stage can be written as: The signals which end in "a" are the acknowledge signals for the various channels. Down-going phase Up-going phase Fig. 3: Pipelined prefix computation. Consider a single UP node in the prefix computation tree. There are no pipeline stages between the two halves of process UP . However, the down-going phase of the computation cannot begin until a value is received on channel V . This value is computed by a circuit which has pipeline stages proportional to the depth of the node in the tree. Therefore, even though there are O(log n) pipeline stages, we cannot have O(log n) computations being performed by the tree. To permit this, we must introduce buffering on the channel connecting the two halves of UP (and LEAF ). This buffering is proportional to the depth of the node in the tree. Logically, it is simpler to visualize the computation by "unfolding" the tree into two parts-the up-going phase, and down-going phase-as shown in Fig. 3. (The vertical arrows are the internal channels C .) It is clear that one must add stages of buffering on the internal channel C (shown as vertical arrows in Fig. 3) for a node that is d steps away from the root for the circuit to be pipelined in a manner that permits 2 log prefix operations to be performed. Fig. 4 shows the tree after the appropriate buffers have been introduced. The throughput (the number of operations that can be performed per second) of the pipelined prefix computation with buffers does not depend on the number of inputs, but on the time it takes to perform the\Omega operation. The latency (the time for the output to be produced when the pipeline is empty) of the computation block is proportional to the number of stages, and is therefore 2 log both with and without the buffers. This circuit has O(n log n) components with bounded fan-in and fan-out, and O(n) circuits that perform a\Omega -computation. Down-going phase Up-going phase Fig. 4: Pipelined prefix computation with buffers. 4. Improving the average case latency A pipelined prefix computation with buffers is useful when the the prefix computation is repeatedly performed. However, if the prefix computation is not used very often, then adding buffers to the computation tree does not improve the performance of the prefix computation. However, we may still be interested in minimizing the latency through the prefix computation tree. We begin by considering a simple solution to the prefix computation problem. The simplest way to perform the prefix computation is in a bit-serial fashion. However, since we have different input channels, we will use n processes, one for each input channel. The stages are connected linearly as shown in Fig. 5. R Fig. 5: Serial prefix computation. The stage for x k receives y k \Gamma1 on channel L from the previous stage and x k on channel X k and produces y k on channel Y k as well as channel R which connects it to the next stage. The CHP for an intermediate stage of such a solution is given by: However, we know that the input on channel X arrives much sooner than the input on channel L. Given this information, is it possible to produce the outputs on Y and R before receiving the input on L? Suppose we know more about the prefix computation operator\Omega . In particular, suppose that for all values of x . Now, if the input on channel X is equal to a, then we can produce the output on Y and R before reading the value on L! We can rewrite the SERIAL process as follows: The time taken for this solution to produce the output is data-dependent . In the best case, the time from receiving the inputs to producing the output is constant-much better than the prefix computation tree-, and in the worst case, the time taken is O(n)-much worse than the prefix computation tree which only takes O(log n) time. The solution we adopt is to combine both the prefix computation tree and the serial computation into a single computation. The two computations compete against one another, and we can pick the solution that arrives first. This technique has a worst-case latency of O(log n), but a best-case latency of O(1)! We modify the LEAF processes to include the serial computation in them. The original LEAF process used by the prefix computation tree is: To add the serial computation phase, we add channels L and R to this process. Note that the value received along channel V is the same as the value received along channel L. We can combine these two channels externally using a merge process as follows: Using this process, the new LEAF process is: Finally, we modify MERGE so that it picks the first input to produce the output. The compilation of SERIAL depends on the structure of\Omega . The compilation of the procedure that picks the first input is given below: (This circuit has an efficient implementation because we know that the value being received on both L and V will be the same.) Finally, using a similar transformation, we can replace process UP in the prefix computation tree by one that also has a ripple-carry prefix computation. The resulting computation has this ripple-carry stage at every level in the prefix computation tree. The prefix computation given above cannot run at full throughput, because there is O(1) buffering between stages in the serial part of the computation. To improve the throughput of the prefix computation, we can once again introduce (2d \Gamma 1) buffers between each stage of the prefix computation at depth d in the tree. These buffers can be implemented using a folded fifo, which has O(1) latency. 5. Analysis of the average case The latency of the prefix computation is data-dependent. We therefore need some information about the input distribution to determine the average-case latency. Consider process SERIAL shown below that is part of the prefix computation. When x 6= a, the output on Y and R depends on the input c. We call this the propagate case, since the output of the process depends on the input c. Let the probability of a particular input being a be p, and let this distribution be independent across all the n inputs. Let L(n) be the latency through a prefix computation with n inputs. We assume that the prefix computation uses a k-ary tree for the purpose of this analysis. We can write: ms where m is the length of the longest sequence of "propagate" inputs, s is the delay through a single stage of the serial "propagate" chain at the leaves of the tree, and h is the additional delay introduced by adding one level to the tree (i.e., h is the delay of going upward and downward through one stage of the tree). The first part of the formula comes from the rippling computation, and the latter from the tree computation. To expand L( n observe that at the next stage in the tree, m will be replaced by m=k . This is because the inputs to the next stage of the tree are constructed by grouping the inputs into blocks of size k ; as a result, propagate sequences now occur between blocks of size k , and the longest such sequence will have length m=k . Applying this expansion recursively, we obtain: ms In particular, choosing log The average latency is bounded above by: log k hlog mi To compute the expected value of log m, observe that: The reason is that the expected value of the logarithm of a random variable is the log of the geometric mean of the variable. Since the arithmetic mean is always at least the geometric mean and log is increasing (m is always non-negative), the above inequality follows. We can bound hL(n)i if we can determine hmi. When we know that hmi - log 2 n (cf. [1]). A simple extension of the proof shows that ne proof is given in the appendix). Therefore, the average latency through the prefix computation is bounded above by: log k log dlog 1=(1\Gammap) ne O(log log n) which establishes that the average-case latency of the prefix computation is O(log log n). When the prefix computation operates at full-throughput, the value of s given above is a function of n. Since we add 2d \Gamma 1 stages of buffering at depth d in the tree for the serial computation part as well (which can be implemented using a cache buffer or a folded fifo), the value of s is bounded above by a function that is O(1). Therefore, the full-throughput modification does not increase the order of the average-case latency. 6. Application to binary addition The prefix computation can be used to construct a binary kpg-adder [6]. To perform binary addition at bit position k , the carry-in for that bit-position must be known. The carry-in computation can be formulated as a prefix computation as follows. Suppose bit k of the two inputs are both zero. Then no matter what the carry-in is, the carry-out of the stage is zero-a kill (k). Similarly, if the two inputs are both one, the carry-out is always one-a generate (g). Otherwise, the stage propagates (p) the carry-in. To determine the carry-out of two adjacent stages, one can use the operation. The vertical column represents the kpg code for the least significant bit. Table 1. Prefix operator for addition. Observe that the kpg code has the desirable property outlined in the preceding section, namely that for all values of x . Therefore, we can use the techniques of the previous section to reduce the latency of binary addition. From the previous section, we observe that the average latency through such an adder is O(log log n). A 32-bit pipelined adder based on Section 3 (PA1-32) and 32-bit and 64-bit pipelined adders with O(log log n) average-case latency from Section 4 (PA2-32 and PA2-64) were simulated for various input values using a gate-level simulator as well as HSPICE. We consider a gate to be any circuit that can be directly implemented in CMOS (such as a NAND, NOR, or C-element), with fan-in and fan-out restrictions that ensure that a gate delay is between 0.1ns and 0.2ns in HP's 0.6-m CMOS technology. We used the branching factor in the prefix computation tree, except where it would violate our gate delay restriction used in that case). The quasi-delay-insensitive asynchronous circuits obtained as a result of compilation from handshaking expansions correspond closely to precharged quasi-static domino logic. Kinniment compares the latencies of 32-bit ripple-carry asynchronous adders (ASY-32) to synchronous ripple-carry adders (SPA-32) and 32-bit synchronous carry select adders (CSA-32) [5]. To be able to compare our results to those reported in [5], we normalized our gate delays so that one gate delay is the delay through a two-input NAND gate (which is the assumption made in [5]). We extrapolated the delay for a 64-bit synchronous carry select adder (CSA-64) using the expression for delay given in his paper. Two input distributions for random numbers were used: (a) A uniform distribution; (b) A distribution that corresponds to more realistic workloads for 32-bit adders [2]. The results of our simulation are shown in Table 2. The table includes the best delays for various adder implementations described in [5] as well. The throughput for the circuits PA1-32, PA2-32, and PA2-64 was one transfer every 16.3 gate delays. Adder type Worst Delay Average Delay (a) Average Delay (b) (gates) (gates) (gates) CSA-32 11.3 ASY-32 40.1 17.2 19.2 PA2-32 14.2 10.4 11.2 Table 2. Delay through asynchronous and synchronous adders. (a) uniform; (b) workload The difference in average-case and worst-case delay for PA1-32 is due to variations in the number of series transistors that switch in the logic. In terms of delay, CSA-32 is better than the simple prefix computation adder PA1-32. However, PA2-32 performs better than both PA1-32 and CSA-32 for random inputs as well as under more realistic workloads. PA2-64 performs significantly better than CSA-64 on random inputs. However, the PA2 adders have a slightly higher worst-case delay compared to PA1 adders because of increased fan-out of internal signals. We expect the difference between PA2-n and CSA-n adders to increase as n increases. However, the performance of CSA-n for small n suggests that a better asynchronous adder could be constructed using a combination of carry select and prefix computation techniques. Both PA1-32 and PA2-32 have larger area than CSA-32 due to pipelining overhead, and overhead introduced by circuitry that generates the acknowledge signals. 7. A variant of the prefix problem The prefix computation can be used to determine the location of a leading one in a binary string. Such an operation is useful for both binary multiplication and division-pre-shifting the input reduces the number of stages required to compute the desired product or quotient. Given an n-bit input, the prefix computation produces n-bits of output. Each bit of the input will know whether or not it is the position of the leading one. After the prefix computation, the number is required to be shifted by 0 to n bit positions to move the leading one to a fixed bit position. However, the input to a typical variable length shifter is encoded in binary, and not in the form produced by the prefix computation. Observe that the sequence of decisions made by the nodes along the path taken by the leading one in the down-going phase of the prefix computation is the binary encoding of the bit-position of the leading one, assuming the prefix computation tree is balanced. (If the number of inputs is not a power of 2, then the tree can be balanced using dummy processes.) Therefore, if we augment the nodes in the tree to produce this bit, then we have produced the appropriate input for the shifter as part of the prefix computation itself. This is done by introducing a bus at each level of the down-going phase of the prefix computation tree. In addition, note that the output of the buses are produced one after another, most significant bit first. Therefore, if we are using a pipelined logarithmic shifter, the shifting can be completely overlapped with the down-going phase of the prefix computation. 8. Conclusions This paper presented a number of asynchronous solutions to the prefix problem. The first solution had O(log n) latency, and O( 1 log n ) throughput using a circuit of size O(n). The pipelined prefix solution had O(log n) latency and O(1) throughput. The circuit size was increased to O(n log n), although it still contained O(n)\Omega -computation blocks. The latency of the prefix computation block was improved by using two competing prefix computations and picking the result that arrived first. The circuits had O( 1 log n ) throughput and O(n) circuit size. The circuits had a data-dependent latency with a worst-case latency of O(log n) and a best-case latency of O(1). Under very general assumptions, the average-case latency of the prefix computation was shown to be O(log log n). Appendix A1. Notation The notation we use is based on Hoare's CSP [4]. A full description of the notation and its semantics can be found in [8]. What follows is a short and informal description of the notation we use. ffl Assignment: a := b. This statement means "assign the value of b to a." We also write a" for a := true, and a# for a := false. are boolean expressions (guards) and Si's are program parts. The execution of this command corresponds to waiting until one of the guards is true, and then executing one of the statements with a true guard. The notation [G] is short-hand for [G ! skip], and denotes waiting for the predicate G to become true. If the guards are not mutually exclusive, we use the vertical bar "-" instead of "[]." Sn]. The execution of this command corresponds to choosing one of the true guards and executing the corresponding statement, repeating this until all guards evaluate to false. The notation *[S] is short-hand for *[true ! S]. means send the value of e over channel X . Receive: Y ?v means receive a value over channel Y and store it in variable v . ffl Probe: The boolean expression X is true iff a communication over channel X can complete without suspending. ffl Sequential Composition: ffl Parallel Composition: S k T or S ; T . A2. Average case analysis Given an n-input prefix computation, let c n be the length of the longest sequence of propagate inputs. We would like to determine the expected value of c n , assuming that the n inputs are independent, identically distributed random variables and that the probability of an input being of propagate type is We use a simple generalization of the reasoning presented by Burks et al. [1]. Clearly, the expected value of c n is given by: where Pr[c n - k ] is the probability that the length of the longest sequence of propagate inputs is at least k . The probability Pr[c consists of two parts: (a) the probability that the first (n \Gamma 1) inputs have a sequence of propagate inputs at least k ; (b) the probability that the first have such a sequence but adding the nth input produces a sequence of length k . We can therefore write: The second term (which corresponds to part b) is obtained by observing that of the n inputs, the last k inputs are of type propagate, and the input at position n \Gamma k is not of type propagate. We also need to take into account the fact that the first positions do not have a propagate sequence of length at least k . Repeatedly expanding the first term, we obtain: To complete the proof, we note that Pr[c n - k ] - 1. We split the range of the summation ( ) into two parts. Pick K such that nq K - 1, i.e., pick ne. We obtain: ne --R Preliminary discussion of the logical design of an electronic computing instrument. A CMOS VLSI implementation of an asynchronous ALU. Tight Bounds on Expected Time to Add Correctly and Add Mostly Correctly. Communicating Sequential Processes. Parallel Prefix Computation. Introduction to Parallel Algorithms and Architectures: Arrays Compiling Communicating Processes into Delay-insensitive VLSI circuits Asynchronous datapaths and the design of an asynchronous adder. On the Time Required to Perform Addition. --TR --CTR Yen-Chun Lin , Yao-Hsien Hsu , Chun-Keng Liu, Constructing H4, a Fast Depth-Size Optimal Parallel Prefix Circuit, The Journal of Supercomputing, v.24 n.3, p.279-304, March Yen-Chun Lin , Jian-Nan Chen, Z4: a new depth-size optimal parallel prefix circuit with small depth, Neural, Parallel & Scientific Computations, v.11 n.3, p.221-236, September Yen-Chun Lin , Jun-Wei Hsiao, A new approach to constructing optimal parallel prefix circuits with small depth, Journal of Parallel and Distributed Computing, v.64 n.1, p.97-107, January 2004 Yen-Chun Lin , Chin-Yu Su, Faster optimal parallel prefix circuits: new algorithmic construction, Journal of Parallel and Distributed Computing, v.65 n.12, p.1585-1595, December 2005
binary addition;asynchronous circuits;prefix computation;average-case latency
305097
Interactive Orthogonal Graph Drawing.
AbstractMany applications require human interaction during the design process. The user is given the ability to alter the graph as the design progresses. Interactive Graph Drawing allows the user to dynamically interact with the drawing of a graph. In this paper, we discuss features that are essential for an interactive orthogonal graph drawing system. We also describe some possible interactive drawing scenarios, present results on two of them, and compare their performance.
Introduction Graphs have been extensively used to represent various important concepts or objects. Examples include parallel computer architectures, networks, state graphs, entity-relationship diagrams, subroutine call graphs, automata, data-flow graphs, Petri nets, VLSI circuits, etc. In all of these cases, we require that the graph be represented (or drawn) in the plane so that we can understand and study its structure and properties. It is for this reason that, typically, the drawing of a graph is accompanied by optimizing some cost function such as area, number of bends, number of edge crossings, uniformity in the placement of vertices, minimum angle, etc. For a survey of graph drawing algorithms and other related results see the annotated bibliography of Di Battista, Eades, Tamassia and Tollis [4]. An orthogonal drawing is a drawing in which vertices are represented by points of integer coordinates and edges are represented by polygonal chains consisting of horizontal and vertical line segments. In this paper we focus our attention on interactive orthogonal graph drawing. In [19] and [21] it is shown that every biconnected planar graph of maximum degree four can be drawn in the grid with 2n bends. If the graph is not biconnected then the total number of bends rises to 2:4n + 2. In all cases, no more than four bends per edge are required. The algorithms of [21] take linear time and produce drawings, such that at most one edge may have four bends. Kant [9] shows that if the graph is triconnected of maximum degree four, then it can be drawn on an n \Theta n grid with at most three bends per edge. The total number of bends is no more than b 3nc + 3. For planar graphs of maximum degree three it is shown in the same paper that a gridsize of d n 2 e is sufficient and no more than are required. In this case, no edge bends more than twice. Even and Granot [6] present an algorithm for obtaining an orthogonal drawing of a 4-planar graph with at most three bends per edge. If the embedding of a planar graph is fixed, then an orthogonal drawing with the minimum number of bends can be computed in O(n 2 log n) time [20]. If the planar embedding is not given, the problem is polynomially solvable for 3-planar graphs [5], and NP-hard for 4-planar graphs [8]. There is a lower bound of 2n bends for biconnected planar graphs [22]. Upper and lower bounds have been proved in the case when the orthogonal drawing of the graph is not necessarily planar. Leighton [10] presented an infinite family of planar graphs which require area\Omega\Gamma n log n). Independently, Leiserson [11] and Valiant [23] showed that every planar graph of degree three or four has an orthogonal drawing with area O(n log 2 n). Valiant [23] showed that the orthogonal drawing of a general (nonplanar) graph of degree three or four requires area no more than 9n 2 , and described families of graphs that require presented an algorithm which constructs orthogonal drawings of graphs with at most two bends per edge. The area required is 2n \Theta 2n. A better algorithm is presented in [1] and [2], which draws the graph within an n \Theta n grid with no more than two bends per edge. This algorithm introduces at most 2n bends. Recently, we presented an algorithm that produces an orthogonal drawing of a graph of maximum degree four that requires area at most 0:76n 2 [15]. This algorithm introduces at most while the number of bends that appear on each edge is no more than two. If the maximum degree is three, then we have another algorithm which produces an orthogonal drawing that needs area at most 1n 2 and b n bends [15, 16]. In this drawing, no more than one bend appears on each edge except for one edge, which may have at most two bends. In all of the above, the drawing algorithm is given a graph as an input and it produces a drawing of this graph. If an insertion (or deletion) is performed on the graph, then we have a "new" graph. Running the drawing algorithm again will result in a new drawing, which might be vastly different from the previous one. This is an inefficient use of time and resources from two points of view: (a) the time to run the algorithm on the new graph, and (b) the user may have spent a significant amount of time in order to understand and analyze the previous drawing. We investigate techniques that run efficiently and introduce minimal changes to the drawing. The first systematic approach to dynamic graph drawing appeared in [3]. There the target was to perform queries and updates on an implicit representation of the drawing. The algorithms presented were for straight line, polyline and visibility representations of trees, series-parallel graphs, and planar graphs. Most updates of the data structures required O(log n) time. The algorithms maintained the planarity of the drawing. The insertion of a single edge however, might cause a planar graph to drastically change embedding, or even to become non planar. An incremental approach to orthogonal graph drawing was presented in [13], where the focus was on routing edges efficiently without disturbing existing nodes or edges. Layout adjustment methods were proposed in [14] for rearranging a diagram to avoid overlapping nodes, and for changing the focus of interest of the user in a diagram. The layout adjustment methods of [14] have the property that they preserve the user's ``mental map'', that is the way that the user "visualizes" and "understands" the drawing. In this paper we investigate issues in interactive graph drawing. We introduce four scenaria for interactive graph drawing, and we analyze two of them. These scenaria are based on the assumption that the underlying drawing is orthogonal and the maximum degree of any vertex is four at the end of an update operation. We show that in one scenario (Relative-Coordinates), the general shape of the current drawing remains unchanged after an update is performed. The coordinates of some vertices and bends of the current drawing may shift by a total amount of at most 6 units along the x and y axes. Linear programming is employed to prove upper bounds on the area and the number of bends for this scenario. More specifically, an interactive graph drawing system under the Relative-Coordinates scenario builds a drawing that has no more than bends when the graph is connected at all times, and no more than 4n(t) bends otherwise. The area of the drawing is never larger than 2:25n(t) 2 when the graph is connected at all times, and no larger than 3n(t) 2 otherwise. Note that n(t) is the number of vertices that have been inserted to an initially empty graph up to time t. No edge has more than 3 bends at any time during the drawing process. Results regarding the performance of this scenario when the very first update operation applies to a non-empty graph are also presented. In another scenario (No-Change), we discuss an interactive graph drawing technique for building an orthogonal drawing of a graph from scratch, so that any update operation inserts a new vertex and routes new edges in the drawing without disturbing the current drawing. Analyzing the performance of the No-Change scenario reveals that the area of the drawing at any time t is no more than 1:77n(t) 2 when the graph is connected at all times, and no more than 4n(t) 2 otherwise. Note that n(t) is the total number of vertices at time t. Apart from the area, this scenario has good behavior in terms of the total number of bends as well, which are no more than 2:66n(t) when the graph is connected at all times, and no more than 4n(t) otherwise. At most 3 bends may appear on any edge of the drawing, any time. In Section 2 we give an example of some features that an interactive drawing system should have. In Sections 3 and 4 we analyze two interactive graph drawing scenaria (i.e., Relative- Coordinates and No-Change), and present our results on their performance. In Section 5 we compare these two scenaria in terms of their performance, and discuss some extensions. Finally, Section 6 presents conclusions and open problems. Interactive Scenaria Software which supports interactive graph drawing features should be able to: (a) create a drawing of the given graph under some layout standard (e.g., orthogonal, straight line, etc.), and (b) give the user the ability to interact with the drawing in the following ways: ffl insert an edge between two specified vertices, ffl insert a vertex along with its incident edges, ffl delete edges, vertices or blocks of vertices, ffl move a vertex around the drawing, ffl move a block of vertices and edges around the drawing. The drawing of the graph that we have at hand at some time moment t is called current drawing, and the graph is called current graph. The drawing resulting after the user request is satisfied is called new drawing. There are various factors which affect the decisions that an interactive drawing system takes at each moment a user request is posted and before the next drawing is displayed. Some of these factors are the following: ffl The amount of control the user has upon the position of a newly inserted vertex. ffl The amount of control the user has on how a new edge will be routed in the current drawing connecting two vertices of the current graph. ffl How different the new drawing is, when compared with the current drawing. Keeping these factors in mind, we propose four different scenaria for interactive graph drawing, in this section. They are the following: 1. The Full-Control scenario. The user has full control over the position of a new vertex in the current drawing. The control can range from specifying lower and upper bounds on the x and y coordinates that the new vertex will have, up to providing the exact desired coordinates to the system. The edges can be routed by the user or by the system. 2. The Draw-From-Scratch scenario which is based on a very simple idea: every time a user request is posted, the new graph is drawn using one of the popular drawing techniques. Apart from the fact that this scenario gives rather slow interactive drawing systems, the new drawing might be completely different compared to the current one. 3. The Relative-Coordinates scenario. The general shape of the current drawing remains the same. The coordinates of some vertices and/or edges may change by a small constant because of the insertion of a new vertex and its incident edges (somewhere in the middle of the current drawing), and the insertion of a constant number of rows and columns. 4. The No-Change scenario. In this approach, the coordinates of the already placed vertices, bends and edges do not change at all. In order to achieve such a property, we need to maintain some invariants after each insertion. There is a close connection between the Full-Control scenario and global routing in VLSI lay-out [12]. The reason is that this approach deals with (re)location of vertices and (re)routing of edges using the free space in the current drawing. The technique presented in [13] computes routes for new edges inserted in the graph, and it does so without disturbing any of the existing vertices and edges. The Draw-From-Scratch scenario is not interesting since every time an update is requested by the user, the drawing system ignores all the work that it did up to that point. The major disadvantage here is that the user has to "relearn" the drawing. In the rest of the paper, we discuss the other two scenaria when they are used by interactive systems to produce orthogonal drawings of graphs. In these drawings, we assume that the maximum degree of any vertex at any time is less than or equal to four. We also present our results regarding the area and the number of bends that drawings under these two scenaria require, and compare their performance. 3 The Relative-Coordinates Scenario In this scenario, every time a new vertex is about to be inserted into the current drawing, the system makes a decision about the coordinates of the vertex and the routing of its incident edges. New rows and columns may be inserted anywhere in the current drawing in order for this routing to be feasible. The coordinates of the new vertex (say v) as well as the locations of the new rows and/or columns will depend on the following: ffl v's degree (at the time of insertion). ffl for each vertex u that is adjacent to v, which directions (i.e., up, down, right, or left) around placed vertex u new edges can be inserted. ffl Whether or not the required routing of edges can be done utilizing segments of existing rows or columns that are free (not covered by an edge). ffl Our optimization criteria. When we use the Relative-Coordinates scenario in an interactive system, we can start from an existing drawing of a graph, or we can start from scratch, that is from an empty graph. In either case, we assume that the insertion of any vertex/edge under this scenario will not increase the number of connected components of the current graph. The only exception to this is when a single vertex is inserted to an empty current graph. Any other vertex inserted during an update operation will be connected to at least one vertex of the current drawing. Let us assume that v is the next vertex to be inserted in the current graph during an update operation. The number of vertices in the current graph that v is connected to, is called the local degree of v, and is denoted by local degree(v). From the discussion above it follows that we only consider the case where an inserted vertex has local degree one, two, three or four, except for the first vertex inserted in an empty graph. If the user wishes to insert a new vertex that has local degree zero, then this vertex is placed in a temporary location and it will be inserted automatically in the future, when some newer vertices increase its (local) degree. Assume that vertex v is about to be inserted in the current graph. For each one of the vertices of the current drawing that is adjacent to v, the system checks the possible directions around these vertices that new edges may be inserted or routed. The target is to minimize the number of new rows or columns that have to open up in the current drawing, as well as the number of bends that appear along the routed edges. There are many different cases because there are many possible combinations. First, we will give examples of some of the best and worst cases one might encounter, and then, we will see in more detail how v is inserted when its local degree is one, two, three or four. In the example shown in Fig. 1a vertices u 1 and u 2 have a free edge (i.e., grid edge not covered by a graph edge) up and to the right respectively. In this case no new rows/columns are needed for the insertion of vertex v and no new bends are introduced. On the other hand however, in the example shown in Fig. 1b all four vertices edges. The insertion of new vertex v requires the insertion of three new rows and three new columns in the current drawing. Additionally, eight bends are introduced. Vertices u 1 , u 2 , u 3 and u 4 have general positions in Fig. 1b, and we can see that edge (v; u 4 ) has four bends. We can avoid the 4-bend edge, if we insert vertex v in the way shown in Fig. 1c. The total number of new rows, columns and bends is still the same, but the maximum number of bends per edge is now three. For a more even distribution of the bends of the edges adjacent to vertex v, we may choose to insert it in the way shown in Fig. 1d, where every edge has exactly two bends (three new rows and three new columns are still required). Notice, though, that the approach described in Fig. 1d for inserting vertex v, is not always possible (e.g., we cannot have this kind of insertion if vertices are in the same row or column). Let v be the next vertex to be inserted. There are many cases, if one is interested in an exhaustive analysis. However, it is relatively easy to come up with all the cases for each insertion. Here, we distinguish the following main cases for vertex v: 1. v has local degree one. If u is the vertex of the current drawing that is adjacent to v, we draw an edge between u and v. Edge (u; v) uses a direction (up, right, bottom, or left) that is not taken by some other edge incident to u. This is depicted in Fig. 2a, and this insertion requires at most either a new row or a new column. No new bend is inserted. 2. v has local degree two. In the best case, the insertion requires no new rows, columns or bends as shown in Fig. 1a. In the worst case, though, two new rows and one new (a) (b) (c) (d) Figure 1: Insertion of v: (a) no new row or column is required, (b),(c) and (d) three new rows and three new columns are required, with a maximum of four bends per edge in (b), three bends per edge in (c), and two bends per edge in (d). column, or one new row and two new columns (see Fig. 2b), and three new bends might be required. 3. v has local degree three. In the worst case, the insertion requires a total of four new rows and columns, and five new bends. In Fig. 2c we show an example of such an insertion that requires one new row, three new columns and five new bends. 4. v has local degree four. The worst case requires a total of six new rows and columns; however, at most four of them can be either rows or columns. Also, eight new bends may be introduced, in the worst case. We have already discussed an example, which is depicted in Fig. 1c. In Fig. 2d we show another case, where two new rows, four new columns and eight new bends are introduced. (b) (a) (c) (d) Figure 2: Inserting v when its local degree is (a) one, (b) two, (c) three, and (d) four. As discussed in the previous section, single edge insertions can be handled using techniques from global routing [12] or the technique of [13]. The easiest way to handle deletions is to delete vertices/edges from the data structures without changing the coordinates of the rest of the drawing. Occasionaly, or on demand, the system can perform a linear-time compaction similar to the one described in [21], and refresh the screen. Proposition 3.1 Asssume that n vertices are inserted to a given non-empty orthogonal drawing of a graph whose height is h and width is w, following the interactive graph drawing scheme for the "Relative-Coordinates scenario". This insertion may add up to 8n new bends and result in a new drawing whose area is at most ( h+w+ 3n) 2 . Proof. Assume that all n inserted vertices have local degree four, and each one of them falls into one of the worst cases described above, in terms of rows, columns and bends introduced. This means that each insertion introduces eight new bends and a total of six new rows and columns. Let h final and w final be the height and the width, respectively, of the graph after the n vertex insertions are completed. We have that: h final 6n. The area of the final drawing h final \Theta w final is maximized when h 3n. Hence the result follows. 2 In the rest of this section we assume that, when we use the interactive graph drawing scheme under the Relative-Coordinates scenario, we start from scratch, that is the given graph is empty. According to the discussion in the beginning of this section, the Relative- Coordinates scenario guarantees that the graph that is being built is always connected after any vertex insertion. Let n 1 denote the number of vertices of local degree one, two, three and four, respectively, that have been inserted up to time t. Theorem 3.1 An interactive graph drawing system under the "Relative-Coordinates sce- nario" produces an orthogonal drawing of a connected graph, which has the following properties at any time t: 1. after each vertex insertion, the coordinates of any vertex or bend of the current drawing may shift by a total amount of at most 6 units along the x and y axes, 2. there are at most 3 bends along any edge of the drawing, 3. the total number of bends is at most 3n(t) \Gamma 1, and 4. the area of the drawing is at most 2:25n(t) 2 , where n(t) is the number of vertices that have been inserted up to time t. Proof. The first property follows from the definition of the Relative-Coordinates scenario and from the fact that at most six new rows and columns might open anywhere in the current drawing (see Figs. 1b, 1c, 1d, 2d) as a result of a vertex insertion. Figures 1 and 2 cover the worst cases in terms of rows, columns and bends required for a single vertex insertion, and for all possible local degrees of the inserted vertex. From these figures we observe the following: First there can be at most three bends along any edge of the drawing (see Fig. 1c). Second, the bends along an edge are introduced at the time of insertion of the vertex that is incident to that edge. From Figs. 1 and 2 and from the discussion above, it follows that at most 3 new bends are introduced when a vertex of local degree two is inserted, at most 5 new bends when a vertex of local degree three is inserted, and at most 8 new bends when a vertex of local degree four is inserted. No new bend is introduced when a vertex of local degree one is inserted. In other words, if B(t) is the total number of bends at time t, it holds that: We want to compute the maximum value that B(t) can take, in order to establish an upper bound on the number of bends of the drawing at time t. This is equivalent to solving the following linear program: maximize: under the following constraints: The first constraint is an equation on the vertices, and the second constraint is an inequality on the edges of the graph, after n vertices have been inserted. Recall that the first vertex to be inserted has local degree 0, since it does not have any edges yet. Solving this linear program reveals that the maximum value of the above expression is happens when 1. What this solution means is that maximizing the number of bends depends solely on the number of vertices of local degree two and four, following the insertion of the first two vertices. If we take into account the fact that the first two vertices inserted in an empty graph have local degrees 0 and 1 respectively, what we really have is that 1. We can also see that any other combination of values for n 2 and n 4 when n 2 +n edges (recall that one edge is introduced by the second vertex, which has local degree 1). From the above analysis, it follows that the upper bound on the number of bends is 3n \Gamma 1. Regarding the area of the drawing at time t, we can infer from Figs. 1 and 2 that: ffl when a vertex with local degree one is inserted, either a new row or a new column is required, ffl when a vertex with local degree two is inserted, either two new rows and one new column are required, or one new row and two new columns are required, ffl when a vertex with local degree three is inserted, we need a total of at most four new rows and columns, and ffl when a vertex with local degree four is inserted, we need a total of at most six new rows and columns. Let h(t) and w(t) denote the height and the width, respectively, of the drawing at time t. Then it holds that: since We want to maximize h(t) +w(t). If we just multiply both sides of the last inequality (i.e., the one on the edges of the graph) by 3, we can show that: h(t)+w(t) - 3n(t). However, this solution does not give us the values of the variables (i.e., n 1 (t), n 2 (t), etc), for which this upper bound is achieved. For this reason, we formulate this problem as a linear program, where the expression to be maximized is: and the constraints are exactly the same as the ones in the above linear program. Solving this new linear program, we have that h(t) +w(t) is maximized when exactly as in the linear program we studied above, for the number of bends. According to the analysis we did for that linear program, these results really mean that n second vertex to be inserted), 1. The maximum value of expression 2n that we wanted to maximize is now 3n. This means that h(t) It also holds that h(t) \Theta w(t) is maximized when 1:5n(t). In this case, the area of the drawing can be at most Let us have a look at the expression giving the number of bends that we maximized in the linear program of the proof of Theorem 3.1. One might be tempted to believe that this expression is maximized when n 4 (t) is maximized (and this happens when n 4 n(t)as we will see in Lemma 4.1 of the next section). The result of the linear program was quite revealing. We discovered that this expression is maximized only under the following insertion sequence: insert the first two vertices with local degrees zero and one respectively, followed by vertices of local degree two, and conclude with the insertion of exactly one vertex of local degree four. In Fig. 3 we show an orthogonal drawing of a graph drawn under the Relative-Coordinates scenario we just described. This graph is regular of degree four, has 13 vertices and is shown in Fig. 10a, together with an st-numbering for it. We insert the vertices following the st-numbering, starting with an empty drawing. The final drawing has both height and width equal to 9, and 20 bends. Notice that no edge has more than three bends; in fact, there is only one edge with three bends (i.e., edge (12; 13)), whereas all the other edges have two bends or less. The scenario that is described in this section maintains the general shape of the current drawing after an update (vertex/edge insertion/deletion) takes place. The coordinates of vertices and bends of the current drawing may shift by a total amount of at most 6 units along the x and y axes, as a result of an update operation. This change does not affect the number of bends of the current drawing even if the update operation is a vertex insertion. This scenario works well when we build a graph from scratch, or we are presented with a drawing (which was produced somehow, perhaps by a different system) and we want our interactive system to update it. In order to refresh the drawing after each update, the coordinates of every vertex/bend affected must be recalculated. Hence, it would take linear Figure 3: An orthogonal drawing of a regular, degree four, 13-vertex graph, under the Relative-Coordinates scenario. 4 The No-Change Scenario In this scenario, the drawing system never changes the positions of vertices and bends of the current drawing. It just increments the drawing by adding the new elements. This is useful in many cases where the user has already spent a lot of time studying a particular drawing and he/she does not want to have to deal with something completely different after each update. Papakostas and Tollis [17] defined this scenario and presented some preliminary results on it. No other work is known that gives satisfactory answers to the above described scenario. In this section we present a simple yet effective scheme for allowing the insertion of vertices, under the No-Change scenario. As in the previous scenario, our scheme produces an orthogonal drawing under the assumption that the maximum degree of any vertex at any time is less than or equal to four. In the description of our interactive graph drawing scheme, we assume that we build a graph from scratch. If a whole subgraph needs to be drawn initially, we can draw it by simulating the above scenario, inserting one vertex at a time. We assume that the graph is always connected. In the following section, we present an extension of the No-Change scenario, allowing the current graph to have more than one connected component at any time. Let u be a vertex of the current drawing, and let v be the next vertex to be inserted. There are four possible ways that vertex u can be connected to vertex v, so that there is an edge (u; v) in the new drawing (see Fig. 4a). Each one of these ways is a free direction of vertex u. Vertex u may have up to two free directions to the right (through edges e 1 and e 2 of Fig. 4a), and up to two free directions to the bottom (through edges e 3 and e 4 of Fig. 4a). Vertex u has a free direction to the right if and only if there is no edge of the current graph using the portion of u's row to the right of u and the portion of u's column to the top of u. Similarly, we can define u's free direction to the bottom. Vertex u's free direction to the right (bottom) through edge e 2 (e 3 ) is called bend-free (see Fig. 4a). When vertex v is inserted, it is connected to some vertices that have already been placed. The local degree of a vertex that is about to be inserted to the current drawing is defined in the same way as in the scenario studied in the previous section. Since the graph is always connected, we only consider the case where an inserted vertex has local degree one, two, three or four, except for the first vertex inserted in an empty graph. If a new vertex has local degree zero, then it is placed in a temporary location and it will be inserted in the future, when some newer vertices increase its (local) degree. In order to prove our results, we maintain the following invariants as vertices are inserted in the drawing: ffl Every vertex of the current drawing of degree one has either two free directions to the bottom and a bend-free one to the right, or two free directions to the right and a bend-free one to the bottom of the grid point where the vertex is placed. ffl Every vertex of the current drawing of degree two has either one free direction to the bottom and one to the right, or two free directions to the right, or two free directions to the bottom of the grid point where the vertex is placed. ffl Every vertex of the current drawing of degree three has a free direction either to the bottom or to the right of the grid point where the vertex is placed. Figures 4b and 4c show the first two vertices inserted in an empty graph. Notice that after vertices v 1 and v 2 are inserted, they both satisfy the invariants set above. Different placements of the first two vertices are possible but the edge that connects them always has to have one bend in the way shown in Fig. 4c. If a straight no-bend line is used to connect at least one of these two vertices will not satisfy the first invariant. (a) (b) (c) Figure 4: (a) Possible free directions of a vertex u of the current drawing, (b),(c) inserting the first two vertices in an empty graph. Let us assume that v i is the next vertex to be inserted in the current drawing. We distinguish the following cases: (a) (b) Figure 5: Insertion of local degree one vertex v i requires at most one column and one row. (b) (a) Figure (a) Insertion of local degree two vertex v i requires one column, (b) insertion of v i now requires one column and one row. 1. v i has local degree one. There are two cases which are shown in Figs. 5a and 5b. At most one new column and one new row are required, and at most one bend is introduced. Notice that this bend is introduced along an edge which is incident to whose other end is open. In Fig. 5a the vertex will have one free direction to the bottom and two to the right. The second free direction to the right (which is responsible for introducing an extra row and bend to the drawing) will be inserted in the drawing later and only if v i turns out to be a full blown degree four vertex. We take a similar approach for the second downward free direction of v i of Fig. 5b. 2. v i has local degree two. There are four cases. We have shown two cases in Figs. 6a and 6b (the other two are symmetric and are treated in a similar fashion). At most one new row and one new column is required, and at most two bends are introduced. Notice that these bends are introduced along edges which are incident to v i and connect v i with the current drawing. 3. v i has local degree three. There are eight cases. All cases, however, can be treated by considering just two cases, as shown in Fig. 7: (a) all the vertices have a free direction to the right (bottom), and (b) two vertices have a free direction to the right (bottom) and the other vertex has a free direction to the bottom (right). The rest of the cases are symmetric and are treated in a similar fashion. At most one new row and one new column are required, and at most three bends are introduced. Notice that these bends are introduced along edges which are incident to v i and connect v i with the current drawing. 4. v i has local degree four. There are sixteen cases. All cases, however, can be treated by considering just three cases, as shown in Fig. 8: (a) all the vertices have a free direction to the right (bottom), (b) three vertices have a free direction to the right (bottom) and one vertex has a free direction to the bottom (right), and (c) two vertices have a free direction to the right (bottom) and the other two vertices have direction to the bottom (right). The symmetric cases are treated in a similar fashion. At most two new rows and two new columns are required, and at most six bends are introduced. Notice that these bends are introduced along edges which are incident to v i and connect v i with the current drawing. As we described above, the easiest way to handle deletions is to delete vertices/edges from the data structures without changing the coordinates of the rest of the drawing. Occasionaly, (a) (b) Figure 7: (a) Insertion of local degree three vertex v i requires one column, (b) insertion of now requires one row and one column.u (c) (b) (a) Figure 8: (a) Insertion of local degree four vertex v i requires two columns, (b) insertion of requires two columns and one row, (c) insertion of v i requires two columns and two rows. or on demand, the system can perform a linear-time compaction similar to the one described in [21], and refresh the screen. Lemma 4.1 The total number of bends introduced by an interactive graph drawing system under the "No-Change scenario" up to time t is at most 2:66n(t) is the number of vertices at time t. This upper bound is tight. Proof. Vertex v 1 is the first vertex to be inserted into an empty drawing and is also the only vertex that has local degree zero (see Fig. 4b). The insertion of v 1 contributes (or will contribute) at most two bends: The first one is along edge (v the second one will be along direction to the right which is not bend-free (see Fig. 4c), if v 1 turns out to be a degree four vertex. Let v i be the next vertex to be inserted in the drawing. If v i has local degree one, two or three, then its insertion introduces at most one, two or three bends, respectively, as depicted in Figs. 5, 6 and 7. If v i has local degree four, then its insertion introduces at most six bends as shown in Fig. 8. Let B(t) denote the total number of bends at time t. Then we have the following expression for is the graph that has been drawn up to time t, and n 4 (t) is the number of vertices of local degree four which have been inserted up to time t. It follows that B(t) - 2n(t) 2. In order to establish an upper bound for B(t) we need to compute the maximum number of vertices of local degree four that can be inserted up to time t under any insertion sequence. Let 4n 4 (t) be the number of edges of the drawing which were contributed by all n 4 (t) vertices of local degree four up to time t. Let m 0 be the number of the rest of the edges of the drawing at time t. It holds that Notice that n 4 (t) is maximized when m 0 is minimized. Since the graph that has been drawn up to time t has to be connected, it holds that From that, it follows that the maximum value for n 4 (t) is n(t)Recall that the number of bends at time t, is B(t) - 2n(t) after the hence the result follows. To show the tightness of this upper bound, we build the drawing of a graph with 6 vertices under the No-Change scenario, in the following way: First, we insert vertices 1 and 2 in the way shown in Fig. 4c. Next, we insert vertex 3 which is adjacent to vertex 2, and then we insert vertex 4 which is adjacent to vertices 1 and 3 of the current drawing. In the last two steps, we insert vertices 5 and 6 of local degree four, so that each one is adjacent to vertices 4. The final drawing is shown in Fig. 9b. We use dotted boxes to denote the current drawing at each intermediate step. Counting the number of bends of the drawing reveals that this number is 2. 2 Theorem 4.1 An interactive graph drawing system under the "No-Change scenario" produces an orthogonal drawing of a connected graph, which has the following properties at any time t: 1. every insertion operation takes constant time, 2. every edge has at most three bends, 3. the total number of bends at any time t is at most 2:66n(t) is the number of vertices of the drawing at time t, 4. the area of the drawing at any time t is no more than (n(t) is the number of vertices of local degree four which have been inserted up to time t, and 5. the upper bounds for both area and bends are tight. Proof. Part 1 follows easily from the description we gave above regarding the insertion of individual vertices. For Part 2, notice that each newly inserted vertex v i adds at most bends along its incident edges (see Figs. 5, 6, 7 and 8). It is possible that an incident edge e of v i might have already had one bend if the vertex of the current drawing which is connected to v i through e (say u) was inserted as a local degree one vertex. This is also illustrated in Fig. 9a. From Lemma 4.1 it follows that the number of bends of the drawing at time t can be at most 2:66n(t) + 2. In the same lemma we discussed the tightness of this upper bound. Let us assume that vertex v 1 is the first vertex to be inserted to an empty drawing (see Fig. 4b). Vertex v 1 is the only vertex of local degree zero inserted to the drawing. The insertion of vertex v 1 may introduce a total of two new rows and two new columns, if v 1 turns out to be a vertex of degree four. This can be seen in Fig. 4c, where v 1 requires one row and one column to place itself, and one additional row and column for its two directions which are not bend-free. From this and the discussion above, we have that the maximum width or height of the drawing at time t cannot be more than 2 are the number of vertices of local degree one, two and three, respectively, which have been inserted up to time t. Notice that From the proof of Lemma 4.1 we have that the absolute maximum value that n 4 (t) may take under any circumstances is: n(t). So, the area is at hence the result follows. Finally, the drawing of Fig. 9b demonstrates not only the tightness of the upper bound on the number bends (see proof of Lemma 4.1), but also the tightness of the upper bound on the area discussed in the last paragraph. Notice that the area of the drawing is (8 \Theta squared units, and this is equal to d1:77 \Theta 6 2 e. 2 (a) (b) Figure 9: (a) At most 3 bends may appear along any edge e of the drawing, (b) a drawing under the No-Change scenario demonstrating the tightness of the upper bound on area and number of bends. The interactive scheme we just described is simple and efficient. The area and bend bounds are higher than the best known [1, 2, 15, 16]. However, we have to consider that this is a scheme that gives the user a lot of flexibility in inserting any node at any time. Moreover, any insertion takes place without disturbing the current drawing, since the insertion is built around it. Furthermore, n 4 (t) is the number of vertices of local degree four which have been inserted up to time t, and not the total number of vertices of degree four in the graph. The area will be smaller if the user chooses an insertion strategy which keeps n 4 (t) low. Notice that it is possible to reuse rows and columns on which other vertices have been placed before. Although we cannot guarantee that this will always happen, the interactive drawing program should be able to see if a reuse is possible during an insertion, and take advantage of it. In Fig. 10 we show an example of our technique when applied on a regular graph of degree four that has 13 vertices. The graph, along with an st-numbering is shown in Fig. 10a. We simulate the interactive technique we introduced above for the No-Change scenario and we insert the vertices following the st-numbering, starting with an empty drawing. The final drawing has width 10, height 11, 24 bends, and is demonstrated in Fig. 10b. Note that the dotted boxes denote the current drawing at all intermediate steps, and we can see that it always remains unaltered. Also notice that when vertex 9 was inserted, we reused vertex 2's column. (a) (b)36 Figure 10: (a) A regular graph of degree 4 with 13 vertices, (b) drawing the graph under the No-Change scenario. 5 Comparisons and Extensions From the analyses of the Relative-Coordinates and No-Change scenaria which we presented in the previous sections, we can conlcude that the worst-case performance of the No-Change scenario is better than that of the Relative-Coordinates scenario in terms of the area and the number of bends of the drawings that they produce. More precicely, an interactive graph drawing system under the No-Change scenario produces an orthogonal drawing ffl less area, and ffl smaller total number of bends than the orthogonal drawing of the same graph produced by an interactive drawing system under the Relative-Coordinates scenario. Note that this comparison is a worst-case comparison. It holds when both systems draw a graph from scratch (i.e., the very first update operation applies on an empty graph), and when the drawn graph is connected at all times. Another advantage of the No-Change scenario is that each update operation takes constant time, since the coordinates of vertices and bends of the current drawing are never altered. In the case of the Relative-Coordinates scenario, re-drawing the whole graph after an update operation requires linear time since the coordinates of many vertices and bends of the current graph may be shifted (by a total amount of at most 6 units along the two axes). Note that if the user does not wish to produce a drawing of the graph after an update operation, then the operation itself takes constant time, since the data structures of the graph can be updated in constant time. However, the Relative-Coordinates scenario has one important feature: it gives the user the ability to insert a vertex into any orthogonal drawing (of degree four), at any time. This results from the fact that no invariants are maintained while drawing under this scenario. The Relative-Coordinates scenario offers a lot of flexibility at a very small cost: the coordinates of vertices and bends of the current drawing may be shifted by a small amount, as a result of an update operation, and re-drawing of the graph may be required. It is important to underline, though, that the shift of coordinates affects all vertices and bends of the current drawing in the same relative way. Hence, the general shape of the current drawing is still maintained after the update operation is complete. In the rest of this section we extend both the Relative-Coordinates and the No-Change scenaria to the case where the current graph is allowed to become disconnected during the interactive drawing process. In other words, inserting more than one vertices of local degree zero (i.e., vertices that are not adjacent to any other vertex at the time of their insertion) is now allowed. The other characteristics of the drawing remain unchanged, that is we assume that the drawing is orthogonal with maximum degree four, and we start the update operations with an originally empty graph. Theorem 5.1 An interactive graph drawing system under the "Relative-Coordinates sce- nario" produces an orthogonal drawing of a graph, which has the following properties at any time t: 1. after each vertex insertion, the coordinates of any vertex or bend of the current drawing may shift by a combined of at most 6 units along the x and y axes, 2. there are at most 3 bends along any edge of the drawing, 3. the total number of bends is at most 4n(t), and 4. the area of the drawing is at most 3n(t) 2 , where n(t) is the number of vertices that have been inserted up to time t. Proof. The first two parts of the theorem come directly from Theorem 3.1. Regarding the total number of bends at time t, it still holds that: since the insertion of vertices of local degree zero introduces no bends (see also the proof of Theorem 3.1). Linear programming is employed once again to compute the maximum value that B(t) can take, which is an upper bound on the number of bends of the drawing at time t. The new linear program is the following: maximize: under the following constraints: The first constraint is an equation on the vertices, and the second constraint is an equation on the edges of the graph, after n vertices have been inserted. Note that n 0 is the number of vertices of local degree zero; these vertices do not contribute any edges to the drawing. Solving this linear program reveals that the above expression is maximized when maximum is equal to 4n. Let h(t) and w(t) denote the height and the width, respectively, of the drawing at time t. Vertices of local degree zero open up either a new row or a new column. Vertices of local degree one, two, three or four follow the rules described in the proof of Theorem 3.1, regarding the number of rows or columns that they open up. It holds that: h(t) since We want to maximize h(t) +w(t). As above, this problem can be formulated as a linear program, where the expression to be maximized is: and the constraints are exactly the same as the ones in the above linear program. Solving this new linear program, we have that h(t) + w(t) is maximized when exactly as in the linear program we studied above, for the number of bends. The maximum value of the expression is equal to 3:5n, which means that It also holds that h(t) \Theta w(t) is maximized when h(t)+w(t) 1:75n(t). In this case, the area of the drawing can be at most 3n(t) 2 . 2 We now extend the No-Change scenario to the case where the current graph is allowed to become disconnected during the interactive drawing process. When a vertex of local degree zero is inserted, we either open up a new column and place it to the right of a bend of the current drawing (thus reusing a row), or open up a new row and place it to the bottom of a bend of the current drawing (thus reusing a column). If neither of the two is possible, we open up one new row and one new column to place the local degree zero vertex. Note that a vertex of local degree zero may later contribute one more row and one more column to the drawing, if it uses its free directions which are not bend-free (see Fig. 4a). In this case, the vertex of local degree zero will be connected to four other vertices. As above, n i (t) denotes the number of vertices of local degree i which have been inserted up to time t. The following theorem holds: Theorem 5.2 An interactive graph drawing system under the "No-Change scenario" produces an orthogonal drawing of a graph, which has the following properties at any time t: 1. every insertion operation takes constant time, 2. every edge has at most three bends, 3. the total number of bends at any time t is at most 4n(t), where n(t) is the number of vertices of the drawing at time t, and 4. the area of the drawing at any time t is at most 4n(t) 2 . Proof. The first two parts come directly from Theorem 4.1. Following the proof technique of Lemma 4.1 for the total number of bends B(t) at time t, we have that: B(t) - 2n 2n 4 (t)+2n 0 (t). Recall that each vertex of local degree zero can contribute up to two bends, if it is connected to four vertices at time t (see description of the No-Change scenario in previous section). If n(t) is the total number of vertices that have been inserted up to time t, then the maximum value that n 4 (t) can take is: n(t)(similar to the proof of Lemma 4.1 by replacing m 0 with 0 since the graph may be disconnected at any intermediate moment). This means that n 0 (t) can be at most n(t), so the total number of bends is no more than 4n(t) at time t. A vertex of local degree zero may open up at most two new rows and two new columns, if it is connected to four vertices at time t. Vertices of local degree one, two, three or four follow the rules described in Section 4, regarding the number of new rows and columns that they open up, for the No-Change scenario. From this, it follows that the maximum width or height of the drawing at time t is at most 2n 0 (t)+n 1 (t)+n 2 (t)+n 3 (t)+2n 4 can now be up to n(t)each, the area is at most 4n(t) 2 . 2 The upper bounds on the number of bends and area change, when we extend the two scenaria to the case where the graph can become disconnected during the drawing process. Notice that the Relative-Coordinates scenario has now a better worst-case behavior than the No-Change scenario, with respect to the area that the drawing requires. As far as the number of bends is concerned, we have a tie, since both scenaria depict an upper bound equal to 4n(t). It is also worth noting that vertices of local degree zero and four play the most major role in the worst-case behavior of the Relative-Coordinates scenario, in terms of both the area and the number of bends. In fact, based on the results of the two linear programs discussed above, the upper bound expressions for the area and the number of bends were maximized, when the total number of vertices inserted is split between these two kinds of vertices. Recall that, when the graph has to be connected at all times, it is the vertices of local degree two, that play the most important part in the worst-case behavior of the Relative-Coordinates scenario (see proof of Theorem 3.1). 6 Conclusion and Future Work In this paper we discussed some possible scenaria for an interactive orthogonal graph drawing system. We used linear programming as an upper bound technique to analyze the performance of the Relative-Coordinates scenario. We also analyzed the No-Change scenario and compared the two scenaria. Our results focus on the following aspects of the produced drawings, or the drawing process: ffl area, ffl number of bends (per edge and total), ffl tightness of upper bounds, ffl extent to which the drawing changes after an update operation, and time to complete an update operation. An important property of an interactive graph drawing system is to introduce the minimum possible change to a drawing (that is preserve the user's ``mental map''), after each update operation. The No-Change scenario guarantees that the current drawing is never altered since any vertex insertion and edge routing takes place around it. On the other hand, the Relative-Coordinates scenario typically requires a small change in the coordinates of vertices and bends of the current drawing. However, the general shape of the drawing is maintained after each update operation. The worst-case performance bounds of the No-Change scenario, in terms of area and bends, are better than the corresponding bounds obtained by the Relative-Coordinates scenario (if the drawn graph is at all times connected). However, the Relative-Coordinates scenario is less restrictive, since it does not maintain any invariants when it produces a new drawing. In [14] three different models are proposed to capture the notion of the user's "mental map" of a drawing. Although our work was developed independently of the work in [14] and addresses different problems, it turns out that our scenaria follow some of their models. ffl the Relative-Coordinates scenario preserves the user's mental map in terms of the orthogonal ordering model of [14], and ffl the No-Change scenario preserves the user's mental map in terms of both the orthogonal ordering and proximity models of [14]. We have implemented the two scenaria (i.e., Relative-Coordinates and No-Change) and conducted a preliminary experimental study comparing their performance on a data set containing over 8000 graphs of maximum degree four. Our experiments mainly focus on measuring the area and the total number of bends that the two scenaria require for the graphs of our data set. Our preliminary results indicate that: ffl The Relative-Coordinates scenario always exhibited better performance than No-Change in terms of both area and number of bends. ffl The practical behavior of the two scenaria was much better than their established theoretical worst-case bounds, in most cases. In other words, the worst case did not happen very frequently. An extensive description of our experimental results along with heuristics on the placement of vertices will appear in a forthcoming paper. It is an interesting open problem to develop a theory that enables the insertion, move or deletion of more than one vertices simultaneously (that is a block of vertices) in the current drawing, efficiently. The area of interactive graph drawing will grow in the next years because of the many applications that demand it. Techniques for interactive graph drawing in other standards (straight line, polyline, etc.) are needed, and should be explored. Since it is counterproductive for the user to spend a significant amount of time to "relearn" the new drawing, the main target is to produce a drawing that is as close to the drawing before the update as possible. Acknowledgement We would like to thank Brendan Madden and Roberto Tamassia for helpful discussions. --R Embedding Nonplanar Graphs in the Rectangular Grid A Better Heuristic for Orthogonal Graph Drawings Dynamic Graph Drawing Algorithms for Drawing Graphs: An Annotated Bibliography Spirality of orthogonal representations and optimal drawings of series-parallel graphs and 3-planar graphs Rectilinear Planar Drawings with Few Bends in Each Edge Computing an st-numbering On the Computational Complexity of Upward and Rectilinear Planarity Testing Drawing planar graphs using the lmc-ordering New lower bound techniques for VLSI Combinatorial Algorithms for Integrated Circuit Layout An Incremental Approach to Aesthetic Graph Layout Layout Adjustment and the Mental Map Algorithms for Area-Efficient Orthogonal Drawings Improved Algorithms and Bounds for Orthogonal Draw- ings Issues in Interactive Orthogonal Graph Drawing Drawing Graphs on Rectangular Grids On minimal node-cost planar embeddings On embedding a graph in the grid with the minimum number of bends Planar Grid Embeddings in Linear Time Lower Bounds for Planar Orthogonal Drawings of Graphs Universality Considerations in VLSI Circuits --TR --CTR Janet M. Six , Ioannis G. Tollis, Effective Graph Visualization Via Node Grouping, Proceedings of the IEEE Symposium on Information Visualization 2001 (INFOVIS'01), p.51, October 22-23, 2001
graphical user interface;orthogonal graph drawing;interactive orthogonal graph drawing;information visualization;graph drawing
305116
Broadcasting Multiple Messages in the Multiport Model.
AbstractWe consider the problem of broadcasting multiple messages from one processor to many processors in the $k$-port model for message-passing systems. In such systems, processors communicate in rounds, where in every round, each processor can send $k$ messages to $k$ processors and receive $k$ messages from $k$ processors. In this paper, we first present a simple and practical algorithm based on variations of $k$ complete $k$-ary trees. We then present an optimal algorithm up to an additive term of one for this problem for any number of processors, any number of messages, and any value for $k$.
Introduction This paper explores the broadcast problem in the multiport model for message-passing systems. In particular, we consider (one-to-all) broadcast problem on a message-passing system modeled by a complete graph of n nodes with k-port model. We assume that there are n processors (nodes) in the system, denoted by 0; the source of the broadcast (the broadcaster) is processor 0. We also assume that the source has m messages, denoted by to broadcast to all the other processors. In the k-port model, each of the n processors has k distinct input ports and k distinct output ports. In each communication round, every processor can send k distinct messages to k other processors, and in the same round each processor can receive k distinct messages that were sent out from k other processors. Broadcasting is an important communication operation in many multiprocessor systems. Application domains that use this operation extensively include scientific computations, net-work management protocols, database transactions, and multimedia applications. Due to the significance of this operation it is important to design efficient algorithms for it. The broadcasting operation is frequently used in many applications for message-passing systems (see [11]). Several collective communication libraries, such as Express [9] by Parasoft and the Message Passing Library (MPL) [1, 2] of IBM SP2 parallel systems, provide the broadcast primitive. This operation has also been included as part of the collective communication routines in the Message-Passing Interface (MPI) standard proposal [8]. Several variations of the broadcasting problem were studied in the literature. (See [13] for a comprehensive survey.) Most of this research focused on designing broadcasting algorithms for specific network topologies such as rings, trees, meshes, and hypercubes. However, an emerging trend in many communication systems is to treat the system as a fully-connected collection of processors in which every pair of processors can communicate directly. This trend can be identified in a number of modern multiprocessor systems, such as IBM's Vulcan [17], Thinking Machines' CM-5 [15], NCUBE's nCUBE/2 [16], Intel's Paragon [12], and IBM's SP2, as well as in some high-speed communication networks (e.g. PARIS [6]). When communicating large amounts of data, many systems break the data into sequences of messages (or packets) that are sent and received individually. This approach motivates research into the problem of how to disseminate multiple messages efficiently in such systems. Here, we focus on the problem of broadcasting multiple messages from one source. (Broadcasting a single message in our model is a simpler task.) The problem of broadcasting multiple messages in fully-connected systems was studied in several communication models. Cockayne and Thomason [7] and Farley [10] presented optimal- time solutions for this problem in a model in which each processor can either send one message or receive one message in any communication round, but not both. (This model is sometimes referred to as the unidirectional telephone model or the telegraph model.) In this model, the optimal number of rounds for odd n is and the optimal number of rounds for even n is 2m ne . In the bidirectional telephone model, Bar-Noy, Kipnis, and Schieber [5] provided an optimal algorithm that requires (m ne rounds for even n. For odd n, they presented an algorithm that is optimal up to an additive term of 1 and requires rounds. They also solved the broadcasting problem optimally in the simultaneous send/receive model. In this model, in every round, each processor can send a message to one processor and receive a message from another. (Note that the send/receive model is equivalent to the 1-port model.) Their solution requires ne rounds. Bar-Noy and Kipnis [3, 4] as well as Karp et al. [14] also investigated the problem of broadcasting multiple messages in the Postal and LogP models of communication. In these models, each processor can simultaneously send one message and receive another message, but message delivery involves some communication latency. In these models, no optimal solutions for the problem of broadcasting multiple messages are known for nontrivial values of the communication latency. The multiport model generalizes the one-port model that has been widely investigated. There are examples of parallel systems with k-port capabilities for k ? 1, such as the nCUBE/2 [16], the CM-2 (where k is the dimension of the hypercube in both machines) and transputer-based machines. Our results: In this paper we present two algorithms for broadcasting m messages within an n-node complete graph in the k-port model for any n and any k - 2. The first algorithm, called the k-tree algorithm, is very simple and practical. It has a time complexity of dm=ke compared to a simple lower bound of dm=ke log \Upsilon \Gamma 1. Thus, the delay of each message is optimal up to a small multiplicative factor of log(k The second algorithm, called the rotation algorithm, is optimal up to an additive term of one. Specifically, our algorithm requires dm=ke log \Upsilon rounds. The second algorithm is more complicated and uses the first algorithm as a subroutine. Throughout the paper, we assume 2. Some Bounds In this section we present some bounds regarding the multiple messages broadcasting problem. The first two lemmas are simple extensions of the well-known lower bound for the 1-port case. The first observation is that the broadcasting time of a single message among n processors in the k-port model must take at least log \Upsilon rounds. This is because after one round at most processors know the message, after two rounds at most (k know the message, etc. Lemma 1 The broadcasting time of one message among n processors in the k-port model is at least log \Upsilon rounds. Our second observation is that the earliest round the broadcaster can send the m-th message is after round dm=ke \Gamma 1 since in each round it can send at most k messages. Thus, the simple lower bound follows. Lemma 2 The broadcasting time of m messages among n processors in the k-port model is at least \Upsilon log \Upsilon rounds. However, for many combinations of n, m and k, we have a lower bound which is one larger than the previous lower bound. The broadcast time of our second algorithm is also one larger than the previous lower bound. Our second lower bound shows that in many cases this algorithm is optimal. Specifically, we have the following lemma. ne and let then the lower bound for broadcasting m messages among n processors in the k-port model is log \Upsilon Proof: Following the proof of Lemma 2, the broadcaster needs at least rounds to send out all m messages. Furthermore, in the tightest schedule with respect to the broadcaster, there are fi messages (where 1 - fi - need to be sent out at round t. For these fi messages to reach all other processors, a total "bandwidth" of (n \Gamma 1)fi is needed starting from round t. However, the maximum bandwidth that can be used for these fi messages starting from round t are k; (k That is, at round t log \Upsilon a total of n bandwidth can be used for these fi messages. Thus, if (n at least one more round is needed. 2 For example, when 2, the lower bound is dm=ke log \Upsilon for among all n in the range of (i.e., the lower bound is dm=ke log \Upsilon for among all n in the range of As a special case when n is a power of k + 1, we have the following corollary. Corollary 4 When n is a power of k + 1, the number of rounds required in broadcasting m messages among n processors in a k-port model, k - 2, is at least \Upsilon log \Upsilon log k+1 n; otherwise. Note that the \Gamma1 term appears only in the case where in the last round of sending by the broadcaster, the broadcaster has only one message to send. Only in such cases the broadcaster could start a complete broadcasting tree. In this paper we circumvent this distinction between different values for m and k by considering the minimum broadcasting time version of the problem. In this version we assume that the broadcaster has an infinite number of messages and in each round it sends k new messages to some k or less processors. These processors are responsible for broadcasting these messages among the rest of the processors. The goal is to minimize the broadcasting time of all messages. If we show that the maximum broadcasting time of any message is T rounds, then the broadcasting time for m messages can be achieved in dm=ke simply by instructing the broadcaster to be idle after it finishes sending all the m messages. Such a reduction yields an algorithm which is optimal up to an additive term of log \Upsilon from the optimum. We summarize the above discussion in the following lemma. Lemma 5 Suppose that there exists an algorithm for the minimum broadcasting time problem the complexity of which is T rounds. Then there exists an algorithm for the multiple messages broadcasting the complexity of which is far from the optimum by an additive term of at most log \Upsilon rounds. 3 The k-Tree Algorithm In this section, we describe a very simple algorithm, called the k-tree algorithm. The time complexity of the algorithm is dm=ke+max(2; dlog k (n 2k)e). Thus, the delay of each message is optimal up to a small multiplicative factor of log(k 3.1 A General k-Tree Theorem Our algorithm is based on a construction of k spanning trees of size n each and a proper labeling of the tree nodes. We first give a general theorem regarding k-port broadcast based on k spanning trees. Theorem 6 If one can construct k spanning trees (of size n each) with the properties that 1. for each tree, the n nodes are uniquely labeled from 0 through and the root is labeled (the broadcaster), 2. the height of any tree is less than h, and 3. for each node (identified by a label) the number of children summing over all k trees is at most k, then broadcasting m messages among n nodes in the k-port model can be finished in time Proof: For each round, the root (broadcaster) can send out a distinct message in each tree. The messages are propagated down the tree with pipelining one level down per round. To make sure such scheduling does not violate the k-port model, the number of incoming messages (and outgoing messages, respectively) per round for each node must not exceed k. Clearly, each non-root node will receive at most k messages per round, because it has one parent per tree. Since, by Property 3, each node has at most k children summing over all k trees, the number of outgoing messages per round is also bounded from above by k. The time complexity then follows from Property 2. 2 3.2 Almost Complete k-ary Trees The following definition is needed for our algorithm. almost complete k-ary tree of n nodes, denoted T k (n), can be constructed as follows. Starts from the root by adding nodes level by level in a top-down manner. Within each level l, k leaf nodes are attached to each node of the level l \Gamma 1 from left to right until either all nodes at this level have been filled or the tree has reached a total of n nodes. We say that a node in a tree is an internal node if it is neither the root of the tree nor a leaf node. Also, the root and the internal nodes are jointly referred to as non-leaf nodes. Clearly, all the non-leaf nodes in T k (n) have k children except for the last non-leaf node which has children. Also, only the last two levels can have leaf nodes. Since in a complete k-ary tree of height h there are nodes, it follows that in such trees. Consequently, for other values of n the height of T k (n) can be derived as For convenience, we will also define T 0 k (n) a tree which is derived by attaching the root of a T k (n \Gamma 1) to a new node, serving as the new root of T 0 k (n). We will broadcast based on k spanning trees where each tree has the topology of T 0 possibly with some minor modification. The goal is to find a mapping of f0; to each tree with node 0 mapped to the root, such that Property 3 of Theorem 6 is satisfied. We consider three cases separately in the following: (i) k divides does not divide 2. 3.3 Broadcasting with k divides We use k spanning trees for broadcasting, each of topology T 0 k (n). In a complete k-ary tree with n nodes all the nodes can be counted in groups of k except of the root. Therefore, in a complete k-ary tree k divides k (n) is composed of T k (n \Gamma 1) trees, it follows that when k divides every internal node in each of the T k (n \Gamma 1) tree has full fanout, i.e., k children. Hence, in this case, the number of internal nodes per tree is (n \Gamma 2)=k and there are a total of nodes over all k trees. Note that the broadcaster is the root of each of the k trees. For all the other processors, we can choose of them and define a one-to-one mapping to the nodes. Since each processor is mapped to an internal node at most once (i.e., it is mapped to leaf nodes in all other trees), it has at most k children summing over all k trees. Thus, by Theorem 6, the algorithm finishes in time dm=ke where h is the height of these trees. Figure 1 shows an example of the 5 (12), used in broadcasting among processors with 5-port communication model. 3.4 Broadcasting with k does not divide 1. We first construct k trees, each having the topology of T 0 These trees are labeled according to that described in the above case. We then add ff nodes to each tree as follows. For clarity, call these trees 0 through k \Gamma 1. We will add nodes to trees in the order from 0 to k \Gamma 1. For convenience, we refer to the first (resp. second) leaf node as the leaf node which is of the first (resp. second) rank among all leaf nodes ordered in the top-down manner and from left to right within each level. Note that since n - 2, the tree T 0 contains at least and, therefore, has at least two leaf nodes. Let be the added ff processors. In the process of adding these ff nodes we create new internal nodes. The following algorithm has two tasks. First, it should specify to which parents these nodes are attached. Second, it should assign a processor to the new internal nodes in a way that does not violates Property 2 of Theorem 6. Note that there is no need to describe the assignment of processors to leaves since any assignment is valid. The algorithm of attaching ff nodes to each tree and assigning new internal nodes to the ff new processors is as follows. attach ff nodes to the first leaf node of the j-th tree and assign processor p i to the "new" internal node. endif else attach nodes to the first leaf node of the j-th tree and assign processor p i to the "new" internal node. attach c nodes to the second leaf node of the j-th tree and assign processor p i to the "new" internal node. endif endfor Following the algorithm, the new ff nodes are either entirely attached to the first leaf node or spread between the first and the second leaf nodes of T 0 ff). The counter c is used to make sure that each processor p i will have at most k children summing over all k trees. Since there are ffk new children need to be covered and each new processor can have up to k children, there are enough processors to act as new internal nodes. Figure 2 shows an example of the tree structure after adding nodes to that of Figure 1. Note that in this example As in the previous example, processor 14 is not assigned to any internal node. 3.5 Broadcasting with For 2, the case is trivial. When 2, the above approach of adding extra nodes to the case does not work, because there is only one leaf node in T 0 (2). Thus, we need to redefine the "second" leaf in a dynamic way. Specifically, we redefine the second leaf node as the first child of the first leaf node for this case. Then the algorithm of attaching the ff nodes described above still holds. It is easy to show that the maximum height of these trees is 3. Figure 3 shows an example of the trees for 5. 3.6 The Time Complexity Let h be the maximum height of these trees. Then by Theorem 6, broadcasting m messages can be realized in \Upsilon showed in Section 3.5 that h - 3. We now derive h for the other cases. Let f(n; which is the height of T k (n). The maximum height of the k trees defined in Section 3.3 is k). The maximum height of the k trees defined in Section 3.4 is 1 k. Here, the additive term of 2k in the first operand of the function f is an upper bound for the maximum number of nodes that could be added while creating at most two new internal nodes. Now since f(n; k) is a monotonely increasing function with respect to n, we only focus on the height of the second case which is Thus, the time complexity of our algorithm is at most Note that 2 - k - thus the time complexity is also bounded from above by dm=ke ne Overall, for any n and any k - 2, the time complexity is bounded from above by Recall that the simple lower bound is dm=ke log \Upsilon 1. Thus, the algorithm is about a multiplicative factor of log(k above the lower bound in the delay-term, while the bandwidth-term is tight. Table 1 lists, for some selected k and n, the number of additional rounds required by this algorithm from the simple lower bound. For accuracy, we use the time complexity of the k-tree algorithm before the approximation, i.e., when 2. 4 The Rotation Algorithm In this section we describe a more complicated algorithm. This algorithm is based on three broadcasting black-boxes described later. A broadcasting black box BBB(h; t; ffi) (referred also as a system) is defined as follows: ffl There are h processors in the system. ffl In each round, k messages are injected into the system and are received by k or less processors out of the h processors. After ffi rounds these k messages are sent out of the system by k or less processors (not necessarily the same processors). ffl All the h processors know these k messages after at most t rounds. The parameter t stands for the broadcasting time in this broadcasting black-box and the parameter ffi stands for the delay time of the stream of messages from the time it is injected into the system to the time it is ejected out of the system. The trivial broadcasting black-box is the broadcaster itself. We denote this special black-box by BBB(1; 0; 0) since we assume that the broadcaster already knows all the messages and sends them with no delay. Using broadcasting black-boxes, we can generate the broadcasting algorithm by chaining black-boxes as follows. Let BBB broadcasting black-boxes where BBB 0 is the broadcaster black-box BBB(1; 0; 0) and BBB i is of the form BBB(h we connect the output stream of messages of BBB i\Gamma1 to the input stream of messages of BBB i . The output stream of BBB ' need not be sent. We refer to this algorithm as the chain algorithm. The overall number of processors in the system is P ' . It is not difficult to verify that the processors in BBB i know a message after P rounds from the time it was sent by the broadcaster. We get the following theorem: Theorem 7 For broadcasting black-boxes and let BBB be the trivial black-box consisting of the broadcaster. Then the chain algorithm for BBB is a broadcasting algorithm among 1 processors which takes maxft rounds. Our algorithm is based on the following proposition regarding a representation of any number n as a sum of ' properties. Proposition 8 Any n - 1 can be represented as with the following properties: 1. Either 2. Depending on the previous property, for any value of i between 1 and either ' or log \Upsilon , and therefore ' ! log \Upsilon Proof: The proof is by construction. We first check whether some d 1 - 1. If this is the case we are done. Otherwise, let (d 1 ; a 1 ) be the largest pair (lexicographically) such that the same process for finding \Delta. We are done either by finding some Clearly, d 1 - log \Upsilon . In order to prove Property 3 we show that d 2 ! d 1 . The rest follows the recursive construction. Assume to the contrary that d . we distinguish two cases: (i) 1. In the first case, we get that then the above inequality contradicts the maximality of a 1 for a given choice of d 1 . If a 1 inequality contradicts the maximality of d 1 . In the second case the contradiction is achieved since again For the rest of the section we will describe the following three broadcasting black-boxes: 1. d) for some d - 2. 3. BBB(n; 2; 1) for n ! 2k. We now use Proposition 8 to construct our chain algorithm. We apply the chain algorithm on the black-boxes BBB(1; 0; 0), BBB(n case We get the following corollary. Corollary 9 In the above chain algorithm, the broadcasting time of any message is at most log \Upsilon Proof: By Theorem 7 the complexity of the algorithm is maxfd rounds. By the third property of Proposition 8, we get that d 1 - (j and hence the round complexity is bounded by maxfd 2g. The corollary follows since log \Upsilon log \Upsilon Note that in the above chain algorithm the delay of the stream of messages in the last black-box is insignificant because the output stream is no longer needed. Therefore we can use the types of black-boxes the delay of which is 1. Now we return to our original multiple messages broadcasting algorithm. If all the messages after the m-th message are null messages. Then the chain algorithm yields the following theorem. Theorem There exists a broadcasting algorithm among n processors which takes at most \Upsilon log \Upsilon rounds. Note that this bound is greater than the simple lower bound by one. It matches the second lower bound for many values of k, n, and m. 4.1 The Broadcasting Black Box for "nice" numbers In this subsection we describe the broadcasting black-box BBB((k d) for some d - 1. Let 1. This is a black-box for "nice" numbers, since together with the broadcaster the system consists of processors, and since this algorithm is based on some structure of the d-dimensional cube to the base of k + 1. Recall that in each round k new messages enter the system and after a delay of d rounds, in each round, k different messages leave the system. We denote these messages as input and output messages correspondingly. Throughout the algorithm the processors are dynamically partitioned into disjoint sets. In each round, each set of processors is instructed to send a message so that all the processors in the set send the same message to k processors in other sets. It will be verified that any processor receives at most k messages in this round. At the end of each round, processors are instructed to move to a new set. However, the size of the sets remain the same. First we define the partition of the processors. The partition consists of k \Delta d sets S i 1. The sets are arranged as a matrix of size k \Theta d. The size of set these sets include all the processors. Denote the messages by M following the order they arrive to the black-box. Next we define for each set what message to send. This definition depends on the round. Assume that M enters the black-box at round 0 and let r - 1 be the current round. All the processors in S i are assigned the message M (r\Gamma1\Gammaj)k+i If (r in the case of a finite number of message) then they are assigned no message. Now we define the recipients of the messages sent by each set of processors. For the processors in S i d\Gamma2 each sends k copies of its assigned message to processors in S i . In addition, the k input messages each goes to one of the sets S i j. For the processors in the set S i send their assigned message to kjS i processors and one message as an output message. Indeed, this number is equal to which is the number of all other processors. We now verify that any processor receives at most k messages. The processors in S i receive k messages from the sets S 1 . The processors in S i messages from the sets S 1 one message from a set S i or an input message. We conclude the description of the algorithm by defining the new partition of the processors. The sets S 1 0 consist of the k processors that received the k input messages. The sets consist of the processors in S i all the processors that received a message from them in this round. Note that processors change sets by going in a circle manner among the sets S i 1. Some of the processors remain in the set S i throughout the algorithm. Example: To demonstrate the flow of our algorithm we follow a message arriving at the black-box until it is sent out of the black-box. Consider a processor x from the set S i has just received the message M from the outside in round r. In round r the only one who belongs to the set S i 0 . In this round x sends M to k processors from the set S i . These processors join x to create the new S i 1 set of round r + 2. In round r these of M to k(k processors from the set S i . The recipients of the message M then join the senders to create the new S i set of round r the size of which is . This process continues in the same manner until round r d. At the beginning of this round, x belongs to S i and all the processors in this set knows M and are assigned to send M to all other processors. We showed before that after this round all the processor know M . Moreover, one of the processors, say x, can send M outside exactly d rounds after x received M . At the same round x (or another processor from S i gets a new message from outside and the process starts again. Correctness: The correctness of the algorithm is implied by the next lemma which states the invariants maintained throughout the algorithm. Whenever we refer to a message M ' for mean the null message. Lemma 11 In the beginning of round r: 1. Message M (r\Gamma1\Gammaj)k+i is known to all processors in S i 2. Messages M are known to all processors. Proof: The proof is by induction on the round number and follows the send, receive, and movement instructions of the algorithm. 2 Following the dissemination of a particular message, it is not hard to see that the above lemma implies the correctness of the BBB as stated in the next theorem. Theorem 12 Any message is known to all processors after d rounds and leaves the system as an output message after d rounds. 4.2 The Broadcasting Black Box for "special" numbers In this subsection we describe the broadcasting black-box BBB(a(k some d - 1 and 1 - a - k. Let a). This is a black-box for "special" type of numbers which do not cover all numbers. Recall that in each round k new messages enter the system and after a delay of one round these k messages leave the system. We denote these messages as input and output messages. The algorithm is a variation of the algorithm described in the previous subsection. First we define the partition of the processors. The partition consists of k \Delta d sets S i 1. The sets are arranged as a matrix of size k \Theta d. For the size of S i and the size of S i 0 is one. Indeed, these sets include all the processors. The assignment of messages are the same as in the previous subsection. Now we define the recipients of the messages sent by each set of processors. For the processor in S i sends k copies of its assigned message as follows: a \Gamma 1 copies to processors from S i a copies to processors to be specified later, and one copy is sent as an output message. For each of the processors in S i d\Gamma2 sends all of its k copies to processors in S i . In addition, the k input messages each goes to one of the sets S i j. For the processors in the sets S i send their assigned message to k(k processors. This number is kjS i a). This means that there are k \Gamma a processors that do not get the message assigned to the sets S i . We choose these processors as processors that always remain in their sets S i and they receive this message d rounds earlier from the processor of the set S i The verification that each processor receives at most k messages and the new partition is similar to the one appears in the previous subsection. Again, the correctness of the algorithm follows the next lemma which states the invariants maintained throughout the algorithm. Lemma 13 In the beginning of round r: 1. Message M (r\Gamma1\Gammaj)k+i is known to all processors in S i 2. Message M (r\Gamma2)k+i is known to k \Gamma a additional processors from a set S i 0 3. Messages M are known to all processors. Proof: The proof is by induction on the round number and follows the send, receive, and movement instructions of the algorithm. 2 Following the dissemination of a particular message, it is not hard to see that the above lemma implies the correctness of the BBB as stated in the next theorem. Theorem 14 Any message is known to all processors after d rounds and leaves the system as an output message after one round. 4.3 The Broadcasting Black Box for "small" numbers In this subsection, we describe the broadcasting black-box BBB(x; 2; 1) for 0 - x ! 2k. Note that from the broadcasting black-box definition, the broadcaster is outside the box. Thus, we consider broadcasting for 1 - n - 2k (n includes the broadcaster) using the k-tree algorithm. For 1 2, we use the construction in Section 3.5 and the height of the k trees is at most 3, which means the delay within the black box is at most 2. For we use the construction in Section 3.4 and the height of the k trees is bounded by 2. Thus, the height h which means the delay within the black box is at most 2. Note that we have in fact given a construction for BBB(x; 2; 2). Summary We have presented two algorithms for broadcasting multiple messages in the multiport model. The k-tree algorithm has a very simple structure and scheduling policy. Furthermore, its time complexity is very close to the lower bound for all practical k and n (see Table 1). The rotation algorithm is optimal up to an additive term of one. For certain values of n we can use the broadcaster to help broadcasting the messages to achieve an optimal algorithm. Since this method does not work for all values of n we omit the description. Also, for some values of m and k our algorithm is optimal. The exact characterization and finding optimal algorithms for all values of n, are still open. As mentioned in the introduction, in the Postal model even for there are not known optimal algorithm for all values of n. Actually, for very few values of n there exist optimal algorithms. The ultimate problem is to find an optimal algorithm for the k-port postal model for the multiple messages broadcasting problem for any value of n, m, k, and - where - is the delay parameter in the postal model (see [3]). --R The IBM external user interface for scalable parallel systems CCL: a portable and tunable collective communication library for scalable parallel computers Designing broadcasting algorithms in the postal model for message-passing systems Multiple message broadcasting in the postal model Optimal Multiple Message Broadcasting in Telephone-Like Communication Systems PARIS: an approach to integrated high-speed private networks Optimal multi-message broadcasting in complete graphs Document for a standard message-passing interface Express 3.0 Introductory Guide Broadcast time in communication networks Solving Problems on Concurrent Processors The Intel Paragon XP/S supercomputer A survey of gossiping and broadcasting in communication networks Optimal broadcast and summation in the LogP model The network architecture of the Connection Machine CM-5 The NCUBE family of parallel supercomputers Architectures and Implementation of Vulcan --TR
multiport model;message-passing system;one-to-all broadcast;broadcast;collective communication
305222
Atomic Decomposition by Basis Pursuit.
The time-frequency and time-scale communities have recently developed a large number of overcomplete waveform dictionaries --- stationary wavelets, wavelet packets, cosine packets, chirplets, and warplets, to name a few. Decomposition into overcomplete systems is not unique, and several methods for decomposition have been proposed, including the method of frames (MOF), Matching pursuit (MP), and, for special dictionaries, the best orthogonal basis (BOB).Basis Pursuit (BP) is a principle for decomposing a signal into an "optimal" superposition of dictionary elements, where optimal means having the smallest l1 norm of coefficients among all such decompositions. We give examples exhibiting several advantages over MOF, MP, and BOB, including better sparsity and superresolution. BP has interesting relations to ideas in areas as diverse as ill-posed problems, in abstract harmonic analysis, total variation denoising, and multiscale edge denoising.BP in highly overcomplete dictionaries leads to large-scale optimization problems. With signals of length 8192 and a wavelet packet dictionary, one gets an equivalent linear program of size 8192 by 212,992. Such problems can be attacked successfully only because of recent advances in linear programming by interior-point methods. We obtain reasonable success with a primal-dual logarithmic barrier method and conjugate-gradient solver.
Introduction Over the last several years, there has been an explosion of interest in alternatives to traditional signal representations. Instead of just representing signals as superpositions of sinusoids (the traditional Fourier representation) we now have available alternate dictionaries - collections of parameterized waveforms - of which the Wavelets dictionary is only the best known. Wavelets, Steerable Wavelets, Segmented Wavelets, Gabor dictionaries, Multi-scale Gabor Dictionaries, Wavelet Packets, Cosine Packets, Chirplets, Warplets, and a wide range of other dictionaries are now available. Each such dictionary D is a collection of waveforms (OE fl ) fl2\Gamma , with fl a parameter, and we envision a decomposition of a signal s as or an approximate decomposition where R (m) is a residual. Depending on the dictionary, such a representation decomposes the signal into pure tones (Fourier dictionary), bumps (wavelet dictionary), chirps (chirplet dictionary), etc. Most of the new dictionaries are overcomplete, either because they start out that way, or because we merge complete dictionaries, obtaining a new mega-dictionary consisting of several types of waveform (e.g. Fourier & Wavelets dictionaries). The decomposition (1.1) is then nonunique, because some elements in the dictionary have representations in terms of other elements. 1.1 Goals of Adaptive Representation Nonuniqueness gives us the possibility of adaptation, i.e., of choosing among many representations one that is most suited to our purposes. We are motivated by the aim of achieving simultaneously the following ffl Sparsity. We should obtain the sparsest possible representation of the object - the one with the fewest significant coefficients. ffl Superresolution. We should obtain a resolution of sparse objects that is much higher-resolution than that possible with traditional non-adaptive approaches. An important constraint, which is perhaps in conflict with both the goals: ffl Speed. It should be possible to obtain a representation in order O(n) or O(n log(n)) time. 1.2 Finding a Representation Several methods have been proposed for obtaining signal representations in overcomplete dictionaries. These range from general approaches, like the Method of Frames [8], and the method of Matching Pursuit [23], to clever schemes derived for specialized dictionaries, like the method of Best Orthogonal Basis [6]. These methods are described briefly in Section 2.3. In our view, these methods have both advantages and shortcomings. The principal emphasis of the proposers of these methods is in achieving sufficient computational speed. While the resulting methods are practical to apply to real data, we show below by computational examples that the methods, either quite generally or in important special cases, lack qualities of sparsity-preservation and of stable super-resolution. 1.3 Basis Pursuit Basis Pursuit (BP) finds signal representations in overcomplete dictionaries by convex op- timization: it obtains the decomposition that minimizes the ' 1 norm of the coefficients occurring in the representation. Because of the non-differentiability of the ' 1 norm, this optimization principle leads to decompositions that can have very different properties from the Method of Frames - in particular they can be much sparser. Because it is based on global optimization, it can stably super-resolve in ways that Matching Pursuit can not. BP can be used with noisy data by solving an optimization problem trading off a quadratic misfit measure with an ' 1 norm of coefficients. Examples show that it can stably suppress noise while preserving structure that is well-expressed in the dictionary under consideration. BP is closely connected with linear programming. Recent advances in large-scale linear programming - associated with interior-point methods - can be applied to BP, and make it possible, with certain dictionaries, to nearly-solve the BP optimization problem in nearly- linear time. We have implemented a primal-dual log barrier interior-point method as part of a computing environment called Atomizer, which accepts any of a wide range of dictio- naries. Instructions for Internet access of Atomizer are given in Section 6.6. Experiments with standard time-frequency dictionaries indicate some of the potential benefits of BP. Experiments with some nonstandard dictionaries - like the stationary wavelet dictionary and the Heaviside dictionary - indicate important connections between BP and methods like Mallat and Hwang's Multi-Scale Edge Representation and Osher, Rudin and Fatemi's Total Variation-based De-Noising methods. number of dictionaries and existing methods for overcomplete representation. In Section 3 we discuss the principle of Basis Pursuit and its relations to existing methods and to ideas in other fields. In Section 4 we discuss methodological issues associated with BP - in particular some of the interesting nonstandard ways it can be deployed. In Section 5 we describe Basis Pursuit De-Noising, a method for dealing with problem (1.2). In Section 6 we discuss recent advances in large-scale linear programming, and resulting algorithms for BP. In Section 7 we discuss a number of connections with other work. Representations n) be a discrete-time signal of length n; this may also be viewed as a vector in R n . We are interested in the reconstruction of this signal using superpositions of elementary waveforms. Traditional methods of analysis and reconstruction involve the use of orthogonal bases, such as the Fourier basis, various discrete cosine transform bases, and orthogonal wavelet bases. Such situations can be viewed as follows: given a list of n wave- forms, one wishes to represent s as a linear combination of these waveforms. The waveforms in the list, viewed as vectors in R n , are linearly independent, and so the representation is unique. 2.1 Dictionaries and Atoms A considerable focus of activity in the recent signal processing literature has been the development of signal representations outside the basis setting. We use terminology introduced by Mallat and Zhang [23]. A dictionary is a collection of parameterized waveforms \Gamma). The waveforms OE fl are discrete-time signals of length n called atoms. Depending on the dictionary, the parameter fl can have the interpretation of indexing frequency, in which case the dictionary is a frequency or Fourier dictionary, of indexing time/scale jointly, in which case the dictionary is a time-scale dictionary, or of indexing time/frequency jointly, in which case the dictionary is a time-frequency dictionary. Usually dictionaries are complete or overcomplete, in which case they contain exactly n atoms, or more than n atoms, but one could also have continuum dictionaries containing an infinity of atoms, and undercomplete dictionaries for special purposes, containing fewer than n atoms. Dozens of interesting dictionaries have been proposed over the last few years; we focus in this paper on a half dozen or so; much of what we do applies in other cases as well. 2.1.1 Trivial Dictionaries We begin with some overly simple examples. The Dirac dictionary is simply the collection of waveforms that are zero except in one point: This is of course also an orthogonal basis of R n - the standard basis. The Heaviside dictionary is the collection of waveforms that jump at one particular point: 1 ft-flg . Atoms in this dictionary are not orthogonal, but every signal has a representation 2.1.2 Frequency Dictionaries A Fourier dictionary is a collection of sinusoidal waveforms OE fl indexed by is an angular frequency variable and - 2 f0; 1g indicates phase type : sine or cosine. In detail, For the standard Fourier dictionary, we let fl run through the set of all cosines with Fourier sines with Fourier frequencies dictionary consists of n waveforms; it is in fact a basis, and a very simple one : the atoms are all mutually orthogonal. An overcomplete Fourier dictionary is obtained by sampling the frequencies more finely. Let ' be a whole number ? 1 and let ' be the collection of all cosines with sines with 1. This is an '-fold overcomplete system. We also use below complete and overcomplete dictionaries based on discrete cosine transforms and sine transforms. 2.1.3 Time-Scale Dictionaries There are several types of Wavelet dictionary; to fix ideas, we consider the Haar dictionary, with "Father Wavelet" . The dictionary is a collection of translations and dilations of the basic mother wavelet, together with translations of a father wavelet. It is indexed by is a scale location, and - 2 f0; 1g indicates gender. In detail, a: For the standard Haar dictionary, we let fl run through the discrete collection of mother wavelets with dyadic scales a locations that are integer multiples of the scale b and the collection of father wavelets at the coarse scale j 0 . This dictionary consists of n waveforms; it is an orthonormal basis. An overcomplete wavelet dictionary is obtained by sampling the locations more finely : one location per sample point. This gives the so-called Stationary Haar dictionary, consisting of O(n log 2 (n)) waveforms. It is called stationary since the whole dictionary is invariant under circulant shift. A variety of other wavelet bases are possible. The most important variations are smooth wavelet bases, using splines or using wavelets defined recursively from two-scale filtering relations [9]. Although the rules of construction are more complicated (boundary conditions [25], orthogonality versus bi-orthogonality [9], etc.), these have the same indexing structure as the standard Haar dictionary. In this paper, we use Symmlet-8 smooth wavelets, i.e., Daubechies Nearly Symmetric wavelets with eight vanishing moments; see [9] for examples. 2.1.4 Time-Frequency Dictionaries Much recent activity in the wavelet communities has focused on the study of time-frequency phenomena. The standard example, the Gabor dictionary, is due to Gabor (1946); in our notation, we take is a frequency, - is a location, ' is a phase, and ffit is the duration, and consider atoms OE Such atoms indeed consist of frequencies near ! and essentially vanish far away from - . For fixed ffi t, discrete dictionaries can be built from time-frequency lattices, with \Delta- and \Delta! chosen sufficiently fine these are complete. For further discussions see e.g. [8]. Recently, Coifman and Meyer [5] developed the wavelet packet and cosine packet dictionaries especially to meet the computational demands of discrete-time signal processing. For 1-d discrete time signals of length n, these dictionaries each contain about n log 2 (n) waveforms. A wavelet packet dictionary includes, as special cases, a standard orthogonal wavelets dictionary, the Dirac dictionary, and a collection of oscillating waveforms spanning a range of frequencies and durations. A cosine packet dictionary contains, as special cases, the standard orthogonal Fourier dictionary, and a variety of Gabor-like elements sinusoids of various frequencies weighted by windows of various widths and locations. In this paper, we often use wavelet packet and cosine packet dictionaries as examples of overcomplete systems, and we give a number of examples decomposing signals into these Time Frequency (b) Phase Plane (a) Frequency Domain |FFT(WaveletPacket(3,3,7))| Frequency -0.50.5(c) Time Domain Time Figure 2.1: Time-frequency phase plot of a wavelet packet atom. time-frequency dictionaries. A simple block-diagram helps us visualize the atoms appearing in the decomposition. This diagram, adapted from Coifman and Wickerhauser [6], associates with each cosine packet or wavelet packet a rectangle in the time-frequency phase plane. The association is illustrated in Figure 2.1 for a certain wavelet packet. When a signal is a superposition of several such waveforms, we indicate which waveforms appear in the superposition by shading the corresponding rectangles in the time-frequency plane. 2.1.5 Further Dictionaries We can always merge dictionaries to create mega-dictionaries; examples used below include mergers of Wavelets with Heavisides. 2.2 Linear Algebra Suppose we have a discrete dictionary of p waveforms and we collect all these waveforms as columns of an n by p matrix \Phi, say. The decomposition problem (1.1) can be written is the vector of coefficients in (1.1). When the dictionary furnishes a basis, then \Phi is an n by n nonsingular matrix and we have the unique representation When the atoms are, in addition, mutually orthonormal, then \Phi the decomposition formula is very simple. An important (but trivial) comment. Given a dictionary of waveforms, one can distinguish analysis from synthesis. Synthesis is the operation of building up a signal by superposing atoms; it involves a matrix that is n by Analysis involves the operation of associating with each signal a vector of coefficients attached to atoms; it involves a matrix that is p by n: a = \Phi T s. Synthesis and analysis are very different linear operations, and we must take care to distinguish them. One should avoid assuming that the analysis operator ~ us coefficients that can be used as is to synthesize s. (a) Signal: Carbon (b) Synthesis Phase Plane Time Frequency (c) Analysis Phase Plane Time Frequency Sorted Coefficients Order Amplitude Synthesis: Solid Analysis: Dashed Figure 2.2: Analysis versus synthesis of the signal Carbon. In the overcomplete case we are interested in, p AE n and \Phi is not invertible. There are then many solutions to (2.2), and a given approach selects a particular solution. One does not uniquely and automatically solve the synthesis problem by applying a simple, linear, analysis operator. We now illustrate the difference between synthesis Panel 2.2a shows the signal Carbon. Panel 2.2b shows the time-frequency structure of a sparse synthesis of Carbon, a vector ff yielding using a wavelet packet dictionary. To visualize the decomposition, we present a phase-plane display with shaded rectangles, as described above. Panel 2.2c gives an analysis of Carbon, the coefficients a displayed in a phase-plane. Once again, between analysis and synthesis there is a large difference in sparsity. In Panel 2.2d we compare the sorted coefficients of the overcomplete representation (synthesis) with the analysis coefficients. 2.3 Existing Decomposition Methods There are several currently popular approaches to obtaining solutions to (2.2). 2.3.1 Frames The Method of Frames (MOF) [8] picks out, among all solutions of (2.2), one whose coefficients have minimum l 2 norm: subject to s: (2.3) The solution of this problem is unique; label it ff y . Geometrically, the collection of all solutions to (2.2) is an affine subspace in R n ; MOF selects the element of this subspace closest to the origin. It is sometimes called a minimum-length solution. There is a matrix \Phi y , the generalized inverse of \Phi, that calculates the minimum-length solution to a system of linear equations: (a) Signal: Hydrogen (b) Ideal Phase Plane Time Frequency (c) Phase Plane by MOF Time Frequency Figure 2.3: MOF representation is not sparse. For so-called "Tight Frame" dictionaries MOF is available in closed form. Nice example: the standard wavelet packet dictionary. One can compute that for all vectors v, k\Phi T vk In short \Phi . Notice that \Phi T is simply the analysis operator. There are two key problems with the Method of Frames. First, MOF is not sparsity- preserving. If the underlying object has a very sparse representation in terms of the dictio- nary, then the coefficients found by MOF are likely to be very much less sparse. Each atom in the dictionary that has nonzero inner product with the signal is, at least potentially, and also usually, a member of the solution. Figure 2.3a shows the signal Hydrogen, made of a single atom in a wavelet packet dic- tionary. The result of a frame decomposition in that dictionary is depicted in a phase-plane portrait, Figure 2.3c. While the underlying signal can be synthesized from a single atom, the frame decomposition involves many atoms, and the phase-plane portrait exaggerates greatly the intrinsic complexity of the object. Second, MOF is intrinsically resolution-limited. No object can be reconstructed with features sharper than those allowed by the underlying operator \Phi y \Phi. Suppose the underlying object is sharply localized: . The reconstruction will not be ff, but instead \Phi y \Phiff which, in the overcomplete case, will be spatially spread out. Figure 2.4 presents a signal TwinSine, consisting of the superposition of two sinusoids that are separated by less than the so-called Rayleigh Distance 2-=n. We analyze these in a 4-fold overcomplete discrete cosine dictionary. In this case, reconstruction by MOF, Figure 2.4b, is simply convolution with the Dirichlet kernel. The result is the synthesis from coefficients with a broad oscillatory appearance, consisting not of two but of many frequencies, and giving no visual clue that the object may be synthesized from two frequencies alone. 2.3.2 Matching Pursuit Mallat and Zhang [23] have discussed a general method for approximate decomposition (1.2) that addresses the sparsity issue directly. Starting from an initial approximation s (a) Signal: TwinSine -0.50.51.5Frequency/Nyquist (b) MOF coefs Amplitude -0.50.51.5Frequency/Nyquist (c) MP Coefs Amplitude -0.50.51.5Frequency/Nyquist (d) BP Coefs Amplitude Figure 2.4: Analyzing TwinSine with a 4-fold overcomplete discrete cosine dictionaries. and residual R builds up a sequence of sparse approximations stepwise. At stage k, it identifies the dictionary atom that best correlates with the residual and then adds to the current approximation a scalar multiple of that atom, so that s i and R steps, one has a representation of the form (1.2), with residual R = R (m) . A similar algorithm was proposed for Gabor dictionaries by S. Qian and D. Chen [30]. An intrinsic feature of the algorithm is that when stopped after a few steps, it yields an approximation using only a few atoms. When the dictionary is orthogonal, the method works perfectly. If the object is made up of only m - n atoms and the algorithm is run for m steps, it recovers the underlying sparse structure exactly. When the dictionary is not orthogonal, the situation is less clear. Because the algorithm is myopic, one expects that, in certain cases, it might choose wrongly in the first few iterations and, in such cases, end up spending most of its time correcting for any mistakes made in the first few terms. In fact this does seem to happen. To see this, we consider an attempt at super-resolution. Figure 2.4a portrays again the signal TwinSine consisting of sinusoids at two closely spaced frequencies. When MP is applied in this case (Figure 2.4c), using the 4-fold overcomplete discrete cosine dictionary, the initial frequency selected is in between the two frequencies making up the signal. Because of this mistake, MP is forced to make a series of alternating corrections that suggest a highly complex and organized structure. MP misses entirely the doublet structure. One can certainly say in this case that MP has failed to super-resolve. Second, one can give examples of dictionaries and signals where MP is arbitrarily sub-optimal in terms of sparsity. While these are somewhat artificial, they have a character not so different from the super-resolution example. DeVore and Temlyakov's Example. Vladimir Temlyakov, in a talk at the IEEE Conference on Information Theory and Statistics, October 1994, described an example in which the straightforward greedy algorithm is not sparsity-preserving. In our adaptation of this example, based on Temlyakov's joint work with R.A. DeVore [10], one constructs a dictionary having atoms. The first n are the Dirac basis; the final atom involves a linear combination of the first n with decaying weights. The signal s has an exact decomposition in terms of A atoms; but the greedy algorithm goes on forever, with an error of size O(1= m) after m steps. We illustrate this decay in Figure 2.5a. For this example we set choose the signal s . The dictionary consists of Dirac elements with c chosen to normalize OE n+1 to unit norm. Shaobing Chen's Example. The DeVore-Temlyakov example applies to the original MP algorithm as announced by Mallat and Zhang in 1992. A later refinement (see also Pati [29]) involves an extra step of orthogonalization. One takes all m terms that have entered at stage m and solves the least squares problem min ks a for coefficients (a (m) one forms the residual - a (m) , which will be orthogonal to all terms currently in the model. This method is called Orthogonal Matching Pursuit (OMP) by Pati [29]. The DeVore-Temlyakov example does not apply to OMP, but Shaobing Chen found in Summer 1993 an example of similar flavor that does. In this example, a special signal and dictionary are constructed, with the following flavor. The dictionary is composed of atoms OE fl with ng. The first A atoms come from the Dirac dictionary, with . The signal is a simple equiweighted linear combination of the first A atoms: Dictionary atoms with fl ? A are a linear combination of the corresponding Dirac ffi fl and s. OMP chooses all atoms except the first A before ever choosing one of the first A. As a result, instead of the ideal behavior one might hope for, terminating after just A steps, one gets n steps before convergence, and the rate is relatively slow. We illustrate the behavior of the reconstruction error in Figure 2.5b. We chose 1024. The dictionary was OE and OE as one might have hoped for the ideal behavior 2.3.3 Best Orthogonal Basis For certain dictionaries, it is possible to develop specific decomposition schemes custom-tailored to the dictionary. Wavelet packet and cosine packet dictionaries are examples; they have very special properties. Certain special subcollections of the elements in these dictionaries amount to orthogonal bases; one gets in this way a wide range of orthonormal bases (in fact such orthogonal bases for signals of length n). Coifman and Wickerhauser [6] have proposed a method of adaptively picking from among these many bases a single orthogonal basis that is the "best basis". If (s[B] I ) I denotes the vector of coefficients of s in orthogonal basis B, and if we define the "entropy" (a) MP on DeVore and Temlyakov's example m, Number of Terms in Reconstruction Reconstruction Greedy: Dashed (b) OMP on Chen's example m, Number of Terms in Reconstruction Reconstruction Greedy: Dashed Figure 2.5: Counter examples for MP. I e(s[B] I ), where e(s) is a scalar function of a scalar argument, they give a fast algorithm for solving The algorithm in some cases delivers near-optimal sparsity representations. In par- ticular, when the object in question has a sparse representation in an orthogonal basis taken from the library, one expects that BOB will work well. However, when the signal is composed of a moderate number of highly non-orthogonal components, the method may not deliver sparse representations - the demand that BOB find an orthogonal basis prevents it from finding a highly sparse representation. An example comes from the signal WernerSorrows, which is a superposition of several chirps, sinusoids and Diracs; see Figure 2.6a. When analyzed with a cosine packet dictionary and the original Coifman- entropy, BOB finds nothing: it chooses a global sinusoid basis as best; the lack of time-varying structure in that basis means that all chirp and transient structure in the signal is missed entirely; see Figure 2.6b. 3 Basis Pursuit We now discuss our approach to the problem of overcomplete representations. We assume that the dictionary is overcomplete, so that there are in general many representations The principle of Basis Pursuit is to find a representation of the signal whose coefficients have minimal ' 1 norm. Formally, one solves the problem subject to s: (3.1) From one point of view, (3.1) is very similar to the Method of Frames (2.3): we are simply replacing the ' 2 norm in (2.3) with the ' 1 norm. However, this apparently slight change has major consequences. The Method of Frames leads to a quadratic optimization problem -226 (a) Signal: Werner Sorrows (b) Phase Plane: BOB by C-W Entropy Time Frequency (c) Phase Plane: BOB by l^1 Entropy Time Frequency (d) Phase Plane: BP Time Frequency Figure 2.6: Analyzing the signal WernerSorrows with a cosine packet dictionary. with linear equality constraints, and so involves essentially just the solution of a system of linear equations. In contrast, Basis Pursuit requires the solution of a convex, nonquadratic optimization problem, which involves considerably more effort and sophistication. 3.1 Linear Programming To explain the last comment, and the name Basis Pursuit, we develop a connection with linear programming (LP). The linear program in so-called standard form [7, 16] is a constrained optimization problem defined in terms of a variable x subject to where c T x is the objective function, is a collection of equality constraints, and is a set of bounds. The main question is, which variables should be zero. The Basis Pursuit problem (3.1) can be equivalently reformulated as a linear program in the standard form (3.2) by making the following translations: Hence, the solution of (3.1) can be obtained by solving an equivalent linear program. (The equivalence of minimum ' 1 optimizations with linear programming has been known since the 1950's; see [2]). The connection between Basis Pursuit and linear programming is useful in several ways. 3.1.1 Solutions as Bases In the linear programming problem (3.2), suppose A is an n by m matrix with m ? n, and suppose an optimal solution exists. It is well know that a solution exists in which at most n of the entries in the optimal x are nonzero. Moreover, in the generic case, the solution is so-called nondegenerate, and there are exactly n nonzeros. The nonzero coefficients are associated with n columns of A, and these columns make up a basis of R n . Once the basis is identified, the solution is uniquely dictated by the basis. Thus finding a solution to the LP is identical to finding the optimal basis. In this sense, linear programming is truly a process of Basis Pursuit. Translating the LP results into BP terminology, we have the decomposition The waveforms (OE are linearly independent but not necessarily orthogonal. The collection is not, in general, known in advance, but instead depends on the problem data (in this case s). The selection of waveforms is therefore signal-adaptive. 3.1.2 Algorithms BP is an optimization principle, not an algorithm. Over the last forty years, a tremendous amount of work has been done on the solution of linear programs. Until the 1980's, most work focused on variants of Dantzig's simplex algorithm, which many readers have no doubt studied. In the last ten years, some spectacular breakthroughs have been made by the use of so-called "interior-point methods", which use an entirely different principle. From our point of view, we are free to consider any algorithm from the LP literature as a candidate for solving the BP optimization problem; both the simplex and interior-point algorithms offer interesting insights into BP. When it is useful to consider BP in the context of a particular algorithm, we will indicate this by label: either BP-Simplex or BP-Interior. BP-Simplex. In standard implementations of the simplex method for LP, one first finds an initial basis B consisting of n linearly independent columns of A for which the corresponding solution B \Gamma1 b is feasible (non-negative). Then one iteratively improves the current basis by, at each step, swapping one term in the basis for one term not in the basis, using the swap that best improves the objective function. There always exists a swap that improves or maintains the objective value, except at the optimal solution. Moreover, LP researchers have shown how one can select terms to swap in such a way as to guarantee convergence to an optimal solution (anti-cycling rules) [16]. Hence the simplex algorithm is explicitly a process of "Basis Pursuit": iterative improvement of a basis until no improvement is possible, at which point the solution is achieved. Translating this LP algorithm into BP terminology, one starts from any linearly independent collection of n atoms from the dictionary. One calls this the current decomposition. Then one iteratively improves the current decomposition by swapping atoms in the current decomposition for new atoms, with the goal of improving the objective function. By application of anti-cycling rules, there is a way to select swaps that guarantees convergence to an optimal solution (assuming exact arithmetic). BP-Interior. The collection of feasible points fx : is a convex polyhedron in R m (a "simplex"). The simplex method, viewed geometrically, works by walking around the boundary of this simplex, jumping from one vertex (extreme point) of the polyhedron to an adjacent vertex at which the objective is better. Interior-point methods instead start from a point x (0) well inside the interior of the simplex (x (0) AE 0) and go "through the interior" of the simplex. Since the solution of a LP is always at an extreme (a) Signal: Carbon (b) Phase Plane: MOF Time Frequency Phase Plane: BOB Time Frequency Phase Plane: MP Time Frequency Phase Plane: BP Time Frequency Figure 3.1: Analyzing the signal Carbon with a wavelet packet dictionary. point of the simplex, as the interior-point method converges, the current iterate x (k) approaches the boundary. One may abandon the basic interior-point iteration and invoke a "crossover" procedure that uses simplex iterations to find the optimizing extreme point. Translating this LP algorithm into BP terminology, one starts from a solution to the overcomplete representation problem \Phia iteratively modifies the coefficients, maintaining feasibility \Phia applying a transformation that effectively sparsifies the vector a (k) . At some iteration, the vector has - n significantly nonzero entries, and it "becomes clear" that those correspond to the atoms appearing in the final solution. One forces all the other coefficients to zero and "jumps" to the decomposition in terms of the - n selected atoms. (More general interior-point algorithms start with a (0) ? 0 but don't require the feasibility \Phia 3.2 Examples We now give computational examples of BP in action. 3.2.1 Carbon The synthetic signal Carbon is a composite of 6 atoms: a Dirac, a sinusoid, and 4 mutually orthogonal wavelet packet atoms, adjacent in the time-frequency plane. The wavelet packet dictionary of depth employed, based on filters for Symmlets with 8 vanishing moments. (Information about problem sizes for all examples is given in Table 1). Figure 3.1 displays the results in phase-plane form; for comparison, we include the phase planes obtained using MOF, MP, and BOB. First, note that MOF uses all basis functions that are not orthogonal to the 6 atoms, i.e. all the atoms at times and frequencies that overlap with some atom appearing in the signal. The corresponding phase plane is very diffuse or smeared out. Second, MP is able to do a relatively good job on the sinusoid and the Dirac, but makes mistakes in handling the 4 close atoms. Third, BOB cannot handle the nonorthogonality between the Dirac and the cosine; it gives a distortion (a coarsening) (a) Signal: FM Time Frequency (f) PhasePlane: BP Time Frequency Time Frequency Time Frequency Time Frequency Figure 3.2: Analyzing the signal FM-Cosine with a cosine packet dictionary. of the underlying phase plane picture. Finally, BP finds the "exact" decomposition in the sense that the four atoms in the quad, the Dirac and the sinusoid are all correctly identified. 3.2.2 TwinSine Recall that the signal TwinSine in Figure 2.4a consists of 2 cosines with frequencies closer together than the Rayleigh distance. In Figure 2.4d, we analyze these in the 4-fold over-complete discrete cosine dictionary. Recall that in this example, MP began by choosing at the first step a frequency in between the two ideal ones and then never corrected the error. In contrast, BP resolves the two frequencies correctly. 3.2.3 FM Signal Figure 3.2a displays the artificial signal FM-Cosine consisting of a frequency-modulated sinusoid superposed with a pure sinusoid: Figure 3.2b shows the ideal phase plane. In Figure 3.2c-f we analyze it using the cosine packet dictionary based on a primitive bell of width 16 samples. It is evident that BOB cannot resolve the nonorthogonality between the sinusoid and the FM signal. Neither can MP. However, BP yields a clean representation of the two structures. 3.2.4 Gong Figure 3.3a displays the Gong signal, which vanishes until time t 0 and then follows a decaying sinusoid for t ? t 0 . In Figures 3.3b-3.3d, we analyze it with the cosine packet dictionary based on a primitive bell of width samples. BP gives the finest representation of the decay structure; visually somewhat more interpretable than the BOB and MP results. 0(a) Signal: Gong (c) Phase Plane: MOF Time Frequency Time Frequency Time Frequency Time Frequency Figure 3.3: Analyzing the signal Gong with a cosine packet dictionary. 3.3 Comparisons We briefly compare BP with the three main methods introduced in Section 2.3. 3.3.1 Matching Pursuit At first glance MP and BP seem quite different. MP is an iterative algorithm, which does not explicitly seek any overall goal, but merely applies a simple rule repeatedly. In contrast, BP is a principle of global optimization without any specified algorithm. The contrast of Orthogonal MP with a specific algorithm, BP-Simplex, may be instructive. Orthogonal Matching Pursuit starts from an "empty model" and builds up a signal model an atom at a time, at each step adding to the model only the most important new atom among all those not so far in the model. In contrast, BP-Simplex, starts from a "full" model (i.e. representation of the object in a basis) and then iteratively improves the "full" model, by taking relatively useless terms out of the model, swapping them for useful new ones. Hence, MP is a sort of build-up approach, while BP-Simplex is a sort of swap-down approach. To make BP and BOB most comparable, suppose that they are both working with a cosine packet dictionary, and note that the ' 1 -norm of coefficients is what Coifman and [6] call an "additive measure of information". So suppose we apply the . Then the two methods compare as follows: in BOB, we are optimizing E only over orthogonal bases taken from the dictionary, while in BP we are optimizing E over all bases formed from the dictionary. This last remark suggests that it might be interesting to apply the BOB procedure with the ' 1 norm as entropy in place of the standard Coifman-Wickerhauser entropy. In Figure 2.6c we try this on the WernerSorrows example of Section 2.3.3. The signal is analyzed in a cosine packet dictionary, with primitive bell width 16. The ' 1 entropy results in a time-varying basis that reveals clearly some of the underlying signal structure. The ' 1 entropy Phase Plane: BP Iteration Time Frequency Time Frequency Time Frequency Time Frequency Time Frequency Time Frequency Figure 3.4: Phase plane evolution at BP-Interior iteration. by itself improves the performance of BOB; but BP does better still (Figure 2.6d). This connection between BP and BOB suggests an interesting algorithmic idea. In the standard implementation of the simplex method for LP, one starts from an initial basis and then iteratively improves the basis by swapping one term in the basis for one term not in the basis, using the swap that best improves the objective function. Which initial basis? It seems natural in BP-Simplex to use the Coifman-Wickerhauser algorithm and employ as a start the best orthogonal basis. With this choice of starting basis, BP can be seen as a method of refining BOB by swapping in non-orthogonal atoms in place of orthogonal ones whenever this will improve the objective. 3.3.3 Method of Frames As already discussed, MOF and BP differ in the replacement of an l 2 objective function by an l 1 objective. BP-Interior has an interesting relation to the Method of Frames. BP- Interior initializes with the Method of Frames solution. Hence one can say that BP sequentially "improves" on the Method of Frames. Figure 3.4 shows a "movie" of BP-Interior in action on the FM-Cosine example, using a cosine packet dictionary. Six stages in the evolution of the phase plane are shown, and one can see how the phase plane improves in clarity, step-by-step. Variations The recent development of time-frequency dictionaries motivates most of what we have done so far. However, the methods we have developed are general and can be applied to other dictionaries, with interesting results. 4.1 Stationary Smooth Wavelets The usual (orthonormal) dictionaries of (periodized) smooth wavelets consist of wavelets at scales indexed by at the j-th scale, there are 2 j wavelets of width . The wavelets at this scale are all circulant shifts of each other, the shift being n=2 j samples. Some authors [32] have suggested that this scheme can be less than satisfactory, essentially because the shift between adjacent wavelets is too large. They would say that if the important "features" of the signal are (fortuitously) "aligned with" the wavelets in the dictionary, then the dictionary will provide a sparse representation of the signal; however, because there are so few wavelets at level j, then most likely, the wavelets in the dictionary are not "precisely aligned" with features of interest, and the dictionary may therefore provide a very diffuse representation. The stationary wavelet dictionary has, at the j-th level, n (not are all the circulant shifts of the basic wavelet of width - n=2 j . Since this dictionary always contains wavelets "aligned with" any given feature, the hope is that such a dictionary provides a superior representation. Panel 4.1a shows the signal HeaviSine, and 4.1b shows the result of BP with the Stationary Symmlet-8 dictionary mentioned in Section 2.1; the coefficients are displayed in a multi-resolution fashion, where at level j all the coefficients of scale 2 j =n are plotted according to spatial position. There is a surprisingly close agreement of the BP representation in a stationary wavelet dictionary with ideas about signal representation associated with the "Multi-Scale Edges" ideas of Mallat and Hwang [22]. The Multi-Scale Edge method analyzes the continuous wavelet transform (CWT) at scale 2 \Gammaj and identifies the maxima of this transform. Then it selects maxima that are "important" by thresholding based on amplitude. These "im- portant" maxima identify important features of the signal. Mallat and Hwang proposed an iterative method that reconstructs an object having the same values of the CWT at "maxima". This is almost (but not quite) the same thing as saying that one is identifying "important" wavelets located at the corresponding maxima, and reconstructing the object using just those maxima. Panel 4.1c shows a CWT of HeaviSine based on the same Symmlet-8 wavelet, again in multi-resolution fashion; Panel 4.1d shows the maxima of the CWT. At fine scales, there is virtually a 1-1 relationship between the maxima of the transform and the wavelets selected by BP; compare panel 4.1b. So in a stationary wavelet dictionary, the global optimization principle BP yields results that are close to certain heuristic methods. An important contrast: Meyer has a counterexample to multi-scale edge approaches, showing that the Mallat-Hwang approach may fail in certain cases [26]; but there can be no such counterexamples to BP. 4.2 Dictionary Mergers An important methodological tool is the ability to combine dictionaries to make bigger, more expressive dictionaries. We mention here two possibilities. Examples of such decompositions are given in Section 5 below. Jump+Sine. Merge the Heaviside dictionary with a Fourier dictionary. Either dictionary can efficiently represent objects that the other cannot; for example, Heavisides have difficulty representing sinusoids, while sinusoids have difficulty representing jumps. Their combination might therefore be able to offer the advantages of both. (a) Signal: HeaviSine -22 Position log(resolution) (b) Coefs from BP on HeaviSine -22 Position log(resolution) (c) Coefs from CWT on HeaviSine -22 Position log(resolution) (d) Mutiscale Edges Representation of HeaviSine Figure 4.1: Analyzing the signal HeaviSine with a stationary wavelet dictionary. Jump+Wavelet. For similar reasons, one might want to merge Heavisides with Wavelets. In fact, we have found it sometimes preferable instead to merge "tapered heavisides" with wavelets; these are step discontinuities that start at 0, jump at time t 0 to a level one unit higher, and later decay to the original 0 level. De-Noising We now adapt BP to the case of noisy data. We assume data of the form where (z i ) is a standard white Gaussian noise, oe ? 0 is a noise level, and s is the clean signal. In this setting, s is unknown, while y is known. We don't want to get an exact decomposition of y, so we don't apply BP directly. Instead decompositions like (1.2) become relevant. 5.1 Proposal Basis Pursuit De-Noising (BPDN) refers to solution of min The solution a (-) is a function of the parameter -. It yields a decomposition into signal-plus-residual: where s . The size of the residual is controlled by -. As - ! 0, the residual goes to zero and the solution behaves exactly like BP applied to y. As - !1, the residual gets large; we have r (-) ! y and s (-) ! 0. Recently Michael Saunders and Shaobing Chen have shown that (5.1) is equivalent to the following perturbed linear program: subject to Ax Perturbed linear programming is really quadratic pro- gramming, but retains structure similar to linear programming. Hence we can have a similar classification of algorithms, into BPDN-Simplex and BPDN-Interior-Point types. (In quadratic programming, "simplex like" algorithms are usually called Active Set algorithms, so our label is admittedly nonstandard.) 5.2 Choice of - Assuming the dictionary is normalized so that kOE fl, we set - to the value where p is the cardinality of the dictionary. This can be motivated as follows. In the case of a dictionary that is an orthonormal basis, a number of papers [11, 14] have carefully studied an approach to de-noising by so-called "soft-thresholding in an orthonormal basis". In detail, suppose that \Phi is an orthogonal matrix, and define empirical OE-coefficients by Define the soft threshold nonlinearity j - and define the thresholded empirical coefficients by This is soft thresholding of empirical orthogonal coefficients. The papers just cited show that thresholding at - n has a number of optimal and near-optimal properties as regards mean-squared error. We claim that (again in the case of an ortho-basis) the thresholding estimate - ff is also the solution of (5.1). Observe that the soft thresholding nonlinearity solves the scalar minimum problem: Note that, because of the orthogonality of \Phi, so we can rewrite (5.1) in this case as min Now applying (5.2) coordinatewise establishes the claim. The scheme we have suggested here - to be applied in overcomplete as well as orthogonal settings - therefore includes soft-thresholding in ortho-bases as a special case. Formal arguments similar to those in [13] can be used to give a proof that mean-squared error properties of the resulting procedure are near-optimal under certain conditions. (d) Recovered: BOB (f) Recovered: BP (c) Recovered: MOF (a) Signal: Gong (b) The Noised: Figure 5.1: De-Noising noisy Gong with a cosine packet dictionary. 5.3 Examples We present two examples of BPDN in action with time-frequency dictionaries. We compare BPDN with three other de-noising methods adapted from MOF, MP and BOB. Method- of-Frames De-Noising (MOFDN) refers to minimizing the least square fit error plus a l 2 penalizing term: min a ks 2where - is a penalizing parameter; we chose - in these examples to be oe log(p). Matching Pursuit De-Noising (MPDN) runs Matching Pursuit until the coefficient associated with the selected atom gets below the threshold oe. The Best Orthogonal Basis De-Noising (BOBDN) is a thresholding scheme in the best orthogonal basis chosen by the BOB algorithm with a special entropy [12]. 5.3.1 Gong Figure 5.1 displays de-noising results on the signal Gong, at signal to noise ratio 1, using a cosine packet dictionary. Panel a) displays the noiseless signal and panel b) displays a noisy version. Panels c)-f) display de-noising results for MOF, BOB, MP, and BP, respectively. BP outperforms the other methods visually. 5.3.2 TwinSine Figure 5.2 employs the signal TwinSine, described earlier, to investigate super-resolution in the noisy case. Panels a) and b) give the noiseless and noisy TwinSine, respectively. Using a 4-fold overcomplete discrete cosine dictionary, reconstructions by the MOF, MP, and by BPDN are given. MOF gives a reconstruction that is inherently resolution-limited and oscillatory. As in the noiseless case, MP gives a reconstruction that goes wrong at selects the average of the two frequencies in the TwinSine signal. BP correctly resolves the non-negative doublet structure. (a) TwinSine (b) Noised TwinSine, (c) DCT transform Frequency/Nyquist (d) MOF Coefs Frequency/Nyquist Frequency/Nyquist (f) BP Coefs Frequency/Nyquist Figure 5.2: De-Noising noisy TwinSine-2 with a 4-fold overcomplete discrete cosine dictionary 5.4 Total Variation De-Noising Recently, Rudin, Osher and Fatemi [28] have called attention to the possibility of de-noising images using total-variation penalized least-squares. More specifically, they propose the optimization problem min g2 where TV (g) is a discrete measure of the total variation of g. A solution of this problem is the de-noised object. Li and Santosa [20] have developed an alternative algorithm for this problem based on interior-point methods for convex optimization. For the 1-dimensional case (signals rather than images) it is possible to implement what amounts to total variation de-noising by applying BPDN with a Heaviside dictionary. Indeed, if s is an arbitrary object, it has a unique decomposition in Heavisides (recall (2.1)). Suppose that the object is 0 at and that the decomposition is ; then the total variation is given by Moreover to get approximate equality even for objects not obeying zero-boundary condi- tions, one has only to normalize OE 0 appropriately. Consequently, total variation de-noising is essentially a special instance of our proposal (5.1). We have studied BPDN in the Heaviside dictionary, thereby obtaining essentially a series of tests of TV De-Noising. For comparison, we considered also soft thresholding in orthogonal wavelet dictionaries based on the S8-Symmlet smooth wavelet. We also constructed a new dictionary, based on the Jump+Wave merger of S8-Symmlet wavelets with "Smoothly Tapered Heavisides", which is to say, atoms OE fl that jump at a given point fl and then decay smoothly away from the discontinuity. For comparability with the Heaviside dictionary, we normalized the Jump+Wave dictionary so that every kOE fl k TV - 1. (a) Signal: Blocks (d) BPDeNoise: Heaviside (f) BPDeNoise: Jump+Wave (c) Sorted Coefs Order Amplitude Dotted: Heaviside Wave Jump+Wave bpfig54.m 16-May-95 Figure 5.4: TV DeNoise Signal Figure 5.3: De-Noising noisy Blocks. A typical result, for the object Blocky, is presented in Figure 5.3. From the point of view of visual appearance, total variation reconstruction (panel d) far outperforms the other methods. Of course, the object Blocky has a very sparse representation in terms of Heavisides. When we consider an object like Cusp, which is piecewise smooth rather than piecewise constant, the object will no longer have a sparse representation. On the other hand, using the Jump+Wave dictionary based on a merger of wavelets with tapered Heavisides will lead to a sparse representation - see Figure 5.4c. One can predict that a Heaviside dictionary will perform less well than this merged dictionary. This completely obvious comment, translated into a statement about total variation de- noising, becomes a surprising prediction. One expects that the lack of sparse representation of smooth objects in the Heaviside dictionary will translate into worse performance of TV de-noising than of BPDN in the merged Jump+Wave dictionary. To test this, we conducted experiments. Figure 5.4 compares de-noising, and BPDN in the merged Jump+Wave dictionary. TV De-Noising now exhibits visually distracting stairstep artifacts; the dictionary Jump+Wave seems to us to behave much better. 6 Solutions of Large-Scale Linear Programs As indicated in Section 3.1, the optimization problem (3.1) is equivalent to a linear program (3.2). Also, as in Section 5.1, the optimization problem (5.1) is equivalent to a perturbed linear program (5.3). The problems in question are large-scale; we have conducted decompositions of signals of length in a wavelet packet dictionary, leading to a linear program of size 8192 by 212; 992. Over the last ten years there has been a rapid expansion in the size of linear programs that have been successfully solved using digital computers. A good overview of the recent rapid progress in this field and the current state of the art is afforded by the article of Lustig, (a) Signal: Cusp (c) Sorted Coefs Order Amplitude Dotted: Heaviside Wave Jump+Wave bpfig56.m 16-May-95 Figure 5.6: Dictionary Merge Signal Figure 5.4: De-Noising noisy Cusp. Marsten and Shanno [21] and the accompanying discussions by Bixby [1], Saunders [31], Todd [33], and Vanderbei [34]. Much of the rapid expansion in the size of linear programs solved is due to the "Interior Point revolution" initiated by Karmarkar's proof that a pseudo-polynomial time algorithm could be based on an interior-point method [18]. Since then a very wide array of interior-point algorithms have been proposed and considerable practical [21] and theoretical [27] understanding is now available. In this section we describe our algorithm and our experience with it. 6.1 Duality Theory We consider the linear program in the standard form subject to This is often called the primal linear program. The primal linear program is equivalent to the dual linear program subject to A T y x is called the primal variable; y and z are called the dual variables. The term "primal refers to the quantity kb \Gamma Axk 2 ; the term "dual infeasibility" refers to kc \Gamma the term "duality gap" refers to the difference between the primal objective and the dual objective: c T y. A fundamental theorem of linear programming states that (x; solves the linear program (6.1) if and only if the primal infeasibility, the dual infeasibility and the duality gap are all zero. Therefore when (x; are nearly primal feasible and nearly dual feasible, the duality gap offers a good description about the accuracy of (x; as a solution: the smaller the duality gap is, the closer (x; are to the optimal solution. 6.2 A Primal-Dual Log-Barrier LP Algorithm Mathematical work on interior-point methods over the last ten years has led to a large variety of approaches, with names like projective scaling, (primal/dual) affine scaling, (pri- mal/dual) logarithmic barrier and predictor-corrector. We cannot summarize all these ideas here; many of them are mentioned in [21] and others are covered in the references of that article. Our approach is based on a primal-dual log-barrier algorithm. In order to regularize standard LP, Gill et al. [15] proposed solving the following perturbed LP: subject to Ax where fl and ffi are normally small (e.g. regularization parameters. (We comment that such a perturbed LP with solves the BPDN problem (5.1)). The main steps of the interior point algorithm are as follows: 1. Set parameters: the feasibility tolerance FeaTol, the duality gap tolerance PDGapTol, the two regularization parameters fl and ffi . 2. Initialize x ? 0; 3. Loop (a) Set where X and Z are diagonal matrices composed from x and z. (b) Solve for 4y and set (c) Calculate the primal and dual step sizes ae p ; ae d and update the variables: (d) Increase k by 1. 4. Until the following three conditions are satisfied: (a) Primal Infeasibility FeaTol. (b) Dual FeaTol. (c) Duality For fuller discussions of this and related algorithms, again see [15] or references there. While in principle we could have based our approach on other interior-point schemes, the primal-dual approach naturally incorporates several features we found useful. First, the iterates z do not have to be feasible. We are only able to choose a starting point that is nearly feasible and remain nearly feasible throughout the sequence of iterations. Second, after both primal and dual feasibility have been nearly achieved, it is easy to check for closeness to the solution value; at the limiting solution c T x and the duality gap quantifies the distance from this ideal. 6.3 Implementation Heuristics The primal-dual log barrier algorithm we just described works in a fashion similar to other interior-point methods [21]. It starts from an initial feasible (or nearly feasible) solution located at or near the "center" of the feasible region, and iteratively improves the current solution until the iterates (x; achieve the desired accuracy. It requires a relatively small number of iterations: for example, a few dozen iterations would be common. Each iteration requires the solution of a system of equations involving A, A T , and other problem data like x; z. In the primal-dual log barrier method, the system is (6.4). Thus the numerical solution to a linear program by interior-point methods amounts to a sequence of several dozen solutions of special systems of linear equations. This leads to a slogan: if those systems can be solved rapidly, then it is possible to solve the LP rapidly. Of course, in general solving systems of equations is not rapid: a general n by n system takes order O(n 3 ) time to solve by standard elimination methods or by modern stable factorization schemes [17, 16]. In order for practical algorithms to be based on the interior-point heuristic, it is necessary to be able to solve the systems of equations much more rapidly than one could solve general systems. In the current state of the art of linear programming [31], one attempts to do this by exploiting sparsity of the underlying matrix A. However, the optimization problems we are interested in have a key difference from the successful large-scale applications outlined in [21]. The matrix A we deal with is not at all sparse; it is generally completely dense. For example, if A is generated from a Fourier dictionary, most of the elements of A will be of the same order of magnitude. Because of this density, it is unlikely that existing large-scale interior-point computer codes could be easily applied to the problems described in this paper. In our application we have a substitute for sparsity. We consider only dictionaries that have fast implicit algorithms for \Phia and \Phi T s, and therefore lead to linear programs where the A matrix admits fast implicit algorithms for both Au and A T v. Now whenever one has fast implicit algorithms, it is natural to think of solving equations by conjugate-gradient methods; such methods allow one to solve equations using only products Bv with various strategically chosen vectors v. Adapting such ideas, one develops fast implicit algorithms for (ADA and attempts to solve the central equations (6.4) iteratively, avoiding the costly step of explicitly forming the matrices (ADA In our application, we do not really need an exact solution of the optimization problem. Moreover, we have a natural initial solution - from MOF - that would be viewed by some researchers as already an acceptable method of atomic decomposition. By starting from this decomposition and applying a strategy based on a limited number of iterations of our algorithm, we get what we view as an iterative improvement on MOF. Compare Figure 3.4. CPU Running Time in Seconds Figure Signal Problem Size MOF BOB MP BP Figure 2.4 TwinSine 256 .3500 - .6667 7.517 Figure 2.6 WernerSorrows 1024 - .9500 - 158.2 Figure 3.1 Carbon 1024 .2000 2.617 2.650 11.70 Figure 3.2 FM-Cosine 1024 1.050 .9333 182.9 150.2 Figure 3.3 Gong 1024 1.433 5.683 50.63 448.2 Figure 4.1 HeaviSine 256 - 26.92 Figure 5.1 Noisy Gong 1024 2.117 6.767 8.600 142.2 Figure 5.2 Noisy TwinSine 256 .4167 - .6833 5.717 Table 1: CPU Running Times of the Examples We stress that our strategy is to "pursue an optimal basis"; while we would like to reach the optimal basis, we make no specific claims that we can always reach it in reasonable time; perhaps the "pursuit" language will help remind one of this fact. We do believe that the pursuit process, carried out for whatever length of time we are willing to invest in it, makes a useful improvement over the Method of Frames. 6.4 Routine Settings For BP Our strategy for routine signal processing by BP is as follows: ffl We employ the "primal-dual logarithmic barrier method" for perturbed LP [15]. ffl We suppose fast implicit algorithms for Aa and A T s. ffl We only aim to reach an approximate optimum. would usually suffice for this. ffl Each barrier iteration involves approximate solution of the central equations (6.4) using the conjugate-gradient method, e. g. at accuracy We refer the reader to [4] for more detailed discussion of the our implementation. 6.5 Complexity Analysis Table 1 displays the CPU times in seconds spent in running various atomic decomposition techniques in our experiments; all computation was done on a Sun Sparc20 workstation. We employ a conjugate-gradient solver for the generalized inverse in the MOF solution (2.4); the resulting algorithm for MOF has a complexity order O(n log(n)). We implement Coifman and Wickerhauser's BOB algorithm [6], which also has a complexity of order O(n log(n)). We observe that BP is typically slower than MOF and BOB. BP is also slower than MP (which has a quasi-linear complexity, depending on the number of chosen atoms) except on the FM-Cosine signal in Figure 3.2. Several factors influence the running time of Basis Pursuit: 1. Problem Sizes. The complexity goes up "quasi-linearly" as the problem size increases [4]. 2. Parameter Settings. The complexity of our primal-dual logarithmic barrier interior-point implementation depends on both the the accuracy of the solution and the accuracy of the conjugate-gradient solver. The accuracy of the solution is determined by the two parameters FeaTol, PDTol controlling the number of barrier iterations, and the parameter CGAccuracy, which decides the accuracy of the CG solver and consequently the number of CG iterations. As the required solution accuracy goes up, the complexity goes up drasti- cally. We recommend setting FeaTol, PDGapTol and CGAccuracy at 10 \Gamma1 for routine signal processing; we recommend 10 \Gamma2 or 10 \Gamma3 when one is interested in superresolution. We used the setting 10 \Gamma1 for the computational experiments presented in Figures 2.6, 3.1, 3.2, 3.3, 5.1 and 5.1. In Figures 2.5, 3.2 and 5.1, we attempted to super-resolve two cosines with close frequencies; thus we use the setting 10 \Gamma2 . In Figure 4.1, we used the setting 10 \Gamma3 . 3. Signal Complexity. When the signal has a very sparse representation, the algorithm converges quickly. The signal Carbon, which contains only 6 atoms from a wavelet packet dictionary, takes about 10 seconds, whereas it takes about 7 minutes for the signal Gong, which is much more complex. 4. Basis Pursuit versus Basis Pursuit De-Noising. We employ the same interior-point implementation for BP and BPDN, except for a difference in the value of the regularization parameter ffi: ffi is small, e.g. 10 \Gamma4 for BP, while BPDN. The choice it regularizes the central equations to be solved at each barrier iteration. Thus the BPDN implementation seems to converge more quickly than the BP implementation. For example, according to our experiments [4], it takes only 3 minutes to perform BPDN on the noisy Gong signal of length 1024 with a cosine packet dictionary at the parameter setting it takes about 8 hours to perform BP on the signal Gong at the same parameter setting. 6.6 Reproducible Research This paper has been written following the discipline of Reproducible Research described in [3]. As a complement to this article, we are releasing the underlying software environment by placing it on internet for access either by anonymous FTP or WWW browsers. Web Browser: http://playfair.stanford.edu/~schen/Atomizer.html FTP Client: playfair.stanford.edu file: pub/chen-s/Atomizer0600.tar.Z For reasons of space we refer the reader to [4] for a discussion of related work in statistics and elsewhere. --R Progress in linear programming. Least Absolute Deviations: Theory WaveLab and reproducible research. Remarques sur l'analyze de Fourier Linear Programming and Extensions. Ten Lectures on Wavelets. Some remarks on greedy algorithms. de-noising in an orthonormal basis chosen from a library of bases Empirical atomic decomposition. Wavelet shrinkage: asymptopia? Solving reduced KKT systems in barrier methods for linear and quadratic programming. Numerical Linear Algebra and Optimization. Matrix Computations A new polynomial-time algorithm for linear programming A primal-dual interior point algorithm for linear programming An affine scaling algorithm for minimizing total variation in image enhancement. Interior point methods for linear program- ming: computational state of the art detection and processing with wavelets. Matching Pursuit in a time-frequency dictionary On finding primal- and dual- optimal bases Ondelettes sur l'intervalle. Wavelets: Algorithms and Applications. Nonlinear total-variation-based noise removal algorithms Orthogonal matching pursuit: recursive function approximation with applications to wavelet decomposition. Signal representation using adaptive normalized Gaussian functions. Major Cholesky would feel proud. Shiftable multiscale transforms. Theory and practice for interior point methods. Interior point methods: algorithms and formulations. --TR --CTR Anders la Cour-Harbo, Fast estimation of optimal sparseness of music signals, Proceedings of the 24th IASTED international conference on Signal processing, pattern recognition, and applications, p.205-209, February 15-17, 2006, Innsbruck, Austria M. E. Davies , L. Daudet, Sparse audio representations using the MCLT, Signal Processing, v.86 n.3, p.457-470, March 2006 Yuanqing Li , Andrzej Cichocki , Shun-ichi Amari, Analysis of sparse representation and blind source separation, Neural Computation, v.16 n.6, p.1193-1234, June 2004 Zoltn Szab , Andrs Lrincz, -Sparse representations: generalized sparse approximation and the equivalent family of SVM tasks, Acta Cybernetica, v.17 n.3, p.605-614, January 2006 Tong Zhang, Approximation bounds for some sparse kernel regression algorithms, Neural Computation, v.14 n.12, p.3013-3042, December 2002 Prasanth B. Nair , Arindam Choudhury , Andy J. Keane, Some greedy learning algorithms for sparse regression and classification with mercer kernels, The Journal of Machine Learning Research, 3, 3/1/2003 Shachar Fleishman , Iddo Drori , Daniel Cohen-Or, Bilateral mesh denoising, ACM Transactions on Graphics (TOG), v.22 n.3, July Peng Xu , Dezhong Yao, Two dictionaries matching pursuit for sparse decomposition of signals, Signal Processing, v.86 n.11, p.3472-3480, November 2006 Joel A. Tropp, Algorithms for simultaneous sparse approximation: part II: Convex relaxation, Signal Processing, v.86 n.3, p.589-602, March 2006 Yaakov Tsaig , David L. Donoho, Breakdown of equivalence between the minimal l1-norm solution and the sparsest solution, Signal Processing, v.86 n.3, p.533-548, March 2006 Chiranjib Bhattacharyya, Second Order Cone Programming Formulations for Feature Selection, The Journal of Machine Learning Research, 5, p.1417-1433, 12/1/2004 Gradient LASSO for feature selection, Proceedings of the twenty-first international conference on Machine learning, p.60, July 04-08, 2004, Banff, Alberta, Canada Roger Koenker, Quantile regression for longitudinal data, Journal of Multivariate Analysis, v.91 n.1, p.74-89, October 2004 Balaji Krishnapuram , Lawrence Carin , Mario A. T. Figueiredo , Alexander J. Hartemink, Sparse Multinomial Logistic Regression: Fast Algorithms and Generalization Bounds, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.27 n.6, p.957-968, June 2005 Bob L. Sturm , Laurent Daudet , Curtis Roads, Pitch-shifting audio signals using sparse atomic approximations, Proceedings of the 1st ACM workshop on Audio and music computing multimedia, October 27-27, 2006, Santa Barbara, California, USA Pando Georgiev , Panos Pardalos , Fabian Theis, A bilinear algorithm for sparse representations, Computational Optimization and Applications, v.38 n.2, p.249-259, November 2007 F. Malgouyres, Image Compression Through a Projection onto a Polyhedral Set, Journal of Mathematical Imaging and Vision, v.27 n.2, p.193-200, February 2007 Tong Zhang, On the Dual Formulation of Regularized Linear Systems with Convex Risks, Machine Learning, v.46 n.1-3, p.91-129, 2002 Sayan Mukherjee , Qiang Wu, Estimation of Gradients and Coordinate Covariation in Classification, The Journal of Machine Learning Research, 7, p.2481-2514, 12/1/2006 Yutaka Ohtake , Alexander Belyaev , Hans-Peter Seidel, Sparse surface reconstruction with adaptive partition of unity and radial basis functions, Graphical Models, v.68 n.1, p.15-24, January 2006 Shihao Ji , Lawrence Carin, Bayesian compressive sensing and projection optimization, Proceedings of the 24th international conference on Machine learning, p.377-384, June 20-24, 2007, Corvalis, Oregon Anna C. Gilbert , S. Muthukrishnan , Martin J. Strauss, Approximation of functions over redundant dictionaries using coherence, Proceedings of the fourteenth annual ACM-SIAM symposium on Discrete algorithms, January 12-14, 2003, Baltimore, Maryland Lorenzo Peotta , Lorenzo Granai , Pierre Vandergheynst, Image compression using an edge adapted redundant dictionary and wavelets, Signal Processing, v.86 n.3, p.444-456, March 2006 Cheng-En Guo , Song-Chun Zhu , Ying Nian Wu, Modeling Visual Patterns by Integrating Descriptive and Generative Methods, International Journal of Computer Vision, v.53 n.1, p.5-29, June Arthur E. C. Pece, On the computational rationale for generative models, Computer Vision and Image Understanding, v.106 n.1, p.130-143, April, 2007 Sayan Mukherjee , Ding-Xuan Zhou, Learning Coordinate Covariances via Gradients, The Journal of Machine Learning Research, 7, p.519-549, 12/1/2006 Yaakov Tsaig , David L. Donoho, Extensions of compressed sensing, Signal Processing, v.86 n.3, p.549-571, March 2006 Fabian J. Theis , Gonzalo A. Garca, On the use of sparse signal decomposition in the analysis of multi-channel surface electromyograms, Signal Processing, v.86 n.3, p.603-623, March 2006 R. Gribonval , R. M. Figueras i Ventura , P. Vandergheynst, A simple test to check the optimality of a sparse signal approximation, Signal Processing, v.86 n.3, p.496-510, March 2006 Alexander J. Smola , Bernhard Schlkopf, Bayesian kernel methods, Advanced lectures on machine learning, Springer-Verlag New York, Inc., New York, NY, Fabian J. Theis , Pando Georgiev , Andrzej Cichocki, Robust sparse component analysis based on a generalized Hough transform, EURASIP Journal on Applied Signal Processing, v.2007 n.1, p.86-86, 1 January 2007 Charles A. Micchelli , Massimiliano Pontil, Feature space perspectives for learning the kernel, Machine Learning, v.66 n.2-3, p.297-319, March 2007 Sylvain Fischer , Rafael Redondo , Laurent Perrinet , Gabriel Cristbal, Sparse approximation of images inspired from the functional architecture of the primary visual areas, EURASIP Journal on Applied Signal Processing, v.2007 n.1, p.122-122, 1 January 2007 L. Daudet , B. Torrsani, Hybrid representations for audiophonic signal encoding, Signal Processing, v.82 n.11, p.1595-1617, November 2002 F. Malgouyres, Rank related properties for Basis Pursuit and total variation regularization, Signal Processing, v.87 n.11, p.2695-2707, November, 2007 Alexander M. Bronstein , Michael M. Bronstein , Michael Zibulevsky, Blind source separation using block-coordinate relative Newton method, Signal Processing, v.84 n.8, p.1447-1459, August 2004 Yee Whye Teh , Max Welling , Simon Osindero , Geoffrey E. Hinton, Energy-based models for sparse overcomplete representations, The Journal of Machine Learning Research, 4, 12/1/2003 Yee Whye Teh , Max Welling , Simon Osindero , Geoffrey E. Hinton, Energy-based models for sparse overcomplete representations, The Journal of Machine Learning Research, v.4 n.7-8, p.1235-1260, October 1 - November 15, 2004 Cynthia Dwork , Frank McSherry , Kunal Talwar, The price of privacy and the limits of LP decoding, Proceedings of the thirty-ninth annual ACM symposium on Theory of computing, June 11-13, 2007, San Diego, California, USA Masashi Sugiyama , Klaus-Robert Mller, The subspace information criterion for infinite dimensional hypothesis spaces, The Journal of Machine Learning Research, 3, p.323-359, 3/1/2003 Mark D. Plumbley , Samer A. Abdallah , Thomas Blumensath , Michael E. Davies, Sparse representations of polyphonic music, Signal Processing, v.86 n.3, p.417-431, March 2006 Pavel Kisilev , Michael Zibulevsky , Yehoshua Y. Zeevi, A multiscale framework for blind separation of linearly mixed signals, The Journal of Machine Learning Research, 4, 12/1/2003 Alexander J. Smola , Sebastian Mika , Bernhard Schlkopf , Robert C. Williamson, Regularized principal manifolds, The Journal of Machine Learning Research, 1, p.179-209, 9/1/2001 Pavel Kisilev , Michael Zibulevsky , Yehoshua Y. Zeevi, A multiscale framework for blind separation of linearly mixed signals, The Journal of Machine Learning Research, v.4 n.7-8, p.1339-1364, October 1 - November 15, 2004 Gianluca Monaci , scar Divorra Escoda , Pierre Vandergheynst, Analysis of multimodal sequences using geometric video representations, Signal Processing, v.86 n.12, p.3534-3548, December 2006 Model , Michael Zibulevsky, Signal reconstruction in sensor arrays using sparse representations, Signal Processing, v.86 n.3, p.624-638, March 2006 Mrio A. T. Figueiredo, Adaptive Sparseness for Supervised Learning, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.25 n.9, p.1150-1159, September Joseph F. Murray , Kenneth Kreutz-Delgado, Learning Sparse Overcomplete Codes for Images, Journal of VLSI Signal Processing Systems, v.46 n.1, p.1-13, January 2007 Joseph F. Murray , Kenneth Kreutz-Delgado, Learning Sparse Overcomplete Codes for Images, Journal of VLSI Signal Processing Systems, v.45 n.1-2, p.97-110, November 2006 Alex J. Smola , Bernhard Schlkopf, A tutorial on support vector regression, Statistics and Computing, v.14 n.3, p.199-222, August 2004 Zhe Chen , Simon Haykin, On different facets of regularization theory, Neural Computation, v.14 n.12, p.2791-2846, December 2002 Ivana Radulovic , Pascal Frossard, Multiple description coding with redundant expansions and application to image communications, Journal on Image and Video Processing, v.2007 n.1, p.8-8, January 2007 Olga Sorkine , Daniel Cohen-Or , Dror Irony , Sivan Toledo, Geometry-Aware Bases for Shape Approximation, IEEE Transactions on Visualization and Computer Graphics, v.11 n.2, p.171-180, March 2005 Kjersti Engan , Karl Skretting , John Hkon Husy, Family of iterative LS-based dictionary learning algorithms, ILS-DLA, for sparse signal representation, Digital Signal Processing, v.17 n.1, p.32-49, January, 2007 Gunnar Rtsch , Sebastian Mika , Bernhard Schlkopf , Klaus-Robert Mller, Constructing Boosting Algorithms from SVMs: An Application to One-Class Classification, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.24 n.9, p.1184-1199, September 2002 Hongxing Zou , Dianjun Wang , Xianda Zhang , Yanda Li, Nonnegative time-frequency distributions for parametric time-frequency representations using semi-affine transformation group, Signal Processing, v.85 n.9, p.1813-1826, September 2005
matching pursuit;time-frequency analysis;overcomplete signal representation;multiscale edges;time-scale analysis;interior-point methods for linear programming;denoising;wavelet packets;wavelets;total variation denoising;ell1 norm optimization;cosine packets
305225
Jacobi--Davidson Style QR and QZ Algorithms for the Reduction of Matrix Pencils.
Recently the Jacobi--Davidson subspace iteration method has been introduced as a new powerful technique for solving a variety of eigenproblems. In this paper we will further exploit this method and enhance it with several techniques so that practical and accurate algorithms are obtained. We will present two algorithms, JDQZ for the generalized eigenproblem and JDQR for the standard eigenproblem, that are based on the iterative construction of a (generalized) partial Schur form. The algorithms are suitable for the efficient computation of several (even multiple) eigenvalues and the corresponding eigenvectors near a user-specified target value in the complex plane. An attractive property of our algorithms is that explicit inversion of operators is avoided, which makes them potentially attractive for very large sparse matrix problems.We will show how effective restarts can be incorporated in the Jacobi--Davidson methods, very similar to the implicit restart procedure for the Arnoldi process. Then we will discuss the use of preconditioning, and, finally, we will illustrate the behavior of our algorithms by a number of well-chosen numerical experiments.
Introduction . In this paper we expand on the usage of the Jacobi-Davidson method [26], [24] for the computation of several solutions of the generalized eigenproblem(# A- (1) where A and B are large and sparse (n n)-matrices, which may be complex and/or nonnormal. We will also discuss the standard eigenproblem (2) Of course, with I the generalized eigenproblem reduces to a standard eigen- problem, and we could have restricted ourselves to the generalized eigenproblem case. However, simplifications are possible when I that help reduce the memory requirements and the computational complexity, and some phenomena are easier to explain. Our algorithms are based on the Jacobi-Davidson method described in [26] and are adapted for generalized eigenproblems (and other polynomial eigenproblems) in [24]. We have modified the Jacobi-Davidson approach so that partial (general- ized) Schur forms are computed. The partial Schur forms have been chosen mainly # Received by the editors March 4, 1996; accepted for publication (in revised form) March 5, 1997; published electronically August 7, 1998. http://www.siam.org/journals/sisc/20-1/30007.html Department of Mathematics, Utrecht University, P.O. Box 80.010, NL-3508 Utrecht, The Netherlands (sleijpen@math.ruu.nl, vorst@math.ruu.nl). Current address: ISE Integrated Systems Engineering AG, Technopark Zurich, Technopark- strasse 1, CH-8005 Zurich, Switzerland (fokkema@ise.ch). 1 The family A - #B is called a matrix pencil, and the generalized eigenvalues #, solutions of (1), are also called eigenvalues of the matrix pencil (cf., e.g., [30]). for numerical stability, since they involve orthogonal bases. These bases are also useful for deflation, another ingredient of our algorithms. In the Jacobi-Davidson approach a low-dimensional search subspace is generated onto which the given eigenproblem is projected. This is the standard "Rayleigh- Ritz" procedure that also underlies the Lanczos, Arnoldi, and Davidson methods. The small projected eigenproblem is solved by standard techniques, and this leads to approximations for the wanted eigenvectors and eigenvalues of the given large problem. In the Davidson method [5], the solution of a simplified correction equation is used for the expansion of the search subspace. Following an old idea of Jacobi [11], we can also set up a correction equation, acting in the subspace orthogonal to the current eigenvector approximation, which defines an optimal orthogonal expansion of the search subspace. To be more precise, if the exact value for the eigenvalue is known, then the correction equation defines the exact eigenvector. This modification of Davidson's method is referred to as the Jacobi-Davidson method (note that this has nothing to do with the diagonal preconditioning that is popular in combination with Davidson's method). The "Jacobi" correction equation may be solved by any method of choice, and for large problems it is often more e#cient to solve this equation only approximately by some iterative method. The speed of convergence of this iterative method may be improved by preconditioning, and this is the only place where preconditioning is exploited in the Jacobi-Davidson method. It should be noted that this preconditioning does not a#ect the given eigenproblem. By including shifts in the Jacobi-Davidson method, and by a proper selection of the approximate eigenpair for the correction equation, the process can be tailored to find eigenpairs close to a given target value. More details will be given in sections 2.2 and 3. The small projected problem is reduced to (generalized) Schur form by the QZ method [15] or by QR [8] when I. The construction of the subspace and the projected system too, may be viewed as iterative inexact forms of QZ and QR. For this reason we have named our new methods JDQZ and JDQR, respectively. JDQZ produces a partial generalized Schur form for the generalized eigenproblem: a partial "QZ-decomposition"; JDQR generates a partial Schur form for the standard eigen- problem: a partial "QR-decomposition". Restarts form an essential ingredient of almost any iterative method, and also for the Jacobi-Davidson method, either for the computation of other eigenpairs, after one eigenpair has converged, or because of limits on the dimension of the subspaces (memory limitations). In any case, the usual restart procedure has the disadvantage that a subspace that may contain very useful information is replaced by one single vector, so that much valuable information may be lost. This problem has been solved elegantly for the Arnoldi method [28] (see also [17]), and our approach (cf. section 2.3) is related to this (see also [26, section 5.3]). In this approach the subspace is suitably filtered to retain as much relevant information as possible. Expansion and filtering are used in a repetitive way. The generalized eigenproblem in section 2 forms the heart of the paper. It is shown how (implicit) restart techniques and preconditioning can be used in order to get inverse-free computationally e#cient algorithms. The resulting algorithm, JDQZ, is enhanced with a deflation technique so that several solutions for the eigenproblem can be computed. The computation of interior eigenvalues is a normally a risky a#air, if we want to avoid shift-and-invert operations. We will discuss a rather robust technique based on the idea of harmonic Ritz values [16], [19], [26]. D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST Section 3 focuses on the standard eigenproblem. Of course, the standard eigenproblem can be viewed as a simplification of the generalized eigenproblem, and in an obvious way JDQZ simplifies to the JDQR method for standard eigenproblems. However, we have chosen to pay slightly more attention to the standard eigenproblem since this simplification makes it easier to discuss some computational aspects of our algorithms. In particular, we will consider the problem of preconditioning in more detail, and we will ponder on the observed speed of convergence using well-known arguments. In section 4, we illustrate the convergence behavior of JDQZ and JDQR with numerical experiments for a number of eigenproblems. Aspects that are investigated concern, among others, the e#ect of approximation errors on the solution of the correction equation (section 4.1), the e#ect of preconditioning (section 4.2), multiple eigen-values (section 4.6), interior eigenvalues (sections 4.3 and 4.7), di#erent approaches for the construction of the projected deflated problem (sections 4.3 and 4.7), and implicit versus explicit deflation (section 4.5). In section 5 we have collected some conclusions. Remark 1. All computations can be done in complex arithmetic if necessary. An alternative for real matrices would be to use quasi-Schur forms with 2 2 blocks on the diagonal, which can be computed in real arithmetic for real matrices. It is possible to derive a variant of Jacobi-Davidson based on this blocked form; we will not discuss this alternative variant here. Remark 2. With boldface letters we indicate that variables are associated with the large n-dimensional space, and for low-dimensional spaces we use italic letters. We use a tilde to indicate that a quantity approximates the corresponding quantity without a tilde: q approximates q, etc. The algorithms are given in Matlab style. We use the Matlab conventions when we refer to entries in matrices and vectors. In particular, where in the algorithms new values overwrite old ones, the tildes are deleted. 2. The generalized eigenproblem. 2.1. Preliminaries. Convention 1. We denote a generalized eigenvalue of the matrix pair (A, B) as a pair #. This approach is preferred because underflow or overflow for #, in finite precision arithmetic, may occur when # and/or # are zero or close to zero, in which case the pair is still meaning and useful [15], [21], [30, Ch.VI]. Remark 3. Observe that, for each #= 0, the pairs # and # correspond to the same generalized eigenvalue. Rather than scaling the coe#cients of # in our algorithms (for instance, such that # [0, 1] and we follow the advise in [15], and we show the results as produced by the QZ algorithm: the size of # and # may give valuable information on the conditioning of the computed eigenpair. However, in the construction of our algorithm, the choice of some parameters leads to an implicit scaling. For generalized eigenproblems, a partial generalized Schur form is defined as follows Definition 1. A partial generalized Schur form of dimension k for a matrix pair (A, B) is the decomposition are orthogonal (nk)-matrices, and S k and T k are upper triangular k)-matrices. A column q i of Q k is referred to as a generalized Schur vector, and JACOBI-DAVIDSON STYLE QR 97 we refer to a pair (q i , # i , # i #) with # i , # i #S k (i, i), T k (i, i)# as a generalized Schur The formulation in (3) is equivalent to Furthermore, if (x, #) is a generalized eigenpair of (S k , T k ) then (Q k x, #) is a generalized eigenpair of (A, B). 2.2. Jacobi-Davidson. We will briefly describe Jacobi-Davidson for the generalized eigenproblem (1); for details we refer to [24]. Similar to subspace approaches for standard eigenproblems, in each step the approximate eigenvector # q is selected from a search subspace span{V}. The Galerkin condition, with associated approximate generalized eigenvalue # #, requires orthogonality with respect to some test subspace span{W}: # A For the generalized case, it is, in view of (3) and (4), natural to take the test subspace span{W} di#erent from the search subspace: the Petrov-Galerkin approach. Search subspace and test subspace are of the same dimension, say, j. Equation (5) leads to the projected eigenproblem that can be solved by conventional techniques, and a solution (u, # #) is selected (note that (6) is a j-dimensional problem). Then the Petrov vector and the residual r # # A # q, associated with the Petrov value # #, are computed. The subspaces span{V} and span{W} are expanded in each step of the iterative process. In the variant of the Jacobi- Davidson method used in this paper, the search subspace is expanded by a vector v that is orthogonal to # q and that solves (approximately) the Jacobi correction equation # z The essential di#erence with the Davidson approach is in the inclusion of the left and right orthogonal projections in this correction equation. It can be shown that for nonzero # z # span{A# q, B# q}, and if (7) is solved exactly, the convergence of the generalized eigenvalue will be quadratic; see [24, Th. 3.2]. In the next iteration of the algorithm, span{V, v} defines the new search subspace, and we will explain how to expand W appropriately. Since we prefer orthogonal matrices V and W, similar to Z and Q in (3), the new columns of V and W are orthonormalized by modified Gram-Schmidt (or some other stable variant of Gram- Schmidt). We use the QZ algorithm [15] to reduce (6) to a generalized Schur form. With j the dimension of span{V}, this algorithm yields orthogonal (j j)-matrices U R and U L and upper triangular (j j)-matrices S A and S B such that The decomposition can be reordered such that the first column of U R and the (1, 1)- entries of S A and S B represent the wanted Petrov solution of (6) [33], [34], [7]. For a Matlab version of this reordering algorithm, see [7, Ch. 6.C]. D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST With the decomposition in (8), we construct an approximate partial generalized Schur form (cf. (3)): VU R approximates a Q k , and WU L approximates the associated Z k . Since span{Z k makes sense to choose W such that, for some scalars # 0 , 0 with, say, |# 0 | the space span{W} coincides with span{# This choice is also in line with the restriction on # z for quadratic convergence. In summary, the proposed method has the following main ingredients: . Form the projected system (6) and reduce it to an ordered generalized Schur form (8). Select as approximate generalized eigenpair # (VU R (:, 1), #S A (1, 1), S B (1, 1)#). . Form the Jacobi correction equation: with #B# q, where # is a normalization constant; the choice for # 0 and 0 will be discussed later (in section 2.4). Compute an approximate solution v # q of (9). Note that VUR (:, 1)) is normalized. . Expand V with the orthonormal complement of v and W with the orthonormal complement of w, where Modified Gram-Schmidt is used for the computation of the orthonormal complements. It can be shown that, with the above choices for # z and W, In this approach, the relation between the partial generalized Schur form for the large problem and the complete generalized Schur form for the small problem (6) via right vectors is similar to the relation via left vectors The fact that also convenient for restart purposes, as we will see in section 2.3. . After convergence, expand the partial Schur form with the converged Schur vector, and repeat the algorithm with a deflated pencil for other eigenpairs. For details on deflation, see section 2.5. 2.3. Practical selection and implicit restart. When we have reduced the projected eigenproblem (6) to a generalized Schur form by the QZ algorithm [15], then we can exploit the generalized Schur form for various purposes: - selection of a Petrov pair (# q, #, #), - selection of the corresponding left vector # z (cf. (12)), - restriction of the dimension of the subspaces span{V} and span{W} if necessary deflation after convergence of a Petrov pair. We will explain the first and third points in more detail in this section. JACOBI-DAVIDSON STYLE QR 99 Suppose that the generalized Schur form of the pencil given by is ordered with respect to # such that where j is the dimension of span{V}. Then # (VU R (:, 1), #S A (1, 1), S B (1, 1)#) is the Petrov approximation corresponding to the projected system (6) with Petrov value closest to the target # . The corresponding left vector is given by Furthermore, VU R (:, spans the subspace that contains the i most promising Petrov vectors. The corresponding test subspace is given by WU L Therefore, when we want to reduce the dimension of the subspace ("implicit restart") to j min , j min < j, then we simply discard the columns v j min+1 through v j and w j min+1 through w j , and continue the Jacobi-Davidson algorithm with (cf. [26, section 5.3]). Remark 4. Our restart strategy follows similar ideas as in the implicitly restarted Arnoldi (IRA) [28]. However, in [28] implicit shifts are used to delete the unwanted part, instead of explicitly selecting the wanted portion of the Krylov subspace as we do. The situation for IRA is more complicated because the reduced search subspace has to be a Krylov subspace. For further details, see [28], [13]. 2.4. The values of # 0 and 0 . We will now explain how to select the scalars # 0 and 0 in (10). The restriction |# 0 | scaling and avoids trivial expansions. We discuss two approaches. The first one, in section 2.4.1, can be viewed as a generalization of the approach by Ritz values for standard eigenproblems for optimal expansion of the test subspace. The second one, in section 2.4.2, is related to the approach by harmonic Ritz values and aims for optimal selection of Petrov pairs. 2.4.1. Fixed values for # 0 and 0 . If v is the expansion vector for the search subspace, then in the general setting we have to expand the test subspace by # 0 Av+ 0 Bv. Note that if # q is the new approximate eigenvector then expanding the old search subspace by v is equivalent to expanding it by q, so that the new test subspace can also be obtained by expanding with # 0 A# q I, the obvious choice would be # I, the obvious choice would be In this case, although B# q is in the direction of # q is close to some eigenvector q, multiplication by B may diminish the most important eigenvector components of # q if the eigenvalue of B associated with q is (very) small. Therefore, expanding the test space by B# q may be (much) less optimal than expanding by # q. In the presence of rounding errors, this e#ect may be even more prominent. 100 D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST The value of as function of # and , is maximal if and where # denotes the complex conjugate of #. This approach can be seen as an attempt to expand the test subspace span{W} optimally in the direction of z, where z is the normalized vector Aq (or Bq). Since we have to choose # 0 and 0 before we know the generalized eigenvalue #, the best we can do, in particular in the initial phase of the process, is to select and 0 where # is the target value. For an approach by which the choice for the scalars is made adaptively, see [7, Ch. 6, section 3.1]. In practice, we have not seen much advantage of that approach compared with the approach to be discussed in section 2.4.2. 2.4.2. Values for # 0 and 0 based on harmonic Petrov values. In this section, we will introduce harmonic Petrov values. We will see that the harmonic Petrov values that are closest to a target can be considered as extremal Ritz values for a specific test subspace, also if the target is in the interior of the spectrum. In particular for the computation of interior eigenvalues, the harmonic Petrov values appear to be attractive competitors for the standard Petrov values of the approaches in section 2.4.1: for generalized eigenproblems the costs for the computation of the harmonic Petrov values are the same as for standard Petrov values, and, because of the extremality property, harmonic Petrov values closest to the target appear to be the best choices, also in early stages of the process. This is in line with observations for the standard eigenproblems made in [16], [26]. We first consider the computation of the eigenvalues of a standard eigenproblem I) that are close to some target value # in the interior of (the convex hull of) the spectrum. The transformation # 1/(#) maps these eigenvalues # to extremal eigenvalues of and in that case the "correct" eigenpair approximations can be obtained easily. However, we want to avoid matrix inversion. With some formula manipulation, it can be shown that this can be achieved by taking the search subspace and the test subspace both equal to span{(A - # I)V} (cf. [26, section 5.1]): the resulting eigenvalue approximations # for A are then the solutions of The solutions # are called harmonic Ritz values of A, with respect to # (cf. [19], [26]; they have also been used in [16]); Vu is the associated harmonic Ritz vector. Since W and #W, with # 1/ span the same space, the harmonic Ritz values appear as Petrov values for the test subspace generated as in (11) with and 0 # - JACOBI-DAVIDSON STYLE QR 101 For generalized problems, with # 0 and 0 as in (17), the Petrov values closest to the target value correspond to absolute largest Ritz values of the standard eigenproblem with matrix Therefore, for this generalized case also a better selection of appropriate eigenpair approximations may be expected. We refer to the Petrov values associated with this choice of test subspace as harmonic Petrov values. 2.5. Expansion of Schur form and deflation. In this section, we focus on the e#cient computation of a set of generalized eigenpairs. The idea is to use the Jacobi-Davidson method for the computation of a partial generalized Schur form as a major step in solving generalized eigenproblems. Suppose that we have the partial generalized Schur form AQ and BQ We want to expand this partial generalized Schur form with a suitable q and z to # and # . From this we deduce that the generalized Schur pair (q, #) satisfies for This leads to Hence, (q, #) satisfies and the generalized Schur pair (q, #) is therefore also an eigenpair of the deflated matrix pair In JDQZ we solve this eigenproblem again with the Jacobi-Davidson method. In more detail, the procedure is as follows. Let V and W be orthogonal (n j)- matrices such that V # Q and and denote the generalized Schur form of the matrix pair (M A , M B ) by 2 Note that the Jacobi correction equation (7) has a similar structure and can be derived in a similar way. D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST If this generalized Schur form is ordered with respect to the target value # , then # (VU R (:, 1), #S A (1, 1), S B (1, 1)#) is a Petrov pair approximation for a solution of (20). The corresponding left vector is given by The Jacobi-Davidson method expands V with the orthogonal complement of v that is an (approximate) solution of the generalized deflated Jacobi correction equation q. Note that Q # also have to expand W; we expand it with the complement of (I -Z k-1 Z # # q, orthogonal with respect to W. When the generalized Schur pair (# q, # #) is su#ciently close to (q, #), then we may continue for still another generalized Schur pair. In that case V and W are replaced by VU R (:, in order to obtain a new search subspace orthogonal to span{Q k-1 , q} and a new test subspace orthogonal to span{Z k-1 , respectively, and we continue the process. 2.6. Solution of (deflated) correction equation. In this section we discuss how the generalized deflated Jacobi correction equation can be solved and how pre-conditioning is involved. The correction equation (20) involves an operator for which the domain and the image space di#er. This means that Krylov subspace methods cannot be applied right away. Fortunately, this can be fixed easily by incorporating preconditioning. For preconditioning of the correction equation (20), we propose to use for some preconditioner K # A- # B. We introduce the following notation. Notation 1. # q ], the matrix Q k-1 expanded by z ], the matrix Z k-1 expanded by Z k , the expanded matrix of preconditioned vectors, Y k , the projected preconditioner Z k . In this notation the left preconditioned correction equation for the generalized correction equation (24) can be written as where section 3.2, we give more details for the simpler standard eigenproblem). JACOBI-DAVIDSON STYLE QR 103 Of course, right preconditioned generalized correction equations can be derived as well. With where v. Note that for the operators in the preconditioned correction equation (26), the domain and the image space coincide, so that Krylov subspace methods can be used. A pseudocode for the preconditioned Jacobi-Davidson QZ algorithm with harmonic Petrov values (as discussed in section 2.4.2) is given in Algorithm 1. In Table 1 we have listed the main computational ingredients per iteration of JDQZ. Table The computational costs of JDQZ per iteration. The integers j and k denote the dimensions of span{V} and span{Q}, respectively. Part dots axpys MVs K The correction equation Variable costs The projected problem 6j The Petrov approximation 2k a If Krylov subspace methods are used to solve the correction equation, then the products Av and Bv are often already available, as side products. Then no MVs are needed in this part. b Instead of computing the residual r as #B#q, r may also be computed as Algorithm 1); depending on the number of nonzeros in A, B, and the value of j, this may be more e#cient. 3. Jacobi-Davidson for the standard eigenproblem. When I, the JDQZ algorithm simplifies greatly, and this can be used to improve computational e#ciency. We will also consider this situation in order to discuss specific aspects such as preconditioning. It should be noted that these simplifications only lead to a memory e#cient algorithm when we give up working with harmonic Ritz values since these involve skew instead of orthogonal projections in the standard setting [26]. For the computation of exterior eigenvalues this does not pose serious problems, but for interior eigenvalues we prefer the more robust harmonic eigenvalue approximations (section 2.4.2) and orthogonal projections, which means that we prefer JDQZ (with instead of the algorithm discussed in this section. With the natural choice # we have that so that the projected eigenproblem reduces to that is, # (cf. (6)). For this low-dimensional problem we select a solution (u, #) by standard computational techniques. The Ritz value # and the Ritz vector an approximate 104 D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST Algorithm 1 Preconditioned JDQZ, using harmonic Petrov values. function [ Q,Z,RA , RB while k < k max , else - the correction equation - Y Solve v (approximately) from: Y Y - the projected problem - while found, "found and implicit restart part", see Algorithm 2 JDQZ returns a partial generalized Schur form (Q, Z, RA , RB ) of dimension kmax of the matrix pair (A, B) with generalized eigenvalues near the target # . K is a preconditioner for A - #B, v 0 is an initial guess, and # is the stopping tolerance. jmax and j min specify the dimension of the search subspace before and after implicit restart, respectively. qz is a Matlab function that computes a generalized Schur decomposition. The function mgs performs modified Gram-Schmidt and qzsort sorts the generalized Schur form. Matlab implementations of mgs and qzsort can be found in [7, Ch. 6.A-C]. JACOBI-DAVIDSON STYLE QR 105 Algorithm 2 "Found and implicit restart part" of preconditioned JDQZ with harmonic Petrov values. if found, eigenvalue and eigenvector, respectively, with residual r # (A- # q (we will assume that # q# For the expansion of V, we take a vector v # q that solves (approximately) the correction equation The expanded search subspace is span{V, v}. In exact arithmetic, V is an orthonormal We have used modified Gram-Schmidt in our computations for the construction of an orthonormal basis of the search subspace. As mentioned in the introduction, if # is replaced in the correction equation (29) by an eigenvalue #, then the associated eigenvector is contained in the space spanned by V and the exact solution of the Jacobi-correction equation. If the correction equation (29), with #, is solved exactly, then the speed of convergence for the selected Ritz values is asymptotically quadratical (cf. [26], [24]). We reduce the projected eigenproblem (28) to Schur form by the QR algorithm [8], and then we can exploit the Schur form for the selection of a Ritz pair (# q, #) and for restriction of the dimension of the subspace span{V} in the same way as explained in section 2.3 (note that in this case A reordering algorithm for the Schur form can be found, for instance, in [29], [9], [20]; a Fortran implementation is available from LAPACK [1]. A simple Matlab implementation for reordering with respect to a target value # is given in [7, Ch. 6.B]. 3.1. JDQR. For the standard eigenproblem we can use the JD algorithm for the computation of a partial Schur form, which can be written as (cf. [22]): 106 D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST is an orthogonal (n k)-matrix, and R k is an upper triangular (k k)- matrix. A column q i of the matrix Q k is a Schur vector, and the pair (q i , # i ), with i), is a Schur pair. The diagonal entries of the matrix R k represent eigenvalues of A, and if (x, #) is an eigenpair of R k then (Q k x, #) is an eigenpair of A. The resulting simplification of JDQZ will be referred to as JDQR. Although most of the simplifications are obvious, we will give the main expressions for JDQR for ease of reference. Suppose that k - 1 Schur pairs have detected; i.e., we already have the partial Schur form AQ Then the new Schur pair (q, #) is an eigenpair of the deflated matrix We then solve the eigenproblem for the deflated matrix (30). More precisely, the JD algorithm for the deflated matrix (30) constructs a subspace span{V} for finding approximate eigenpairs, and V is an orthogonal matrix such that V # Q the deflated interaction matrix M we have The ordered Schur form gives an approximation (# q, for a wanted eigenpair of the deflated matrix (30). Then, according to the Jacobi- Davidson approach, the search subspace span{V} is expanded by the orthonormal complement of v to V, where v is the (approximate) solution of the deflated Jacobi correction equation # q. Note that the projections in (32) can be subdivided into two parts: the part associated with Jacobi-Davidson and the deflation part Observe also that Q # k-1 Remark 5. Two deflation techniques can be found in literature for subspace methods like Arnoldi's method. They are referred to as explicit and implicit deflation (cf., e.g., [22, Ch. VI, section 2.3]). In explicit deflation, the computation is continued with a deflated matrix after detection of Schur vectors. For e#ciency reasons, A - QRQ # is used (Schur-Wielandt deflation), rather than the more stable representation In implicit deflation, each new vector for the search subspace is generated with A itself and is then made orthogonal to the detected Schur vectors before adding it to the search subspace. Our approach is a mixture of both techniques. In the Jacobi correction equation we use the explicitly deflated matrix. Since the solutions of the deflated correction equations are orthogonal to the detected Schur vectors, there is no need to use the deflated matrix for computing the deflated interaction matrix M ; we compute M as Similar observations hold for the interaction matrices MA and MB in the generalized case (cf. (22)). Exclusively implicit deflation is possible as well: solve the correction equation approximately with the nondeflated A and make the resulting solution orthogonal JACOBI-DAVIDSON STYLE QR 107 to the detected Schur vectors. In this approach we avoid expensive matrix-vector multiplications, but explicit deflation appears to improve the condition number of the linear system, and that leads to a faster converging process for the Jacobi correction equation (29). The decrease in the number of iteration steps, for the correction equation, appears often to compensate for the more expensive multiplications (for a numerical illustration of this, see section 4.5). Moreover, the explicitly deflated correction equation (32) appears to lead to more stable results. This can be understood as follows. Without deflation the resulting solution of the correction equation may have a significant component in the space spanned by the detected Schur vectors. By subtracting this component (as in implicit cancellation may occur. If we work with an explicitly deflated matrix, such cancellation is avoided. Remark 6. As in implicitly deflated Arnoldi methods, the accuracy of an approximate Schur pair in our method not only depends on the norm of the residual and on the condition number of the pair but also on the approximation errors in the previously detected Schur pairs (cf., e.g., [22, Ch. IV, section 2.5] and [13, section 6.4.1]): in the derivation of the algorithms it is assumed that V # which is true for exact Schur vectors. In practice, span{AQ} will not be contained in span{Q}. 3.2. Preconditioning. In this section we will discuss preconditioning for the correction equation. Preconditioning is not straightforward because of the projections involved. We will derive explicit expressions for left and right preconditioned correction equations. In each iteration step we need to solve a deflated Jacobi correction equation (32) for a given # q and (cf. (32)). For the approximate solution of this equation we may use a Krylov subspace method, e.g., GMRES [23], or BiCGstab(#) [25]. The rate of convergence and the e#ciency of Krylov subspace methods is often improved by preconditioning. The identification of an e#ective preconditioner may be a prob- lem. For instance, for interior eigenvalues the construction of an e#ective incomplete LU-factorization [14], [10] for A- #I may require much fill-in, 3 which makes the construction expensive. As we will argue in section 3.3, it may be a good strategy to compute a good (and possibly expensive) preconditioner K for A - #I for one fixed value of # only and to use as the preconditioner for various # q and #. Note that the projections on K are necessary to let K operate on the proper subspace (cf. [24]). We will now give some more details on the derivation of the expressions for the preconditioned correction equation. We use the same notation as in Notation 1 with . The typical usage of the preconditioner in a Krylov subspace method would look like solve t, with for s, with 3 These incomplete factorizations have not been designed for linear systems related to eigenprob- lems. The solutions for which these factorizations are most e#ective are usually rather smooth, which means that components of slowly varying eigenvectors are favored by the preconditioning. 108 D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST The following lemma gives us an explicit expression for the solution t of (34) in terms of easily computable matrix-vector products with k and K -1 . The lemma generalizes Proposition 7.5 in [24], and the proof runs along the same lines (for details, see [7, Ch. 6, section 2.4]). Note that H k is of small dimension, so it is cheaply inverted. There is no need to invert K explicitly; instead can be computed by solving v from Lemma 1. If H k is nonsingular, then the solution t of equation (34) is given by Remark 7. If one stores the matrix Y k-1 # K of preconditioned Schur vectors, one only has to compute the last column K -1 q of the matrix q ] at each iteration step. Furthermore, when storing the projected preconditioner only the last column and last row of have to be computed in an iteration step. Remark 8. If the preconditioner K is indefinite, then the matrix may become singular for an "unlucky" choice of approximate Ritz pair (# q, #). This causes a breakdown, but it never happened in our experiments. The breakdown may be cured by selecting a di#erent nearby approximating Ritz pair (# q # , temporarily for the current Jacobi-Davidson iteration. preconditioning. From Lemma 1, it follows that the left preconditioned correction equation is equivalent with where Note that the projection has to be applied explicitly to the residual. For the unpreconditioned case there was no need for explicit projection, since there the fact that the residual is associated with a deflated matrix and with a Ritz pair implied orthogonality to Observe that, for equation (36) is equivalent to the one in (32). Of course, right preconditioned correction equations, similar to (27), can be derived in a corresponding manner (for details, see [7, Ch. 6, section 2.4]). Remark 9. If one uses Krylov subspace methods for solving the second equation in (36), then one encounters matrix-vector products of the form with t of the form obviously, and for the approximate solution v we have that provided that this is the case for the initial guess as well. Moreover, the projection k ) in front of t in (37) is then redundant, and (37) reduces to t. JACOBI-DAVIDSON STYLE QR 109 Algorithm 3 Preconditioned JDQR. function while k < k max , else - the correction equation - Y Solve v (approximately) from: Y Y - the projected problem - while found, "found and implicit restart part", see Algorithm 4 JDQR returns a partial Schur form (Q, R) of the matrix A of dimension kmax with eigen-values near the target # . K is a preconditioner for A - # I, v 0 is an initial guess, and # is the stopping tolerance. jmax and j min specify the dimension of the subspaces V before and after implicit restart, respectively. schur is a Matlab function that computes a Schur decomposition. The function mgs performs modified Gram-Schmidt, while qrsort sorts the Schur form. For Matlab implementations of mgs and qrsort, see [7, Ch. 6.A-B]. A pseudocode for the preconditioned Jacobi-Davidson QR algorithm is given in Algorithm 3. In Table 2 we have listed the main computational ingredients per iteration of JDQR. D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST Algorithm 4 "Found and implicit restart part" of JDQR. if found, Table The computational costs of JDQR per iteration. The integers j and k denote the dimensions of span{V} and span{Q}, respectively. Part dots axpys MVs K The correction equation Variable costs The projected problem 3j a If Krylov subspace methods are used to solve the correction equation, then the product Av is often already available as a side product. No MV is needed in this part then. b Instead of computing the residual r as A#q-#q, r may also be computed as #q, where V A # AV (cf. Algorithm 3); depending on the number of nonzeros in A and the value j, this may be more e#cient. 3.3. The quality of the deflated preconditioner. Even when the preconditioner K is constructed for a fixed # , then the correction equation still involves projections that become more expensive after each Schur pair that has been detected, but this does not necessarily lead to a more expensive computational process (com- pared with explicit restart). When iterative solvers are used, they may converge faster because the field of values of the projected operator is contained in the field of values of A- # I, and that may be smaller, especially after exterior eigenvalues have been detected. The projections may also have a positive e#ect on the preconditioner. JACOBI-DAVIDSON STYLE QR 111 We see that, on the one hand, the preconditioning error is enlarged by a small shift (#)I, but on the other hand, the projections diminish the error by filtering out the detected Schur vectors. If the error R is large with respect to eigenvectors corresponding to eigenvalues near # , then the projected error will be significantly smaller, and the only penalty is a (small) shift due to #. It seems plausible (cf. [32, Ch. IV]) that this will not lead to a significantly less e#ective preconditioner, and it may help to explain the e#ectiveness of a fixed preconditioner for JDQR in some of our experiments. 3.4. Notes on the speed of convergence. In this section we will make some comments with respect to the convergence behavior of JDQR. We will use well-known arguments. The JDQR algorithm has nice properties with respect to the overall performance. While adjusting for one Schur pair, the subspace span{V} also accumulates components for other Schur pairs. As a result, after one Schur pair has been detected, other Schur pairs may follow more quickly than after a complete restart. These components will appear in a similar way as for the shift-and-invert Arnoldi [22] process, with a shift # for a (deflated) eigenproblem, as can be understood as follows. For simplicity, suppose that A has a complete set of eigenpairs and that we are trying to find an approximation (# q, #) for The exact solution of (29) is given by with (cf. [26, section 4.1]). Writing # q as that We may assume, without loss of generality, that # i #= 0, because # q is a Ritz vector which means that # #/2. The latter case is unlikely to happen, due to rounding errors, and the first case indicates full convergence. Hence, eigenvector components corresponding to eigenvalues closer to # will be amplified more in (A- # q. The component orthogonal to # q is used as an expansion for V and thus as soon as q has a large component in the direction of x 1 , say that the angle is less than #/4, then necessarily components other than x 1 become dominant. That is, In Fig. 1 we have illustrated this phenomenon. The bullets represent the amplification factors 1/|# i - #| for components in the direction of x 112 D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST THETA3Fig. 1. Amplification factors of eigenvectors. In the subsequent iterations similar amplifications will occur, and the closer # i is to # the more rapid the angle This argument is repetitive: if the angle very small, then the corresponding # 2 will be very small and other components, due to orthogonalization, will become more dominant. Consequently, while the process converges to a Schur pair, the search subspace V will provide good initial approximations for the nearby Schur pairs. Moreover, slow convergence during one stage may be compensated for by faster convergence in the next stage, because the subspace span{V} will be enriched with more components of other Schur pairs due to repeated amplifications. This is observed in our numerical experiments; see section 4. 4. Numerical experiments. In this section we present numerical results, obtained with JDQZ and JDQR, for several generalized eigenproblems and standard eigenproblems. The purpose of these experiments is to get an impression of the actual behavior of these methods. We have not tried to find the most e#cient parameter choices for each particular problem. We will illustrate the e#ect of more accurately solving the correction equation and the e#ect of including appropriate precondition- ing. We will show that the harmonic Petrov value choice for the test subspace may lead to superior convergence behavior, not only for the generalized eigenproblem but also for the standard eigenproblem. We will demonstrate that the projections in the correction equation (32), involving detected Schur vectors, are essential components of the algorithms. We will also consider eigenproblems where multiple eigenvalues are involved. The computations were done in double complex precision (# 15 digits) on a Sun workstation. To facilitate comparison, we have selected for all cases j (the dimension of the subspace before and after implicit restart, respectively), and a fixed random real vector v 0 as an initial guess (cf. Algorithms 3 and 1). As iterative solvers for the correction equation, we have considered full GMRES [23] with a maximum of m steps, denoted by GMRESm , and BiCGstab(2) [25]. For BiCGstab(2) a maximum of 100 matrix multiplications was allowed. Of course, this is comparing apples with pears; our main purpose was to mimic two realis- JACOBI-DAVIDSON STYLE QR 113 tic scenarios, one with a fixed number of matrix-vector multiplications (GMRESm ), and one with an iterative method to satisfy some stopping criterion (BiCGstab(2)). As stopping criterion for the iterative methods for the correction equation, also for GMRESm , we have used # r is the initial residual, is the residual corresponding to the approximate solution produced by the inner method, and j is the iteration number for the current eigenvalue approximation in the outer iteration. Hence, as the outer iterations proceed, the inner iterations are solved more accurately. This choice was inspired by the fact that the Jacobi-Davidson method may be viewed as a Newton process [24], [27], and for Newton processes this stopping criterion may lead to e#cient algorithms [6]. As the initial guess for the inner iteration method we always took the null vector. In the figures of the convergence behavior for JDQZ and JDQR, the performance is plotted in terms of the actual amount of work, in millions of floating point operations (flops), versus log 10 of the residual norm. The reason for this is that the computational work in JDQZ and JDQR consists of two parts of a di#erent nature: one part is for the inner iteration process, in which a correction equation is (approximately) solved; the other part is for the outer iteration, in which an approximation for the (generalized) Schur pair is constructed. If in the inner iteration the correction equation is solved more accurately, then the number of outer iterations may decrease. Therefore, it would be misleading to monitor the total number of matrix multiplications. It might give a bad impression of the total costs, because most of the matrices are sparse and therefore the dot products and vector updates in the outer and the inner iteration represent substantial costs in JDQZ and JDQR. Furthermore, we have plotted the entire convergence behavior. This means that the convergence history of the residuals of all subsequentially selected approximate eigenpairs is plotted. Whenever the residual norm curve drops below the acceptation level, indicated by the dotted horizontal line, an eigenvalue is accepted and the search process for the next one is continued. A large residual norm in the step immediately after acceptance marks the start of a new search. 4.0.1. Construction of suitable initial subspaces. Specifically in the first few steps of the process the Ritz or Petrov vectors are usually poor approximations of the wanted eigenvectors, and the target value # may be relatively (much) closer to the wanted eigenvalues than any of the approximate eigenvalues. In these cases, the correction equations (26) and (36) lead to relatively poor expansions of the search subspace. To see this, recall that the wanted eigenvector would be in the new search subspace if this space would have been expanded by the exact solution for the correction equation with the wanted eigenvalue instead of # (cf. section 3). This observation indicates how to improve the expansion in the first few steps: take in the correction equation # instead of #. To detect whether # is close enough to replace # , we monitor the norm of the residual: we take #, #) instead of #, 1#) in the correction equation as soon as the first residual norm drops below a threshold value # tr . A similar switch was proposed in [18]. Moreover, in all experiments we used GMRES 1 for the first j min iterations in order to build up a search subspace span{V} in a relatively inexpensive way. Especially when a preconditioner is involved, this approach can be justified with arguments similar to those in the preceding paragraph (cf. [24, section 9.4]). 4.0.2. Stopping criterion. In our experiments, we considered an approximate eigenpair #) converged if the residual r is su#ciently small (#r#); then (# q, 114 D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST Table Four eigenvalues of DW1024, computed by JDQR (cf. section 4.1). 9.6473e - 01 9.6551e - 01 9.7780e - 01 9.7880e - 01 log10 of residual norm number of flops x 1e6 Fig. 2. Convergence history for DW1024, showing the e#ect of solving the correction equations more accurately (cf. section 4.1). is a "detected" eigenpair. In the algorithms, weighted residuals (e.g., #r#A#) or more sophisticated stopping criteria can be employed as well (cf. [4]). In our experiments we varied values for some of the parameters in JDQZ and JDQR. For easy reference, we recall their meaning: Parameter Description # the target value k max the number of wanted Schur pairs # the stopping tolerance in the outer iteration # tr threshold used for building initial subspaces 4.1. The influence of the correction equation. The purpose of this example is to show the e#ect of a more accurate solution of the correction equation. We consider the square dielectric waveguide standard eigenproblem DW1024 of order 2048 [2]. The problem comes from an integrated circuit application. The rightmost eigenvalues and their eigenvectors are wanted. We have used JDQR with standard Ritz values. We took we have not used preconditioning. The computed eigenvalues are given in Table 3. The convergence history is plotted in Fig. 2 for JDQR, GMRES 1 , and GMRES 10 . A summary of the number of iterations, the number of matrix multiplications (MVs), and the number of flops is given in Table 4. JACOBI-DAVIDSON STYLE QR 115 Table Summary of results for DW1024 (cf. section 4.1). Method for the correction equation JDQR iterations MVs flops Table Five eigenvalues of BWM2000, computed by JDQR (cf. section 4.2). 2.4427e - 07 - 2.1395e 2.4427e When solving the correction equation more accurately, the number of MVs is increased, but the number of outer iterations is reduced significantly (see Table 4), resulting in a much better overall performance. With GMRES 1 the search subspace is the span of the residuals, and in that case JD (with implicit restart) generates the same subspaces as IRA [28]. The eigenvalues are not well separated in this case, and therefore Arnoldi converges only slowly. This explains the poor convergence of JDQR with GMRES 1 . Note that after an initial phase with two small bumps, JDQR converges quite fast. For the next eigenvalues there is no such initial stagnation. Apparently, in the iterations for the first eigenvalue, components for the next Schur vectors are already collected in span{V} (cf. section 3.4). 4.2. The e#ect of preconditioning. When increasing the number of steps in GMRES, the correction equation will be solved more accurately, and the number of outer iterations may decrease as we have seen. But sometimes we need too many inner iterations with GMRES for acceptable convergence of the outer iterations. With appropriate preconditioning, we may see a dramatic improvement, as we will see in this example. We consider the standard eigenproblem BWM2000 of order 2000 for the Brusse- lator wave model [2], [22]. The problem models the concentration waves for reaction and transport interaction of chemical solutions in a tubular reactor. Our task is to determine the eigenvalues with the largest real part in order to verify whether their real parts are positive or negative (corresponding to stable or unstable modes). Again we have used JDQR with standard Ritz values. For this problem, we have selected The computed eigenvalues are listed in Table 5. The convergence history is plotted in Fig. 3 for JDQR with unpreconditioned GMRES 10 and with preconditioning. A summary of the results is given in Table 6. From Fig. 3 we see that JDQR with GMRES 10 does not converge (we checked even up to GMRES 50 with little or no improvement), but with preconditioning JDQR performs rather well. Again we see that the speed of convergence for the first eigenvalue is somewhat slower than the speed of convergence for the other eigenvalues. Note that, although the projections in the correction equation become more expen- D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST log10 of residual norm number of flops x 1e6 GMRES +ILU(0)Fig. 3. Convergence history for BWM2000, illustrating the e#ect of including preconditioning in the solver of the correction equation (cf. section 4.2). Table Summary of results for BWM2000 (cf. section 4.2). Method for the correction equation JDQR iterations MVs flops sive after each detected eigenvalue, the computational work for each eigenvalue is roughly constant, except for the first eigenvalue. It should be noted that popular software packages for solving eigenproblems have been reported to fail for this problem BWM2000 [12]. The preconditioned correction equation (26) requires the computation and storage of the term Notation 1, with If K is a good approximation for A - #I, then spans an invariant subspace of A, then, in this nearly ideal case, we have that and for this reason it is tempting to use (26) with instead of k . However, this approach does not work well: it may even lead to slower convergence. In some of our experiments (as for instance with QH882 as discussed below in section 4.3) we lost convergence completely; in other experiments it had little or no e#ect. 4.3. Harmonic Ritz values. The JDQR algorithm computes a partial Schur form for the standard eigenproblem with standard Ritz pairs for the Schur pairs. However, with JDQZ for I, we can also compute a partial Schur form for the standard eigenproblem with harmonic Ritz pairs. Here we give an example that illustrates the improved convergence behavior with harmonic Ritz values. We consider the Quebec Hydroelectric Power System problem QH882 of order 882 [2]. This matrix represents the Hydro-Quebec power system's small-signal model. JACOBI-DAVIDSON STYLE QR 117 Table Five eigenvalues of QH882, computed by JDQR (cf. section 4.3). -4e+06 -2e+062e+06-8e+06 -6e+06 -4e+06 -2e+06 0 imaginary axis real axis Fig. 4. Spectrum of QH882 (cf. section imaginary axis real axis eigenvalues target Fig. 5. Part of the spectrum of QH882. The eigenvalues # of interest are the eigenvalues in the box -300 < Re(#) < 100, in the complex plane. For this problem, we have selected The computed eigenvalues are given in Table 7. The convergence history is plotted in Fig. 7 for JDQR with standard Ritz values and for JDQZ with the harmonic choice (cf. section 2.4.2). This problem is rather di#cult: the eigenvalues in the neighborhood of # are in the interior of the spectrum; see Figs. 4 and 5. For all three methods, the correction equation was solved with GMRES 20 and was preconditioned with the exact inverse of A- # I. A summary of the results is given in Table 7. Although the computational complexity of JDQR is less than the computational complexity of JDQZ (cf. Tables 1 and 2), it is not the most e#cient method here. From the irregular convergence behavior of JDQR in Fig. 6 we may conclude that JDQR has problems in selecting the "correct" Ritz pairs and as a result the convergence is delayed. Eventually JDQR loses track completely and stagnates. The peaks in the convergence behavior show that sometimes the Ritz pair that is selected in the JDQR process does not correspond to the close-by Schur pair. As a result the search subspace is expanded in a poor direction. Clearly, for this example, this may lead to failure of convergence. As anticipated (cf. section 2.2), JDQZ with the harmonic choice of test subspace makes better selections, as is indicated by the smooth convergence, and hence, its performance is much better. 4.4. Identification of suitable Ritz values (tracking). From a computational point of view JDQR is less complex than JDQZ, even if the savings that standard eigenproblems problem allow are exploited in JDQZ. Therefore, it may be attractive to identify e#cient strategies for avoiding "incorrect" selection of Ritz D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST of residual norm JDQR number of flops x 1e6 JDQZ Harmonic Fig. 6. Convergence history for QH882. Although QH882 is a standard eigenproblem, for computing interior eigenvalues it is more e#cient to use JDQZ with test subspaces that are di#erent from the search subspaces (bottom picture). A better selection with harmonic Ritz values (bottom picture) appears to compensate for a less optimal expansion of the test subspace (cf. section 4.3). pairs. With correctly selected Ritz pairs convergence may be expected to be less irregular and stagnation may be completely avoided. We will discuss such a strategy now. If the Ritz vector in the previous iteration is already a fair approximation, then the norm of the residual gives information on the selected Ritz vector in the current step: in case of a poor selection, the new residual can be much larger than the previous one. It would then require additional computational work to find a Ritz pair with small residual norm (and still be close enough to the target # ). A cheap alternative in this case is to select a Ritz value that is close to a previously accepted one (and forget about # ). In the experiment that we will discuss below, we have replaced in such cases the target by the Ritz value that is selected and accepted in the previous step, where we consider a Ritz value acceptable if the associated residual is smaller than some specified threshold. In the example below, we took this threshold equal to # tr , the value used in the criterion for leaving the initialization stage (see section 4.0.1). After convergence of the Ritz pair, the original target value is restored at the start of the computation for the next eigenpair. This tracking strategy does not require any additional computational costs per step, while it appears to reduce the number of steps significantly, as we will see below. Because of the rather regular convergence of Ritz values to exterior eigenvalues, improvement for these eigenvalues may not be expected with the above tracking strategy for standard problems. Here we illustrate (in Fig. 7) the e#ects one may see by including tracking for JDQR. We applied JDQR to the example of section 4.3 with the same choice of parameters. Nevertheless, we see that the convergence behavior of JDQZ with the harmonic choice of test subspace is still superior. See also Table 8. 4.5. The influence of Q k and Z k in the correction equation. In this example we show that the projections with detected Schur vectors (cf. (24)) are very JACOBI-DAVIDSON STYLE QR 119 of residual norm JDQR number of flops x 1e6 JDQZ Harmonic Fig. 7. Convergence history for QH882 obtained with the tracking strategy (for all variants). For interior eigenvalues, the tracking strategy improves JDQR significantly (compare the present upper picture with the upper picture in Fig. 7), while there is no improvement for JDQZ (compare the two bottom pictures of the present figure and Fig. 7) (cf. section 4.4). Table Summary of results for QH882 (cf. sections 4.3 and 4.4). Method Iterations MVs flops JDQR with tracking (cf. section 4.4) 99 1482 1.221e JDQZ Harmonic 57 essential in the correction equation (cf. section 3.4), and we show what happens when these projections are neglected. Note that we still take the Jacobi projections (with q and # z) into account. We consider the bounded fineline dielectric waveguide generalized eigenproblem BFW782 [2] of order 782. This problem stems from a finite element discretization of the Maxwell equation for propagating modes and magnetic field profiles of a rectangular waveguide filled with dielectric and PEC structures. The resulting matrix A is nonsymmetric and the matrix B is positive definite. Of special interest are the generalized eigenvalues # with positive real part (i.e., Re(# 0) and their corresponding eigenvectors. For this problem, the parameters were set to The spectrum of this matrix pair is shown in Fig. 8. A magnification of the region of interest is plotted in Fig. 9. The computed generalized eigenvalues, represented as #, are given in Table 9. With JDQZ we discovered all four positive generalized eigenvalues. The convergence history, for the harmonic version of JDQZ with GMRES 10 , is plotted in the upper picture of Fig. 10. A summary of the results is given in Table 10. We see that JDQZ converges quite nicely. In the bottom picture of Fig. 10 the convergence behavior of JDQZ is given for the case where the correction equation (24) is solved without taking into account the projections involving Q k and Z k . Of course, the correction equations that are used 120 D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST -8000 -6000 -4000 -200020006000-3e+06 -2e+06 -1e+06 0e+00 imaginary axis real axis Fig. 8. Spectrum of BFW782 (cf. section 4.5). -0.4 imaginary axis real axis eigenvalues target Fig. 9. Part of the spectrum of BFW782. Table Five generalized eigenvalues of BFW782, computed by JDQZ (cf. section 4.5). 2.5233e of residual norm GMRES Harmonic-10 number of flops x 1e6 GMRES Harmonic without Q and ZFig. 10. Convergence history for BFW782 with (upper picture) and without (bottom picture) deflating the matrices in the correction equations, with respect to the detected Schur vectors. (cf. section 4.5). Table Summary of results for BFW782 (cf. section 4.5). Method for the correction equation JDQZ iterations MVs flops JACOBI-DAVIDSON STYLE QR 121 Table generalized eigenvalues of AC1331, computed by JDQZ (cf. section 4.6). include the rank-one projections involving # q and # z: these projections are essential for Jacobi-Davidson. Furthermore, deflation in this case is realized by making the approximate solution of the correction equation orthogonal to the detected Schur vectors with modified Gram-Schmidt. By doing the latter twice, the overall performance is improved significantly: in the results shown here (cf. Fig. 10) modified Gram-Schmidt is applied twice. However, as explained in section 3.4, we do not benefit from an improved operator in the inner iteration. Although the resulting algorithm is computationally cheaper, Fig. 10 shows that this does not lead to an overall better performance: the speed of convergence becomes increasingly slower and even stagnates eventually. 4.6. Multiple eigenvalues. We consider the eigenproblem with Neumann boundary conditions on the cube [0, 4] 3 . Finite element discretization of this equation on an 11 11 11 regular grid, with tetrahedral elements and linear interpolation functions, leads to a generalized eigenproblem of order 1331 (AC1331). It has one positive generalized eigenvalue # relatively close to zero (i.e., # 0). The other generalized eigenvalues are also positive and may be doublets or even triplets. For this problem, the parameters were set to The computed 15 leftmost generalized eigenvalues represented as # are given in Table 11. The residual norm versus the number of flops is plotted in Fig. 11 for the harmonic version of JDQZ with GMRES 10 and with BiCGstab(2), respectively. A summary of the results is given in Table 12. From the plots we see the e#ect that multiple generalized eigenvalues may have on the convergence behavior. JDQZ converges initially quite fast until the point that it "discovers" that the generalized eigenvalue is actually double or triple. The convergence speed stagnates for a few iterations (two or three peaks in the plot with GMRES and a plateau in the plot with BiCGstab(2)), after which the eigenvalues are discovered quickly one after another. This behavior is in agreement with section 3.4: during the stagnation phase components of other Schur vectors are amplified in the inner iteration and collected in the search subspace, leading to faster convergence for the next Schur pairs. The stagnation can be explained by the fact that with rank-one Jacobi projections the correction equation may become (nearly) singular when selecting Petrov approximations for multiple generalized eigenvalues. The iterative methods used for solving the correction equation often su#er from this (see also [31]). (Variable) block versions of the correction equation that take this multiplicity into account may be preferable in such cases, but this falls outside the scope of this paper. 122 D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST of residual norm GMRES Harmonic-10 log10 of residual norm number of flops x 1e6 Harmonic Fig. 11. Convergence history for AC1331: Stagnation followed by fast detection of triple generalized eigenvalues (cf. section 4.6). Table Summary of results for AC1331 (cf. section 4.6). Method for the correction equation JDQZ iterations MVs flops 4.7. Harmonic Petrov values for generalized problems. Our last example shows again that for interior generalized eigenvalues the harmonic version JDQZ is quite powerful. We consider the MHD416 generalized eigenproblem of order 416 [2], [24], [3]. This problem stems from a magnetohydrodynamics (MHD) model, where the interaction of hot plasma and a magnetic field is studied. The matrix A is non-Hermitian and the matrix B is Hermitian positive definite. Our goal is to compute interior generalized eigenvalues corresponding to the so-called Alfven branch of the spectrum; see Figs. 12 and 13. For this problem, the parameters were set to and # The computed generalized eigenvalues are plotted in Fig. 14. The convergence history for the harmonic version of JDQZ, with GMRES 1 , are plotted in Fig. 15. The exact inverse of A- # B (for # fixed) was used as a preconditioner for all eigenvalues. For all generalized eigenvalues the rate of convergence is almost the same: in the computation for one Schur pair, the search subspace apparently accumulates components for the next Schur pairs as well. JACOBI-DAVIDSON STYLE QR 123 imaginary axis real axis Fig. 12. Spectrum of MHD416 (cf. section 4.7).0.20.61 imaginary axis real axis Fig. 13. Alfven branch of MHD416 (cf. section 4.7).0.50.60.7 imaginary axis real axis eigenvalues target Fig. 14. 20 generalized eigenvalues computed by JDQZ for MHD416 (cf. section 4.7). 5. Conclusions. We have proposed two algorithms, JDQZ and JDQR, for computing several selected eigenpair approximations for generalized and standard eigen- problems, respectively. The methods are based on the Jacobi-Davidson method and compute iteratively a partial (generalized) Schur form with (generalized) eigenvalues near a user-specified target value. For both methods, no exact inversion of any matrix is strictly necessary, so that they are suitable for solving large eigenproblems. Fast convergence is obtained with a projected correction equation that is solved (approximately) by iterative methods with appropriate preconditioning. The convergence of JDQZ and JDQR is asymptotically quadratical if this correction equation is solved exactly. Furthermore, while converging to a particular Schur pair, the search subspace accumulates components of other Schur pairs with (generalized) eigenvalues near the target as well. This usually leads to faster convergence for the next eigenpairs. The dimension of the involved subspaces can be controlled by an e#cient implicit restart technique in such a way that the most relevant part of the subspace is maintained at restart. 124 D. R. FOKKEMA, G. L. G. SLEIJPEN, AND H. A. VAN DER VORST -5 log10 of residual norm number of flops x 1e6 GMRES HarmonicFig. 15. Convergence history of JDQZ for MHD416. Harmonic Petrov values allow a good selection of Petrov pairs for computing interior generalized eigenvalues also for generalized problems (cf. section 4.7). The algorithms incorporate simple mechanisms for selecting the wanted eigenpair approximations. Also multiple (generalized) eigenvalues can be detected. Whereas in the Jacobi-Davidson method the test subspace can be chosen arbi- trarily, in the JDQZ algorithm essentially two choices for the test subspace remain: the standard Petrov value choice and the harmonic Petrov value choice. It is argued and confirmed by our experiments that especially for interior eigenvalues the harmonic approach is also superior for generalized eigenproblems. Acknowledgments . We acknowledge helpful discussions with Rich Lehoucq and with Beresford Parlett (on naming conventions). We also appreciate the helpful comments by the referees. --R A Test Matrix Collection for Non-Hermitian Eigenvalue Problems The iterative calculation of a few of the lowest eigenvalues and corresponding eigenvectors of large real symmetric matrices Subspace methods for linear The QR transformation: A unitary analogue to the LR transformation Matrix Computations A class of first order factorizations methods Ueber ein leichtes Verfahren An Evaluation of Software for Computing Eigenvalues of Sparse Nonsymmetric Matrices Deflation techniques within an implicitly restarted iter- ation An iterative solution method for linear systems of which the coe An algorithm for generalized matrix eigenvalue problems Computing interior eigenvalues of large matrices Generalizations of Davidson's method for computing eigen-values of sparse symmetric matrices Approximate solutions and eigenvalue bounds from Krylov subspaces Perturbation bounds for means of eigenvalues and invariant subspaces Rational Krylov algorithms for nonsymmetric eigenvalue problems II. Numerical Methods for Large Eigenvalue Problems GMRES: A generalized minimum residual algorithm for solving nonsymmetric linear systems A Jacobi-Davidson iteration method for linear eigenvalue problems The Jacobi-Davidson method for eigenvalue problems and its relation to accelerated inexact Newton schemes Implicit application of polynomial filters in a k-step Arnoldi method Algorithm 406 HQR3 and EXCHNG: Fortran subroutines for calculating and ordering eigenvalues of a real upper Hessenberg matrix Matrix Perturbation Theory The rate of convergence of conjugate gradients Preconditioning by Incomplete Decompositions A generalized eigenvalue approach for solving Ricatti equations Algorithm 590 --TR --CTR James H. Money , Qiang Ye, Algorithm 845: EIGIFP: a MATLAB program for solving large symmetric generalized eigenvalue problems, ACM Transactions on Mathematical Software (TOMS), v.31 n.2, p.270-279, June 2005 Ivo Bleylevens , Ralf Peeters , Bernard Hanzon, Efficiency improvement in an nD systems approach to polynomial optimization, Journal of Symbolic Computation, v.42 n.1-2, p.30-53, January, 2007 Lorenzo Valdettaro , Michel Rieutord , Thierry Braconnier , Valrie Frayss, Convergence and round-off errors in a two-dimensional eigenvalue problem using spectral methods and Arnoldi-Chebyshev algorithm, Journal of Computational and Applied Mathematics, v.205 n.1, p.382-393, August, 2007 Peter Arbenz , Martin Beka , Roman Geus , Ulrich Hetmaniuk , Tiziano Mengotti, On a parallel multilevel preconditioned Maxwell eigensolver, Parallel Computing, v.32 n.2, p.157-165, February 2006 Peter Arbenz , Roman Geus, Multilevel preconditioned iterative eigensolvers for Maxwell eigenvalue problems, Applied Numerical Mathematics, v.54 n.2, p.107-121, July 2005 Daniel Kressner, Block algorithms for reordering standard and generalized Schur forms, ACM Transactions on Mathematical Software (TOMS), v.32 n.4, p.521-532, December 2006 Richard Tran Mills , Andreas Stathopoulos , Evgenia Smirni, Algorithmic modifications to the Jacobi-Davidson parallel eigensolver to dynamically balance external CPU and memory load, Proceedings of the 15th international conference on Supercomputing, p.454-463, June 2001, Sorrento, Italy P.-A. Absil , C. G. Baker , K. A. Gallivan, A truncated-CG style method for symmetric generalized eigenvalue problems, Journal of Computational and Applied Mathematics, v.189 n.1, p.274-285, 1 May 2006 Computing smallest singular triplets with implicitly restarted Lanczos bidiagonalization, Applied Numerical Mathematics, v.49 n.1, p.39-61, April 2004 Lawrence K. Saul , Sam T. Roweis, Think globally, fit locally: unsupervised learning of low dimensional manifolds, The Journal of Machine Learning Research, 4, p.119-155, 12/1/2003 James R. McCombs , Andreas Stathopoulos, Parallel, multigrain iterative solvers for hiding network latencies on MPPs and networks of clusters, Parallel Computing, v.29 n.9, p.1237-1259, September
linear eigenproblems;generalized eigenproblems;QZ-algorithm;jacobi-davidson;generalized Schur form;schur form;iterative methods;QR-algorithm
305235
The Lack of Influence of the Right-Hand Side on the Accuracy of Linear System Solution.
It is commonly believed that a fortunate right-hand side b can significantly reduce the sensitivity of a system of linear equations Ax=b. We show, both theoretically and experimentally, that this is not true when the system is solved (in floating point arithmetic) with Gaussian elimination or the QR factorization: the error bounds essentially do not depend on b, and the error itself seems to depend only weakly on b. Our error bounds are exact (rather than first-order); they are tight; and they are stronger than the bound of Chan and Foulser.We also present computable lower and upper bounds for the relative error. The lower bound gives rise to a stopping criterion for iterative methods that is better than the relative residual. This is because the relative residual can be much larger, and it may be impossible to reduce it to a desired tolerance.
Introduction . When a system of linear equations solved numeri- cally, the accuracy of the computed solution generally depends on the sensitivity of the linear system to perturbations. In this paper we examine how the right-hand side b affects the sensitivity of the linear system and the error estimates. Suppose the matrix A is non-singular and b 6= 0, so x 6= 0. Then the accuracy of a computed solution - x can be determined from the norm-wise relative error xk=kxk. This error is often estimated from an upper bound of the form xk=kxk - condition number backward error: The 'backward error', very informally, reflects the accuracy of the input data A and b, and how well the computed solution - x solves the linear system is in contrast to the 'forward error' xk=kxk, which reflects the accuracy of the output.) The condition number is interpreted as a measure for the sensitivity of the linear system because it amplifies the inaccuracy of the input. The condition number in most error bounds depends only on A but not b. A stable, accurate linear system solver, such as Gaussian elimination with partial pivoting or the QR factorization, usually produces a backward error that is proportional to, among other factors, the product of the machine precision ffl mach and a slowly growing function of the matrix size n. For instance, in IEEE single precision the backward error cannot be smaller than 10 \Gamma7 because the y Department of Mathematics, North Carolina State University, Box 8205, Raleigh, NC 27695- 8205, USA (jmbanocz@unity.ncsu.edu). The research of this author was supported in part by NSF grant DMS-9321938. x Operations Research Program, North Carolina State University, Box 7913, Raleigh, NC 27695- 7913, USA (njchiu@eos.ncsu.edu). z Department of Mathematics, North Carolina State University, Box 8205, Raleigh, NC 27695- 8205, USA (ehcho@eos.ncsu.edu). - Center for Research in Scientific Computation, Department of Mathematics, North Carolina State University, Box 8205, Raleigh, NC 27695-8205, USA (ipsen@math.ncsu.edu). The research of this author was supported in part by NSF grant CCR-9400921. J.M. BANOCZI, N. CHIU, G.E. CHO, I.C.F. IPSEN data A and b cannot be represented more accurately. For a linear system with condition number of about 10 7 , the above error bound is on the order of one. In this case we should be prepared to expect a complete loss of accuracy in at least one component of - x. In this paper we assume that solved by a general-purpose linear system solver: Gaussian elimination with partial pivoting or the QR factorization. Excluding from consideration special-purpose linear system solvers designed to exploit structure in the matrix, such as the fast sine solvers considered in [5]; or Toeplitz, Cauchy or Vandermonde solvers [4] relieves us from assuming additional properties of the backward error. The question we are trying to answer is whether the error bound depends on properties of the right-hand side b. Why is this important? Of course, the influence of b is important when the linear system is ill-conditioned (i.e. when the condition number is on the order of 1=ffl mach ). If a fortunate right-hand side could decrease the condition number, then the error may decrease. This means the computed solution associated with a fortunate right-hand side is more accurate than one associated with an unfortunate right-hand side. But the influence of b is also important for general linear systems as they become large, because condition numbers usually grow with n. Although a large linear system may look well-conditioned because the condition number is merely a small multiple of n, it may be ill-conditioned on our machine because the condition number is on the order of 1=ffl mach . According to the above error bound, the matrix size n must be significantly smaller than 1=ffl mach if - x is to have any accuracy at all. But if a fortunate right-hand side could make the condition number very small, then this soothing effect would become more pronounced as n increases. This implies that we could solve linear systems with fortunate right-hand sides that are much larger than systems with unfortunate right-hand sides. The paper is organised as follows. Section 2 starts with exact (rather than first- residual bounds on the relative error. The condition number in the upper bound is much smaller for some right-hand sides than for others. However, the backward error depends on the condition number. Therefore it is difficult to say anything about the product of condition number and backward error. Section 3 shows that the error bound as a whole does not depend on b. We express the bound in terms of an alternative condition number and backward error that are also independent of b. Section 4 presents a computable, a posteriori version of the error bound; and x5 uses this bound to evaluate stopping criteria for iterative methods. Section 6 expresses the error bound in terms of a third backward error, because this error is the basis for another popular stopping criterion. Section 7 presents Chan and Foulser's 'effective condition number', and shows that it is weaker than our condition number from x2. Section 8 shows that the relative error does not behave like the error bound, because it appears to be weakly dependent on b. After the conclusion in x9, Appendix A briefly discusses how the numerical experiments were carried out. 2. Dependence on the Right-Hand Side. We present a residual bound for the relative error that contains a condition number dependent on the right-hand side. This condition number can be significantly smaller than the traditional matrix condition number. Let A be a n \Theta n non-singular, complex matrix and b 6= 0 be a n \Theta 1 complex vector. Then the system of linear equations has the exact solution x 6= 0. We measure the accuracy of a computed solution - x by means of the norm-wise relative RIGHT-HAND SIDE AND CONDITIONING OF LINEAR SYSTEMS 3 error xk=kxk, where k \Delta k is a p-norm. The relative error can be bounded in terms of the residual as follows [11, Theorem 7.2]:kAk krk xk krk These are exact, as opposed to first-order, bounds. Although the bounds to follow in x2 and x3 represent different interpretations, they are all identical to (2.1). 2.1. Interpretation of the Bounds. Writing shows that - x is the solution to a linear system with perturbed right-hand side. Thus, we compensate for the error in - x by changing the right-hand side. Expressing (2.1) in terms of the corresponding backward error krk=kbk gives [16, Theorem III.2.13]: krk kbk krk where is the traditional matrix condition is a condition number that depends on the right-hand side. In particular, -(A; b) is invariant under scalar multiplication of b, but it does depend on the direction of b: For instance, consider the case when b is a multiple of a left singular vector u k of A. If oe k is a corresponding singular value and v k a corresponding right singular vector (see x7), i.e. then the two-norm version of -(A; b) equals Thus, a right-hand side b lying along a singular vector with a small oe k has a smaller condition number than a b lying along a singular vector with a large oe k . In general, when then there are right-hand sides b for which -(A; b) is significantly smaller than -(A). 4 J.M. BANOCZI, N. CHIU, G.E. CHO, I.C.F. IPSEN The bounds on -(A; b) imply the traditional residual bounds for the relative error [15, Theorem 4.3]:-(A) krk kbk xk krk If the error in - x can be attributed solely to input perturbations of the right-hand side then krk=kbk reflects the accuracy of the input data and it is an appropriate measure for the size of these perturbations. Hence there are right-hand sides for which the bounds (2.2) are tighter than the traditional bounds (2.4). Therefore the error bounds depend on b; and a fortunate right-hand side can reduce the sensitivity of the linear system and increase the accuracy. 2.2. Related Work. The potentially soothing effect of the right-hand side has been known for some time. In the context of special-purpose linear system solvers designed to exploit structure in a matrix, a fortunate right-hand side can significantly reduce the sensitivity of the linear system. This is the case, for instance, when A is a triangular M-matrix, all components of b are non-negative and solved by backsubstitution [9, Theorem 3.5]; or when A is a Vandermonde matrix derived from real, non-negative points arranged in increasing order, the elements of b alternate in sign, and is solved by the Bj-orck-Pereyra algorithm [8, x3]. A component-wise infinity-norm version 1 of -(A; b), is introduced in [4, x4] to explain the high relative accuracy of certain algorithms for solving linear systems whose matrix is a totally-positive Cauchy or Vandermonde matrix. In the context of general purpose algorithms, the situation is not as clear due to the lack of hard results. For instance, when k. In this case Stewart says: 'the solution of the system reflects the condition of A' [16, p 126]; and 'a problem that reflects the condition of A is insensitive to perturbations in b, even if -(A) is large' [15, p 194]. Chan and Foulser [5] define an 'effective condition number' [5, Theorem 1] that is small when b is related to A in a special way. They conclude that for appropriate right-hand sides 'the sensitivity of x can be substantially smaller than that predicted by (However, in x7 we show that the effective condition number is never smaller than -(A; b) and can, in fact, be much larger than -(A).) In the context of linear systems arising from a boundary collocation method for solving Laplace's equation on a two-dimensional domain, Christiansen and Hansen [7] confirm that 'the ordinary condition number is orders of magnitude larger than the effective condition Thus there is evidence that a fortunate right-hand side may be able to reduce the sensitivity of a linear system to perturbations in the right-hand side. Can we therefore conclude that well-conditioned whenever -(A; b) is small - even if -(A) is large? Here jAj denotes the matrix whose elements are the absolute values of the corresponding elements of A. RIGHT-HAND SIDE AND CONDITIONING OF LINEAR SYSTEMS 5 2.3. Numerical Experiments. To answer this question, we compute krk 2 =kbk 2 in the two-norm. We chose sixteen matrices from the MATLAB test matrix suite [10]. The matrices are real and have various properties: non-symmetric, symmetric, indefinite, positive definite, triangular or tridiagonal. The triangular matrices R(Compan) and R(Dorr) are upper triangular matrices from QR factorizations of the matrices Compan and Dorr, respectively. The order n of a matrix A is determined so that its two-norm condition number . Thus the matrix orders range from 5 to 1000. The purpose is to push the limits of single precision accuracy (about 10 \Gamma7 condition number of 10 7 and a relative residual on the order of single precision, the upper bound on the traditional relative error (2.4) equals one. This means at least one component of the computed solution - x may have no correct digits. We designed these extreme cases to see clearly whether a fortunate right-hand side is capable of providing relief in the worst case. We choose the right-hand sides for the linear systems as follows. Each matrix A is paired up in turn with nine different right-hand sides. To obtain a range of values we forced the right-hand sides to lie along three different directions: one direction maximises - 2 another direction minimises - 2 (A; b): a third direction falls in between: b is a random vector. For each direction, the right-hand sides come in three different lengths, long: kbk short Each linear system was solved by two different direct methods: Gaussian elimination with partial pivoting (GE) and the QR factorization (QR). The solutions were computed in single precision, with machine precision on the order of 10 \Gamma7 . More details about the experiments are given in Appendix A. In all tables to follow, the first column represents the direction of b (in terms of while the second column represents the length of b (in terms of kbk 2 ). For each of the nine different right-hand sides, we display the results from GE and from QR. Tables 2.1, 2.2 and 2.3 show the following: When - 2 (A; b) is large then krk 2 =kbk 2 is on the order of machine precision (except for the Chow, Fiedler and Minij matrices, where QR produces krk 2 =kbk 2 as large as small then The numerical experiments suggest that krk 2 =kbk 2 is inversely proportional to both condition number and backward error depend on b we cannot draw any conclusions about their product, the error bound. Therefore we forego krk=kbk as a backward error and -(A; b) as a condition num- ber, and look for alternatives. 3. Independence From the Right-Hand Side. We show that the lower and upper bounds (2.1) essentially do not depend on the direction of b when - x is computed by Gaussian elimination or QR factorization. We rewrite the bounds in terms of a condition number and a backward error that are independent of b. We also explain why krk=kbk varies with -(A; b). 3.1. Another Interpretation of the Bounds. We ended up with krk=kbk as a backward error because we multiplied and divided the bounds in (2.1) by kbk. The result (2.2) is a somewhat arbitrary separation of (2.1) into backward error and condition number. If we focus instead on the bounds (2.1) as a whole then an obvious 6 J.M. BANOCZI, N. CHIU, G.E. CHO, I.C.F. IPSEN choice for backward error is the lower bound krk This makes sense because unless j is small, the relative error isn't going to be small. Expressing (2.1) in terms of j allows us to bracket the relative error in terms of j and a condition number independent of b, xk The numerical experiments below suggest that j is essentially independent of b. 3.2. Numerical Experiments. We compute norm version of j. Tables 3.1, 3.2 and 3.3 show the following: Regardless of - 2 tends to be on the order of machine precision (except for the Chow, Fiedler and Minij matrices where QR produces values for j 2 as large as 10 \Gamma5 ). Thus, Gaussian elimination and QR factorization produce solutions whose backward error j 2 is usually on the order of machine precision. We conclude that in the case of Gaussian elimination and QR factorization the bounds (3.1) are essentially independent of b. The independence of general-purpose algorithms from the right-hand side is also confirmed in [4, x5]. 3.3. Relation Between Backward Errors. To reconcile the two different in- terpretations, (2.2) and (3.1), of the bounds (2.1) we relate the backward errors krk=kbk and j. The relation was already derived in [6, p 99] and is alluded to in krk kbk This confirms the observation in x2.3 that krk=kbk is inversely proportional to -(A; b), does not depend on b. Relation (3.2) implies together with (2.3): kbk That is, when -(A; b) is maximal, krk=kbk can be as small as machine precision. But when -(A; b) is minimal then krk=kbk can be large because it hides the condition number inside. Therefore, j appears to be preferable as a backward error over krk=kbk. 4. Computable Error Bounds. We present computable, a posteriori error bounds that do not depend on the direction of b, when solved by Gaussian elimination or QR factorization. The computable version of j is optimal in a well-defined sense. To obtain bounds that are computable, we measure the relative error instead with regard to the computed krk krk (4. RIGHT-HAND SIDE AND CONDITIONING OF LINEAR SYSTEMS 7 Expressing (4.1) in terms of the computable version of j, krk yields an interval for the relative error [16, Theorem III.2.16]: xk k-xk The numerical experiments below confirm that - j is as good a measure of accuracy as j. 4.1. Numerical Experiments. We compute - j 2 , the two-norm version of - j. Tables 4.1, 4.2 and 4.3 show the following: Regardless of - 2 (A; b), - 2 is on the order of machine precision (except for the Chow and Fiedler matrices where QR produces values for - as large as 10 \Gamma6 ). In case of the Minij matrix, - j 2 is on the order machine precision while j 2 can be as large as 10 \Gamma5 . Thus, Gaussian elimination and the QR factorization tend to produce a computed solution whose backward error 2 is on the order of machine precision. We conclude that in case of Gaussian elimination and QR factorization the bounds (4.2) are essentially independent of b. 4.2. Minimal Matrix Backward Error. Another justification for the bounds (4.1) is the optimality of - j in the following sense: - j represents the best possible (norm-wise) backward error when perturbations are confined to the matrix. Whenever - Theorem III.2.16] Thus - x is the solution to a linear system with a perturbed matrix. Here we compensate for the error in - x by changing the matrix. Moreover, among all E satisfying b there is a matrix E 0 in (4.3) with minimal norm, i.e. In case of the two-norm, for instance, one can choose 2. Therefore, is the smallest norm-wise matrix backward error. Moreover, - j has a similar relation to krk=kbk as j: krk kbk kbk Consequently, krk=kbk AE - means krk=kbk is going to be large whenever - x reflects the condition of A. Arioli, Duff and Ruiz confirm this by observing that 'even an - x that is a good approximation to x can have a large residual' [2, p 139]. 4.3. Bounds on - j. The numerical experiments in x4.1 provide a heuristic justification why - j is small. A theoretical justification comes from the following round-off error bounds. Gaussian elimination with partial pivoting computes a solution - x for a system whose matrix perturbation in the infinity-norm is bounded by [11, Theorem 9.5] 8 J.M. BANOCZI, N. CHIU, G.E. CHO, I.C.F. IPSEN where ae is the growth factor in Gaussian elimination, and ffl is the machine precision. Unless ae is large, - is small in the infinity-norm: kAk1 kAk1 ffl: The QR factorization computes a solution - x for a system whose matrix perturbation is bounded by [11, inequalities (18.7)] where c is a small positive integer. Again, - j is small in the two-norm: ffl: The fact that - j is usually small is applied in the following section to determine a realistic stopping criterion for iterative methods. 5. Stopping Criteria for Iterative Methods. An iterative method solves a linear system by computing a succession of iterates. The method terminates once an iterate satisfies a stopping criterion. Popular stopping criteria require the residual to be sufficiently small. For instance two such stopping criteria are [11, x16.5], x is the current iterate and tol is a user-supplied tolerance. The first criterion requires that krk=kbk should not exceed tol, while the second requires that - should not exceed tol. The first criterion can be harder to satisfy than the second [11, x16.5]. To see this, suppose an iterate - x satisfies krk - tol kAk k-xk. This implies krk kbk kbk tol: Hence - x can be very far from satisfying krk - tol kbk when kbk - kAk k-xk. This confirms the observation in [2, p 139] that krk=kbk 'can be misleading in the case Therefore, if at all feasible, stopping criteria in iterative methods should be based on - rather than on krk=kbk. Preliminary experiments with the matrices from xx2.3, 3.2 and 4.1 indicate that solutions computed by GMRES [14] do satisfy the criterion based on - j. Issues regarding the appropriate choice of stopping criteria have also been discussed in the context of linear systems arising from discretizations of partial differential equations [3, 13]. 6. A Third Interpretation of the Error Bound. We present a third interpretation of the error bounds (2.1) based on a backward error ! that is a mixture of the previous two backward errors. The computable version of ! is optimal in a well-defined sense, and represents the basis for another stopping criterion for iterative methods. RIGHT-HAND SIDE AND CONDITIONING OF LINEAR SYSTEMS 9 Expressing (2.1) in terms of krk gives xk The definitions of j and ! imply the relation and j differs from ! by a factor of at most two: The computable version of ! is krk It represents the smallest (norm-wise) backward error [11, Theorem 7.1]: Moreover, - resembles the backward error from [2], The experiments in [2, x3] suggest that ! 2 behaves much like - j. The two computable backward errors - are related by kbk Hence and - is small whenever - j is small. In particular, if kbk - kAk k-xk then2 Hence the round-off error bounds from x4.3 are also valid for - !. A stopping criterion based on - terminates an iterative method once an iterate x satisfies This criterion is recommended in [11, x16.5], and a version based on ! 2 is recommended in [2, x5]. J.M. BANOCZI, N. CHIU, G.E. CHO, I.C.F. IPSEN 7. The Effective Condition Number. We present Chan and Foulser's 'effec- tive condition number' - eff [5] and show that it is weaker than - 2 (A; b). That is, the effective condition number is never smaller than - 2 (A; b) but can be much larger than be a singular value decomposition, where U and V are unitary matrices, \Sigma is a diagonal matrix, and denotes the conjugate transpose. The diagonal elements of \Sigma, are the singular values of A. The columns of U and V , are the left and right singular vectors, respectively. Partition the columns of U , k be the orthogonal projector onto range(U k ). If P k b 6= 0 then is the kth effective condition number of the linear system stating Chan and Foulser's error bound, we show that - eff (k) can never be smaller than -(A; b). A similar inequality is stated in [4, (5.2)]. Theorem 7.1. If P k b 6= 0; then Proof. Partition V and \Sigma conformally with U , and Therefore The following bound is a direct consequence of (2.2) and Theorem 7.1, and is therefore weaker than (2.2). RIGHT-HAND SIDE AND CONDITIONING OF LINEAR SYSTEMS 11 Corollary 7.2 (Theorem 1 in [5]). Chan and Foulser [5, p 964, x1] seem to imply that - eff (k) can be much smaller than the traditional condition number when b is close to the direction of un , i.e. when kPn bk 2 =kbk 2 - 1. In other cases, however, - eff (k) can be much larger than as the example below illustrates. Remark 1. - eff (k) can be arbitrarily much larger than - 2 (A). A simple 2 \Theta 2 matrix illustrates this. has a condition number singular value decomposition is with Hence If then the condition number associated with the smallest singular value is Choosing large makes - eff (2) arbitrarily large, while remains fixed. 8. The Relative Error. Sections 3-6 argued that the error bounds (2.1) essentially do not depend on the direction of b. Can we conclude that the same is true for the accuracy of the computed solution? That is, does the relative error also not depend on the direction of b? Suppose for a moment that the accuracy of the computed solution did indeed depend on b. Then the magnitude of the relative error should change with the direction of b. In particular, consider the two linear systems -(A). If we also assume that the error behaves in the same way as the bounds (2.2) then we would expect the relative error for the first system to be -(A) times smaller than the error of the second system. Since our matrices are constructed so that -(A) is close to the inverse of machine precision, the relative error for should be close to machine precision. 8.1. Numerical Experiments. We compute the two-norm relative error Tables 8.1, 8.2 and 8.3 provide only an inconclusive answer. Unlike its lower and upper bounds, the relative error does seem to depend on the right-hand side. But this dependence appears to be weak. It is stronger for some matrices than for others. 12 J.M. BANOCZI, N. CHIU, G.E. CHO, I.C.F. IPSEN Dependence on the Direction of b. The relative errors tend to be smaller 1, and larger when - (A). The Dorr matrices are an exception: Both GE and QR produce errors for - 2 1 that can be a factor of ten larger than the errors for - 2 (A). Similarly for the Fiedler matrix: GE produces the smallest relative error for the random right-hand side, although it does not have the smallest -(A; b) value. In case of the Kahan matrix, for instance, the relative errors vary by a factor as high as 10 4 . This variation is not too far away from . Since the Kahan matrix is triangular, no factorization is performed (that's why GE and QR produce exactly the same errors). Does this mean that triangular matrices exhibit a stronger dependence on the direction of b, or that a factorization can destroy the relation between A and b? To answer these questions we computed the upper triangular factors R(Compan) and R(Dorr) in the QR factorizations of the Compan and Dorr matrices, respectively. In exact arithmetic, the matrix R(A) has the same singular values as A, hence the same matrix condition number. If a factorization did indeed destroy the relation between A and b, then we would expect R(A) to depend more on the right-hand side than A. However, the variation in errors is about the same for the Dorr and R(Dorr) matrices; and the variation in errors for R(compan) is about a factor of ten higher than for the Compan matrix. Thus there is no definite indication that the error of a triangular system depends more strongly on the right-hand side than the error of a general, square system. Now consider the size of the relative errors when - 1. The relative error for the Kahan matrix is on the order of machine precision, but the error produced by the QR factorization of the Minij matrix is on the order of 10 \Gamma1 , significantly larger than machine precision. We conclude that the variation in errors for different values of - 2 (A; b) is usually much smaller than - 2 (A); and that the error is significantly larger than machine precision when - 1. Therefore, the error appears to depend only weakly on the direction of the right-hand side. The independence of the relative error from the right-hand side in the case of Gaussian elimination is also observed in [4, x5]. Dependence on the Length of b. Although the bounds in x2 and x3 are invariant under the length of b, the computable bounds in x4 do change with kbk. Sometimes the magnitude of the errors changes with kbk and sometimes it does not. Usually the variation in errors is limited to a factor of about ten. For some matrices, such as the Fiedler, Dorr and Minij matrices, the magnitude of the errors does not change with kbk. But in other cases, such as the Clement matrix, the magnitude of the errors can differ by a factor of 100. Dependence on Algorithms. The relative error also depends on the algo- rithms. Gaussian elimination produces a smaller relative error than QR: The difference in errors can be as high as a factor of 10 6 , e.g., for the Minij matrix when 1. This could be due to the higher operation count of QR and the larger amount of fill in the triangular factor. The error for QR is often of the same magnitude as the upper bound (2.1), e.g., for the Minij and Fiedler matrices. Thus the upper bounds for the error are realistic. 9. Conclusion. We have investigated how the direction of the right-hand side b affects the error bounds for a system of linear equations If the error in - x is due solely to input perturbations of the right-hand side then RIGHT-HAND SIDE AND CONDITIONING OF LINEAR SYSTEMS 13 krk=kbk reflects the accuracy of the input data. The norm-wise relative error can be estimated from the bounds krk kbk krk where the condition number is interpreted as a measure for the sensitivity to perturbations in the right-hand side. The error bounds depend on the right-hand side because a fortunate choice of b can significantly reduce the condition number -(A; b) and may thus increase the accuracy. If, however, perturbations are not confined exclusively to the right-hand side then krk=kbk can be much larger than the inaccuracy in the data and the backward error from a linear system solver. To account for perturbations in the matrix, the error bounds are expressed in terms of xk According to numerical and theoretical evidence, j tends to be on the order of machine precision when - x is computed by Gaussian elimination with partial pivoting or by the QR factorization. Hence the lower and upper error bounds are essentially independent of b. Our numerical experiments suggest that the upper error bound is realistic because it is often achieved by the QR factorization. In the context of iterative methods we recommend krk - tolkAkk-xk as a stopping criterion over krk - tolkbk. This is because krk=kbk is much larger than - experiments indicate that GMRES (without preconditioning) can produce solutions - x that satisfy krk - tol kAk k-xk with tol equal to machine precision. However they can be far from satisfying krk - tol kbk. A third stopping criterion, krk - tol very much like krk - tol kAk k-xk. Hence it is preferable to krk=kbk, as well. Acknowledgement . We thank Iain Duff and especially Stan Eisenstat for many helpful suggestions. Appendix A. Implementation of the Numerical Experiments. We chose the two-norm because it is easy to determine right-hand sides with particular - 2 values: Let oe min be the smallest singular value of A and oe max be the largest; and denote the corresponding left and right singular vectors by umin , umax , and v min , respectively. This implies for the smallest singular value and for the largest singular value takes on its extreme values when b is a left singular vector associated with an extreme singular value. Therefore, we enforced - 2 choosing 14 J.M. BANOCZI, N. CHIU, G.E. CHO, I.C.F. IPSEN b to be a non-zero multiple of umax , and - 2 choosing b to be a non-zero multiple of umin . We generated the matrices and right-hand sides in double precision in MATLAB (version 4.2c) [12] and then converted them to single precision, so that A and b admit exact representations in single precision. The triangular matrices R(Compan) and R(Dorr) were computed from the MATLAB QR factorizations of the matrices Compan and Dorr, respectively. To ensure that the right-hand sides lie along the desired directions, we computed for the unit-norm right-hand sides The remaining calculations were done in HP FORTRAN 77 (version 9.16). A computed solution - x is represented by the single precision solution of the following subroutines [1]: SGETRF and SGETRS for Gaussian elimination with partial pivoting; and SGEQRF, SORMQR and STRTRS for the QR factorization. To get a representation for the exact solution x, we extended the single precision versions of A and b to double precision and solved the resulting system in double precision by Gaussian elimination (subroutines DGETRF and DGETRS). Note: The exact representations of A and b in single precision ensure that both - x and x, are computed from the same input data. The data in Tables 2.1-8.3, krk 2 =kbk 2 , were computed in double precision, after conversion of single precision quantities to double precision. All computations were performed on a HP9000 Model 712/60 workstation running HP-UX operating system version E release A.09.05. --R Stopping criteria for iterative solvers Vector stopping criteria for iterative methods: Applications for PDE's The fast Bj-orck-Pereyra-type algorithm for parallel solution of Cauchy linear equations Effectively well-conditioned linear systems On the sensitivity of solution components in linear systems of equations The effective condition number applied to error analysis of certain boundary collocation methods analysis of the Bj-orck-Pereyra algorithms for solving Vandermonde systems The MathWorks Vector stopping criteria for iterative methods: Theoretical tools GMRES: A generalized minimal residual algorithm for solving nonsymmetric linear systems Introduction to Matrix Computations Matrix Perturbation Theory --TR
condition number;right-hand side;stopping criterion;backward error;linear system
305238
Adaptively Preconditioned GMRES Algorithms.
The restarted GMRES algorithm proposed by Saad and Schultz [SIAM J. Sci. Statist. Comput., 7 (1986), pp. 856--869] is one of the most popular iterative methods for the solution of large linear systems of equations Ax=b with a nonsymmetric and sparse matrix. This algorithm is particularly attractive when a good preconditioner is available. The present paper describes two new methods for determining preconditioners from spectral information gathered by the Arnoldi process during iterations by the restarted GMRES algorithm. These methods seek to determine an invariant subspace of the matrix A associated with eigenvalues close to the origin and to move these eigenvalues so that a higher rate of convergence of the iterative methods is achieved.
Introduction . Many problems in Applied Mathematics and Engineering give rise to very large linear systems of equations with a sparse nonsymmetric nonsingular matrix A. It is often desirable, and sometimes necessary, to solve these systems by an iterative method. Let x 0 be an initial approximate solution of (1.1), and let r be the associated residual vector. Introduce the Krylov subspaces associated with the matrix A and vector r 0 . Many popular iterative methods determine the mth iterate, xm , so that xm \Gamma x We refer to such methods as Krylov subspace iterative methods; see, e.g., Freund et al. [12] for a recent review. Let the iterate xm be generated by a Krylov subspace iterative method. Then the residual error r associated with xm satisfies where the residual polynomial pm is determined by the iterative method, and satisfies denote the Euclidean norm on R n , as well as the associated induced matrix norm on R n\Thetan . The restarted Generalized Minimal Residual algorithm by Saad and Schultz [22], described in Section 3, is one of the most popular Krylov subspace iterative methods for the solution of linear systems with a nonsymmetric matrix. The residual polynomial determined by this algorithm satisfies Department of Mathematics and Computer Science, Kent State University, Kent, OH 44242. E-mail: jbaglama@mcs.kent.edu. Research supported in part by NSF grant F377 DMR-8920147 ALCOM. y Department of Mathematical Sciences, Stevens Institute of Technology, Hoboken, NJ 07030. E-mail: na.calvetti@na-net.ornl.gov. Research supported in part by NSF grant DMS-9404692. z Computer Science Department, Stanford University, Stanford, CA 94305. x Department of Mathematics and Computer Science, Kent State University, Kent, OH 44242. E-mail: reichel@mcs.kent.edu. Research supported in part by NSF grant DMS-9404706. J. Baglama et al. m denotes the set of all polynomials p of degree at most m such that The analysis and implementation of the restarted GMRES(m) algorithm, and modifications thereof, continue to receive considerable attention; see, e.g., [4, 5, 7, These algorithms are particularly attractive when a suitable preconditioner n\Thetan for the matrix A is available; see, e.g., [2, 15, 21] for recent discussions on preconditioners. A matrix M \Gamma1 is a good preconditioner if the application of an iterative method of interest to the preconditioned linear system of equations gives a higher rate of convergence of the computed iterates than application of the iterative method to the original linear system (1.1). Moreover, we would like the preconditioner M \Gamma1 have the property that for any w 2 R n , the vector M \Gamma1 w can be rapidly evaluated. The matrix M \Gamma1 in (1.5) is sometimes referred to as a left preconditioner. The present paper describes two new adaptive methods for determining preconditioners during the iterations with the restarted GMRES(m) algorithm. The standard implementation of the restarted GMRES(m) algorithm [22] is based on the Arnoldi process [1], described in Section 2, and this allows spectral information of A to be gathered during the iterations. We use this information to determine an approximation of an invariant subspace of A associated with eigenvalues close to the origin. Our preconditioner essentially removes the influence of these eigenvalues on the rate of convergence. We will focus on the effect of the preconditioner on the spectrum of A, however, it is known that the rate of convergence of the iterates computed by the GMRES(m) algorithm also is determined by pseudospectra of A; see Nachtigal et al. [19]. For ease of presentation, we ignore the effect of the preconditioner on the pseudospectra in the present paper. Our preconditioners are particularly effective when there is a cluster of a few eigenvalues of A that have a large influence on the rate of convergence. A few illustrations can be found in Section 4. The determination as well as the application of our preconditioners does not require the evaluation of any matrix-vector products with the matrix A in addition to those needed for the Arnoldi process and for the evaluation of certain residual errors. The implementations use the recurrence formulas of the Implicitly Restarted Arnoldi (IRA) method described by Sorensen [23] and more recently by Lehoucq [17]. Our preconditioners can be combined with other preconditioners, and are also applicable when no other known efficient preconditioner is available. A different method to adaptively determine a preconditioner during iterations by the restarted GMRES(m) algorithm has recently been described by Erhel et al. [11]. By utilizing the recurrence formulas of the IRA method, our preconditioning scheme allows more flexibility in the choice of preconditioner and requires less computer memory than the method described in [11]. Another adaptive preconditioning method has been presented by Kharchenko and Yeremin [16]. Their method differs from our schemes in how approximate invariant subspaces are determined. Morgan [18] also uses approximate invariant subspaces to improve the rate of convergence of the restarted GMRES(m) algorithm; instead of constructing a preconditioner, he appends an approximate invariant subspace to the Krylov subspaces generated by the Arnoldi process. We feel that our new algorithms are attractive because of their simplicity, and because the IRA method, on which our algorithms are based, typically determines adequate approximate invariant subspaces fairly rapidly. Adaptive preconditioners 3 Let the matrix A have the spectral factorization Then (1.3) and (1.4) yield the bound where -(A) denotes the spectrum of A. Note that the bound (1.7) would decrease if we were able to replace -(A) by a subset. Our preconditioners have roughly this effect. For definiteness, assume that the eigenvalues of A have been ordered according to and let A be scaled so that A good approximation of such a scaling of A can be determined during the iterations. This is discussed below. The Arnoldi process determines a decomposition of the form where Vm 2 R n\Thetam m\Thetam is an upper Hessenberg matrix. We refer to (1.10) as an Arnoldi decomposition of A. Throughout this paper e j denotes the jth axis vector of appropriate dimension, and I j denotes the identity matrix of order j. When Vm e the columns of Vm span the Krylov subspace Km (A; r 0 ) defined by (1.2). For future reference, we define Let the matrix V k 2 R n\Thetak consist of the first k columns of Vm , and let the columns of the matrix Wn\Gammak span R n nspanfV k g, where spanfV k g denotes the span of the columns of V k . Assume that W T I n\Gammak . Thus, the columns of the matrix [V k Wn\Gammak ] form an orthogonal basis of R n . Introduce the matrix We will use the inverse of matrices of the form (1.12) with k - n as left precondi- tioners. The form of the inverse is given below. Proposition 1.1. Let Q 2 R n\Thetan be an orthogonal matrix, and partition it according to where the submatrix V consists of the k first columns of Q, and the submatrix W consists of the remaining columns. Assume that nonsingular. Then the matrix is nonsingular, and its inverse is given by 4 J. Baglama et al. Proof. The matrix (1.13) can be written as \Theta I n\Gammak and therefore \Theta I n\Gammak This shows (1.14). When the columns of the matrix V in Proposition 1.1 span an invariant subspace of A, the eigenvalues of the matrix M \Gamma1 A can be expressed in terms of the eigenvalues of A. Corollary 1.2. Let the matrices V , W and H be as in Proposition 1.1, and assume, moreover, that the columns of the matrix V span an invariant subspace of A associated with the eigenvalues where the eigenvalue 1 has multiplicity at least k. Proof. The matrix A is similar to ~ A \Theta A 12 A 22 and -( ~ A 22 -ng. Formula (1.16) and the representation (1.15) yield \Theta I A 12 A 22 Thus, the spectrum of M \Gamma1 A consists of -( ~ A 22 ) and the eigenvalue 1. The multiplicity of the latter eigenvalue is at least k. A result analogous to Corollary 1.2 for a right preconditioner is shown by Erhel et al. [11]. We remark that application of preconditioners of the form (1.14) is simplified by the fact that Thus, the matrix W does not have to be computed. The following example compares bounds for the rate of convergence of iterates determined by the GMRES(m) algorithm when applied to the original linear system (1.1) and to the preconditioned linear system (1.5) with the preconditioner (1.14), where we assume that the conditions of Corollary 1.2 hold. Example 1.1. Assume that A has a spectral factorization of the form (1.6) with all eigenvalues real and positive, and let the eigenvalues be ordered according to (1.8). Then (1.7) yields that lim sup min Adaptive preconditioners 5 where Tm (z) is the Chebyshev polynomial of the first kind of degree m for the interval and the equality (1.19) follows from well-known properties of the Chebyshev polynomials; see, e.g., [13, Section 10.1.5]. be the preconditioner (1.14), and assume that the conditions of Corollary 1.2 hold. This preconditioner eliminates the influence of the k smallest eigen-values of A on the rate of convergence of the GMRES(m) algorithm. Specifically, the GMRES(m) algorithm applied to the preconditioned linear system (1.5) yields a sequence of residual vectors that can be bounded by lim sup where, as usual, r . The bound (1.20) can be shown by first noting that lim sup and then applying the bound (1.18) to the right-hand side of (1.21). 2 In actual computations, we determine a preconditioner from a Krylov subspace spanfV k g, which is close to an invariant subspace. The computations of Example 1.1 suggest that the GMRES(m) algorithm will require fewer iterations to determine an accurate approximate solution of (1.1) when applied to the preconditioned linear system (1.5) with such a preconditioner than when applied to the original unpreconditioned system (1.1). This is verified by numerical experiments, some of which are presented in Section 4. 2. Construction of the preconditioners. In this section we describe how to determine an approximate invariant subspace of A associated with the eigenvalues by using the recursion formulas of the IRA method of Sorensen [23]. We first present the Arnoldi process [1]. Algorithm 2.1. Arnoldi process Input: k, m, upper Hessenberg matrix H Output: upper Hessenberg matrix n\Thetam , do do h 'j := v T endfor j;We may assume that all vectors f generated by Algorithm 2.1 are nonvanishing, because if f then the columns of the matrix V j generated span an invariant subspace of A, and V j can be used to construct a preconditioner as described in Example 1.1. When on input to Algorithm 2.1, only the initial vector f 0 has 6 J. Baglama et al. to be provided. We note that if f m 6= 0, then we can define the matrix with orthogonal columns. In the sequel, we will use the matrix This is an (m matrix of Hessenberg-type, whose leading m \Theta m principal submatrix is Hm , and whose (m 1)st row is . Numerical difficulties can arise in the computation of the vectors f j in the al- gorithm. The computations are done by the modified Gram-Schmidt process, with one reorthogonalization. Neglecting to enforce orthogonality of each vector f j against the vectors give rise to spurious eigenvalues of the matrix Hm , i.e., eigenvalues which cannot be considered approximations of eigenvalues of A. Given the Arnoldi decomposition (1.10) with initial vector the recursion formulas of the IRA method can be used to compute the vector for any monic polynomial of degree evaluating any new matrix-vector products with the matrix A. The coefficient jm\Gammak is a scaling factor chosen so that kv (m\Gammak) 1. We will discuss the selection of the zeros z j below. The recursion formulas of the IRA method are truncated versions of the recursion formulas for the QR algorithm with explicit shifts, with the zeros z j chosen as shifts; see, e.g., [13, Chapter 7] for a description of the QR algorithm. We therefore sometimes refer to the zeros z j as shifts. Thus, let the decomposition (1.10) be given, and determine the QR factorization I m and R (1) is upper triangular. Putting is also a Hessenberg matrix. Multiplication of equation (2:4:2) by e 1 yields where ae (1) Equation (2.5) displays the relationship between the initial Arnoldi vector v 1 and the vector v (1) 1 . After applying shifts we obtain the decomposition (2. Adaptive preconditioners 7 where Here denotes the orthogonal matrix associated with the shift z j . Introduce the partitioning Hm\Gammak and equate the first k columns on the right-hand side and left-hand side of (2.6). This gives where and V (m\Gammak) m\Gammak ]. It follows from and (2.8), that (V (m\Gammak) Thus, (2.7) is an Arnoldi decomposition of A. By construction, the vector v (m\Gammak) can be written as (2.3). While our description of the IRA method is based on recursion formulas for the QR algorithm with explicit shifts, our implementation is based on the QR algorithm with implicit shifts for reason of numerical stability; see [13, Chapter 7] for a description of this QR algorithm. The use of implicit shifts allows the application of complex conjugate shifts without using complex arithmetic. We first apply the Arnoldi process to compute the Arnoldi decomposition (1.10), and then use the recursion formulas of the IRA method to determine the Arnoldi decomposition (2.7). The purpose of these computations is to determine an accurate approximation of an invariant subspace of A associated with the eigenvalues We would like to choose the zeros z z m\Gammak of /m\Gammak , so that the first column v (m\Gammak) k defined by (2.3) is in, or close to, an invariant subspace of A associated with the eigenvalues Let f' (m) denote the eigenvalues of the upper Hessenberg matrix Hm in (1.10), and order them so that m AVm is an orthogonal projection of A, we consider the ' (m) j to be approximations of eigenvalues of A. In order to force the vector v (m\Gammak) 1 into an invariant subspace of A associated with the k eigenvalues of A of smallest magnitude, we choose the zeros i.e., the z j are chosen to be available approximations of the eigenvalues of A of largest magnitude. This selection of zeros is discussed by Sorensen [23], Calvetti 8 J. Baglama et al. et al. [6] and Lehoucq [17], and these zeros are there referred to as "exact shifts". Numerical experience indicates that the ordering of the shifts according to (2.10) is adequate in the sense that the computed matrices H (m\Gammak) very close to the k eigenvalues of Hm of smallest magnitude. Let f' (k) j=1 be eigenvalue-eigenvector pairs of H (m\Gammak) k , and introduce the vectors are approximate eigenvalue-eigenvector pairs of A with residual errors We accept spanfV k g as an approximate invariant subspace of A if kf (m\Gammak) where ffl subspace ? 0 is a parameter. The purpose of the matrix H (m\Gammak) k in (2.11) is to make the bound invariant under scaling of A. If the inequalities (2.11) are not satisfied, then we apply Algorithm 2.1 with the Arnoldi decomposition (2.7) as input in order to determine a new Arnoldi decomposition (1.10) with an m \Theta m upper Hessenberg matrix Hm . We then again apply the recursion formulas of the IRA method with the zeros chosen to be the of Hm of largest magnitude. This gives an Arnoldi decomposition of the form (2.7), and we check whether the inequalities (2.11) are satisfied. The computations are repeated in this fashion until (2.11) holds. We obtain in this way an Arnoldi decomposition of the form (2.7) with matrices k and H k , such that, in general, spanfV k g is an accurate approximation of an invariant subspace associated with the k eigenvalues of smallest magnitude of A, and -(H k ) is an accurate approximation of the set f- j g k . The accuracy of the approximations depends on the parameter ffl subspace in (2.11), the distribution of the eigenvalues of A, and the departure from normality of A. The matrices V k and H k so obtained are used to define our first preconditioner where we have used (1.17). We describe in Section 3 how to combine the IRA process with the restarted GMRES algorithm and Richardson iteration, so that we can improve an available approximate solution of (1.1) while determining the preconditioner M \Gamma1 1 . Having computed the preconditioner M 1 , we apply the method outlined above to the preconditioned system (1.5) in order to determine an approximation of an invariant subspace associated with the eigenvalues of smallest magnitude of the matrix simultaneously improve an available approximate solution of (1.1). This yields a new preconditioner M \Gamma1 2 for the system M \Gamma1 equivalently, a new preconditioner M 1 for the system (1.1). The computations are continued in this manner until we have determined a preconditioner of the form for some specified integer ff 0 - 1. The form (2.13) of the preconditioner makes it natural to scale A so that (1.9) holds. An approximation of such a scaling is achieved by scaling the linear system (1.1) by the factor 1=j' (m) m is an eigenvalue Adaptive preconditioners 9 of largest magnitude of one of the matrices Hm generated by Algorithm 2.1 during our computation of the preconditioner M \Gamma1 1 . We remark that for certain matrices A other techniques for achieving such a scaling may be available. For instance, one may be able to use Gershgorin disks or the inequality matrix norm induced by a vector norm; see [24, Chapter 6] for details on the latter topics. 3. The iterative methods. This section describes our two algorithms for adaptive preconditioning in detail. One of them, Algorithm 3.5, combines the IRA process with Richardson iteration and the GMRES algorithm. The other scheme, Algorithm 3.6, does not apply Richardson iteration. We first recall the restarted GMRES(m) algorithm by Saad and Schultz [22] for the solution of linear systems of equations (1.1). Algorithm 3.1. Restarted GMRES(m) algorithm Input: m, initial approximate solution x Output: approximate solution xm , associated residual vector r m . while krm k=kr solution do Compute by Algorithm 2.1 with input . Then the matrices Vm+1 and - Hm , defined by (2.1) and (2.2), respectively, are also available. Compute solution ym Hm yk. endwhile;We now describe how to improve an available approximate solution by Richardson iteration while applying the recursion formulas of the IRA method to an Arnoldi decomposition. These iterations can be carried out without evaluating matrix-vector products with the matrix A. Let x 0 be an available approximate solution of (1.1). Richardson iteration can be written as where the are relaxation parameters. We would like the parameters ffi j to be such that the approximate solutions x j converge rapidly to the solution of (1.1) as j increases. For future reference, we note that the residual vectors (3.2) can be written as Y Theorem 3.2. Let x 0 be an approximate solution of (1.1), and let r Consider the Arnoldi decomposition m with the initial vector k. Apply the recursion formulas of the IRA method with zeros z m. Then the residual vectors (3.2) associated with the iterates (3.1) computed by Richardson iteration with relaxation parameters J. Baglama et al. are given by Y m. Here Q (') denotes the orthogonal matrix and R (') the upper triangular matrix associated with the zero z ' in the IRA recursion formulas. Moreover, v (m) Proof. We first show (3.4) for 1. Substitution of v The representation (3.3) now shows that We turn to the case when 2. From (3.3) and (3.5), we obtain Replace by VmQ (1) in equations (2.4.1)-(2.4.4), and multiply the equation (2.4.2) so obtained by e 1 . This shows, analogously to (2.5), that Substitution of (3.7) into (3.6) shows (3.4) for 2. Continuing in this manner yields m. The case has to be treated separately. We have the Arnoldi decomposition and similarly as in [3], we obtain v (m) 1 . Choosing ae (m) completes the proof. Prior to the development of the GMRES(m) algorithm, Saad [20] introduced the Full Orthogonalization algorithm. This is a Galerkin method for the solution of (1.1). Let x 0 be an approximate solution of (1.1) and let r 0 be the associated residual vector. Consider the Arnoldi decomposition (1.10), and let v be the same as in Theorem 3.2. The FO(m) algorithm determines an improved approximate solution xm of (1.1) by solving the linear system and then letting The following result shows how this approximate solution can be determined by Richardson iteration. Theorem 3.3. Let the vectors x 0 and r 0 , and the Arnoldi decomposition (1.10), be the same as in Theorem 3.2. Assume that the Arnoldi decomposition exists with Adaptive preconditioners 11 kfm k 6= 0 and that the matrix Hm in the Arnoldi decomposition is nonsingular. Let in (3.4), and let the relaxation parameters for Richardson iteration be reciprocal values of the eigenvalues of Hm . Then, in exact arithmetic, the approximate solution xm determined by Richardson iteration (3.1)-(3.2) equals the approximate solution computed by the FO(m) algorithm. Proof. Substitute use the fact that the linear system (3.8) can be written as Hm Introduce, for polynomials f and g, the bilinear form By construction, where g j is a polynomial of degree j. The In particular, equations (3.10) and (3.11) yield which shows that pm is the residual polynomial of degree m for the FO(m) algorithm, and therefore satisfies pm Combining formulas (1.10) and (3.11) yields the identity which shows that the eigenvalues f' (m) of Hm are the zeros of gm . In particular, all ' (m) therefore pm can be written as pm It follows that Y A comparison of (3.12) with (1.3) and (3.3) shows that m steps of Richardson iteration with relaxation parameters j and an application of the FO(m) algorithm correspond to the same residual polynomial, and therefore are equivalent. The implementation of our iterative method is based on the following observation. Corollary 3.4. Let x j \Gamma1 be an approximate solution of (1.1), and let r be the associated residual vector. Let be an Arnoldi decomposition, with initial vector j=1 the eigenvalues of H ' , let x be the approximate solution J. Baglama et al. obtained by one step of Richardson iteration with relaxation parameter q , for let an application of the recursion formulas of the IRA method to (3.13) with shift ' (') q yield the Arnoldi decomposition AV (1) is the triangular matrix in a QR factorization of H I ' . Moreover, -(H (1) . Proof. The Corollary follows from Theorem 3.2 and the fact that when we use an exact shift, the eigenvalues of the reduced matrix H (1) are the eigenvalues of the original matrix H ' , except for the shift. The latter result is shown by Sorensen [23, Lemma 3.10]. The corollary above shows that we can apply shifts, one at a time, and determine the required residual vectors from the first column of the matrices V ' in the available Arnoldi decompositions. An analogous result can be established for complex conjugate shifts. In the latter case, the recursion formulas for the IRA method are implemented by using the QR algorithm with implicit double shifts. This obviates the need to use complex arithmetic. A double step of Richardson iteration, with complex conjugate relaxation parameters, also can be carried out without using complex arithmetic. For notational simplicity, the algorithm below for our iterative method does not use double shifts and double steps, however, our implementation of the algorithm used for the computed examples of Section 4 does. Algorithm 3.5. Adaptively preconditioned GMRES(m) algorithm with Richardson iteration Input: tolerance for computed approximate solution ffl solution , tolerance for approximate invariant subspace ffl subspace , dimension m of largest Krylov subspace determined, dimension k of approximate invariant subspace to be computed, maximum number ff 0 of preconditioners M \Gamma1 j to be computed, maximum number fi 0 of Arnoldi decompositions of order m to be determined for each preconditioner . Output: computed approximate solution x associated residual vector r j , preconditioner for do Compute m by Algorithm 2.1 with initial vector for do Compute eigenvalues f' (m) of matrix Hm in Arnoldi decomposition and order them according to (2.9). scale matrix and right-hand side of linear system by factor 1=j' (m) j. Then equation (1.9) is approximately satisfied. do Apply shift ' (m) m+1\Gamma' to Arnoldi decomposition and compute residual vector M \Gamma1 r j as described by Corollary 3.4. This gives m\Gamma' . Adaptive preconditioners 13 endfor '; if bound (2.11) is satisfied then goto Use the Arnoldi decomposition M \Gamma1 AV (m\Gammak) k as input to Algorithm 2.1 and apply the Arnoldi process to compute the Arnoldi decomposition M . endfor fi; 1: Improve approximate solution by GMRES(k) and update preconditioner: The k , as well as the matrices and (2.2), are available. Compute solution y k 2 R k of min 2: M \Gamma1 3: r j+k := solution then done; endfor ff; while kr j k=kr solution do Apply M by Algorithm 2.1 with initial vector the matrices Vm+1 and - Hm defined by (2.1) and (2.2), respectively. Compute solution ym 4: r j+m := endwhile;In Algorithm 3.5, we only have to compute matrix-vector products with the matrix A when applying the Arnoldi process, and when evaluating residual vectors r ' in the lines labeled "3:" and "4:". We now examine the storage requirement of Algorithm 3.5 and count the number of n-vectors that have to be stored. Storage necessary to represent the matrix A is ignored, since it is independent of the iterative method used. Each preconditioner requires the storage of an n \Theta k matrix V k , and we limit the number of these preconditioners to ff 0 . Thus, the preconditioner M \Gamma1 defined by (2.13) requires the storage of at most ff 0 k n-vectors. In particular, the matrix M \Gamma1 is not actually formed. The line marked "2:" in Algorithm 3.5 is to be interpreted symbolically to mean that the storage for the matrix M \Gamma1 and the formula for evaluating matrix-vector products with M \Gamma1 are updated. The GMRES(m) algorithm in the while-loop of Algorithm 3.5 requires additional storage for the vectors x j and r j , and for the matrix Vm+1 2 R n\Theta(m+1) . This is equivalent to the storage of m+ 3 n-vectors. The vector Algorithm 3.5 is up to a scaling factor stored in the first column of the matrix Vm+1 . The last column of Vm+1 contains the vector fm up to a scaling factor. The right-hand side vector b also has to be stored. Therefore, the total storage requirement of Algorithm 3.5 is at most ff Algorithm 3.6 below is obtained by replacing Richardson iteration in Algorithm 3.5 by the GMRES algorithm. This replacement makes the the residual error decrease more smoothly as the iterations proceed. However, the iterates and preconditioners generated by Algorithms 3.5 and 3.6 are not the same, and we have found that the 14 J. Baglama et al. former algorithm not seldom gives faster convergence. This is illustrated in Section 4. We therefore feel that both algorithms are of interest. The storage requirement of Algorithm 3.6 is essentially the same as of Algorithm 3.5. For notational simplic- ity, Algorithm 3.6 does not use double shifts, however, our implementation of the algorithm used for the computed examples of Section 4 does. Algorithm 3.6. Adaptively preconditioned GMRES(m) algorithm Input: tolerance for computed approximate solution ffl solution , tolerance for approximate invariant subspace ffl subspace , dimension m of largest Krylov subspace determined, dimension k of approximate invariant subspace to be computed, maximum number ff 0 of preconditioners M \Gamma1 j to be computed, maximum number fi 0 of Arnoldi decompositions of order m to be determined for each preconditioner . Output: computed approximate solution x associated residual vector r j , preconditioner for do Compute m by Algorithm 2.1 with initial vector Apply GMRES(m): determine the matrices Vm+1 and - Hm defined by (2.1) and (2.2), respectively. Compute solution ym for do Compute eigenvalues f' (m) of matrix Hm in Arnoldi decomposition and order them according to (2.9). scale matrix and right-hand side of linear system by factor 1=j' (m) j. Then equation (1.9) is approximately satisfied. do Apply shift ' (m) m+1\Gamma' to Arnoldi decomposition by using the IRA formulas (2.4)-(2.8). This gives Arnoldi decomposition m\Gamma' . endfor '; if bound (2.11) is satisfied then goto Use the Arnoldi decomposition M \Gamma1 AV (m\Gammak) k as input to Algorithm 2.1 and apply the Arnoldi process to compute the Arnoldi decomposition M . Apply GMRES(m): determine the matrices Vm+1 and - Hm defined by and (2.2), respectively. Compute solution ym endfor fi; 1: Improve approximate solution by GMRES(k) and update preconditioner: The k , as well as the ma- Adaptive preconditioners 15 trices V k+1 and - and (2.2), are available. Compute solution y k 2 R k of min 2: M \Gamma1 3: r j+k := solution then done; endfor ff; while kr j k=kr solution do Apply M by Algorithm 2.1 with initial vector the matrices Vm+1 and - Hm defined by (2.1) and (2.2), respectively. Compute solution ym 4: r j+m := endwhile;The comments regarding the lines with labels "2:", "3:" and "4:" for Algorithm 3.5 also apply to Algorithm 3.6. 4. Numerical experiments. All the numerical experiments presented in this section were carried out on an HP 9000/735 computer using MATLAB. In all examples we chose the initial approximate solution x b. The vector b had randomly generated uniformly distributed entries in the open interval (0; 1). The purpose of the experiments was to compare Algorithms 3.5 and 3.6 to a restarted where the parameter m 0 is chosen so that the latter algorithm is allowed at least as much computer storage as the former two algorithms. We also compare Algorithms 3.5 and 3.6 to the GMRES algorithm without restarts, and refer to the latter scheme as "Full GMRES". We terminated the iterations with these iterative methods as soon as a residual vector r j was determined, such that with ffl solution . For Algorithms 3.5 and 3.6, we chose the input parameter values ffl subspace 20. The storage requirement for both Algorithms 3.5 and 3.6 with this choice of parameters is at most 54 n-vectors. We compare these schemes with the restarted GMRES(60) algorithm, which requires the storage of 62 n-vectors for V 61 and xm ; see Algorithm 3.1. This storage count assumes that the residual vector r m in Algorithm 3.1 up to a scaling factor is stored in the first column of the matrix V 61 . Example 4.1. Let the matrix A 2 R 200\Theta200 be partitioned according to A T 1;2 A 2;2 where A 1;1 2 R 30\Theta30 is a circulant matrix with first row [\Gamma3=2; 2]. The entries of the diagonal matrix A 2;2 2 R 170\Theta170 are uniformly distributed random numbers in the interval (1; 10). The matrix A 1;2 is a zero matrix of appropriate order. Thus, the J. Baglama et al. matrix A has 30 eigenvalues on a circle with center \Gamma3=2 and radius 2. The remaining eigenvalues are uniformly distributed in the open interval (1; 10). Figure 4.1 shows denotes the last preconditioner of the computed by Algorithm 3.5 with shifts (2.10). The eigenvalues are shown for the unscaled matrix A, and the eigenvalues for M \Gamma1 A are also for the unscaled matrix A and the associated preconditioner. The unscaled preconditioner maps the eigenvalues of A of smallest magnitude to approximately sign(Re(- n ))j- n j. This is illustrated by Figure 4.1. Figure 4.2 shows that the iterates converge rapidly when the preconditioner has removed many of the eigenvalues on the circle fz 2g. We remark that the plot of -(M determined by Algorithm 3.6 looks roughly the same as the plot of the eigenvalues of the preconditioner shown in Figure 4.1. The graph for Algorithm 3.5 in Figure 4.2 (continuous curve) was generated by evaluating kr j k for every value of j for which the residual vector r j is defined, i.e., after every step of Richardson iteration in, and after every minimization of the residual error by the GMRES algorithm. The graph for Algorithm 3.6 in Figure 4.2 (dashed curve) was generated by evaluating kr j k after every minimization of the residual error by the GMRES algorithm. The number of matrix-vector products with the matrix A reported in Table 4.1, however, is only the number actually required by Algorithms 3.5 and 3.6. The piecewise linear graph for GMRES(60) in Figure 4.2 is obtained by linear interpolation between the nodes The nodes are marked with circles. The column "size of Krylov subspace" in Table 4.1 displays the parameter m used for Algorithms 3.1, 3.5 and 3.6. The column "# preconditioners" shows the number of preconditioners M \Gamma1 used before a sufficiently accurate solution was found. This number is bounded by ff 0 . The column "# vectors in each preconditioner" is the parameter k in Algorithms 3.5 and 3.6. The column labeled "total # vectors used" counts the number of n-vectors in storage. The graph in Figure 4.2 (dash-dotted curve) for "Full GMRES" is obtained by applying GMRES(m) to the solution of (1.1) for increasing values of m in order to improve the initial approximate solution x 0 until an approximate solution xm with a sufficiently small residual error kr m k has been determined. Figure 4.2 shows the 10-logarithm of the relative residual error kr k k=kr 0 k for all Example 4.2. Consider the 200 \Theta 200 block bidiagonal matrix \Gammay \Gammay \Gammay Its eigenvalues are given by - 2j \Gamma1. Figures 4.3 and 4.4 are analogous to Figures 4.1 and 4.2, respectively, and Table 4.2 is analogous to Table 4.1. The distribution of eigenvalues of M \Gamma1 A in Figure 4.3 indicates that the tolerance ffl subspace used in the computations is too large to determine an accurate approximate invariant subspace of A. Nevertheless, Adaptive preconditioners 17 the eigenvalues of A closest to the origin were removed, and Algorithms 3.5 and 3.6 yield faster convergence than the restarted GMRES(60) algorithm; see Figure 4.4. 2 Example 4.3. Let is the Pores3 matrix of the Harwell-Boeing matrix collection. The matrix A 0 is nonsymmetric, of order 3474 non-zero entries. The purpose of the shift was to obtain a matrix with some positive eigenvalues. Figures 4.5 and 4.6 are analogous to Figures 4.1 and 4.2, respectively, and Table 4.3 is analogous to Table 4.1. We can see that some eigenvalues of the matrix A are very close to the origin and others are of large magnitude. Figure 4.5 illustrates how the the preconditioner moves eigenvalues of A away from the origin to approximately sign(Re(- n ))j- n j, which is negative. Figure 4.6 shows the rate of convergence. 2 Example 4.4. Let A be a diagonal matrix of order 200 with diagonal entries a Figures 4.7 and 4.9 are analogous to Figures 4.1 and 4.2, respectively, and Table 4.4 is analogous to Table 4.1. Figure 4.8 illustrates that the preconditioner moved all the smallest eigenvalues of A, except for one, away from the origin. Figure 4.9 shows the rate of convergence. 2 Example 4.5. In all examples above, we chose the shifts according to (2.10), i.e., we determined approximations of subspaces associated with a few eigenvalues of smallest magnitude. The present example illustrates that the Algorithms 3.5 and 3.6 easily can be modified to determine approximations of other invariant subspaces. Specifically, we used Algorithm 3.6 to solve the same linear system of equations as in Example 4.1, and chose as shifts the eigenvalues with largest real part of the matrices Hm generated during the iterations. Thus, we sought to determine invariant subspaces associated with a few of the eigenvalues with smallest real part. Figure 4.10 is analogous to Figure 4.1 and shows -(A) (dots) and -(M \Gamma1 eigenvalues of A on the circle were removed, and the number of matrix-vector products required before the stopping criterion was satisfied was 311, which is less than the numbers of matrix-vector products reported in Table 4.1. 2 5. Conclusion. This paper describes new preconditioning methods that are well suited for use with the restarted GMRES(m) algorithm. Numerous computed examples indicate that iterates generated by our methods can converge significantly faster than iterates determined by a restarted GMRES algorithm that requires more computer storage. Algorithms 3.5 and 3.6 describe versions of our preconditioning method in which the eigenvalues - j of smallest magnitude of the matrix A are mapped to approximately that it is easy to modify our preconditioners so that other eigenvalues are mapped. Acknowledgements . Work on this paper was carried out while the last three authors visited the Computer Science Department and IPS at the ETH. They would like to thank Walter Gander and Martin Gutknecht for making these visits possible. We would like to thank Marcus Grote for discussions and code for extracting matrices from the Harwell-Boeing matrix collection, and Richard Lehoucq for providing us with reference [16]. J. Baglama et al. --R The principle of minimized iterations in the solution of the matrix eigenvalue problem Cambridge University Press Iterative methods for computing a few eigenvalues of a large symmetric matrix A Newton basis GMRES implementation A parallel implementation of the GMRES al- gorithm An implicitly restarted Lanczos method for large symmetric eigenvalue problems Deflated and augmented Krylov subspace techniques A parallel implementation of the restarted GMRES iterative algorithm for nonsymmetric systems of linear equations Numerical stability of GMRES A parallel GMRES version for general sparse matrices Restarted GMRES preconditioned by deflation Iterative solution of linear systems Matrix Computations GMRES/CR and Arnoldi/Lanczos as matrix approximation problems Parallel preconditioning with sparse approximate inverses Eigenvalue translation based preconditioners for the GMRES(k) method Analysis and implementation of an implicitly restarted Arnoldi iteration A restarted GMRES method augmented with eigenvectors A hybrid GMRES algorithm for nonsymmetric linear systems Krylov subspace methods for solving large unsymmetric systems of linear equations Preconditioned Krylov subspace methods for CFD applications GMRES: a generalized minimum residual algorithm for solving non-symmetric linear systems Implicit application of polynomial filters in a k-step Arnoldi method Introduction to Numerical Analysis The superlinear convergence behaviour of GMRES --TR --CTR D. Loghin , D. Ruiz , A. Touhami, Adaptive preconditioners for nonlinear systems of equations, Journal of Computational and Applied Mathematics, v.189 n.1, p.362-374, 1 May 2006 Ronald B. Morgan, Restarted block-GMRES with deflation of eigenvalues, Applied Numerical Mathematics, v.54 n.2, p.222-236, July 2005 Paul J. Harris , Ke Chen, On efficient preconditioners for iterative solution of a Galerkin boundary element equation for the three-dimensional exterior Helmholtz problem, Journal of Computational and Applied Mathematics, v.156 n.2, p.303-318, 15 July
arnoldi process;iterative method;preconditioner;nonsymmetric linear system
305240
Algorithms for Model-Based Gaussian Hierarchical Clustering.
Agglomerative hierarchical clustering methods based on Gaussian probability models have recently shown promise in a variety of applications. In this approach, a maximum-likelihood pair of clusters is chosen for merging at each stage. Unlike classical methods, model-based methods reduce to a recurrence relation only in the simplest case, which corresponds to the classical sum of squares method. We show how the structure of the Gaussian model can be exploited to yield efficient algorithms for agglomerative hierarchical clustering.
Introduction Multivariate Gaussian models have been proposed for quite some time as a basis for clustering algorithms. Recently, methods of this type have shown promise in a number of practical applications [9]. Examples in the geophysical sciences include seismic data processing, in the biological sciences classification of cell types based on chemical responses, and in the social sciences classification based on attachment theory in psychology. They have also been used for clustering various types of industrial and financial data. Image-processing applications include unsupervised texture image segmentation, tissue classification in biomedical images, identification of objects in astronomy, analysis of images from molecular spectroscopy, and recognition and classification of surface defects in manufactured products. Agglomerative hierarchical clustering (Murtagh and Raftery [8], Banfield and Raftery [1]), the EM algorithm and related iterative techniques (Celeux and Govaert [3]) or some combination of these (Dasgupta and Raftery [4]) are effective computational techniques for obtaining partitions from these models. The subject of efficient computation in this context has however received little attention. We aim to fill this gap in the case of agglomerative hierarchical clustering. Although no iterative computation is involved, the issue of efficiency is nevertheless important since the practical value of these methods is limited by a growth in time complexity which is at least quadratic in the number of observations. This paper is organized as follows: The remainder of this section gives the necessary background in model-based clustering and hierarchical agglomeration. In Section 2, we propose computational techniques for each of the four simplest and most common Gaussian models, and compare the performance of each method to an appropriate benchmark. Finally, extension to more complex Gaussian models is discussed in Section 3. 1.1 Model-Based Cluster Analysis The relevant probability model is as follows: the population of interest consists of G different subpopulations; the density of a p-dimensional observation x from the kth subpopulation is f k (x; ') for some unknown vector of parameters '. Given observations denote the identifying labels for the classification, where comes from the kth subpopulation. In the classification likelihood approach to clustering, parameters ' and labels fl are chosen so as to maximize the likelihood G Y Our focus is on the case where f k (x; ') is multivariate normal (Gaussian) with mean vector - k and variance matrix \Sigma k . The overall approach is much more general and is not restricted to multivariate normal distributions [1]. However, experience to date suggests that clustering based on the multivariate normal distribution is useful in a great many situations of interest ([8], [1], [9], [3], When f k (x; ') is multivariate normal, the likelihood (1) has the form G Y Y (2) where I is the set of indices corresponding to observations belonging to the k-th group. Replacing - k in (2) with its maximum likelihood estimator - is the number of elements in I k , yields the concentrated log-likelihood in which W is the sample cross-product matrix for the kth group. If then the log-likelihood (3) is maximized by classifications fl that minimize tr . This is the well-known sum of squares criterion which, for example, was suggested by Ward [11] as a possible metric when he proposed the agglomerative hierarchical method for clustering. An alternative that allows a different variance for each group is k I; fl is chosen so as to minimize [1]. If \Sigma k is the same for all groups but otherwise has no structural constraints, then values of fl that minimize maximize the log-likelihood [5]. When \Sigma k is allowed to vary completely between groups, the log-likelihood is maximized whenever fl minimizes the equivalent criteria to be minimized corresponding to these four parameterizations of \Sigma k . criterion I G tr '- criterion G G Table 1: Four parameterizations of the covariance matrix \Sigma k in the Gaussian model with the corresponding criteria to be minimized. 1.2 Hierarchical Agglomeration Agglomerative hierarchical clustering (Ward [11]) is a stagewise procedure in which 'opti- mal' pairs of clusters are successively merged. Each stage of merging corresponds to a unique number of clusters, and a unique partition of the data. Classifications differ according to the criterion for optimality, and the strategy for choosing a single pair when more than one is optimal. In model-based hierarchical clustering, a maximum-likelihood pair is merged at each stage. Although the resulting partitions are suboptimal, agglomerative hierarchical clustering methods are in common use because they often yield reasonable results and are relatively easy to compute. For model-based clustering, another advantage of hierarchical agglomeration is that there is an associated Bayesian criterion for choosing the best partition (hence the optimal number of clusters) from among those defined by the hierarchy [1]. Hierarchical clustering can be accomplished by splitting rather than agglomeration, but the complexity of such algorithms is combinatorial unless severe restrictions on the allowed subdivisions are applicable. The process of hierarchical agglomeration is usually assumed to start with each observation in a cluster by itself, and proceed until all observations are in a single cluster. However it could just as well be started from a given partition and proceed from there to form larger clusters. The value returned consists of a 'classification tree' (a list of pairs of clusters merged), and possibly the optimal value of the change in criterion at each stage. In classical agglomerative methods (e. g. sum of squares, nearest and farthest neighbor (single and complete link) [7]), there is a metric or 'cost' based on geometric considerations associated with merging a pair of clusters. For a particular pair this cost remains fixed as long as neither of the clusters in that pair is involved in a merge, so that the time complexity of hierarchical agglomeration can be significantly reduced if the cost of merging pairs is retained and updated during the course of the algorithm. The overall memory usage is then proportional to the square of the initial number of clusters (usually just the initial number of observations), which could be a severe limitation. For large data sets, one possible strategy is to apply hierarchical agglomeration to a subset of the data and partition the remaining observations via supervised classification or discriminant analysis. Banfield and Raftery [1] used only 522 out of 26,000 pixels in an initial hierarchical phase to successfully classify tissue from an MRI brain-scan image via Gaussian model-based techniques. For each classical method, there is a simple recurrence relation for updating the cost of merging pairs. In the sum-of-squares method, this recurrence is where \Delta(i; j) is the cost of merging groups i and j, and hi; ji represents the group formed by merging groups i and j. Once the initial cost of merging each pair is obtained, computation can proceed without further reference to the data; the size of each group must be retained and updated. The amount of space needed for \Delta(i; decreases as the number of groups increases. A memory-efficient scheme for maintaining \Delta(i; j) is as follows. Assume (without loss of generality) that observation number k is the observation of smallest index in group k in the initial classification. If for each group j ? 1 values of \Delta(j; i) are stored for all i ! j, then it is easy to recover space during the course of the computation. Assuming that j is the highest index in a particular merge, and l is the largest current index, the space associated with group j can be used for group l, thereby freeing the (larger) space associated with group l. The original indexes for the groups can easily be recovered at the end. In programming languages such as Fortran 77 in which memory allocation is static, values of \Delta(j; i) can be stored sequentially in the order \Delta(2; 1); \Delta(3; 1); \Delta(3; 2); \Delta(4; 1); \Delta(4; 2); \Delta(4; so that the scheme described above leaves contiguous free space that can be used for the classification tree and other return values. In languages such as C that allow dynamic memory allocation, a separate list of values \Delta(j; i) for all can be maintained for each j; the space associated with the list for the largest value of j can be freed at each stage under this scheme. Model-based methods generally require more computational resources than classical meth- ods. In some there is no advantage in storing the cost of merging pairs, and some require relatively expensive computations such as determinants of the cross-product matrices. The object of this paper is to show that there are relatively efficient methods for agglomerative hierachical clustering based on Gaussian models. Efficient Algorithms for the Four Basic Models There is clearly structure to be exploited in the various criteria, in which W k is a symmetric, positive semidefinite matrix (see Table 1 in Section 1.1). Moreover, since only two groups are merged at each stage of hierarchical agglomeration, there should be a close relationship between criteria at successive stages. In fact, the sample cross-product matrix for the merged group can be obtained from the sum of the sample cross-product matrices of its two component groups by means of a symmetric rank-1 update : where where s k denotes the sum of the observations for group k. A derivation is given in the Appendix . In the remainder of this section we show that this relation leads to efficient algorithms for all of the methods of Table 1. We assume that the input consists of an n \Theta p matrix whose rows correspond to individual observations and a vector of length n indicating the initial classification of each observation. 2.1 \Sigma k When the covariance matrix is constrained to be diagonal and uniform across all groups, the criterion to be minimized at each stage is tr G tr This is the sum-of-squares criterion, long known as a heuristic before any relationship to the Gaussian model was recognized: tr (W k ) is the sum of squares of observations in group k with the group mean subtracted out. Of the classical methods, it is the only one known to have an underlying statistical model. In view of the recurrence relation (4), all that is required to start the hierarchical clustering procedure is a set of values \Delta(i; j) and the number of observations in each group. First, the value of \Delta(i; for each pair of observations can be computed; in the absence of other information, the individual observations usually constitute the initial partition of the data, and nothing further need be done. For coarser initial partitions, the recurrence relation could be used to obtain the initial values for hierarchical clustering given \Delta(i; for each pair of observations. Merges for initialization are determined by the given partition rather than by the minimum value of \Delta(i; j) at any stage. The process just described, however, requires storage proportional to the square of the number observations n, which is undesirable if there are m ! n groups to begin with. The update formula (5), leads to a better initialization procedure for \Delta(i; j), since tr Because we are assuming that k is smallest index associated with observations in group k, we can overwrite the kth observation by the sum s k of observations in that group and the kth element of the classification vector with n k . This can be accomplished in O(np) time, and requires no additional storage since the input is overwritten. Then (8) and (6) can be used to initialize \Delta(i; j). The total storage required would then be O(np +m the input, and O(m 2 ) for \Delta(i; j). 2.2 \Sigma k I When the convariance of each group is constrained to be diagonal, but otherwise allowed to vary between groups, the criterion to be minimized at each stage is G G tr As for the sum-of-squares and the other classical methods, \Delta(i; remains unchanged from stage to stage unless either group i or group j is involved in a merge, so that storing \Delta(i; results in a gain in time efficiency for hierarchical clustering. From the update formula (5), we have tr tr #) Unlike the classical methods, there is no simple recurrence relation for \Delta(hi; ji; \Delta(i; j), \Delta(i; k), and \Delta(j; k). However, there is a reasonably efficient update; all that is required is to maintain values of n k , tr in addition to s k . The vector s k can overwrite the kth observation, as was done for the sum of squares. But this time for each group k that has more than one element, the index k 0 of the next observation in that group is stored in the kth element of the classification vector. The number of elements in the group is stored in the k 0 th entry of the classication vector, while the trace of the sample cross product matrix and the corresponding term of the criterion overwrite the first two elements of the k 0 th observation. With this scheme no additional storage is necessary (p - 2) beyond that required for \Delta(i; j) and the input. The issue of terms in which tr (W k remains to be resolved; this includes those terms corresponding to groups consisting of a single observation, as well as those groups in which all observations coincide. Hence the first stages of hierachical clustering will be arbitrary without some sort of initialization procedure. We replace (9) with a modified criterion in order to handle these cases transparently : G tr tr (W) where W is the sample cross product matrix for the group consisting of all observations, and - has the default value of 1. The factor tr (W) =np is an attempt to take into account scaling in the data, since the resulting criterion is scale dependent. 2.3 Constant \Sigma k When the covariance matrix is uniform across all groups but otherwise has no structural constraints, the criterion to be minimized at each stage is G In contrast to the methods discussed up to this point, the change in criterion caused by merging two groups is affected by merges among other groups in the current classification. Hence it is of no advantage here to store \Delta(i; j) for the duration of the computation. Nev- ertheless, (5) leads to an efficient update, because the change in are merged can be represented as Instead of W itself, we maintain a lower triangular Cholesky factor L for W (see e. g. [6]), since then the determinant can be easily computed as the square of the product of the diagonals of L : diag(L) Noting that since when each observation is in a group by itself, we can then either build the Cholesky factor for a coarser initial partition, or else merge optimal groups in hierarchical agglomeration as follows: \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \ThetaC C C C C A Givens ~ \Theta ~ \Theta ~ \Theta ~ \Theta \Theta \Theta \Theta \Theta ~ \Theta ~ Givens \Theta \Theta \Theta \Theta \Theta ~ \Theta ~ \Theta \Theta ~ Givens \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta ~ \Theta Givens \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta The symbol Givens \Gamma! stands for application of a Givens rotation, an elementary orthogonal transformation that allows selective and numerically stable introduction of zero elements in a matrix. The marked entries are values changed in the last transformation. The time efficiency for the Cholesky update is O(p 2 ), in contrast to O(p 3 ) for forming a new Cholesky factor from the updated p \Theta p matrix W . For details of the Cholesky update via Givens rotations, see e. g. [6]. Although the criterion is defined for all possible partitions, there remains a problem with initialization: has rank less than p. In particular, the first stages of hierachical clustering using this criterion will be arbitrary if initially each observation is in a cluster by itself, since merging any pair of observations i and j will result in and are singletons (p - 2). To circumvent this, we use the sum-of-squares criterion tr (W ) to determine merges until the value of jW j is positive, while maintaining the Cholesky factor of W . As the computation proceeds, s k overwrites the data and n k overwrites the classification vector; most of the information needed to recover the classification tree and optimal values of the criterion can be stored in the portions of these structures that are no longer needed in the algorithm. Other than the necessary O(p 2 ) storage for maintaining L T , additional storage of size O(M ), where M is the number of stages, is needed when p ! 4 to store the merge indexes in order to completely reconstruct the classification tree. 2.4 Unconstrained \Sigma k When the covariance matrix is allowed to vary completely between groups, the criterion to be minimized at each stage is G Like the criteria discussed in sections 2.1 and 2.2, each group contributes a separate additive term to (13), so that it is time efficient to save values of \Delta(i; j). If L k denotes the Cholesky factor of W k , then, in view of (5), L hi;ji can be computed efficiently from L i , L j and w ij by applying Givens rotations (see Section 2.3) to the composite matrix The composite matrix is never explicitly formed; instead, w ij and each row of L T are treated as separate updates to L T . Although the time efficiency to form the updated Cholesky factor is of the same order of magnitude as that for forming a new Cholesky factor from the updated W hi;ji , the use of (14) has an advantage in storage efficiency. Maintaining the upper triangle of each W k and updating directly via (5) would require more storage since W k has p rows regardless of n k , whereas L k has at most min(n can overwrite the data and the entries corresponding to the lower triangle of L T k can be used for the necessary pointers and values to be updated (the kth term in (13)). Besides what is required for the data and for \Delta(i; j), additional O(p 2 ) storage is needed for the Cholesky factors when updating \Delta(i; j). Finally, because jW k there is even greater ambiguity with criterion than with either (11) or (9). For this reason, we use G tr (W) in place of (13), which gives a hybrid between the modified criterion for \Sigma I (10) and (13). The default value for both - 1 and - 2 is 1. 2.5 Benchmark Comparisons In this section we compare the algorithms developed in Sections 2.1-2.4 with approaches that do not use the update formula (5) but are otherwise efficient. The 'benchmark' algorithms leave the data intact, and keep track of the composition of all groups in the classification vector used to transmit the initial partition. For \Sigma I and \Sigma updated after a merge by first forming the column means for the combined group, then forming the sum of squares for all of observations in both groups with the column mean subtracted out. For constant \Sigma k , the upper triangle of after a merge is updated using the first part of (12) . Column sums for W i and W j are computed from the list of observations in each group, and these are added to form the column sum for W hi;ji . Then the upper triangle of W is formed using symmetric rank one operations. The quantity jW j for the merge is then computed from its Cholesky decomposition as described in Section (2.3). For unconstrained \Sigma k , the upper triangle of W hi;ji is formed from scratch after a merge involving i or j, and the Cholesky decomposition is used to obtain its determinant. In addition to the O(p 2 ) storage used for the sample cross-product matrices, O(n) storage is allocated in the benchmarks for the return values, for the number of groups in each cluster, and, to facilitate updating \Delta(i; j), for the term contributed by each cluster to the criterion. The methods of Section 3 use considerably less storage: constant variance requires O(n) additional storage to recover results, and constant and unconstrained variance require O(p 2 ) additional storage for maintaining Cholesky factors. Figure shows marked gains in time efficiency for the methods of Section 2 over the benchmarks. Randomly generated observations of dimension used, with the default initial partition in which each singleton observation constitutes a cluster. The basic methods were written in Fortran with an S-Plus interface, and the time shown is the average over nine different data sets using S-Plus version 3.3 1 on a Silicon Graphics Iris workstation under the IRIX 5.2 operating system. The solid line represents the performance of algorithms based on the update formula (5), while the dashed line represents performance of algorithms in which the necessary quantities are obtained without updating. The effect is most dramatic in the unconstrained case, where extrapolated results (ignoring effects of increased memory usage) show an improvement by a factor of around 15 for as compared to a factor of around 4 for 500. The results for \Sigma are also a point of comparison, since in that case the solid line represents that classical sum of squares approach via the well-known recurrence relation (4). Note that the time scale for the constant-variance method differs from that of the other methods, which use more memory in exchange for improved time efficiency. 3 Extension to more Complex Gaussian Models Banfield and Raftery [1] developed a model-based framework that subsumes all of the parameterizations in Table 1. The resulting clustering methods include some criteria that are more general than \Sigma I or constant \Sigma k , while still constraining the structure of \Sigma k . This is accomplished by means of a reparameterization of the covariance matrix \Sigma in terms of its eigenvalue decomposition where D k is the orthogonal matrix of eigenvectors and A k is a diagonal matrix whose elements are proportional to eigenvalues of \Sigma k , and - k is a scalar proportional to the volume of the ellipsoid. The orientation of the principal components of \Sigma k is determined by D k , while A k determines the shape of the density contours. This paradigm is particularly useful for two and three-dimensional data, where geometric features can often be identified visually. It may also be applicable for higher-dimensional data when multivariate visualization analysis some structure. For example, Banfield and Raftery [1] were able to closely match the clinical classification of a biomedical data set using Gaussian hierarchical clustering after analyzing its geometric features. The parameterization can be selected so as to allow some but not all of the characteristics (orientation, volume and shape) of distributions to vary between groups, while constraining others to be the same. Analysis of the model that leads to the sum of squares criterion (\Sigma of (16) suggests that it is likely to be most appropriate when groups are spherical and of approximately the same size. The constant-variance assumption in which D k , - k and A k are the same for all groups but otherwise unconstrained favors clusters that are ellipsoidal with 1 S-Plus 3.3 Version 3.3 for Unix, MathSoft, Inc., Seattle, WA (1995). number of observations time 100 200 300 400 500103050Diagonal (Uniform) number of observations time 100 200 300 400 500103050Diagonal (Varying) number of observations time 100 200 300 400 500103050Unconstrained number of observations time 100 200 300 400 50050015002500Constant Variance Figure 1: CPU time vs number of observations for the four basic models. The solid line represents the methods proposed in this paper. the same orientation, shape, and volume. If all elements of \Sigma k are allowed to vary between groups, the resulting classification is likely to contain elliptical groups with differing geometric features. Metrics appropriate for various intermediate situations can also be formulated. For example, assuming that \Sigma I or oe 2 I implies that the underlying densities are spherical, while variation in - k between groups allows their volumes to differ. Celeux and Govaert [2] analyzed this criterion and showed that it can give classification performance that is much better than traditional methods. In one example, they successfully apply the method to an astronomical image in which one tightly clustered galaxy is contained within another more dispersed one. Table shows relationships between orientation, volume and shape discussed in [1]. Criteria based on other combinations of these factors are also possible [3]. Software for hierarchical clustering based on these models is available in the public domain (see [1]); it has been used in a variety of applications with some success [9]. A revision based on the techniques described in this paper is currently in progress. Efficient computational methods for the first four models in Table 2 were given in Section Distribution Volume Shape Orientation Reference -I Spherical fixed fixed NA [11],[5], [10], [8], [1], [3] I Spherical variable fixed NA [1], [3] -DAD Elliptical fixed fixed fixed [5], [10], [1], [3] Elliptical variable variable variable [10], [1], [3] fixed fixed variable [8], [1], [3] Elliptical variable fixed variable [1], [3] Table 2: Parameterizations of the covariance matrix \Sigma k in the Gaussian model and their geometric interpretation. The models shown here are those discussed in Banfield and Raftery [1]. 2. We conclude this section by showing how those techniques can be applied to the remaining . The relevant criteria are \Gamma1\Omega respectively, k is the diagonal matrix of eigenvalues of W k . In both cases, efficient algorithms are possible if s k and L T are maintained and updated in the storage provided for the original data, as described in Section 2.4. Instead of information pertaining to the terms of (15), the kth term of the sum in the appropriate criterion is stored in the space corresponding to the lower triangle of L T k . As in all of the methods in Section 3, the matrix W hi;ji is never explicitly formed. Instead, its nonzero eigenvalues are obtained as the squares of the singular values of L T , which has min(n rows and p columns. For \Sigma we include the additive term inside the logarithm that appears in (10) for \Sigma I or oe 2 k I in order to accommodate those cases in which W k (and vanishes. Concluding Remarks This paper has made several contributions toward computational efficiency in agglomerative hierarchical clustering. First, we gave a memory-efficient scheme suitable for any method that stores the change in criterion for each merged pair. Second, we showed that the sample- cross product matrix for the union of two Gaussian clusters can be formed by a rank-one update of the sum of sample-cross matrices of its constituent clusters, and described how this can be used to obtain efficient algorithms for model-based clustering. This included a memory-efficient initialization strategy for the sum of squares method, which corresponds to the simplest Gaussian model, as well as time and memory efficient algorithms for three other Gaussian models that have no counterpart in classical hierarchical agglomeration. At the same time, we gave strategies to resolve the inherent ambiguities in some of the models. Finally, we showed how these techniques can be easily extended to two additional Gaussian models based on a more sophisticated parameterization of the covariance matrix that has recently shown promise in practical applications. A Derivation of the Update Formula The following holds for the group hi; ji formed by merging groups i and denotes the sample cross-product matrix for group k, and where s k is the sum of the observations and n k the cardinality of group k. Proof. Let X k be the matrix of observations corresponding to group k. If denotes the vector of length n k in which every element is equal to 1 ( g X k is X k with the mean subtracted out of each column), then W Hence since s . It follows that f s hi;ji Since X hi;ji is the matrix consisting of observations in groups i and j, Hence \Gamman \Gamman If then so that --R Comparison of the mixture and the classification maximum likelihood in cluster analysis. Gaussian parsimonius clustering models. Detecting features in spatial point processes with clutter via model-based clustering On some invariant criteria for grouping data. Matrix Computations. Finding Groups in Data. Fitting straight lines to point patterns. Transitions from ONR Contract N00014-91-J-1074 'Time Series and Image Analysis' Clustering methods based on likelihood ratio criteria. Hierarchical groupings to optimize an objective function. --TR --CTR A. Pigeau , M. Gelgon, Building and tracking hierarchical geographical & temporal partitions for image collection management on mobile devices, Proceedings of the 13th annual ACM international conference on Multimedia, November 06-11, 2005, Hilton, Singapore Jun Liu , Jim P. Y. Lee , Lingjie Li , Zhi-Quan Luo , K. Max Wong, Online Clustering Algorithms for Radar Emitter Classification, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.27 n.8, p.1185-1196, August 2005 Bin He , Tao Tao , Kevin Chen-Chuan Chang, Organizing structured web sources by query schemas: a clustering approach, Proceedings of the thirteenth ACM international conference on Information and knowledge management, November 08-13, 2004, Washington, D.C., USA Peter Meinecke , Helge Ritter, Resolution-Based Complexity Control for Gaussian Mixture Models, Neural Computation, v.13 n.2, p.453-475, February 2001 Marina Meil , David Heckerman, An Experimental Comparison of Model-Based Clustering Methods, Machine Learning, v.42 n.1-2, p.9-29, January-February 2001 D. J. Robinson , F. Murtagh , P. A. M. Basheer, Gaussian segmentation of BSE images to assess the porosity of concrete, Proceedings of the sixth conference on Computational structures technology, p.253-254, September 04-06, 2002 Diansheng Guo , Donna J. Peuquet , Mark Gahegan, ICEAGE: Interactive Clustering and Exploration of Large and High-Dimensional Geodata, Geoinformatica, v.7 n.3, p.229-253, September Nevin L. Zhang, Hierarchical latent class models for cluster analysis, Eighteenth national conference on Artificial intelligence, p.230-237, July 28-August 01, 2002, Edmonton, Alberta, Canada Nevin L. Zhang, Hierarchical Latent Class Models for Cluster Analysis, The Journal of Machine Learning Research, 5, p.697-723, 12/1/2004 Huidong Jin , Man-Leung Wong , K. -S. Leung, Scalable Model-Based Clustering for Large Databases Based on Data Summarization, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.27 n.11, p.1710-1719, November 2005 Shi Zhong , Joydeep Ghosh, A unified framework for model-based clustering, The Journal of Machine Learning Research, 4, p.1001-1037, 12/1/2003 Fionn Murtagh, Clustering in massive data sets, Handbook of massive data sets, Kluwer Academic Publishers, Norwell, MA, 2002
hierarchical agglomeration;mixture models;model-based cluster analysis
305246
Parallel Hierarchical Solvers and Preconditioners for Boundary Element Methods.
The method of moments is an important tool for solving boundary integral equations arising in a variety of applications. It transforms the physical problem into a dense linear system. Due to the large number of variables and the associated computational requirements, these systems are solved iteratively using methods such as GMRES and CG and its variants. The core operation of these iterative solvers is the application of the system matrix to a vector. This requires $\theta(n^2)$ operations and memory using accurate dense methods. The computational complexity can be reduced to $O(n \log n)$ and the memory requirement to $\Theta(n)$ using hierarchical approximation techniques. The algorithmic speedup from approximation can be combined with parallelism to yield very fast dense solvers. In this paper, we present efficient parallel formulations of dense iterative solvers based on hierarchical approximations for solving potential integral equations of the first kind. We study the impact of various parameters on the accuracy and performance of the parallel solver. We demonstrate that our parallel formulation incurs minimal parallel processing overhead and scales up to a large number of processors. We present two preconditioning techniques for accelerating the convergence of the iterative solver. These techniques are based on an inner-outer scheme and a block-diagonal scheme based on a truncated Green's function. We present detailed experimental results on up to 256 processors of a Cray T3D. Our code achieves raw computational speeds of over 5 GFLOPS. When compared to the accurate solver, this corresponds to a speed of approximately 776 GFLOPS.
Introduction The method of moments [12] is a popular method for solving integral equations. It has extensive applications in computational electromagnetics, wave propagation, and heat transfer [22, 21, 3, 11]. It transforms a physical problem defined as an integral equation into a dense linear system. The integral equation is termed a volume or a boundary integral equation depending on whether the variables are defined on the volume or the surface of the modeled object. In this paper, we address the solution of boundary integral equations over complex 3-D objects. Modeling arbitrarily complex 3-D objects may require a large number of boundary el- ements. For such objects, the boundary element method results in dense linear systems with hundreds of thousands of unknowns. The memory and computational requirements of solving these systems are formidable. Iterative solution techniques such as Generalized Minimal Residual (GMRES) [18] are the method of choice. The memory and computational requirements of these solvers grow as \Theta(n 2 ) per iteration. Solving systems with 10K variables in this manner can challenge most current supercomputers. The memory requirements of these methods can be reduced by not forming the coefficient matrix ex- plicitly. In addition, hierarchical algorithms such as the Fast Multipole Method (FMM) and related particle dynamics methods allow us to reduce the computational complexity of each iteration. Approximate hierarchical techniques have received a lot of attention in the context of particle simulations. Given a system with n particles, if each particle influences every other particle in the system, a total of n 2 interactions must be computed. However, in most physical systems, the influence of a particle on another diminishes with the distance. In such systems, it is possible to aggregate into a single expression, the impact of several particles on another distant particle. Using this approach, the total number of interactions in the system can be reduced significantly. This forms the basis of hierarchical methods. These methods provide systematic ways of aggregating entities and computing interactions while controlling the overall error in modeling. Algorithms based on hierarchical techniques include Barnes-Hut [2], Fast Multipole [10], and Appel's [1] algorithms. Approximating long range interactions in this manner reduces the sequential complexity of typical simulations involving n particles from O(n 2 ) to O(n log n) or O(n). Clearly, the reduced computational complexity of hierarchical methods represents a significant reduction in the time for solving the system. However, modeling hundreds of thousands of boundary elements still take an inordinately large amount of time on conventional serial computers. Parallel processing offers a tool for effectively speeding up this computation. It enables us to solve problems with a large number of elements and to increase the accuracy of simulation by incorporating a higher precision into the approximate hierarchical mat-vec. Parallel formulations of hierarchical methods involve partitioning the domain among various processors with the combined objectives of optimizing communication and balancing load. If particle densities are uniform across the domain, these objectives are easily met [4, 25, 13, 19, 9]. For irregular distributions, these objectives are hard to achieve because of the highly unstructured nature of both computation and commu- nication. Singh et al. [20] and Warren and Salmon [24, 23] presented schemes for irregular distributions that try to meet these objectives. In [6, 8, 5] we presented alternate schemes for irregular distributions that improve on the performance of the earlier schemes. In [7, 5], we used parallel hierarchical techniques for computing dense matrix-vector products and studied the impact of various parameters on accuracy and performance. An important aspect of using iterative solvers for solving large systems is the use of effective preconditioning techniques for accelerating the convergence. The use of hierarchical methods for computing matrix-vector products and parallel processing has significant implications on the choice of preconditioners. Since the system matrix is never explicitly constructed, preconditioners must be derived from the hierarchical domain representation. Furthermore, the preconditioning strategies must be highly parallelizable. Since the early work of Rokhlin[16], relatively little work has been done on dense hierarchical solvers even in the serial context [14, 17, 22, 3]. In this paper, we investigate the accuracy and convergence of a GMRES solver built around a parallel hierarchical matrix-vector product. We investigate the impact of various parameters on accuracy and performance. We propose two preconditioning strategies for accelerating the convergence of the solver. These preconditioners are based on an inner-outer scheme and a truncated Green's function. We demonstrate the excellent parallel efficiency and performance of our solver on a 256 processor Cray T3D. The rest of the paper is organized as follows: Section 2 presents a brief overview of hierarchical methods and their use in solving integral equations; Section 3 describes parallel formulations of hierarchical methods; Section 4 describes preconditioning techniques; Section 5 presents experimental results on a Cray T3D; and Section 6 draws conclusions and outlines ongoing research. Hierarchical Methods for Solving Integral Equations Boundary Element Methods (BEM) solve integral equations using potential theory. These methods discretize the boundary of the domain into panels. Using the associated Green's function, the potential at each panel is represented as a sum of contributions of every other panel. Applying the Dirichlet boundary conditions yields a large scale linear system of equations. For an n basis boundary discretization, the n \Theta n linear system arising from this approach is dense. Iterative solution of this system requires the application of the system matrix on a vector in each iteration. This process is facilitated by the fact that the coupling coefficient between any two boundary elements (the Green's function of the integral equation) is a diminishing function of the distance r between the elements. For instance, for the Laplace equation, the Green's function is 1=r in three dimensions and log(r) in two dimensions. Both of these functions are decreasing functions of distance r. This allows us to aggregate the impact of several boundary elements into a single expression and apply them in constant time. This is similar in principle to a single iteration of the n-body algorithm[5]. The integrals over boundary elements are performed using Gaussian quadrature. For nearby elements, a higher number of Gauss points have to be used for desired accuracy. For computing coupling coefficients between distant basis functions, fewer Gauss points may be used. In the simplest scenario, the far field is evaluated using a single Gauss point. Assuming triangular surface elements, this process involves computing the mean of basis functions of the triangle and scaling it with the area of the triangle. Computing a matrix-vector product in this manner involves the following steps: 1. Construct a hierarchical representation of the domain: In the particle simulation method, particles are injected into an empty domain. Every time the number of particles in a subdomain exceeds a preset constant, it is partitioned into eight octs. In this manner an oct tree structure is computed. In the boundary element method, the element centers correspond to particle coordinates. The oct-tree is therefore constructed based on element centers. Each node in the tree stores the extremities along the x, y, and z dimensions of the subdomain corresponding to the node. 2. The number of particles in the tree corresponding to the boundary element method is equal to the product of the number of boundary elements and the number of Gauss points in the far field. In the case of a single Gauss point in the far field, the multipole expansions are computed with the center of the triangle as the particle coordinate and the mean of basis functions scaled by triangle area as the charge. (In addition to a single Gauss point, our code also supports three Gauss points in the far field). 3. For computing the matrix-vector product, we need to compute the potential at each of the n basis functions. This is done using a variant of the Barnes-Hut method. The hierarchical tree is traversed for each of the boundary elements. If a boundary element falls within the near field of the observation element, integration is performed using direct Gaussian quadrature. The code provides support for integrations using 3 to 13 Gauss points for the near field. These can be invoked based on the distance between the source and the observation elements. The contribution to the basis functions of the observation element are accrued. The far-field contributions are computed using the multipole expansions. The ff criterion of the Barnes-Hut method is slightly modified. The size of the subdomain is now defined by the extremities of all boundary elements corresponding to the node in the tree. This is unlike the original Barnes-Hut method which uses the size of the oct for computing the ff criterion. 3 Parallel GMRES Using Hierarchical Matrix-Vector Products We implement a parallel formulation of a restart GMRES [18] algorithm. The critical components of the algorithm are: product of the system matrix A with vector x n , and dot products. All vectors are distributed across the processors with the first n=p elements of each vector going to processor P 0 , the next n=p to processor P 1 and so on. The matrix-vector product is computed using the parallel hierarchical treecode. The parallel treecode comprises of two major steps: tree construction (the hierarchical representation of the domain) and tree traversal. Starting from a distribution of the panels to processors, each processor constructs its local tree. The set of nodes at the highest level in the tree describing exclusive subdomains assigned to processors are referred to as branch nodes. Processors communicate the branch nodes in the tree to form a globally consistent image of the tree. Each processor now proceeds to compute the potential at the panels assigned to it by traversing the tree. On encountering a node that is not locally available, there are two possible scenarios: the panel coordinates can be communicated to the remote processor that evaluates the interaction; or the node can be communicated to the requesting processor. We refer to the former as function shipping and the latter as data shipping. Our parallel formulations are based on the function shipping paradigm. We discuss the advantages of function shipping in [5, 7]. The load-balancing technique is an efficient implementation of the costzones scheme on message-passing computers. Each node in the tree contains a variable that stores the number of boundary elements it interacted with in computing a previous mat-vec. After computing the first mat-vec, this variable is summed up along the tree. The value of load at each node now stores the number of interactions with all nodes rooted at the subtree. The load is balanced by an in-order traversal of the tree, assigning equal load to each processor. Figure 1 illustrates the parallel formulation of the Barnes-Hut method. Since the discretization is assumed to be static, the load needs to be balanced just once. The parallel formulation assigns boundary elements (and the associated basis func- tions) to processors. This has two implications: multiple processors may be contributing to the same element of the matrix-vector product; and, the mapping of basis functions to processors may not match the partitioning assumed for the GMRES algorithm. Both of these problems are solved by hashing the vector elements to the processor designated by the GMRES partitioning. The destination processor has the job of accruing all the vector elements (adding them when necessary). The communication is performed using a single all-to-all personalized communication with variable message sizes[15]. (all-to-all broadcast) Insert branch nodes and recompute top part Traverse local tree and where needed insert into remote processor buffer Send buffer to corresponding Broadcast branch nodes processors when full messages and process them Force computation Tree construction Aggregate loads up local tree periodically check for pending branch nodes Broadcast loads of nodes in local tree Aggregate top-level loads (After this, the root node at each processor has total load W) Within each processor's domain, locate nodes that correspond to load W/p, 2W/p and so on from the left From this, determine destination of each point Communicate points using all-to-all personalized communication Insert loads of branch Assume an initial particle distribution Construct local trees branch nodes Balance load and move particles (b) Balancing load and communicating particles. For each particle (a) schematic of parallel algorithm Figure 1: Schematic of the parallel treecode formulation and load balancing technique. Preconditioning Techniques for Iterative Solver In this section we present preconditioning techniques for the iterative solver. Since the coefficient matrix is never explicitly computed, preconditioners must be constructed from the hierarchical representation of the domain or the limited explicit representation of the coefficient matrix. This forms the basis for the two preconditioners. 4.1 Inner-Outer Schemes The hierarchical representation of the domain provides us with a convenient approximation of the coefficient matrix. Increasing the accuracy of the matrix-vector product increases the number of direct interactions (and thus the runtime). Conversely, reducing the accuracy reduces the runtime. It is therefore possible to visualize a two level scheme in which the outer solve (to desired accuracy) is preconditioned by an inner solve based on a lower resolution matrix-vector product. The accuracy of the inner solve can be controlled by the ff criterion of the matrix-vector product or the multipole degree. Since the top few nodes in the tree are available to all the processors, these matrix-vector products require relatively little communication. The degree of diagonal dominance determines the method for controlling accuracy. When the coefficient matrix is highly diagonally dominant (as is the case with many applications), a high value of ff is desirable. This ensures minimum communication overheads. However, if the matrix is not very diagonally dominant, it is more desirable to use lower values of ff with correspondingly lower values of multipole degrees. It is in fact possible to improve the accuracy of the inner solve by increasing the multipole degree or reducing the value of ff in the inner solve as the solution converges. This can be used with a flexible preconditioning GMRES solver. However, in this paper, we present preconditioning results for a constant resolution inner solve. 4.2 Truncated Green's Function A primary drawback of the two level scheme is that the inner iteration is still poorly condi- tioned. The diagonal dominance of many problems allows us to approximate the system by truncating the Green's function. For each leaf node in the hierarchical tree, the coefficient matrix is explicitly constructed assuming the truncated Green's function. This is done by using a criteria similar to the ff criterion of the Barnes-Hut method as follows: Let constant fi define the truncated spread of the Green's function. For each boundary element, traverse the Barnes-Hut tree applying the multipole acceptance criteria with constant fi to the nodes in the tree. Using this, determine the near field for the boundary element corresponding to the constant fi. Construct the coefficient matrix A 0 corresponding to the near field. The preconditioner is computed by direct inversion of the matrix A 0 . The approximate solve for the basis functions is computed as the dot-product of the specific rows of and the corresponding basis functions of near field elements. The number of elements in the near field is controlled by a preset constant k. The closest k elements in the near field are used for computing the inverse. If the number of elements in the near field is less than k, the corresponding matrix is assumed to be smaller. It is easy to see that this preconditioning strategy is a variant of the block diagonal preconditioner. A simplification of the above scheme can be derived as follows. Assume that each leaf node in the Barnes-Hut tree can hold up to s elements. The coefficient matrix corresponding to the s elements is explicitly computed. The inverse of this matrix can be used to precondition the solve. The performance of this preconditioner is however expected to be worse than the general scheme described above. On the other hand, computing the preconditioner does not require any communication since all data corresponding to a node is locally available. This paper reports on the performance of the general preconditioning technique based on truncated Green's function (and not its simplification). 5 Experimental Results The objectives of this experimental study are as follows: ffl Study the error and parallel performance of iterative solvers based on hierarchical matrix-vector products. ffl Study the impact of the ff criterion and multipole degree on the accuracy and performance of the solver. ffl Study the impact of the number of Gauss points in the far field on the performance. ffl Study the preconditioning effect (iteration count and solution time) of the preconditioners and their impact on parallel performance. In this section, we report on the performance of the GMRES solver and the preconditioning techniques on a Cray T3D with up to 256 processors. A variety of test cases with highly irregular geometries were used to evaluate the performance. The solver and preconditioner were tested on a sphere with 24K unknowns and a bent plate with 105K unknowns. The experimental results are organized into three categories: performance (raw and parallel efficiency) of the solver, accuracy and stability of the solver, and preconditioning techniques. Problem Runtime Eff. MFLOPS Runtime Eff. MFLOPS pscan 3.74 0.93 1352 1.00 0.87 5056 28060 0.53 0.89 1293 0.16 0.75 4357 Table 1: Runtimes (in seconds), efficiency, and computation rates of the T3D for different problems for 5.1 Performance of Matrix-Vector Product The most computation intensive part of the GMRES method is the application of the coefficient matrix on a vector. The remaining dot products and other computations take a negligible amount of time. Therefore, the raw computation speed of a mat-vec is a good approximation of the overall speed of the solver. The two important aspects of performance are the raw computation speed (in terms of FLOP count), and the parallel efficiency. In addition, since hierarchical methods result in significant savings in computation for larger problems, it is useful to determine the computational speed of a dense solver (not using a hierarchical met-vec) required to solve the problem in the same time. We present parallel runtime, raw computation speed, and efficiency of four different problem instances. It is impossible to run these instances on a single processor because of their memory requirements. Therefore, we use the force evaluation rates of the serial and parallel versions to compute the efficiency. To compute the MFLOP ratings of our code, we count the number of floating point operations inside the force computation routine and in applying the MAC to internal nodes. Using this and the number of MACs and force computations, we determine the total number of floating point operations executed by the code. This is divided by the total time to obtain MFLOP rating of the code. Table 1 presents the runtimes, efficiencies, and computation rates for four problems. The value of the ff parameter in each of these cases is 0.7, and the degree of the multipole expansion is 9. The efficiencies were computed by determining the sequential time for each MAC and force computation. The sequential times for the larger problem instances were projected using these values and the efficiencies computed. The code achieves a peak performance of over 5 GFLOPS. Although this may not appear to be very high, it must be noted that the code has very little structure in data access resulting in poor cache performance. Furthermore, divide and square-root instructions take a significantly larger number of processor cycles. On the other hand, the performance achieved by the hierarchical code corresponds to over 770 GFLOPS for the dense matrix-vector product. Clearly, if the loss in accuracy is acceptable for the application, use of hierarchical methods results in over two orders of magnitude improvement in performance. Combined with a speedup of over 200 on 256 processors, our parallel treecode provides a very powerful tool for solving large dense systems. The loss in parallel efficiency results from communication overheads and residual load imbalances. There also exist minor variations in raw computation rates across different problem instances that have identical runtimes. This is because of different percentages of MAC computations, near field interactions, and far-field interactions being computed in these instances. The far-field interactions are computed using particle-series interac- tions. This involves evaluating a complex polynomial of length d 2 for a d degree multipole series. This computation has good locality properties and yields good FLOP counts on conventional RISC processors such as the Alpha. In contrast, near-field interactions and MAC computations do not exhibit good data locality and involve divide and square root instructions. This results in varying raw computation speeds across problem instances. Detailed studies of impact of various parameters on the accuracy of the matrix-vector product are presented by the authors in [5, 7]. 5.2 Parallel Performance of the Unpreconditioned GMRES Solver One of the important metrics for the performance of a code is the time to solution. We now investigate the solution time on different number of processors with different accuracy parameters. The objectives are as follows: to show that the speedup from fast mat-vecs translates to scalable solution times on large number of processors; and to study the impact of the ff criterion and multipole degree on the solution times. In each case, we assume that the desired solution is reached when the residual norm has been reduced by a factor of 10 \Gamma5 . The choice of this reduction in residual norm is because lower accuracy mat-vecs may become unstable beyond this point. In the first set of experiments, we study the impact of the ff criterion on solution time. The degree of multipole expansion is fixed at 7 and the parallel runtimes to reduce the residual norm by a factor of 10 \Gamma5 are noted. These times are presented in Table 2. (The was capped at 3600 seconds and therefore the one missing entry in the table.) A number of useful inferences can be drawn from the table. ffl In each of the cases, the relative speedup between 8 and 64 processors is around 6 or more. This corresponds to a relative efficiency of over 74%. This demonstrates that our parallel solver is highly scalable. ffl For a given number of processors and multipole degree, increasing accuracy of mat-vec by reducing ff results in higher solution times and lower efficiencies. The former is because an increasing number of interactions are now computed as near- field, resulting in higher computational load. The loss in efficiency is because of an processors 8 64 8 64 Table 2: Time to reduce relative residual norm to 10 \Gamma5 . The degree of multipole expansion is fixed at 7. All times are in seconds. processors 8 64 8 64 degree 5 269.2 47.1 2010.3 329.6 6 382.3 65.2 2729.6 441.2 Table 3: Time to reduce relative residual norm to 10 \Gamma5 . The value of ff is fixed at 0.667. All times are in seconds. increase in the communication overhead. An increasing number of interactions need to be performed lower down in the tree. Since these are not locally available, element coordinates need to be communicated to processors farther away. This is consistent with our observations while computing the mat-vec. We now study the impact of increasing multipole degree on solution time and parallel performance. The value of ff is fixed at 0.667 and the multipole degree is varied between 5 and 7. Table 3 records the solution time for reducing the residual norm by a factor of 10 \Gamma5 for 8 and 64 processors. As expected, increasing multipole degree results in increasing solution times. Modulo the parallel processing overheads, the serial computation increases as the square of multipole degree. Since the communication overhead is not high, this trend is visible in the parallel runtimes also. Increasing multipole degree also results in better parallel efficiencies and raw computational speeds. This is because the communication overhead remains constant, but the computation increases. Furthermore, longer polynomial evaluations are more conducive to cache performance. This table leads us to believe that once a desirable accuracy point has been identified, it is better to use higher degree multipoles as opposed to tighter ff criterion to achieve this accuracy. Approx. Accur. Figure 2: Relative residual norm of accurate and approximate iterative schemes. 5.3 Accuracy of the GMRES Solver The use of approximate hierarchical mat-vecs has several implications for the iterative solver. The most important of course being the error in the solution. It is very often not possible to compute the accurate solution due to excessive memory and computational requirements. Therefore it is difficult to compute the error in the solution. However, the norm of (Ax\Gammab) is a good measure of how close the current solution is to the desired solution. Unfortunately, it is not possible to compute this since A is never explicitly assembled. What we can compute is corresponds to the approximate mat-vec. If the value of matches that of (Ax closely, we can say with a measure of confidence that the approximate solution mathes the real solution. We examine the norm of this vector with iterations to study the stability of unpreconditioned GMRES iterations. 5.3.1 Convergence and Accuracy of Iterative Solver In this section, we demonstrate that it is possible to get near-accurate convergence with significant savings in computation time using hierarchical methods. We fix the value of ff and the multipole degree and compare the reduction in error norm with each iteration. Table 4 presents the Log of relative residual norm for GMRES with various degrees of approximation executed on a 64 processor T3D. The following inferences can be drawn from the experimental data: ffl Iterative methods based on hierarchical mat-vecs are stable beyond a residual norm reduction of 10 \Gamma5 . This is also illustrated in Figure 2 which plots the reduction in residual norm with iterations for the accurate and the worst case (most inaccurate mat-vec). It can be seen that even for the worst case accuracy, the residual norms are in near agreement until a relative residual norm of 10 \Gamma5 . For many problems, such accuracies are adequate. ffl Increasing the accuracy of the mat-vec results in a closer agreement between accurate and hierarchical solvers. This is also accompanied by an increase in solution time. It is therefore desirable to operate in the desired accuracy range. ffl The parallel runtime indicates that hierarchical methods are capable of yielding significant savings in time at the expense of slight loss of accuracy. Iter Accurate Time 124.46 156.19 92.16 112.02 Table 4: Convergence (Log 10 of Relative Error Norm) and runtime (in seconds) of the GMRES solver on a 64 processor Cray T3D. The problem consists of 24192 unknowns. 5.3.2 Impact of Number of Gauss Points in Far Field While computing the far-field interactions, our code allows the flexibility of using either 3-point Gaussian quadratures or single point Gaussian quadratures. Here, we investigate the impact of computing the far-field potentials using these on the overall runtime and error. Table 5 presents the convergence of the solver for the two cases. In each case, the value of ff is fixed to 0.667 and the multipole degree is 7. The near point interactions are computed in an identical manner in either case. Depending on distances between the boundary elements, the code allows for 3 to 13 point Gaussian quadratures in the near-field. The following inferences can be drawn from the experimental results: ffl Using a larger number of Gauss points yields higher accuracy but also requires more computation. This is consistent with our understanding that for a fixed ff criterion, the computational complexity increases with the number of Gauss points in the far field. ffl Single Gauss point integrations for the far-field are extremely fast and are adequate for approximate solutions. Iter Gauss Time 112.02 68.9 Table 5: Convergence (Log 10 of Relative Error Norm) and runtime (in seconds) of the GMRES solver on a 64 processor Cray T3D. The problem consists of 24192 unknowns. The value of ff is 0.667 and the multipole degree is 7. -5 Unpreconditioned Block Diag. Inner-outer -5 Block Diag. Inner-outer Unpreconditioned Figure 3: Relative residual norm of accurate and approximate iterative schemes. 5.4 Performance of Preconditioned GMRES In this section, we examine the effectiveness of the block-diagonal and inner-outer preconditioning schemes. We fix the value of ff at 0.5 and multipole degree at 7. The effectiveness of a preconditioner can now be judged by the number of iterations and the computation time to reduce the residual norm by a fixed factor. Although, certain preconditioners may yield excellent iteration counts, they may be difficult to compute and vice versa. A third, and perhaps equally important aspect is the parallel processing overhead incurred by the preconditioners. Table 6 presents the reduction in error norm with iterations for the unpreconditioned, inner-outer and block-diagonal preconditioning schemes. Figure 3 illustrates the convergence of the two problems graphically. It is easy to see that the inner-outer scheme converges in a small number of (outer) iterations. However, the runtime is in fact more than that of the block diagonal scheme. This is because the number of inner iterations in the inner-outer scheme is relatively high. This is a drawback of the inner-outer scheme since it does not attempt to improve the conditioning of the inner solve. (We are currently investigating techniques for solving this.) On the other hand, since the block diagonal matrix is factored only once, and the communication overhead is not high, the block diagonal preconditioner provides an effective lightweight preconditioning technique. This is reflected in a slightly higher iteration count but lower solution times. Iter Unprecon. Inner-outer Block diag Unprecon. Inner-outer Block diag Time 156.19 125.40 103.61 709.78 584.77 511.06 Table of Relative Error Norm) and runtime (in seconds) of the preconditioned GMRES solver on a 64 processor Cray T3D. 6 Concluding Remarks In this paper, we presented a dense iterative solver based on an approximate hierarchical matrix-vector product. Using this solver, we demonstrate that it is possible to solve very large problems (hundreds of thousands of unknowns) extremely fast. Such problems cannot even be generated, let alone solved using traditional methods because of their memory and computational requirements. We show that it is possible to achieve scalable high performance from our solver both in terms of raw computation speeds and parallel efficiency for up to 256 processors of a Cray T3D. The combined improvements from the use of hierarchical techniques and parallelism represents a speedup of over four orders of magnitude in solution time for reasonable sized problems. We also examine the effect of various accuracy parameters on solution time, parallel efficiency and overall error. We presented two preconditioning techniques - the inner-outer scheme and the block-diagonal scheme. We have evaluated the performance of these preconditioners in terms of iteration counts and solution time. Although the inner-outer scheme requires fewer iterations, each iteration is an inner solve which may be more expensive. On the other hand, due to the diagonal dominance of many of these systems, the block-diagonal scheme provides us with an effective lightweight preconditioner. The treecode developed here is highly modular in nature and provides a general frame-work for solving a variety of dense linear systems. Even in the serial context, relatively little work has been done since the initial work of Rokhlin[16]. Other prominent pieces of work were in this area include [14, 17, 22, 3]. To the best of our knowledge, the treecode presented in this paper is among the first parallel multilevel solver-preconditioner toolkit. We are currently extending the hierarchical solver to scattering problems in electromagnetics [17, 16, 22, 21, 3]. The free-space Green's function for the Field Integral Equation depends on the wave number of incident radiation. At high wave numbers, the boundary discretizations must be very fine. This corresponds to a large number of unknowns. For such applications, hierarchical methods are particularly suitable because the desired level of accuracy is not very high. --R An efficient program for many-body simulation A hierarchical o(n log n) force calculation algorithm. Guidelines for using the fast multipole method to calculate the rcs of large objects. Accelerated molecular dynamics with the fast multipole algorithm. Efficient Parallel Formulations of Hierarchical Methods and their Applications. Scalable parallel formulations of the barnes-hut method for n-body simulations Parallel matrix-vector product using hierarchical methods A parallel version of the fast multipole method. A fast algorithm for particle simulations. Field Computation by Method of Moments. Matrix methods for field problems. Mapping the adaptive fast multipole algorithm into mimd systems. Multipole accelerated preconditioned iterative methods for three-dimensional potential integral equations of the first kind Rapid solution of integral equations of classical potential theory. Rapid solutions of integral equations of scattering theory in two dimensions. GMRES: A generalized minimal residual algorithm for solving non-symmetrical linear systems Implementing the fast multipole method in three dimen- sions Load balancing and data locality in hierarchical n-body methods Fast multipole method solution using parametric geometry. Multilevel fast multipole algorithm for solving combined field integral equation of electromagnetic scattering. Astrophysical n-body simulations using hierarchical tree data structures A parallel hashed oct tree n-body algorithm The parallel multipole method on the connection machine. --TR --CTR Vivek Sarin , Ananth Grama , Ahmed Sameh, Analyzing the error bounds of multipole-based treecodes, Proceedings of the 1998 ACM/IEEE conference on Supercomputing (CDROM), p.1-12, November 07-13, 1998, San Jose, CA Sreekanth R. Sambavaram , Vivek Sarin , Ahmed Sameh , Ananth Grama, Multipole-based preconditioners for large sparse linear systems, Parallel Computing, v.29 n.9, p.1261-1273, September Ananth Y. Grama , Vivek Sarin, Impact of far-field interactions on performance of multipole-based preconditioners for sparse linear systems, Proceedings of the 18th annual international conference on Supercomputing, June 26-July 01, 2004, Malo, France Hariharan , Srinivas Aluru , Balasubramaniam Shanker, A scalable parallel fast multipole method for analysis of scattering from perfect electrically conducting surfaces, Proceedings of the 2002 ACM/IEEE conference on Supercomputing, p.1-17, November 16, 2002, Baltimore, Maryland Qian Xi Wang, Variable order revised binary treecode, Journal of Computational Physics, v.200 n.1, p.192-210, 10 October 2004
dense iterative solver;fast multipole method;barnes-hut method;preconditioning boundary element methods;parallel treecode;hierarchical dense matrix-vector product;boundary element method
305274
Equivalence of Nonlinear Systems to Prime Systems under Generalized Output Transformations.
Within a linear algebraic framework, we present a new characterization of the class of nonlinear systems which are equivalent to a prime system. We then introduce a class of generalized output transformations that can be thought of as a generalization to the nonlinear setting of a unimodular transformation in the output space. Our main result gives necessary and sufficient conditions for equivalence to a prime system under a certain group of transformations that includes generalized output transformations.
Introduction . The problem of characterizing the class of linear systems that are equivalent to prime systems was first posed and solved by Morse [12]. The group of transformations considered in [12] included, besides state space change of coordinates and linear state feedback, output space change of coordinates. Marino, Respondek, and van der Schaft [10] generalized this result to the nonlinear case. They showed that the class of smooth affine nonlinear systems that are locally equivalent to prime systems can be characterized by the properties of two families of involutive distributions defined on the state manifold. In this paper we consider the problem of equivalence to a prime system under a group of transformations that consist of state space diffeomorphism, regular static state feedback, and generalized output transformation (GOT). In the case where we restrict ourselves to the output space change of coordinates used by Marino, Respon- dek, and van der Schaft [10], we obtain a new and simpler characterization for the class of nonlinear systems which are (locally) equivalent to prime systems. We then introduce the notion of GOT to identify a larger class of systems equivalent to prime systems. We proceed in two steps. First, we enlarge the output space by considering a finite number of the time derivatives of the output as coordinates of new output space. Then we define a new set of outputs on this enlarged space. This transformation is invertible in the sense that the new outputs can be expressed as functions of a finite number of the time derivatives of the original output, and vice versa. That is, we can recover the original output without any integration. By analogy with the linear case, these transformations could be called unimodular, in the sense that their inverse belongs to the same class of transformations. This approach finds a natural application in control problems such as output tracking and output regulation. The goal of this paper is to develop a framework and sound theory to study this Received by the editors July 22, 1996; accepted for publication (in revised form) August 5, 1997; published electronically September 25, 1998. http://www.siam.org/journals/sicon/37-1/30706.html y Secci'on de Control Autom'atico, Departamento de Ingenier'ia El'ectrica, CINVESTAV-IPN, Apartado Postal 14-740, 07000 M'exico, D.F., M'exico (aranda@ctrl.cinvestav.mx). This work was done while this author was with the Department of Mathematics and Statistics, Queen's University, Kingston, ON, Canada. z Department of Mathematics and Statistics, Queen's University, Kingston, ON K7L 3N6, Canada (ron@rmh.mast.queensu.ca). new group of transformations and then identify those systems which are equivalent to a prime system under this group of transformations. Of course, a necessary condition for this equivalence is that the system be linearizable by static state feedback. It will be shown that the crucial step is the requirement that certain linear forms on the extended output space can be constructed such that their pull-back under the output map coincide with some suitable forms on the state space. In that respect, it is worth mentioning that the pull-back of a form is always a well-defined object, as opposed to the push-forward of a distribution, which may fail to be well defined. Therefore, one completely avoids the projectability-type conditions as stated in [10]. We present our results within the linear algebraic framework introduced by Di Benedetto, Grizzle, and Moog [6]. However, it will be shown that our results can be given a meaningful geometric interpretation in terms of jet bundles [15]. Finally, let us mention that this work was partially motivated by some results previously obtained for discrete-time systems [1]. One advantage of our formalism is that it allows a completely parallel treatment of both the continuous- and the discrete-time cases. The paper is organized as follows. In section 2 we recall some basic definitions from the so-called linear algebraic approach [2, 6]. Our main results are contained in section 3. In subsection 3.1 we obtain new necessary and sufficient conditions for equivalence to prime system under regular static state feedback, state space dif- feomorphism, and output space diffeomorphism. In subsection 3.2 we introduce the notion of GOT and study some of its properties. In subsection 3.3 we derive necessary and sufficient conditions for equivalence to prime system under regular static state feedback, state space diffeomorphism, and GOT. Finally, some conclusions and final remarks are offered in section 4. 2. Linear algebraic framework. To begin with, we recall some basic definitions from [2, 6]. Consider a nonlinear system \Sigma, described by equations of the form ae - (1) where the state x 2 M , an open and connected subset of R n , the control u and the output y 2 Y , an open and connected subset of R m . Throughout the paper the following standing assumptions are made: A1. The vector fields f(x) and g i (x) and the mapping h(x) are real analytic. A2. For almost all x 2 M , rank Let K denote the field of meromorphic functions of a finite number of the variables 0g. The time derivative of a function ' 2 K is defined by dt @x (2) Notice that the sum in (2) involves only finitely many terms. Let E denote the K-vector space spanned by fdx; du respectively, for and fdu (j) g. The elements of E are differential forms of degree one, or simply one-forms. The operator d induces a derivation in E by a a The relative degree r of a one-form defined to be the least integer such that fdxg. If such an integer does not exist, set r = 1. Introduce a sequence of subspaces fH k g of E by This sequence of subspaces was first introduced in [2, 3] to address the dynamic feedback linearization problem. It is clear that the sequence (3) is decreasing. Denote by k the least integer such that Assume that We shall explain below the significance of this assumption. In [2] it was proven that there exists a set of one-forms and a list of integers such that, for The integer r i associated to the one-form w i coincides with its relative degree. A set of one-forms satisfying (5) is called a system of linearizing one-forms. According to (2), define @x @x Therefore, associated to the system \Sigma, we can define two sequences of subspaces fE k g and fF k g of E defined by These two sequences of subspaces were first introduced in [6] to unify different notions of invertibility for nonlinear systems. The number ae called the rank of the system \Sigma. It can be shown [6] that ae This characterization of rank was introduced in [6] and agrees with Fliess's definition [7]. Finally, for notational convenience, define fdxg. Remark 2.1. In paper [6] the notation y (k+1) used instead of We use the latter notation because, in the next section, the y (k) will be used to denote the canonical system of coordinates of the extended output space. Remark 2.2. Throughout the paper we use the notion of pull-back of a differential form, as well as the differential forms version of Frobenius theorem. For details, the reader is referred to [4]. 3. Main results. 3.1. Equivalence to prime systems. In this section we present new necessary and sufficient conditions for equivalence to prime system under state diffeomorphism, regular static state feedback, and output space diffeomorphism. In a sense, this result is a particular case of the more general notion of equivalence that we introduce below and provides a new linear algebraic characterization of the class of systems already identified in [10]. Definition 3.1. A system \Pi is said to be a prime system if it is of the form z z i- ~ . Definition 3.2. The system \Sigma is said to be equivalent to the prime system \Pi if there exist (i) A state diffeomorphism (ii) a regular static state feedback is, fi(x) is a square nonsingular matrix; (iii) an output space diffeomorphism y 7! ~ such that the transformation of \Sigma under (OE; (ff; fi); /) equals \Pi. In order to state our first result, we need to introduce some notation. First define g. If f! is a basis of H k , it is easy to check that g. However, in general, f! s g is not a basis of - may happen that the latter set is not linearly independent. Also, recall that F fdh(x)g. Theorem 3.3. Consider the square nonlinear system \Sigma and suppose that it satisfies A1 and A2. Then \Sigma is equivalent to prime system \Pi if and only if the following conditions are satisfied: completely integrable; (iv) for completely integrable. Remark 3.4. Theorem 3.3 can be seen as a dual version of Theorem 4 in [10]. In particular, conditions (i), (ii), and (iv) of Theorem 3.3 are equivalent, respectively, to conditions (ii), (i), and (iv) of Theorem 4 in [10]. Also, notice that our conditions require the construction of a single sequence of subspaces or codistributions. Remark 3.5. In [2, 3] it has been shown that conditions (i) and (ii) are the necessary and sufficient conditions for the system \Sigma without outputs to be linearizable 122 E. ARANDA-BRICAIRE AND R. M HIRSCHORN by state diffeomorphism and regular static state feedback. In particular, condition (i) is a necessary and sufficient condition for strong accessibility. Remark 3.6. In the event that the conditions of Theorem 3.3 are satisfied, the decoupling matrix [9, p. 263], [13, p. 254] of the transformed output ~ full rank m. Therefore, the problem of asymptotically tracking a desired output y d is transformed into the problem of asymptotically tracking the desired output ~ which is a linear problem in the transformed coordinates. Proof of Theorem 3.3. Necessity . First notice that the subspaces H k are invariant under state diffeomorphism and under regular static state feedback [2, 3]. Moreover, they are independent of the output map. Next we show that the subspace F 0 ae X is invariant under output space diffeomorphism. Suppose that ~ the chain rule, we have d ~ @y This shows that span K fd ~ h(x)g ae span K fdh(x)g. Since y 7! /(y) is a diffeomor- phism, a similar argument shows that span K fdh(x)g ae span K fd ~ h(x)g, and hence span K fd ~ fdh(x)g. In a similar manner, one can show that F 0 is invariant under state space diffeomorphism. Finally, it is clear that F 0 remains unchanged under state feedback. Thus conditions (i)-(iv) are invariant under all the considered transformations. An easy computation shows that conditions (i)-(iv) are satisfied for a prime system \Pi. Therefore, if system \Sigma is equivalent to a prime system \Pi, conditions (i)-(iv) necessarily hold true. Sufficiency . We proceed by induction, going down from First notice that H k condition (iii) means that H k Moreover, by condition (iv) we can assume without loss of generality that the forms are exact, say By (7), the forms ! k i can also be written as follows: Even though the forms ! k i are linear combinations of the differentials dh j (x), it is not possible to assert a priori that they are the pull-back of some forms on the output space. This assertion holds true if and only if the coefficients a ij can be expressed as functions of the scalar outputs y j . The following lemma states that this is the case indeed. Lemma 3.7. The coefficients a ij , for in (8) can be expressed as functions of y Proof. Since the forms ! k i are exact, we have that Now, taking the exterior product of (9) with the dhm (x), where means that that factor is omitted, yields Since rank that the linear forms dh j (x) are independent. Con- sequently, (10) implies that da ij 2 span K fdh(x)g. The latter means that a ij are constant on each submanifold h \Gamma1 . Again, since rank are coordinates (y of M such that becomes the canonical submersion (y; q) 7! (y). Therefore, By Lemma 3.7, we can define ae k forms on the output space Y by j k . Then it is clear that the pull-back (see [4]) of the under the map precisely with the form ! k i ; that is, Now suppose that through steps constructed sets of forms (some of them possibly empty) such that and where the notation W (j) i should be understood elementwise. Therefore, by condition (iii), we can choose a set of forms W Moreover, condition (iv) means that we can assume, without loss of generality, that ! ki are exact, say ! and that there are forms j ki defined on the output space such that, for (j ki ). Repeat the above construction from g. Notice that, by construction, each ! i belongs to one and only one set W k , whence the integer r i is well-defined. Therefore, is a system of linearizing forms whose list of relative degrees is g. As a matter of fact, it can be shown (see, e.g., [2, 3]) that and that n. Recall that, by construction, the forms ! i are exact, say It follows that the map x 7! OE(x) is a diffeomorphism. In coordinates z ij , system \Sigma becomes z z ir The fact that the forms ! (j) are independent implies that the matrix B(z), whose rows are b i (z), has full rank. Therefore, the static state feedback well defined and yields z z ir To conclude the proof, we just need to construct a suitable output space diffeomor- phism. In order to do so, we need the following result. Lemma 3.8. Let be the collection of forms defined on the output space which satisfy Proof. As in the proof of Lemma 3.7, it is possible to choose a coordinates system becomes the canonical projection y. Let w We have already shown that the a ij can be expressed as functions of y j only. Since necessarily @yk . Then, the two-form dj i can be written as dj jk dy j - dy k . Now, recall that d! so that, in coordinates (y; q), the two-form d! i becomes d! jk dy j - dy k . By construction, the are exact, so that d! i j 0. Therefore, the coefficients - i jk must be identically zero. By virtue of Lemma 3.8, we can assume, without loss of generality, that, for Finally, define the output space diffeomorphism y 7! /(y). In coordinates ~ the system (12) is in prime form. Example 3.9 (see [10]). Consider the system defined on M easily compute Therefore, conditions (i) and (ii) of Theorem 3.3 are satisfied. Moreover, if we choose we see also that condition (iii) is satisfied. However, span K fW completely integrable. Therefore, system (13) is not equivalent to prime system. 3.2. Generalized output transformations. Next we introduce the notion of GOT. As we point out below, the notion of equivalence studied in the previous section is a particular case of this new class of transformations. Definition 3.10. Given two finite nonnegative integers d and d 0 , a GOT consists of two smooth maps (R m (R m ) d 0 Y such that ~ Even though in general we have ~ called proper if ~ h is a function of x In the case when d the GOT (14)-(15) reduces to an output space diffeomorphism. Notice, however, that in general d 6= d 0 . Example 3.11. Let Y be two systems of coordinates of R 3 . Consider the maps (R 3 It is easy to verify that the pair (/; -) is a GOT with 2. Remark 3.12. Parallel to the algebraic definition of GOT given by Definition 3.10, a more geometric interpretation of this class of transformations can be given in terms of jet bundles (see, e.g., [15]). Consider the output y 2 Y as a function of time and assume that it is of class C 1 . Then, every trajectory y(t) in the output space defines a section of the d-jet bundle J d (R; Y ) by t 7! j d Similarly, every smooth curve z(t) on R m defines a section of the d 0 -jet bundle J d 0 Therefore, the maps / and - can be interpreted as bundle maps such that the following diagrams commute: R \Gamma\Gamma\Gamma\Gamma\Gamma! id R R R \Gamma\Gamma\Gamma\Gamma\Gamma! id R R R is the source map and id R is the identity map. Roughly speaking, this means that to every smooth trajectory y(t) 2 Y corresponds one and only one trajectory z(t) Several types of invariants have been associated with the input-output map of the system \Sigma, e.g., the relative degrees [9, 13], the structure at infinity [11], the essential orders [8], and the rank of the system [6, 7]. Among them, the most fundamental is, without doubt, the rank ae (see section 2). Theorem 3.13 below states that the rank is invariant under proper GOTs. Theorem 3.13. Let (/; -) be a proper GOT, and let ae and ~ ae denote, respec- tively, the rank of the system \Sigma with respect to the output and with respect to the new output ~ ae Proof. Let fF k g and f ~ denote, respectively, the sequences of subspaces associated to the system \Sigma with the output and with the new output ~ Next note that, according to Definition 3.10, we have d @y (') @h (') 126 E. ARANDA-BRICAIRE AND R. M HIRSCHORN Pick an arbitrary form ! 2 ~ it follows that there are coefficients a ij such that This shows that, for every integer k - 0, we have ~ Similarly, it is easily seen that, for k - 0, g. Then the subspaces fF k g and f ~ ~ Now suppose that ~ ae ! ae , say ae ae for some integer r ? 0. We will show that this leads to contradiction. First note that, for every k - n, we have ae dim ~ ae Next let \Theta some sets of linear forms such that \Theta 0 is a basis of ~ Fn , \Theta 0 [ \Theta 1 is a basis of Fn+s , \Theta 0 [ \Theta 1 [ \Theta 2 is a basis of ~ Fn+2s , etc. Note that, by construction, ' i - 0 for every integer i - 1. By definition of the sets \Theta i and by (18), we have that dim ~ Solving for ' 2k+2 we obtain By (19), ' 2k+2 becomes negative for k large enough, which is a contradiction. This concludes the proof. 3.3. Equivalence under generalized transformations. Definition 3.14. The system \Sigma is said to be equivalent to the prime system \Pi under proper GOT if there exist (i) a state diffeomorphism (ii) a regular static state feedback (iii) a proper GOT (/; -) such that the transformation of \Sigma under (OE; (ff; fi); (/; -)) equals \Pi. Remark 3.15. We restrict ourselves to proper GOTs because we are studying equivalence to prime systems, for which the output is a function of the state only. Theorem 3.16. Consider the square nonlinear system \Sigma and suppose that it satisfies A1 and A2. Then \Sigma is equivalent to prime system \Pi under proper GOT if and only if the following conditions are satisfied: completely integrable; Remark 3.17. A system which satisfies the hypothesis of Theorem 3.3 (and hence is equivalent to prime system \Pi) also satisfies conditions (i)-(iv) above. Clearly, conditions (i)-(ii) hold. Next, note that condition (iii) of Theorem 3.3 implies H k ae Therefore condition (iii) holds. Finally, from Remark 3.6 we can see that condition (iv) holds as well. In order to prove Theorem 3.16, we need to introduce some notation. For a given nonnegative integer d, the extended state space, extended output space, and extended output map are defined, respectively, by M (R m ) d+1 , Y (R m ) d , and (R m Also, we will need the following technical result. Proposition 3.18. The rank ae of the system \Sigma is equal to m if and only if, for every integer N ? 0, dim Proof. First suppose that ae but that for some integer N we have necessarily, there is a form dh (N) i and coefficients c k ij such that dh (N) c N The latter implies that for every integer - N ? N we have Let us recall [6] that, for N ? n, (20) implies that dim E - In particular, if we choose - have that ae which is a contradiction. The converse is obvious. Proof of Theorem 3.16. Necessity . It is clear that conditions (i)-(iv) are satisfied for a system in prime form. Moreover, conditions (i)-(ii) are invariant under state diffeomorphism and regular static state feedback. On the other hand, Theorem 3.13 states that the rank ae is invariant under proper GOTs. It remains to prove that condition (iii) is also invariant under proper GOTs. This part of the proof will be broken down into two lemmas. Lemma 3.19. Let 0g. Then we have Proof. Pick an arbitrary linear . Then there are coefficients b ij and an integer N - 0 such that Next note that, by Proposition 3.18, the forms fdh (j) are linearly independent. Then, necessarily, dh (j) concludes that N We have shown that . On the other hand, it is obvious that X " Lemma 3.20. Let (/; -) be a proper GOT, and let fF k g and f ~ tively, the sequences of subspaces associated with the system \Sigma with the output and with the new output ~ 128 E. ARANDA-BRICAIRE AND R. M HIRSCHORN Proof. In the proof of Theorem 3.13 we have shown that, for every integer k - 0, we have ~ Pick an arbitrary form ! 2 ~ implies that This proves that ~ is a GOT, a symmetric argument shows that Sufficiency . Conditions (i)-(ii) imply that the system \Sigma is linearizable by regular static state feedback. Therefore, we can assume, without loss of generality, that \Sigma is in the form (12). Next notice that condition (iii) implies that, for d a k Lemma 3.21. The coefficients a k ij appearing in (21) can be expressed as functions of fy (j) Proof. By Proposition 3.18, the forms fdh (j) are independent. Therefore, a similar argument to that used in Lemma 3.7 can be used to conclude the proof. By Lemma 3.21, we can define m one-forms on the extended output space Y d by d a k Then it is clear that the pull-back of the forms j i under the extended output map coincides precisely with the forms dz i1 ; that is, dz e (j i ). Lemma 3.22. Let be the collection of forms defined on the extended output space Y d which satisfy dz e (j i ). Then, for Proof. By Proposition 3.18, the extended output map Y d has full rank equal to m(d 1). Therefore, there exists a system of coordinates of the extended state space M d such that becomes the canonical projection. A similar construction as in Lemma 3.8 shows then that dj By virtue of Lemma 3.22, we can assume, without loss of generality, that, for Finally define a new output function ~ y by ~ this change of output variables, system (12) is in prime form. It remains to prove that there is an inverse map y (j \Gamma1) . Therefore, it follows that necessarily for some integer d 0 - 0. Example 3.23 (Example 3.9, continued). We have shown that system (13) is not equivalent to a prime system under standard output space transformations, i.e., output space diffeomorphism. We shall show that system (13) is equivalent to prime system under proper GOTs. We have already shown that conditions (i)-(ii) are sat- isfied. It is easy to check that Note that X ae F 2 and, since F 2 ae F 5 , we have thus condition (iii) is also satisfied. Finally, lengthy but straightforward computations show that ae Consequently, system (13) is equivalent to prime system. Since the state equations are already in the form (1), in order to transform system into prime form, we just need to find a suitable GOT. This can be accomplished as follows: first note that e (dy 3 By integrating the right sides of (22), we find the GOT (y; - In coordinates (~y 1 ; ~ system (13) is in prime form. The inverse output transformation is obviously given by (~y; - ~ As pointed out before, one immediate application of Theorems 3.3 and 3.16 is the possibility of (asymptotically or exactly) tracking a desired output trajectory y d (t). This is best illustrated by the following example. Example 3.24 (Example 3.23, continued). The decoupling matrix [9, 13] associated with the original output system (13) is given by noninteracting control cannot be achieved by regular static state feedback. On the other hand, the output functions which bring system (13) to prime form are given, as functions of x, by ~ ~ ~ The decoupling matrix ~ associated with the output ~ simply ~ . Therefore the standard noninteracting feedback [9, 13] can be used to decouple the scalar output components ~ y i , Now suppose that we want to asymptotically track a smooth output trajectory y d system (13). Such trajectory is transformed in the new coordinates into ~ y d (y d1 (t); y d2 y d3 (t); y d3 (t)). Since (13) has been transformed into a prime system, the asymptotic output tracking problem is solved by linear state feedback in the transformed coordinates, namely y d3 ); are Hurwitz polynomials. 4. Conclusion and final remarks. We have introduced the notion of GOT for nonlinear systems and have shown that the linear algebraic framework introduced by Di Benedetto, Grizzle, and Moog [6] provides a rather convenient tool to study their properties. In particular, it has been shown that the rank of a system remains unchanged under such transformations. It is worth mentioning that the class of GOT that we have introduced can be seen as the "dual" transformation of the class of generalized state feedbacks introduced in [14] and studied from the differential algebraic viewpoint in [5], where they were called quasi-static state feedbacks. As an important application of this new class of transformations, a larger class of systems which are equivalent to prime systems has been identified. In turn, this result is applicable to control problems where output transformations are naturally allowed, such as output tracking and output regulation. Of course, the conditions of Theorems 3.3 and 3.16 imply that the system \Sigma is invertible [6, 7], and hence noninteracting control can be achieved by dynamic state feedback. In that respect, Theorems 3.3 and 3.16 avoid the addition of extra dynamics to the system, as pointed out in [10]. An open issue for further research is the study of the notion of equivalence of nonlinear systems under GOTs, not necessarily proper. --R A linear algebraic framework for dynamic feedback linearization Infinitesimal Brunovsky form for non-linear systems with applications to dynamic linearization Paris S'er. Automatique et corps diff'erentiels The essential orders and nonlinear decoupling Nonlinear Control Systems Equivalence of nonlinear systems to input-output prime forms Structural invariants of linear multivariable systems Nonlinear Dynamical Control Systems Some canonical properties of nonlinear systems --TR
prime systems;nonlinear systems;differential forms;output transformation
305308
Stabilized Finite Element Formulations for Shells in a Bending Dominated State.
We consider the design of finite element methods for the Naghdi shell model in the case when the deformation is bending dominated. Two formulations based on stabilizing techniques are introduced and it is proved that they are stable, hence free from locking. The theoretical estimates are confirmed by numerical benchmark studies.
Introduction During the last decade great progress has been obtained in the understanding of the locking of finite element methods for various "thin structures". For one-dimensional problems, i.e. beams and arches, it is now completely known how "locking-free" finite element methods should be constructed, cf. e.g. [1, 4]. For plates based on the Reissner-Mindlin theory considerable advances have also been achieved, and by now the problem with the shear locking can safely be claimed to be solved. In this respect we refer to the papers [3, 8, 10, 48] in which the optimal order of convergence is rigorously established for several methods and families of methods. With regard to shells the present situation is unfortunately far from satisfactory. Even if the literature on the field is voluminous, it is commonly admitted that the elements presently in use are not completely reliable, cf. e.g. the survey [11]. From the viewpoint of numerical analysis, it is not surprising to encounter difficulties with shells. In fact, the general concept of "shell" covers whole families of problems with very marked differences in behaviour depending on e.g. the geometry of the mid- surface, the boundary conditions and the loading. Hence, the goal of developing "the shell element" may be too ambitious, at least at present. There are two main classes of shell behaviour that can be clearly distinguished: the membrane and bending dominated cases. Mathematically, the membrane case is a singularly perturbated second order elliptic problem when the thickness of the shell is small. For this case the standard finite element method usually works quite well. Difficulties arise in the other case, i.e. when the deformation is bending dominated. Then, the limit problem leads to constraints which give rise to locking if they are exactly imposed in the finite element model. The numerical analysis of the locking problems for shells is still in its infancy. The papers are in fact so few that they can very well be briefly reviewed here. Pitk-aranta was the first to address this question in [40], where he considers hp finite element methods for a cylindrical shell in a bending dominated state. He shows that the standard h-version locks for low order methods, or if the finite element mesh is not aligned with the axis of the cylinder. In the paper it is also shown that the p-version with a fixed mesh is free from locking. Finally, a carefully designed hp-method is shown to be asymptotically convergent both with respect to h and p, but unfortunately only on an aligned rectangular mesh. Pitk-aranta analyses the method directly from the (modified) energy expression. The "partial selective reduced integration" introduced in the more recent paper by Arnold and Brezzi [2] is based on the classical approach of writing the problem in mixed form. They first use a splitting of the energy (already used by Pitk-aranta in [40]) to write the mixed system in such a form that the "Z-ellipticity" condition of the classical saddle point theory is avoided [9]. Then they prove the "inf-sup" condition by constructing a Fortin operator. For this, the technique of "bubble functions" is used. In the construction of the Fortin operator, the authors need the assumption that the geometrical parameters (i.e. the fundamental forms and the Christoffel are piecewise constants, which severely restricts the applicability of their results (namely to circular cylinders). It seems to be non-trivial to extend their analysis to the general case. In [49] Suri studies the approach of Arnold and Brezzi as an hp-method for rectangular elements. The analysis of Suri is in the spirit of Pitk-aranta, and the modified energy expression is analysed directly without the use of the equivalent mixed method. Also here the assumption of piecewise constant coefficients is used. Let us remark that, intuitively, this assumption seems to be even more restrictive for a "p-dominated extension" procedure as the elements then can be quite large and the variation in the geometry big. Let us finally mention the paper by Kirmse [28] in which a spherical surface is considered and a locking free method is designed. The purpose of the present paper is to explore the application of stabilization techniques to shell problems. These stabilization techniques have earlier been shown to give methods free from locking for several related problems in continuum mechanics such as incompressible elasticity [26, 22, 21], beams [31], arches [30] and Reissner-Mindlin plates [39, 27, 47, 33]. The stabilization technique is quite simple. The equations are first written in a variational mixed form. Then, properly weighted least-squares-type expressions of the equilibrium and constitutive equations are added to the bilinear form. This is, indeed, how we here treat the equations of the Naghdi shell model [35, 5]. For the resulting finite element method we are able to prove the stability, hence the method is free from locking. For our result we do not need any restrictive assumptions on the geometry. Neither do we need any stabilizing bubble degrees of freedom, and we are able to use standard finite element spaces. we should also emphasize that the the auxiliary variables introduced in the mixed stabilized bilinear form are condensed in an implementation which then takes the standard displacement form. Our method is formulated in the h-version. In principle, the method can be formulated in a general hp setting, but as we extensively use inverse estimates the resulting method would not be uniformly stable with respect to the polynomial degree p. This lack of stability might, however, be compensated for by the better approximability properties of an hp-method, especially if a properly refined mesh is used. A general analysis would require that all technical results are verified also with respect to p. As the present paper is already rather technical, we have not tried to perform this. In other respects our analysis suffers from the same shortcomings as the previous papers on the subject. In order to concentrate on the locking, we give our estimates assuming that the exact solution is sufficiently smooth. As it is known that the shell problems have boundary layers of different length scales [41], this assumption is not very realistic. But as we have a stable method, the treatment of the boundary layers should be done by a proper mesh refinement and this is a problem of approximation theory. The biggest shortcoming for the method we present, and also for the methods that have been mathematically studied in previous works [2, 49, 28], is that they do not perform properly when they are applied to membrane dominated shells. Hence, we are still far from having "the shell element". An outline of the paper is as follows. In the next section we specify our notation regarding the differential geometry of shell surfaces. In Section 3 we recall the Naghdi shell model and give the equations in the bending dominated case that we focus on. In the next two sections we introduce and analyse two finite element formulations, corresponding to different choices of the stabilization weights. Then, in Section 6, we give numerical results obtained with these methods in benchmark computations. Finally, we close the paper with an appendix in which we prove some results of differential geometry that we have used in our analysis. Shell geometry and notation we use the classical representation of the shell geometry, as described in [24]. Thus, the shell mid-surface is characterized by a map ~r which is a one-to-one mapping from \Omega\Gamma an open domain of IR 2 , into IR 3 . ~r will be assumed to be as smooth as required (in practice C 3 ( - \Omega\Gamma22 The actual surface we denote by S, i.e. -\Omega\Gamma4 we consider a shell of uniform thickness t. Regarding the concepts and quantities of the differential geometry of surfaces that we use in this study, we again refer to [24] for both definitions and notation. However, with a view to making equations more compact, we also make use of the alternate notation by which surface tensors are represented by letters with a number of underbars equal to their order. In particular, a scalar is denoted by a simple letter. With this notation, a tensor is considered as independent of the type (covariant or contravariant) of its representations in the curvilinear coordinate system, and transforming one set of components into another is simply done by using the transformation formulas. Thus we will write ff\Omega ~a ff\Omega ~a ff ~a ff\Omega ~a \Deltafi ~a Here ~a are the covariant surface base vectors and ~a ff is the contravariant base. A single dot will denote the simple contraction operator: ff\Omega ~a ff\Omega ~a whereas a colon denotes a double contraction: The metric tensor for the surface we denote by a and the second and third fundamental forms are denoted by b and c (= b : b), respectively. For a second-order tensor, we define the transposition and symmetry operators as follows we next consider differential operators. The gradient of a tensor is obtained by taking the covariant derivative and adding one index and the divergence by contracting the gradient on the last two indices For a surface integral over !, a subdomain of \Omega\Gamma we use the following compact notation Z Z a d- 1 we also write Z ds def Z ds for an integral along a curve C, with (ds) . With this notation, Gauss theorem reads Z Z where - is the unit outward normal, in the tangential plane, to the boundary ~r(@!). From this the following Green formulas are derived Z Z ds \Gamma Z (div u)w dS; (2.2) Z Z Z For our analysis it will be convenient to use special norms for Sobolev spaces of tensors. If two zero-order tensors v and w are in L 2 (!) we define the "intrinsic" inner-product and norm Z This new norm is equivalent to the regular L 2 (!)-norm, cf. [43]. we also extend this definition to higher order tensors and write Z Z we also denote the corresponding norms by k \Delta k 0;! and these can be shown to be equivalent to the regular L 2 (!)-norm of any of the representations of these tensors in covariant or contravariant components [43]. Finally, we introduce new H 1 (!)-norms through Recalling the relationship between covariant and regular derivatives, it is clear that this new norm is again equivalent to the standard H 1 (!)-norm of the the tensors in any representation. Using higher-order covariant differentiation, there is no difficulty in similarly defining intrinsic H k -norms (k - 2) and establishing the corresponding equivalence properties. For all norm and inner-product signs, we will omit the domain subscript when the domain considered is\Omega itself. 3 The variational shell model The shell model we consider, the so-called Naghdi model, is of the Reissner-Mindlin type, i.e. it includes the effect of shear deformation, cf. [35, 5, 50, 52, 19] and the references therein. The unknowns are the displacement at each point of the mid-surface decomposed into tangential and transverse parts (respectively a first-order and zero-order surface tensor), and ' as the first-order tensor representing the rotation of a fiber normal to the mid-surface S in the undeformed configuration. we let we assume that the boundary conditions on are given so that ~r(\Gamma 0 ) is the part of the boundary along which the shell is fully clamped (i.e. the part where all displacements are left free. The problem is posed in the domain\Omega and we define the displacement space U by The variational formulation then reads [5]: find (~u; ') 2 U such \Omega Z \Omega Z \Omega Z \Omega Here the material properties are given by the two tensors a ff- a fi- + a ff- a fi- a fffi a - and -, ", fl denote the bending, membrane and shear strain tensors, respectively: we also recall that b and c are the symmetric tensors corresponding to the second and third fundamental forms of the surface, respectively. we also write equation (3.1) in the shorter form: with Z \Omega and Z \Omega Z \Omega Implicit in the use of a shell model is the assumption that the shell is "thin". Hence, it is essential to study how the solution behaves in the limit when the thickness This limit behavior is very different depending on the geometry of the shell and the boundary conditions and depends in a crucial way (cf. [44, 45, 15, 16, 36, 37]) on the subspace consisting of the displacement fields with vanishing shear and membrane strains. In this paper we only consider the case when the shell is said to be in a bending dominated state of deformation. This is the case when (cf. [44, 16, 37]) Then the limit problem is obtained by assuming the loading to be given by f with ~ f independent of the thickness t. In the sequel we therefore study the following problem. U such that Here we introduced the notation F (\Delta) def From [6] and [18] we know that, for any t ? 0, P t has a unique solution, provided that the distributed force field ~ f is in an appropriate space, say [L Furthermore, as t tends to zero, P t can be seen as a standard penalty problem. The limit problem P 0 is defined as: such that The term "limit problem" is justified since, as t ! 0, it can be shown that the solution (~u; ') of P t converges strongly in U to the solution (~u [13, 40]). In the approximation of plate problems it has often turned out to be advantageous to use a mixed formulation, cf. [9, 10, 20]. This is the approach that we use here as well. Hence, we define as new unknowns stress variables dual to the strains in the variational formulation (3.5). By n we denote the symmetric membrane force tensor, Here we depart from the usual notation, cf. Remark 3.1 below. The shear force we denote by q. These are connected to the membrane and shear strains through the constitutive equations The symmetric bending moment tensor is not taken as an independent unknown, but we use the following abbreviation based on the bending constitutive equation: By introducing as new unknowns and by writing the constitutive equations (3.8) and (3.9) in a weak form, we obtain an equivalent "mixed" formulation of the problem: Q such that with the new bilinear forms defined through Z \Omega and Z \Omega Here we use the notation a ff- a fi- + a ff- a fi- \Gamma 2- a fffi a - a The second order tensor - G is the inverse of G (i.e. G \Delta - G is such that, for any two symmetric tensors T and Finally, we recall that using the symmetry of the second order tensors, and the Green formulas (2.2) and (2.3), the following integration by parts formulas are obtained Z Z Z div (b \Delta m) \Delta v dS (3.12) Z (b Z (m ds \Gamma Z Z Z Z Z (n ds and Z Z Z (b Z div q v 3 dS+ Z Collecting these formulas gives Z Z Z Z Z Z Z (m ds (3.15) Z ds Z Hence, recalling the constitutive equations (3.7)-(3.9), problem P t gives the following equations of equilibrium in the domain\Omega\Gamma and the natural boundary conditions on the Remark 3.1 In the above equations the quantity is the tensor obtained by integrating the three-dimensional membrane stresses over the shell thickness, cf. e.g. [29, 24, 35, 52]. Usually this is called the membrane force. For designing a stable method it seems more practical to introduce the variable n, and not ~ n, as an new unknown. For simplicity we refer to n as the membrane force. 4 A first approximation scheme we use a finite element partitioning C h of -\Omega into straight-sided triangles or quadri- laterals. Naturally, the partitioning is assumed to satisfy the usual regularity and compatibility conditions, cf. [14, 7, 42]. The diameter of an element K 2 C h we denote by hK , and we let hK . By \Gamma h we denote the collection of edges in the mesh, and by hE the length of an edge . The letters C and c are henceforth used to denote generic strictly positive constants, independent of both t and h, which are allowed to take different values at different occurrences except when appearing with indices. Let U h and Q h be finite element subspaces of U and Q, respectively. A mixed finite element method of the "classical" saddle point type would be based on the formulation M t , viz. such that It appears difficult to design a stable finite element method directly based on this formulation. Hence, we follow an approach that has turned out to be fruitful for the related beam, arch and plate problems, cf. [22, 21, 47]. The approximation scheme we propose is derived from (4.1) by adding weighted least-squares-type terms of the equilibrium equations (3.16)-(3.18) and the constitutive relations (3.7)-(3.8). In order to simplify the presentation of our method, we introduce the weighted inner-product with analogous definitions for higher order tensors. Further, in accordance with and (3.22) we introduce the notation Our first stabilized method will now be defined as follows: such that where with a stabilizing term originating from the equilibrium equations div \Gammaff 3 and one from the constitutive equations Z \Omega dS (4.7) Z \Omega dS: The right hand side is defined as The norm used for the displacement is the modified H 1(\Omega\Gamma9744/ that we previously defined, i.e. For the stresses, we use a discrete norm defined by I with "interior" terms and "jump" terms Z ds where stands for the jump of the quantity if the edge is in the interior, and for the quantity itself if it is on \Gamma 1 . Finally, we let t;h we begin our analysis by noting the consistency of formulation S h t with respect to the continuous problem M t . Lemma 4.1 Suppose that ~ 2(\Omega\Gamma7 3 . Then the solution (~u; '; n; q) 2 U \Theta Q of First we note that, due to the assumption ~ 3 , the quantity r) is well defined for all (~v; j; p; r) 2 U h \Theta Q h . Therefore, using the continuous formulation M t , the equilibrium equations (3.16)-(3.18) and the constitutive equations (3.7)-(3.8), we directly obtain div div ~ \Gammaff 3 Z \Omega dS Z \Omega dS In order to obtain a stable method we have to specify the finite element spaces. To this end we let, for l - 0, l (K) if K is a triangle, and for k - 1 we now define and r ff j K 2 R Remark 4.1 With the choice of finite elements spaces that we made, the stresses are interpolated discontinuously between elements. This implies that they can be eliminated at the element level to obtain a purely displacement-based numerical scheme, cf. equation (6.3) below. Remark 4.2 Our choice of covariant components for the displacement variables, and of contravariant ones for the stresses, enables us to establish Lemma 4.4 (using Lemma A.2), which we need for proving the stability of the method. we are now ready to state our main stability result. we will assume that the shell thickness is in the range Lemma 4.2 Assume that: where the positive constants C I are fixed, derived from inverse inequalities. (S4) h is sufficiently small. Then the stabilized formulation S h t is stable, i.e. there is a positive constant C such that, for all ( ~ there exist (~z; j; and be arbitrary. The proof we will now divide into three steps. Step 1. First, a direct calculation gives Z \Omega Z \Omega Z \Omega Z \Omega we will use the following inverse estimates For clarity, we will establish (4.21) and (4.22) as a separate result in Lemma 4.3 below. we also have and from Lemma A.1: Z \Omega so that we get X Combining equations (4.21), (4.22) and (4.25) with (4.20), we obtain Z \Omega Z \Omega Z \Omega Z \Omega the ellipticity result proved in [6, 18] gives Z \Omega Z \Omega when choosing and for h small enough. Next, Lemma A.1 implies Z \Omega Further, it holds Z \Omega Since a combination of the above relations gives again when h is small enough, to take care of the term \GammaC h 2 k~w; -k 2 0 in (4.26). Finally, using the arithmetic-geometric mean inequality, and the boundedness of b, we get, for Hence, by setting j close enough to one, we obtain I Step 2. Next, we use the result that there exists (~v; such that Z ds and X The proof of this result is rather technical and hence we will postpone it to Lemma 4.4 below. With this ~v we first write with I Z \Omega Z \Omega div div ~ \Gammaff 3 and Z \Omega Z \Omega Note that estimates (4.21) and (4.22) immediately imply, for all (~x; -) 2 U In order to bound I, we apply these relations to both ( ~ and we use the Schwarz inequality and (4.36). we obtain I I we transform the term II by using the integration by parts formulas (3.13) and over each element Z Z with Z ds Z Hence, using (4.31), (4.35), (4.36) and the arithmetic-geometric mean inequality we get Combining (4.37)-(4.44) and using, once again, the arithmetic-geometric mean in- equality, we obtain I I 2oe I for any strictly positive oe. By choosing oe small enough, we then have I Step 3. Choose now (~z; j; relations (4.34) and (4.45) proved in the previous steps then give I when choosing Using (4.36) we get and the assertion is thus proved. Next, we will prove the missing steps in the proof above. we start with the inverse estimates (4.21) and (4.22). Lemma 4.3 The following inequalities hold for any (~v; First we note that while, by virtue of the smoothness of b we also have Therefore the proof will be identical for both estimates. Further, the above definition of Sobolev norms for tensors implies where the norm in the right hand side now denotes the standard H 1 -norm. Our argument will not require the detailed expression of m fffi (~v; j), so we instead symbolically denote where all coefficients involved are smooth functions that incorporate geometric and material terms. For a smooth function ae we now define T h ae as the linear part of its Taylor expansion at the center of each element. Using standard expansion properties, we have for any (ff; fi) and any element k(ae fffii- k(ae fffii- Hence, we obtain we can now invoke standard inverse estimates on polynomial functions to obtain and, using (4.53) combined with an inverse estimate, we finally get which, combined with (4.24), concludes the proof. Remark 4.3 It is not clear whether estimates (4.47) and (4.48) would hold without the terms h 2 k~v; jk 2 0 . These estimates, however, are sufficient for our purposes in their present form. Remark 4.4 In the above proof, it clearly appears that estimates (4.47) and (4.48) follow from similar local estimates that we can explicitly write as: This implies that these inverse inequality constants can be computed for each element using a simple local eigenvalue problem, cf. [25] where this idea is introduced for several stabilized methods. Therefore the choice of ff 1 and ff 2 can be made automatically in the course of the assembling process. we proceed to establish the result required at the second step of the proof of Lemma 4.2. For this, the technical Lemmas A.1 and A.2 are essential. Lemma 4.4 There is a positive constant C such that, for all (k; s) 2 Q h , there exists (~v; such that Z ds ds - Cjk; sj J and X Proof : we use the normal Lagrange degrees of freedom for ~v and we choose these so that at the vertices and the internal nodes of all elements. To the remaining degrees of freedom of ~v along edges we assign values so that where a bar over the symbol of a continuous function denotes its value at the midpoint of the edge, and b E stands for the second-degree "bubble function" along the edge with value one at the midpoint (i.e. - b As it holds this construction yields a function ~v lying in the appropriate finite element subspace for the displacement. Now, we first note that Lemma A.2 gives Z Z ds Z where i is a smooth positive function bounded away from zero. Then we can apply Lemma A.1 to obtain Z ds - C Z ds Z and since the quantities involved are now polynomial functions, a standard scaling argument yields Z ds - C Z ds so that, using again Lemmas A.1 and A.2, we have Z ds - C Z ds Z ds To bound v, we first note that inverse estimates imply Then, using the fact that all degrees of freedom are equal to zero except along edges, we get by scaling arguments, and Lemmas A.1 and A.2 For the component v 3 similar arguments give Z ds - C and The estimates (4.62)-(4.65) then prove the assertion. To perform the error analysis, interpolation estimates in non-standard norms will be required. Lemma 4.5 For (~u; [H k+1 it holds Proof : The estimate follows from scaling arguments. Lemma 4.6 For (n; [H it holds r) be the L 2 -projection of (n; q) in Q h . Since no continuity is imposed on the finite element functions, this projection is defined locally element by element. we now have The last term above is handled by a scaling argument and the asserted estimate then follows from standard estimates. Let us now prove the error estimate for our numerical scheme. In the proof we will repeatedly need the estimate which is a direct consequence of standard inverse inequalities. Theorem 4.1 Assume that conditions (S1)-(S4) of Lemma 4.2 hold and that the solution of M t is such that ~u 2 [H and q 2 [H k . Then the finite element formulation S h t has a unique solution satisfying be the interpolant to (~u; '; n; q) satisfying the estimates of Lemmas 4.5 and 4.6. By the stability result of Lemma 4.2 there exists (~v; j; p; r) 2 U h \Theta Q h such that and Next, the consistency of Lemma 4.1 gives To proceed, we write out the expression for the bilinear form For the first term above the Schwarz inequality, Lemma 4.5 and (4.70) give By using the integration by parts formulas (3.13), (3.14) and Lemma 4.5 we get Next, we directly get and The first stabilizing term is estimated using Lemmas 4.5 and 4.6 as follows \Theta where we used the inverse inequality (4.68). For the second stabilizing term we obtain by virtue of the previous estimates (4.75)-(4.77), the Schwarz inequality and Lemma 4.5. Finally, we note that Lemmas 4.5 and 4.6 also give Hence, collecting (4.71) to (4.80) and using the triangle inequality we get the asserted estimate. we will close this section by giving some remarks on the analysis of the method. In [2] the analysis is performed using an abstract semi-norm for the stresses, instead of the discrete norm we have used. This abstract semi-norm is defined as follows (~v;j)2U For our finite element method it is possible to prove the stability using the same global norm as in [2], i.e. This is achieved using the "Pitk-aranta-Verf?rth trick" introduced by Pitk-aranta in connection with Babu-ska's method for approximating Dirichlet boundary conditions [38] and Verf?rth for mixed methods for the Stokes equation [51]. The idea has later been extensively used for both classical and stabilized formulations of the Stokes problem, cf. [46, 21]. we are, however, not able to carry through the whole error analysis with this norm. The reason is that the stabilizing term (4.78) which we are not able to bound. One possibility for an analysis would be to use the combined norm jjj \Delta jjj +k \Delta k t;h for the stresses. This is possible since the same stability construction can be shown to yield the stability with respect to both norms for the stresses. we choose a different approach and show that the estimate for the stresses in the norm (4.81) can be proven "a posteriori". Theorem 4.2 Under the assumptions of Theorem 4.1 it also holds From the definition of the semi-norm (4.81) there is (~v; that and Now we let (~v be the Cl'ement interpolant to (~v; j). From [17] we have Next, we write For the first term above an integration by part using (3.13) and (3.14) gives From the consistency we have Hence, it holds \GammaS c For the first term above we get The second term is estimated as follows \Theta \Theta k~v h where we used the inverse inequality (4.68). For the third term we directly get Combining the above estimates gives From Lemma 4.5, the inverse estimate (4.68) and Theorem 4.1 it follows that Hence, the assertion follows from Theorem 4.1. 5 A second stabilized method In this section, we propose an alternative stabilized scheme, obtained from the previous formulation by changing the weights in front of the stabilizing terms that originate from the constitutive equations, in the spirit of what is considered for plates in [39, 27, 47, 34, 33, 32]. This second stabilized method reads: ~ such that ~ where ~ with the stabilizing term S e h originating from the equilibrium equations defined as before in (4.6), and the term from the constitutive equations redefined by ~ Z dS Z dS: The right hand side F h remains unchanged as defined by (4.8). For the displacement variables we will use the following norm which is obviously stronger than the H 1 -norm used for our first method. The norm for the stresses we now have to weaken by first redefining the "jump" term Z ds and then defining I by keeping the interior part as defined in (4.11). we will also use the combined notation t;h The analysis of this new scheme will now essentially follow the same lines as in Section 4, so there is no need to give the full proofs for all results. we will instead highlight the differences between the two formulations, whenever these differences are significant. First, we again note that the formulation is consistent. Lemma 5.1 Suppose that ~ 2(\Omega\Gamma7 3 . Then the solution (~u; '; n; q) 2 U \Theta Q of ~ The finite element subspace U h \Theta Q h we keep as defined by (4.16) and (4.17) in Section 4. With this choice we can state the new stability result. Lemma 5.2 Assume that: where the positive constants C I are fixed, derived from inverse inequalities. sufficiently small. Then the stabilized formulation ~ t is stable, i.e. there is a positive constant C such that, for all ( ~ there exist (~z; j; ~ and Proof : we again go through 3 steps. Step 1. First, a direct substitution yields ~ Z w)dS Z Note that, for any K,maxf1; ff i Using as before estimates (4.21), (4.22) and (4.25), we thus obtain ~ we again set C I 2: Then, proceeding like in the proof of Lemma 4.2, we can conclude that ~ I Step 2. By changing the weights from hE to h 3 in (4.60), Lemma 4.4 changes as follows: there exists (~v; such that Z and X we first note that By substituting this ~v we get ~ with I Z Z div div ~ \Gammaff 3 Z \Omega Z \Omega and Z Z Using the Schwarz inequality and estimates (4.40)-(4.41), then (5.12), we obtain I I Further, recalling (5.7), we have Z Z s Z s Z using the Schwarz inequality and (5.12). In the second term we again integrate by parts using (3.13) and (3.14) , which gives with Z and Z Z Equation (5.11) implies Hence, recalling (5.10), the arithmetic-geometric mean inequality gives As in the proof of Lemma 4.2, we now combine (5.13)-(5.22) and use the arithmetic-geometric mean inequality to obtain ~ I Step 3. The assertion again follows from (5.9) and (5.23) by choosing (~z; j; we now examine the modifications in the interpolation estimates. In view of the stronger norm used for the displacements, a stronger assumption on the regularity of ~u is required. Lemma 5.3 For (~u; [H k+2 it holds Using the definition of the norm [] \Delta [] t;h , we have Therefore, recalling that the interpolation space is one degree higher for ~u than for scaling arguments imply The next term in (5.24) is also treated by standard scaling arguments, and the remaining terms are unchanged from Lemma 4.5. By contrast, the new norm for the stresses is weaker than the previous one, so the interpolation estimates remain valid. Lemma 5.4 For (n; [H it holds we can now state and prove our final approximation result. Theorem 5.1 Assume that conditions ( ~ S1)-( ~ S3) of Lemma 5.2 hold and that the solution of M t is such that ~u 2 [H and q 2 [H k . Then the finite element formulation ~ t has a unique solution satisfying be the interpolant of (~u; '; n; q) satisfying the estimates of Lemmas 5.3 and 5.4. By the stability result of Lemma 5.2 there exists (~v; j; p; r) 2 U h \Theta Q h such that and Next, the consistency of Lemma 5.1 gives ~ To proceed, we write out the expression for the bilinear form ~ For the first term above, the Schwarz inequality, Lemma 5.3 and (5.27) give By using the integration by parts formulas (3.13), (3.14) and Lemma 5.3 we get Next, we directly get and The first stabilizing term is estimated using Lemmas 5.3 and 5.4 as follows \Theta where we used the inverse inequality (4.68). For the second stabilizing term we obtain by virtue of the previous estimates (5.32)-(5.34), the Schwarz inequality and Lemma 5.3. Finally, we note that Lemmas 5.3 and 5.4 also give Hence, collecting (5.28) to (5.37) and using the triangle inequality we get the asserted estimate. 6 Numerical results 6.1 Numerical procedure we have implemented the two stabilized methods analysed in Sections 4 and 5, for the lowest-order finite element spaces, i.e. letting in (4.16) and (4.17), in the simplified case of circular cylinders, using the MODULEF library. In addition to the obvious implementational simplification, circular cylinders indeed feature two major advantages: ffl They provide one of the very few instances of shell geometries for which some reference solutions can be derived, either in closed form or with arbitrary numerical precision, so that reliable benchmarks are available. ffl This geometry allows a wide variety of possible limit behaviours when the thickness is very small, according to how boundary conditions are imposed. In particular, if essential boundary conditions are not imposed outside of rulings (straight lines parallel to the axis), it is easily seen that the limit problem is bending-dominated. we considered two different benchmarks. In the sequel, we refer to the natural coordinate system, shown in Figure 1, in which ~a 1 and ~a 2 are unit vectors, respectively tangent and normal to generators. The benchmarks are defined as follows: Figure 1: The natural coordinate system a) The boundary conditions and the loading are defined in such a way that the shell behaves like an arch. Considering a cylindrical "slice" at the ends of which one imposes assuming that the loading ~ f is a function of - 2 such that f indeed easily seen that the resulting behaviour is that of an arch, i.e.: ( we used an example, borrowed from [12], for which a closed-form arch solution can be derived. This example, described in Figure 2, corresponds to a semi-circular arch clamped at both ends and loaded by a uniformly-distributed constant force. we considered a slice of length equal to 1.5 times the radius R and, for symmetry reasons, one half of this slice was computed, so that the actual computational domain was a 1:5 \Theta -rectangle. b) A fully-circular cylinder is loaded by a periodic pressure, so that the shell reduces to a one-dimensional model along the axis. This problem is analysed in detail in [41], and we applied the procedure described therein to obtain numerical solutions with arbitrary precision, using symbolic calculus software. The specific example considered is a cylinder with free ends and of length 2R, loaded by a pressure Figure 3. Due to symmetry, only one sixteenth of the structure was effectively computed, using a 1 \Theta -rectangle. In each case, numerical solutions were computed using triangular meshes automatically generated by a Vorono-i method available in MODULEF [23], for gradually ~ computational domain R 1:5R clamped Figure 2: Semi-circular arch R computational domain Figure 3: Cylinder loaded by periodic pressure MODULEF chapelle sinus.nopo 547 POINTS COIN BAS GAUCHE COIN HAUT DROIT Figure 4: Mesh generated for the 1 \Theta -domain (N=20) refined discretizations of the rectangular boundary, dividing each side into N equal parts, with One of these meshes is shown in Figure 4. we deliberately avoided using meshes aligned with the sides of the domain, or with the axis of the cylinder, that seem to alleviate locking phenomena in some instances [40]. The Poisson ratio - was set to 0.3. The stabilization constants were determined by performing some preliminary calculations on the first benchmark. For the first stabilized method, we then used ff . For the second method we chose ff In both cases the choice ff allowed because, with each element for any discrete membrane stress field n (since all n fffi are constant), the corresponding least-square term provides no further stabilization than the first one. In order to compute the stabilized numerical solutions, we used standard solvers for symmetric positive matrices. To that purpose we eliminated the stress degrees of freedom element by element, as indicated in Remark 4.1 above. Denoting by U the column vector relative to the displacements and rotations, and by P that relative to the stresses, the stabilized mixed methods indeed lead to the following typical matrix equation: PU !/ U FU From the proof of the stability results, it is clear that both MUU and M PP are symmetric positive definite matrices so that we can eliminate P from this equation. Note that, since the stress finite element functions are discontinuous, this elimination can be carried out at the element level as the assembling is performed. Thus, instead of (6.2), the problem solved in practice is where the matrix to be inverted, (MUU +M T PP M PU ), is now symmetric positive definite. Hence we solve a matrix equation similar to what would be obtained from a standard displacement-based finite element method. 6.2 Analysis of the results Figures 5 and 7 show relative errors in the H 1 -semi-norm for the displacements, i.e. computed from solutions obtained by the first stabilized method, and also by a purely displacement-based scheme corresponding to the standard Galerkin approximation of problem P t using U h . Thickness values of 0.1, 0.01, 0.001 (scaled by R) were considered. Figures 6 and 8 compare similar errors for the rotations with interpolation errors, since optimal convergence is expected from the theoretical analysis. These interpolation errors turned out to vary very little with the thickness (typi- cally within 10% ranges), so for the sake of legibility only their values for are displayed. Note that, from the theory, optimal error estimates are not expected for the displacements since convergence is governed by the approximability properties of the lowest degree finite element space, i.e. that of the linear rotations. This is confirmed by the numerical results, as can be seen in Figures 5 and 7 where the slope of the best convergence curves barely exceeds unity. This explains why we do not plot interpolation estimates for the displacements. In Figures 5 and 6, i.e. for the arch benchmark, we see no significant influence of the thickness on approximation errors of the stabilized method. Moreover, the errors for the rotations are very close to interpolation errors. By contrast the displacement-based method exhibits strong locking, with completely erroneous (in fact vanishing) solutions for meshes except the finest one. In the second example, a marked deterioration of convergence appears in Figures 7 and 8 for the first stabilized method when the thickness decreases. Approximation errors are visibly affected in absolute value for each mesh, as well as in rates of convergence. However, even errors for especially when compared with the displacement-based method which dramatically fails here again. we next compare the two stabilized methods. Figures 9 and 11 display the relative errors for the displacements approximated by both methods for thickness Stabilized Stabilized Stabilized Figure 5: Benchmark a - Relative errors for ~u10.110 100 Stabilized Stabilized Stabilized Figure Benchmark a - Relative errors for ' Stabilized Stabilized Stabilized Figure 7: Benchmark b - Relative errors for ~u10.110 100 Stabilized Stabilized Stabilized Figure 8: Benchmark b - Relative errors for ' Stabilized 1 Stabilized 2 Reference t=0.1 Figure 9: Benchmark a - Compared relative errors for ~u10.110 100 Stabilized 1 Stabilized 2 Interpolation Figure 10: Benchmark a - Compared relative errors for ' compared with the best numerical solutions obtained for thickness 0.1. Similar errors for the rotations are plotted in Figures 10 and 12, with the corresponding interpolation errors. In the case of the arch benchmark, rotation errors remain essentially unchanged in Figure 10, but displacement errors now feature a more sensitive behaviour with Stabilized 1 Stabilized 2 Reference t=0.1 Figure Compared relative errors for ~u10.1 Stabilized 1 Stabilized 2 Interpolation Figure Compared relative errors for ' respect to the thickness parameter (Figure 9). However, this phenomenon is much more limited than the deterioration observed with the first stabilized method in the second benchmark. Furthermore, the numerical results obtained with this second stabilized method here still strikingly differ from the locking behaviour exhibited by the displacement-based method. Regarding the results obtained for the second example and displayed in Figures 11 and 12, we see that the second stabilized method provides significantly improved approximations for displacements as well as rotations. In partial conclusion to our numerical tests, it appears that, even though both stabilized methods give reasonably good results, the second one seems more promising in that it limits the sensitivity of convergence behaviours with respect to the thickness parameter in the two examples that we considered. This sensitivity is not completely ruled out, but it does not compare with a real locking behaviour such as the one displayed by the displacement-based method. A Appendix This section contains results of essentially geometric character that are used in the numerical analysis of the shell formulation. we start with a classical property of the first fundamental form (see e.g. [43]), the proof of which we give for completeness. Lemma A.1 There exist two strictly positive constants c and C such that, at any point of - \Omega and for any surface tensor j: c Consider the following function defined on R 2 \Theta - (j 7! a fffi (M)j ff Since a is the metric tensor of the surface, this function is strictly positive everywhere except when (j it is continuous since ~r is smooth. Define c and C as its minimum and maximum values on the compact set Hence c ? 0 and (A.1) holds. Then (A.2) immediately follows from the fact that the matrix (a fffi ) is the inverse of (a fffi ), so that they have inverse eigenvalues. we next establish a property regarding vectors orthogonal to curves which are images in S of straight lines in \Omega\Gamma This result enters as a crucial element in the stability of the proposed approximation schemes. Lemma A.2 Let C be an oriented straight segment in\Omega , - the unit tangent vector of ~r(C) in S, - the unit normal vector (- any two points on C, there exists a positive number i such that: Moreover, i lies in an interval [i I ; i S ], with i I ? 0, the bounds of which are independent of the specific segment considered. parametrization of C. Define: dx By the chain rule: and of course - equals ~ t up to a normalizing factor. Now let: so that ~ t \Delta positively oriented. Therefore - equals ~n up to a normalizing factor also, i.e.: be any two points on C. we infer: so that (A.3) holds. Moreover, from Lemma A.1 we have for any point M in \Omega\GammaC c Therefore: r c s c and setting i I = C and c , this completes the proof. we now establish an ellipticity property for tensor - Lemma A.3 For any symmetric tensor X at any point M in\Omega , we have: From the definition of - in section 4, we have: we can always construct, at least in a neighbourhood of M , a new coordinate system such that, at M , the covariant base vectors are orthogonal and of unit- length. we denote by ( ~ the components of X in this new coordinate system where no difference subsists between covariant and contravariant forms. Since tensor invariants are independent of the coordinate system considered, we have: ~ ~ Thus, from (A.6): since - 1 Acknowledgement Most of this work was performed while R. Stenberg was invited at INRIA by Professor M. Bernadou, under whose supervision D. Chapelle was pursuing his doctorate. Both authors are grateful to Professor Bernadou for giving them this opportunity, for several helpful discussions, and for his continuous support during this project. --R Discretization by finite elements of a model parameter dependent problem. Locking free finite elements for shells. A uniformly accurate finite element method for the Reissner-Mindlin plate model Mixed finite element methods for elastic rods of arbitrary geometry. M'ethodes d'El'ements Finis pour les Probl'emes de Coques Minces. Sur l'ellipticit'e du mod'ele lin'eaire de coques de Finite Elemente. Mixed and Hybrid Finite Element Methods. analysis of mixed-interpolated elements for Reissner-Mindlin plates Finite element analysis of shell structures. A locking-free approximation of curved rods by straight beam elements On the locking phenomenon for a class of elliptic problems. The Finite Element Method for Elliptic Problems. Analyse asymptotique des coques lin'eairement 'elas- tiques. I. Coques <Title>"membranaires" Analyse asymptotique des coques lin'eaire Approximation by finite element functions using local regulariza- tion Mod'elisation des Coques Minces Elastiques. A new finite element scheme for bending plates. analysis of some Galerkin-least-squares methods for the elasticity equations A new family of stable elements for nearly incompressible elasticity based on a mixed Petrov- Galerkin finite element formulation MODULEF, Guide n Theoretical Elasticity. What is C and Inequalities for the analysis and design of finite element methods. A new finite element formulation for computational fluid dynamics: VII. A mixed finite element formulation for Reissner-Mindlin plate theory: uniform convergence of all higher-order spaces A consistent first approximation in the general theory of thin elastic shells. Stability, convergence and accuracy of a new finite element method for the circular arch pro- blem Mixed Petrov- Galerkin methods for the Timoshenko beam In preparation. Stabilized MITC plate bending elements. A stable bilinear element for Reissner- Mindlin plates Foundations of elastic shell theory. Energy estimates relating different linear elastic models of a thin cylindrical shell. Energy estimates relating different linear elastic models of a thin cylindrical shell. Boundary subspaces for the finite element method with Lagrange multipliers. Analysis of some low-order finite element schemes for Mindlin- Reissner and Kirchhoff plates The problem of membrane locking in finite element analysis of cylindrical shells. Shell deformation states and the finite element method: a benchmark study of cylindrical shells. Introduction 'a l'Analyse Num'erique des Equations aux D'eriv'ees Partielles. Equilibre des Coques Elastiques Minces Inhomog Statique et dynamique des coques minces. Statique et dynamique des coques minces. analysis of some finite element methods for the Stokes problem. A new finite element formulation for the plate bending problem. An hp error analysis of MITC plate elements. A reduced constraint hp finite element method for shell problems. The Nonlinear Theory of Shells through Variational Principles. Mechanics of Solids with Applications to Thin Bodies. --TR --CTR Douglas N. Arnold , Franco Brezzi , L. Donatella Marini, A family of discontinuous Galerkin finite elements for the Reissner-Mindlin plate, Journal of Scientific Computing, v.22-23 n.1, p.25-45, June 2005 Douglas N. Arnold , Franco Brezzi , L. Donatella Marini, A Family of Discontinuous Galerkin Finite Elements for the Reissner--Mindlin Plate, Journal of Scientific Computing, v.22-23 n.1-3, p.25-45, January 2005 Jaroslav Mackerle, Finite- and boundary-element linear and nonlinear analyses of shells and shell-like structures A bibliography (1999-2001), Finite Elements in Analysis and Design, v.38 n.8, p.765-782, June 2002
stabilized methods;naghdi model;shells;finite element methods
305311
Convergence of Moment Methods for Linear Kinetic Equations.
Numerical methods for linear kinetic equations based on moment expansions for a discretization in the velocity direction are examined. The moment equations are hyperbolic systems which can be shown to converge to the kinetic equation as the order of the expansion tends to infinity and to a drift-diffusion model as the Knudsen number tends to zero. A discretization of the moment equations with respect to time and space is presented, a stability result is proven, and some aspects of an implementation are discussed. In particular, an adaptive procedure is described where the order of the expansion is determined locally. Results of numerical experiments are presented.
Introduction The numerical simulation of flows governed by macroscopic models in certain subdomains and by kinetic models in others, has received significant attention recently. Applications can be found in the fields of gas dynamics and semiconductor device simulation. One obvious approach to these problems is domain decomposition where finite difference or finite element methods are used for the macroscopic equations and particle methods for the kinetic equations. The coupling is performed by interface conditions. In the semi-conductor field this approach has been carried out for a particular application in [4]. Theoretical investigations can be found in [3]. The basic idea is that the kinetic model should be solved in the whole domain, however, the computationally much less expensive macroscopic model is sufficiently accurate in regions where scattering processes dominate. An alternative approach used in the semiconductor field is to extend the basic macroscopic model, the drift-diffusion model, by adding equations for higher order moments of the distribution function. The resulting models are known as the hydrodynamic semiconductor equations. Recently, efforts have been made to extend this idea in a systematic way. We mention expansions of the distribution function in terms of spherical harmonics [12] and a second approach [10] in the spirit of Grad's work [2] where an expansion procedure is applied to a transformed kinetic equation with an adaptively determined coordinate transformation. Here we are concerned with moment expansions of arbitrary order and with questions of stability and convergence. For the stability analysis it is of great help to formulate the expansions within the framework of Levermore's recent theory [6]. Our second emphasis is on the implementation of the moment methods. In particular, we want to demonstrate that a transition between macroscopic and kinetic regions can be performed by varying the order of the expansion. In section 2 the kinetic model and its basic properties are presented. It is a well known result that the drift-diffusion model is obtained in the limit where the Knudsen number (mean free path/characteristic length) tends to zero. The moment expansion procedure is presented in section 3. Section 4 contains stability and convergence results as the order of the expansion tends to infinity. In section 5 it is shown that the moment equations also reduce to the drift-diffusion model in the macroscopic limit. A semiimplicit time discretization and a space discretization for the one-dimensional case are presented in section 6. Finally, we discuss some further aspects of an implementation and present results from our solutions of a model problem in section 7. 2 The kinetic model We consider the nondimensionalized transport equation @t with the Knudsen number (ratio of the mean free path to a characteristic length) ", the electric potential \Phi(x; t) and a collision operator of the form Z R denotes the normalized Maxwellian and oe the collision cross section, assumed nonnegative and O(3)- invariant, i.e., oe(Rv; Rv 0 orthogonal matrix R. The prime in the above integral denotes evaluation at v 0 . We shall also need boundedness away from zero of the cross section, i.e., as well as boundedness of the scattering rate, i.e., Z The Boltzmann equation (2.1) models the transport of electrons in a semi-conductor crystal under the physical assumptions of a parabolic energy band and nondegeneracy. A further simplification is the positivity assumption (2.2) meaning that Q is a regularized version of physically relevant models. An important tool for the analysis of the Boltzmann equation is the following symmetry property [9]: Z Q(f)g dv Z f !/ This suggests the introduction of the Hilbert space with the corresponding inner product h\Delta; \Deltai H and norm k\Deltak H . Essentially all the important properties of Q can be deduced from (2.4) [9]: Lemma 2.1 Assume (2.2), (2.3). Then Q is a bounded operator on H. Also . The orthogonal projection of H onto kern Q is given by R and the following coercivity estimate holds for any f 2 H: The initial value problem for the Boltzmann equation is considered where holds for (x; v; subject to the initial conditions For the initial datum we require The electric potential \Phi(x; t) is considered given and satisfying Then, by standard transport theory, the problem (2.1), (2.6) has a unique mild solution f 2 C([0; 1);H). An estimate for the solution is obtained by taking the scalar product (in H) of the Boltzmann equation (2.1) with f , then multiplying by e \Gamma\Phi and integrating with respect to x: dt Z e \Gamma\Phi kfk 2 Z e \Gamma\Phi hQ(f); fi H dx e \Gamma\Phi @ \Phi @t The semidefiniteness of Q and the Gronwall lemma imply @ \Phi @t The significance of this estimate is in its uniformity with respect to ". In the converges to %(x; t)M(v), where % solves an initial value problem for the drift-diffusion equation [9]: @% @t Z f I (x; v)dv ; (2.11) where the mobility is given by Z The fact that the drift-diffusion model is isotropic (i.e., the mobility is a scalar) is a consequence of the O(3)-invariance of the collision cross section. 3 The Method By Lemma 2.1 f 2 =(2M) is an entropy density for the Boltzmann equation (2.1). Then, by Levermore's results [6], a moment method with favourable properties is obtained in the form of a Galerkin method with trial functions of the form ' k test functions m k (v). Here we also assume m 0 such that the equilibrium distributions are contained in the trial space, and that f' k g is a complete orthonormal system in H. Thus, the orthogonality relations Z hold. Furthermore, we assume that the ' k are smooth and that they vanish at infinity, i.e., ' k (v) ! 0 as jvj !1. An example for the choice of the m k are Hermite polynomials (see [2]). For we approximate the solution of (2.1), (2.6) by fK (x; v; where the coefficient vector ff satisfies hL(ff \Delta This system of equations can be written in the form @t "A i @ff @ \Phi where the summation convention has been used and the elements of the matrices A i , B i and C are given by @' l The initial values of the components of ff are the Fourier coefficients of the initial datum for f : We collect some properties of the coefficient matrices: Lemma 3.1 For 3, the matrix A i is symmetric, the first line of B i vanishes and B i +B tr holds. The matrix C is symmetric and has the . ~ with ~ negative definite. Proof: The symmetry of the A i is obvious. The elements of the first lines of the B i are @' l @' l Integration by parts gives Z @' l Z dv The symmetry of C follows from (2.4). The elements of the first line are Z and, by symmetry, also the first column of C vanishes. Given a vector we shall in the following use the notation ~ . The orthogonality of the ' k implies 2.1 we have ~ ff tr ~ 4 Stability and Convergence By the symmetry of the A i , (3.1) is a symmetric hyperbolic system and existence and uniqueness of a solution of (3.1), (3.2) follows from standard results [7]. An equation analogous to (2.9) for the moment system is obtained by taking the scalar product of (3.1) with e \Gamma\Phi ff and integrating with respect to x: dt Z Z e \Gamma\Phi ff tr e \Gamma\Phi @ \Phi @t Here we denote by j \Delta j the Euclidean norm of vectors. Observing that I (x; \Delta)k H hold, we have analogously to (2.10) @ \Phi @t Note that this estimate is uniform both in terms of " and K. We collect our results: Theorem 4.1 With the assumptions of section 1 the problem (3.1), (3.2) has a unique solution ff satisfies (4.2) for every t - 0. For a convergence result as K ! 1 some smoothness of the solution of the Boltzmann equation is needed. We therefore make additional assumptions on the initial data, and on the collision cross section, Z Z Lemma 4.1 Assume (2.2), (2.3), (2.7), (2.8), (4.3), (4.4), and (4.5) hold. Then for the solution of (2.1), (2.6) we have Proof: We introduce the notation . Formal differentiation of the Boltzmann equation with respect to x i and v i gives @t @t @ Z @oe Z We consider (4.6), (4.7) as a system of 6 transport equations for subject to the initial conditions 3: (4.9) We intend to show that the right hand side of (4.6), (4.7) is the sum of an element of (C([0; 1); H)) 6 and a linear, bounded (on H) operator applied to F . For the right hand side of (4.6) this follows directly from Lemma 2.1 and (2.8). Consider the operator ~ defined by ~ R @oe In the same way as assumption (2.3) implies boundedness of Q, (4.5) implies boundedness of ~ Q on H. Thus, by (2.10), ~ holds. The same holds for the second term on the right hand side of (4.8) by the estimate (Cauchy-Schwarz inequality) Z Z 'Z dv Z Z and assumption (4.4). The last term in (4.8) is taken care of by assumption (2.3). We conclude that a unique mild solution F 2 (C([0; 1); H)) 6 of problem (4.6), (4.7), (4.9) exists. A standard argument shows that the components of F are the weak derivatives of the solution of (2.1), (2.6). We shall give a convergence result as K ! 1 for the case that the functions m k are polynomials. Let denote the one-dimensional Hermite polynomial of order k [1], normalized such that Then the functions are a complete orthonormal system in H. In the following we shall need the leading order coefficients: We shall consider the moment method where f(x; v; t) is approximated by m=0 ff klm (x; t)' klm (v). Theorem 4.2 With the assumptions of Lemma 4.1 there exist sequences of integers such that for the moment method with Hermite po- lynomials, fKnLnMn converges to the solution f of (2.1), (2.6) in C([0; T as n !1 for every T ? 0. Proof: We introduce the projection the system f' klm g is complete, tends to zero in C([0; T 1. Writing the error in the moment method as r klm (x; t)' klm it remains to prove that jrj tends to zero in C([0; T ]; L 2 (IR 3 )). We compute This is an inhomogeneous version of (3.1) for r. We also have Taking the scalar product of (4.11) with e \Gamma\Phi r and integrating with respect to x gives (compare to (4.1)) dt Z @ \Phi @t Z e \Gamma\Phi jrj 2 dx Z After a lengthy but straightforward computation using (4.10) we obtain s @f s @f s @f For the last term we have 'Z 'Z Z Z and the first factor on the right hand side tends to zero as minfK; L; Mg ! 1. By Lemma 4.1 we haveX Z @f This implies that for a sequence K n !1 Z @f holds. Analogously, sequences L can be found such that Z @f Z @f We conclude that the last term in (4.12) can be estimated by Z 'Z e \Gamma\Phi jrj 2 dx with lim sup Applying the Gronwall lemma to (4.12) gives the desired result. 5 The drift-diffusion limit Before carrying out the macroscopic limit " ! 0 in the moment system we rewrite (3.1) in terms of new variables introduced by @% @t @ @t @ \Phi ~ 'i H @% @ \Phi with obtained from A i , by deleting the first rows and columns. Theorem 5.1 With the assumptions of section 1, fK converges to %KM in loc ((0; 1);H) weak* as " ! 0, where %K solves the drift-diffusion problem (2.11) with the mobility tensor 'i tr ~ Proof: From the uniform estimate (4.2) weak* convergence of fK , and therefore also of %, for a suitable subsequence is immediate. From (4.1) and the coercivity of ~ C we obtain a uniform estimate for fi and, thus, also weak* convergence for a further subsequence. The drift-diffusion problem for the limit of % follows from going to the limit in (5.1) and (5.2) in the sense of distributions. From the negative definteness of ~ C and formula (5.3) it is immediate that positive semidefinite. Since standard results for parabolic equations imply uniqueness of the solution of the limiting problem, convergence is not restricted to subsequences. A few words have to be said about the mobility tensor. First, it is an approximation for the exact, isotropic mobility from section 1, determined by using the moment expansion method for computing approximations h iK 2 of the functions h This has the solution '(v) tr ~ Now we compute Z 'i tr ~ The exact mobility is obtained whenever the h i are members of the orthogonal system f' k g. A second comment is that the approximating mobility tensor can itself be made isotropic by choosing the approximating subspaces O(3)-invariant, a requirement also formulated in [6]. Lemma 5.1 The mobility tensor (5.3) converges to the mobility defined by (2.12) as K !1. Proof: Denoting by \Pi K the orthogonal projection of H onto span(' we write the error in h i as The first term on the right hand side tends to zero in H because of h and the completeness of the orthonormal system. We also have From the coercivity of Q (or of ~ C) follows implying convergence of h iK to h i in H by the continuity of Q. Convergence of the mobility is an immediate consequence. 6 Time and Space Discretization For a numerical implementation the problem (3.1), (3.2) has to be discreti- zed. Finding an efficient discretization is nontrivial since the stiffness of the problem goes to infinity both for " ! 0 and for K !1. Here we concentrate on the stiffness caused by smallness of ". First we want to make a general statement about the numerical solution of problems parameter ". If the numerical method creates a problem P ";N where N is a measure for the numerical effort, then an efficient method should satisfy the requirement that the limits " carried out in P ";N commute. Assuming that the method is convergent for fixed means that P 0;N is a convergent method for the limiting problem P 0 . This property is an indication that the solution of the problem with small " can be approximated with a numerical effort remaining bounded as " ! 0. For stiff problems implicit time discretizations typically satisfy the above requirement whereas explicit discretizations do not. Since particle methods (Monte Carlo methods as well as deterministic particle methods) lead to explicit discretizations they are inefficient for small Knudsen numbers. The results of the preceding section show that the moment expansion method satisfies the above requirement. However, because of the stiffness this property can easily be destroyed by the discretization of the moment system. In particular, discretizations explicit in time would suffer from the same drawbacks as particle methods. The use of implicit discretizations on the other hand seems to be out of the question because of the size of the linear systems to be solved in this case. In the following we present a semiimplicit discretization with respect to time having the property that it reduces to a standard implicit discretization of the drift-diffusion equation in the macroscopic limit. Afterwards a space discretization for the one-dimensional case will be given. We discretize the moment system in the form (5.1), (5.2) in time by evaluating the terms on the right hand side at the new time step and the transport terms on the left hand side of (5.2) at the old time step. Introducing the time step \Deltat and t n\Deltat, we set \Phi n and fi(x; t n ) by % n (x) and fi n (x), respectively. Then the semidiscretization with respect to time is given by\Deltat @ 'i \Deltat @ \Phi n+1 ~ 'i @% n+1 From the formal limit as " ! 0 the variable fi n+1 can be eliminated because of the nonsingularity of ~ C. The result is the implicit Euler discretization of the drift-diffusion equation (2.11) with the mobility (5.3). The one-dimensional version of (6.1), (6.2) reads\Deltat @ @x 'i \Deltat A @x @ \Phi n+1 @x ~ 'i @% n+1 @x @x For the space discretization we use upwinding (see, e.g., [5]) for the transport terms in (6.4) and the Scharfetter-Gummel discretization (see, e.g., [8]) for the drift-diffusion flux @x @x We introduce x respectively. The discrete equations read\Deltat 'i \Deltat 'iJ n+1 with (B(\Phi n+1 and ~ ~ where \Phi n z \Gamma1 is the Bernoulli function, and ~ ~ A \Gamma is the standard decomposition of a symmetric matrix into matrices with nonnegative and, respectively, negative eigenvalues. The Scharfetter- Gummel discretization (6.8) of (6.5) is obtained by approximating J n+1 and @ \Phi n+1 @x in (6.5) by constants and explicitly solving the resulting ODE for % n+1 . It is an example of an exponentially fitted discretization and provides automatic upwinding if the convection term in (6.5) dominates. The stability result at the end of this section shows that upwinding and the Scharfetter- Gummel discretization are reasonable choices. For the optimal resolution of sharp fronts, however, more sophisticated discretizations (such as, e.g., ENO methods [11]) might be preferable. The system (6.6), (6.7) can be rewritten by eliminating fi n+1 'i with 'i tr \Deltat and \Deltat fi n For every time step the following computations have to be carried out: For j+1=2 at every point of the spatial grid a linear system with the symmetric, positive definite coefficient matrix " 2 \Deltat C has to be solved and an additional system for the computation of - -. Then the density is computed by solving a linear system of the size of the spatial grid. Finally, we check the property mentioned at the beginning of this section: Obviously, as " ! 0, the above system reduces to a standard discretization of the drift-diffusion equation commonly used in device simulation software. We conclude this section with an unconditional stability result for the discrete system for coarse spatial grids and time independent electric potential. We shall need the norms and an according definition of k% n k, where fi n j+1=2 is replaced by % n . Theorem 6.1 Assume the potential is time independent and uniformly bo- unded, i.e., \Phi n . Then there are positive constants - and c (independent of ", h and \Deltat) such that for " sup holds for the solution of (6.6)-(6.8). Proof: We define an interpolated value of e \Gamma\Phi between grid points by Now we multiply (6.6) by e \Gamma\Phi j % n+1 and (6.7) by (e \Gamma\Phi ) j+1=2 fi n+1 j+1=2 , add the resulting equations and sum over j:\DeltatX \DeltatX After using the inequality u in the first two sums, we multiply by \Deltat, sum from use the obvious estimate and the negative definitness of ~ C: e \GammaM k% N e \GammaM oe This implies the result of the theorem with and an appropriately chosen value of c. 7 Implementation and Numerical Results Our main motivation for considering moment methods are problems with both kinetic and macroscopic regions. Recently, strategies for the numerical solution of such problems have been developped [3], [4] where interfaces between macroscopic and kinetic regions are introduced. Then the discretized drift-diffusion equation is solved in the macroscopic regions and a particle method is used in the kinetic regions. A major issue in this approach is the derivation of appropriate coupling conditions at the interfaces. The moment expansion method considered in this work allows for a gradual transition between macroscopic and kinetic regions by varying the order of the expansion locally in space and time. In the implementation described below this is done adaptively by a heuristic procedure. Theoretically motivated error estimators still have to be developped. Another implementation issue is the time step selection. It is subject to accuracy as well as stability considerations. Since both the space and time discretization are first order accurate, time steps of the same order of magnitude as grid spacings seem to be reasonable from the accuracy point of view, at least in the absence of appropriate estimators for the discretization error. As far as stability is concerned, the result of the previous section shows that time step limitations can only occur for O(") (or finer) grid spacings. In this case, the discrete transport operator T h becomes important and we expect a CFL condition (see [5]) for the time step. A quantitative criterion for the time step selection is derived from the scalar model equation @t @x with This is a hyperbolic equation with a strong relaxation term on the right hand side and a caricature of (5.2). Without loss of generality we assume a ? 0 and, thus, the discretized version is \Deltat We perform a von Neumann stability analysis (see [5]). A simple computation shows that u n solves (7.2). The stability criterion j-j - 1 is satisfied if either Case 1: 2"a \Gammac and \Deltat - or Case 2: h - 2"a Case 1 corresponds to a fine spatial grid O(")). The restriction for the time step is a relaxed version of the CFL-condition for the case without the relaxation term. Case 2 corresponds to the result of the previous section. The stability analysis for the scalar equation (7.1) cannot be rigorously applied to our discretization of the system (5.2) since in general the matrices ~ A and ~ C cannot be diagonalized simultaneously. Also the effect of the electric field term of (5.2) is not present in (7.1). However, the above analysis is used for the time step control in the implementation described below with satisfactory results. The stability criterion is checked with a replaced by the eigenvalue with largest modulus of ~ A and \Gammac replaced by the smallest eigenvalue of \Gamma ~ C. We solved Ringhofer's test problem [10], which is one-dimensional in space with periodic boundary conditions. The collision operator is the relaxation time approximation with oe(v; v 0 const. In this case the Boltzmann equation has solutions of the form f(x 3 , where f solves a one-dimensional (in both position and velocity) Boltzmann equation. We have used the moment method with one-dimensional Hermite polynomials for the and the Lax-Friedrichs discretization (see [5]) of the transport term instead of upwinding (thus avoiding the decomposition ~ The time independent potential forms a well in the right part of the in- terval, and the initial datum is a concentration of electrons in the left part of the interval with a distribution in local thermal equilibrium. As the solution converges to an equilibrium distribution with the electrons concentrated in the potential well. The evolution of the density is shown in Fig. 7.1. Fig. 7.2 contains a comparison of computed results at the drift-diffusion model and the moment method with different orders. The kinetic solutions differs strongly from the drift-diffusion solution. Reasonable accuracy can already be achieved with order Finally, we have implemented an adaptive method where the order of the moment expansion is chosen individually for every grid point in space and time. Fig. 7.3 shows the evolution of the orders. Note that the order is automatically reduced to the minimal value (drift-diffusion model) as the solution converges to an equilibrium distribution for t !1. This shows that an automatic transition between macroscopic and kinetic regions is possible. In the presented example the adaptive procedure reduces the computational effort by a factor of 4 as compared to the use of the maximal order throughout the computation. Figure 7.1: Electron density vs position and time, K=8 K=24 K=32 drift-diffusion x Figure 7.2: Electron density vs position at time the drift-diffusion model and the moment expansion with different orders K. order Figure 7.3: Adaptive order of the moment expansion vs position and time. --R On the kinetic theory of rarefied gases Simulation des Ladungstransportes in elektronischen Bau- elementen mit Hilfe der Monte-Carlo-Methode Numerical Methods for Conservation Laws Moment closure hierarchies for kinetic theories Compressible Fluid Flow and Systems of Conservation Laws in Several Space Dimensions The Stationary Semiconductor Device Equations Diffusion approximation of the linear Boltzmann equation: Analysis of boundary layers An expansion method for the Boltzmann transport equation using an adaptive Galerkin procedure Efficient implementation of essentially non-oscillatory shock capturing schemes Multidimensional spherical harmonics expansion of Boltzmann equation for transport in semi- conductors --TR --CTR Matthias K. Gobbert , Timothy S. Cale, A kinetic transport and reaction model and simulator for rarefied gas flow in the transition regime, Journal of Computational Physics, v.213
moment expansion;semiconductors;kinetic equations
305323
Preserving Symmetry in Preconditioned Krylov Subspace Methods.
We consider the problem of solving a linear system A when A is nearly symmetric and when the system is preconditioned by a symmetric positive definite matrix M. In the symmetric case, we can recover symmetry by using M-inner products in the conjugate gradient (CG) algorithm. This idea can also be used in the nonsymmetric case, and near symmetry can be preserved similarly. Like CG, the new algorithms are mathematically equivalent to split preconditioning but do not require M to be factored. Better robustness in a specific sense can also be observed. When combined with truncated versions of iterative methods, tests show that this is more effective than the common practice of forfeiting near-symmetry altogether.
Introduction Consider the solution of the linear system by a preconditioned Krylov subspace method. Assume at first that A is symmetric positive definite (SPD) and let M be an SPD matrix that is a preconditioner for the matrix A. Then one possibility is to solve either the left-preconditioned system This work was supported by the NSF under contract NSF/CCR-9214116, by the ONR under contract ONR-N00014-92-J-1890, and by the ARO under contract DAAL-03-9-C-0047 (Univ. of Tenn. subcontract ORA 4466.04, Amendment 1 and 2). y Department of Mathematics, University of California Los Angeles, 405 Hilgard Avenue, Los Angeles, California, 90095-1555 (chan@math.ucla.edu and myeung@math.ucla.edu). z Department of Computer Science and Minnesota Supercomputer Institute, University of Minnesota, 4-192 EE/CSci Bldg., 200 Union St., S.E., Minneapolis, Minnesota, 55455-0154 (chow@cs.umn.edu and saad@cs.umn.edu). or the right-preconditioned system Both of these systems have lost their symmetry. A remedy exists when the preconditioner M is available in factored form, e.g., as an incomplete Choleski factorization, in which case a simple way to preserve symmetry is to 'split' the preconditioner between left and right, i.e., we could solve which involves a symmetric positive definite matrix. This can also be done when M can be factored as . Unfortunately, the requirement that M be available in factored forms is often too stringent. However, this remedy is not required. As is well-known, we can preserve symmetry by using a different inner product. Specifically, we observe that M \Gamma1 A is self-adjoint for the M-inner product, since we have If we rewrite the CG-algorithm for this new inner product, denoting by r the original residual and by z the residual for the preconditioned system, we would obtain the following algorithm, see, e.g., [4]. Algorithm 1.1 Preconditioned Conjugate Gradient 1. Start: Compute 2. Iterate: For convergence do, (a) (b) x (c) r (d) z Note that even though M-inner products are used, we do not need to multiply by M which may not be available explicitly; we only need to solve linear systems with the matrix co-efficient M . It can also be seen that with a change of variables, the iterates produced by this algorithm are identical to both those of CG with split preconditioning, and CG with right-preconditioning using the M \Gamma1 -inner product. All three of these algorithms are thus equivalent. The question we now raise is the following. When A is only nearly symmetric, it is often the case that there exists a preconditioner M which is SPD. In this situation, the use of either of the forms (2) or (3) is just as unsatisfactory as in the fully symmetric case. Indeed, whatever degree of symmetry was available in A is now entirely lost. Although the above remedy based on M-inner products is always used in the symmetric case, it is rather surprising that this problem is seldom ever mentioned in the literature for the nearly symmetric case. In the nonsymmetric case, when M exists in factored form, some form of balancing can also be achieved by splitting the preconditioner from left and right. However, there does not seem to have been much work done in exploiting M-inner products even when M is not available in factored form. This dichotomy between the treatment of the symmetric and the nonsymmetric cases is what motivated this study. Ashby et. al. have fully considered the case of using alternate inner products when the matrix A is symmetric. Work of which we are aware that consider the use of alternate inner products when A is near-symmetric are Young and Jea [9] and Meyer [5]. In the latter, the product (with M SPD) is used with ORTHOMIN and ORTHODIR. This paper is organized as follows. In Section 2, it is shown how alternative inner products may be used to preserve symmetry in GMRES. Section 3 considers the use of truncated iterative methods when the preconditioned system is close to being symmetric. This has been hypothesized by many authors, for example, Axelsson [2] and Meyer [5]. In Section 4 we consider the symmetrically preconditioned Bi-CG algorithm. Section 5 tests these algorithms numerically using a Navier-Stokes problem parameterized by the Reynolds number, and thus nearness to symmetry. We conclude this paper in Section 6. preconditioning in GMRES When A is nearly symmetric, split preconditioning may be used to preserve the original degree of symmetry. Alternatively, left-preconditioning with the M-inner product, or right- preconditioning with the M \Gamma1 -inner product may be used. These latter two alternatives will be developed for the Arnoldi process, and used as the basis of 'symmetric' preconditioned versions of GMRES. Like CG, it will be shown that these symmetric versions are mathematically equivalent to split preconditioning, but do not require the preconditioner to be symmetrically factored. We begin by exploring the options and implementation issues associated with left symmetric preconditioning. 2.1 Left symmetric preconditioning The GMRES algorithm is based on the Arnoldi process. Without preconditioning, the Arnoldi algorithm based on the classical Gram-Schmidt process is as follows. Algorithm 2.1 Arnoldi-Classical Gram-Schmidt 1. Choose a vector v 1 of norm 1. 2. For 3. 4. Compute 5. 7. If h 8. 9. EndDo Consider here the case when A is left-preconditioned, i.e., the matrix A involved in the algorithm is to be replaced by some preconditioner, which we assume to be SPD. We wish to define a procedure to implement the above algorithm for the using M-inner products, and if possible, avoid additional matrix-vector products, e.g., with M . Once this is accomplished, we will define the corresponding GMRES procedure. In the preconditioned case, it is customary to define the intermediate vectors in the product which is then preconditioned to get We now reformulate the operations of the above algorithm for with the M-inner product. Only the computation of the inner products changes. In the classical Gram-Schmidt formulation, we would first compute the scalars h ij in Line 4 of Algorithm 2.1, Then we would modify the vector z j to obtain the next Arnoldi vector (before normalization), To complete the orthonormalization step we must normalize the final " z j . Because of the M-orthogonality of " z j versus all previous v i 's we observe that Thus, the desired M-norm can be computed according to (9) and then computing One potentially serious difficulty with the above procedure is that the inner product as computed by (9) may be negative in the presence of round-off. There are two remedies. First, we can compute this M-norm explicitly at the expense of an additional matrix-vector multiplication with M , i.e., from As was pointed out earlier, this is undesirable, since the operator M is often not available explicitly. Indeed in many cases, only the preconditioning operation M \Gamma1 is available from a sequence of operations, as is the case for multigrid preconditioning. Another difficulty with computing h ij with (7) is that it is not immediately amenable to a modified Gram-Schmidt implementation. Indeed, consider the first step of a hypothetical modified Gram-Schmidt step, which consists of M-orthonormalizing z against v 1 , As was observed, the inner product (z; is equal to (w; v 1 ) which is computable. Now we need M " z to compute in the modified Gram-Schmidt process. However, no such vector is available, and we can only compute the (z; v i ) M of classical Gram-Schmidt. An alternative is to save the set of vectors Mv i (again, not computed by multiplying by M) which would allow us to accumulate inexpensively both the vector " z j and the vector " via the relation which is obtained from (8). Now the inner product ("z is given by In this form, this inner product is guaranteed to be nonnegative as desired. This leads to the following algorithm. Algorithm 2.2 Arnoldi-Classical Gram-Schmidt and M-inner products 1. Choose a vector w 1 such that v has M-norm 1. 2. For 3. 4. Compute 5. " w . As is noted, the above algorithm requires that we save two sets of vectors: the v j 's and the w i 's. The v i 's form the needed Arnoldi basis, and the w i 's are required when computing the vector " w j in Line 5. If we do save these two sets of vectors we can also now easily formulate the algorithm with the modified Gram-Schmidt version of the Arnoldi procedure. Algorithm 2.3 Arnoldi-Modified Gram-Schmidt and M-inner products 1. Choose a vector w 1 such that v has M-norm 1. 2. For 3. 4. For 5. 7. EndDo 8. 9. h 11. 12. EndDo 2.2 Right symmetric preconditioning The matrix AM \Gamma1 is self-adjoint with the M \Gamma1 -inner product. The situation for right- preconditioning with this inner product is much simpler, mainly because M \Gamma1 z is available when z needs to be normalized in the M \Gamma1 norm. However, M \Gamma1 z is normally computed at the next iteration in the standard Arnoldi algorithm; a slight reorganization of the Arnoldi- Modified Gram-Schmidt algorithm yields the following. Algorithm 2.4 Arnoldi-Modified Gram-Schmidt and M \Gamma1 -inner products 1. Choose a vector v 1 of M \Gamma1 -norm 1, compute w 2. For 3. 4. For 5. 7. EndDo 8. Note that the preconditioned vector is computed in Line 8, while in the standard algorithm it is computed before Line 3. Again, both the v's and the w's need to be saved, where in this case. The additional storage of the w's, however, makes this algorithm naturally `flexible,' i.e., it accommodates the situation where M varies at each step as when M \Gamma1 v is the result of some unspecified computation. If M \Gamma1 is not a constant operator, then a basis for the right-preconditioned Krylov subspace cannot be constructed from the v's alone. However, the vectors w do form a basis for this subspace, where M \Gamma1 denotes the preconditioning operation at the j-th step. The use of this extra set of vectors is exactly how the standard flexible variant of GMRES is implemented [6]. 2.3 Using M-inner products in GMRES The vectors v i form an orthonormal basis of the Krylov subspace. In the following we denote by the matrix whose column vectors are the vectors v i produced by the Arnoldi-Modified Gram-Schmidt algorithm with M-inner products (Algorithm 2.3). A similar notation will be used for the matrix Wm . We also denote by Hm the (m+1) \Theta m upper Hessenberg matrix whose nonzero entries h ij are defined by the algorithm. Hm denotes the portion of Hm . These matrices satisfy a number of relations similar to the ones obtained from using the standard Euclidean inner product. Proposition 2.1 The following properties are satisfied by the vectors v i and w i in Algorithm 2.3: Hm , 2. Hm , 3. V T 4. W T 5. If A is Hermitian then Hm is Hermitian and tridiagonal. Consider now the implementation of a GMRES procedure based on the orthogonalization process of Algorithm 2.3. Since we are using M-inner products we should be able to minimize the M-norm of the residual vectors M all vectors of the affine subspace where z as the first coordinate vector. Then we have, Hm y Therefore we have the equality, Hm A result of the equality (12) is that we can minimize the M-norm of the (preconditioned) residual vector M \Gamma1 (b\GammaAx) by simply minimizing the 2-norm of fie 1 \gamma Hm y as in the standard GMRES algorithm. Algorithm 2.5 Left-preconditioned GMRES with M-inner products 1. Compute 2. For 3. 4. For 5. 7. EndDo 8. 9. h 11. 12. EndDo 13. Compute the minimizer y m of kfie 1 \gamma 14. Compute the approximate solution 15. If satisfied Stop; else set x An equality similar to (12) can be shown for the right-preconditioned case with M inner products. We can summarize with the following theorem, which we state without proof. Theorem 2.1 The approximate solution xm obtained from the left-preconditioned GMRES algorithm with M-inner products minimizes the residual M-norm kM \Gamma1 (b \gamma Ax)kM over all vectors of the affine subspace x 0 +Km in which where z . Also, the approximate solution xm obtained from the right-preconditioned GMRES algorithm with M \Gamma1 -inner products minimizes the residual M \Gamma1 -norm kb over the same affine subspace. 2.4 Equivalence of the algorithms We can show that both left and right symmetric preconditioning are mathematically equivalent to split preconditioning. In the latter case, M must be factored into and we solve Denoting by B the preconditioned matrix the GMRES procedure applied to the above system for the u variable, minimizes the residual norm, over all vectors u in the space u 0 +K (u) m with in which ~ Note that the variables u and x are related by As a result, this procedure minimizes over all x in the space x 0 +K (x) m with We now make the following observation. For any k 0 we have, where z . Indeed, this can be easily proved by induction. Hence, the space K (x) m is identical with the space which is nothing but (13). In noting that we have proved the following result. Theorem 2.2 Let . Then the approximate solution obtained by GMRES applied to the split preconditioned system (14) is identical with that obtained from the GMRES algorithm for the left preconditioned system (2) using the M-inner product. Again, the same statement can be made about right-preconditioning. All that must be noticed is that the same minimization (16) is taking place, and that the minimization is over the same subspace in each of the left, right, and split preconditioning options [7, Sec. 9.3.4]. We emphasize in particular that it is the split preconditioned residual that is minimized in all three algorithms. 3 Truncated iterative methods Truncated iterative methods are an alternative to restarting, when the number of steps required for convergence is large and the computation and storage of the Krylov basis becomes excessive. When A is exactly symmetric, a three-term recurrence governs the vectors in the Arnoldi process, and it is only necessary to orthogonalize the current Arnoldi vector against the previous two vectors. If A is nearly symmetric, an incomplete orthogonalization against a small number of previous vectors may be advantageous over restarted methods. The advantage here may offset the cost of maintaining the extra set of vectors to maintain the initial degree of symmetry. The incomplete Arnoldi procedure outlined below stores only the previous k Arnoldi vectors, and orthogonalizes the new vectors against them. It differs from the full Arnoldi procedure only in Line 4, which would normally be a loop from 1 to j. It can be considered to be the full Arnoldi procedure when k is set to infinity. Algorithm 3.1 Incomplete Arnoldi Procedure 1. Choose a vector v 1 of norm 1. 2. For do 3. 4. For do 5. 7. EndDo 8. h 9. If h 11. EndDo The truncated version of GMRES uses this incomplete Arnoldi procedure and is called Quasi-GMRES [3]. The practical implementation of this algorithm allows the solution to be updated at each iteration, and is thus called a 'direct' version, or DQGMRES [8]. To suggest that truncated iterative methods may be effective in cases of near symmetry, we study the asymptotic behavior of the iterates of DQGMRES as the coefficient matrix A varies from nonsymmetry to (skew) symmetry. We first decompose A as in which S is symmetric or skew symmetric, and set We will first establish asymptotic relations among the variables in the incomplete and full Arnoldi procedures. Then we will apply the incomplete procedure to A, and the full procedure to S, using the superscripts I and F to distinguish between the variables appearing in the two procedures. (Note that since S is (skew) symmetric, the full procedure on S is the same as the incomplete procedure with k 2.) Moreover, if we denote the degree of the minimal polynomial of v F 1 with respect to S by , then h F . In the proof of the following lemma, we also use " v I j to denote the vectors w I and w F obtained at the end of Line 7 in the incomplete and complete Arnoldi procedures. Lemma 3.1 Assume the truncation parameter k 2. If v I h I Proof. The proof is by induction on the index j. By Lines 5 and 6 of the Arnoldi procedure, h I we have h I and hence the lemma holds for 1. Assume that the lemma has been proved for On that hypothesis, we prove it for of the Arnoldi procedure, I =h I which yields that I by the induction hypothesis. Therefore for the w I and w F in Line 3 of the Arnoldi procedures. Using another induction on the index i in Lines 5 and 6, and the induction hypothesis on j and, in the mean time, noting that h I for From the last equation, h I and then the induction step is complete. QED. We now turn to the DQGMRES algorithm. Consider the linear system and denote by x G m and x Q m the approximate solutions by the GMRES and DQGMRES algo- rithms, respectively. Let be the degree of the minimal polynomial of the vector b \gamma Sx 0 with respect to S. A result of the lemma can be stated as follows. Theorem 3.1 Given the same initial guess x 0 to GMRES and DQGMRES with k 2, then at any given step m with Proof. By the definitions of DQGMRES and GMRES, we have H I H I H I and where (b (b we have by the lemma, H I and therefore the desired equation holds. QED. If we let xA be the exact solution to be the exact solution to it is obvious that O("). Since, on the other hand, x G immediately have the following corollary. Corollary 3.1 For any initial guess x 0 and any k 2, The corollary suggests that we may use DQGMRES with small k when A is nearly symmetric or nearly skew symmetric. 4 Symmetric preconditioning in Bi-CG The Bi-CG algorithm is based on Lanczos biorthogonalization. Both left-symmetric and right-symmetric preconditioning are relatively straightforward, and no extra vectors are re- quired. For reference, Algorithm 4.1 gives the right-preconditioned Bi-CG algorithm with preconditioner M . The symmetric right-preconditioned Bi-CG algorithm (right-preconditioned using M \Gamma1 -inner products) is developed immediately afterward. Algorithm 4.1 Right-preconditioned Bi-CG 1. Compute 0 such that (r 2. 3. For convergence Do: 4. ff 5. x 6. r 7. r 8. 9. 11. EndDo Note in Line 7 of the above algorithm that the preconditioned coefficient matrix of the dual system is (AM the dual residual r is the residual of which is a left-preconditioned version of some linear system with A T . To develop the symmetric right-preconditioned Bi-CG, M \Gamma1 -inner products are used in Algorithm 4.1 above. However, the preconditioned coefficient matrix of the dual system must be the adjoint of AM \Gamma1 in the M \Gamma1 inner product. This is A T M \Gamma1 as shown by The dual system thus involves the coefficient matrix A T M \Gamma1 . Algorithm 4.2 gives the symmetric right-preconditioned Bi-CG algorithm with preconditioner M . Algorithm 4.2 Right-preconditioned Bi-CG with M \Gamma1 -inner products 1. Compute 0 such that (M \Gamma1 r 2. 3. For convergence Do: 4. ff 5. x 6. r 7. r 8. 9. 11. EndDo Like GMRES, both left and right symmetric preconditioned versions of Bi-CG are equivalent to the split preconditioned version, and this can be shown by a change of variables. However, in both left and right symmetric preconditioned versions, the exact, rather than the split preconditioned residual is available. The unpreconditioned Bi-CG algorithm cannot have a serious breakdown if A is SPD and r 0 is chosen to be r 0 . This is because r and the vectors Ap never become orthogonal. In fact, the cosine can be bounded below by the reciprocal of the condition number of A. Similarly, in the symmetric right-preconditioned version of Bi-CG, if both A and M are SPD, and r We measure the cosines rather than the quantities (Ap because the and r vectors have magnitudes going to 0 as the algorithms progress. Recall that in the case when (M we have a lucky breakdown. For the case of regular right- or left-preconditioning, or if r in the symmetrically preconditioned cases, then no such lower bounds as the above exist, and the algorithms are liable to break down. When A is near-symmetric, it is our hypothesis that the probability of breakdown is lower in the symmetrically preconditioned cases, and this will be shown by experiment in the next section. 5 Numerical Experiments Section 5.1 tests the idea of using symmetric preconditionings with truncated iterative meth- ods. Section 5.2 tests the breakdown behavior of symmetrically preconditioned Bi-CG. 5.1 Truncated iterative methods To test the idea of using symmetric preconditionings with truncated iterative methods for nearly symmetric systems, we selected a standard fluid flow problem where the degree of symmetry in the matrices is parameterized by the Reynolds number. The flow problem is the two-dimensional square-lid driven cavity, and was discretized by the Galerkin Finite Element method. Rectangular elements were used, with biquadratic basis functions for velocities, and linear discontinuous basis functions for pressure. We considered a segregated solution method for the Navier-Stokes equations, where the velocity and pressure variables are solved separately; the matrices arising from a fully-coupled solution method are otherwise indefinite. In particular, we considered the expression of the conservation of momentum, where u denotes the vector of velocity variables, p denotes the pressure variable, and Re is the Reynolds number. The boundary conditions for the driven cavity problem over the unit square are on the top edge of the square, and on the other three sides and the corners. The reference pressure specified at the bottom-left corner is 0. The matrices are the initial Jacobians at each Newton iteration, assuming a zero pressure distribution. For convenience, however, we chose the right-hand sides of the linear systems to be the vector of all ones. A mesh of 20 by 20 elements was used, leading to momentum equation matrices of order 3042 and having 91204 nonzero entries. The nodes corresponding to the boundaries were not assembled into the matrix, and the degrees of freedom were numbered element by element. For Reynolds number 0., the matrix is SPD, and is equal to the symmetric part of the matrices with nonzero Reynolds number. We generated matrices with Reynolds number less than 10, which gives rise to the nearly symmetric case. For Reynolds number 1., the degree of symmetry measured by has value 7:5102 \Theta 10 \Gamma4 and this measure increases linearly with the Reynolds number (at least up to Re=10). In the numerical experiments below, we show the number of matrix-vector products consumed by GMRES(k) and DQGMRES(k) to reduce the actual residual norm to less than \Gamma6 of the original residual norm, with a zero initial guess. Several values of k are used. A dagger (y) in the tables indicates that there was no convergence within 500 matrix-vector products. The incomplete Choleski factorization IC(0) of the Re=0 problem was used as the preconditioner in all the problems. For comparison, we first show in Table 1, the results using standard right-preconditioning. Table 2 shows the results using right-preconditioning with M \Gamma1 inner products, or equiva- lently, split preconditioning. In the latter case, care was taken to assure that GMRES did not stop before the actual residual norm was within twice the tolerance. For DQGMRES, since an accurate residual norm estimate is not available within the algorithm, the exact residual norm was computed and used for the stopping criterion for the purpose of this com- parison. The right-preconditioned methods have a slight advantage in this comparison (by as many as 20 Mat-Vec's), since they directly minimize the actual residual norm, whereas the symmetrically preconditioned methods minimize a preconditioned residual norm. 6 214 128 73 446 361 y 94 97 258 197 100 94 Table 1: Mat-Vec's for convergence for right-preconditioned methods. Table 2: Mat-Vec's for convergence for symmetric right-preconditioned methods. The results in Table 1 show the irregular performance of DQGMRES(k) for these small values of k when the preconditioned system is not symmetric. The performance is entirely regular in Table 2, where the preconditioned system is near symmetric. For Reynolds numbers up to 3, the systems are sufficiently symmetric so that DQGMRES(2) behaves the same as DQGMRES with much larger k. The performance remains regular until beyond Reynolds number 7, when the number of steps to convergence begins to become irregular, like in the right-preconditioned case. GMRES with either right or symmetric preconditioning does not show any marked difference in performance; apparently the symmetry of the preconditioned system is not as essential here for this problem. However, the results do show that DQGMRES(k) with small values of k may perform as well, in terms of number of steps, as GMRES(k) with large values of k, particularly if near-symmetry is preserved. Since the former is much more efficient, the combination of preserving symmetry and truncated iterative methods may result in a much more economical method, as well as the more regular behavior shown above. We also performed the same experiments with orthogonal projection methods, namely the Full Orthogonalization Method (FOM) and its truncated variant, the Direct Incomplete Orthogonalization Method (DIOM) [7]. The results were very similar to the results above, and are not shown here. Indeed, the development of the algorithms and the theory above is identical for these methods. For interest, we also performed tests where an ILU(0) preconditioner was constructed for each matrix and compared right and split preconditioning. For the near-symmetric systems here, there was very little difference in these results compared to using IC(0) constructed from the Re=0 case for all the matrices. Thus the deterioration in performance as the Reynolds number increases is not entirely due to a relatively less accurate preconditioner, but is more due to the increased nonsymmetry and non-normality of the matrices. Although the eigenvalues of the preconditioned matrices are identical, their eigenvectors and hence their degree of non-normality may change completely. Unfortunately, it is difficult to quantitatively relate non-normality and convergence. 5.2 Breakdown behavior of Bi-CG To test the breakdown behavior of Bi-CG, MATLAB was used to generate random matrices of order 300 with approximately 50 percent normally distributed nonzero entries. The matrices were adjusted so that A / A i.e., the symmetric part was shifted so that the lowest eigenvalue was 10 \Gamma5 and then " times the skew-symmetric part was added back. The parameter " was altered to get varying degrees of nonsymmetry. For each " that we tested, 100 matrices were generated, and the smallest value of the cosines corresponding to the denominators in the algorithms were recorded. In the right- preconditioned case, we recorded the minimum of for all j, and for the symmetric right-preconditioned case, we recorded the minimum of for all j. The relative residual norm reduction was 10 \Gamma9 when the iterations were stopped. The initial guesses were 0, and r was set to r 0 . IC(0) of the symmetric part was used as the preconditioner. Table 3 shows the frequencies of the size of minimum cosines for the right-preconditioned (first row of each pair of rows) and the symmetrically-preconditioned cases (second row of each pair of rows). For example, all 100 minimum cosines were between the symmetrically-preconditioned case. The average number of Bi-CG steps and the average minimum cosine is also shown. The last column, labeled 'better', shows the number of times that the minimum cosine was higher in the improved algorithm. The Table shows that the right-preconditioned algorithm can produce much smaller cosines, indicating a greater probability for breakdown. The difference between the algorithms is less as the degree of nonsymmetry is increased. For there is almost no difference in the breakdown behavior of the algorithms. The Table shows that the number of Bi-CG steps is not significantly reduced in the new algorithm, nor is the average minimum cosine of the modified algorithm significantly increased. It is the probability that a small cosine is not encountered that is better. It is important to note that this behavior only applies when r 0 is set to r 0 . When r 0 is chosen randomly, there is no gain in the symmetrically-preconditioned algorithm, as shown in Table 4. Table 5 shows the number of steps and the minimum cosines for the two algorithms applied to the driven cavity problem described in Section 5.1 above. Figure 1 shows a plot of the minimum cosines as the two algorithms progress for the Note that the minimum cosines are higher and much smoother in the symmetrically-preconditioned case. In the Re = 7 problem, the cosines are still higher, but the smoothness is lost. 6 Conclusions When solving linear systems with matrices that are very close to being symmetric, this paper has shown that it is possible to improve upon the standard practice of using a (nonsymmetric) preconditioner for that matrix along with a left- or right-preconditioned iterative method. The original degree of symmetry may be maintained by using a symmetric preconditioner and an alternate inner product (or split preconditioning, if appropriate). By combining this idea with truncated iterative methods, solution procedures that converge more quickly and require less storage are developed. The truncated methods also seem to become more robust with the truncation parameter k when near-symmetry is maintained. The Bi-CG algorithm also seems to be more robust with respect to serious breakdown when near-symmetry is maintained. " steps 3e-6 1e-5 3e-5 1e-4 3e-4 1e-3 3e-3 1e-2 3e-2 average better (0.) 31.77 100 1.87 74 Table 3: Frequencies of minimum cosines for right-preconditioned (first row of each pair of rows) and symmetrically-preconditioned (second row of each pair of rows) Bi-CG. " steps 3e-6 1e-5 3e-5 1e-4 3e-4 1e-3 3e-3 1e-2 3e-2 average better Table 4: Frequencies of minimum cosines when r is chosen randomly. Bi-CG steps min cosines Re. right symm right symm 3 73 72 2.02e-4 9.07e-3 Table 5: Steps and minimum cosines for the driven cavity problem. Figure 1: Minimum cosines in right-preconditioned Bi-CG (solid line) and symmetrically- preconditioned Bi-CG (dashed line) for the Acknowledgments The first and third authors wish to acknowledge the support of RIACS, NASA Ames under Contract NAS 2-13721, where this collaboration originated. The second and third authors also wish to acknowledge the support of the Minnesota Supercomputer Institute. --R A taxonomy for conjugate gradient methods. Conjugate gradient type methods for unsymmetric and inconsistent systems of linear equations. An iterative solution method for linear systems of which the coefficient matrix is a symmetric M-matrix The concept of special inner products for deriving new conjugate gradient-like solvers for non-symmetric sparse linear systems A flexible inner-outer preconditioned GMRES algorithm Iterative Methods for Sparse Linear Systems. DQGMRES: a direct quasi-minimal residual algorithm based on incomplete orthogonalization Generalized conjugate-gradient acceleration of nonsym- metrizable iterative methods --TR
preconditioned iterative methods;inner-products;incomplete orthogonalization
305327
On the Solution of Convection-Diffusion Boundary Value Problems Using Equidistributed Grids.
The effect of using grid adaptation on the numerical solution of model convection-diffusion equations with a conservation form is studied. The grid adaptation technique studied is based on moving a fixed number of mesh points to equidistribute a generalization of the arc-length of the solution. In particular, a parameter-dependent monitor function is introduced which incorporates fixed meshes, approximate arc-length equidistribution, and equidistribution of the absolute value of the solution, in a single framework. Thus the resulting numerical method is a coupled nonlinear system of equations for the mesh spacings and the nodal values. A class of singularly perturbed problems, including Burgers's equation in the limit of small viscosity, is studied. Singular perturbation and bifurcation techniques are used to analyze the solution of the discretized equations, and numerical results are compared with the results from the analysis. Computation of the bifurcation diagram of the system is performed numerically using a continuation method and the results are used to illustrate the theory. It is shown that equidistribution does not remove spurious solutions present on a fixed mesh and that, furthermore, the spurious solutions can be stable for an appropriate moving mesh method.
Introduction The solution of boundary value problems (BVPs) using finite difference methods consists of discretizing the differential equations on a finite mesh and solving the system of equations for the values of the functions at these mesh locations. Adaptive meshes are widely utilized for problems containing strong gradients and for problems where important features of the solution develope on small length scales. References for applications in computational fluid dynamics are given in [23] and [16], [17],[18], [25] give more general references for the application and analysis of mesh apaption. Adaptive meshes are essential if accurate and reliable estimates of the solution structure are to be made and much effort is put into designing suitable meshes for complex geometries. However, the analysis of the reliability of adaptive meshing strategies with regard to giving accurate solutions and rejecting spurious ones is still in its infancy. The fundamental question we ask is this: how well do the qualitative properties of the discrete system with mesh adaption reflect the qualitative properties of the continuous system it is approximating. Our studies of this question will focus on adaptive numerical discretizations of reaction-convection-diffusion BVPs of conservation form: where f(u; We look at both steady states and time evolving solutions. The steady-states satisfy the identity where k is a suitable constant. We note that even if f is a linear function of u, the addition of an adaptive strategy to solve (1.1) typically leads to a nonlinear discrete system. An important example of such an equation is the viscous Burgers' equation where f(u; (1:1),(1:2). This is an important test problem for many methods in computational fluid dynamics and has a unique, monotone decreasing and symmetric steady solution given by where m is a constant given by the unique solution of This steady solution is a global attractor for the time dependent problem. As F the steady state of (1.1) is invariant under the action of the map All continuous steady solutions of (1.1) under (1.2), are necessarily symmetric and satisfy so that If " is small then there is a sharp transition layer in the solution where u(x) changes sign. This layer is centred at 1and is of O(") in width. Outside the transition layer juj is close to A. In contrast, when the resulting inviscid equation has many steady weak solutions which satisfy u are given by For these solutions the transition layer is at x 0 where x 0 is arbitrary. Only one of these is the weak limit of a viscous solution. However, exponentially small (in ") changes in the symmetry of the boundary conditions of the viscous problem can lead to solutions with significantly displaced transition layers. This phenomenon is referred to as super sensitivity in the papers of [12], [13], [14] and [24]. For the time dependent problem, if " is small, a solution will rapidly evolve to one with u x close to zero almost everywhere. This solution again has a thin transition layer of width O("), where u changes sign, which is centred at a point determined by the initial conditions. Over much longer timescales this transition layer moves slowly towards the point and so the solution converges to the symmetric steady state. This phenonenon is often called meta-stability [3]. When a method using a fixed mesh at points x adapted to the solution) is used to find the steady states of (1:1) it is well known [7] here that this may give rise to spurious solutions. Such solutions frequently place the transition layers in an incorrect position. Typically, however, when working with problems that have sharp transition layers, an adaptive strategy is used which places mesh points x j into regions where the computed solution has a high gradient. Such strategies are hoped to produce reliable answers and to preserve qualitative properties of the solution such as symmetry and monotonicity. In this paper we consider strategies which move a fixed number of mesh points so as to equidistribute a positive monitor function of the solution. A natural question which we ask is: can such an adaptive stategy for finding the steady solutions of (1.1) place the transition layer in the correct position and give monotone solutions? Briefly the answer to this question is "no, in general". Indeed, we show that even when the transition layer is well resolved by the mesh, (so that many points are moved into the region where u changes sign), it can still appear in entirely the wrong position. To demonstrate this we solve for the steady state of (1.1) using an adaptive strategy in which a fixed number of J mesh points x j are placed in such a manner that a generalisation of the the arc-length of the solution is equidistributed over each interval [x sufficiently large compared with 1=J then the numerical method has a unique, monotone, symmetric solution with a transition layer at reduced then asymmetric solutions bifurcate from this branch when . Close to " SB then both the true and spurious solutions are monotone decreasing in x. These asymmetric solutions persist as " is reduced. Further asymmetric solutions arise at subsequent symmetry breaking bifurcations from the main branch. For small " these asymmetric solutions are perturbations of the many weak solutions arising in the continuous problem when and they exhibit transition layers placed almost arbitrarily in the interval [0; 1]. Similar behaviour (including the existence of a related value " SB ) is observed for the case of a uniform grid. Thus a unique numerical solution which correctly places the transition layer exists only . We make some estimates of " SB and show that its value is not significantly reduced by using the arc-length based adaptive strategy. However, we show that if a strategy is used which ensures that the estimate ju equidistributed by the mesh, then the resulting solution is both monotone decreasing and symmetric for all values of ": However such an equidistribution method is typically not robust and will not perform well in some computations due to the non-smoothness of the monitor function. As a second investigation we look at the time dependent problem (1.1) using an adaptive method which moves the mesh points x j (t) as the solution evolves in time to again equidistribute its arc-length. The discrete solutions of the steady state of (1:1) using the adaptive mesh are steady states of this method. We show through some numerical experiments that the discrete solution with the transition layer placed at and that for a range of initial data, the adaptive solution converges to a problem with an asymmetrically placed transition layer. Thus the spurious solutions have a marked effect on the dynamics of the computed profile, with the meta-stability of the asymmetric states of the continuous problem being replaced by the stability of these states in the discrete problem. The basic reason for this rather peculiar behaviour, is that in the continuous problems super sensitivity implies that the location of the transition layer is uniquely determined by exponentially small perturbations to the boundary conditions. For small " the effect of these perturbations is easily overcome by the errors introduced by the discretisation process. An adaptive method which places mesh points in regions of high gradient only does not seem to affect this process. An interesting question is whether the correct location of the transition layer could be obtained by using a numerical method which places points close to the boundary, and we leave this for future investigation. We expect that the ideas in this paper are also relevent to problems which are only algebraically sensitive to the small diffusion parameter, but that then the effects will be less dramatic. The remainder of this paper is organised as follows. In Section 2 we derive a suitable numerical method for the steady state of (1:1) which incorporates a mesh-adaption procedure based upon a generalisation of the well-known arc-length method. In Section 3 we analyse this method when applied to the examples given. In particular we determine the nature of the (discrete) solution branches as parametrised by " and estimate the location of bifurcation points where the non-spurious computed solution loses stability. We also study the form of the solution for " small. In Section 4 we describe some numerical calculations of the steady state branches and compare them with the analytic estimates in Section 3. Finally in Section 5 we make some time-dependent calculations of the solutions of (1:1), based upon the moving-mesh strategy of [18], and show how the spurious steady-state solutions affect the underlying dynamics of the problem. Adaptive Mesh Discretizations of the Steady BVP Our derivation of discretization of the steady state of the equations is based upon the conservation form where the constant k is to be determined. In Section 5 when we look at the time dependent formulation. Let U be the discretized solution variable u and H the vector of mesh- spacings so that Thus the h j determine the (non-uniform) mesh distribution and J is the number of grid cells. Hence x our approximations to u(x j ). Discretizing the conservation equation over the interval [x and taking the mean of F (u) over this interval we obtain, " Although we will mainly work with this discretisation, we observe that subtracting two succesive such equations gives the quivalent formulation ' =h =2 If the mesh is specified (2.2) represents (J equations for (J unknowns U and k. Our interest, however, lies in the case where the mesh is adaptive so that the J mesh parameters forming the vector H are calculated as part of the solution. Thus we must specify further equations for the mesh. A common approach to mesh adaption is to use an equi-distribution principle see [11], [16], [17], [18], [25]. In these methods, there is a function M(u; commonly called a monitor function such that, if x i is the location of the i th mesh-point (with x M(u; In practice, of course, the integrals are approximated on the mesh. Different monitor functions lead to different meshes with varying properties and the 'correct' choice of monitor function is not always clear. In [4] a monitor function for a certain two-point boundary value problem is shown to give 'optimal' accuracy in a suitable norm. Alternatively, it is proposed in [1], that for certain partial differential equations invariant under various rescaling groups, the most appropriate monitor function to give the correct dynamics of the solution is one which generates meshes which scale in a similar manner to the exact solution. These various considerations notwith- standing, the most commonly used monitor function is arc-length for which M(u; see [25], [23]. Here we consider a monitor function which is a generalisation of this one so that M(u; This formulation reduces to arc-length equidistribution if uniform mesh if equi-distribution with respect to ju x j if varying ff we may relate the properties of various mesh-adaptation principles, including the limiting case of a uniform mesh. To equidistribute the mesh we thus aim to choose H such that x x dx: Approximating the arc length to be constant within the interval yields, A natural discretization of this equation gives equations as j ranges from need the additional constraint that Thus (2:4), (2:5) give a further J equations for the unknowns Coupled with (2:2) this gives us a system of 2J equations and unknowns. Since (2:4) is independent of j, the quantity on each side is a constant s 2 . Thus, Thus (2:2), (2:6) form 2J equations in the 2J and s. This set of equations can be written as By a solution we will always mean a real vector In section 5 we generalise these ideas to include both the time dependence of u and a dynamic strategy for moving the mesh points. 3 An Analysis of the Discretized Model Equations To analyse the solutions of (2:2),(2:6) considered as functions of " and ff we apply techniques from bifurcation theory, determining the existence of a symmetric solution branch and then looking for asymmetric solutions bifurcating from it as " varies. We can then compare the qualitative properties of the discrete solution with those of the continuous solution. To start our investigation we take " to be large and establish the existence of a unique a monotone decreasing and symmetric solution of the discrete equations. This we refer to as the main solution branch and we establish some general properties of the symmetric and monotone decreasing solutions of (2:2),(2:6). As " is reduced the main solution branch remains symmetric but loses monotonic- ity. However, further asymmetric solutions of (2:2),(2:6) arise. In particular, we show that there are symmetry breaking bifurcation points on the main branch leading to such asymmetric solutions. It is interesting that (as " is reduced) these occur before the main branch loses monotonicity. If however, then the smmetry breaking points do not exist. Finally, we apply the Implicit Function Theorem to show that provided " is sufficiently small then we may construct many solutions of the finite difference scheme, some of which may have arisen at the symmetry breaking points. 3.1 The solution for " AE 1 If we consider solutions which are bounded in the limit of " then in this limit equation (2:2) reduces to Using the boundary conditions, u Therefore, to satisfy the last equation in (2:2) and (2:5) we require that Thus, to leading order in 1=" To obtain the location of the mesh points we substitute these identities into the equation (2:6) to give Thus h j is a constant which must therefore equal 1=J . Hence we have Hence, the unique bounded asymptotic solution of (2:2) for " !1 is given by: This is , in fact, the exact solution of the steady solutions of (1.1) at sampled on a uniform grid. 3.2 Properties of the Main Solution Branch The solution constructed above for " AE 1, has a uniform mesh and is both monotonic so that u j ? u j+1 and symmetric so that Both the symmetry and monotonicity of the discrete solution are in qualitative agreement with the true solution of the continuous problem. As F (u) satisfies the symmetry condition F reduced the equations (2:2),(2:6) will continue to admit a symmetric solution satisfying (3.2). For large enough " this solution will also be monotonic with As " is reduced then, in general, there will be a first value of " at which monotonicity is lost and a possible further value of " at which asymmetric solutions (not satisfying (3.2)) bifurcate from it. We now study how the monotone and symmetric solutions vary as " re- duces. In particular we examine the way in which the mesh changes from being uniform and obtain some bounds for the values of h j ; these are useful subsequently in finding bifurcation points. For this we assume that the function F (u) satisfies the following conditions where G(u) is bounded for finite u. This includes Burgers' equation for which Lemma 3.1 Let be a a symmetric, monotone-decreasing solution of (2:2),(2:6) satisfying (3.2) with Suppose further that F (u) satisfies (3.3),(3.4) and ff ? 0. Then, for we have and Corollary 3.2 Under the same conditions as in Lemma 3.1, it follows that, and q Proof of Lemma 3.1 It follows from (2:2) that for a monotone decreasing solution, the function a is negative and from (3.3) it is monotone decreasing if j ! J=2. Consequently a 2 j is monotone increasing if j ! J=2. Now combining (2:2),(2:6) we have ff a 2 It follows immediately if ff ? 0, that as s is independent of j then as a 2 j is increasing then h j+1 is decreasing in j. We immediately deduce from (2.6) that increasing in j. If and h j is constant, we deduce that as a 2 j is increasing then so is \Delta j . This proves the lemma. 2. Proof of Corollary 3.2 Inequality (3:7) follows simply from the observations that h j is symmetric in j, is decreasing for J=2 and that Inequality (3:8) is similar and uses the elemetary identity that To obtain the estimate (3:9) we make use of the geometric result that the least arc-length of the solution occurs when the points u j lie on a straight line of uniform gradient joining the two end-points, which has length Similarly, the greatest arc-length occurs when the solution is two horizontal line-segments through joined by a vertical line-segment through x 2 (0; 1): Such a curve has arc-length In general the solution does not stay monotonic as " is reduced. As a final result on the monotonic solutions we give an estimate for the value of " at which they lose monotonicity Lemma 3.3 If the symmetric solution first loses monotonicity at " decreases, then at Consequently, there exists a u 2 [u 2 ; A] with Proof The solution first loses monotonicity when As is monotone increasing by Lemma 3.1, this must occur first when that A. It then follows from taking in (2:2) that (A). The first result then follows by considering (2:2) when and the second by dividing both sides of the identity by u and applying the Mean Value Theorem. 2 3.3 Symmetry Breaking Bifurcations We now show that (2:2),(2:6) has further asymmetric solutions which bifurcate from the symmetric branch described above. Hence the uniqueness and symmetry of the solution is lost as " reduces. In particular we show that there are symmetry breaking points at which asymmetric solutions (not satisfying (3.2)) bifurcate from the symmetric branch at a non zero value of ". To establish this we investigate the linearisation of (2:2),(2:6) about the symmetric solution and establish the existence of an asymmetric null eigenvector at a specific value of " SB . This is the condition for a point on the symmetric branch to be an infinitesimal symmetry breaking bifurcation. Such a point is actually a symmetry breaking bifurcation point provided that certain non-degeneracy conditions are satisfied. Generically this is so, and we observe (numerically) that additional spurious solutions do indeed bifurcate at these points. Furthermore, these spurious solutions appear to persist for all " ! 0. Owing to the action of the symmetry group, all such bifurcations are necessarily pitchfork bifurcations and lead to two solution branches in a neighbourhood of " SB such that Numerical calculations demonstrate that u \Gamma and u only exist for The value of " SB is determined in the following theorem. Theorem 3.4. If F (u) satisifies (3:3),(3:4) and ff ! 1, there is a symmetry breaking bifurcation on the symmetric solution branch of (2:2),(2:6) at a SB satisfies the equation Equivalently Further infinitesimal symmetry breaking bifurcations from the main symmetric branch will occur for (smaller) values of " (j) SB which satisfy Lemma 3.5 If F (u) satisfies (3.3),(3.4) and ff ! 1 then there must be a value of " satisfying (3:11). Such a value satisfies is the greatest value of " at which the main solution branch loses monotonicity. Corollary 3.6. Consider a solution of the discrete Burgers' equation with (i) If Furthermore2J (ii) For all ff 2 [0; 1), " (1) SB satisfies the following inequalities Note The particular case corresponds to a solution of (1.4) using a non-adaptive mesh and (3:13) was first derived in [20] using a different method from the one we shall now give. The estimates (3:14),(3:15) are new. In Section 5 we compare these bounds with numerically computed values of the symmetry breaking point. Corollary 3.7. For the resulting solution of the discrete Burgers' equation, if then an infinitesimal symmetry breaking bifurcation has occured on the main branch for a value " SB ? ": We can draw some useful conclusions from the previous lemmas. If we first consider a mesh without adaptivity, numerical evidence indicates that if " ? 1=2J then the computed solution is non spurious and if " ! (1\Gamma2=J)=2J then spurious solutions exist in agreement with (3:14). Both of these estimates are reasonable. The natural length scale of the transition layer is O(") and to obtain an adequate resolution of the transition we must have a mesh such that 1=J is of the same magnitude as ". Thus spurious solutions are likely to exist if this is not the case and we have to take a minimum value of J to limit the effects of spuriosity. For the value of " in (3:16) it is likely that there are additional non-symmetric solutions to the original equations. This result (perhaps rather surprisingly) indicates that using an adaptive mesh does not significantly improve on this result and a comparable value of J may have to be taken to avoid spuriosity. This is true even though the adaptive method may place many more points in the actual transition layer than the non-adaptive one. Note, however, that the case such spurious bifurcations. This is examined further in Section 3.5. Proof of Theorem 3.4 To prove the theorem we consider a linearisation of (2:2),(2:6) about a symmetric solution. For the original system to have a bifurcation point it is necessary that the linearisation should have a non-zero null-eigenvector ffi with corresponds to the linearization of u j , g j to h j , t to s and l to respectively. A linearization of (2:2),(2:6) implies that these components satisfy the following system of linear equations: st together with the further boundary condition that As that if l admits an anti-symmetric solution which breaks the symmetry condition (3:2) and satisfies By [10] it follows that if such a solution is non-zero then " SB is an in- finitessimal symmetry breaking bifurcation point, and asymmetric solutions of (2:2),(2:6) bifurcate from the main branch at this point. Thus we must show that there exists such an " where a solution of the form (3:21) is indeed non-zero. Setting in (3:17),(3:18) and taking and The reduced system (3.22),(3.23) has a non-zero solution for which w 1 6= 0 and det 0: (3.24) Calculating the determinant in (3.24) and simplifying the resulting expression using the identity gives the expression (3.10). On substituting the definition of s we have the equivalent condition We can now construct the resulting null-eigenvector satisfying (3:21). In this case, the equation for w 2 and h 2 is given by !/ This problem will have a solution (w that the matrix in (3:26) has a non-zero determinant that is which, on rearranging is equivalent to the condition Here we note that the equivalent term D 1 is identically zero at the bifur- cation. We shall show presently that a bifurcation first occurs when u is monotone decreasing and h i decreases monotonically if i ! J=2 thus if immediately follows that as G(u) is monotone that D 2 6= 0. Hence a solution w of (3:26) exists. By a similar procedure we may calculate the subsequent terms (w We note that if D 1 6= 0 but D then a further bifurcation will occur with a null-eigenvector for which w Thus a series of symmetry-breaking bifurcations occurs when each of the terms D i is equal to zero. This completes the proof. 2 We now show that such a value of " must exist. Proof of Lemma 3.5 We look at the quantity By the estimates of the last section, and 1=s are bounded above as " !1 and hence D 1 is negative for large ". On the contrary, as " decreases, then if the solution remains monotone, these values are also bounded below (and are positive) so that D 1 is positive for small ". Thus there must exist a value of " at which D Now suppose that the main solution loses . At such a point U and hence from (2:6) we have that Thus at this point Now, from Lemma 3.3 we have where u ! A. Thus, as G(u) is monotone increasing in u and h have that D 1 is positive if . Thus D 1 which first becomes zero at a where the solution is still monotone. 2 Proof of Corollaries 3.6 and 3.7. The results in Corollaries 3.6 and 3.7 follow immediately from an application of the estimates of u Corollary 3.2 to the identity (3:11). 2 3.4 Asymptotic Solutions When " 1 The symmetry breaking bifurcation generates solutions additional to the main branch for small values of ". In fact, for very small values of " there are a very large number of solutions of (2:2),(2:6) As stated in the introduc- tion, these are numerical perturbations of the many weak solutions which exist when closely related to the super-sensitivity of the underlying problem. To determine these we firstly recast (2:2) in the form We show that the combined system (3:29),(2:6) has solutions when and use the Implicit Function Theorem to deduce the existence of solutions perturbations of the Setting together with the mesh defining equations (2:6) and the boundary condition We see immediately that this system has a solution if either or The values of j for which h correspond to points in the solution where there is a transition layer. We shall assume that the transition layer occurs for of the mesh. In the transition layer, it follows from (2:6) that if h decreasing solution satisfies For values of j for which j and are not in the transition layer we have from applying (3.32) twice that and hence from the monotonicity of F (u) we deduce that Thus there is a constant ffi for which A solution of this form is illustrated in Figure 1. From this result and from (3.32) we may deduce that, since u These results imply that h j is constant over all intervals outside the transition layer and takes the value so that By (3:33) we have and this gives another relationship between s and ff since uM and u L are determined by the parity of L and M: The solution of the system when characterised completely by the values of H ,ffi and s each of which is given uniquely by the values of and M and (hence of J T ). Indeed, the solution is independent of the function F (u) We observe that if L is even then u if L is odd then similar results for uM . This gives us three cases of solutions to consider. Case 1: L even & J-M even. In this case it follows from (3.35) that u \GammaA. Thus summing the expression (3.33) over the transition layer we deduce that Substituting this expression into (3.37) gives the following expression for s The expression (3.37) is valid provided that 0: (3.41) For example, when implies that J: We see that for this example the values of ffi; s and H are (up to a sign of uniquely by the value of J T and do not depend upon the precise values of L and M . Thus the solution derived can have a transition layer anywhere in the interval, provided that L is even. Case 2: L odd & J-M odd. We have u so that ff: Substituting into ??3.45 implies that ffi satisfies the quadratic equation In general this equation has two solutions, and either may be observed. these in Section 4. Case 3: All combinations not included above. The analysis for this case follows similarly and we have that ffi satisfies the quadratic equation We now turn our attention to the perturbations of the above solutions when " is small. To do this we define the solution when to be U etc. so that H in the transition layer. As u j is everywhere bounded, it is clear that the full problem described by (3:29),(2:6) is an O(") perturbation of that of (3:30),(3:30). Hence an application of the Implicit Function Theorem implies that a solution of (3:29),(2:6) will take the general form outside the transition layer (3.45) and inside the transition layer. (3.46) We state the full result as follows. Theorem 3.8 Let ff 2 [0; 1). In each of the cases 3, the solution of perturbs smoothly in the manner defined by (3.44),(3.45),(3.46) provided that the corresponding variable \Gamma i defined in (3:41) for case 1, (with similar expressions for the other two cases) satisfies the condition Furthermore, if (3.47) is satisfied then to leading order in ", the mesh in the transition layer takes the form where take the values calculated in the three cases above. Proof To prove that we can apply the Implicit Function Theorem and deduce this result we must show that the operator derived by linearising (3:30),(2:6) about the solution (U equivalently, that it has no (non-zero) null eigenvector. The proof of this is straightforward but technical and details of this calculation are given in are given in [2] 3.5 Existence and Uniqueness of Solutions for When we have from (2:6) that ju Consequently, if the solution is monotone, we have that the value of Lemma 3.1 is constant. As the solution can only lose monotonicity when we deduce that a loss of monotonicity can only occur if for all j. Thus u j is constant for all j, violating the boundary conditions. We deduce that the main solution branch remains monotone for all ". As " tends to zero the only possible monotone solution of (3:30) is one for which otherwise and there is a transition layer with 1: Similarly, from (3:25) we see that a symmetry breaking bifurcation can only occur when the analysis in the previous section does not rule out the existence of non-monotone spurious asymmetric solutions when small values of " we can deduce that such solutions can not bifurcate from the main branch. More significantly they do not alter the stability of the main branch. Thus taking reduces the impact of the spurious solutions. We shall see numerical evidence for this in the next section. 4 Numerical Results for the Examples This section presents the numerical solution of (2:2),(2:6) obtained through continuation in both " and ff using the package AUTO [6]. In all cases J was kept fixed at To compute a solution branch parameterised by " we take as a starting solution the monotone symmetric solution computed in Section 3.1 with 10. The value of " is then reduced and all bifurcations and bifurcating branches computed. At the fixed value of \Gamma3 we also look at the solutions as functions of ff. Further, disconnected, branches can be found for very small values of " by using the asymptotic solution (when a starting solution when " is small. 4.1 Continuation in " We take ff to be fixed at the two values of 0; 1=2 and compute the bifurcation diagrams in the two cases. As a suitable measure of the solution we take the value of u 5 as this is effective in distinguishing between solutions with different locations of the transition layer. Figures 2 and 3 then show the corresponding bifurcation diagrams of the solution of (2:2),(2:6). In Figure 4 we also present the value of h 1 as a function of " in the case of ff = 1=2: In this figure we see that h 1 tends to one of the three limits of 1=7; 1=8 and 0 as " tends to zero. It is clear from Figures 2 and 3 that when there are symmetry breaking bifurcations from the main branch, as predicted by Theorem 3.4. leading to solution branches which are asymmetric. It is also clear that these solutions tend toward an asymptotic limit as " tends to zero. Using the notation of Section 3.4 we may thus characterise these solutions by the values of M and L such that transition layer occurs for j between L+ 1 and M . These values are indicated on Figure 2. It is interesting to note that the solutions which have the transition layer at and at are the continuations of the two solutions which bifurcate from the main solution branch at the greatest value of ". Subsequent solution branches which have transition layers closer to from the main branch at smaller values of ": In Figures 5 and 6 we present the complete set of solutions for These clearly show the oscillatory structure predicted in Section 3.4. If then the first bifurcation occurs when bifurcations occur when . Thus the value of " for the first of these bifurcation points actually increases when the adaptive procedure is used. Presumably, this is because fewer points are now placed close to the boundary, reducing its effect on determining the location of the transition layer. If then the location of the first of these bifurcation points can be estimated from (3:14) which predicts that 0:004787 2:45. This is consistent with the above computations. In Figure 7 we give a graph comparing the estimates of (3:14) with the actual location of the bifurcation point. It is interesting to note from this graph that " SB has a maximum value at about before decreasing to zero as ff tends towards one. If we now take fixed for all ". However, the value of h 1 increases towards 1=2 as " tends towards zero. This behaviour can be seen in Figure 8 which plots h 1 as a function of " in this case. As predicted in Section 3.5 we see that there are no bifurcations from the main solution branch. The resulting profile when \Gamma3 is given in Figure 9. From this figure we can see that the transition layer occurs at the right location but the grid points are concentrated in a small region. 4.2 Continuation in ff For continuation in the parameter ff we have taken one of the solutions at \Gamma3 from Figure 3. as a starting solution. The bifurcation diagram with ff as the parameter is shown in Figure 10 for which u 2 is a convenient value to plot. This again shows a complex form with many solutions, although the structure of the bifurcations in this case is less clear than the continuation with ": 4.3 Asymptotic Properties of the Solutions As remarked above, it is clear that as " tends to zero that the computed solutions are converging to the asymptotic solution predicted in Section 3.4. We now make this comparison more precise. The solutions at from two different branches of the bifurcation diagram are shown in Figure 11. In the figure, solution 1 has and represents the symmetric solution on the main branch. In contrast, solution 2 has 14 and has a maximal degree of asymmetry. Since solution 1 corresponds to the case 1 and Solution 2 corresponds to the case 3 described in Section 3.4. To verify the asymptotic analysis for Solution 1, we determine j j u1 \Gammau 0from the numerical computations and compare it with the value of ffi given by (3:40). This analysis implies that if so that in general \Gamma3 and at \Gamma5 . These values show that which is consistent with the asymptotic value. Solution 2 is an example of case 3 of Section 3.4. For this solution the equation (3:43) yields two values for ffi namely Clearly from the figure it is the latter value which is seen as a solution bifurcating from the main branch. Presumably the other solution appears at a fold bifurcation. 5 Time Like Iterations to Steady State We now consider the implications of our steady state analysis for the solution of the full time dependent problem (1:1), in particular determining which of the solutions constructed is stable. To do this we augment the partial differential equation with additional equations allowing the mesh points to evolve and for which (2:6) represents a steady state. Thus we can study the dynamical effect of the steady solution computed in Section 3. We consider meshes which evolve to equidistribute the quantity M(u; x) and for simplicity in this section we only consider discretisations of Burgers' equation with A = 1. To apply such a moving mesh technique we follow [11] and introduce a new computational coordinate 2 [0; 1] and a mesh function x(; t) so that the mesh point is at x(i=J; t). We then introduce a second partial differential equation to describe the evolution of x. As the value of x is now a function of time, we must recast Burgers' equation in a moving coordinate system, so that To evolve the mesh we then couple this with the following moving mesh equation given in [11]: is a relaxation parameter, M(x(; t); t) is the quantity to be equidistributed and y() determines the initial mesh distribution. In this section we take From (5:2) it can be seen that the solution equidistributes the quantity M if it reaches steady state. The time evolution is introduced as a fast relaxation to equidistribution avoiding the solution of differential algebraic equations for the evolution problem. Our purpose in this section is to study the stability and basins of attraction of equilibria under this natural evolution process. For the stability properties of the equation (5:2) see [17]. Other time-like iteration schemes for the moving mesh equations are studied in [22]. 5.1 Discretization of the Equation Following [11], equations (5:1) and (5:2) are discretized using the method of lines. The spatial derivatives are, as before, approximated using central differences and the resulting stiff system of ODEs, for the solution variables and mesh locations, is solved using a stiff solver. We set h l (t) and define The equation (5:1) is discretized on a nonuniform mesh in x. to obtain dt Here, the operator P is as given in (2:3) so that and we take a central difference discretisation for the convective operator to give The equations (5:2) are then discretized on a uniform mesh in , to give where s This gives dX dt where A is the inverse of a tridiagonal matrix with diagonal elements \Gamma2 and off-diagonal elements 1, and R is a th element This can also be written as dt A jk R k Using this in (5:4) we get dt A jk R k (U; Then the equations (5:6) and (5:7) represent a system of ODEs, dZ dt the system for the evolution in time of u and x at uniform grid locations in . At steady state, these equations reduce to the mesh adaptation introduced earlier, in the case 5.2 Numerical Results of the Unsteady Computations The solution branches in the bifurcation diagram of Figure 2 represent the equilibrium points of the system (5:8). Thus the stability of these solution branches can be analysed using a linearized stability analysis of the system (5:8). This analysis can be performed by AUTO and the resulting stability properties of the branches when are sketched in Figure 12 where the solid lines represent the stable branches and the broken lines represent the unstable ones. The main branch undergoes supercritical and subcritical bifurcations alternately at the sucessive symmetry breaking bifurcation points In particular it loses stability as " is reduced below " Thus the effect of the spurious solutions is to destabilise the main symmetric solution branch. The secondary branch bifurcating from the third bifurcation point at " loses stability through a Hopf bifurcation at \Gamma3 . Since the underlying partial differential equation cannot undergo a Hopf bifurcation, the oscillations resulting from the numerically observed Hopf bifurcation arise directly from the adaptive mesh strategy. To study the stability characteristics of the branches under large perturbations we now consider evolution of the system (5:8) from specific initial data using the Backward Euler method. We have computed the solution at . For this value of " there are seven equilibrium solu- tions, one on the main branch and two on each of the secondary branches bifurcating from " . In this case the branch and the secondary branch bifurcating from " 2 are unstable, whereas the branches emanating from bifurcations at " 1 and " 3 are stable. Each of the stable branches has a non-zero basin of attraction and it is of interest to ask which initial data is attracted to which branch. To gain insight into theis question we chose as initial data for the unsteady computation, small perturbations of the unstable equilibrium solutions. We now define where M j+ 1is defined as in (5:5). Thus of the deviation of the solution from equidistribution. For all our computations we find that increases initially as the solution moves away from the unstable branch. However, once the solution is close to a stable branch the deviation from equidistribution decays exponentially. The convergence history of the unsteady computation with starting solutions close to the unstable branches at \Gamma2 is shown in Figure 13. To obtain the results summarised in Curve 1, initial data for both U i and for the mesh is taken which is a perturbation of a symmetric solution on the main branch. To obtain the results in Curves 2,3, two nearby sets of initial data are chosen which are both perturbations of the asymmetric unsymmetric unstable solution bifurcating from the main branch at " 2 but which lead to different time histories. In these time histories the solutions represented by Curves 1 and 2 both coverge slowly toward the stable secondary branch emanating from " 3 . The oscillations in these solutions, and the slow convergence, is due to the existence of complex eigenvalues of the linearized system which have real part close to zero. This follows from the fact that " is close to the Hopf bifurcation point at " H . In contrast, Curve 3 exhibits rapid convergence to the secondary branch emanating from " 1 . Thus the secondary curve bifurcating from " 2 in some sense divides the initial data which evolves toward the two equilibrium solutions. 6 Conclusions The results of our analysis and of our computations show that the use of an adaptive strategy does not prevent the existence of spurious asymmetric solutions of the discretisation of the partial differential equation (1.1). Furthermore, these solutions can be stable whilst the main symmetric solution branch (which is the approximation to the true solution) is unstable. Hence, they have a profound and misleading effect upon the dynamics of the solution. If we measure the 'goodness' of an adaptive strategy by the smallness of the value " 1 of " at which the first spurious branch of solutions bifurcates from the main branch, then it would seem that using a uniform mesh (with do rather better than taking an adaptive mesh with almost any value of ff ! 1. Presumably this is because the adaptive methods reduce the density of mesh points close to the boundaries where the effects of super-sensitivity indicate that important features of the solution need to be resolved. We conclude, that an adaptive strategy for problems of the form which concentrates on significant features such as the transition layer but ignores subtle effects at the boundaries can give rise to most misleading results. --R Moving mesh methods for problems with blow-up On the solution of convection-diffusion boundary value problems by grid adaption Invariant manifolds for metastable patterns in u t SIAM J. A suggestion for the numerical solution of the steady Navier-Stokes equations AUTO: Software for continuation and bifurcation problems in ordinary differential equations. The global dynamics of discrete semilinear parabolic equations. Singularities and groups in bifurcation theory. Moving mesh partial differential equations (MMPDEs) based on the equidistribution principle. Singularities and groups in bifurcation theory. Moving mesh partial differential equations (MMPDEs) based on the equidistribution principle. Viscous shock motion for advection diffusion equations. Shock layer movement for Burgers equation. Convergent and spurious solutions of non-linear elliptic equations Mesh selection for discrete solution of boundary value problems in ordinary differential equations. Moving mesh techniques based upon equidis- tribution Adaptive mesh selection strategies for solving boundary value problems. Steady shock tracking and Newton's method applied to one-dimensional duct flow Multiple solutions and bifurcation of finite difference approximations to some steady problems of fluid dy- namics An analysis of local error control for dynamical systems. On the dynamics of some grid-adaptation schemes A survey of dynamically-adaptive grids in the numerical solution of partial differential equations small eigenvalues and the sensitivity of metastable motion. Dynamical approach study of spurious steady-state numerical solutions for nonlinear differential equations Dynamical approach study of spurious steady-state numerical solutions for nonlinear differential equations --TR --CTR Q. Sheng , A. Q. M. Khaliq, Modified arc-length adaptive algorithms for degenerate reaction-diffusion equations, Applied Mathematics and Computation, v.126 n.2-3, p.279-297, 10 March 2002
continuation;convection-diffusion equations;mesh adaptation;equidistribution
305365
The Chebyshev Polynomials of a Matrix.
A Chebyshev polynomial of a square matrix A is a monic polynomial p of specified degree that minimizes |p (A)|2. The study of such polynomials is motivated by the analysis of Krylov subspace iterations in numerical linear algebra. An algorithm is presented for computing these polynomials based on reduction to a semidefinite program which is then solved by a primal-dual interior point method. Examples of Chebyshev polynomials of matrices are presented, and it is noted that if A is far from normal, the lemniscates of these polynomials tend to approximate pseudospectra of A.
Introduction . Let A be an N \Theta N matrix and n a nonnegative integer. The degree n Chebyshev polynomial of A is the unique monic polynomial p n of degree n such that (1) denotes the matrix 2-norm. To be precise, p n is unique provided that n is less than or equal to the degree of the minimal polynomial of A; otherwise we have and the problem ceases to be interesting. This notion of the polynomial that minimizes kp(A)k seems so simple and natural that one would expect it to be a standard one. We suspect it may have been considered before, perhaps decades ago in the literature of approximation theory. Nevertheless, we have been unable to find any literature on this problem before our 1994 paper with Greenbaum [7]. In that paper, Chebyshev polynomials of matrices are defined and it is proved that they exist (obvious by compactness) and that they are unique under the condition just mentioned (not obvious). Even if they are not discussed explicitly, Chebyshev polynomials of matrices are never far away from any discussion of convergence of Krylov subspace iterations in numerical linear algebra. For these iterations, convergence depends on certain vector norms kp(A)qk being as small or nearly as small as possible, where q is a starting vector. Most of the convergence properties of applied interest do not depend too strongly on q, and thus it is the near-minimality of kp(A)k that is often the heart of the matter [22]. For finding eigenvalues, the principal iterative method in this category is the Arnoldi iteration, which becomes the Lanczos iteration if A is real and symmetric. For solving systems of equations, the analogous methods include GMRES, biconjugate gradients, CGS, QMR, and Bi-CGSTAB in the general case and conjugate gradients if A is symmetric positive definite. (For systems of equations, the notion of a Chebyshev polynomial of A should be normalized differently by the condition instead of the condition that p is monic. In [7], a Chebyshev polynomial The work of both authors was supported by NSF grant DMS-9500975CS and DOE grant DE- FG02-94ER25199. y Department of Mathematics, National University of Singapore, 10 Kent Ridge Crescent, Singapore z Oxford University Computing Laboratory, Wolfson Building, Parks Road, Oxford OX1 3QD, United Kingdom (Nick.Trefethen@comlab.ox.ac.uk). K.-C. TOH AND L. N. TREFETHEN of a matrix is called an ideal Arnoldi polynomial, and its analogue with this other normalization is called an ideal GMRES polynomial.) The motivation for the term "Chebyshev polynomial of a matrix" is as follows. All readers will be familiar with the classical Chebyshev polynomials fTn g, which are times monic polynomials of minimal k \Delta k1-norm on the interval [\Gamma1; 1]. This notion was generalized by Faber in 1920 to the idea of the Chebyshev polynomials of S, where S is a compact set in the complex plane C: the monic polynomials of Now suppose that A is a hermitian or more generally a normal matrix, having a complete set of orthogonal eigenvectors. Then by a unitary reduction to diagonal form, it is easily shown that the nth Chebyshev polynomial of A as defined by (1) is precisely the nth Chebyshev polynomial of S in this latter sense, where S is the spectrum of A. Such a polynomial can be computed, for example, by generalizations of the Remez algorithm [15]. Chebyshev polynomials of normal matrices, then, are trivial; the matrix problem reduces to a scalar problem. But what if A is an arbitrary square matrix, with non-orthogonal eigenvectors or perhaps no complete set of eigenvectors? This is the subject of this paper, and our purpose is two-fold. First, we describe an algorithm for computing Chebyshev polynomials of matrices. The optimization problem implicit in (1) is far from smooth, and unless the degree is very small, these problems are quite difficult if approached by general methods of unconstrained optimization. The algorithm we describe, which we believe is the first to have been developed for this problem, is based instead on interior point methods for semidefinite programming. With this algorithm, we can reliably compute Chebyshev polynomials for matrices of order - 50 in less than a minute on workstations available in 1996. No parameters are involved that must be tuned. We should mention, however, that although our algorithm is reasonably fast, it is not fast enough to easily handle matrix dimensions of the order of a thousand or more. Second, we present computed examples, the first we know of to have been pub- lished. A few numerical coefficients are listed for possible comparison by later authors, but our main aim is to give insight into the behavior of Chebyshev polynomials of matrices, largely with the aid of pictures. A natural question is, how are the coefficients of the polynomials affected by the degree and nature of the non-normality of A? For a partial answer, we plot lemniscates jp constant of our polynomials and find that in many cases they approximate pseudospectra of A. 2. Reduction to a semidefinite program. Let fB be a linearly independent set of matrices in C N \ThetaN . The Chebyshev problem (1) is a special case of a norm minimization problem involving linear functions of matrices: min (2) For our special case, B and the numbers x k are the coefficients (actually their negatives) of the Chebyshev polynomial of A. It is well known that (2) can be expressed as a semidefinite program [11], [23]. We shall not show in detail how this is done. One difference between our work and what CHEBYSHEV POLYNOMIALS OF A MATRIX 3 has been done before is that the existing literature, as far as we are aware, considers only real matrices. Theorem 1. The norm minimization problem (2) is equivalent to the following semidefinite program involving hermitian matrices: s:t: I \GammaiB means that Z is positive semidefinite. Proof. Problem (2) is equivalent to the problem of minimizing \Gamma- such that Using the fact that for any M 2 C N \ThetaN , '- where -max (\Delta) denotes the maximum eigenvalue, equation (5) can be rewritten as '- . But this is equivalent to I By writing this equation out in full, we get (3). 3. Transformation to a better-conditioned basis. Before we discuss how the semidefinite program (3) can be solved by interior point methods, we must address the issue of change of basis in (2), as the numerical stability of these algorithms depends on the conditioning of the basis fB g. This is an essential point for the computation of Chebyshev polynomials of matrices. The power basis is usually highly ill-conditioned, as can be seen by considering the special case of a diagonal matrix, where we get the phenomenon of ill-conditioning of the basis of monomials fx k g, familiar in approximation theory. For numerical stability in most cases, the power basis must be replaced by a better-conditioned alternative. 4 K.-C. TOH AND L. N. TREFETHEN Suppose f b Bn g is another linearly independent set of matrices in C N \ThetaN related linearly to fB by Bn Bn t; where T is an n \Theta n nonsingular matrix, t is an n-vector, and c is a nonzero scalar. (The notation here means that Bn ).) The following theorem describes how (2) is modified by this change of basis. The proof is straightforward, and we shall omit it. Theorem 2. The minima min and are the same, and the unique vectors x and - x that achieve them are related by We are aware of three choices of basis that are particularly attractive for practical computations. Scaled power basis. Suppose are given as in (2). A simple way to get a better conditioned basis is to scale the norm of A to 1. With such a scaling, we have b and Faber polynomial basis. Even the best-scaled power basis is often highly ill- conditioned. A more powerful idea is to consider the basis fF defined by the Faber polynomials F associated with some region\Omega in the complex plane containing the spectrum of A. The Faber polynomials fFng are the natural analogues for a general region\Omega in C of the monomials fz n g for the unit disk or the Chebyshev polynomials fTn g for [\Gamma1; 1]; see [2]. In most cases, fFn (A)g will be far better conditioned than any power basis. For the Faber basis, the matrix T in (2) is upper triangular, with columns containing the coefficients of F . The scalar c is the positive number cap(\Omega\Gamma n , where cap(\Omega\Gamma is the logarithmic capacity of \Omega\Gamma The vector t is the vector of co-efficients of the expansion of the degree in terms of Of course, one must choose a region\Omega for which the associated Faber polynomials can be obtained either analytically or numerically. If\Omega is chosen to be an ellipse or CHEBYSHEV POLYNOMIALS OF A MATRIX 5 an interval, then the Faber polynomials are simply the scaled Chebyshev polynomials g. More generally, if\Omega is chosen to be a polygonal domain, the Faber polynomials can be computed numerically via Schwarz-Christoffel mapping. We have used the Matlab Schwarz-Christoffel Toolbox for this purpose, due to Driscoll [4]. Orthonormal basis. Finally, our third idea is a more elementary one, but powerful in practice. One may simply orthonormalize the power basis fI; with respect to the "trace inner product" hA; to obtain a basis that is typically well-conditioned even in the 2-norm. This can be done by a modified Gram-Schmidt procedure similar to that used in the Arnoldi iteration: To obtain the matrix T in (2), we note that there is a unique (n triangular matrix R such that and the columns of R can be computed from the following recurrence relation (in Matlab It is now easy to see that again in Matlab notation. For simplicity, we use the orthonormal basis in the examples reported in this paper. Although it is more expensive to compute than the other two bases, the amount of time taken remains small compared to the time required for solving (3). We note that transformation to a better-conditioned basis does not eliminate any ill-conditioning that is inherent in the Chebyshev minimization problem itself. 4. Solution by primal-dual interior point method. Assuming a suitable basis has been chosen, we now turn to the problem of how (3) can be solved by interior point methods similar to those in linear programming, specifically, by Mehrotra-type primal-dual predictor-corrector algorithms. Extensive research has been done on both the algorithms and the theory of SDP. We refer the reader to [1], [9], [10], [11], [12], [16], [23] and [26] for details. 6 K.-C. TOH AND L. N. TREFETHEN A general SDP has the form: s:t: where C, Z, A k , hermitian matrices and b 2 IR n . The idea behind an interior point method is to use a suitable barrier function, \Gamma log det(Z) in the case of SDP, to transform the semidefinite constrained convex problem (D) into a parametrized family (by -) of equality constrained convex problems whose optimal solutions (X(-); y(-); Z(-)) satisfy the optimality conditions where X and Z are hermitian positive definite. The parameter - ? 0 is to be driven explicitly to zero (as fast as possible), and in the limit - ! 0, an optimal solution of (6) is obtained. Mehrotra-type primal-dual predictor-corrector algorithms essentially consist of a sequence of modified Newton iterations. Usually, one step of Newton's iteration is applied to (7) for each new -. It is readily shown that application of Newton's method to (7) gives rise to the equations In order to keep \DeltaX hermitian (this is desirable since the fundamental objects in an SDP are hermitian matrices), equation (9) is usually symmetrized with respect to an invertible matrix P , whereupon it becomes where Different choices of P give rise to different Newton steps. For example, gives rise to what is known as the Alizadeh-Haeberly-Overton (AHO) direction [1]; rise to the Monteiro direction [10]; and rise to the Nesterov-Todd (NT) direction [12]. The general algorithmic framework of a Mehrotra-type predictor-corrector method is as follows. Algorithm. Given an initial iterate (X positive definite, CHEBYSHEV POLYNOMIALS OF A MATRIX 7 (Let the current and the next iterate be (X; 1. (Predictor step) Compute the Newton step (ffiX; ffiy; ffiZ) from (8) and (10) with 2. Determine the real parameter Here ff and fi are suitable steplengths chosen to ensure that X are positive definite. Generally, ff and fi have the form 3. (Corrector step) Compute the Newton step (\DeltaX; \Deltay; \DeltaZ ) from (8) and (10) with the right-hand side matrix R given by 4. Update (X; where ff and fi are defined by (12) with ffiX, ffiZ replaced by \DeltaX , \DeltaZ . We shall not discuss implementation details of the above algorithm-for example, how to solve efficiently for the search directions (ffiX; ffiy; ffiZ) and (\DeltaX; \Deltay; \DeltaZ ) from the linear systems of equations (8) and (10). We refer the reader to [16] for such details. Instead, we just note that the search directions are typically computed via a Schur complement equation. For such an implementation, each iteration has a complexity of O(nN 3 which is equal to O(nN 3 ) for our Chebyshev approximation problem since n ! N . Computations have shown that careful implementations of the predictor-corrector algorithm that use a Schur complement equation can typically reduce the duality gap of an SDP to about ffl 2=3 mach for the three search directions mentioned above, namely, the AHO, Monteiro, and NT directions. For these three directions, each iteration has a complexity of at most 12nN 3 , and the number of iterations needed to reduce the duality gap by a factor of exceeds 20. In all of our computations, we use the NT direction, for the following reasons. Although the orders of complexity for computing these three directions are the same, computing the AHO direction is about twice as expensive as computing the Monteiro or NT directions. Of the latter two, the NT direction has the virtue of being primal-dual symmetric. This implies that primal-dual predictor-corrector algorithms based on the NT direction are likely to be more robust than those based on the Monteiro direction, in the sense that the problems of stagnation such as taking very small steplengths are less likely to occur. It has been observed that algorithms based on the Monteiro direction often encounter such a stagnation problem for a class of SDPs known as the ETP problems [23]. 8 K.-C. TOH AND L. N. TREFETHEN 5. The special case when A is normal. It is worth setting down the form our algorithm takes in the special case where A is normal, i.e., unitarily diagonalizable. As we have already mentioned in the Introduction, we may assume in this case that A is diagonal, so that the Chebyshev problem (1) reduces to the classical Chebyshev approximation problem on the spectrum (A) of A, i.e., For this special case, the Chebyshev polynomials of A can be computed cheaply by the predictor-corrector algorithm discussed in the last section, by exploiting the block diagonal structure present in the associated SDP problem. As in the general case, we consider the norm minimization problem (2), but the are now diagonal: each k. Since the 2-norm of a diagonal matrix is the k \Delta k1-norm of its diagonal vector, (2) is equivalent to the minimax problem min where d (l) k denotes the lth component of the N-vector d k . As before, (13) can be expressed as an SDP. Theorem 3. The minimax problem (13) is equivalent to the following SDP involving block diagonal hermitian matrices: s:t: diag d (l) \Gammai d (l) n. The matrices A k consist of N blocks of 2 \Theta 2 matrices on the diagonal. A proof of the above theorem is similar to that of Theorem 1, based on the observation that for any complex number a, we have '- 0 a - a 0 We omit the details. Also, the process of transformation to a better-conditioned basis for (14) is exactly the same as for the general case. However, note that (14) cannot be obtained as a direct consequence of Theorem 1 by specializing the matrices B k to diagonal matrices. CHEBYSHEV POLYNOMIALS OF A MATRIX 9 If the initial iterate (X chosen to have the same block diagonal structure as the matrices A k , then this structure is preserved throughout for (X k ; Z k ). By exploiting this block diagonal structure, the work for each iteration of the predictor-corrector algorithm is reduced to O(n 2 N) flops as opposed to O(nN 3 ) for non-normal matrices. In practice, we can compute the degree-25 Chebyshev polynomial of a normal matrix of dimension 1000 in Matlab in about 12 minutes on a Sun Ultra Sparcstation. It would be interesting to know how this special case of our algorithm for normal matrices compares with other methods for linear complex Chebyshev approximation, such as the Remez / semiinfinite programming methods discussed in [15], but we have not investigated this. 6. Computed examples. We turn now to computed examples of Chebyshev polynomials of matrices. Our aim is to demonstrate the effectiveness of our algorithm and to give some insight into the behavior of these polynomials. This is not a subject we fully understand, but the experimental observations are fascinating. Most of our experimental results will be presented as plots. To "plot" a polynomial n , we show its roots in the complex plane and also the boundary of a region that we call the Chebyshev lemniscate 1 for that polynomial and the given matrix A. This region is defined by the equation The Chebyshev lemniscates characterize where in the complex plane the Chebyshev polynomials of A "live", just as the spectrum or the pseudospectra characterize (though not precisely, unless A is normal) where in the complex plane A itself "lives". As a minimum, since kp n (A)k, we know that the Chebyshev lemniscate contains the spectrum ae Ln (A): In each example we present, the dimension of the matrix A is 48 \Theta 48 or 100 \Theta 100, though we typically print only its 5 \Theta 5 or 6 \Theta 6 analogue. For each example, we give plots showing the Chebyshev lemniscates (solid curves) of A, typically of degrees The zeros of the Chebyshev polynomials are shown as small circles, and the eigenvalues of A are shown as solid dots. For comparison with the Chebyshev lemniscate, each of our plots also shows a dotted curve. This is the boundary of an ffl-pseudospectrum of A. The value of ffl has been chosen "by hand" to make the match with the Chebyshev lemniscate a good one. (The ffl-pseudospectrum of A is the set in the complex plane; see [14] and [21].) For all of these examples, the Chebyshev polynomials were computed in Matlab by the methods described in the previous sections. Primal-dual predictor-corrector algorithms are highly efficient and robust for solving SDPs. For the set of examples we present here, it takes an average of 12 iterations to reduce the duality gap by a factor of (This number is rather insensitive to the dimension of A; it would be essentially the same for matrices of dimensions 5 \Theta 5 or 200 \Theta 200. This insensitivity to problem size is one of the remarkable features of Properly speaking, the word lemniscate refers to the boundary of Ln , and Ln itself is a lemniscatic region, but this expression is cumbersome and we shall avoid it. K.-C. TOH AND L. N. TREFETHEN primal-dual interior point methods.) For a 48 \Theta 48 real matrix, each iteration takes about 5 and 7 seconds for respectively, on a Sun Ultra Sparcstation. The corresponding numbers for a 48 \Theta 48 complex matrix are about seconds and seconds. Here are our examples. Omitted entries are all zero. Example 1. Diagonal. where d is a vector whose first entry is 1 and the rest of whose entries are distributed uniformly in the interval [\Gamma1; 0:8]. Thus the spectrum of A consists of points that densely fill the interval [\Gamma1; 0:8] and an outlier at z = 1. Example 2. Bidiagonal. . 0:2 where the vector d is the same as that in Example 1. The spectrum is the same as in Example 1. Example 3. Grcar [21]. Example 4. Ellipse. Example 5. Bull's head [14]. CHEBYSHEV POLYNOMIALS OF A MATRIX 11 Example 6. Lemniscate1 [14]. Example 7. Lemniscate2 [20]. Example 8. Gauss-Seidel [14]. This is the matrix that corresponds to a Gauss-Seidel iteration applied to the standard 3-point discrete Laplacian on a grid of N points. Example 9. Beam-Warming [20]. \Gamma1:5 2:0 \Gamma1:5 0:7 \Gamma2:6 2:1C C C C C C A Example 10. Wilkinson [21]. 12 K.-C. TOH AND L. N. TREFETHEN Example 11. Chebyshev points. where Example 12. Random [21]. where by random we mean that the entries of A are independently drawn from the real normal distribution with mean 0 and variance 1=N . Example 13. Random triangular [21]. by which we mean that A is the strictly upper triangular part of the random matrix of Example 12. Example 14. Convection-diffusion matrix [18]. The matrix A is the projection of the 2N \Theta 2N Chebyshev spectral discretization matrix of a convection-diffusion operator onto the invariant subspace associated with the N eigenvalues of maximal real part In Table 1, for later authors who may wish to compare the coefficients of some Chebyshev polynomials of matrices, we list the coefficients of p 8 for the matrices of Examples 3 and 5. In Table 2, we list kp 8 (A)k for all fourteen examples. The plots for our fourteen examples are shown in Figures 1-14. Let us first consider Example 1, the special case where A is diagonal. For any Chebyshev polynomial of a matrix, we know that the Chebyshev lemniscate must contain the spectrum (16). In the present case, by the characterization theorems for the classical complex Chebyshev approximation problem [3, p. 143], we know that the nth Chebyshev lemniscate must in fact touch the spectrum (A) at no fewer than points. This property is evident in Figure 1, where we see that Ln (A) rather closely, and increasingly so as n increases (see the cover illustration of [22]). It is interesting also to note how quickly one of the roots of the polynomials n , which are analogous to the "Ritz values" often taken as eigenvalue estimates in Arnoldi or Lanczos iterations, converges to the outlier eigenvalue at z = 1. By one of the roots of p 6 is already very close to the outlier, and the distance between them decreases geometrically as n increases. In the remainder of the spectrum, on the other hand, no individual Ritz value is converging rapidly to any one eigenvalue of A. Rather, it is the Chebyshev lemniscate generated by these Ritz values jointly that is capturing the spectrum. CHEBYSHEV POLYNOMIALS OF A MATRIX 13 Table Computed coefficients of p for the Grcar and Bull's head matrices (Examples 3 and 5). All but perhaps the last two digits printed are believed to be correct. Grcar Bull's head computed computed Table Norms kp (A)k for Examples 1-14. All digits printed are believed to be correct, as the estimated relative accuracies are all less than 10 \Gamma11 . Example computed kp 1. Diagonal 0:0063675408 2. Bidiagonal 0:0551494047 3. Grcar 1766:3135313 4. Ellipse 7710:2711611 5. Bull's head 1239:4186173 6. Lemniscate1 1:0000000000 7. Lemniscate2 834:73857463 8. Gauss-Seidel 0:0049251285 9. Beam-Warming 7:4348443860 10. Wilkinson 6:2747795054 11. Chebyshev points 46:395131600 12. Random 2:9537221027 13. Random triangular 0:0039633789 14. Convection-diffusion 2623904:6097 One might expect Ln (A) to approximate (A) even if A is non-normal. But from Figures 2-14, the reader will see that this does not happen. Nonetheless, though does not always approximate (A) very closely, it still gains some information about A. The plots show that for these examples, to a rather startling degree, for some ffl - 0, where ffl (A) is again the ffl-pseudospectrum of A. In particular, the agreement of the Chebyshev lemniscate of p n with a pseudospectrum of A is far closer in most of these examples than the agreement of the roots of p n with the eigenvalues 14 K.-C. TOH AND L. N. TREFETHEN Fig. 1. Diagonal. Since A is normal, the Chebyshev lemniscate touches the spectrum at at least and the roots of p n lie in the convex hull of the spectrum. Fig. 2. Bidiagonal-a non-normal analogue of Example 1. The dotted curves are the pseudospectrum of A. of A. For example, consider Figure 2, the bidiagonal matrix that is the non-normal analogue of Example 1 with the same spectrum. Except for the outlier eigenvalue, the roots of p bear no resemblance to individual eigenvalues of A. On the other hand, the Chebyshev lemniscates of these polynomials show a striking resemblance to the pseudospectrum of A. Clearly the Chebyshev polynomial is approximating A in a fashion that goes beyond approximation of individual eigenvalues. CHEBYSHEV POLYNOMIALS OF A MATRIX 15 The other examples illustrate the same effect. In every case, the lemniscate of the Chebyshev polynomial shows a compelling approximation to the pseudospectrum. We do not claim that this effect is universal; these examples have been picked for their pronounced and cleanly structured non-normality. But it is certainly common. A partial explanation of this phenomenon is as follows. It is well known that a matrix polynomial p(A) can be expressed as a Cauchy integral Z where the integration is over any closed contour or union of contours enclosing the spectrum of A once in the counterclockwise direction [8]. Taking absolute values gives the inequality Z Now suppose we seek p such that kp(A)k is small. When the degree of p is smaller than the dimension of A, it is impossible to achieve this in general by putting zeros of wherever A has eigenvalues, which would make the integral zero. Instead, we must settle for making jp(z)j small where k(zI large. This immediately suggests a link between lemniscates of p and pseudospectra of A. From this kind of reasoning we can derive bounds on kp (A)k. For example, to minimize kp(A)k one might seek to minimize kpk ffl (A) for some ffl that is not too small (hence jp(z)j is small over the region where k(zI larger (18) and the minimality of kp n (A)k we conclude that where L ffl is the arclength of the boundary of ffl (A). At this point one runs into the fact that min p kpk ffl (A) can be huge if ffl is not small, since the minimum typically increases geometrically with ffl. Therefore, a compromise must be made on ffl so that the quantity min p kpk ffl (A) =ffl on the right-hand side of (19) is as small as possible. For some matrices A and choices of n and ffl, the estimate just described can be quite good. It is not always very good, however, and so far, our attempts to make a more precise link between lemniscates of Chebyshev polynomials and pseudospectra of the underlying matrix have been unsuccessful except in certain limiting cases n !1 described in [17]. Rather than present partial results that do not bring this matter to a very satisfactory state, we prefer to leave the explanation of the behavior of Figures 2-14 as an open problem. 7. Conclusions. This paper has made two contributions. The first is a reasonably fast and apparently robust algorithm for computing the Chebyshev polynomials of a matrix, based on primal-dual interior point methods in semidefinite program- ming. The second is an experimental study of these polynomials that indicates that the associated lemniscates sometimes closely approximate certain pseudospectra of A. We have said little about applications in iterative numerical linear algebra, though that was our original motivation. There are many possibilities here that might be explored now that an algorithm is available. For example, our algorithm may prove useful in analyzing the convergence of Krylov subspace iterations, or the construction of preconditioners for such iterations, by means of model problems of moderate dimension. K.-C. TOH AND L. N. TREFETHEN It was mentioned in the Introduction that for applications to iterative solution of equations rather than eigenvalue calculations, it is appropriate to minimize kp(A)k with the normalization 1. Plots of lemniscates for these "ideal GMRES polynomials" can be found in the first author's dissertation [17]. Because this normalization gives a special status to the origin, these problems are no longer translation-invariant in the complex plane, and the lemniscates take special pains to avoid the origin. They also tend to display scallop patterns near the spectrum or pseudospectra. Interesting connections can also be made to the notion of a generalized Kreiss matrix theorem. The usual Kreiss matrix theorem relates the norms kA n k to the behavior of the pseudospectra of A near the unit disk. Generalizations are obtained by looking at norms kp(A)k for other polynomials p and the behavior of the pseudospectra near other regions. These matters are investigated in [19]. We consider the idea of the Chebyshev polynomials of a matrix a natural one, suggesting many questions to be explored. We hope that more will be learned about the behavior of these polynomials in the years ahead and that applications in other areas will be found. --R Faber polynomials and the Faber series Interpolation and Approximation A MATLAB Toolbox for Schwarz-Christoffel mapping Matrix Computations GMRES/CR and Arnoldi/Lanczos as matrix approximation problems Perturbation Theory for Linear Operators An infeasible start predictor-corrector method for semi-definite linear programming Pseudospectra of the convection-diffusion operator Eigenvalues and pseudo-eigenvalues of Toeplitz matrices A fast algorithm for linear complex Chebyshev approximations Matrix Approximation Problems and Nonsymmetric Iterative Methods Calculation of pseudospectra by the Arnoldi iteration The Kreiss matrix theorem on a general complex domain Spectra and Pseudospectra: The Behavior of Non-Normal Matrices and Op- erators Pseudospectra of matrices User's guide to SP: software for semidefinite programming Extremal polynomials associated with a system of curves in the complex plane On extending some primal-dual interior-point algorithms from linear programming to semidefinite programming --TR --CTR Michel X. Goemans , David Williamson, Approximation algorithms for MAX-3-CUT and other problems via complex semidefinite programming, Proceedings of the thirty-third annual ACM symposium on Theory of computing, p.443-452, July 2001, Hersonissos, Greece Michel X. Goemans , David P. Williamson, Approximation algorithms for MAX-3-CUT and other problems via complex semidefinite programming, Journal of Computer and System Sciences, v.68 n.2, p.442-470, March 2004
matrix polynomial;krylov subspace iteration;chebyshev polynomial of a matrix;semidefinite programming
305406
Threads Yield Continuations.
Just as a traditional continuation represents the rest of a computation from a given point in the computation, a subcontinuation represents the rest of a subcomputation from a given point in the subcomputation. Subcontinuations are more expressive than traditional continuations and have been shown to be useful for controlling tree-structured concurrency, yet they have previously been implemented only on uniprocessors. This article describes a concurrent implementation of one-shot subcontinuations. Like one-shot continuations, one-shot subcontinuations are first-class but may be invoked at most once, a restriction obeyed by nearly all programs that use continuations. The techniques used to implement one-shot subcontinuations may be applied directly to other one-shot continuation mechanisms and may be generalized to support multi-shot continuations as well. A novel feature of the implementation is that continuations are implemented in terms of threads. Because the implementation model does not rely upon any special language features or compilation techniques, the model is applicable to any language or language implementation that supports a small set of thread primitives.
Introduction Continuations have proven useful for implementing a variety of control structures, such as nonlocal exits, exceptions, nonblind backtracking [28], This material is based on work supported in part by the National Science Foundation under grant numbers CDA-9312614 and CDA 93-03189. nondeterministic computations [8, 14], coroutines [12], and multitasking [7, 15, 30], at the source level. Subcontinuations are more expressive than traditional continuations and may be used to implement similar control structures in the presence of tree-structured concurrency [16, 17]. This article describes a thread-based implementation of one-shot subcontinua- tions that has been incorporated into a multithreaded implementation of Chez Scheme on an SGI Power Challenge multiprocessor. Just as a traditional continuation represents the rest of a computation from a given point in the computation, a subcontinuation represents the rest of a subcomputation from a given point in the subcomputation. The base of a subcomputation is specified explicitly, and a subcontinuation of the subcomputation is rooted at that base. In contrast, a traditional continuation is rooted implicitly at the base of an entire computation. Subcontinua- tions may be used to implement traditional continuations by introducing an explicit root within the top-level evaluation function. One-shot subcon- tinuations, like one-shot continuations [3, 23], are first-class but may be invoked at most once, a restriction obeyed by nearly all programs that use continuations [3]. Hieb et al. [17] describe subcontinuations in detail, give an operational semantics of a small language that incorporates subcontinuations, and describe a sequential implementation of subcontinuations. They also describe briefly how subcontinuations can be implemented in a concurrent setting, although until now a concurrent implementation has not been realized. The implementation requires that the control state of a concurrent computation be represented as a tree of stack segments, just as the control state of a sequential computation is represented as a stack of stack segments to support traditional continuations [18]. The implementation of one-shot subcontinuations described in this article uses threads to represent each stack segment in the tree of stack segments required by Hieb's implementation model. Using threads to represent stack segments has several advantages over incorporating support for subcontinu- ations into the lowest levels of a language implementation. In particular, it simplifies the implementation of both threads and continuations and provides a clear operational semantics for the interaction between them. It also provides, for the first time, a viable model for adding continuations to existing threaded implementations of other languages such as C and Java. The remainder of this article is organized as follows. Section 2 discusses various continuation mechanisms and how they relate to threads. Section 3 describes subcontinuations in more detail and gives a few examples of their use. Section 4 describes the concurrent implementation of one-shot sub- continuations. This section identifies a small set of thread primitives and describes the implementation of subcontinuations in terms of these primi- THREADS YIELD CONTINUATIONS 3 tives. Section 4 also discusses how the implementation might be generalized to support multi-shot subcontinuations. Section 5 presents our conclusions. 2. Background A continuation capture operation, using traditional continuations, creates an object that encapsulates the "rest of the computation." Invoking a traditional continuation discards (aborts) the entire current continuation and reinstates the previously captured continuation. Sometimes, however, finer control is required, i.e., only part of the continuation needs to be captured, or only part of the current continuation needs to be discarded when a continuation is reinstated. Felleisen [9, 10, 11] introduced the prompt operator to identify the base of a continuation and F to capture the continuation up to the last prompt. A continuation captured using F is functional, or com- posable, in that invoking it does not abort but rather returns to the current continuation. Shift and reset [6], which are based on a modified CPS trans- formation, are similar, differing primarily in that captured continuations include a prompt. Subcontinuations generalize Felleisen's single prompt to multiple nested prompts and allow continuations to be used to control tree-structured concurrency [17]. In related work, Sitaram and Felleisen [27] show how nested prompts may be obtained from single prompts in a sequential setting. Splitter [26] extends the notion of a continuation in a manner similar to subcon- tinuations in a sequential setting but separates the continuation capture mechanism from the continuation abort mechanism. Gunter, et al. [13] describe how support for multiple prompts may be added to statically typed languages. On a uniprocessor, both traditional and functional continuations are sufficient to implement multitasked threads at the source level [7, 15, 30]. Thus, many systems that support continuations provide no primitive support for threads. Continuations have also been used to implement threads on multiprocessors. MP [29] is a low-level interface designed to provide a portable multiprocessing platform. It provides an abstraction of a physical processor, operations to manage its state, and spin locks for mutual exclu- sion. Various concurrency abstractions, including threads, are implemented using first-class continuations on top of this interface. Some systems provide native support for both threads and continuations. For example, Sting [20, 21] is a dialect of Scheme that provides general, low-level support for concurrency. Cooper et al. [5] describe a Mach-based multiprocessor threads implementation for Standard ML. Their package is based on the Modula-2+ threads package [2]. It includes mechanisms for mutual exclusion, synchronization and thread state. Multischeme supports both futures and continuations [25]. While each of these systems support both continuations and some form of threads, continuation operations are local to threads and cannot be used to control (abort or reinstate) groups of cooperating threads. Katz and Weise [22] also address the relationship between continuations and futures, but rather than providing a mechanism for controlling concurrency, they enforce a sequential semantics that makes concurrency transparent to the programmer. One-shot continuations [3, 23] differ from ordinary multi-shot continuations in that a one-shot continuation may be invoked at most once. One-shot continuations can be implemented more efficiently than multi-shot continuations in stack-based implementations, because the stack segments representing a one-shot continuation need not be copied for later use when the continuation is reinstated. Most applications that use continuations use them in a one-shot manner. One-shot continuations cannot, however, be used to implement nondeterminism, as in Prolog [4], in which a continuation is invoked multiple times to yield additional values [8, 14]. This is the only application we have found that requires multi-shot continuations rather than one-shot continuations [3]. 3. Subcontinuations A subcontinuation [17] represents the rest of a subcomputation from a given point in the subcomputation. In the presence of tree-shaped concurrency, subcontinuations provide complete control over the process tree, allowing arbitrary nonlocal exits and reinstatement of captured subcomputations that may involve multiple threads. The procedure spawn marks the root of a subcomputation and creates a controller that can be used to capture and abort the current subcontin- uation up to and including the root. spawn takes a procedure p of one argument, creates a controller, and passes it to p. The controller can be invoked only in the dynamic extent of the procedure's invocation. If the controller is never invoked, then the value of the call to spawn is the value returned by p. Thus, the expression (spawn (lambda (c) (cons 1 2))) returns (1 . 2). If the controller is applied to a procedure q, the subcontinuation from the point of controller invocation back to the root of the controller is cap- tured, and q is applied to the captured subcontinuation in the continuation of the controller invocation. If the subcontinuation is never invoked, the effect is merely to abort the current subcomputation. The subcontinuation itself is non-aborting and is therefore composable. The subcontinuation captured includes the root of the controller. The root is reinstated on a subcontinuation invocation, allowing the controller to be invoked again. In THREADS YIELD CONTINUATIONS 5 the following simple example, (cons 3 (spawn (lambda (c) (cons 2 (cons the call to spawn creates a controller c rooted within the cons of 3. Invoking this controller within the cons of 2 captures and aborts the continuation without disturbing the cons of 3; the captured continuation includes only the cons of 2. Invoking the captured continuation reinstates the cons of 2 within the cons of 1, so the value of the entire expression is (3 1 2). The subcontinuation captured by a controller invocation can be invoked multiple times. In the following example, the controller is invoked in the base case of the factorial computation so that the subcontinuation fact5 takes an argument and multiplies it by 120 (5!). So, the entire expression returns 14400 (120 120 1). (define fact (lambda (n c) (if (= n 1) (let ((fact5 (spawn (lambda (c) (fact 5 c))))) In the presence of concurrency, a subcontinuation captured and aborted by a controller invocation may encapsulate multiple threads of control. Invoking a subcontinuation that encapsulates multiple threads of control causes the concurrent subcomputation to resume. The parallel-search procedure concurrently traverses a given tree looking for nodes that satisfy the specified predicate. On encountering such a node, it invokes the controller to suspend the search and returns the node along with a continuation that can be used to resume the search. We use pcall [1] here and in Section 4 to illustrate tree-structured concurrency, although any mechanism for introducing tree-structured concurrency would suffice, including a much more primitive fork operator. pcall evaluates its subexpressions in parallel and applies the procedural value of its first subexpression to the values of the remaining subexpressions. If none of the subexpressions involve side effects, then the pcall expression behaves like a normal procedure call. Traditional continuations can be implemented in terms of subcontinua- 6 KUMAR, BRUGGEMAN, AND DYBVIG (define parallel-search (lambda (tree predicate?) (spawn (lambda (c) (letrec ((search (lambda (tree) (if (empty? tree) #f (pcall (lambda (if (predicate? (node tree)) (cons (node tree) k)))) (search (left tree)) (search (right tree))))))) (search tree)))))) Figure 1: When a node satisfies predicate?, parallel-search invokes the controller c to suspend the search and returns a pair containing the node and a continuation that may be used to search for additional nodes. tions by introducing an explicit root, via spawn, into the top-level evaluation function [17]. The traditional continuation operator, call/cc, is then defined in terms of the controller rooted in the top-level evaluation function. Although it is possible to implement spawn with call/cc in a sequential set- ting, doing so is less straightforward, as it involves the explicit simulation of the stack of stack segments required by a direct sequential implementation of subcontinuations. One-shot subcontinuations are similar to one-shot continuations in that a captured one-shot subcontinuation may be invoked at most once. As with one-shot continuations, the stack segments representing a one-shot subcontinuation need not be copied when the subcontinuation is reinstated. In particular, as shown in Section 4.2, threads can be used to represent the stack segments required to implement one-shot subcontinuations without concern for restarting the same thread from the same point multiple times. 4. Implementation This section describes the implementation of subcontinuations in terms of threads and is organized as follows. Section 4.1 describes a small set of THREADS YIELD CONTINUATIONS 7 (thread-fork thunk) forks a thread to invoke thunk. (thread-self) returns the current thread. (mutex-make) returns a new mutex. (mutex-acquire mutex) acquires mutex. (mutex-release mutex [thread]) releases mutex (to thread, if specified). (condition-make mutex) returns a new condition associated with mutex. (condition-signal condition) signals condition. (condition-wait condition [thread]) releases the mutex associated with condition (to thread, if specified) and waits for condition to be signaled, at which point the mutex is reacquired. (thread-block thread) blocks thread. (thread-unblock thread) unblocks thread. Figure 2: Thread system features used to implement one-shot subcontinu- ations. thread primitives that is sufficient for implementing subcontinuations. Section 4.2 presents the concurrent thread-based implementation of one-shot subcontinuations. Section 4.3 describes how multi-shot subcontinuations might be implemented using threads and discusses certain problems and restrictions. 4.1. Thread primitives One-shot subcontinuations can be implemented in any language with a thread system powerful enough to support the set of thread-system features shown in Figure 2. In addition to the ability to dynamically fork threads, this set of features includes mutexes for mutual exclusion and condition variables [19, 24] for synchronization. It also includes primitives that allow a thread to block and unblock other threads. These features are supported at least indirectly by most modern thread systems, including the SGI IRIX thread system upon which our implementation is based. A thread is created dynamically using thread-fork, which invokes its thunk argument in a separate thread. Threads are executed only for their effects. Mutexes and condition variables provide a structured way of accessing shared resources. The order in which threads waiting on a mutex succeed in acquiring it is, on most systems, unspecified. In the implementation of subcontinuations, however, it is convenient to allow the thread releasing a mutex to specify the next thread that will succeed in acquiring the mutex. Thus, the primitives that release a mutex (mutex-release and condition-wait) take an optional second argument, which is the thread that will succeed in acquiring the mutex next. In the absence of direct thread system support for this feature, the equivalent functionality can be implemented by associating a "next thread" field with each mutex. When a thread successfully acquires a mutex with a nonempty next-thread field, the thread must check to see if it is indeed the next thread that is expected to hold the mutex. If it is not the designated thread it must release the mutex and wait again on it. Eventually, the specified thread will acquire the mutex. The primitives thread-block and thread-unblock are required to control concurrent computations. They are asynchronous in that one thread can block or unblock a thread at any point in the other thread's execution. The operations themselves, however, must be synchronous in that they do not return until the specified thread is actually blocked or unblocked. The threads interface described here is simple enough that it can be implemented on top of most existing thread packages. Mutexes and condition variables are supported by most systems 1 . Several systems (SGI IRIX, Linux, Solaris, POSIX, etc.) extend the UNIX signal mechanism to support threads. The signal mechanism can be used implement the thread blocking and unblocking procedures on those systems that do not support this functionality directly 2 . 4.2. Subcontinuations from Threads As described in Section 3, pcall provides a way to create tree-shaped con- currency, while spawn provides the ability to control tree-shaped concur- rency. An example of tree-shaped concurrent computation is shown in Figure 3. Although pcall is not essential to the subcontinuation mecha- nism, its implementation is described here along with the implementation of spawn to illustrate how spawn interacts with pcall. The implementation of pcall is representative of the implementation of any operator used to introduce tree-structured concurrency. On systems that provide semaphores instead, mutexes and condition variables can be implemented in terms of semaphores. This requires the use of a user signal, e.g., SIGUSR1, rather than SIGSTOP, since a handler is needed to synchronize with the blocker before blocking. THREADS YIELD CONTINUATIONS 9 Subcontinuation Controller Pcall base Blocked Executing A A A (a) (b) (c) Figure 3: A process tree containing subcontinuation controller and pcall base nodes (a), subcontinuation capture by invoking the controller (b), and subcontinuation reinstatement by invoking the captured subcontinuation (c). A pcall expression evaluates its subexpressions concurrently, then applies the value of its first expression to the values of the remaining expressions. The leaf in which the pcall is executed becomes a branch point, with a separate branch for each of the subexpressions. Thus, execution takes place only at the leaves of the tree. Once the subexpressions have been evaluated, the branch point becomes a leaf again and the procedure is applied to its arguments. A call to spawn causes a subcontinuation controller to be inserted at the current execution point (Figure 3a). If control returns normally to that point, the controller is removed from the tree and execution is resumed. If a controller (say B) is invoked at one of the leaves (say A) in the subtree with B as the root, then that subtree is pruned and packaged into a sub- continuation K (Figure 3b). Subsequent invocation of that subcontinuation at a leaf (say C) causes the subcontinuation to be grafted onto the process tree at that leaf (Figure 3c). (make-index-list n) returns the list (0 (insert-pcall-node! threads) creates and inserts a pcall node at the current leaf. (insert-controller-node! thread) creates and inserts a controller node at the current leaf. (delete-child-node!) deletes the child of the current thread. (delete-pcall-edge! node edge) deletes edge from the given pcall node. (prune-subtree! node) prunes the subtree rooted at the given controller node. (graft-subtree! node) grafts the subtree rooted at the given controller node onto the tree at the current leaf. (controller-root node) returns the thread below the given controller node. (node-?leaves node) returns a list of leaves in the subtree rooted at the given controller node. Figure 4: Procedures used by pcall and spawn to maintain the subcontin- uation data structures. Subcontinuations are implemented by maintaining a tree of stack segments in which each stack segment is simply a stack of activation records. The key observation supporting the thread-based implementation of continuations is that a thread is, in essence, a stack of activation records. Thus, threads are used to represent stack segments. On subcontinuation capture, a subtree of threads is packaged into a subcontinuation after blocking the currently executing threads of the subcomputation (at the leaves of the subtree). When a subcontinuation is reinstated, the subtree of threads is grafted back onto the process tree and the computation is resumed by unblocking the threads at the leaves. Because the unblocked threads may overwrite the activation records on their stacks, subcontinuations represented in this manner can be invoked at most once, i.e., they are one-shot subcontinuations. The implementations of pcall and spawn share a common set of procedures that manipulate the data structures that make up the process tree. These procedures are listed in Figure 4. The code required to implement these procedures is straightforward and is not presented here. THREADS YIELD CONTINUATIONS 11 All operations on the process tree must be atomic. Our implementation uses a single global mutex to serialize these operations. Most of the time, it is sufficient for the thread performing the operation to acquire the mutex, perform the operation, and release it. Some of the operations, however, require code to be executed by two different threads. To ensure the atomicity of the entire operation, the thread initiating the operation acquires the mutex, performs its half of the operation, and uses the optional next- thread parameter of the mutex-release procedure to pass the mutex to the second thread, which completes the operation before releasing the mutex. 4.2.1. Implementation of pcall The code for pcall is shown in Figure 5, along with a help procedure, pcall . pcall itself is a syntactic extension. This syntactic extension simply makes thunks of the pcall form subexpressions, effectively delaying their evaluation, and passes them to pcall . When pcall is invoked, it first obtains the mutex to gain exclusive access to the process tree. It then forks a thread for each of its arguments, updates the tree, and releases the mutex while it waits on the condition done, which is signaled when all the arguments have been computed. Each child thread concurrently computes one argument. Each result computed by a child is communicated to the parent thread via a specified slot in the vector result. The variable counter is decremented each time a child thread terminates to keep track of the number of arguments that have yet to be computed. When the last child finishes, the counter goes to zero and the child wakes up the parent thread by signaling the condition done. The parent then trims the tree, releases the mutex, and applies the resulting procedure to the resulting arguments. 4.2.2. Implementation of spawn When spawn (Figure 6) is invoked, it obtains the process-tree mutex and creates a subcontinuation controller. It then forks a child thread, adds a node to the tree to mark the controller, and releases the mutex while it waits on the condition done. The child thread applies the procedure f passed to spawn to the controller. Control can return from the call to f either by explicit invocation of the controller or by an ordinary return from f. The flag controller-invoked? is used to distinguish between these two cases. The simpler case is when the controller is never invoked and the call to f returns value. In this case, the child thread enters the critical section, stores value in result to make it visible to the parent thread, and wakes up the parent by signaling the condition done. The child thread terminates and the parent thread resumes execution with result as the value returned by spawn. (define-syntax pcall (syntax-rules (pcall* (length '(proc (lambda () proc) (lambda (define mutex (mutex-make)) (define pcall* (lambda (n . args) (let ((result (make-vector n ' (done (condition-make mutex)) (parent (thread-self)) (counter n)) (mutex-acquire mutex) (let ((thread-list (map (lambda (fn index) (thread-fork (lambda (vector-set! result index (fn)) (mutex-acquire mutex) (delete-pcall-edge! pcall-node index) (set! counter (\Gamma counter 1)) (if (= counter (begin (condition-signal done) (mutex-release mutex parent)) (mutex-release mutex))))) args (make-index-list n)))) (set! pcall-node (insert-pcall-node! thread-list))) (condition-wait done) (mutex-release mutex) (let ((lst (vector-?list result))) (apply (car lst) (cdr lst)))))) Figure 5: Implementation of pcall. THREADS YIELD CONTINUATIONS 13 (define spawn (lambda (f) (define controller-node ' ) (define controller-invoked? ' ) (define controller-invocation-thunk ' ) (define result ' ) (define done (condition-make mutex)) (define controller-wait (lambda (set! controller-invoked? #f) (condition-wait done) (if controller-invoked? (begin (mutex-release mutex) (define controller ;; See Figure 7 (mutex-acquire mutex) (let ((thread (thread-fork (lambda (let ((value (f controller))) (mutex-acquire mutex) (let ((parent (controller-root controller-node))) (set! result value) (condition-signal done) (mutex-release mutex parent))))))) (set! controller-node (insert-controller-node! thread)) Figure Implementation of spawn. 14 KUMAR, BRUGGEMAN, AND DYBVIG (define controller (lambda (g) (mutex-acquire mutex) (let ((val ' ) (continue (condition-make mutex)) (root-thread (controller-root controller-node))) (set! controller-invocation-thunk (lambda (prune-subtree! controller-node) (let ((leaves (node-?leaves controller-node))) (for-each thread-block leaves) (mutex-release mutex) (let ((k (lambda (v) (mutex-acquire mutex) (graft-subtree! controller-node) (for-each thread-unblock leaves) (set! val v) (condition-signal continue) (set! controller-invoked? #t) (condition-signal done) (condition-wait continue root-thread) (mutex-release mutex) Figure 7: Implementation of controller. The more complicated case is when the controller (Figure 7) is actually invoked at one of the leaves. When this happens, the subcontinuation that represents the subtree rooted at the controller (Figure 3b) must be captured and aborted. To do this, the mutex is acquired to ensure that no other thread starts a continuation operation on the process tree. The thread that invokes the controller determines the thread root-thread that is waiting at the subcontinuation controller, packages the work to be done by that thread into a thunk controller-invocation-thunk, updates the variable controller-invoked? to inform it that the controller was invoked, and wakes up the controller by signaling the condition done. It then waits on condition continue while handing the mutex to root-thread. When root-thread starts executing, the controller-invoked? flag indicates THREADS YIELD CONTINUATIONS 15 that the controller was called explicitly, so it invokes controller-invocation- thunk to capture the subcontinuation. This causes the tree rooted at the controller to be pruned and the threads executing at its leaves to be blocked. Then, after leaving the critical section, it creates a subcontinuation k and applies the controller argument g to this subcontinuation. Later, if the subcontinuation k is invoked by a thread executing at a leaf, the thread obtains the process-tree mutex, grafts the process subtree captured as part of the subcontinuation onto the current leaf, and unblocks all the threads at the leaves of the grafted subtree (Figure 3c). It then stores the value v to be returned to the point where the controller was invoked in val, signals the condition continue to the thread that invoked the controller, and waits for the condition done. The signaled thread returns the value now stored in val to the point where the controller was invoked. To avoid deadlock, a thread is never blocked while holding the mutex. To maintain this invariant, the blocking thread always holds the mutex until after the (synchronous) blocking operation has succeeded. 4.3. Multi-shot subcontinuations The implementation described in the preceding section can be extended to support multi-shot subcontinuations. This requires a thread cloning operator thread-dup that allows the threads captured in a subcontinuation to be cloned. The clones are used to restart the subcomputation captured in the subcontinuation, while the original ones are kept around for subsequent invocations of the subcontinuation. Three complications arise in this method for extending the implementation to support multi-shot subcontinuation. First, a single controller or pcall node can now exist at multiple locations in the process tree. There- fore, the data structures used to communicate between parent threads and their children must be moved from the procedures where they are currently encapsulated into the process-tree data structure, and they must be cloned whenever the corresponding node in the tree is cloned. At the start of each operation, the correct node in the tree must be located and the corresponding data structures used. Second, condition variables are also used on a per-node basis. Each condition variable has at most one thread waiting on it, and that thread is awakened by signaling that condition. Simple replication of the condition variables, however, in order to retain the property that only one thread can wait on a condition variable at a time, does not work. This is because some of the threads are waiting on the condition variables when they are cloned, which therefore cannot be replaced. One solution to this problem is to accept the fact that multiple threads might be waiting on a condition variable and wake all of them up using a condition-broadcast primitive. Each thread, when awakened, would have to check to see if it is the intended target of the wakeup message. If it is not, it must again wait on the condition variable. Third, compiler support is required to allow the stack encapsulated within a thread to be copied. In particular, mutable variables and data structures must be stored outside of the stack or accessed from the original stack via an extra level of indirection. In contrast, no compiler support is required to implement one-shot subcontinuations. 5. Conclusions It has long been known that continuations can be used to implement threads. In this article, we have shown that threads can be used to implement continuations. In so doing, we have provided the first detailed implementation model for subcontinuations in a concurrent setting, furthered the understanding of the relationship between continuations and threads, and provided a straightforward operational semantics for the interaction between threads and subcontinuations. We have implemented a complete thread package that supports the primitives described in Section 4.1 as part of Chez Scheme on an SGI Power Challenge multiprocessor and used this package to implement one-shot sub- continuations (available via http://www.cs.princeton.edu/~skumar/subK). We have not yet extended the implementation with support for multi-shot subcontinuations. Although the subcontinuation mechanism as described uses higher-order procedures, they are not essential to the mechanism or to its implementa- tion. Because the implementation of one-shot subcontinuations does not rely upon higher-order procedures or on any special compilation techniques, the model is applicable to any language or language implementation that supports the small set of thread primitives described in Section 4.1. Thus, the model demonstrates for the first time a straightforward way to add support for first-class continuations to threaded versions of other languages, such as C and Java, without changes to the language or compiler. In languages without automatic storage management, such as C, the programmer must be responsible for deallocating unused subcontinuations and any data structures used only by the threads that represent the subcon- tinuations. This is nothing new: programmers in such languages already face a similar problem when threads are killed and when computations are aborted via longjmp or other nonlocal exits. The techniques used to implement one-shot subcontinuations can be THREADS YIELD CONTINUATIONS 17 adapted to support one-shot variants of the other continuation mechanisms described in Section 2, including call/cc. Multi-shot variants of these other mechanisms can be supported as well, subject to the complications discussed in Section 4.3. In the absence of concurrency, the asynchronous thread operators would not be needed, since all but the one active thread would be blocked waiting on condition variables. Acknowledgements Comments by Oscar Waddell and anonymous reviewers led to substantial improvements in the presentation of this material. --R A language for concurrent symbolic computation. Synchronization Primitives for a Multiprocessor: A Formal Specifica- tion Representing control in the presence of one-shot continuations Adding Threads to Standard ML. Representing control: A study of CPS transformation. Engines from continuations. Transliterating Prolog into Scheme. The theory and practice of first-class prompts Beyond Continuations. Obtaining coroutines with continuations. Continuations and concurrency. Representing control in the presence of first-class continuations An operating system structuring concept. A Customizable Substrate for Concurrent Languages. A foundation for an efficient multi-threaded Scheme system Continuing into the future: On the interaction of futures and first-class continuations Indefinite one-time contin- uation A dynamic extent control operator for partial continuations. Control delimiters and their hierarchies. An Interpreter for Extended Lambda Calculus. A Portable Multiprocessor Interface for Standard ML of New Jersey. --TR --CTR Steven E. Ganz , Daniel P. Friedman , Mitchell Wand, Trampolined style, ACM SIGPLAN Notices, v.34 n.9, p.18-27, Sept. 1999
continuations;concurrency;control operators;control delimiters;threads
305664
Adaptive Mesh Refinement Using Wave-Propagation Algorithms for Hyperbolic Systems.
An adaptive mesh refinement algorithm developed for the Euler equations of gas dynamics has been extended to employ high-resolution wave-propagation algorithms in a more general framework. This allows its use on a variety of new problems, including hyperbolic equations not in conservation form, problems with source terms or capacity functions, and logically rectangular curvilinear grids. This framework requires a modified approach to maintaining consistency and conservation at grid interfaces, which is described in detail. The algorithm is implemented in the AMRCLAW package, which is freely available.
Introduction The multi-dimensional wave-propagation algorithm described in [14] is a "high-resolution" method that is second order accurate on smooth solutions while maintaining sharp discontinuities through the use of slope-limiters. While based on ideas developed for hyperbolic systems of conservation laws in the context of shock capturing, these methods apply in a more general framework that allows their application to other hyperbolic systems which are not in conservation form. Variable-coefficient hyperbolic systems of the form arise, for example, in studying acoustics or elasticity in heterogeneous materials with varying material properties (see Section 6). For most practical problems, it is desirable to use mesh refinement to cluster grid points in regions where they are most needed, for example around shocks or other regions where the solution Courant Institute, New York University, 251 Mercer St., New York, NY 10012. berger@cims.nyu.edu 2 Department of Applied Mathematics and Department of Mathematics, University of Washington, Box 352420, Seattle, January, 1997. To appear in a special issue of SIAM J. Numer. Anal. dedicated to Ami Harten. Revised July, 1997. has steep gradients or complicated structure. This should be done in an adaptive manner, based on the behavior of the solution, and for time-dependent problems the region of refinement must move adaptively with the interesting structure. An effective adaptive mesh refinement (AMR) strategy has been developed [1-6] that uses Cartesian grids, with refinement in both space and time, over rectangular patches. The refinement is by an arbitrary even integer ratio (typically 4) and further recursive refinement can be done within these patches to an arbitrary depth. This algorithm was originally developed for the Euler equations of gas dynamics using flux-differencing methods, but can be easily extended to other systems of conservation laws. A crucial ingredient is the manner in which fluxes at grid-refinement interfaces are coordinated to insure that the method is globally conservative. This is described in detail in [5] and reviewed in Section 2.1. In this paper we show how the wave-propagation algorithm can be used in conjunction with this AMR strategy. This algorithm is written in a more general form that does not use flux differencing per se, though in the special case of a conservation law the method can be re-expressed in flux- differencing form and is fully conservative. In Section 4 we show that at grid-refinement interfaces it is possible to apply a correction procedure that maintains global conservation when applied on a conservation law (and reduces to the flux-based approach), while retaining the more general wave-propagation framework that allows application on more general hyperbolic systems. We also discuss how further extensions presented in [14] can be incorporated into AMR. This includes source terms, capacity-form differencing, and applications on mapped curvilinear grids. These topics are discussed in Sections 5 and 6. The domain is assumed to be rectangular, at least in computational space. Metric terms can be included so that we are actually solving a problem on a nonrectangular physical domain with a curvilinear grid, obtained by a smooth mapping of the Cartesian computational grid. The grid Jacobian function can be properly incorporated using the "capacity function" described in Section 5.2. The wave-propagation algorithm has been implemented in a general software package (in for- called clawpack (Conservation LAWs PACKage, a holdover from earlier versions that applied only to conservation laws). This package is available from netlib[11]. This software has recently been combined with Berger's implementation of AMR, incorporating the extensions described in this paper. This is now freely available as the amrclaw package[6]. All of the numerical results presented in this paper were obtained with amrclaw, and several such examples are included with the package. Details on the use of this package can be found in the on-line documentation. 2 The AMR algorithm The adaptive mesh refinement algorithm for conservation laws is fully described in [5] and only a brief summary will be given here. The AMR approach to adaptive mesh refinement uses a collection of logically rectangular meshes that make up the coarse grid; refinements cover a subset of the domain and use smaller rectangular grid patches. These fine patches can be recursively nested until a given level of accuracy is attained. Typically, if a patch at Level L is refined in x and y by an even integer RL , then the time step is also refined by the same factor, so that RL time steps must be taken on the refined grid at Level L each step on the grids at Level L. The mesh ratios \Deltat/\Deltax and \Deltat/\Deltay are then the same on all grids, ensuring stability with explicit difference schemes. Every K time steps on a particular grid level, all finer level grids are regenerated in order to follow moving features of the flow. An error estimation procedure based on Richardson extrapolation determines the regions where resolution of the solution is insufficient. This procedure compares the solution obtained by taking 2 steps on the existing grid with one computed by taking 1 time step on a grid that is twice as coarse in each direction. Cells where the error is greater than some tolerance are flagged for refinement. Other criteria might be used in addition to, or instead of, this error estimate, e.g. identifying steep gradients in some variable. A buffer zone around the flagged cells is also flagged to insure that features of interest do not escape from the refinement region over the next K time steps. The buffer width and K are adjustable parameters which must be coordinated. Flagged cells are then organized into rectangular grid patches, typically containing several hundred to several thousand grid points per patch. Note that some cells not tagged for refinement are also included in new fine grid patches. Typically, our grid generation algorithm produces grids with 70% of the cells within new grid patches tagged as needing refinement; the remaining 30% are untagged but still lie within the new patch boundaries. By taking very small patches one could avoid refining too many cells, but this must be balanced with the competing desire to create relatively few separate patches, and to minimize computational overhead on the boundaries of fine grids. See [1] for more details on the refinement and clustering algorithms. See Figure 6 for an example of refinement on logically rectangular patches. An alternative would be to use a quadtree data structure (e.g., [7], [15]) in which only the flagged cells are refined, but the storage overhead of these data structures, typically 30 to 50 words per cell, usually exceeds the storage overhead associated with the block structured approach, even with the 30% additionally refined grid. A finite volume method is used to advance the solution on the resulting grid hierarchy. Cell averages of each variable are stored in each grid cell. When solving a conservation law, these cell averages are updated by a flux-differencing algorithm based on fluxes through the cell edges. (In section 3 we review wave-propagation methods and their extension to nonconservative hyperbolic systems.) The integration proceeds by grid level. All grids on level 1 are first integrated over a time step. Then grids at level 2 are integrated over R 1 time steps to catch up. This approach is applied recursively on each level. Boundary conditions on all grids are imposed using "ghost cells". The computational domain is extended by G ghost cells in each direction, and values are assigned to the ghost cells at the start of each time step. (G=2 for the methods described here). At a physical boundary, the user must set the ghost cell values at each time step based on the problem specification (e.g. extrapolation at an outflow boundary or reflection at a solid wall). However, the boundary of a fine grid may be interior to the domain. In this case, if there is no neighboring fine grid to supply values for the ghost cells, they are interpolated from a coarser parent grid. Space-time interpolation must in general be used since more time steps are taken on the fine grid than on the coarse grid, and at intermediate times there are no coarse grid values available. However, since coarse grids are always advanced first, we have data available from both an earlier and later time on the coarse grid from which to interpolate. The techniques developed in this paper for adaptive refinement are most easily described in one space dimension, where the refined grid patches become intervals. We concentrate on this case in the development below, but all of these techniques carry over directly to multiple space dimensions, and have been implemented in two dimensions in the amrclaw software. Two-dimensional results are presented in Section 6. 2.1 Conservation at grid interfaces At an interface between coarse and fine grids, we must also insure that the formulas used to update the solution on each grid are consistent with one another. In particular, when a conservation law is being solved we must preserve global conservation. To illustrate the conservative flux correction required at grid interfaces, and the manner in which this must be modifed for the wave-propagation algorithms, we will consider the one-dimensional case with only two levels of grid and a factor of two refinement. Denote the coarse grid spacing by h and the time step by k. The grid spacing on the fine grid is - Figure 1(a) shows the coarse grid over a single time step in x-t space. Figure 1(b) shows also the finer grid that is overlaid. We will denote the values on this fine grid by - q i , and assume that there are m cells on this grid, which ends just before cell j on the coarse grid. On the coarse grid we compute fluxes F 0 i as indicated in Figure 1(a), and update the coarse grid values by the flux-differencing algorithm Note that F i represents the flux at the left edge of cell i, which is the interface between grid cells instead of the commonly-used but more cluttered notation F i\Gamma1=2 . On the fine grid we use the fluxes indicated in Figure 1(c). In each of the two time steps on this grid, we will use flux-differencing of the form 2. To compute fluxes near the right edge of this grid, we will need to use values in ghost cells which are also indicated in Figure 1(c). These values are determined using space-time interpolation from the coarse grid values q 0 , as described above. a) PSfrag replacements PSfrag replacements c) PSfrag replacements Figure 1: a) Coarse grid for the one-dimensional example, shown in space-time. Values of q and fluxes F are indicated. b) Also shows the fine grid that is overlaid for and the grid interface. Values of - q on the fine grid are indicated. c) The flux values - F needed on the fine grid. The ghost cells q m+1 and - q m+2 are also indicated. These values are needed to compute the fine grid fluxes at the grid interface. We now need to coordinate the values obtained on the two different grids at the final time. First, in the coarse grid cells overlapped by fine grid cells (i we replace the value q 1 i by the average of the fine-grid values: This is sensible since the fine-grid values are presumably more accurate than the coarse-grid value, and is also crucial in maintaining global conservation when regridding, if the fine grid is eliminated, and important in maintaining stability since information must be allowed to pass from the fine to coarse grid as well as in the other direction. To be fully conservative, however, we also must modify the coarse-grid value q 1 j . In initially computing q 1 j we used the coarse-grid flux F 0 j at the left edge of this cell. To be conservative, we must instead use a left-edge flux that agrees with the flux used in determining the fine-grid values to the left of this cell. Instead of using F 0 , we should use 1( - j is corrected by the difference between the two: We then have global conservation of the total mass at multiples of the coarse grid time step in the sense that the total mass i-m is conserved up to boundary effects at the farfield. 3 The wave-propagation algorithms In one space dimension, the wave-propagation algorithm described in [14] is based on solving a Riemann problem at each interface between grid cells, and using the resulting wave structure to update the solution in the grid cell to each side. This is, of course, the basis for a host of methods for conservation laws, dating back to Godunov's method[8]. The Riemann problem consists of the original conservation law together with piecewise constant initial data defined by the two neighboring cell values. For a wide class of conservation laws, the Riemann problem can be solved (either exactly or approximately) and the solution is a similarity solution consisting of a set of waves propagating at constant speeds. For a system of conservation laws, this solution can be used to define a flux at the cell interface, yielding Godunov's method. Second order accuracy can be achieved in various ways, (e.g. by introducing slope information), and "slope-limiters" or "flux- limiters" are then used to give good resolution of discontinuities without spurious oscillations. See, e.g., [12] for a general discussion of such methods. The wave-propagation algorithms are based on using the waves directly to update cell values, including second order corrections with "wave limiters". For conservation laws these methods can be rewritten in conservation form by defining flux functions in terms of the waves, but they are implemented in a way that allows their application to hyperbolic problems not in conservation form, for which there is still a well-defined wave structure but no flux function. To illustrate this, consider the advection equation with variable velocity, This equation, sometimes called the "color equation", is not in conservation form. The value of q is constant along characteristics but the integral of q is not conserved. Assume u(x) ? 0 everywhere. At the interface x i\Gamma1=2 between cells we can define the Riemann problem as where the function - u(x) and initial data - q are given by where u are cell-centered values of u(x) in cells In the solution to this Riemann problem, the wave W i simply propagates with speed u i (to the right since u ? 0). Over time step k this wave moves distance ku i into cell i, and modifies the cell average The first order upwind method, in wave-propagation form, is thus More generally, if u(x) has arbitrary sign, the first order wave-propagation algorithm is where Alternatively, the Riemann problem might be defined by using an edge value u i\Gamma1=2 at the interface between cells i. The update formula (7) would then become This has advantages in two-dimensional incompressible flow (see [13]), but for illustration here we will use the formulation (7), which is based on the cell-centered velocites (6) rather than edge values. High-resolution second-order corrections are easily introduced, and in fact this can be done in a "flux-differencing" form even for nonconservative equations such as the color equation. This simplifies the procedure for insuring conservation when applied to a conservation law. At the cell interface x i\Gamma1=2 , we define ~ ~ where ~ W i is a limited version of the wave W ~ where limiter(a; b) represents some standard limiter such as minmod or superbee. After including these corrections, the method (7) becomes Note that if u is constant then the advection equation (5) is a conservation law, and in this case reduces to (assuming u ? 0, for example), where This is the numerical flux for a standard flux-limiter method on the advection equation (see [19], for example). In particular, if no limiter is used and ~ reduces to the Lax-Wendroff method. The more general form (9) is not in flux-differencing form, but works just as effectively on the color equation as standard flux-differencing does on the constant-coefficient advection equation. The form (9) is easily extended to general hyperbolic systems. Consider the variable-coefficient linear system where now q 2 lR m and A(x) 2 lR m\Thetam is diagonalizable with real eigenvalues. Then for the Riemann problem at x i\Gamma1=2 we decompose q m) in such a way that left-going waves are eigenvectors of the matrix A i\Gamma1 defined on cell traveling with speeds - p (eigenvalues of A i\Gamma1 ), while the right-going waves are eigenvectors of A i traveling with speeds - p The summation term gives the first-order upwind method, while the ~ are again the second-order corrections defined now by ~ ~ where ~ W i+1 is a limited version of the wave W p obtained by comparing it with W p or with W p details, including a worked example for acoustics in a heterogeneous medium, can be found in [14] and the documentation with [11]. The wave-propagation algorithm is extended to nonlinear systems of conservation laws using a Roe approximate Riemann solver[16], which linearizes the problem at each cell interface in such a way that the wave-propagation approach is guaranteed to be conservative. The general wave-propagation algorithm is written symbolically as represents the right-going "fluctuation" from the i'th Riemann problem, at the left edge of Cell i, while A \Gamma \Deltaq i+1 is the left-going fluctuation from the Riemann problem at the right edge of this cell. Each fluctuation is just the sum over all waves moving in the appropriate direction of the wave speed multiplied by the wave strength. The notation is motivated by the fact that, for the constant-coefficient linear system q t and where A being the eigendecomposition of A, so that is the matrix of right eigenvectors. The waves W p in this case are given by W where the vector of wave strengths is Note that in this linear case A A. For a general conservation law, the method (11) is conservative provided that i.e., the fluctuations are defined by a flux-difference splitting. This is easy to see since we can then define so that Using this in (11) shows that the method can be rewritten in conservation form, with flux F 4 Wave-propagation at grid interfaces At the interface between a fine and coarse grid, the wave-propagation form can still be used to update the values on each grid independently, using "ghost cell" values as needed near grid inter- faces. We can still replace the new coarse grid value by an average of fine grid values in any cell covered by a fine grid. The only tricky part in extending the AMR algorithm to wave-propagation algorithms is the conservative correction of the coarse cells adjacent to finer grids, e.g., the value in Figure 1(b). Recall that with the flux-differencing algorithm this value must be modified by the correction (4) to insure conservation, since then the flux "into" the coarse cell agrees with the total flux "out of " the adjacent fine cells. With the wave-propagation algorithm, we must apply a similar fix-up to insure that the waves match up in an appropriate manner to yield conservation when conservation is expected. This turns out to be only slightly more difficult when no numerical flux is available than for the flux-differencing form discussed in Section 2. Note that the second order correction terms are written in flux-differencing form ~ even for nonconservative systems, and so these terms can again be corrected using (4). It is only the first-order upwind terms written in terms of the fluctuations A \Gamma \Deltaq and A + \Deltaq that must be handled differently, and so we concentrate on the first-order alogrithm below. Both the difficulty and the solution can be most easily seen by examining the constant coefficient advection on the one-dimensional grid of Figure 1, in the case u ! 0, so that waves are moving from the coarse grid to the fine grid. Suppose we are solving the Cauchy problem and the data has compact support while the fine and coarse grids extend off to \Gamma1 and respectively. Then we hope to have conservation in the sense that i-m i-m On the coarse grid we have and when we sum this over the coarse grid cells we get a telescoping of the q-differences everywhere except in the first cell, so that Similarly, after 2 steps on the fine grid, we find that i-m i-m Summing these two results we see that the method is globally conservative only if we add in a correction to this global sum of magnitude This can be accomplished by modifying the value q 1 by Note that this is exactly the modification (4) obtained when the flux-differencing form is used, since for the advection equation Instead of relying on a flux function, we will interpret this correction in another way using wave propagation. Figure 2(a) shows all of the waves which affect the relevant cell values at the end of the time increment, if we only apply the wave-propagation algorithm on each grid separately. something is wrong with this picture. If we view the initial data as defining a piecewise constant function, then we need to solve the Riemann problem at each discontinuity and add the total fluctuation from the Riemann problem \Deltaq) to some grid value(s) in order to maintain conservation. In general A \Gamma \Deltaq is added to the cell on the left, and A + \Deltaq to the cell on the right. As Figure 2(a) shows, we have failed to solve the Riemann problem between states (the ghost-cell value on the fine grid) and q 0 j at the initial time. To restore conservation we must solve the Riemann problem between these states and add in the resulting total fluctuation weighted by - since the time step is - k while the cell size is h, to the cell value j . In terms of maintaining conservation, this sort of correction could equally well be added to some other cell value(s) instead of to q 1 j , but this choice is clearly most reasonable from the figure and agrees with how modifications are applied in the flux-differencing framework. Similarly, in the second step on the fine grid we must also solve a Riemann problem between m+1 and q 0 j and add these fluctuations into q 1 . For the advection example considered above, these two corrections will sum to exactly the required correction (14), since this can be rewritten as This correction is easily extended to an arbitrary hyperbolic system, since we presumably have a Riemann solver that produces A \Gamma \Deltaq and A + \Deltaq from the two states - m+1 and q 0 . We modify q 1 by PSfrag replacements PSfrag replacements Figure 2: a) Waves arising from solving all Riemann problems on the fine and coarse grids sepa- rately. b) The wave arising from solving the Riemann problem between the ghost cell value - q 0 and the coarse grid value q 0 must also be included in order to maintain conservation. A similar modification must be made in each of the R time steps on the refined grid within the single coarse grid step, where R is again the refinement ratio. The fix-up algorithm thus takes the for solve the Riemann problem with data - m+1 and q 0 j to compute A \Gamma \Deltaq and A + \Deltaq, update q 1 \Deltaq). For the case of a conservation law, this will restore conservation and in fact agrees with the flux function modification (4) if numerical fluxes are defined by (13). Note that in view of (12), in the conservation law case the coarse grid value q 1 j is simply updated by the entire flux difference need to actually solve the Riemann problem. However, implementing it as presented above gives a uniform and general formulation. The above idea extends directly to two space dimensions (and also to three dimensions). The multi-dimensional wave-propagation algorithm consists of solving one-dimensional Riemann problems normal to each cell interface. This defines waves and fluctuations exactly as in one dimension. These are used as in the one-dimensional algorithm, and are also used to define "transverse correc- tions" by essentially solving a Riemann problem in the transverse direction using the fluctuations as data. These corrections are needed to give second order accuracy in multi-dimensions as well as to increase the stability limit to allow Courant numbers close to 1. The corrections are fully described in [14]. For our present purposes we need only note that these corrections modify the correction fluxes ~ F (and corresponding y-fluxes ~ G) and are in flux-differencing form, so that they are automatically corrected at grid interfaces in the step (4) where corrections are made due to the fluxes. Numerical experiments demonstrate full second order accuracy for both conservation laws and nonconservative equations, when the above approach is used (along with the second-order correction terms discussed in Section 3). 5 Further extensions The amrclaw software contains some further extensions of the wave-propagation algorithms discussed in [14] and implemented in clawpack. These will be only briefly described here, with emphasis on new issues that arise in connection with mesh refinement. 5.1 Source terms Consider the hyperbolic equation The source terms / can be handled using a standard fractional step method, also called a "splitting method". In this approach, we alternate between solving the homogeneous hyperbolic equation, ignoring the source term, and solving the ODE q In the context of AMR, we need to apply this sequence within each time step on each grid. We must implement this carefully in order to avoid generating excessive noise at the interface which can contaminate the solution. Whenever we solve a Riemann problem we must ensure that the data on each side contains the same total contribution from source terms in order to avoid the generation of spurious waves. This must be carefully observed in computing ghost cell values for the fine grid at intermediate times, and also in solving the additional Riemann problem need for the conservative fix described in Section 4. Recall that this Riemann problem is between the ghost cell values at each intermediate time and the coarse grid value at the original time, but when source terms are included this coarse grid value must be modified to incorporate the correct source contributions. These interface details will be presented below. First we discuss the basic fractional step method that we use on each grid. In each time step we first solve the homogeneous hyperbolic equation over time \Deltat and then use the resulting solution as initial data for the source-term equation over time \Deltat. This is a so-called "first-order" splitting (or "Godunov splitting"), as opposed to the "Strang splitting" in which one advances first by a half time step on one equation, then by a full time step on the other equation, and ends with a half time step on the first equation again[17], [18]. Formally the Strang splitting can give second order accuracy in situations where only first order accuracy is achieved with our choice, but in practical problems where methods of this nature are useful, the differences in resolution actually seen are generally negligible. This is because applying the Strang splitting over N time steps is equivalent to starting with a half time step with one operator, then alternating with \Deltat steps with each until the N'th step, where we finish with a half step of the first operator again. The change made by this minor modification of shifting one half a time step from the beginning to the end of the computation can be formally O(\Deltat), and hence reduce the global accuracy to first order, but clearly will not degrade the overall resolution of the solution to any degree. The solution may simply be shifted by O(\Deltat) relative to its correct location, for example. This is very different from the sort of errors introduced by a genuine first order method, e.g., by using a first order upwind method in place of the high-resolution flux-limiter method. See [14] for more discussion of this point. Using the simpler splitting has a number of advantages in the context of coupling source terms with the hyperbolic solver, particularly with AMR. For one thing it is less expensive, since the source terms are advanced only once per time step instead of twice. (Of course one could combine the half time steps together in the Strang splitting as alluded to above, but this is impractical when variable time steps are used, particularly with adaptive refinement.) The specification of boundary conditions is also simplified. The user-supplied routine that extends values from the computational grid to the ghost cells is called at the beginning of the time step, producing values in the ghost cells that guarantee the physical boundary conditions will be satisfied. For example, the normal momentum must be negated at a solid wall boundary for the Euler equations. Since the hyperbolic equation is advanced first, these conditions are used immediately. Then the source terms are advanced, typically a local ODE solve in each grid cell which does not require using ghost cell values. We do not need to worry about solving the ODE's in ghost cells since these values are replaced immediately at the start of the next time step. Applying the hyperbolic solver first also simplifies the modifications needed at the grid interfaces to minimize noise generation, and the algorithm is a fairly simple extension of what has been presented already. Let H(k) represent the solution operator for the hyperbolic equation and S(k) the solution operator for the source terms. Then the fractional step method over one time step on a single grid takes the form Now consider a refined grid, with refinement ratio R. As before, let - q represent the solution on the fine grid, where the time step is - k, and let q be the coarse grid solution with time step k. The algorithm is then: Coarse grid update: # Initialize coarse grid value needed for conservation fix-up: Advance fine grids: for Space-time interpolate the ghost cell values - m+2 using q 0 and q 1 Conservation fix-up: Solve the Riemann problem with data - m+1 and q 0;N j to compute A \Gamma \Deltaq and A + \Deltaq Apply source terms to coarse grid value: This is basically a direct extension of the algorithm described previously except for the final step, which ensures that the Riemann problem solved in the correction phase has consistent data at each fine time step. Numerical tests have shown that this approach performs quite well. Attempts with other styles of splitting, e.g., the Strang splitting, or the Godunov splitting with the order of H and S reversed, were much less successful. To gain a better appreciation of how mismatches at the interface can generate noise, the reader is encouraged to explore various strategies on the simple scalar equation with constant advection speed u and data q that is initially constant in space. If a numerical ODE method is used to solve q than using the trivial exact solution operator), then any approach will lead to the generation of noise at the interface simply because this ODE will be solved more accurately on the fine grid than on the coarse grid, leading to jumps in q at the interface and hence to waves propagating at speed u. The approach outlined above will only generate O(k 2 ) noise, as long as the ODE solver is at least first order accurate, whereas any other approach considered would generate O(k) noise. 5.2 Capacity-form differencing The wave-propagation algorithm in [14] is also described in a more general form that applies to a quasilinear equation of the form in one dimension, with obvious generalization to more dimensions. Here the function -(x) is called the "capacity function" since it represents in some way the capacity of the medium to hold the quantity q. Working in this form is particularly useful for equations in the conservation form where it is -(x)q(x; t) that is the conserved quantity rather than q alone, while the flux is defined in terms of q. As a one-dimensional example consider flow through a variable-area duct where -(x) is the cross-sectional area and q represents concentration per unit volume. In this case - i h is the volume of the i'th grid cell. Flow in porous media is another example, where - represents the porosity in one or more dimensions. This form also arises in using mapped curvilinear grids, in which case - is the Jacobian of the grid transformation. More details are presented in [14]. The idea of capacity-form differencing is to replace the update formula (11) by In the case of a conservation law, assuming (12) holds, this guarantees conservation of h In the definition of ~ must also incorporate - i into the second order corrections, replacing (10) by ~ h- i ~ Using capacity-form differencing with AMR is direct, provided we insure that conservation is maintained in transferring information between grids. Returning to Figure 1(b), suppose we have capacities - i defined on the coarse grid and - defined on the fine grid. In a region where the two grids overlap, we assume that these values are consistent. For example, in Figure 1(b) we should have so that the capacity of this coarse grid cell agrees with the total capacity of the two fine cells: h- When updating the coarse grid value q 1 by the average of the fine grid values - q 2 we must weight by the capacity functions and replace (3) by -m Finally, in the grid-interface correction (15), we replace h in the denominator by - j h. 6 Numerical Results We present AMR computations on some examples from [14] to illustrate that source terms, nonconservative hyperbolic systems, capacity form differencing, and curvilinear grids can all be successfully handled. Further examples can be found on the amrclaw webpage[6], including some animations. Example 6.1. We repeat Example 3.8.3 from [14], which consists of the linear equations of acoustics (a hyperbolic system of 3 equations) with a discontinuity in the sound speed across a line oblique to the grid. A plane wave strikes the interface at some angle, leading to transmitted and reflected waves. The time-evolution is best seen in Figure 4. The acoustics equations for the pressure perturbation p and velocities u and v can be written where The coefficients are the density ae(x; y) and bulk modulus of elasticity K(x; y). In the example ae has a discontinuity across the interface while K is constant. The Riemann solvers for this system in the wave-propagation form are given in [14]. Figure 4(a) shows a contour plot of the initial pressure, a cosine hump as in [14] moving towards the upper right. The dashed line shows the location of the discontinuity in sound speed. The heterogeneous material is described by a density and bulk modulus of elasticity, and here the bulk replacements Figure 3: Pressure contours for a plane wave hitting a discontinuity in sound speed in the acoustics equations, at time 0:6. The finer grids are shaded, with darker shading indicating finer levels. Three levels are used with a 76 \Theta 50 grid at the coarsest level and refinement by a factor of 2 in each level. modulus is taken to be constant while the density is discontinuous, leading to the discontinuity in sound speed. In each grid cell the density is defined as the cell average of the true density over that cell. In [14] it is shown that the wave-propagation algorithm handles this problem well even when the discontinuity in density is not aligned with the grid. Figure 3 shows an amrclaw calculation where the coarsest grid is 76 \Theta 50 and two levels of refinement are used with that the finest grid compares with the resolution seen in the lower plots of Figure 8 of [14]. The tolerance used here was chosen in such a way that the weaker reflected wave has only been refined to Level 2. A smaller tolerance would cause Level 3 refinement of this wave as well. Here we have used a ratio of 2 for refinement in each level for demonstration purposes. Example 6.2. The previous example does not fully test the new interface conditions between the fine and coarse grids in the nonconservative case. These acoustics equations fail to be in conservation form only along the interface where the density is discontinuous, and the wave stays embedded in Level 3 grids as it moves along this interface. As a more severe test we repeated this computation with a simple change in the error estimation procedure so that points are flagged for refinement only if x ! 0:6. For x ? 0:6 there is only the coarsest grid, so the wave moves from the initial fine grids onto the coarse grid as time advances. Figure 4 shows a sequence of times ending with the time shown in Figure 3(b). Some smearing of the wave is seen on the coarser grid, which is inevitable, but no difficulties are observed along the discontinuity in density. Example 6.3. We repeat Example 3.10.1 from [14]. This is the advection equation for a tracer q(x; t) in a density-stratified flow over a hump. We take u(x; y); v(x; y)) to be a fixed (a) 1.2 1.40.10.30.50.70.9pressure at (c) 1.2 1.40.10.30.50.70.9pressure at 1.2 1.40.10.30.50.70.9pressure at Figure 4: Pressure contours for a plane wave hitting a discontinuity in sound speed in the acoustics equations, at four different times. In this test refinement was allowed only for x ! 0:6 so that the wave moves out of the refined region. velocity field, chosen so that while aeq is the conserved quantity. In the test problem we consider flow over a hump with the bottom topography given by in the domain 1). The velocity field is chosen by using the "stream function" to define so that condition (21) is satisfied. Dividing by ae gives the velocity field. Note that (u; v) is not divergence free and / is not a stream function for this velocity, though it is true that contours of constant / give streamlines of the flow. We use the density profile as in [14], so that the velocities increase exponentially with y. In the test below we use 2:5. Figure 5 shows the initial data and exact solution at time data consisting of a circular blob of tracer: The problem is solved on a curvilinear grid. The irregular region of the x-y plane that can be mapped smoothly to a rectangle. Then equation (20) can be transformed to an advection equation on the rectangle and solved on a uniform Cartesian grid in this computational - \Gamma j space. Here we use "Grid 2" of [14], with the mapping Capacity-form differencing is used where being the Jacobian of the grid mapping, as explained in [14]. Figure 6 shows computed results with 3 levels of refinement and refinement ratio 2 in each case. The finest grid has the same resolution as the calculation shown in Figure 10 Figure 5: Density-stratified flow over a hump. Left: initial data is 1 inside the circular region and elsewhere. The region where the solution is 1 at time Computed results on a 200 \Theta 100 Cartesian grid. (From [14]) Conclusions An adaptive mesh refinement algorithm developed for the Euler equations of gas dynamics has been extended to employ high-resolution wave-propagation algorithms in a more general framework. In particular, we have discussed the modifications needed to allow the application of this method to hyperbolic problems which are not in conservation form, following the approach of [14]. This has been done in a way that still maintains conservation when applied to a conservation law, in spite of the fact that a wave-propagation approach is used to update cell averages rather than standard flux-differencing. A generalization of this has also been presented for fractional step methods on hyperbolic equations with source terms. We have also discussed extensions to capacity-form differencing. This formulation is useful in applying the methods on curvilinear grids, where refinement is done on logically rectangular patches. This is illustrated in Section 6 for one example with the advection equations. In the future we intend to explore the use of curvilinear grids more fully for nonlinear conservation laws such as the Euler equations, since body-fitted curvilinear grids are crucial for some applications. Adaptive mesh refinement is even more crucial in solving three-dimensional problems than in two space dimensions. Recently clawpack has been extended to three dimensions [9], [10] and work is underway to extend the amrclaw version. The underlying AMR code for the Euler equations has previously been successfully extended to three dimensions (e.g., [1], [20]) and the ideas presented in this paper carry over easily as well. title (b) -0.5 -0.4 -0.3 -0.2 -0.1 0 0.10.50.70.9PSfrag replacements Figure (a) Computed density at time stratified flow over a hump. Contour levels are at 0:05; 0:95. Compare to Figure 10 in [14]. (b) A blow-up of the grids near the top of the hump. Acknowledgments . We are indebted to Smadar Karni for pointing out the difficulty of maintaining conservation at grid interfaces with the wave-propagation framework. This led to the development of some of the ideas presented here. This work was supported in part by NSF Grants DMS-9505021, DMS-96226645, and DOE Grants DE-FG03-96ER25292, DE-FG02-88ER25053, DE-FG02-92ER25139, and AFOSR grant F49620-94-0132. --R Three dimensional adaptive mesh refinement for hyperbolic conservation laws Adaptive mesh refinement for hyperbolic partial differential equations Automatic adaptive grid refinement for the Euler equations Adaptive mesh refinement for hyperbolic partial differential equations Local adaptive mesh refinement for shock hydrodynamics A test version is available at http://www. An adaptively-refined Cartesian mesh solver for the Euler equa- tions available from netlib. Numerical Methods for Conservation Laws Wave propagation algorithms for multi-dimensional hyperbolic systems Solution of the Euler and Magnetohydrodynamic Equations on Solution-Adaptive Cartesian Grids On the construction and comparison of High resolution schemes using flux limiters for hyperbolic conservation laws Some Aspects of the Computational Dynamics of Colliding Flows in Astrophysical Nebulae --TR --CTR Lars Ferm , Per Ltstedt, Space---Time Adaptive Solution of First Order PDES, Journal of Scientific Computing, v.26 n.1, p.83-110, January 2006 K. W. Liang , P. Lin , R. C. E. Tan, Numerical solution of quenching problems using mesh-dependent variable temporal steps, Applied Numerical Mathematics, v.57 n.5-7, p.791-800, May, 2007 Zhijun Tan , Zhengru Zhang , Yunqing Huang , Tao Tang, Moving mesh methods with locally varying time steps, Journal of Computational Physics, v.200 n.1, p.347-367, 10 October 2004 Ding , C. Shu, A stencil adaptive algorithm for finite difference solution of incompressible viscous flows, Journal of Computational Physics, v.214 n.1, p.397-420, 1 May 2006 James A. Rossmanith, A wave propagation method for hyperbolic systems on the sphere, Journal of Computational Physics, v.213 R. Blikberg , T. Srevik, Load balancing and OpenMP implementation of nested parallelism, Parallel Computing, v.31 n.10-12, p.984-998, October - December 2005 Ragnhild Blikberg , Tor Srevik, Nested parallelism: Allocation of threads to tasks and OpenMP implementation, Scientific Programming, v.9 n.2,3, p.185-194, August 2001 Yuan , Tao Tang, Resolving the shock-induced combustion by an adaptive mesh redistribution method, Journal of Computational Physics, v.224 n.2, p.587-600, June, 2007 Siegfried Mller , Youssef Stiriba, Fully Adaptive Multiscale Schemes for Conservation Laws Employing Locally Varying Time Stepping, Journal of Scientific Computing, v.30 n.3, p.493-531, March 2007 Nail K. Yamaleev , Mark H. Carpenter, On accuracy of adaptive grid methods for captured shocks, Journal of Computational Physics, v.181 n.1, p.280-316, September 1 2002 Alexei Y. Poludnenko , Alexei M. Khokhlov, Computation of fluid flows in non-inertial contracting, expanding, and rotating reference frames, Journal of Computational Physics, v.220 n.2, p.678-711, January, 2007
software;finite-volume methods;hyperbolic conservation laws;gas dynamics;high resolution;godunov;adaptive mesh refinement;acoustics
305727
Three-Processor Tasks Are Undecidable.
We show that no algorithm exists for deciding whether a finite task for three or more processors is wait-free solvable in the asynchronous read-write shared-memory model. This impossibility result implies that there is no constructive (recursive) characterization of wait-free solvable tasks. It also applies to other shared-memory models of distributed computing, such as the comparison-based model.
Introduction A fundamental area in the theory of distributed computation is the study of asynchronous wait-free shared-memory distributed algorithms. Characterizing the class of distributed tasks that can be solved, no matter how "inefficiently", is an important step towards a complexity theory for distributed computation. A breakthrough was the demonstation by Fisher, Lynch, and Paterson [FLP85] that certain simple tasks, such as consensus, are not solvable. Subsequently, Biran, Moran, and Zaks [BMZ88] gave a complete characterization of the tasks solvable by two processors and of tasks that can be solved when only one processor can fail. Recently, three teams [BG93, HS93, SZ93] independently extended this result by providing powerful necessary conditions for task solvability which enabled them to Computer Science Department, UCLA show that the k-set agreement task is not solvable for more than k processors. Finally, Herlihy and Shavit [HS94] gave a simple condition that is necessary and sufficient for a given task to admit a wait-free protocol. This condition was extended by Borowsky and Gafni [Bor95] to the more general model of asynchronous distributed computation of resiliency and set-consensus. Here, we put the quest for complete characterization of solvable tasks to an abrupt end by showing that there is no recursive characterization of wait-free tasks. More precisely, we show that the problem of deciding whether a given finite task for three or more processors admits a wait-free protocol is undecidable. We also show that this holds for the comparison-based model (when processors can only compare their IDs). An immediate consequence of our result is that for any recursive function f(s) there are finite solvable tasks of size (number of input-output tuples) s that cannot be solved by any protocol in less than f(s) steps. Unfortunately, this may hamper the development of a "complexity theory" of asynchronous distributed computation. Our proof exploits a surprising connection between distributed computation and topology. In particular, we give a reduction from the contractibility problem to the task-solvability problem. The contractibility problem asks whether a given loop of a simplicial complex is contractible, that is, whether it can be continuously transformed into a point. The history of the contractibility problem goes back to Poincar'e and Dehn at the beginning of the twentieth century (see [Sti93]). Dehn [Deh10] noticed that the contractibility problem is equivalent to the word problem of groups - given a word of a group as a product of its generators, decide whether it is equal to the identity. The relation between the contractibility of a loop and the word problem comes from the fact that a loop of a complex is contractible iff the corresponding word of the fundamental group of the complex is the identity. Dehn gave an algorithm (Dehn's algorithm) for the contractibility problem when the complex is a surface; for some recent interesting results for this special case see [DG95]. Attempts to extend Dehn's algorithm to higher dimensional manifolds made no substantial progress, however, for the very good reason that, as Novikov [Nov55] showed in 1995, the word problem is undecidable. The equivalence between the contractibility problem and the word problem of groups is based on the fact that every group with a finite representation (with generators and relations) is the fundamental group of a finite simplicial complex. Since the fundamental group depends only on the 2-skeleton of a complex (the collection of all simplices of dimension 2 or less), it follows that the contractibility problem is undecidable even for 2-dimensional complexes. It is also known that every group with finite representation is the fundamental group of some 4-dimensional manifold [Mas67]. Thus, the contractibility problem is undecidable even for 4-dimensional manifolds. Our main result is a reduction from the contractibility problem to the task-solvability problem. We outline the ideas behind this reduction here. The Herlihy-Shavit condition [HS96] for task solvability is that a task is solvable iff there is a chromatic subdivision of the input complex that maps simplicially to the output complex, is consistent with the input-output relation (carrier-preserving), and preserves colors. Here we consider a class of simple 3-processor tasks that is restricted to those whose input complex consists of a single triangle (2-simplex). In addition, these tasks have the property that whenever less than three processors participate, they must output a simplex of a fixed loop L of the output complex. The Herlihy- Shavit condition implies that if the task is solvable, then L is contractible. In fact, if we drop from the Herlihy-Shavit condition the restriction that the map must be color-preserving, the opposite would be true: L is contractible if the task is solvable. The difficult part of our reduction, then, is to extend this relation to the case of chromatic complexes and color-preserving simplicial maps. To do this, we proceed in stages. We first show that the contractibility problem remains undecidable for loops of length 3 of chromatic complexes. The final reduction is to take a chromatic complex with a loop of length 3 and transform it into a 3-processor task that is solvable iff the loop is contractible. In Section 2, we discuss the solvability problem, present the Herlihy- Shavit condition, and define the special class of tasks that we consider in this paper. In Section 3, we discuss the contractibility problem and strengthen the result that the contractibility problem is undecidable for the special case of chromatic complexes and loops of length 3. We give a reduction from this stronger version of the contractibility problem to the task-solvability problem in Section 4. The results from Section 3 and the Herlihy-Shavit condition are then used to prove that the reduction works. We conclude by discussing some of the implications of our results. 2 The task-solvability problem We will use standard terminology from algebraic topology (see [Mun84]). All complexes considered here are finite and pure, that is, all maximal simplices have the same dimension (usually 2-dimensional). In topology, a simplex is defined by a set of n but in the theory of distributed computation, a simplex represents a consistent set of views of n processors. The natural ordering of processors (according to their IDs) imposes structure on the complexes in that their simplices are ordered. This order defines a natural coloring of the vertices of the complex, colors represent the rank of the ID of a processor. More precisely, a coloring of a n-dimensional simplicial complex is an assignment of colors ng to its vertices such that each vertex receives exactly one color and vertices of each simplex receive distinct colors. A chromatic simplicial complex is a simplicial complex together with a coloring. A distributed task is a natural generalization of the notion of a (com- putable) function for the model of distributed computation. The computation of functions by a distributed system imposes such tight coordination of processors that only trivial functions can be computed wait-free by asynchronous distributed systems. Mainly for this reason, the study of distributed computation is focused on computing relations, a natural generalization of functions which requires less tight coordination of processors. In general, a distributed task is an input-output relation. Because in a distributed system some processors may take no steps at all, the task input-output relation must be defined on partial inputs and outputs. This requirement is captured nicely by assuming that the inputs form a chromatic simplicial complex. The vertices of a simplex of this complex denote the inputs to a subset of processors, the participating processors [HS96]. Simi- larly, the possible outputs of a distributed task form a chromatic simplicial complex. distributed task for n+1 processors is a nonempty relation T between the simplices of two n-dimensional chromatic complexes I, O, I \Theta O, which preserves colors; that is, when have the same colors (and therefore the same dimension). A distributed task is solvable when there is a distributed protocol such that the input to processor with ID k is a vertex of I with color k, its output is a vertex of O of color k, the set of the input vertices form a simplex A 2 I , and the set of output vertices form a simplex B 2 O with In other words, the participating processors get vertices of an input simplex and output vertices of a simplex of the output complex such that the input simplex and the output simplex form a pair of the task input-output relation. Each processor knows only its vertex, not the whole input simplex. Finding out the input simplex is usually impossible, because that task is equivalent to the consensus problem, which is not solvable. Of course, the notion of solvability depends on the computational model. Here, we consider the standard computational model of wait-free protocols for shared read-write memory. In a wait-free protocol, a processor must produce a valid output even when all other processors fail. A typical distributed task is shown in Figure 1. The input complex I contains only one triangle fa; b; cg, and the output complex O is a subdivided triangle. The numbers on the vertices are colors. The input-output relation I \Theta O contains the tuples (fa; b; cg; fx; of O (there are seven such triangles); it also contains all possible color- preserving tuples of simplices of the boundaries of I and O. a 2 I O a c a 1 Figure 1: A standard inputless task. A problem central to the theory of distributed computation is the characterization of the set of solvable tasks. This problem has a trivial negative answer: whether a 1-processor task is solvable is equivalent to whether the task, that is, the input-output relation, is recursive (computable); a similar observation was made in [JT92]. However, this is an unsatisfactory answer because it sheds no light on the difficulties inherent in distributed compu- tation. Furthermore, many interesting distributed tasks are straightforward input-output relations. The interesting question, then, is whether a characterization of "simple" tasks exists. Here, we show that the answer for three or more processors remains negative, even for the simplest kind of tasks - finite tasks with a trivial input complex. For less than three processors, it is known that there exists a simple characterization for finite tasks of two processors that reduces the task-solvability problem to the connectivity properties of the output complex [BMZ88]. Our proof uses the Herlihy-Shavit condition for task solvability. Roughly speaking, this condition entails that a subcomplex of the output complex is "similar to" the input complex. To state the condition precisely, we need a few definitions: Consider a chromatic complex C and a subdivision C 0 of C (a subdivision of a complex is a refinement of it; see, for example, [Mun84, page 84]). For a simplex A 2 C 0 , its carrier, carrier(A), is the smallest simplex of C that contains A. The complex C 0 is a chromatic subdivision of C if it is chromatic and its coloring has the property that each vertex has the color of some vertex of carrier(u). Proposition 1 (Herlihy-Shavit) A task T ae I \Theta O is solvable wait-free iff there exists a subdivision I 0 of I and a color-preserving simplicial map O such that for each simplex A 2 I 0 there exists a simplex B 2 O with A map - that satisfies the above condition will be called carrier-preserving and color-preserving. Proposition 1 provides a powerful tool for checking whether a particular task is solvable. For example, by applying the Herlihy-Shavit condition, we can conclude immediately that the task of Figure 1 is wait-free solvable. To see this, notice that in this case, we can take the subdivision I 0 to be the output complex and the map - to be the identity map. 1 If, however, we create a "hole" in the output complex by removing the triangle the resulting task is not solvable; intuitively, the map - cannot create a "torn" image of I . The main result of our paper is to show that the condition of Proposition 1 is not constructive, namely, there is no effective way to find I 0 from computing - is easy, since one can try all possible simplicial maps from I 0 to O. We will restrict our attention to the simple case of tasks of three Strictly speaking, I 0 is combinatorially homeomorphic to O and - is this homeomorphism processors, 2. In this case, the simplices are triangles and the simplicial complexes are of dimension 2. For this dimension, our intuition about topological facts is usually correct; exactly the opposite is true for higher dimensions. We introduce one further simplification: We will deal only with tasks where the input complex consists of only one triangle. Furthermore, for each proper face of the input triangle there is exactly one possible out- put. In particular, there is a loop L of the output complex that has length 3 such that when less than three processors participate in the execution, the processors must output a simplex of L, and this simplex is unique because of the coloring requirements. When all three processors participate, the output can be any simplex of the output. We will call such a task a standard in- putless task (O; L). The task of Figure 1 is an example of such a task. Since the input to each processor is fixed, we interpret a standard inputless task as follows: processors do not really get any input; rather, they simply execute a protocol in order to "agree on" some triangle of the output complex O. This could be trivially achieved (by agreeing on a triangle in advance), except for the difficulty that when some processors do not participate, the output simplex must belong to the loop L. For a standard inputless task, the Herlihy-Shavit condition can be re-stated as "the task is solvable iff there is a chromatic subdivision I 0 of a triangle I and a color-preserving simplicial map - that maps the boundary of I 0 to the loop L and that can be extended over I 0 ." The coloring restrictions imply that the simplicial map - maps the boundary of I 0 only once around L. Putting it differently, the requirement that - is color-preserving guarantees that it is also carrier-preserving. If we disregard colors for the moment, a standard inputless task is solvable iff there is a carrier-preserving simplicial map - from the boundary of a subdivided triangle I 0 to the loop L which can be extended over the whole triangle. This condition shows the close connection between task solvability and the contractibility problem, because such I 0 and - exist iff the loop L of the output complex O is contractible (we will elaborate on this connection in Section 4). It is not, however, immediate that this observation holds for the special case of chromatic complexes and color-preserving simplicial maps. Here, we extend this connection to the chromatic case by a series of reductions. 3 The contractibility problem Let X be a topological space. A loop L of X is a continuous map from the 1-sphere to X . Two loops L and L 0 are homotopic, when L can be continuously deformed to L 0 . More precisely, L and L 0 are said to be homotopic if there exists a continuous that F (x; loop is one without self-intersections (when the map is an injection). A loop L is null-homotopic, or contractible, when it is homotopic to a constant loop; the image of a constant loop is a point. Equivalently, loop L is null- homotopic when it can be continuously deformed to a point [ST80, page 158]. For example, in Figure 2 the loop L 1 is null-homotopic, while the loop L 2 is not. Figure 2: Contractible (L 1 ) and non-contractible (L 2 ) loops. Let C be a simplicial complex, that is, a collection of simplices in the Euclidean space R m . The polytope jCj of C is the underlying Euclidean space consisting of the union of the simplices of C. A loop of a complex C is a simplicial loop of its polytope jCj. Thus, the image of a loop is a sequence of edges (v 1 image of a null-homotopic loop is simply a vertex v). We usually do not distinguish between the loop of a complex and its image (as we have done many times so far); so, for example, we can refer to a simplex of the loop when we really mean a simplex of the image of it. To show that task solvability is undecidable, we will use the standard technique of reducing a known undecidable problem to it. In our case, this problem is the contractibility problem [Sti93]. Definition 2 The contractibility problem is defined as follows: given a simplicial complex C and a loop L of C, is L null-homotopic? For this definition to be complete, we need to fix the representation of C and L. Since we are only interested in whether the problem is decidable, the details of the representation are not important. For our purposes here, we assume that C and L are given explicitly by their simplices. There is an important connection between the homotopic properties of loops and group theory, through the fundamental group of a complex. In particular, a loop is null-homotopic iff the corresponding word of the fundamental group is equal to the identity. This connection between contractibility and group theory results in the following proposition. Proposition 2 The contractibility problem is undecidable for 2-dimensional complexes. This folklore result is based on the fact that for every group G with a finite representation with generators and relations, there exists a finite simplicial complex with fundamental group G. This complex can be easily constructed from G (see, for example, [Sti93, page 129]). In fact, something stronger holds: each group G is the fundamental group of a 4-dimensional simplicial manifold [Mas67, pages 143-144]. This means that the contractibility problem is undecidable for 4-dimensional manifolds. In contrast, for 2-dimensional manifolds (e.g., sphere, torus, projective plane), it is decidable [Deh10]. Some recent work on this special case has led to a linear-time algorithm for almost all 2-dimensional manifolds [DG95]. The contractibility problem for 3-dimensional manifolds is, to our knowledge, still unresolved; however, it is known that not every group with finite representation can be the fundamental group of a 3-dimensional manifold. Notice also that Proposition 2 refers to 2-dimensional complexes. This is based on the fact that the fundamental group of a complex of any dimension is identical to the fundamental group of its 2-skeleton. Since every group can be the fundamental group of a complex, the contractibility problem is equivalent to the word problem of groups. The word problem asks whether a word of a group (as a product of its generators) is equal to the identity [Sti93, page 46]. Novikov [Nov55] showed that the word problem is undecidable: there exists a group G such that no algorithm can decide whether a word of this group is equal to the identity (for a textbook proof see [Rot95, chapter 12]). Notice that the group G need not be part of the input, although for our purposes the weaker version of the result when the group is part of the input will suffice. We will make use of a stronger version of Proposition 2. We first observe that the contractibility problem is undecidable for link-connected 2- dimensional complexes. A simplicial complex is link-connected when the link of every vertex is connected (the link of a vertex is the subcomplex induced by its adjacent vertices). To see that the contractibility problem remains undecidable for link-connected complexes, notice that it is undecidable for the 2-skeleton of 4-manifolds, and clearly these complexes are link-connected. Therefore we have the stronger proposition: Proposition 3 The contractibility problem is undecidable for link-connected 2-dimensional complexes. Link-connectivity must be preserved by all our reductions, but we will not use it until the last part (Lemma 3) of the proof of the main result. The plan for reducing this undecidable problem to the task-solvability problem is as follows: First, we strengthen Proposition 3 to chromatic complexes and loops of length 3. A chromatic complex together with a loop of length 3 defines a standard inputless task. Using the Herlihy-Shavit condi- tion, we then show that this task is solvable iff the loop is contractible. We begin by showing that Proposition 3 holds for nonsingular loops (i.e., loops without self-intersections). Lemma 1 The contractibility problem is undecidable for nonsingular loops of link-connected 2-dimensional complexes. Proof. Given a link-connected 2-dimensional simplicial complex C and a loop L of C, we create a new complex C 0 and a singular loop L 0 of C 0 such that L is null-homotopic iff L 0 is null-homotopic. The idea is that C 0 can be produced by attaching an annulus (ring) A to C: one boundary of A is identified with the loop L, and the other boundary is a nonsingular loop L 0 (see Figure 3). The annulus A is free of self intersections except for points of L. We claim that L is contractible in C iff L 0 is contractible in C 0 . But first we need a definition. A topological space Y is a deformation retract of a topological space X , Y ae X , iff there is a continuous A Figure 3: Reduction to nonsingular loop. such that for all x 2 X , f(x; all t, f(y; y. If Y is a deformation retract of X then Y and X have the same homotopy type [Mun84, page 108]. It is clear that jCj is a deformation retract of jC 0 j: f gradually collapses the annulus jAj to the loop jLj keeping jCj fixed. It follows that jCj and jC 0 j have the same homotopy, and therefore L is contractible in C iff it is also contractible in C 0 . The claim follows from the fact that L and L 0 are homotopic in C 0 . A minor issue is that the annulus A must be constructed explicitly. We give here one such construction. Let be the edges of L (some of them may be identical when part of the loop retraces itself). The boundary of annulus A identified with L contains vertices such that y i will be identified with x i . The other boundary, contains distinct vertices z . The triangles of annulus A are fy fy We have to verify that these are indeed triangles (i.e., all vertices are distinct) and that annulus A is free of self-intersections except for points in L. Some of the vertices x i of L may be identical, because the loop L may cross or even retrace itself. However, since is an edge of L, it follows that y i and y i+1 are distinct and therefore that the given triangulation of annulus A is valid. It is also easy to verify that annulus A has no self-intersections outside L. Finally, we have to verify that the new complex C 0 is link-connected. It is clear that the links of vertices not in L are connected. Consider now the link lk(x i ) of a vertex x i 2 L. Since C is link-connected, every vertex of connected through lk(x i ) to x i\Gamma1 and to x i+1 . In particular, x are connected through lk(x i ) (or they are identical). Similarly, every vertex in A " lk(x i ) is connected to x i\Gamma1 or to x i+1 . Therefore, lk(x i ) is connected. This lemma allow us to consider only nonsingular loops. We may sometimes treat a nonsingular loop L of a complex C as the 1-dimensional subcomplex of C consisting of the edges of L. We are now ready to strengthen Proposition 3 to chromatic complexes and loops of length 3. Theorem 1 The contractibility problem is undecidable for loops of length 3 of link-connected 2-dimensional chromatic complexes. Proof. Consider a link-connected 2-dimensional simplicial complex C and a nonsingular loop L of it. We will show how to produce a chromatic complex C 0 and a loop L 0 ae C 0 of length 3. Figure 4: The chromatic barycentric subdivision. Producing a chromatic complex is easy. Let bsd C denote the barycentric subdivision of the simplicial complex C [Mun84, page 85]. We can color the simplicial complex bsd C with three colors as shown in Figure 4. Original vertices of C are colored with 0, vertices on the edges - with carrier an edge - with 1, and the remaining vertices - with carrier a triangle - with color 2. With this coloring, bsd C becomes a chromatic complex. The nonsingular loop L of C corresponds to a nonsingular loop bsd L of the chromatic complex bsd C. Clearly, L is null-homotopic in C iff bsd L is null-homotopic in bsd C 0 . Notice also that the vertices of bsd L have colors 0 or 1.01021 x bsd L x k\Gamma2 z 0 Figure 5: Reduction to loops of length 3. Finally, to produce a complex C 0 and a loop L 0 of length 3, we employ the reduction of Lemma 1: C 0 is the result of attaching a chromatic annulus A to the nonsingular loop bsd L. Let the edges of bsd L. One boundary of the chromatic annulus A is identified with bsd L, while the other boundary L 0 contains 3 vertices, z colors 0, 1, and 2, respectively. There is also an internal vertex u of A with color 2. The chromatic annulus A is shown in Figure 5 (again, numbers on vertices indicate colors). We omit its precise description here since the reader can easily derive it from the figure. It remains to verify that A is an annulus without self-intersections, and this follows directly from the fact that bsd L is nonsingular. Note that this is the only place where we need Lemma 1. We could actually use a simpler construction by letting L 0 to be the loop but the construction of Figure 5 is consistent with the proof of Lemma 1. An argument identical with that of the proof of Lemma 1 establishes that the complex C 0 is link-connected and that L 0 is null-homotopic iff L is null-homotopic. The theorem follows from Lemma 1. The requirement that loop L has length 3 is a "technical" detail. We could prove our main result by simply considering loops L where, instead of an edge (z there is a chromatic path between z i and z i+1 . The restriction to loops of length 3 results in simpler constructions and proofs, however. 4 Reduction to task-solvability To show that task-solvability for three processors is undecidable, we will reduce the stronger version of the contractibility problem of Theorem 1 to the task-solvability problem. The reduction is straightforward. Given a link- connected 2-dimensional chromatic complex C and a loop L of length 3, the output is the standard inputless task We will show that the loop L is contractible in C iff the standard inputless task (C; L) is solvable. The proof is based on the two following lemmata: be a standard inputless task. Loop L is contractible in C iff there is a subdivision I 0 of the input triangle I and a simplicial that is carrier-preserving. Proof. Notice first that we require neither that I 0 be a chromatic subdivision nor that - be color-preserving. It follows directly from the definition of null-homotopic loops that loop L is contractible in C iff there is a continuous map OE from a disk B to jCj that maps homeomorphically the boundary of the disk to jLj. Since the triangle I is homeomorphic to a disk, L is contractible in C iff there is a continuous map from I to jCj that maps its boundary to the loop jLj homeomorphically (and, therefore, simplicially). The problem with this definition is that OE is a continuous map, not a simplicial one. However, a fundamental result from algebraic topology, the Simplicial Approximation Theorem [Mun84, page 89], allows us to replace the continuous map OE with a simplicial one. By the Simplicial Approximation Theorem, there is a subdivision I 0 of the triangle I and a simplicial map that approximates OE. It suffices, therefore, to verify that / is also carrier- preserving. By the definition of simplicial approximations, for each point x of I , /(x) is a vertex of the smallest simplex of C that contains OE(x). Since OE maps simplicially the boundary of I to jLj, all points of an edge of I are mapped to the same edge OE(E) of L. Thus, the vertices of I 0 with carrier E are mapped by / to vertices of OE(E), which shows that / is carrier-preserving. shows the close connection between the contractibility of loops and the solvability of tasks. However, it only requires that the map / be carrier-preserving, while the Herlihy-Shavit condition requires the map to be chromatic too. The following lemma shows that this is not a problem. be a standard inputless task, where C is link- connected. If there exists a subdivision I 0 of the input triangle I and a carrier-preserving simplicial map there exists a chromatic subdivision A of I and a simplicial map - : A 7! C that is both carrier- preserving and color-preserving. Proof. The proof here is an adaptation of the proof of a similar result in [HS96, Lemma 5.21]. The basic idea is that the colors of C induce a coloring of I 0 . A vertex u 2 I 0 is assigned the color of its image /(u) 2 C. We call such a coloring of I 0 /-induced. This coloring makes / a color- preserving map. However, such a coloring may not make I 0 a chromatic complex, because two adjacent vertices u 1 and u 2 of I 0 may receive the same color. Because / is a simplicial map, this happens only when these vertices are mapped to the same node, in which case, we say that the edge is monochromatic. Similarly, we say that a triangle is monochromatic when all its vertices are mapped to the same vertex. Let A be a subdivision of I such that there is a carrier-preserving simplicial C such that the number of monochromatic simplices of A with the -induced coloring is minimum. We claim that A has no monochromatic edges or triangles. Suppose that this not the case. We will reach a contradiction by exhibiting a subdivision A 0 of A - and therefore of I - with one monochromatic simplex less than A. Consider first the case when A with the -induced coloring has a monochromatic triangle be a vertex in the link of -(u 1 ); such a vertex always exists because the complex C is pure. Consider now the subdivision A 0 of A where the triangle is subdivided into three triangles fc; c is the barycenter of fu g. Consider also the map that agrees with - on the vertices of A and - 0 then A 0 with the - 0 -induced coloring has one monochromatic simplex (the triangle than A with the -induced coloring. We now assume that no triangle of A is monochromatic but that there is a monochromatic edge on the boundary of A. Then, u 1 and belong to exactly one triangle of A. Let b be the third vertex of this triangle. We can construct a subdivision A 0 of A by subdividing the triangle into two triangles c is the barycenter of g. Consider the extension agrees with - on all vertices of A and f- 0 is an edge of the loop L. Because - 0 is carrier-preserving, we have again reached a contradiction since A with the -induced coloring has one monochromatic simplex more than A 0 with the - 0 -induced coloring. The last, and more complicated, case to consider is when A has a monochromatic edge that is not in its boundary. This is the only place where we must require that complex C be link-connected. The edge belongs to exactly two triangles. Let a and b be the remaining vertices of these two triangles. Since - is a simplicial map, -(a) belongs to the link of -(u 1 ) in C. Let p be a vertex in the link of -(u 1 ) (not necessarily distinct for -(a)). But then the fact that C is link-connected implies that there is path with edges (p 1 in the link of -(u 1 ) that connects . We can always choose a non-empty path, even when because C is pure. Similarly, there is a path with edges connects -(b) to l . This suggests the following subdivision A 0 of A: The triangle fu ag is subdivided into triangles f-p 1. The vertices are new and distinct, and - k is the barycenter of g. Similarly, the triangle fu Consider also the extension agrees with - on A and l. Using the fact that C is chromatic, it is easy to verify that B with the - 0 -induced coloring has one monochromatic simplex less than A with the -induced coloring. An alternative proof of the Lemma 3 can be obtained by employing the Convergence Algorithm of Borowsky and Gafni [Bor95]. We outline this proof here. By the Herlihy-Shavit condition, it suffices to show that the task T is solvable. The protocol consists of two phases. In the first phase, processors "converge" on a simplex of I 0 . Let x i be the vertex of I 0 where processor i converges. If the color of -(x i ) is i, then the processor i stops and outputs -(x i ). Obviously, at least one processor stops in this phase. Although the remaining processors do not know the output of the stopped processors, they know a simplex of C that contains the outputs of stopped processors. In the second phase, the remaining processors converge in C in the link of the output of all stopped processors; each of the remaining processors starts at a vertex of its color and, if possible, a vertex of the loop L. Since C is link-connected and chromatic, the remaining processors can indeed converge. Thus T is solvable. We can now prove the main theorem of this paper. Theorem 2 The task-solvability problem for three or more processors in the read-write wait-free model is undecidable. Proof. By Theorem 1, there is no algorithm to decide, given a standard inputless task whether the loop L is contractible in C, when C is link-connected. However, by Lemmata 2 and 3, the loop L is contractible iff there is a chromatic subdivision I 0 of the input triangle I and a color-preserving and carrier-preserving simplicial This is precisely the Herlihy-Shavit condition for T to be solvable, and therefore L is contractible in C iff T is solvable. Hence, task solvability is undecidable for three processors. This immediately implies that the solvability problem for more than three processors is also undecidable: Consider, for example, tasks where there is only one possible output of all but the first three processors; such a task is solvable iff the subtask for the first three processors is solvable. Biran, Moran, and Zaks [BMZ88] define a slightly different model of distributed computation in which the processors must produce a valid output only if all of them complete their protocol. For this model, the input-output relation contains only n-dimensional simplices. For each task T ae I \Theta O, it is easy to construct an equivalent task T 0 in the model of [BMZ88]: The input for task T 0 to processor i may be a special value p i that indicates that the processor does not "participate" in T . In that case, the processor must output a special value q i . Otherwise, the input is a vertex of I and the output a vertex of O in such a way that the input-output relation of processors whose inputs are not special values is identical to T . It is easy to see that T is solvable iff T 0 is solvable in the model of [BMZ88]. This immediately implies the following. Corollary 1 The task-solvability problem for the model of Biran, Moran, and Zaks [BMZ88] is undecidable for three or more processors. Another interesting variant of the shared read-write memory model is the comparison-based model where processors cannot access directly their IDs but can only compare them [HS96]. A typical task for this model is the renaming task: the input (name) to each processor is a distinct member of a set S of size m, and the output must be a distinct member of a smaller set of size k. In the comparison-based model, the input to a processor is not a vertex of the input complex I but instead some value associated with the vertex. Different vertices may have the same value. Similarly there are values associated with the vertices of the output complex. This generalization in the definition of tasks is necessary for the comparison-based model to be different from the model we have considered so far; otherwise, when a processor gets as input a vertex of the input complex I , it can immediately determine its color and the rank of its ID. This suggests a trivial reduction from task-solvability to the comparison-based model task- solvability: Given a task T ae I \Theta O, construct a comparison-based model task T 0 with the same input-output tuples where the value of each vertex is the vertex itself. Then, all values are distinct, and a processor can infer its color from its input. It follows that T is solvable iff T 0 is solvable in the comparison-based model. Corollary 2 The task-solvability problem for three or more processors in the comparison-based model is undecidable. Recently, Herlihy and Rajsbaum [HR] proposed an interesting extension of Theorem 2 to the models of resiliency and set-consensus. Using the contractibility problem, they showed that the task-solvability problem for these models is also undecidable in general. 5 Conclusion Let us define the size of a task to be the number of its input-output tuples. Theorem 2 implies that for any recursive function f(s), there are solvable tasks of size s whose protocols require at least f(s) steps. This is indicative of the difficulty involved in developing a robust complexity theory for asynchronous distributed computation. The analogy for traditional complexity theory would be that the finite languages, a proper subset of regular languages, are nonrecursive! However, it may still be possible to develop a notion of complexity of distributed tasks that is independent of the task size. An intriguing open problem is finding a solvable "natural" task whose protocol requires, for example, exponential number of steps. Of course, one could use the reductions given in this paper to produce such a task, but that task could not be considered natural. The Herlihy-Shavit condition (despite the title of [HS94]) is not construc- tive. Our results here cast some doubt on its applicability as a necessary and sufficient condition for task solvability. On one hand, the best way to show that a task is solvable is to provide a distributed algorithm that solves the given task. On the other hand, showing that a task is not solvable often employs other weaker conditions that are easier to apply than the Herlihy- Shavit condition (e.g, Sperner's Lemma or homology). However, our work does show how powerful the Herlihy-Shavit condition is, because no weaker condition would enable us to derive the results of this paper. Ironically, although our work exposes the inherent weakness of the Herlihy-Shavit con- dition, to our knowledge our work is the only work that makes full use of it. Acknowledgments : The possibility that the Herlihy-Shavit condition might not be constructive was suggested by Shlomo Moran in a conversation with the first author in 1994. We would like to thank Geoffrey Mess from the UCLA Mathematics Department for providing useful pointers to the literature --R Generalized FLP impossibility result for t-resilient asynchronous computations A combinatorial characterization of the distributed tasks which are solvable in the presence of one faulty processor. Capturing the power of resiliency and set consensus in distributed systems. Optimal algorithms for curves on surfaces. Impossibility of distributed consensus with one faulty process. The decidability of distributed decision tasks. The asynchronous computability theorem for t-resilient tasks A simple constructive computability theorem for wait-free computation The topological structure fo asynchronous computability. Some results on the impossibility Algebraic Topology: An Introduction. Elements of Algebraic Topology. On the algorithmic unsolvability of the word problem in group theory (in Russian). An Introduction to the Theory of Groups. A Textbook in Topology. Classical Topology and Combinatorial Group The- ory --TR --CTR Soma Chaudhuri , Maurice Erlihy , Nancy A. Lynch , Mark R. Tuttle, Tight bounds for John Havlicek, Computable obstructions to wait-free computability, Distributed Computing, v.13 n.2, p.59-83, April 2000 Maurice Herlihy , Sergio Rajsbaum, A classification of wait-free loop agreement tasks, Theoretical Computer Science, v.291 n.1, p.55-77, 4 January Achour Mostefaoui , Sergio Rajsbaum , Michel Raynal , Matthieu Roy, A hierarchy of conditions for consensus solvability, Proceedings of the twentieth annual ACM symposium on Principles of distributed computing, p.151-160, August 2001, Newport, Rhode Island, United States Achour Mostfaoui , Sergio Rajsbaum , Michel Raynal , Matthieu Roy, Condition-based consensus solvability: a hierarchy of conditions and efficient protocols, Distributed Computing, v.17 n.1, p.1-20, February 2004 Achour Mostefaoui , Sergio Rajsbaum , Michel Raynal, Conditions on input vectors for consensus solvability in asynchronous distributed systems, Proceedings of the thirty-third annual ACM symposium on Theory of computing, p.153-162, July 2001, Hersonissos, Greece Achour Mostefaoui , Sergio Rajsbaum , Michel Raynal, Conditions on input vectors for consensus solvability in asynchronous distributed systems, Journal of the ACM (JACM), v.50 n.6, p.922-954, November Faith Fich , Eric Ruppert, Hundreds of impossibility results for distributed computing, Distributed Computing, v.16 n.2-3, p.121-163, September
contractibility problem;task-solvability;asynchronous distributed computation;wait-free computation
305747
Products and Help Bits in Decision Trees.
We investigate two problems concerning the complexity of evaluating a function f on k distinct inputs by k parallel decision-tree algorithms.In the product problem, for some fixed depth bound d, we seek to maximize the fraction of input k-tuples for which all k decision trees are correct. Assume that for a single input to f, the best depth-d decision tree is correct on a fraction p of inputs. We prove that the maximum fraction of k-tuples on which k depth-d algorithms are all correct is at most pk, which is the trivial lower bound. We show that if we replace the restriction to depth d by "expected depth d," then this result need not hold.In the help-bits problem, before the decision-tree computations begin, up to k-1 arbitrary binary questions (help-bit queries) can be asked about the k-tuple of inputs. In the second stage, for each possible (k-1)-tuple of answers to the help-bit queries, there is a k-tuple of decision trees where the ith tree is supposed to correctly compute the value of the function on the ith input, for any input that is consistent with the help bits. The complexity here is the maximum depth of any of the trees in the algorithm. We show that for all k sufficiently large, this complexity is equal to degs(f), which is the minimum degree of a multivariate polynomial whose sign is equal to f.
Introduction Pick your favorite computation model and complexity measure, e.g. boolean circuit size, communication complexity, decision tree depth, interactive proof length, tensor rank, etc. Any attempt to understand such a model and complexity measure requires understanding the ways that an "unreasonable" computation can be more efficient than a "reasonable" one. Of course, what is "reasonable" changes as our understanding of the model improves. Suppose we are given several unrelated instances of a problem to solve. The "reasonable" approach is to solve each instance separately; intuitively, any computation that is useful for solving one instance is irrelevant to any of the others. To what extent is this intuition valid in a given model? The following question is the most common way of formalizing this. The Direct-sum problem: Suppose that the complexity of computing some function f is c. Is it true that computing f twice, on two unrelated inputs requires complexity 2c? How about computing f on k unrelated inputs? This question was first studied in the context of Boolean circuits [Ulig, Paul, GF]. Subsequent work has concerned bilinear circuits [J, Bsh], Boolean circuits [FKN], and communication complexity [KRW]. In this paper we consider two related problems of a similar flavor: The Product Problem: Let f be a function and suppose that for any complexity c computation, the fraction of inputs on which it correctly computes f is at most p. Suppose that we have two independent computations, each taking as input an ordered pair a; b of inputs to f , where the first computation is trying to compute f (a) and the second is trying to compute f (b). If each of the two computations has complexity at most c, can the fraction of input pairs a; b on which both are correct exceed What about the analogous question for k independent computations and k inputs? If the first computation only uses the input a and the second only uses the input b, then the p 2 upper bound is trivial. Intuition suggests that there is no advantage in having each computation access the others input. A variant of this problem, in which we seek to compute f on the two inputs by a single computation was studied recently in [IRW]. The Help-bit Problem: Suppose that the complexity of computing the boolean function f is c. Suppose that one wishes to compute f on two inputs a and b, and is allowed for free one "help-bit", i.e. an arbitrary function of the two inputs. Is it possible to choose this help-bit function so that, given the help-bit, f (a) and f (b) can each be computed by a computation of complexity less than c, and if so, by how much? How about computing f on k inputs with The help-bit problem was introduced (to our knowl- edge) in the context of constant depth circuits in [Cai], and was also studied in the context of boolean circuits in [ABG]. The point here is that if we have k inputs, then with k help bits we can use them to obtain the value of f on each of the inputs, and no further computation is necessary. With only can for instance obtain the value of f at but then we still need complexity c to compute f on the last input. Is there a more effective use of the help bits? In this paper we consider these problems in the context of the boolean decision tree complexity - perhaps the simplest computational model. The cost of a computation (decision tree) is simply the number of input variables that are read (the depth of the decision tree); a more precise definition is given in Section 2. While it is an easy exercise to see that "direct-sum" holds for decision tree depth, the other two problems are more difficult. Our answer for the product problem is a qualified "Yes": Theorem 1 Let f be an n-variable boolean function and suppose that any depth d decision tree computes f correctly on a fraction at most p of the inputs. Let decision trees that each access a set of nk variables corresponding to a k-tuple a 1 ; a 2 ; . ; a k of inputs to f . If each of the T i have depth at most d, then the fraction of k-tuples a 1 ; a 2 ; . ; a k on which each T i correctly outputs f (a i ) is at most p k . The theorem seems completely obvious; however, the reader might test her intuition on the following variation. Suppose that, in the above Theorem we change the complexity measure from "depth" to "av- erage depth" , i.e, the average over all inputs of the depth of the leaf reached by the input. This modified statement of the Theorem seems similarly obvi- ous, but, as we will see, it is false. The recent work of [IRW], which was done independently of ours, includes a (substantially different) proof of a weaker variant of this theorem, namely that a single depth d tree that tries to compute all k functions can be correct on at most a p k fraction of the inputs. Our result shows that even if we use k parallel decision trees then we can't do better than this. For the help bit problem, the answer is more com- plicated. Nathan Linial [Lin] has shown that the complexity of computing f on two inputs with one help bit is at least deg(f ), the degree of the (unique) multi-linear real polynomial that is equal to f . Since almost all boolean functions on n-variables have deg(f this says that help bits don't help for most functions. This result does not seem to extend to k - 3. In fact, for sufficiently large k our results imply that it is false. We manage to prove a lower bound that holds for all k, and is always tight when k, the number of instances to be solved, is sufficiently large. We need the following definitions. If f is an n-variate boolean function, we say that the n-variate real polynomial p sign-represents f if for all inputs a, (here we are taking our Boolean set to be f\Gamma1; 1g). The sign-degree of f , deg s (f ), is the minimum degree of a polynomial that sign represents f . Theorem 2 Let f be an n-variate boolean function, and suppose that the optimal decision tree that computes f has depth d. Then for all k - 1, any solution to the help bit problem for f for k inputs and help bits requires depth at least deg s (f ). Furthermore, for all sufficiently large k, there is a decision tree algorithm bits whose depth is deg s (f ). In the case that f is equal to the product of n variables (which corresponds to the parity function for f0; 1g-valued variables), deg s (f and so, the lower bound implies that help-bits don't help in this case. Actually, this function and its negative are the only functions with deg s (f the ordinary decision tree complexity of most boolean functions is n, this means that for large enough k, the complexity of k instances given bits is less than the ordinary decision tree complexity for most func- tions. In particular, if f is the majority function, then deg s (f and the lower bound is vacuous, while the upper bound says that for k sufficiently large, it is possible to ask questions so that, given the answers, the value of the function on any one of the k inputs can be computed by probing just one vari- able. This remarkable savings is not typical, it was recently shown [RR] that almost all functions satisfy In the next section, we review the decision tree model. In Section 3 we give a general formulation for the product problem in decision trees, and prove a generalization (Theorem 3.1) of Theorem 1. In Section 4, we discuss the help bits problem and prove Theorem 2. Most proofs are in the appendices. While some of the techniques we develop apply only to the decision tree model, some of them may be applied to other models as well, and in fact suffice for obtaining many of the known results in the boolean circuit model. We sketch these applications in the last section. Preliminaries In this section we present some basic definitions and notation. Most of the notions discussed here are very familiar, but in some cases our notation is non-standard 2.1 Boolean functions For purposes of this paper it will be convenient to use our Boolean domain, instead of f0; 1g. If X is a set, a boolean assignment to X is a map ff from X to B. The set of boolean assignments to X is denoted B X . We refer to the elements of X as variables. We will consider probability distributions over the set of assignments. For a specified distribution D, a random assignment chosen according to D is denoted by placing a ~ above the identifier, e.g., ~ ff. A boolean function over the variable set X and range R, or (X;R)-function is a function from B X to R. In this paper, the range R is always equal to B k for some integer k. 2.2 Decision Trees All trees in this paper are rooted, ordered, binary trees. For such a tree T every internal node v has exactly two children, and the two children are distinguished as the (-1)-child and (+1)-child of v. The depth dT (v) of a node v is, as usual, the number of edges along the path from v to the root and the depth dT of T is the maximum depth of any node in T . Formally, a decision tree over the variable set X with range R or (X;R)-decision tree is a triple (T ; where T is a rooted binary tree, p is a map that associates to each internal node v a variable in the set X , and a is a map that associates each leaf v to an element a v of R. The label p v is called the query associated to v, and node v is said to probe variable We will generally say that T is an (X;R)-decision tree, keeping the maps p and a implicit. The set of (X; R)-decision trees over X is denoted T (X; R), or simply T . Let T be an (X;R)-decision tree. If ff is any assignment in B X , the computation of T on ff, is the unique path s from the root of T to some leaf start from the root v 0 and inductively define define v as the ff(p v i )- child of v i . The output of the computation is the label a l T (ff) . Thus T can be viewed as a boolean function over X with range R. Trivially, every (X;R)-function f is computed by some (X;R)-decision tree. The usual cost function for the computation performed by T on ff is the length (number of internal nodes) of the computation path, denoted C(T ; ff). The worst case complexity C(T ) is the maximum over ff of C(T ; ff). C(f ), the decision tree depth of f , is the minimum of C(T ) over all decision trees that compute f . For a distribution D on assignments, the distributional complexity CD (T ) is the average of C(T ; ~ ff) with respect to the distribution D. For a given (X; R)- function f , and a complexity bound b (with respect to some complexity measure), we are interested in how well f can be approximated by a tree of complexity at most b. The closeness of approximation is defined with respect to a probability distribution D on boolean assignments to X . Thus for each (X;R)-decision tree T , the agreement probability q D (f ; T ) of T with f relative to D, is the probability that T with respect to the random assignment ~ ff chosen according to D. The decision tree approximation problem for (f; D;U) where f is an (X; R)-function, D is a distribution over boolean assignments to X , and U is a set of decision trees is to determine q D (f ; U), which is defined to be the maximum agreement probability q D (f Of particular interest is the case that U is the set T d (X; R) of decision trees of depth at most d. Finally, a decision forest F over X and ranges is an ordered sequence where T i is an (X;R i )-decision tree. F computes a boolean function from B X to R . \Theta R k . 3 The Product Problem disjoint sets of vari- ables, and let respectively, distributions over assignments to assignment fi for X will be viewed as a k-tuple is an assignment for X i . Let D denote the distribution over assignments to X given by ProbD ( ~ product distribution . \Theta D k . Now suppose that we have k decision tree approximation problems each be the optimal agreement probability for U i with f i relative to D i . It will be convenient sometimes to view f i as a function of the entire variable set X that ignores all variables except those in We consider the problem of simultaneously approximating by a decision forest . The simultaneous agreement probability q D (f for denotes the prob- ability, for ~ ff chosen according to D, that (T 1 For is a family of (X; R i )- trees, q D (f denotes the maximum of q D (f choices of trees with Now, since f i only depends on X i and D chooses the assignments ~ ff k to dependently, it would seem that q D (f should just be the product of the probabilities q This is clearly the case if each tree T i only queries variables in X i . However (as shown by the examples in below), if T i is allowed to query variables outside of X i , then this need not be the case. Intuitively, it would seem that variables outside of X i could not help to approximate f i and indeed this is trivially true, if we are only trying to approximate f i . But when we seek to approximate all of the functions simultaneously, it is no longer obvious that such "cross-queries" are irrelevant. Nevertheless, one might expect that for "reason- able" classes U of decision trees, the optimal simultaneous agreement probability is attained by a sequence of trees querying variables only in X i , and is thus equal to the product of the individual optimal agreement probabilities. The main result of this section is to prove this in the case that for each i, U i is the set of trees of some fixed depth d i . Theorem 3.1 be as above. Let d 1 ; d 2 ; . ; d k be nonnegative integers. Then Y Note that Theorem 1 is a special case of the above. Before giving the proof we present two examples to show that multiplicativity fails for some natural alternative choices of the classes U Example 3.1 Theorem 3.1 fails if we replace the class T d i by the class S i of trees that are restricted to query at most d i variables from X i along any path, but can query variables outside X i for free. Consider the following trivial example. Let g. The distribution D 1 assigns x 1 to 1 with probability 1/2, and D 2 assigns x 2 to 1 with probability 1/2. The functions f 1 and f 2 are given by means that we do not allow T 1 to look at any variables in X 1 and we do not allow T 2 to look at any variable in ever, we can achieve simultaneous agreement probability better than 1/4. Let T 1 be the tree that queries x 2 and outputs x 2 and T 2 be the tree that queries x 1 and outputs x 1 . Then, the probability that both T 1 and f 1 agree and T 2 and f 2 agree is just the probability that are assigned the same value, which is 1/2. A somewhat more subtle example is given by: Example 3.2 For a distribution D over B X , let T D d be the class of trees whose expected depth with respect to D is d, i.e., T 2 T d if the average number of variables queried, with respect to ~ ff chosen from D is at most d. Then the above theorem is false if we replace . To see this, let X be a set of four vari- ables, and f be the parity function on X. Let U be the uniform distribution over assignments to X and 3. First we show that the maximum agreement probability with f attained by a decision tree S of expected depth at most 3, is equal to 3/4. Agreement probability 3/4 is attained by the tree S that queries a particular variable x, and if it is 0, then it returns 0, and otherwise it queries the remaining three variables and returns the parity of them. To see that this is best possible, note that if T is any decision tree al- gorithm, then for each leaf l in T of depth less than 4, T will agree with f on exactly half of the inputs that reach l. Thus, if p i is the probability that a random input ~ ff ends up at a leaf of depth i, then the agreement probability q D (f ; T ) can be bounded above by it suffices to show that p 4 - 1=2. Now or 1. If then the expected depth of the tree is at least 4p 4 which means that Now let be copies of f; U on disjoint variable sets. We show that it is possible to choose decision trees each of expected depth at most 3, whose agreement probability exceeds be the S described above and let x 1 denote the variable in X 1 probed first by T 1 . Let T 2 be the following tree: first probe x 1 (in it is 0, output 0. If it is one, then read all four variables in X 2 and output their parity. The expected depth of this tree is 3, since half the paths have depth one and half the paths have depth five. let us consider the probability of the event A that both T 1 1). The conditional probability of A given x 1/4. If x must agree with f 1 , and T 2 must agree with f 2 . Thus the probability of simultaneous agreement is What happens in the above example is that the variable x 1 acts as a shared random coin that partially coordinates the two computations so that they are more likely to be simultaneously correct. Proof of Theorem 3.1 Fix a sequence T of decision trees with T i of depth at most d i . For I ' denote the event the event that all of the trees indexed by I evaluate their respective functions cor- rectly. We seek to prove that Prob[C([k])] is bounded above by The proof is by induction on k, and for fixed k by induction on the k-tuple d 1 . The result is vacuous if So assume that k - 2. Consider first the case that We may assume that d the k th party must guess the value of f k (~ff k ) without looking at any variables, so T k consists of a single leaf labeled -1 or 1. Now, by conditioning on the value of the vector ~ ff k , the probability, P that C([k]) holds can be written: Now let fl be the assignment of ~ ff k that maximizes the probability in the last expression. For each i between define the tree U i by contracting using ~ ff fl. Then we may rewrite the last term as Prob[(U 1 f Each tree U i has depth at most d i , and so we may bound the first factor by which by the induction hypothesis equals the desired result follows. Now we assume that d i ? 0 for all i. Define a directed graph on f1; 2; :::; kg with an edge from i to if the first variable probed by T i is an input to f j . Since this directed graph has out-degree one, it has a directed cycle. Let j - 1 be the length of the cycle. Let us rename the set of indices in the cycle by the set in such a way that for each the first probe of T i is a variable, denoted x i+1 , in and the first probe of T j is a variable, denoted The intuition behind the rest of the proof is that is possible to replace each tree T i by trees of the same depth in which the first probe in T i is decreasing the probability of simultaneous agreement. For i denote the function obtained from f i by fixing x i i be the distribution on the set obtained from D i by conditioning on x i the event that (~ff 1 can write the probability that all of the T i compute correctly by conditioning on b as follows: We seek to upper bound this expression by: Y To do this we show: Claim. For each b 2 B [j] , the conditional probability of C([k]) given A(b) is at most: Y Y Assuming the claim for the moment, we can then substitute into the expression (1) to obtain the following bound on the probability that all of the trees are correct: Y Y The sum can be rewritten as: Y which is equal to: Y Now, the i th term in this product corresponds to the probability of correctly computing f i if we first probe x i and then, depending on the outcome, use the optimal depth d tree to evaluate the residual function. Thus, we can upper bound this term by the expression (3) is upper bounded by the expression (2) as required. it suffices to prove the claim. Define f A(b) i to be the function f b i and to be f i otherwise. Similarly, the distribution D A(b) i is equal to D b i and to D i otherwise. Observe that by the mutual independence of ~ given A(b) is the product distribution of D A(b) between 1 and k. Let T A(b) i be the tree obtained from contracting under the assumption that A(b) holds. Then the conditional probability that T A(b) is equal to the probability (with respect to the product distribution on D A(b) . Now for each i the depth of T A(b) i has at most and is at most d i for i ? j, so we may apply induction to say that the probability with respect to the product distribution on D A(b) i that for all i, T A(b) i is at most: Y (f A(b) Y (f A(b) which is equal to the expression in the claim. This proves the claim and the Theorem. Remark. The proof of the Theorem can be extended to a more general model of decision tree computation. For this model, in the case of a single function we are given a function f from an arbitrary domain S to R, and want to compute f (s) for an unknown input S. We are further given a set Q of admissible queries, where each query q 2 Q is a partition of S into sets (S q r ). The response to query q is the index i such that s 2 S q . The nodes of a decision tree are labeled by queries, and the branches out of the node correspond to the answers to the query. For a collection of functions f i on disjoint domains S i , the formulation of the product problem generalizes to this model. The statement and proof of the Theorem now go through assuming: (1) That the any allowed query depends only on variables from one function and (2) The distributions D i are independent. 4 Help Bits In the help bits problem, We have k boolean functions disjoint variable sets Given an unknown assignment ff to the variables of the set to evaluate f i (ff i ) for all i, by a decision forest. We are allowed to ask, "for free", an arbitrary set of l binary questions about the assignment ff. The answer to these l questions is a vector a 2 B l . For each such a we will have a decision forest F a = (T a k ), where we require that F a (ff) agrees with assignment ff that is consistent with a. Thus, such an algorithm is specified by l arbitrary boolean functions h (the help bits) on variable set X , together with 2 l decision forests. The complexity of the algorithm is the maximum depth of any of the 2 l k decision trees in these forests. In general, the decision tree T a i that computes f i (ff i ) for ff consistent with a is allowed to probe variables outside of X i . This is conceivably useful, because together with the help bits, such probes could imply information about the variables in X i . For instance if one of the help bit functions is (f i (ff i ) \Theta ff j (x)) where x is a variable in X j , then by probing the variable x, we can deduce only probes variables in X i we say that it is pure. If each of the 2 l k decision trees are pure, the algorithm is pure. In this paper, we will restrict attention to the case that, for some variable set X and boolean function f over X , each of the X i are copies of X and the functions f i are copies of f . The help bits problem H k;l (f ) is to evaluate k copies of f given l help bits. to be the complexity of the optimal algorithm that solves it. We also define the problem pure (f ) to be the same as H k;l (f ) except that we require that the algorithm be pure. Define C k;l pure (f ) to be the complexity of the optimal pure algorithm. Our goal is to obtain bounds on C k;l (f ) and C k;l pure (f ). The main result of this section (which is a slight refinement of Theorem 2), is: Theorem 4.1 For any boolean function f on n variables and any positive integer k, pure (f If k is sufficiently large, then pure (f We first reformulate the problems H k;l (f ) and pure (f ). Given functions f and a decision forest F , we say that F covers the assignment ff of X , with respect to f 1 d) be the minimum number of forests, each consisting of trees of depth at most d, needed to cover all inputs with respect to f . Let - k pure (f; d) be the corresponding minimum when we restrict to forests that are pure. Proposition 4.1 Let f be a boolean function and k; l; d be nonnegative integers. Then: 1. C k;l (f ) - d if and only if - k (f; d) - 2 l , 2. C k;l pure (f) - d if and only if - k pure (f; d) - 2 l . In other words, dlog 2 - k (f; d)e is the minimum l such that H k;l can be solved with trees of depth d, and pure (f; d)e is the minimum l such that H k;l pure can be solved with trees of depth d. Proof. We prove the first assertion; the proof of the second is completely analogous. If C k;l (f then the 2 l forests given by the algorithm are also a cover and - k (f; d) - 2 l . Now suppose - k (f; d) - 2 l . Then there is a collection of 2 l forests that cover all assignments of X. Index these forest as F z where z ranges over B l . Order the forests lexicographi- cally, and define A(z) to be the set of assignments that are covered by F z but not covered by F y for any y - z. Then the sets partition the set of all assignments of X . Now define the help bit functions h l so that for each ff, is the unique index z such that ff 2 A(z). Then these functions together with solves H k;l . So we now concentrate on obtaining bounds on d) and - k pure (f; d). For this we need yet another definition. A randomized (X;R)-decision tree algorithm is a probability distribution Q over (X;R)- decision trees. Such an algorithm is said to approximate f with probability p if for each assignment ff, if ~ is a random decision tree chosen according to Q, then the probability that ~ f(ff) is at least p. We define p(f; d) to be the maximum p such that there is a distribution Q over the set of decision trees of depth at most d that approximates f with probability p. It is easy to see that p(f; d) - 1=2. and that if the ordinary decision tree complexity of f , then p(f; d) = 1. The following result relates - (f; d) to p(f; d). Lemma 4.1 For any boolean function f on n variables and k; d - 0, we have:p(f; d) k - (f; d) - pure (f; d) - d nk d) k e Proof. The middle inequality is trivial. For the last inequality, we use a standard probabilistic argument to show that there is family of at most d k p(f;d) e pure forests of depth at most d that cover all of the assign- ments. Let Q be the distribution over (Y; R)-decision trees of depth at most d that approximates f with probability p(f; d). For be the corresponding distribution over the set of (X trees; Consider the distribution . \Theta Q k over forests. Suppose we select t forests ~ according to P . For a given assignment ff and j - t, the probability that ~ covers ff is at least p(f; d) k . Thus the probability that none of the forests cover ff is at most (1 \Gamma p(f; d)) t , and the probability that there exists an assignment ff that is covered by none of the forests is at most 2 nk e then this expression is at most 1, so there is a positive probability that the forest covers all assignments, and so there must be a collection of t forests of depth d that cover all assignments. Now we turn to the lower bound on - (f; d). For this, we need the following relationship between p(f; d) and the agreement probability q - D (f; d) with respect to a particular distribution - D on assignments. Lemma 4.2 For any (Y; R)-boolean function f and integer d - 0, there exists a distribution - D on assignments to Y such that q - This is a variant of a fundamental observation of Yao [Y1], and follows from the min-max theorem for two person zero sum games. D be the distribution of the lemma. Suppose that is a family of forests that cover all assignments ff to X. Consider the distribution P over all assignments ff which is the product . \Theta - D i is the copy of D on X i . Then, by Theorem 3.1, for any forest F i , the probability that it covers ~ ff is at most p(f; d) k . Then the expected number of assignments covered by t is at most tp(f; d) k . Since F 1 covers all assignments, this expectation must be at least 1, so t - 1=p(f; d) k . As an immediate corollary of the above lemma and proposition 4.1 we get the following bounds on the complexity of the help bits problem: Corollary 4.1 For any boolean function f on n variables and integers k; l; d - 0: 1. If 2 l - 1=p(f; d) k then C k;l (f ) ? d. 2. If 2 l - nk=p(f;d) k then C k;l pure (f Next we need to connect the quantity p(f; d) to the sign-degree deg s (f ). Proposition 4.2 For any boolean function f , p(f; d) ? 1=2 if and only if Proof. Let d ? deg s (f ). Then there is an n-variate polynomial of degree at most d such that g(ff) ? 0 if and only if f (ff) = 1. By shifting the polynomial by a small constant we may assume that g(ff) is never 0. We may assume without loss of generality that the sum of the absolute values of the coefficients of g is 1. Consider the following randomized decision tree algorithm: choose a monomial of g at random, where the probability a given monomial is chosen is the absolute value of its coefficient. Probe the variables of the monomial and output the product of the values. It is easily seen that for any assignment ff, the probability of correctly evaluating f (ff) minus the probability of incorrectly evaluating f(ff) is equal to jg(ff)j ? 0 (here we use that our domain is f\Gamma1; 1g). Thus for any ff this algorithm correctly evaluates f (ff) with probability exceeding 1/2. Now suppose p(f; d) ? 1=2. There must exist a randomized decision tree algorithm Q on depth d trees that evaluates f (ff) correctly with probability exceeding 1/2. Now, it is well known, and easy to see (by induction on d, looking at the two subtrees of the root) that if T is a decision tree of depth d on variables fx 1 ; . ; xng then there is a polynomial degree d such that gT all assignments ff. Define the polynomialg(x 1 to be the sum of Q(T )(g T \Gamma 1=2) where the sum is over all trees of depth d and Q(T ) is the probability that T is selected under the distribution Q. Then 1=2. By the choice of Q, this latter term is positive if and only Theorem 4.1 now follows easily. Proof of Theorem 4.1. By Corollary 4.1, would follow from 2 This holds for all sufficiently large k since p(f; deg s (f Also, by Corollary 4.1, to show C pure deg s (f suffices to show all k, which follows immediately from the fact, by Proposition 4.2, that p(f; deg s (f Remark 1. It is interesting to note that, for k large enough, it is possible to construct to obtain an optimal algorithm in which all of the decision trees have a particularly simple form. The randomized algorithm in the proof of Proposition 4.2 uses only decision trees that correspond to computing monomials of g. Using this randomized algorithm in the proof of the upper bound of lemma 4.1 the decision trees used in the help- bits algorithm are all of the same form. Remark 2. As noted in the introduction, if f is the majority function the deg s (f so the decision trees used in the optimal algorithm for H large k all have depth 1. In the case that f is the majority function on three variables, Manuel Blum gave the following constructive protocol to solve H Enumerate the subsets of [k] having size at least 2k=3. The number of these sets is 2 ck for some c ! 1. Fix an encoding of these sets by ck bits. Now given k separate inputs to the majority-of-3 function, and imagine the inputs arranged in a k \Theta 3 array. In each row, at least two of the three entries agree with the majority value, so there is a column in which at least 2k=3 of the entries agree with the function value on that col- umn. For the help bits, we ask for the lowest index of such a column (requiring 2 bits) and then the set S of rows for which this column gives the function value (requiring ck bits.) Armed with this information, the value of the function on row r is equal to the entry in that row and the designated column if r 2 S and is the negative of the entry otherwise. Remark 3. In the proof of the lower bound in Lemma 4.1, we used Theorem 3.1 in order to deduce that for any forest F of depth at most d, the probability with respect to a particular distribution P on assignments F is correct for all k functions is at most p(f; d) k . In the special case which is the relevant case for proving that C Theorem 4.1, there is an alternative argument. We sketch this argument, which has the benefit that it extends to other models besides decision trees, as will be seen in the next section. As noted above, for we have p(f; d) = 1=2, and thus for ~ ff selected from D (the distribution of Lemma 4.2) any decision tree of depth d agrees with f with probability exactly 1/2. In particular, this can be shown to imply that if we fix the values of any d variables then either that partial assignment occurs with probability 0 under - D, or that the value of f conditioned on this assignment is unbiased. Now, define the random variable c i to be 0 if We want to show that the probability that c is at most In fact, the distribution on uniform on f0; 1g k . By the XOR lemma of [Vaz] (see also [CGHFRS]) a distribution over f0; 1g k is uniform if for any subset J of [k], the random variable c J defined to be the XOR of the c i for s J be the probability that c J = 0. The event c is the same as the event that T J ( ~ is equal to f J ( ~ Now by combining the decision trees fT i ji 2 Jg we can get a single decision tree of depth at most jJ jd that computes T J . We claim that such a decision tree must agree with f J with probability exactly 1/2, which is enough to finish the argument. We prove the claim by showing that for each leaf of the tree T J that is reached with nonzero probability, f J (~ff) conditioned on ~ ff reaching the leaf is unbiased. For each such leaf of the tree, there is an such that at most d variables of X i appear on the path. Recall that the value of f i is unbiased when conditioned on the values of these d variables. If we further condition the value of f J by the values of all variables not in X i , then f i is still unbiased and therefore so is f J . Remark 4. One implication of Theorem 4.1 is that for large enough k, the best algorithm for H uses pure trees. It is reasonable to speculate that this is the case for H k;l (f ) for all k and l, and this is open. For the case is interesting to note that for the case it is not hard to show that pure tree algorithm can not do better than C(f ), the ordinary decision tree complexity of f . To see this, note that the help bit partitions the set of assignments of into two groups A 1 and A 2 . It is not hard to see that either the set of assignments on X 1 induced by A 1 is all of B X1 , or the set of assignments on induced by A 2 must be all of B X2 . In the first case, then given A 1 , a pure tree computation for f on 1 is as hard as the problem without the help bits, and in the second case, then given A 2 , a pure tree computation for f on X 2 is as hard as the problem without the help bits. 5 Other Models Some of the ideas used so far are also relevant to other models of computation. We can get results for these models that are similar to but neither as precise or as strong as what we obtain for decision trees. It is convenient to describe our results in the following very general framework. We fix some computational model for computing a function f on input ff 2 X , and some class, FEAS, of "feasible" algorithms. Our results will only hold for classes having certain closure properties. A class FEAS is closed under k-counting if for any k algorithms in FEAS, any algorithm that runs all k of these algorithms on the input and accepts or rejects based on the number of computations out of k that accept, is also in FEAS. Examples of such classes are polynomial size circuits, which are closed under poly-counting, and polylog-bit communication complexity protocols which are closed under polylog-counting. From such a class we define when a multi-input algorithm is feasible. An algorithm for computing a function f on a pair of inputs ff is said to be rectangularly-feasible, in FEAS , if for every fixed value of ff 1 the induced algorithm for f is in FEAS, and for every fixed value of ff 2 the induced algorithm for f is in FEAS. Notice that for the two examples mentioned above (and essentially any model one may think of), FEAS ae FEAS . Thus, for example, for the case of poly-size circuits, the lower bounds given below for two-input algorithms apply to all poly-size circuits as well. 5.1 Products A product theorem in such a setting may be proven using Yao's XOR-lemma [Y2], which we observe applies in this general setting. Let D 1 ; D 2 distributions, and Lemma 5.1 (Yao) Assume that FEAS is closed under k-counting. Then From this one can deduce an "approximate product theorem". Theorem 5.1 Assume that FEAS is closed under k- counting. Then Proof. Fix an algorithm A in FEAS , and denote by pY Y the probability that it is correct on both inputs, by pNN the probability that it is incorrect on both, by pY N the probability that it is correct only on the first input and by pNY the probability that it is correct only on the second input. Since for every fixed value of ff 1 the probability that A is correct on f 2 is at most averaging over all ff 1 , we have Similarly, Finally, Yao's xor-lemma implies \Omega\Gamma10 . These inequalities, together with the fact that p YY +p Y N directly imply \Omega\Gamma/1 , which proves the lemma. 5.2 Help Bits We can use the approximate product theorem to get help-bit results for randomized algorithms. Given a class of "feasible algorithms" FEAS, We say that a function is randomly feasibly computable, in RFC, if there exists a probability distribution on algorithms in FEAS such that for any input, an algorithm chosen from this distribution will be be correct on f with probability of at least 2=3. The constant 2=3 is not important as the usual "amplification" lemmas work in this general case. Lemma 5.2 If FEAS is closed under k-counting then the constant 2=3 can be replaced by 1=2 (or by 2 \Gammak ) without changing the class RFC. For the case where FEAS is the class of polynomial size circuits, it is known that randomization does not increase power, and thus RFC is exactly equal to the functions computable by deterministic poly- size circuits. For the case where FEAS is polylog- bit communication protocols, RFC is the functions computable by randomized polylog-bit protocols with two-sided error. Let us define what is feasible computation with a help-bit. Let FEAS be a given class of algorithms. A 1-help-bit-feasible algorithm, in FEAS 1 , is a set of two algorithms A 0 ; A 1 in FEAS, and a boolean function h, whose value on input ff is the output of A h(ff) . A function is in RFC 1 if there is a FEAS 1 algorithm for computing two copies of f , which on every pair of inputs is correct on both with probability of at least 2=3. We then can prove a randomized help- bit theorem. Theorem 5.2 If FEAS is closed under O(1)- counting then RFC Proof. Assume that f 62 RFC then, amplifying and similarly to lemma 4.2, there exists a distribution D such that q D (f ; FEAS) - 0:51. Using the approximate product theorem, any FEAS algorithm for two copies of f can be correct on at most 0:51 2 +o(1) fraction of inputs (under distribution D \Theta D). If follows that any FEAS 1 algorithm can be correct with probability at most twice that, a probability smaller than 2=3 (again probability taken over a pair of inputs chosen from D \Theta D.) This in turn implies that f 62 RFC 1 . For the case of boolean circuits, this was proven in [ABG]. 5.3 The log k Barrier The "approximate product" theorem and the "ran- domized help-bit" theorem can be naturally generalized to up to log k functions where the family FEAS is closed under k-counting. After that, these techniques break down. It is unknown for example whether a polynomial size circuit using n help-bits can compute n+1 copies of function which doesn't have polynomial size circuits. One can show that in a black box model, alternatively, relative to a particular oracle, that the generalizations are false using !(log Consider the model of polynomial-size circuits each with access to the same black-box. Theorem 5.3 There is a black-box so that there exists a Boolean function f which can't be computed by a polynomial-sized circuit family, but help-bits will allow a polynomial-sized circuit to always compute the answer to n disjoint copies of f , where n is the input size to f . Proof. It is well know that a random f can't be computed by a polynomial-sized circuit. Fix such an f . A successful circuit would take inputs and output the vector V =! in the black-box in such a way that a circuit without help-bits can't find it, but a circuit with help-bits goes directly to it. Let n be the size of each X i and choose n. For each input tuple, and output V do the following: Let s be a random l(n)-bit string. Place V in the location indexed by place a "SORRY" in location t. By a standard counting argument, one can show that no polynomial- sized circuit family (with access to the black box) can answer correctly on all n-tuples of inputs. However, given l help-bits, it is easy to query the oracle at the location revealing the answer tuple. It is interesting to note that the Yao XOR lemma fails relative to this black-box in the sense that once we XOR more than l(n) variables the parity stops getting harder to compute. In other words, the XOR lemma has the same log n barrier as above. Acknowledgement . The authors have had many conversations with several people regarding this re- search. We would especially like to acknowledge the contributions of Richard Beigel, Nati Linial, Russell Impagliazzo, and Avi Wigderson. --R Some connections between bounded query classes and nonuniform complexity On the extended direct sum conjecture Lower bounds for constant depth circuits in the presence of help bits The bit extraction problem of t-resilient functions Amortized Communication Complexity On the complexity of 2-output Boolean networks "Advances in Computational Complexity Theory" Fractional Covers and Communication Com- plexity On Proving Super-Logarithmic Depth Lower Bounds via the Direct Sum in Communication Complexity A Direct Product Theorem Rounds in Communication Complexity Revisited Realizing Boolean functions on disjoint set of variables On the synthesis of self-correcting schemes from functional elements with a small number of reliable components Theory and applications of trapdoor functions Probabilistic computations: towards a unified measure of complexity --TR --CTR Ronen Shaltiel, Towards proving strong direct product theorems, Computational Complexity, v.12 n.1/2, p.1-22, July 2004 Paul Beame , Toniann Pitassi , Nathan Segerlind , Avi Wigderson, A Strong Direct Product Theorem for Corruption and the Multiparty Communication Complexity of Disjointness, Computational Complexity, v.15 n.4, p.391-432, December 2006 Anna Gl , Peter Bro Miltersen, The cell probe complexity of succinct data structures, Theoretical Computer Science, v.379 n.3, p.405-417, June, 2007
help bits;decision trees
305750
Competitive On-Line Algorithms for Distributed Data Management.
Competitive on-line algorithms for data management in a network of processors are studied in this paper. A data object such as a file or a page of virtual memory is to be read and updated by various processors in the network. The goal is to minimize the communication costs incurred in serving a sequence of such requests. Distributed data management on important classes of networks---trees and bus-based networks---are studied. Optimal algorithms with constant competitive ratios and matching lower bounds are obtained. Our algorithms use different interesting techniques, such as work functions [Chrobak and Larmore, Proc. DIMACS Workshop on On-Line Algorithms, AMS, 1991, pp. 11--64] and "factoring."
Introduction . The management of data in a distributed network is an important and much studied problem in management science, engineering, computer systems and theory [3, 11]. Dowdy and Foster [11] give a comprehensive survey of research in this area, listing eighteen different models and many papers. A data ob- ject, F, such as a file, or a page of virtual memory, is to be read and updated by a network of processors. Each processor may store a copy of F in its local memory, so as to reduce the time required to read the data object. All copies must be kept consistent, however; so having multiple copies increases the time required to write to the object. As read and write requests occur at the processors, an on-line algorithm has to decide whether to replicate, move, or discard copies of F after serving each request, while trying to minimize the total cost incurred in processing the requests. The on-line algorithm has no knowledge of future requests, and no assumptions are made about the pattern of requests. We apply competitive analysis [6] to such an algorithm. Let oe denote a sequence of read and write requests. A deterministic on-line algorithm A is said to be c-competitive, if, for all oe, CA (oe) c \Delta OPT where CA (oe) and OPT (oe) are the costs incurred by A and the optimal off-line solution respectively, and c and B are functions which are independent of oe, but which may depend upon the input network and file size. If A is a randomized algorithm, we replace CA (oe) by its expected cost and consider two types of adversaries: the oblivious adversary chooses oe in advance, and the more powerful adaptive on-line adversary builds oe on-line, choosing each request with knowledge of the random moves made by A on the previous requests. The oblivious adversary is charged the optimal off-line cost, while the adaptive on-line adversary has to serve oe and be charged on-line. (See Ben-David et al. [6] for a full discussion of different types of adversaries.) An algorithm is strongly competitive if it achieves the best possible competitive ratio. In this paper, we focus on two important classes of networks: trees and the uniform network. A tree is a connected acyclic graph on n nodes and (n \Gamma 1) edges; A preliminary version of this paper has appeared in [19]. y Research, AT&T Labs, 600-700 Mountain Avenue, Murray Hill, NJ 07974-0636, U.S.A. e-mail: lund@research.att.com, reingold@research.att.edu, and westbrook@research.att.com z This work was performed while the author was at Yale University. Research partially supported by NSF Grant CCR-9009753. x Department of Operations Research, AT&T Labs, Room 3J-314, 101 Crawfords Corner Road, Holmdel, NJ 07733-3030, U.S.A. This work was performed while the author was at Yale University. Research partially supported by Fellowships from Yale University. e-mail:yan@att.com J. WESTBROOK, and D. YAN the uniform network is a complete graph on n nodes with unit edge weights. We obtain strongly competitive deterministic and randomized on-line algorithms for these classes. Our algorithms use different interesting techniques such as offset functions and "factoring." Competitive on-line algorithms based on offset functions have been found for the 3-server [9] and the migration problems [10]. An advantage of these algorithms is they do not need to record the entire history of requests and the on-line algorithm, since decisions are based on the current offset values which can be updated easily. Factoring is first observed in [7] and used in [10, 17]. The idea is to break down an on-line problem on a tree into single edge problems. Thus strongly competitive strategies for a single edge is generalized to a tree. Our algorithms are strongly competitive for specific applications and networks, and also illustrate these two useful techniques. Our randomized algorithm for file allocation is barely random [20], i.e., it uses a bounded number of random bits, independent of the number of requests. A random choice is made only at the initialization of the algorithm, after which it runs deterministically. 1.1. Problem Description. We study three variants of distributed data man- agement: replication [1, 7, 17], migration [7, 10, 22] and file allocation They can be can be described under the same framework. We are given an undirected graph E) with non-negative edge weights and jV represents a processor. Let F represent a data file or a page of memory to be stored in the processors. At any time, let R ' V , the residence set, represent the set of nodes that contain a copy of F. We always require R 6= ;. Initially, only a single node v contains a copy of F and A sequence of read and write requests occur at the processors. A read at processor requests an examination of the contents of some data location in F ; a write at processor p requests a change to the contents of some location in F. The location identifies a single word or record in F . A read can be satisfied by sending a message to any processor holding a copy of F ; that processor then returns the information stored in the requested location. A write is satisfied by sending an update message to each processor holding a copy F , telling it how to modify the desired location. After a request is served, the on-line server can decide how to reallocate the multiple copies of F. be an integer constant, D 1, which represents the number of records in F. 1 The costs for serving the requests and redistributing the files are as follows. Service Cost: Suppose a request occurs at a node v. If it is a read request, it is served at a cost equal to the shortest path distance from v to a nearest node in R; if it is a write request, it is served at a cost equal to the size of the minimum Steiner tree 2 that contains all the nodes in R [ fvg. Movement Cost: The algorithm can replicate a copy of F to a node v at a cost D times the shortest path distance between v and the nearest node with a copy of F ; it can discard a copy of F at no cost. A file reallocation consists of a sequence of zero or more replications and discards of +represent the sets of reals, positive integers and non-negative integers, respectively. section 2 for a definition. ON-LINE DISTRIBUTED copies of F . The replications and allocations can be done in any order as long as the residence set has size at least 1. The movement cost incurred during a reallocation is equal to the total sum of all replication costs. The replication and migration problems are special cases of file allocation. For migration, we require 1. For replication, all the requests are reads, and it can be assumed that all replicated copies of F are not discarded. The (off-line) optimization problem is to specify R after each new request is served so that the total cost incurred is minimized. For on-line replication, we only consider competitive algorithms that have in the inequality above; otherwise a trivial 0-competitive algorithm exists Following previous papers on allocation and related problems, we adopt a "lookahead-0" model. In this model, once a request is revealed, the on-line algorithm must immediately pay the service cost before making any changes to the residence set. One may contrast lookahead-0 with a lookahead-1 model, in which the algorithm may change the residence set before paying the service cost. We discuss the lookahead issue further below, together with some implementation issues. 1.2. Previous and Related Results. Black and Sleator [7] were the first to use competitive analysis to study any of these problems, giving strongly 3-competitive deterministic algorithms for file migration on trees and uniform networks, and strongly 2-competitive deterministic algorithms for replication on trees and uniform networks. Replication: Imase and Waxman [14] showed that a greedy algorithm for building Steiner trees on-line is \Theta(log n)-competitive, where n is the number of nodes, and that this ratio is optimal within constant factors for general networks. This algorithm is the basis of a solution for on-line replication in general networks. Koga [17] gave randomized algorithms that are 2-competitive and 4-competitive against an adaptive on-line adversary on trees and circles, respectively. He also obtained a randomized algorithm with a competitive ratio that depends only on D and approaches (1+1= as D grows large, against an oblivious adversary on trees. Migration: Westbrook [22] obtained a randomized algorithm for uniform networks with a competitive ratio that depends only on D and approaches ((5 as D grows large, against an oblivious adversary, For general networks, Westbrook [22] obtained a strongly 3-competitive randomized algorithm against an adaptive on-line adversary. He also obtained an algorithm against an oblivious adversary with a competitive ratio that depends only on D and approaches (1 OE)-competitive as D grows large, where OE 1:62 is the golden ratio. Chrobak et al. [10] studied migration on various classes of metric spaces including trees, hypercubes, meshes, real vector spaces, and general products of trees. They gave strongly (2+1=2D)-competitive randomized algorithms for these spaces, (2+1=2D)-competitive deterministic algorithms for some of these spaces, and a general lower bound for deterministic algorithms of (85=27). Recently, Bartal et al. [4] obtained a 4:086-competitive deterministic algorithm. File Allocation: For general networks, Awerbuch et al. [2] and Bartal et al. [5] give O(logn)-competitive deterministic and randomized algorithms against an adaptive on-line adversary, respectively. Westbrook and Yan [23] show that Bartal et al.'s algorithm is O(logd(G))-competitive on an unweighted graph with diameter d(G), and there exists a O(log 2 d(G))-competitive deterministic algorithm. Bartal et al. also find a (3 +O(1=D))-competitive deterministic algorithm on a tree, and strongly 3-competitive randomized algorithms against an adaptive on-line adversary on a tree and uniform network. Since replication is a special case of file allocation, these upper bounds are also valid for replication when the additive constant B is zero. 4 C. LUND, N. REINGOLD, J. WESTBROOK, and D. YAN Replication Migration File Allocation Randomized uniform e D =(e tree e D =(e this paper Table The State of the Art: Trees and Uniform Networks. Note e 1.3. New Results. This paper contributes the following results. ffl For on-line file allocation on a tree, we give a strongly 3-competitive deterministic algorithm and a (2+1=D)-competitive randomized algorithm against an oblivious adversary, and show that this is optimal even if G is an edge. ffl For uniform networks, we show that the off-line file allocation problem can be solved in polynomial time. We give a strongly 1=(2D))-competitive randomized on-line algorithm for migration against an oblivious adversary on the uniform network. ffl For the replication problem, we show that the off-line problem is NP-hard; this implies the file allocation problem is also NP-hard. We obtain randomized algorithms that are (e D =(e D \Gamma 1))-competitive against an oblivious adversary on a tree and a uniform network; this is optimal even if G is a an edge. (Albers and Koga [1] have independently obtained the same results for on-line replication using a different method.) ffl We show that no randomized algorithm for replication on a single edge can be better than 2-competitive against an adaptive on-line adversary. Thus Koga's [17] algorithm for replication on a tree is strongly competitive. Table 1 summarizes the competitive ratios of the best known deterministic and randomized algorithms against an oblivious adversary for replication, migration, and file allocation on trees and uniform networks. They are all optimal. 1.4. Lookahead and Implementation Issues. As stated above, we adopt the lookahead-0 model that has been used in all previous work on allocation and its variants. Studies of some other on-line problems, however, have used a lookahead-1 model, and in this subsection we comment briefly on the distinction. In a lookahead-1 model of allocation, some request sequences could be served by an on-line algorithm at a lower cost than would be possible in the lookahead-0 model. For example, if a write request occurs, a lookahead-1 algorithm can drop all but one copies of F before servicing the request, thereby reducing the service cost. The lookahead-0 model is more appropriate for file allocation, however, because the service cost models both the message cost of satisfying a request, which includes the cost of transmitting an answer back to a read request or passing an update on to all copies, and the message cost of the control messages that must be transmitted in order for the algorithm to learn of new requests and to implement its replication and drop decisions. Specifically, we assume that a new replication will not occur unless at least one member of the replication set has been told of a new request, and a processor will not discard a copy unless it has been told of a new write request. We claim that for large values of D the optimal competitive ratio in a lookahead-1 model is not materially different than the optimal competitive ratio in a lookahead-0 model. In particular, if there is a c-competitive algorithm using lookahead-1, there is a 2=D)-competitive algorithm using lookahead-0. The lookahead-0 algorithm ON-LINE DISTRIBUTED simulates the lookahead-1 algorithm by keeping the same residence set. When the lookahead-1 algorithm saves service cost on a read, the amount saved can be no more than the distance it replicates files just prior to the satisfying the request. Similarly, when the lookahead-1 algorithm saves service cost on a write, the amount saved can be no more than the weight of a minimum Steiner tree which connects the dropped copies to an undropped copy. But at some point in the past, at least one of the dropped copies must have been replicated over each edge in that Steiner tree. Hence for each unit of distance saved on reads by the lookahead-1 algorithm, one file was moved one unit of distance. The same holds for writes. The the total cost saved by the lookahead-1 algorithm is 2 times the total movement cost. Both algorithms incur the same movement cost, however. One may ask whether our service cost is too optimistic: could our algorithms actually be implemented using only the control messages accounted for in the service cost. Although we do not directly address this issue, our algorithms are essentially distributed in nature and can be implemented with only constant message overhead in the special case of uniform and tree networks. 2. Preliminaries. We use the technique of work functions and offset functions introduced by Chrobak and Larmore [9]. Let S be a set of states, one for each legal residence set. Thus S is isomorphic to 2 V n f;g. Let R(s) denote the residence set corresponding to state s 2 S. We say the file system is in state s if the current residence set is R(s); s 2 S. Let be the set of possible requests, requests at node v, respectively. A request sequence revealed to the on-line algorithm, with each oe i 2 Y . Suppose the network is in state s when oe i arrives. The algorithm will be charged a service cost of ser(s; oe i ), where ser(s; oe \Gamma!R is as described in Section 1.1. After serving oe i , the algorithm can move to a different state t at a cost tran(s; \Gamma!R is the minimum cost of moving between the two residence sets. The work function W i (s) is the minimum cost of serving requests 1 to i, terminating in state s. Given oe, a minimum cost solution can be found by a dynamic programming algorithm with the following functional equation: with suitable initializations. Let opt be the optimal cost of serving the first i requests. We call the offset function value at state s after request i has been revealed. Define \Deltaopt it is the increase in the optimal off-line cost due to oe i . Our on-line algorithms make decisions based on the current offset values, S. Note that to compute the ! i (s)'s and \Deltaopt i 's, it suffices to know only the ! i\Gamma1 (s)'s. to show that an algorithm A is c-competitive, we need only show that for each reachable combination of offset function, request, and file system state, the inequality \DeltaC A + \Delta\Phi c \Delta \Deltaopt i holds, where \DeltaC A is the cost incurred by A and \Delta\Phi is the change in some defined potential function. If the total change in \Phi is always bounded or non-negative, summing up the above inequality over oe, we have CA (oe) c \Delta OPT (oe) +B where B is some bounded value. The Steiner Tree Problem: We shall refer to a network design problem called the Steiner tree problem (STP) [24] which can be stated as follows. An instance of STP is given by a weighted undirected 6 C. LUND, N. REINGOLD, J. WESTBROOK, and D. YAN graph E), a weight function on the edges 0 , a subset Z ' V of regular nodes or terminals, and a constant B . The decision problem is to ask if there exists a Steiner tree in G that includes all nodes in Z and has a total edge weight no more than B 0 . STP is NP-complete even when G is restricted to bipartite graphs with unit edge weights, or to planar graphs [12, 16]. Surveys on STP can be found in [13, 24]. On a tree network, the union of paths between all pairs of terminals gives the optimal Steiner tree. 3. Deterministic Algorithms for FAP on a Tree. We begin by introducing some concepts that will be used in building both deterministic and randomized algorithms for file allocation on trees. We say a residence set is connected if it induces a connected subgraph in G. On a tree, if the residence set is always connected, each node without a copy of F can easily keep track of R, and hence the nearest copy of F, by using a pointer. In fact, when G is a tree we can limit our attention to algorithms that maintain a connected R at all times. Theorem 3.1. On a tree, there exists an optimal algorithm that always maintains a connected residence set, i.e., given any (on-line or off-line) algorithm A, there exists an algorithm A 0 that maintains a connected R and CA 0 (oe) CA (oe) for all oe. If A is on-line, so is A 0 . Proof. Let R(A) and be the residence sets maintained by A and A 0 , re- spectively. We simulate A on oe and let A 0 be such that at any time, R(A 0 ) is the minimum connected set that satisfies R(A) ' Given R(A), on a tree, is defined and unique. reading cost incurred by A 0 cannot be greater than that by A. The same holds true for the writing cost issued at any node v, since spans the unique minimum length Steiner tree for R(A) [ fvg. So A 0 does not incur a greater read or write cost than A. Algorithm A 0 does not need to carry out any replication unless A does, and only to nodes that are not already in should leave a copy of F along any replication path, this can be done without incurring any extra cost. As R(A) ' never needs to traverse a replication path longer than that by A for the same replication. Hence, A 0 cannot incur a greater replication cost. Since a reallocation is a sequence of replications and discards of F, A 0 maintains a connected set at all times and does not incur a great cost than A in the reallocation. Henceforth we shall only consider algorithms that maintain a connected residence set R at all times. When we say that an algorithm replicates to node v, we shall mean it leaves a copy of F at all nodes along the shortest path from the residence set to v. In a tree network we can make some additional simplifying assumptions. Suppose an algorithm A decides to move to residence set R 0 from set R. This reallocation involves a some sequence of replications and drops. Lemma 3.2. All replications can be performed before all drops without increasing the total cost of the reallocation. Proof. Dropping a copy can only increase the cost of subsequent replications. Henceforth we assume that all algorithms comply with Lemma 3.2. Lemma 3.3. Let R be the nodes that gain a copy of F . Then F can be replicated to the nodes of S in any order at total cost D \Delta jT (R 0 is the subtree induced by node set R. Proof. A copy of F must be sent across each edge in T (R 0 (R) at least once. ON-LINE DISTRIBUTED But in any order of replication, a copy cannot be sent across an edge more than once, because then both endpoints contain a copy of F . Henceforth we assume that all algorithms comply with Lemma 3.3. A useful tool in handling on-line optimization on trees is factoring [7, 10]. It makes use of the fact that any sequence of requests oe and any tree algorithm can be "factored" into (n \Gamma 1) individual algorithms, one for each edge. The total cost in the tree algorithm is equal to the sum of the costs in each individual edge game. For edge (a; b) we construct an instance of two-processor file allocation as follows. The removal of edge (a; b) divides T into two subtrees T a and T b , containing a and b, respectively. A read or write request from a node in T a is replaced by the same kind of request from a, and a request from a node in T b is replaced by the same request from b. Let A be an algorithm with residence set R(A). Algorithm A induces an algorithm on edge (a; b) as follows: if R(A) falls entirely in T a or T b then the edge algorithm is in state a or b, respectively; otherwise, the edge algorithm is in state ab. When the edge algorithm changes state, it does so in the minimum cost way (i.e. at most one replication). This factoring approach is used in our algorithms for file allocation on a tree. For the rest of this paper, given an edge (a; b), we use T a and T b to represent the subtrees described above, s to denote the state the edge is in, and let the offset functions triplet be is the offset function value of state s after oe i has arrived. Lemma 3.4. For algorithm A and request sequence oe, let A (a;b) be the algorithm induced on edge (a; b), and oe ab be the request sequence induced on edge (a; b). Then (a;b)2E (oe ab Proof. We show that the cost incurred by any event contributes the same amount to both sides of the equation. For a write request at a node v, CA (oe) increases by the weight of the unique Steiner tree, T 0 , containing nodes in R(A) [ fvg. In the induced problem of any edge e on T 0 , the residence set and the request node are on opposite sides of e, and a write cost equal to e's weight is incurred. For other edges, v and the residence set lie on the same side of e, and no cost is incurred in their induced problems. So both sides of the equation increase by the same amount. For a read request at a node v, the same argument as in the write case can be used, replacing T 0 by the unique path from v to the nearest node with a copy of F. Both sides of the equation increase by the same amount. Suppose A moves from a residence set of R to R 0 , and consider the sequence of replications and discards that make up the reallocation process. We show by induction on the length of this sequence that the movement cost to A is exactly equal to the sum of movement costs in the induced edge problems. Suppose that the first action in the sequence is to replicate F to node v. The cost to A is D times the sum of the lengths of the edges on the shortest path from R to v. Since R is connected, the edges on this path are exactly the edges that must replicate in their induced problems. Thus both sides of the equation increase by the same amount. If the first action is a discard, then no costs are incurred by A or any of the induced edge algorithms. Lemma 3.5. Let OPT (oe ab ) be the cost incurred by an optimal edge algorithm for (a; b) on sequence oe ab . Then (a;b)2E OPT (oe ab ) OPT (oe). Proof. The Lemma follows by letting A in Lemma 3.4 be the optimal off-line algorithm for FAP on a tree, and noting CA (a;b) (oe ab ) OPT (oe ab ) for any A and edge 8 C. LUND, N. REINGOLD, J. WESTBROOK, and D. YAN (a; b). It follows from Lemmas 3.4 and 3.5 that if A is an on-line algorithm such that on any oe, and for each edge (a; b), CA (a;b) (oe ab ) c \Delta OPT (oe ab ) holds, then A is c-competitive. To construct a deterministic algorithm for the tree, we first construct a suitable optimal algorithm for a single edge We then design the tree algorithm so that it induces this optimal edge algorithm in each edge, thereby guaranteeing competitiveness. 3.1. An Optimal Deterministic Edge Algorithm. Let be an edge, and abg the set of states the file system can be in-only node a has a copy, only node b has a copy, and both a and b have a copy, respectively. We can assume G is of unit length, otherwise the offsets and cost functions can be scaled to obtain the same results. We write the offset functions as a triplet similarly for the work functions. Suppose the starting state is a. Then W D;D). The ser and tran functions are given in Table 2. By the definition of the offset functions, and since it is free to discard a copy of F, we always have (b), and at least one of ! i (a) and ! i (b) is zero. Without loss of generality, we assume a starting offset function vector of after oe i has arrived. Table 3 gives the changes in offsets for different combinations of requests and offsets in response to the new request oe i+1 . a b ab a 0 D D ab a r a w b r b w a ab Table Transition and Service Costs Case 1: a r 0 min(k a w Case 2: a r 0 min(1; l) l 0 a Table Changes in Offsets Let s be the current state of R. Our algorithm specifies the new required residence set, R, after oe i+1 has arrived and the offsets have been updated; it assumes state a is a zero-offset state. Algorithm Edge: D, drop at b, i.e., set Theorem 3.6. Algorithm DetEdge is strongly 3-competitive. ON-LINE DISTRIBUTED Proof. We first show that for each request oe j , \DeltaC Edge holds, for some function \Phi(\Delta) defined below. Let a be a zero-offset state and we have any time, we define the potential function: Initially, and we always have \Phi 0. When can be considered to be in state a or b, and \Phi(a; and hold in the following cases: a r or a w , a r or b r . Our algorithm ensures that \DeltaC Edge = 0 in these cases. Let use show that ( ) holds for all possible combinations of state, request, and offset. The offsets and state variable below are the ones before the new request oe i+1 arrives. We consider the k 1 cases; the are similar to that when k 1 and oe a r or a w . Case 1: oe We have \Deltaopt the last execution of the algorithm, we must have Case 2: oe We have \Deltaopt or ab, we must have Case 3: oe We have \Deltaopt 1. In this case \DeltaC Edge 1, \Delta\Phi 2, and L:H:S:( ) 3 hold. Inequality ( ) also holds when DetEdge changes state: when DetEdge moves from state ab to state a, ! to state ab \Delta\Phi = \Gamma\DeltaC Edge = \GammaD. Hence, ( ) holds for all possible combinations of offsets, requests, and residence set. We claim that no deterministic algorithm is better than 3-competitive for FAP on an edge. For migration, it is known that no deterministic algorithm can be better than 3-competitive on a single edge [7]. We show that given any on-line algorithm A for FAP there exists another on-line algorithm A 0 such that (i) CA 0 (oe) CA (oe) for any oe with only write requests, and (ii) A 0 always keeps only one copy of F, at a node in A's residence set, and (iii) whenever A has only one copy of F, A 0 has a copy at the same node. Since A 0 is a legal algorithm for any instance of the migration problem, and the optimal cost to process oe without using replications is no less than the optimal cost with replications, A is c-competitive on write-only sequences only if A 0 is a c-competitive migration algorithm. This implies the claim. Algorithm A 0 is obtained from A as follows. Initially, both A and A 0 have a copy of F at the same node. The following rules are applied whenever A changes state. (1) If A replicates, A 0 does not change state. (2) If A migrates, A 0 follows. (3) If A drops a page, A 0 follows to the same node. It follows from the rules above that (ii) and (iii) hold, and A 0 cannot incur a write cost higher than that of A. Each movement of A 0 in (1) or (2) corresponds to a distinct migration or earlier replication by A, respectively. So A 0 cannot incur a higher movement cost than A. The claim follows. J. WESTBROOK, and D. YAN 3.2. An Optimal Deterministic Tree Algorithm. Recall that for each edge on the tree, request sequence oe induces a sequence oe ab on (a; b). The tree algorithm is based on factoring into individual edge subproblems and simulating DetEdge on each subproblem. After r 2 oe is served, for each edge the induced request r ab is computed and the offset vector for the induced subproblem is updated. The following algorithm is then executed, updating the residence set, R(T ree). Initially R(T ree) consists of the single node containing F. Algorithm Tree: (1) Examine each edge (u; v) in any order, and simulate the first step of Algorithm DetEdge in the induced subproblem. If DetEdge replicates to one of the nodes, say v, in the induced subproblem, then add v to R(T ree) and replicate to v. (2) Simulate step 2 of DetEdge for all edges. For any node v, if the edge algorithm for an incident edge deleting node v from e's residence set in e's induced problem, mark v. (3) Drop at all marked nodes. To show that DetTree is 3-competitive, we will show that it chooses a connected residence set and for each edge, it induces the state required by DetEdge. This is not immediately obvious, because the requirements of DetEdge on one edge might conflict with those on another edge. For example, one edge might want to drop a copy that another edge has just replicated. We begin by analyzing the structure of the offset functions in the induced edge problems. For the rest of this subsection, the offset values and functions for each refers to that results from the induced sequence oe ab . The next lemma characterizes the offset distribution between two adjacent edges. Lemma 3.7. The following properties hold: (A) At any time, there exists a root node r, such that corresponds to a zero offset state in the induced problems of all edges. (B) For any edge (x; y) on the tree, define S i (x; adjacent edges (x; y) and (y; z), the inequality S i (x; y) S i (y; z) holds, 8 i. Following from the earlier definitions (see the beginning of Section 3.2), the claim (A) above states that there is a node r such that for any edge (a; b) where a is nearer to r than b, state a is a zero offset state for the edge. Note that the location of the root node r may not be unique, and its location changes with requests. The lemma implies the following conditions. Corollary 3.8. be an edge in T such that a root r is in T x . Let z 6= x be a neighbor of y, and edges (x; y) and (y; z) have offsets (0; k xy ; l xy ) and (0; k yz ; l yz ), respectively. Then (D) Let (x; y) and (y; z) be adjacent edges with a root r in the subtree that is rooted at y and formed from removing the two edges from T . Let the offsets in the edges be (k xy ; 0; l xy ) and (0; k yz ; l yz ), respectively. Then l xy (l Proof. (of Lemma 3.7) We use induction on the number of requests. Initially, let r be the node holding the single copy of F ; all the edges have offset vectors (0; D;D) and the lemma holds trivially. We assume the lemma holds for revealed requests and show that it remains valid after oe t+1 has arrived at a node w. We first show how to locate a new root. Let P represent the path from r to w. Unless specified otherwise, the offsets referred to below are the ones before oe t+1 arrives. We choose the new root, r 0 , using the following procedure. Procedure FindRoot (1) If (i) r and all the edges along P have offsets of the (2) Otherwise, move along P from r toward w, and cross an edge if it has offset vector of the form (0; 0; l) until we cannot go any further or when w is reached. Pick the node where we stop as r 0 . Let us show that r 0 is a valid root for the new offsets. We picture P as a chain of edges starting from r, going from left to right, ending in w. If the condition in step (1) of the algorithm is satisfied, oe t+1 corresponds to a request at the zero offset state for all edges. By Table 3, r remains a valid root node. Suppose (2) above is executed. For any edge that is not on P, or is on P but is to the right of r 0 , its zero-offset state remains the same. Node r 0 is a valid root node for these edges. By (C.4), edges along P with offsets of the form (0; 0; l) must form a connected subpath of P, starting from r and ending in r 0 . They have the same value for the parameter l. By Table 3, their offsets change from (0; 0; l) to (1; 0; minfl or (min(1; l); 0; l), and r 0 is a valid root node for them. Hence (A) holds for our choice of r 0 above. To show that (B) holds, we consider any two adjacent edges (x; y) and (y; z) whose removal will divide T into three disjoint subtrees: T x ; T y , and T z , with roots y, and z, respectively. We show that for different possible positions of r and w, (B) remains valid after oe t+1 has arrived, i.e., S t+1 (x; y) S t+1 (y; z) holds when oe t+1 is a write or a read , when r z . We assume holds before oe t+1 arrives. Suppose oe t+1 is a read request, r 2 T x , and w 2 T x . For edge Condition (B) can be shown to hold in other situations by a similar case analysis. Please refer to the Appendix for the complete case analysis. Thus (B) holds for request and the lemma follows. Theorem 3.9. Algorithm DetTree is strongly 3-competitive. Proof. We show that DetTree induces DetEdge on each tree edge. The theorem then follows from Lemmas 3.4 and 3.5 and Theorem 3.6. We proceed by induction on the number of requests. Initially, R(T ree) consists a single node. Suppose R(T ree) is connected after the first t 2 Z for each edge (a; b), the state induced by R(T ree) is equal to the state desired by DetEdge when run on oe ab . Consider the processing of request t + 1. Step (1): Replication. We do a subinduction on the number of replications done in Step (1), and show that no replication is in conflict with the state desired by any edge. Suppose that processing edge (a; b) in Step (1) causes F to be replicated to a. lies in T b , inducing state from the definition of DetEdge, the definition of the induced subproblem, and the inductive hypothesis. Let Q be the path from b to the nearest node in R(T ree). If Q 6= fbg, then, to avoid conflict, each edge along Q must also require replication across it. From (A) and (C.2) in Theorem 3.7, we see that each edge (x; y) in Q has 12 C. LUND, N. REINGOLD, J. WESTBROOK, and D. YAN an offset of the form ! is nearer to b than y, and requires a replication. A similar argument holds for the case when s = a and ! Step (2): Marking Nodes to Drop: Again we perform a subinduction on the number of markings done in Step (2), and show that no marking is in conflict with the state desired by any edge and that a connected residence set results. Suppose that processing edge (a; b) in Step (2) causes b to be marked. This occurs because (a; b) has ! Since R(T ree) is connected by hypothesis, both a and b are in R(T ree), and the nodes in T b with a copy of F span a connected subtree of T b , with b as its root. Let us call it T 0 b . If T 0 b 6= fbg, each edge (x; y) in T 0 b is in state s = xy. By (A) and (C.3) in Theorem 3.7, (x; y) must have offset nearer to b than y is. Under DetEdge, (x; y) needs to drop the copy of F in node y. Hence all the nodes in T 0 b are required to be removed from R(T ree), the new R(T ree) remains connected, and no edges are in conflict. Thus R(T ree) is connected, all induced edge algorithms match DetEdge, and DetTree is 3-competitive. 4. Randomized Algorithms for FAP on a Tree. Our approach to building a randomized tree algorithm is the same as our approach in the deterministic case. We give a randomized algorithm for a two-point space, RandEdge, that is based on counter values assigned at the nodes. By factoring, we obtain from RandEdge a (2+1=D)-competitive algorithm, RandTree, for file allocation on a tree. RandTree requires the generation of only O(logD) random bits at the beginning of the algorithm, after which it runs completely deterministically. It is simpler than the tree algorithm in [19], which can require the generation of\Omega\Gamma/29 D) random bits after each request is served. 4.1. An Optimal Randomized Edge Algorithm, RandEdge. Let edge (a; b). We maintain counters c a and c b on nodes a and b, respectively. They satisfy Our algorithm maintains a distribution of R dependent on the counter values. Initially, the node with a copy of F has counter value D, and the other node has counter value 0. The counter values change according to the following rules. On a read request at a, we increment c a if c a ! D. On a write request at a, if (c a D, we increment c a . The counters change similarly for a request at b. There is no change in the counter values in other cases. Algorithm RandEdge always maintains a distribution of R such that (1a) (1c) Observe that the probability of having a copy of F at node v 2 fa; bg is c v =D. In order to maintain this distribution, RandEdge simulates D deterministic algorithms, numbered from 1 to D. The moves of each deterministic algorithm are constructed (deterministically) on-line, according to rules given below. Before the first request, one of the D algorithms is picked at random. RandEdge then makes ON-LINE DISTRIBUTED the same moves as the chosen deterministic algorithm. Thus p e [s], s 2 fa; b; abg, is the proportion of algorithms in state s, and the expected cost incurred by RandEdge is the average of the costs incurred by the D algorithms. We define the D algorithms that achieve the probability distribution in (1). Suppose that initially, only node a has a copy of F . Then initially the D algorithms are placed in state a. The following changes are made after a new request, oe i , has arrived. Without loss of generality, we assume the request arises at node a. (The c a and c b values below refer to the counter values just before oe i arrives.) ffl There is no change in the algorithms if there is no change in the counter values. D, the lowest-numbered algorithm in state b moves to state ab. ffl Case 2: if oe D, the lowest-numbered algorithm in state ab moves to state a. ffl Case 3: if oe D, the lowest-numbered algorithm in state b moves to state ab. Lemma 4.1. RandEdge is feasible and maintains the probability distribution in (1). Proof. By feasible we mean that whenever a move must be made in Cases 1, 2, and 3, there is some algorithm available to make the move. The choice of lowest-numbered algorithm is only to emphasize that the choice must be independent of which algorithm RandEdge is actually emulating. The lemma holds initially with c a = D and c We prove the lemma by induction on the requests, and assume it holds before oe i arrives. If there is no change in counter values after oe i has arrived, the lemma holds trivially. By the induction hypothesis, in case 1 above, since c a ! D and p e [b] ? 0, at least one of the D algorithms is in state b; in case 2, since (c a there is an algorithm in state ab; in case 3, since c a ! D, there is an algorithm in state b. Hence, RandEdge is feasible. It can be verified that the changes in the algorithms implement the probability distribution in (1) for the new counter values. Theorem 4.2. RandEdge is strongly Proof. For each node v 2 fa; bg, we maintain the potential function: D ) OPT has a copy of F at v D otherwise where OPT represents the adversary. Let the overall potential function at any time, \Phi 0. We show that in response to each request and change of state, E(\DeltaC RandEdge (2) holds, where \DeltaOP T , E[\DeltaC RandEdge ] and E(\DeltaM i ) are the cost incurred by the event on OPT , and the service and movement costs incurred on RandEdge, respectively. The c a and c b values below are the counter values just before the new request oe i arrives. Case 1: Request oe If c a = D, inequality (2) holds trivially. Suppose c a ! D. We have E(\DeltaC RandEdge 14 C. LUND, N. REINGOLD, J. WESTBROOK, and D. YAN D OPT has a copy of F at a D otherwise It follows that if OPT has a copy of F at a when oe i arrives, otherwise, Inequality (2) holds. Case 2: Request oe We have E(\DeltaC RandEdge D OPT has a copy of F at b \Gammac b D OPT has a copy of F at b Inequality (2) holds. Case 3: Request oe If c a = D, L.H.S.(2)=0 and (2) holds trivially. Suppose c a ! D. We have E(\DeltaC RandEdge c a OPT has a copy of F at a ae 0 OPT has a copy of F at a D otherwise Hence, (2) holds. Case 4: OPT changes state. When OPT changes state, E(\DeltaC RandEdge It can be checked from the definition of \Phi that when OPT replicates, \DeltaOP when OPT discards a copy of F, \Delta\Phi 0. Since (2) holds for all possible events, by Theorem 4.6 RandEdge is strongly 4.2. An Optimal Randomized Tree Algorithm-RandTree. We extend RandEdge to a randomized algorithm for FAP on a tree, T , by means of factoring. Our algorithm, RandTree, induces RandEdge on each edge for the induced request sequence for the edge. Description of Algorithm RandTree. RandTree internally simulates D deterministic algorithms. Each of them maintains a residence set that spans a subtree of T . Initially, the residence set for each of them is the single node that contains F. One of the D simulated algorithms is picked uniformly at random at the beginning, and RandTree behaves exactly the same as the particular algorithm chosen. We maintain counters c a and c b for each edge (a; b) in the tree. Using the factoring approach (see section 3.2), we obtain an induced request sequence oe ab for (a; b). The counter values change according to the same rules as described in the single edge case (section 4.1), using oe ab . RandTree responds to each request and maintains an (induced) distribution as required by RandEdge in (1) for each of the edges. Read Request. Suppose the new request, oe i , is a read request at a node g. Let T be rooted at g, and be an edge with a nearer to g than b is. The c a and c b values described below are the counter values before oe i arrives. The edges can be classified into three types: 2: edges with c a = D and c b ? 0, and 3: edges with c a ! D. RandEdge requires no change in probability values for the first two types of edges; for type 3 edges, it requires p e [b] decreases by 1=D and p e [ab] goes up by 1=D. For any node v, we use T (v) to denote the subtree of T rooted at v. RandTree changes the subtree configurations maintained by the D algorithms by using the following procedure (fig. 1). (1) Let F be the forest of trees formed by all the type 3 edges. (2) While there exists a tree T 0 2 F with at least one edge, Do Let x be a leaf node in T 0 and P be the path from x to the root node of T 0 . (The root node of T 0 is the node in T 0 that is nearest to g.) (2.2) Pick any one of the D algorithms that maintains a subtree, Z, that includes node x and lies entirely in T (x). Make that algorithm replicate along P , i.e., replace Z by Z [ P . Remove the edges in P from T 0 and update the forest F . Fig. 1. Algorithm RandEdge (Read Requests) Lemma 4.3. RandTree implements the required changes for all the edges for a read request. Proof. We prove the lemmaby induction on the requests. Suppose that RandTree induces RandEdge on all edges before oe i arrives. Let y be the parent node of x. If RandTree is feasible, i.e., it can be executed, it implements the changes required by RandEdge as described above, for all edges. We show that this is the case. If x is a leaf node of T , since (x; y) is a type 3 edge, p (x;y) [x] ? 0 and one of the D algorithms must have the single node fxg as its tree configuration. Otherwise, suppose all the descending edges of x are of type 1. Let (x; w) be one of them. Then p (x;w) none of the algorithms maintains a subtree with any edge in T (x). Since p (x;y) [x] ? 0, one of the algorithms must have fxg as its subtree. Otherwise, suppose x has descending type 2 edges. Let (x; w) be any one of them. Thus each of these edges is contained in the subtree of at least one of the algorithms, and none of the algorithms has its subtree in T (w). Since p (x;y) [x] ? 0, at least one of these subtrees must lie in T (x) and contains node x. Hence, our algorithm is feasible and the lemma holds. Write Request. Suppose oe We use the same notation as in the read request case. The edges can be classified into three types: 2: edges with (c a 3: edges with (c a J. WESTBROOK, and D. YAN RandEdge requires no change in probability values for the type 3 edges; for type 1 edges, it requires p e [ab] decreases by 1=D and p e [a] increases by the same amount; decreases by 1=D and p e [ab] increases by the same amount. RandTree performs the following (fig. 2). (1) Let F be the forest of trees formed by all the type 1 edges. (2) While there exists a tree T 0 2 F with at least one edge, Do 0 be the root node of T 0 and x be one of its children nodes in (2.2) Pick an algorithm that has a subtree Z that includes edge (g If Z is contained in T 0 , make the algorithm replace Z by the single-node replace Z by the tree formed by edges in (Z \Gamma T 0 ). Replace T 0 in F by the subtrees formed by T (3) Let F be the forest of trees formed by all the type 2 edges. (4) While there exists a tree T 0 2 F with at least one edge, Do (4.1) Let x be a leaf node of T 0 and P be the path from x to the root node of T 0 . (4.2) Pick any one of the D algorithms that maintains a subtree, Z, that includes node x and lies entirely in T (x). Make that algorithm replicates along P , i.e., extends Z to Z [P . (4.3) Remove the edges in P from T 0 and update the forest F . Fig. 2. Algorithm RandEdge (Write Requests) Lemma 4.4. RandTree implements the required changes for all the edges for a request. Proof. We prove by induction and assume RandEdge is induced on all the edges before oe i arrives. If RandTree is feasible, it implements the required changes for all the edges. We show that this is the case. Consider the first loop of the algorithm (in step (2)). Since p (g 0 ;x) [g 0 x] ? 0, subtree Z must exist. RandTree removes edges from Z that are contained in T 0 . Note that the p e [ab] values for type 2 and 3 edges are zero; RandTree processes edges in T 0 in a top-down fashion, and configuration connected subtree. Thus the first loop can be executed. Consider the second loop of the algorithm (in step (4)). Let y be a parent node of x. Then p (x;y) x is a leaf node in T , one of the D algorithms must have fxg as its subtree. If x has a descending type 1 edge, by the first part of the algorithm, one of the D algorithms must have fxg as its subtree after running the first loop of the algorithm. Suppose all the descending edges of x are type 3 edges. Let (x; w) be a type 3 edge; then p (x;w) one of the algorithms must have fxg as its subtree. Hence, the algorithm is feasible and the lemma follows. Lemmas 4.3 and 4.4 imply that RandTree induces RandEdge on all the edges. Theorem 4.5 follows from the above lemmas and Theorem 4.2. Theorem 4.5. Algorithm RandTree is strongly 1=D)-competitive for FAP on a tree against an oblivious adversary. 4.3. Lower Bound. We show that the competitive ratio, above is the best possible for file allocation against an oblivious adversary, even if G is a single edge. Theorem 4.6. No on-line algorithm for the file allocation problem on two points (a; b) is c-competitive, for any c ! (2 Proof. Let A be any randomized algorithm for the file allocation problem on two points. We define a potential function \Psi, and give a strategy for generating adversary request sequences such that: (i) for any C there is a request sequence oe with optimum cost C; (ii) the cost to RandEdge on oe is at least (2 independent of oe; (iii) \Psi is bounded; and (iv) for each request generated by this adversary, If conditions (ii), (iii), and (iv) hold for an adversary sequence oe, then summing (3) over the sequence gives where B is bounded. By condition (i), the adversary can make OPT (oe) arbitrarily large, so there is no constant B 0 independent of oe such that CA OPT (oe) +B 0 . Hence A cannot be c-competitive for c We now define the adversary's strategy. We assume that both the on-line and off-line algorithms start with a single copy of F at a. Our adversary will only generate requests that result in offset functions of the form (0; zero-cost self-loop is a request such that the offset function is unchanged and \Deltaopt = 0. By a theorem of [18], there is always an optimal on-line algorithm that incurs 0 expected cost on a zero-cost self loop. We assume A has this property. This simplifies the adversary's strategy, although the result can still be proved without this assumption. Suppose that the current offset function is (0; i; i), and let p i be probability that RandEdge is in state a. Suppose A is in state a with probability q. If q ! p i the adversary requests a w , otherwise the adversary requests b r . When have zero-cost self-loop if and so the adversary will request b r . Similarly, when (a r is a zero-cost self-loop) and the adversary requests a w . Therefore the adversary can always generate a next request using the above rules, and the request sequence can be made arbitrarily long. Since there are only D offset functions that can be generated by this strategy, an arbitrarily long sequence of requests must cycle through the offset functions arbitrarily often. Notice, however, that the only cycles which cost OPT nothing are zero-cost self-loops. Since the adversary never uses these requests, all cycles have non-zero cost, so by continuing long enough the adversary can generate request sequences of arbitrarily large optimum costs. Hence condition (i) hold. Next we consider condition (ii). Recall c a and c b , the counter values maintained by RandEdge. We claim that if the offset function is (0; This is true initially, when F is located only at a, and D. By inspection of RandEdge one can verify that the whenever the adversary generates request b r , c b increases by 1, and that whenever the adversary generates a w , c b decreases by 1. Hence and the expected movement cost incurred by RandEdge is 1 on b r and 0 on a w . With reference to the proof of Theorem 4.2, note that the amortized cost to RandEdge is exactly 2+1=D times the cost to OPT on any request that the adversary might generate, assuming OPT does not move following the request. (The adversary never generates b r if c or a w if c 0.) The amortized cost incurred J. WESTBROOK, and D. YAN by RandEdge is therefore exactly 2+1=D times the cost incurred by an "optimum" algorithm that only ever has a copy of F at a. It is possible to show that this cost really is optimum for our sequences, but in any case it is certainly lower-bounded by the true optimum cost, and so (ii) holds. Now define \Psi to be D \Delta maxf0; g. This is trivially bounded by 1, so (iii) holds. Finally, we must verify (3). Case 1: The adversary requests a w . In this case the new offset function must be 1). Suppose that after the request A has mass q 0 at a. Then \DeltaC Case 2: The adversary requests b r . In this case the new offset function must be (0; 1). Suppose that after the request A has mass q 0 at a. Then \DeltaC 5. Migration on a Uniform Network. We give a 1=(2D))-competitive randomized algorithm against an oblivious adversary for migration on a uniform net- work. This competitive ratio is optimal even for a single edge [10]. Let G be a complete graph on n nodes labeled 1 to n. Initially, only node 1 has a copy of F. Our algorithm is based on the offsets calculated on-line. Let ng and the algorithm is in state s if the single copy of F is at node s. We have the cost functions ae ae D otherwise and initially W Suppose the ith request is served and the new offset for each node, s, is calculated. Algorithm Migrate: The algorithm maintains a probability distribution such that the probability, p[s], that a node, s, contains F is as follows: After a new request has arrived, our algorithm moves to different states with transition probabilities that minimize the total expected movement cost, while maintaining the new required distribution. Theorem 5.1. Given any oe, the expected cost incurred by Migrate, E[C mig (oe)], satisfies Proof. We show that after a request has arrived, holds, where E[\DeltaC mig ] is the expected cost incurred by Migrate, E[\DeltaM ] is the expected movement cost, \Delta\Phi is the change in the potential function: vs Initially, any time, since at least one v An offset table similar to Table 3 for file allocation can be constructed. Since migration is equivalent to FAP with only write requests, it can be seen that if request oe i+1 is at a node s with the offsets for all other states will increase by one, subject to a maximum of D, and \Deltaopt is at a node s with the offset for state s will decrease by one, all other offsets remain the same, and \Deltaopt Case 1: A request at s such that v s ! D. In this case, we have \Deltaopt increases by one. If s k then E[\DeltaC mig It can be verified that E[\DeltaM ] 1=2, \Delta\Phi then the movement cost is zero. We also have E[\DeltaC mig Case 2: A request at s such that v We have \Deltaopt decreases by 1. Each such to \Delta\Phi, and no more than 1=2 to E[\DeltaM ]. We have s is the probability mass at s, and Hence 6. Replication. We give upper and lower bounds on the performance of randomized on-line algorithms for the replication problem. 20 C. LUND, N. REINGOLD, J. WESTBROOK, and D. YAN 6.1. Randomized On-Line Algorithms. Let e e D =(e D \Gamma 1). So fi D \Gamma!e=(e \Gamma 1) 1:58 as D\Gamma!1. We describe randomized algorithms that are fi D-competitive against an oblivious adversary on the uniform network and trees. First, consider a single edge (r; b) of unit length. Initially, only r contains a copy of F . Suppose algorithm A is ff-competitive, and it replicates F to node b with probability after the ith request at b, where 1. The p i 's and ff must satisfy, for each k 2 Z is the expected cost incurred by A when oe contains k requests at b. The optimal off-line strategy is to replicate a copy of F to b before the first request arrives if k D, and does not replicate otherwise. Algorithm A incurs a cost of (D replicates right after serving the ith request, i k; otherwise it incurs a cost of k. An optimal randomized algorithm is given by a set of p i values that satisfy the above inequalities for all k, such that ff is minimized. We note that the conditions above are identical to those for the on-line block snoopy caching problem on two caches in [15]. Karlin et al. [15] showed that the optimal ff value is fi D . This is achieved when are zero. The above single edge algorithm can be applied to a uniform network by replicating F to each node v after the ith request at v, with a probability of p i - another example of factoring. Theorem 6.1. There exists a randomized algorithm that is strongly fi D -competitive against an oblivious adversary for replication on a uniform network. We can extend the single edge algorithm to a tree, T , rooted at r, the node that contains F initially. The algorithm only responds to requests at nodes not in the current residence set. Algorithm TREE: Keep a counter c i on each node i 6= r. Initially, all request arrives at a node x, and w is the node nearest to x that contains a copy of F . After serving the request, the counters for all the nodes along the path from w to x are increased by one. Let the nodes along the path be Perform the following procedure each time after a request has been served: 1. (2) For , replicate to node i j from node i j \Gamma1 . (2.2) If F is not replicated to i j , STOP. Theorem 6.2. Algorithm TREE is strongly fi D -competitive against an oblivious adversary for replication on a tree network. Proof. Without loss of generality, we assume that a connected R is always maintained by any solution. Let x 6= r be any node and y its parent. Before x obtains a copy of F , a cost equal to the weight of (x; y) is incurred on the edge for each request at a node in the subtree rooted at x. (This follows because R is connected and the unique path from x to r passes through (x; y).) By our single edge algorithm, the algorithm TREE is fi D -competitive if, for each node x 6= r, a copy of F is replicated to x after the ith request at the subtree rooted at x, with a probability p i . It can be shown by induction on the requests that before x acquires a copy of F, the counter on x records the number of requests that have arrived at the subtree rooted at x, and these counters form a non-increasing sequence on any path moving away from r. Hence, the values p c i j are defined probability values. It is simple to verify that each time a node at the subtree rooted at x receives a request, a copy of F is replicated to x with probability p cx , where c x is x's new counter value. The theorem follows. 6.2. Lower Bound. We show that no randomized algorithm can be better than 2-competitive against an adaptive on-line adversary. We use n to denote the number of nodes in G. Theorem 6.3. Let ffl be any positive function of n and D, taking values between 0 and 1. No on-line algorithm is better than n))-competitive for replication against an adaptive on-line adversary. Proof. Let node a have the initial copy of F and let (a; b) be any edge in G. Let A be any on-line algorithm which replicates to b after the jth request at b with probability . The adversary issues requests at b until A replicates or have been issued, whichever first happens. Algorithm A incurs an expected cost of We choose different N " 's for two different cases. Suppose " be the minimum positive integer that is greater than D and such that Given D, parameter N " is a finite and unique constant. The adversary replicates to b before the first request arrives, incurring a cost of D. From equation (5), we have E[CA (oe)] D giving a ratio of at least 2. Suppose D). The adversary does not replicate and incurs an expected cost of ?From (5), we have (7a) Given the p j 's, one can choose N '' so that arbitrarily close to 1. Since the series one can also choose N " so that arbitrarily close to zero. Thus, by comparing (6) and (7b), we see that given any ", one can choose a finite N " so that the ratio is as close to 22 C. LUND, N. REINGOLD, J. WESTBROOK, and D. YAN 7. Off-Line Replication and File Allocation. We show that the off-line replication problem is NP-hard, and the off-line file allocation problem on the uniform network can be solved in polynomial time. 7.1. The Off-Line Replication Problem. Awerbuch et al. find interesting relationships between the on-line Steiner tree problem [14, 23] and on-line FAP. We show that the (off-line) replication problem is NP-hard by using a straight-forward reduction from the Steiner tree problem [12, 16] (see Section 2 for the definition). The proof involves creating an instance for the replication problem in which (D requests are issued at each of the terminal nodes for the Steiner tree problem instance, forcing the optimal algorithm to replicate to these nodes. Theorem 7.1. The replication problem is NP-hard, even if G is is bipartite and unweighted, or if G is planar. 7.2. Off-line Solution For File Allocation on a Uniform Network. We show that the off-line file allocation problem on a uniform network can be solved in polynomial time by reducing it to a min-cost max-flow problem. A similar reduction was obtained by Chrobak et al. [8] for the k-server problem. We convert an instance of the FAP on a uniform network on nodes min-cost max-flow problem on an acyclic layered network, N , with O(n \Delta joej) nodes and O(n 2 joej) arcs. Initially node 1 has a copy of F. An integral maximum flow in N defines a dynamic allocation of F in the uniform network. The arcs costs in N are chosen so that the min-cost max-flow in N incurs a cost differs from the minimum cost for FAP on the uniform network by a constant. Network N is constructed as follows: Nodes: Network N has (joej layers of nodes, nodes in each layer, a source node s and a sink node t. Layer k, 0 k joej, has nodes fv k n g and (n\Gamma1) g. Each node allows a maximum flow of one unit into and out of it. The nodes correspond to the nodes in the uniform network. Layer k of N corresponds to the state of the uniform network after oe k has been served. Arcs: There is an arc going from each layer k node to each layer there is an arc from each layer joej node to t, arc (s; v 0 (s; 1). All the arcs have unit capacity. A Flow: A maximum flow in N has a value of n. Given integer arc costs, there is a min-cost max-flow solution with only an integral flow of either 0 or 1 in each arc. A flow of 1 into a v k j represents the presence of a copy of F at node j just before request arrives. If the flow comes from a v (k\Gamma1) represents a copy of F being moved from node i to node j after serving the 1)st request; if the flow comes from a u (k\Gamma1) represents a replication to node j. A flow from a v (k\Gamma1) j to a u k w represents the copy of F at j is dropped after oe (k\Gamma1) is served. Thus an integral flow in N defines a strategy for relocating copies of F. Since there are (n \Gamma 1) u nodes in each layer, an integral max-flow must include a flow of 1 unit into at least one of the v nodes in each layer. This corresponds to the requirement that there is always at least a copy of F in the uniform network. Edge Costs: Edge costs are chosen so that the optimal flow has cost equal to the optimal off-line cost for FAP minus the number of read requests, J , in oe. Arcs with one end point at s or t have zero costs. Let (a; b) be any other arc, going between layer k and (k+1). Its cost is equal to the sum of its associated movement and service costs. Suppose b is v (k+1) . Then (a; b)'s associated movement cost is D unless a is . If oe (k+1) is a write at some node other than node i, the service cost is is a read at node i, the service cost is \Gamma1. The costs for all other cases are zero. The movement and service costs account for the cost for replication and serving requests, except a node is charged \Gamma1 when a read request arrives and it has a copy of F . If we add J to the cost of the optimal flow, thus charging each read request 1 in advance, the sum is equal to the cost of an optimal dynamic allocation of F. Using the algorithm in [21] for solving the min-cost max-flow problem on acyclic networks, FAP on a uniform network can be solved in polynomial time. Theorem 7.2. An optimal (off-line) file allocation on a uniform network can be found in O(n 3 8. Open Problems. Interesting open problems include finding a strongly competitive randomized algorithm for FAP on a uniform network. Awerbuch et al. [2] conjecture that if there exists a c n -competitive algorithm for the on-line Steiner tree problem [14, 23], then there exists a O(cn)-competitive deterministic algorithm for FAP. This conjecture is still open. For the migration problem, there is a gap between the best known bounds [4, 10]. --R Competitive Distributed File Allocation Dynamic File Migration in Distributed Computer Systems On Page Migration and Other Relaxed Task Systems Competitive Algorithms for Distributed Data Manage- ment On the Power of Randomization in Online Algorithms Competitive Algorithms for Replication and Migration Prob- lems New Results on Server Prob- lems The Server Problem and On-line Games Page Migration Algorithms Using Work Functions Comparative Models of The File Assignment Problem The Rectilinear Steiner Tree Problem is NP-complete Dynamic Steiner Tree Problem Competitive Randomized Algorithms for Non-Uniform Problems Reducibility Among Combinatorial Problems Randomized On-line Algorithms for the Page Replication Problem Linear Programs for Randomized On-Line Algorithms Randomized Competitive Algorithms for Data Structures and Network Algorithms Randomized Algorithms for Multiprocessor Page Migration The Performance of Greedy Algorithms for the On-Line Steiner Tree and Related Problems Steiner Problem in Networks: A Survey --TR --CTR Baruch Awerbuch , Yossi Azar , Yair Bartal, On-line generalized Steiner problem, Theoretical Computer Science, v.324 n.2-3, p.313-324, 20 September 2004
memory management;data management;competitive analysis;on-line algorithms
305974
Exploiting Discontinuities in Optical Flow.
Most optical flow estimation techniques have substantial difficulties dealing with flow discontinuities. Methods which simultaneously detect flow boundaries and use the detected boundaries to aid in flow estimation can produce significantly improved results. Current approaches to implementing these methods still have important limitations, however. We demonstrate three such problems: errors due to the mixture of image properties across boundaries, an intrinsic ambiguity in boundary location when only short sequences are considered, and difficulties insuring that the motion of a boundary aids in flow estimation for the surface to which it is attached without corrupting the flow estimates for the occluded surface on the other side. The first problem can be fixed by basing flow estimation only on image changes at edges. The second requires an analysis of longer time intervals. The third can be aided by using a boundary detection mechanism which classifies the sides of boundaries as occluding and occluded at the same time as the boundaries are detected.
Introduction Discontinuities in optical flow are normally viewed as a serious impediment to producing accurate estimates of the flow. Due to the ambiguous nature of flow within small space-time neighborhoods of an image sequence, all methods for estimating flow either explicitly or implicitly assume some sort of spatial and/or temporal continuity. This assumption is often violated at surface boundaries. This paper points out important shortcomings in one class of methods for estimating possibly discontinuous optical flow and indicates how improvements can be made. Two general approaches to dealing with flow discontinuities are found in the literature. The first explicitly allows for a mixed distribution near boundaries. Marr and Poggio (1977) and Barnard and Thompson (1980) did this by basing their analyses on prominent modes of possible disparities over local neighborhoods. Using currently popular terminology, the modes acted as a robust estimator for the dominant disparity in the neigh- borhood, though neither paper explained this ef- fect. Some years later, Prazdny (1985) made the idea explicit. Scott's principal component approach (Scott, 1988) and Schunck's constraint line clustering (Schunck, 1989) utilized the same con- cept. More recently, Black and Anadan (1990) explicitly used robust estimation in determining optical flow near boundaries. Bergen et al. (1990) used a more specialized approach in which one dominant motion is found first and then used to produce a new image sequence in which the found motion is nulled, allowing a second motion Thompson to be more easily estimated. Once flow is estimated using any of the above approaches, it is relatively straightforward to find the flow discontinuities (Thompson, 1985). The second approach is to make discontinuities explicit, thus avoiding the need to deal with mixed distributions. All of these methods follow the basic structure of Geman and Geman (1984) or Blake and Zisserman (1987). The most common approach utilizes a Markov random field (MRF) formulation with explicit line processes (Murray and Buxton, 1987; Gamble and Poggio 1987; Hutchinson et al., 1988; Koch et al., 1989; Konrad and Dubois, 1992; Heitz and Bouthemy, 1993). Interacting region and line processes are involved. The region processes combine information over local neighborhoods to reduce ambiguity and improve reliability of individual flow es- timates. The line processes estimate locations of discontinuities and act to keep points on opposite sides from interacting in the region processes. The estimation of discontinuities can be greatly assisted if independent information about possible surface boundaries is available. In particular, most of the papers referenced above allow the assertion of a boundary element only at locations likely to correspond to contrast edges. This paper addresses optical flow estimation using explicit discontinuity detection. We provide evidence for three claims: ffl Line processes, as usually implemented, do not completely remove undesirable interactions between surfaces on either side of a motion boundary. ffl There is an intrinsic ambiguity in the localization of motion boundaries which can only be resolved over multiple frame pairs. ffl Distinguishing between the occluding and occluded sides of an optical flow boundary can aid the flow estimation process. Ways of exploiting these observations are demonstrated using a simple flow estimation pro- cedure. They can easily be incorporated into more complete flow estimation systems. 2. Estimating Optical Flow in the Presence of Discontinuities Existing flow estimation techniques which involve explicit motion boundary detection suffer from two deficiencies when applied to image sequences with textured backgrounds. Interactions between surfaces on either side of the boundary can still oc- cur, degrading the accuracy of the estimated flow. Furthermore, motion boundary detection itself is subject to a localization ambiguity when only a single frame pair is analyzed at a time. 2.1. Mixed image properties near the boundary Clearly, optical flow cannot be determined based only on a single space/time image point. All methods for estimating optical flow use image properties that must be computed over neighbor- hoods. Gradient-based techniques (e.g, Fennema and Thompson, 1979; Horn and Schunck, 1981) require the estimation of spatial and temporal derivatives using some form of finite difference. Region-based methods (e.g., Anandan, 1989) compare local neighborhoods around selected points in each frame. Space-time filtering methods (e.g., Adelson and Bergen, 1986; Heeger, 1988; Fleet and Jepson, 1990) are implemented using FIR filters with finite spatial and temporal extent. Image properties are often computed after some form of pre-filtering (Kearney et al., 1987; Barron et al., 1994) also involving operations with finite spatial and/or temporal extent. In addition, many flow estimation methods impose explicit flow continuity constraints (e.g., Fennema and Thompson (1979), Barnard and Thompson (1980), Horn and Schunck (1981), and the various MRF algo- rithms). The line processes used to deal with flow discontinuities in MRF-like methods in fact only affect the imposition of explicit flow continuity con- straints. Image properties associated with points to one side of an asserted boundary can still be effected by the intensity patterns on the other side of the boundary. Derivatives estimated using finite differences and pre-filtering will have substantial errors in the vicinity of motion boundaries, particularly if the surfaces to one of both sides are highly textured. A similar effect occurs with spa- Exploiting Discontinuities in Optical Flow 165 tiotemporal filters. While the line processes stop direct interactions between estimated flow to either side of a surface boundary, the flow estimates themselves can still be highly inaccurate. If done in a systematic manner, the use of adaptive window sizes can reduce the effects of mixed image properties at boundaries (Kanade and Oku- tomi, 1994; Nagel, 1995). An alternate and more easily implemented solution is to base flow estimates on correctly chosen sparse image features. The features must be lines or points that necessarily occur either well away from surface boundaries or occur exactly at the boundary and for which localization is not significantly effected by image structure to either side of the boundary. The Moravec "interest operator" (Barnard and Thompson, 1980), extrema in the difference of Gaussians (Mutch and Thompson, 1983), corner detectors (Ranagrajan et al., 1988), and methods based on contrast edges (Hildreth, 1983; Waxman et al., 1988) satisfy this property. 2.2. Ambiguity of surface boundary location Many of the methods for detecting flow discontinuities are based on looking for large magnitude values of the flow gradient. Unless the location of the flow discontinuity is already known or methods which allow for multiple motions near boundaries are used, estimated flow will be smoothed over near the boundary. Figure 1 illustrates the problem. Estimated flow magnitude is plotted against position along an axis perpendicular to a surface boundary. Away from the boundary, flow estimates will be reasonably accurate. They should also be accurate on the occluding surface nearby texture actual boundary Position Flow Maximum rate of change in flow Fig. 1. Optical flow gradients are not sufficient to accurately locate flow boundaries. near the boundary, since the boundary itself will have sufficient structure to allow flow estimation and is moving with the occluding surface. On the occluded side, however, flow estimates won't be accurate until observed sufficiently far from the boundary to allow the moving texture of the occluded surface to dominate any effects associated with the surface boundary, which is moving with a different optical flow. The maximum rate of change in flow will typically be noticeably offset from the actual boundary. Whatever flow-based boundary detection method is used, there is an intrinsic localization ambiguity associated with instantaneous flow that cannot be overcome without either non-motion cues to the boundary location or analysis over longer time intervals (Thompson and Barnard, 1981). 1 Consider the pattern shown on the left in Figure 2. Three bars, ff, fi, and fl, are moving to the left. Three other bars, a, b, and c, are moving to the right. Assuming that occlusion boundaries are likely to have associated contrast edges, then the edge of the occluding surface is either along the right side of bar fl or the left side of bar c. additional information, there is no way to resolve this ambiguity. Not until the next time step, shown on the right in the figure, is it apparent that the lighter colored bars on the left are occluding the darker colored bars to the right and that the true occlusion boundary is at the edge of bar fl. This problem affects not only boundary detection based on flow gradients, but also methods which are based on the appearance and disappearance of surface texture (Kaplan, 1969; Mutch and Thompson, 1985), methods which allow for multiple motions within a local neighbor- hood, and methods which attempt to recognize occlusion boundaries using properties of similarity surfaces (e.g., Anandan, 1989). A method for deciding which possibility - bar fl, bar c, or the newly appeared bar d - really corresponds to the surface boundary is described in section 3.2.1. 3. An Algorithm for Flow Estimation in the Presence of Discontinuities This section outlines an optical flow estimation algorithm which effectively addresses the problems discussed in section 2. It has similarities to the Thompson b b a a c occlusion boundary? c d occlusion boundary? Fig. 2. Intrinsic ambiguity in boundary location at one instant in time. method presented in Heitz and Bouthemy (1993), though differs in a number of important regards: the algorithm correctly deals with mixed image properties near surface boundaries, it uses a more complete classification of boundary types, and it is able to resolve boundary ambiguities when textured backgrounds are present. The algorithm utilizes explicit line processes to avoid undesirable interactions across motion discontinuities in a manner analogous to the MRF methods, but using a much simpler formulation. The important features of this algorithm can be added to most existing flow estimation approaches. In the remainder of this paper, our analysis excludes motions consisting exclusively of rotations of revolute objects around an axis perpendicular to the line of sight and corresponding to the axis of symmetry of the object. This particular situation introduces additional ambiguities, the resolution of which is still largely an open question (Thomp- son et al., 1992; Thompson and Painter, 1992). 3.1. Dealing with discontinuities At flow discontinuities, effective flow estimation methods must avoid smoothing the flow across the boundary and must also keep image properties associated with a surface on one side of the boundary from corrupting the flow estimation for the surface on the other side. We deal with this second problem by basing flow estimation solely on image features which are relatively unaffected by this mixture of image properties. In particular, we base flow calculations only on image properties at edges. As long as no temporal pre-filtering is performed, spatial contrast edges will either be close approximations to surface boundaries or far enough away from surface boundaries so that local image properties near the edge are largely unaffected by image regions that are part of other surfaces. This has the additional advantage of minimizing difficulties due to apparent misregis- trations between contrast and motion edges due to localization errors when separate image primitives are used. The standard Horn and Schunck (1981) method is utilized, modified so that spatial and temporal image gradients are only used at spatial edges. For other image locations, flow is estimated using the interpolation properties intrinsic to the method. Given information about the location of surface boundaries, it is straightforward to avoid flow computation interactions across boundaries. The Gauss-Seidel method used in the basic Horn and Schunck algorithm bases flow estimates for a given pixel at a particular iteration step on the average values at neighboring pixels in the previous itera- tion. It is only necessary to make sure this average does not include any pixels on the other side of a motion discontinuity. Discontinuity detection is based on an analysis of flow differences across contrast edges which potentially signal surface boundaries. When possi- ble, the surfaces to either side of a detected boundary are classified as occluding or occluded using the boundary flow constraint, which states that the flow associated with the occluding surface immediately adjacent to the boundary will be equal to the flow of the boundary (Thompson et al., 1985). Violations of the boundary flow constraint can be used to identify occluded or disoccluded surfaces, Exploiting Discontinuities in Optical Flow 167 Fig. 3. The surface to the left has an optical flow different from that of the boundary and hence is an occluded surface. Since it is moving away from the boundary, it is in fact being disoccluded. as shown in Figure 3, without any need to know the camera or object motions involved. This relationship is only useful when there are differences across the boundary in the component of flow normal to the boundary. If the flows to either side of a boundary are parallel to the boundary itself, then it is not possible to determine which side is occluding the other without additional information about camera motion. Such sheer boundaries still indicate occlusion, however. To detect and classify motion boundaries, the flow associated with every point on a contrast edge is compared to the flow to either side. The flows to either side are separated into components normal to the edge orientation, f ?and f ?and parallel to the edge, f kand f k. Detection and classification proceeds by first checking to see if one surface is progressively occluding or disoccluding the other. If not, sheering surfaces are checked for: if max(d ?; d ?) - T 1 if d ?? d ?side 1 is occluded, side 2 is occluding else side 1 is occluding, side 2 is occluded. else if j f sides 1 and 2 are sheer This method, while less elegant that the detection and classification scheme described in Thompson et al. (1985) is more reliable. Note in particular that f ?and f ?are separately compared to the normal flow of the edge, rather than just taking their difference. This is important, as it increases the sensitivity of the edge detection. Because of the effects described in section 2.2, the difference in flow normal to the edge attributable to one surface moving relative to another will be concentrated in d ?or d ?. Additional differences in flow normal to the edge will arise due to smooth variations in flow on the occluding side of the edge and from various noise effects. As a result, basing detection on j f ?\Gamma f ?j will increase the classification error rate. Flow estimation at a boundary pixel neither affects nor is affected by the flow at pixels to the occluding side of the boundary. Interactions to the occluding side, however, are allowed, since the boundary is part of that surface. A conservative approach is taken for sheer boundaries. The flow estimation at the boundary is isolated from the flow values to either side, but does interact with the estimation of other values along the bound- ary. The complete algorithm interleaves flow estimation and boundary detection. Enough Gauss-Seidel iterations are done to get a reasonable estimate of flow values. Boundaries are then detected and classified. Better flow estimates are obtained by performing additional iterations using this in- formation. The process is repeated as necessary. 3.2. Improving boundary localization over time Optical flow estimation over sequences longer than a single frame pair can improve the efficiency of iterative algorithms by providing reasonably accurate initial values and can improve the accuracy of many methods by using some form of temporal coherence to reduce the effects of noise. It turns out that longer sequences are also the key to resolving the localization ambiguity described in section 2.2. 3.2.1. Boundary projection Surface boundaries persist over time. Once these boundaries are found at one time step, their position can be easily predicted for the next time step. This is done by taking each point on a detected occlusion boundary and looking for a contrast edge in the future frame at the corresponding location, offset by the flow of the boundary point. Substantial efficiency is achieved by starting the iterations at the next time step using these predicted boundary loca- tions. Even more importantly, over time actual Thompson surface boundaries will be maintained while detected boundaries that in fact correspond to surface texture near true boundaries will disappear. To see why this is so, consider Figure 2. At time step 0, the interleaved iterate and classify algorithm will end up finding potential occlusion boundaries to the right of bar fl and to the left of bar c. The flow estimates assigned to the region between the bars is likely to be a muddle. At time step 1, bar d has appeared. The flow of this new "texture element" will initially propagate both left and right, since there is no surface boundary indication associated with the bar. As the flow propagation approaches bar c, the differential flow across the (false) boundary on the left side of c is reduced, leading to a reclassification of the edge as non-occluding. The sides of d never get classified as occluding, since the only flow not consistent with the edge motion is blocked by the boundary at fl from propagating towards d. The situation shown in Figure 2 is extreme in that a full texture element appears over a single time step. In practice, texture element spacing is usually much larger than inter-frame motions and the effect described above takes place more gradually. 3.2.2. Flow projection Horn and Schunck suggest improving the efficiency of their algorithm by using the results obtained for one time step to initialize the iterations at the next time step. Simply using the flow obtained for each pixel at one time step to initialize the estimates for the same pixel at the next time step is adequate over smooth sur- faces, but can actually lead to worse results at occlusion boundaries than if a default of zero flow is used in the initialization. This is because the flow associated with a disoccluded surface region will typically be very different from the flow of the surface which was previously occluding it. Some improvement can be obtained by projecting the flow estimates at one time step to pixels in the next time step in a manner that takes into account the flow value itself. This fails, however, to provide initial estimates for flow in occluded regions where multiple flow values project to the same point and in disocclusion regions where no flow values from the previous time step will project (Black and Anandan, 1990). Effective projection of flow into occluded and disoccluded regions in the next time step is pos- disoccluded region region flow zero occluded occlusion boundary occlusion boundary zero flow Fig. 4. Projecting flow into occlusion and disocclusion regions sible if occlusion boundaries have been detected and classified in the current time step. Figure 4 shows a simplified situation in which an occlusion boundary is stationary, the occluding surface is to the left, the occluded surface is to the right, and the motion of the occluded surface is normal to the boundary. Two possibilities exist: the occluded surface is moving either towards or away from the boundary. (In the case of pure sheer motion, no occlusion or disocclusion regions ex- ist.) Movement away from the boundary causes disocclusion. The gray area on the left of Figure 4 indicates the region in the next time step that will correspond to surface visible for the first time and which will have flow close to that on the occluded side of the boundary. Movement towards the boundary causes occlusion. The gray area on the right in Figure 4 indicates the region in the next time step where flow vectors from two different surfaces will both project. The best estimate of the actual flow will be the flow of the boundary itself. In either case, the region of oc- clusion/disocclusion runs from the boundary to a line found by adding the flow vector of the occluded surface point nearest each boundary point to the boundary point location. For the more general case of moving boundaries, the region of oc- clusion/disocclusion runs from the projection of the boundary into the next time step to the line found by adding the flow vector of the occluded surface point nearest each boundary point to the projected boundary point location. The flow to be filled into these regions is either the flow of the boundary or the flow of the nearest occluded surface point, depending on the classification of the boundary. Exploiting Discontinuities in Optical Flow 169 Fig. 5. Original image sequence, frames Note that the principal goal here is to improve efficiency, not implement some sort of temporal continuity constraint. Temporal consistency can also be used to improve accuracy in flow esti- mation, though this constraint can lead to problems in occlusion/disocclusion regions (Murray and Buxton, 1987). Thus, the approach described in the preceding paragraph might be extended to better exploit temporal continuity at and near boundaries. 4. Experimental Results This section presents results from controlled experiments run on synthetic data. Implementation details and results on real imagery are presented in Thompson (1995). While the limitations of using synthetic data are well known, it is the only way to do fair quantitative comparisons between alternate approaches. The accuracy of estimated flow was measured using the inter-frame angular deviation described in Barron, 1994. While this measure is useful in evaluating the results of the controlled experiments described below, the absolute magnitudes of flow errors should not be compared with those obtained in other circumstances. In the tests reported here, most of the flow estimation error occurs at flow discontinuities, which correspond to a substantial number of the pixels in the test sequences. This is not the case with other image sequences, such as those used in Bar- ron, 1994. Error magnitude comparisons between dissimilar image sequences will be dominated by the number of pixels at or near discontinuities at least as much as by the quality of the flow estimation algorithms applied. In evaluating the results, it is also important to note that the performance of the methods described here depends on both the particular motion analysis algorithm used and the quality of the (static) edges on which it is based. In order to provide a grounds for comparing algorithms, a simple edge detector was used and manipulations of the test sequences were structured to avoid perturbations of edge detector performance. For ex- ample, sub-pixel motions were avoided, since edge detector results would be affected by the anti-aliasing scheme used to generate synthetic images with non-integral motions. To get the best possible performance, as would be desirable if quantitative comparisons were been done with competing methods, a more sophisticated edge detector should be used. Figure 5 shows the first four images from an 120 by 160 pixel synthetically generated sequence with a textured rectangle moving across a textured background. The rectangle is moving four pixels to the right and two pixel down per frame. The background is moving two pixel down and sheer boundaries occluding sides side side occluded occluded Fig. 6. "True" boundary classifications for moving rectangle test sequence. Thompson Fig. 7. Flow estimation using standard Horn and Schunck method (first four frame pairs). Fig. 8. Flow estimation using Horn and Schunck with explicit boundary detection (first four frame pairs). to the left per frame. Figure 6 shows the true occluded/occluding and sheer boundaries for this sequence. In this and subsequent figures, sheer boundaries are marked by a light gray pattern on either side of a dark line while occluded/occluding boundaries are marked by a darker gray pattern on the occluded side of the edge. Figure 7 shows the optical flow estimated by the standard Horn and Schunck algorithm, applied to the first four frame pairs of the moving rectangle sequence. The errors in flow estimation, particularly at and near the boundaries of the moving rectangle, are obvious. Figure 8 demonstrates the results of adding explicit boundary analysis to the basic Horn and Schunck algorithm. The final flow estimates and boundary classifications at each time step are shown. While the flow estimates are improved, substantial error remains due to the mixing of image properties across the boundaries, which seriously distorts the gradient computations. Figure 9 uses the same algorithm as Figure 8, except that only image properties at contrast edges are used in the flow computations. This minimizes the effects of image property mixing between surfaces. Results for four frame pairs are shown. Flow estimates are further improved. The ambiguity in detecting and classifying boundaries when background texture appears near occluding contours, which is manifested in the figure as missing and extraneous boundary segments, is still affecting accuracy, however. Figure 10 shows the effect of using boundary projection to initialize processing at the next time step. The boundary classification errors have largely been eliminated and the flow estimates correspondingly improved. Table 1 lists the quantitative average errors associated with each of these algorithms. Exploiting Discontinuities in Optical Flow 171 Fig. 9. Edge-based flow estimation using explicit discontinuity detection. Fig. 10. Flow estimation using explicit discontinuity detection and projection. Table 1. Flow errors for different estimation algorithms. frame Basic Horn and Schunck 13.38 Horn and Schunck with boundary detection 11.31 Edge-based flow estimation with boundary detection 7.55 Edge-based flow est. with boundary detection, projection 7.55 The next set of experiments tests the value of classifying surface boundaries by labeling the sides as occluding or occluded. A test sequence consisting of a uniform intensity disk moving over a tex- Thompson Fig. 11. Moving disk image sequence. Table 2. Flow errors using symmetric and asymmetric boundary classification. frame Symmetric boundary classification 6.75 Asymmetric boundary classification 5.55 Table 3. Flow errors when total iterations are reduced. frame Boundary projection, no flow projection 21.99 copied flow 21.99 projected flow 21.99 Boundary projection, copied flow. 21.99 Boundary projection, projected flow. 21.99 tured background was used, with foreground and background motions as in the previous tests (Fig- ure 11). To insure convergence given the large, uniform brightness area, 600 iterations were run at every time step. Occluding/occluded boundary classification should allow the motion of the disk boundary itself to propagate into the otherwise featureless interior of the disk. As is clear in Table 2, accuracy is improved. The final set of experiments address the issue of how well projecting the estimated flow from one time step to initialize computations at the next time step helps in flow determination. The image sequence used was that shown in Figure 5. A total of iterations were run at each time step, as compared to 150/step for the results shown in Figures 7-10. Five cases were examined, with the resulting errors shown in Table 3. For the first case, the algorithm employing boundary classification and boundary projection was used as in Figure 10, only with the reduced number of itera- tions. In the second case, no boundary projection was done, but flow in each time step after the first was initialized copying the values obtained in the previous time step. (While boundaries were not projected from frame to frame, boundary detection and classification was used within each time Exploiting Discontinuities in Optical Flow 173 step.) With reduced iteration, initializing flow estimates is clearly more valuable than initializing boundary estimates. In the third test, there was no boundary projection and flow estimates were initialized using the projection method described in section 3.2.2. There is a substantial improvement in accuracy. The last two cases use boundary projection and flow that is initialized by either copying or projecting values from the previous time step. Again, flow projection is clearly superior to simple copying. 5. Summary This paper has examined a number of important issues affecting the accuracy of optical flow estimates made by algorithms which explicitly take into account flow discontinuities. Theoretical and experimental evidence has been presented showing that the line processes typically used to keep flow smoothness constraints from corrupting estimates across boundaries can still allow image properties associated with a surface to one side of a boundary to improperly influence flow computations on the other side of the boundary. A second problem affecting flow estimation is the intrinsic ambiguity of boundary localization in textured environments when only two frames are considered at a time. This effect was clearly demonstrated using one particular flow estimation algorithm, but occurs independent of the algorithm used. Experimentation has shown the value of distinguishing between occluding and occluded sides of a surface corresponding to a flow discontinuity. This information can be used to improve flow estimates and is important in projecting flow estimates to future time steps so as to reduce computational require- ments. Finally, we have shown how the line processes used in MRF formulations for estimating optical flow can also be used in the conceptually simpler Horn and Schunck algorithm. While the techniques we have described for improving flow estimation at boundaries are most easily implemented in algorithms such as Horn and Schunck and MRF methods, they can be applied across the spectrum of approaches to optical flow esti- mation. For example, the area correlation algorithm described in Smitley and Bajcsy (1981) can be viewed as utilizing something akin to a line process when matching image regions. Acknowledgements This work was supported by National Science Foundation grant IRI-9112267. Notes 1. There is evidence that the human vision system resolves this ambiguity by favoring whichever possible boundary has the strongest non-motion edge properties (Yonas, 1990). --R The extracton of spatio-temporal energy in human and machine vision A computational framework and an algorithm for the measurement of visual motion. Disparity analysis of images. Performance of optical flow techniques. Computing two motions from three frames. A model for the detection of motion over time. Visual Reconstruction. Velocity determination in scenes containing several moving objects. Computation of component image velocity from local phase information. Visual integration and detection of discontinuities: The key role of intensity edges. Stochastic relaxation Optical flow estimation using spatiotemporal filters. IEEE Trans. The Measurement of Visual Motion. Determining optical flow. Computing motion using analog and binary resistive networks. A stereo matching algorithm with an adaptive window: Theory and experiment. Kinetic disruption of optical texture: The perception of depth at an edge. Optical flow estimation: An error analysis of gradient-based methods with local optimization Computing optical flow in resistive networks and in the primate visual system. Bayesian estimation of motion vector fields. Cooperative computation of stereo disparity. Scene segmentation from visual motion using global optimization. Hierarchical estimation of spatial properties from motion. Analysis of accretion and deletion at boundaries in dynamic scenes. Optical flow estimation and the interaction between measurement errors at adjacent pixel positions. International Journal of Computer Vision Detection of binocular disparities. Optimal corner detection. Image flow segmentation and estimation by constraint line clustering. Local and Global Interpretation of Moving Images. Stereo processing of aerial Exploiting discontinuities in optical flow. Dynamic occlusion analysis in optical flow fields. Qualitative constraints for structure-from-motion Convected activation profiles and the measurement of visual motion. Abstracts in Investigative Ophthalmology and Visual Sci- ence --TR
visual motion;discontinuities;optical flow;edges
305984
Relaxing the Triangle Inequality in Pattern Matching.
Any notion of closeness in pattern matching should have the property that if A is close to B, and B is close to C, then A is close to C. Traditionally, this property is attained because of the triangle inequality d(B, C), where d represents a notion of distance). However, the full power of the triangle inequality is not needed for this property to hold. Instead, a relaxed triangle inequality suffices, of the form d(B, C)), where c is a constant that is not too large. In this paper, we show that one of the measures used for distances between shapes in (an experimental version of) IBMs QBIC1 (Query by Image Content) system (Niblack et al., 1993) satisfies a relaxed triangle inequality, although it does not satisfy the triangle inequality.
Introduction Traditionally, databases have been used to store and retrieve textual and numerical information. More recently, applications such as multimedia have led to the development of database systems that can handle images. One such system is the QBIC ("Query by Image Content") system (Niblack et al., 1993), developed at the IBM Almaden Research Center. An experimental version of the QBIC system (henceforth in this paper called simply "QBIC") can search for images by various visual characteristics such as color, shape, and texture. While the result of a query to a traditional database is usually some specific set of items (e.g., the names of all employees in the computer science department), the result of a query to a database of images might not be so well-defined. Consider, for example, a query that should return all items that look like a tree; such a query could be entered by having the user draw the desired tree-like shape on a screen, or by extracting the shape from a visual scene. Questions of the form "Does the shape D in the database look like the query tree shape Q?" do not have definite yes/no answers (unlike questions of the form "Is employee E in the computer science department?"). Rather, the answer to such a question is more reasonably given as a numerical "distance" that measures how well the shape D matches the shape Q. The answer to the query could then be an ordered list of shapes from the database, ordered by how closely they match the query shape Q. This raises the issue of how to define a measure of "distance" between shapes. There is an extensive literature about various ways to define distances between shapes. These include methods based on turning angles (Arkin et al., 1990; McConnell et al., 1991), on the Hausdorff distance (Huttenlocher et al., 1992), on various forms of moments (Kim and Kim, 1997; Taubin and Cooper, 1991), and on Fourier descriptors (Jain, 1989). Mehtre, Kankanhalli and Lee (1997) and Mumford (1991) discuss and compare various ap- proaches. Scassellati et al. (1994) compare methods on the basis of how well they correspond to human perceptual distinctions. In Section 2, we discuss a particular distance measure between shapes, that is one of the measures used in the QBIC system. Intuitively, it measures how well the boundary of one shape matches the boundary of the other, allowing either boundary to stretch when doing the matching. A variation of this method provided the best overall results in the Scassellati et al. study. Let us reconsider the problem we mentioned earlier, where Q is a shape, and where we wish to obtain an ordered list of shapes from the database, ordered by how closely they match Q. Let us say that as in the QBIC system, we wish to see the best 10 matches, and then upon request the next best 10 matches, and so on. This is a computationally expensive process, for several reasons. For a given shape D in the database, computing the distance between Q and D may well be expensive in itself: for example, for the distance measure used in QBIC that is discussed in Section 2, a dynamic programming algorithm is used that has quadratic complexity. Furthermore, even if we wish to see only the best 10 matches, we may have to compute the distance between Q and every shape D in the database: this is because there is no obvious indexing mechanism that can be used. A potential avenue for speeding up the search is to preprocess the database, clustering shapes according to their distance amongst themselves. Then, for example, if we have found that Q is far from the database shape D 1 , and if the preprocessing tells us that D 1 is close to another database shape D 2 , we might be able to infer that Q is sufficiently far from D 2 that we do not need to actually compute the distance between Q and D 2 . Similarly, if Q is close to D 1 , and if the preprocessing tells us that D 1 is far from D 2 , we might be able to infer that Q is sufficiently far from D 2 . For this to work, we must be able to relate the distance between Q and D 2 to the distance between Q and D 1 and the distance between D 1 and D 2 , for example, by the triangle inequality. The triangle inequality for a distance measure d states that, for all A, B, and C, In considering similarity measures between shapes, Arkin et al. (1990) say that such a measure should be a metric. In particular, they say: The triangle inequality is necessary since without it we can have a case in which d(A; B) and d(B; C) are both very small, but d(A; C) is very large. This is undesirable for pattern matching and visual recognition applications. The theme of this paper is that we agree completely that a distance measure d where d(A; B) and d(B; C) are both very small, but where d(A; C) is very large, is certainly undesirable. Instead, we want a distance measure d to have the property that if A is close to B, and B is close to C, then A is close to C. But to obtain this property, it is not necessary that d satisfy the triangle inequality. Instead, it is sufficient for d to satisfy a "relaxed triangle inequality" of the form where c is a constant that is not too large. We show that a measure used for distances between shapes in the QBIC system satisfies a relaxed triangle inequality, although it does not satisfy the triangle inequality. What if we are in a scenario where a relaxed triangle inequality holds? Recalling the situation described above, where we know distances d(Q; we want to conclude something about d(Q; D 2 ), if d satisfies (1) and is symmetric we can infer the bounds The first two inequalities correspond to the situations described earlier, where we conclude that Q is sufficiently far from D 2 , without actually computing this distance. The third inequality corresponds to a situation where we conclude that Q is sufficiently close to D 2 , by knowing that Q is close to and that D 1 is close to D 2 . We note that this last case might not provide useful information in a system such as QBIC, where we want to know, in the case of close matches, just how close the match is (because the results are presented in sorted order based on closeness of match). The remainder of the paper has three sections and an appendix. In Section 2, we formally define the distance NEM r , one of the measures used in the QBIC system. In Section 3, the definition is illustrated by an example. In Section 4, we sketch the proof of the relaxed triangle inequality; the full proof is given in the appendix. We give the definitions and results in greater generality than for the specific application to distances between shapes. The relaxed triangle inequality for shape distance follows immediately from the more general results. We also show in Section 4 that the value of the constant c we give in the relaxed triangle inequality is essentially the best possible within the more general framework. However, for the specific application to shape distance, some smaller constant might be possible, particularly when restricted to shapes meeting some naturalness property. In Section 4 we remark on ways that the relaxed triangle inequality might be improved, by using extra information contained in the boundary matching between two shapes (that is, in addition to the NEM r -distance obtained from the boundary matching). An example of extra information that could be helpful is the amount of stretching done. Such improvements may be necessary for the relaxed triangle inequality to be useful in practice. Even though the technical results in this paper apply to a specific distance measure, the results carry a more general message: A distance measure should not be judged unsuitable simply because it does not satisfy the triangle inequality; it might be possible to prove that the measure satisfies a relaxed triangle inequality. Our specific results give a concrete example of this, by proving that a natural measure of distance between shapes satisfies a relaxed triangle inequality, although it does not satisfy the triangle inequality. 2 The Distance Measure NEM r One intuitively appealing way to measure the distance between shapes is to measure how well the boundary of one shape matches the boundary of the other, allowing either boundary to stretch when doing the matching. This measure has been used, for example, in (Cortelazzo et al., 1994) for trademark shapes and in (McConnell et al., 1991) for ice floes. As in (Cortelazzo et al., 1994), we call this distance measure nonlinear elastic matching (NEM). After we define this measure formally, we shall show that NEM does not satisfy the niceness property we discussed in the introduction: it is possible for the NEM-distance between A and B to be small, and the NEM-distance between and C to be small, with the NEM-distance between A and C being large. That NEM does not satisfy the triangle inequality was known previously (cf. (Cortelazzo et al., 1994)); we show further that it does not even satisfy a relaxed triangle inequality. Niblack and Yin (1995) defined a modified version of NEM, which is essentially one of the methods implemented in the QBIC system. It is related to a distance notion described in (McConnell et al., 1991). Niblack and Yin's definition depends on a parameter r, a positive number, which we call the stretching penalty. The idea, informally, is that we add to the distance an amount equal to r times the amount of stretching that was done to make the two boundaries match. Thus, we pay a penalty for excessive stretching. Letting NEM r denote the modified measure, we show that NEM r satisfies a relaxed triangle inequality (1) with constant increases. As we shall show in Section 3, the version of the NEM-distance involving a stretching penalty as described in (McConnell et al., 1991) does not satisfy a relaxed triangle inequality. We now consider the definition of NEM r . Fix some stretching penalty r - 0. (Although we are primarily interested in the case r ? 0, we allow is equivalent to NEM, so we get the definition of NEM as a special case.) Shortly, we shall define the distance NEM r (X; Y ) between two sequences In general, we allow m 6= n and we allow the elements x i and y j of the sequences to belong to some metric space S with distance metric b. We refer to (S; b) as the base. In particular, we assume that b is symmetric and satisfies the triangle inequality for all points in S, and that b(x; We show that the NEM r -distance satisfies a relaxed triangle inequality for any r ? 0 and any S that is bounded, i.e., such that b sup is finite, where The constant c in the relaxed triangle inequality depends on r and b sup . In the application to shape matching, as we shall now discuss, the elements x i and y j represent tangent angles, and b measures the difference between two angles. Hence, in this case, so We now discuss Niblack and Yin's approach to shape matching. We assume that each shape is given by a simple (non-self-intersecting) closed curve in the plane. We measure how well a particular point a on the boundary of one shape matches a particular point b on the boundary of another shape as the difference between the tangent angle to the boundary at point a and the tangent angle to the boundary at point b. Thus, we begin by replacing each shape by a sequence of tangent angles taken at some number n of points spaced equally in distance around the boundary of the shape. is the sequence of tangent angles for the first shape, and the sequence of tangent angles for the second shape, then the NEM r -distance between the shapes is taken to be the NEM r -distance (which we shall define shortly) between the sequences X and Y . The NEM r -distance between two shapes depends on the "starting points" on the boundaries of the two shapes (that is, where the comparisons begin). Ideally, the distance between two shapes should be taken as the min of the distance over all possible starting points. In fact, Niblack and Yin (1995) focus on this issue of starting points, based, for example, on the shape's moments. In this paper, we shall not consider this issue: we will assume that the starting points are given. It is easy to see that our results on the existence of a relaxed triangle inequality would continue to hold even if we were to define the distance by taking the min of the distance over all possible starting points. In the QBIC system, there is a fixed number of points, equally spaced around the boundary of the shape, and so the starting point determines the sequence. Other papers consider notions of distance that depend only on the shapes. For example, in (Arkin et al., 1990), where a distance function is given for polygonal shapes, this distance function does not depend on any other parameters such as auxiliary points taken along the boundary. When we say that NEM r satisfies a relaxed triangle inequality NEM r (A; C) - c(NEM r (A; B)+ NEM r (B; C)), we mean that the constant c does not depend on the length of the sequences A; B; C. In the application to shape matching, this means that c does not depend on the number of sample points. Specifically, we show that works if the same number of sample points is used for all shapes. If the number of sample points varies from shape to shape, we still obtain a relaxed triangle inequality, but with the larger constant -=r). (One can imagine weaker versions of the concept of a relaxed triangle inequality where the "constant" c might depend on the dimensionality of the space from which the points A; B; C are drawn. However, for NEM r there is no need to weaken it in this way.) We return to the definition of NEM r (X; Y ). An (m; n)-mapping is a set \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta \Theta Figure 1: A minimal (9; 9)-mapping. The stretch-cost of this mapping is 6r. where we call each pair hi; ji 2 M an edge, satisfying the following conditions: 1. Every number in f1; is the first component i of some edge hi; 2. Every number in f1; ng is the second component j of some edge hi; 3. No two edges "cross", that is, there do not exist M . An n)-mapping M is minimal if no proper subset of M is an (m; n)-mapping. Note that in any minimal mapping, there cannot be three edges since the subset obtained by removing the edge hi 0 ; ji is a mapping. For example, Figure 1 shows a minimal (9; 9)-mapping. We sometimes refer to an (m; n)-mapping simply as a mapping when m and n are clear from context or unimportant. An edge hi; ji 2 M is a stretch-edge (of M) if either hi \Gamma . For an edge hi; ji in the mapping M , define the stretch-cost of hi; ji with respect to M , as r if hi; ji is a stretch-edge of M For example, in the mapping shown in Figure 1, the edges h2; 3i; h3; 5i; h5; 6i; h6; 6i; h7; 6i and h9; 9i are stretch-edges and each has stretch-cost r, while the other edges have stretch-cost 0. the distance-cost of hi; ji with respect to the sequences X; Y , as The stretch-cost and the distance-cost of the mapping M , the latter with respect to the sequences Y , are defined by summing the respective costs of all edges in M ; that is The (total) cost of M is given by Finally, is an (m; n)-mapping g: In the sequel, we abbreviate d-cost(M; the sequences X and Y are clear from context. Similarly, for an edge e in a mapping M , we may abbreviate s-cost(e; M) by s-cost(e) when M is clear. Clearly the value of NEM r (X; Y ) does not change if we minimize over only the minimal (m; n)- mappings. It is also easy to see that NEM r (X; Y n)-mapping M , the set of edges obtained by reversing the first and second components of each edge in M gives an (n; m)-mapping M 0 having the same stretch-cost and the same distance-cost as M . Although this definition of NEM r (X; Y ) involves a search over a number of mappings that grows exponentially in the minimum of m and n, it is well known that functions such as NEM r (X; Y ) can be computed in time O(mn) by dynamic programming (see, for example, (McConnell et al., 1991; Cortelazzo et al., 1994; Niblack and Yin, 1995)). The algorithm iteratively computes the quantities D(i; j), where D(i; j) is the NEM r -distance between the length-i prefix of X and the length-j prefix of Y . The values of D(i; j) can be computed by D(1; 3 An Example We now illustrate the definitions with a simple example. Another purpose of the example is to show that the NEM-distance, where the stretching penalty r is 0, does not satisfy a relaxed triangle inequality, and to show that the NEM r -distance does not satisfy the triangle inequality for a small enough positive r. (In Section 4, we give a lower bound on the constant c in the relaxed triangle inequality for NEM r ; since in particular this lower bound is bigger than 1 for every r, this shows that for every r, the NEM r -distance fails to satisfy the triangle inequality.) The example in this section also shows that the version of the NEM-distance involving a stretching penalty as described in (McConnell et al., 1991) does not satisfy even a relaxed triangle inequality. Thus, it is important how the stretching penalty r enters into the distance calculation: the method of (Niblack and Yin, @ @ @ @ @ A Figure 2: Three shapes used to illustrate distances between shapes. 1995), where r is additive, gives a relaxed triangle inequality, whereas that of (McConnell et al., 1991), where r is multiplicative, does not. Consider the three shapes shown in Figure 2. Note that each shape consists of five "short" line segments and three "long" line segments. (Although the shapes in Figure 2 were chosen to be polygons for simplicity, the NEM r -distance can be applied to more general shapes whose boundaries are curved.) The first step is to convert each shape into a sequence of tangent angles by placing sample points around the boundaries. To simplify the example suppose that, for each shape, one sample point is placed on each short line segment, k sample points are placed along each of the two long line segments that are part of the top of the shape, and m sample points are placed along the long line segment forming the bottom of the shape. The total number of sample points is therefore 5. In each case we mark the starting point with an arrow, and we move clockwise around the shape. These sample points give the following sequences of tangent angles: z - z - 7- z - z - z - z - z - z - z - Consider first NEM, where the stretching penalty r is 0. In Figure 2, 0: the small triangular protrusion in shape B is stretched to perfectly match the large triangular protrusion in shape A, and the short horizontal segments to the left and right of the large triangular protrusion in shape A are stretched to exactly match the long horizontal segments to the left and right of the small triangular protrusion in shape B; the rest of the boundaries of shapes A and B match exactly without any stretching. For future reference, call this mapping the stretch mapping. For example, the stretch mapping begins Since a total of four short line segments of length 1 are stretched to match four long line segments of length k, this mapping contains stretch-edges. But since r = 0, the stretch-cost is 0. The distance-cost is 0 because each angle in angles(A) is mapped to the same angle in angles(B). The NEM-distance between shapes B and C is small (although not zero): in this case, the small triangular protrusion in shape B does not match the small square protrusion in shape C, although this mismatch occurs only in a small part of the boundary, so the distance is small. Specifically, -=2. The upper bound NEM(B;C) -=2 is shown by the no-stretch mapping containing edges hi; ii for k-=2. The lower bound, NEM(A;C) - k-=2, holds because the angles -=4 and 7-=4, occurring a total of 2k times in angles(A), differ by at least -=4 from every angle occurring in angles(C). The upper shown by the no-stretch mapping. Since NEM(A;C) increases as k increases, whereas NEM(A;B) and NEM(B;C) are constant independent of k, the NEM-distance does not satisfy a relaxed triangle inequality (where the constant c is independent of the number of sample points). It is instructive to see why the example of Figure 2 does not cause the relaxed triangle inequality to fail for NEM r , like it does for NEM. For NEM r , it is no longer true that the distance between A and B is zero; it is not even "small". If we do much stretching to make the triangular protrusions match at many points, then the distance includes a large term due to a large multiple of the stretching penalty. If, on the other hand, we do little stretching, then the distance includes a large term due to mismatch of tangent angles at many points. If we believe for aesthetic reasons that shapes A and B are not "close", then another advantage of NEM r over NEM (in addition to the advantage that NEM r satisfies a relaxed triangle inequality whereas NEM does not) is that NEM r better fits our aesthetic idea of "closeness" of shapes. Although NEM r satisfies a relaxed triangle inequality (as sketched in Section 4 and shown in the appendix), the shapes in Figure 2 show that it does not satisfy the triangle inequality if r ! -=8. First, NEM r is shown by the stretch mapping; the distance-cost of this mapping is still 0 as above, but its stretch-cost is now 4(k \Gamma 1)r. As above, NEM r (B; C) -=2 is shown by the no-stretch mapping. But NEM r (A; C) - k-=2, by the same argument given above for NEM. Using these bounds, it is easy to check that NEM r Finally, we note that the version of the NEM-distance involving a stretching penalty as described in (McConnell et al., 1991) does not satisfy a relaxed triangle inequality. In this version, the stretching penalty r multiplies the distance-cost of a stretch-edge, instead of being added to it. So we need r ? 1 in order that r impose a penalty. More formally, for sequences X and Y , a mapping M between them, and an edge hi; ji in M , define cost hi; ji is a stretch-edge of M , or b(x cost 0 (M; cost 0 (e; M;X; Y ). Let NEM 0 be the minimum cost 0 of a mapping between X and Y . The shapes in Figure 2 show that if r ? 1, then NEM 0 r does not satisfy a relaxed triangle inequality. The reason is that r shown by the stretch mapping. The distance-cost of all edges is 0 in the stretch mapping between A and B, so multiplying by r does not increase the cost. It is still true, as described above for NEM, that NEM 0 r (A; C) - k-=2. So a relaxed triangle inequality does not hold for NEM 0 r . 4 The Relaxed Triangle Inequality In this section we show that NEM r satisfies a relaxed triangle inequality if r ? 0 and if b sup is finite. We consider first the case of equal-length sequences. Theorem 4.1 For any base (S; b), any real r ? 0, any integer n ? 0, and any three sequences Y; Z of length n, Proof Sketch. We outline the main steps of the proof. A full proof is given in the appendix. The basic strategy is to take a mapping MXY between X and Y having cost NEM r (X; Y ), and a mapping M Y Z between Y and Z having cost NEM r (Y; Z), and paste them together in a certain way to obtain a mapping MXZ between X and Z. The method of pasting together allows us to place an upper bound on the cost of MXZ in terms of the cost of MXY and M Y Z , that is, in terms of NEM r (X; Y ) and NEM r (Y; Z). And once we have an upper bound on the cost of some mapping MXZ between X and Z, we have an upper bound on NEM r (X; Z). As a simple example, suppose that the mappings MXY and M Y Z have no stretch-edges; i.e., these mappings both consist of the edges hi; ii for 1 - i - n. Then we take MXZ to also consist of edges hi; ii for Since the base distance b satisfies the triangle inequality (by assumption), it is easy to see that the distance-cost of MXZ is at most the sum of the distance-cost of MXY and the distance-cost of Y Z . Since the stretch-cost of all three mappings is zero, we actually get the triangle inequality, Z), in this case. In general, however, the mappings MXY and M Y Z can have stretch-edges, and this makes the construction of MXZ and the bounding of its cost more complicated, and it also means that we do not get the triangle inequality in general. Let MXY and M Y Z be minimal (n; n)-mappings such that Since we will be referring to edges in different mappings, for clarity we name the points of X; Y; Z using the notation x[i]; y[j]; z[k], respectively, for 1 - n. For example, an edge of MXY has the form hx[i]; y[j]i for some i and j. To prove the relaxed triangle inequality, we construct a minimal (n; n)-mapping MXZ and place an upper bound on cost(MXZ ). Since we want to use the fact that b satisfies the triangle inequality to help us bound the distance-cost of MXZ , we want MXZ to be a minimal (n; n)-mapping with the following "midpoint property": For every edge hx[i]; z[k]i 2 MXZ , there is a "midpoint" y[j] such that hx[i]; y[j]i 2 MXY and hy[j]; z[k]i 2 M Y Z . Then, the distance-cost of the edge hx[i]; z[k]i is at most the sum of the distance-costs of hx[i]; y[j]i and hy[j]; z[k]i. The first step is to show that some MXZ with the midpoint property exists. This is done in the appendix by describing a construction of one such mapping by adding edges one at a time, such that each added edge has a midpoint. To bound the cost of MXZ , it is useful to divide the stretch-edges of a mapping into two classes, depending on which sequence receives the stretching. For MXY , the stretch-edge hx[i]; y[j]i is an X-stretch-edge if hx[i \Gamma 1]; y[j]i 2 MXY , or a Y -stretch-edge if hx[i]; cannot cross, exactly one of these holds). For M Y Z , the stretch-edges are divided similarly into Y -stretch-edges and Z-stretch-edges. It is also useful to divide the stretch-cost of a mapping into two parts, based on this division of the stretch-edges, as follows. Define X-s-cost(MXY ) (resp., Y -s-cost(M XY )) to be r times the number of X-stretch-edges (resp., Y -stretch-edges) of MXY . Similarly define Y -s-cost(M Y Z ) and Z-s-cost(M Y Z ). Since X and Y have the same length, the number of X-stretch-edges of MXY equals the number of Y -stretch-edges of MXY . Therefore, we have the following equalities involving the stretch-cost s-cost : Similarly, since Y and Z have the same length, To prove the relaxed triangle inequality, it suffices to prove the following two bounds on the stretch-cost s-cost and the distance-cost d-cost of MXZ . Claim 1. 2. r The relaxed triangle inequality stated in the theorem follows by algebraic manipulation from these two claims and (2), (3), (4), and (5). To justify Claim 1, with each stretch-edge in MXZ we associate a distinct stretch-edge in either MXY or M Y Z . Clearly such an association (which is given in the appendix) suffices to prove Claim 1. The final step is to justify Claim 2. Since we know that MXZ has the midpoint property, we would like to use the fact that b satisfies the triangle inequality. A complication is shown by the situation in Figure 3 where the distance-cost of hx[i]; y[j]i contributes t times to the distance-cost of MXZ . The key observation in handling this complication is that each of the contributions of d-cost(hx[i]; y[j]i) after the first contribution can be "balanced" by a Z-stretch-edge of M Y Z that contributes r to the stretch-cost of M Y Z . There is a symmetric case where an edge in M Y Z contributes several times to the distance-cost of MXZ , and the symmetric case is handled similarly, using X-stretch-edges of MXY for the balancing. For more details, see the appendix. 2 A A A A A A A A c c c c c c c c c c Figure 3: A situation where the distance-cost of hx[i]; y[j]i contributes t times to the distance-cost of MXZ . Remark. We suggest two ways that the relaxed triangle inequality might be improved. First, Claims 1 and 2 and (2), (3), (4), and (5) actually give the potentially tighter bound where MXY and M Y Z are any mappings with NEM r (X; Y Therefore, in the application to image databases mentioned in the introduction, it might be advantageous in the clustering of database shapes to keep track of the stretch-cost of mappings as well as their total cost. It is easy to modify the dynamic programming algorithm to compute, together with the minimum total cost of a mapping, the minimum stretch-cost of a mapping among the mappings having minimum total cost. Second, in the proof of Claim 2, we use b sup as an upper bound on the distance-cost of any edge in MXY and M Y Z . Therefore, another way to improve the relaxed triangle inequality in practice would be to replace the gross upper bound b sup by the actual maximum distance-cost of edges in MXY and M Y Z . This would require computing and storing these maximum distance-costs during the clustering preprocessing. Although the remark above shows that we might get a better bound on NEM r (X; Z) in certain cases, the next result shows that the constant (1 in the general relaxed triangle inequality is essentially the best possible. The proof is given in the appendix. Theorem 4.2 For any base (S; b) with b sup ? 0, any real r ? 0, and any real " ? 0, there is an integer n and three sequences X; Y; Z of length n such that We now give analogues of Theorems 4.1 and 4.2 for the case of unequal-length sequences. The results are similar, except that the constant in the relaxed triangle inequality increases to =r). The proofs in the unequal-length case are very similar to the proofs in the equal-length case. The differences are outlined in the appendix. Theorem 4.3 For any base (S; b), any real r ? 0, and any three sequences X; Y; Z, Theorem 4.4 For any base (S; b) with b sup real r ? 0, and any real " ? 0, there are three sequences X; Y; Z such that Acknowledgment . We are grateful to Byron Dom, Martin Farach, Myron Flickner, Wayne Niblack, Prabhakar Raghavan, and Baruch Schieber for helpful discussions and comments. --R An efficiently computable metric for comparing polygonal shapes Trademark shapes description by string-matching techniques Comparing images using the Hausdorff distance under translation Fundamentals of Digital Image Processing Mathematical theories of shape: do they model perception? The QBIC project: querying images by content using color A pseudo-distance measure for 2D shapes based on turning angle Retrieving images by 2D shape: a comparison of computation methods with human perceptual judgments Recognition and positioning of rigid objects using algebraic moment invariants --TR --CTR Per-Ola Kristensson , Shumin Zhai, Relaxing stylus typing precision by geometric pattern matching, Proceedings of the 10th international conference on Intelligent user interfaces, January 10-13, 2005, San Diego, California, USA Ronald Fagin , Ravi Kumar , D. Sivakumar, Comparing top k lists, Proceedings of the fourteenth annual ACM-SIAM symposium on Discrete algorithms, January 12-14, 2003, Baltimore, Maryland Yong-Sheng Chen , Yi-Ping Hung , Ting-Fang Yen , Chiou-Shann Fuh, Fast and versatile algorithm for nearest neighbor search based on a lower bound tree, Pattern Recognition, v.40 n.2, p.360-375, February, 2007 K. Seluk Candan , Prakash Yamuna, Similarity-Based Retrieval of Temporal Specifications and its Application to the Retrieval of Multimedia Documents, Multimedia Tools and Applications, v.27 n.1, p.143-180, September 2005
image database;distance measure;triangle inequality;shape matching;pattern matching
306216
Conjectural Equilibrium in Multiagent Learning.
Learning in a multiagent environment is complicated by the fact that as other agents learn, the environment effectively changes. Moreover, other agents actions are often not directly observable, and the actions taken by the learning agent can strongly bias which range of behaviors are encountered. We define the concept of a conjectural equilibrium, where all agents expectations are realized, and each agent responds optimally to its expectations. We present a generic multiagent exchange situation, in which competitive behavior constitutes a conjectural equilibrium. We then introduce an agent that executes a more sophisticated strategic learning strategy, building a model of the response of other agents. We find that the system reliably converges to a conjectural equilibrium, but that the final result achieved is highly sensitive to initial belief. In essence, the strategic learners actions tend to fulfill its expectations. Depending on the starting point, the agent may be better or worse off than had it not attempted to learn a model of the other agents at all.
Introduction Machine learning researchers have recently begun to investigate the special issues that multiagent environments present to the learning task. Contributions in this journal issue, along with recent workshops on the topic [13, 29, 30], have helped to frame research problems for the field. Multiagent environments are distinguished in particular by the fact that as the agents learn, they change their behavior, thus effectively changing the environment for all of the other agents. When agents are acting and learning simultaneously, their decisions affect (and limit) what they subsequently learn. 1.1. Learning and Equilibrium The changing environment and limited ability to learn the full range of others' behavior presents pitfalls, both for the individual learning agent and for the designer of multiagent learning methods. For the latter, it is not immediately obvious even how to define the goal of the enterprise. Is it to optimize the effectiveness of an individual learning agent across a range of multiagent configurations, or to optimize the joint effectiveness of a configuration of learning agents? Of course, either problem may predominate depending on the circumstance. In any case, we require a framework for characterizing a multiagent learning process, and analyzing the behaviors of alternative learning regimes. we argue that a central element of such a multiagent learning framework is an equilibrium concept, that is, a characterization of some steady-state balance relationship among the M. P. WELLMAN AND J. HU agents. This follows by direct analogy from the static knowledge (i.e., no learning) case. In single-agent decision theory, the agent's problem is to maximize its utility. This remains true in the multiagent (i.e., game-theoretic) case, but there all the agents are simultaneously optimizing. The equilibrium (consistent joint thus represents the logical multiagent extension of individual optimization. Although from any individual agent's perspective the other agents may well be treated as part of the environment, a decision on the analyst's part to accord all of them agent status (i.e., to treat the system as multiagent) imposes an essential symmetry on the problem. Note that equilibrium is an idealization of multiagent behavior, just as optimization is an idealization of single-agent behavior. Whether we actually expect a complicated system to reach equilibrium (or analogously, an individual to optimize successfully), it is quite useful for analysts to understand what these equilibria are. Any nonequilibrium gives at least one agent a motivation to change, just as a nonoptimum is a cause for change in the single-agent case. Game theory bases its solutions on equilibrium actions (or more generally, policies). An agent behaving within an equilibrium is often explained in terms of the agent's beliefs about the types or policies of other agents. How agents reach such beliefs through repeated interactions is what game theorists mean by learning [22], and that is the sense of the term we adopt as well. The distinction between learning and nonlearning agents, for our purposes, is simply that the former change their beliefs, whereas the latter's beliefs are static. 1 Thus, a learning regime defines a dynamic process, and the outcomes achieved in likely trajectories of such processes distinguish the effectiveness of alternative regimes. In the multiagent context, we are interested particularly in whether a learning regime leads to equilibrium behavior, and if so, then how, and when, and which one. In the approach to multiagent learning proposed here, we characterize an agent's belief process in terms of conjectures about the effects of their actions. we define learning in terms of the dynamics of conjectures, and equilibrium in terms of consistency of conjectures within and across agents. 1.2. A Study in Conjectural Equilibrium we proceed in the next section to define our basic solution concept, that of conjectural equilibrium. In the sequel, we investigate the concept by exploring a simple multiagent environment representing a generic class of exchange interactions. we identify some interesting phenomena in this context that-while specific to the particulars of the environment and agent assumptions-we suspect to be prevalent in many other circumstances. Following the empirical analysis of this particular environment, we undertake a theoretical analysis that establishes some equilibrium and convergence properties within a somewhat more general setting. In our basic setup, one class of agents (called strategic) attempt to learn models of the others' behavior, while the rest learn a simple reactive policy. we find the following: 1. The system reliably converges to a conjectural equilibrium, where the strategic agents' models of the others are fulfilled, all the rest correctly anticipate the resulting state, and each agent behaves optimally given its expectation. CONJECTURAL EQUILIBRIUM 3 2. Depending on its initial belief, a strategic agent may be better or worse off than had it simply behaved reactively like the others. The apparent paradox in this situation is that the learning itself is highly effective: the other agents behave exactly as predicted given what the agent itself does. The paradox is easily resolved by noting that the learned model does not correctly predict what the result would be if the agent selected an alternative action. Nevertheless, it is perhaps surprising how easy it is for the agent to get trapped in a suboptimal equilibrium, and that the result is often substantially worse than if it had not attempted to learn a model at all. we refer to the above situation as self-fulfilling bias, because the revisions of belief and action by the agent reinforce each other so that an equilibrium is reached. Here bias is defined as in the standard machine learning literature-the preference for one hypothesis over another, beyond mere consistency with the examples [26]. In reinforcement learning, the initial hypothesis is a source of bias, as is the hypothesis space (in multiagent environ- ments, expressible models of the other agents). The combination of a limited modeling language (in our experiments, linear demand functions) with an arbitrarily assigned initial hypothesis strongly influences the equilibrium state reached by the multiagent system. Much early work on multiagent learning has investigated some form of reinforcement learning (e.g., [35, 38]). The basic idea of reinforcement learning is to revise beliefs and policies based on the success or failure of observed performance [19]. The complication in a multiagent environment is that the rewards to alternative policies may change as other agents' beliefs evolve simultaneously [6, 25]. 2. Conjectural Equilibrium In game-theoretic analysis, conclusions about equilibria reached are based on assumptions about what knowledge the agents have. For example, choice of iterated undominated strategies follows from common knowledge of rationality and the game setup [4]. In the standard game-theoretic model of complete information [10, 11], the joint payoff matrix is known to every agent. Uncertainty can be accommodated in the game-theoretic concept of incomplete information, where agents have probabilities over the payoffs of other agents. A learning model is an account of how agents form such beliefs. Notice that the beliefs need not be expressed in terms of other agents' options and preferences. In particular, ignorance about other agents might be captured more directly, albeit abstractly, as uncertainty in the effects of the agent's own actions. 2 Consider an n-player one-stage game n is the joint action space, where A i is the action space for agent i. represents the agent utility functions. is the state space, where S i is the part of the state relevant to agent i. A utility function U i is a map from the agent's state space to real ordering states by preference. we divide the state determination allowing each agent's part of the state to depend on the entire joint action. Each agent knows only its own utility function, and the actions chosen by each agent are not directly observable to the others. Each agent has some belief about the state that would result from performing its available actions. we represent this by a function, ~ represents the state that 4 M. P. WELLMAN AND J. HU agent i believes would result if it selected action a i . Agent i chooses the action a i 2 A i it believes will maximize its utility. 3 we are now ready to define our equilibrium concept. Definition 1. In game G defined above, a configuration of beliefs (~s 1 together with a joint action a for each agent i, ~ where a i 2 A i maximizes U i (~s i (a i )). If the game is repeated over time, the agents can learn from prior observations. Let a i (t) denote the action chosen by agent i at time t. The state at time t, oe(t), is determined by the joint action, we could incorporate environmentaldynamics into the model by defining state transitions as a function of joint actions plus the current state. we refrain from taking this step in order to isolate the task of learning about other agents from the (essentially single-agent) problem of learning about the environment. 4 In consequence, our framework defines a repeated game where agents are myopic, optimizing only with respect to the next iteration. The dynamics of the system are wholly relegated to the evolution of agents' conjectures. At the time agent i selects its action a i (t), it has observed the sequence oe(0); 1). Its beliefs, ~ therefore, may be conditioned on those observations (as well as its own prior actions), and so we distinguish beliefs at time t with a subscript, ~ s i t . we say that a learning regime converges if lim t!1 (~s 1 t ) is a conjectural equilibrium. Our investigation below shows that some simple learning methods are convergent in a version of the game framework considered above. A Nash equilibrium for game G is a profile of actions (a such that for all i, a i maximizes U Our notion of conjectural equilibrium is substantially weaker, as it allows the agent to be wrong about the results of performing alternative actions. Nash equilibria are trivially conjectural equilibria where the conjectures are consistent with the equilibrium play of other agents. As we see below, competitive, or Walrasian, equilibria are also conjectural equilibria. The concept of self-confirming equilibrium [9] is another relaxation of Nash equilibrium which applies to a situation where no agent ever observes actions of other agents contradicting its beliefs. Conjectures are on the play of other agents, and must be correct for all reachable information sets. This is stronger than conjectural equilibrium in two respects. First, it applies at each stage of an extensive form game, rather than for single-stage games or in the limit of a repeated game. Second, it takes individual actions of other agents as observable, whereas in our framework the agents observe only resulting state. The basic concept of conjectural equilibrium was first introduced by Hahn, in the context of a market model [14]. Though we also focus on market interactions, our central definition applies the concept to the more general case. Hahn also included a specific model for conjecture formation in the equilibrium concept, whereas we relegate this process to the learning regime of participating agents. CONJECTURAL EQUILIBRIUM 5 3. Multiagent Market Framework we study the phenomenon of self-fulfilling bias in the context of a simple market model of agent interactions. The market context is generic enough to capture a wide range of interesting multiagent systems, yet affords analytically simple characterizations of conjectures and dynamics. Our model is based on the framework of general equilibrium theory from economics, and our implementation uses the walras market-oriented programming system [39], which is also based on general equilibrium theory. 3.1. General Equilibrium Model Definition 2. A pure exchange economy over m goods, consists of n consumer agents, each defined by: ffl a consumption set, X representing the bundles of the m goods that are feasible for i, ffl a utility function, U ordering feasible consumption bundles by preference, and ffl an endowment, e specifying i's initial allocation of the m goods. For example, each of a collection of software agents may have some endowment of various computational resources, such as processing, storage, and network bandwidth. The amounts of these resources controlled by the agent determine which tasks it can accomplish, and at what performance level. The consumption set would describe the minimal amount of these resources required to remain active, and the utility function would describe the value to the agent of results producible with various amounts of the respective resources. In an exchange system, agents may improve their initial situations by swapping resources with their counterparts. For instance, one network-bound agent might trade some of its storage for bandwidth, while another might use additional storage obtained to improve the result achievable with even a somewhat reduced amount of processing. 5 The relative prices of goods govern their exchange. The price vector, a price for each good, observable by every consumer agent. A competitive consumer takes the price vector as given, and solves the following optimization problem, That is, each agent chooses a consumption bundle x i to maximize its utility, subject to the budget constraint that the cost of its consumption cannot exceed the value of its endowment. A competitive-also called Walrasian-equilibrium is a price vector and associated allocation, )), such that 1. at price vector P , x i solves problem (1) for each agent i, and 2. the markets clear: 6 M. P. WELLMAN AND J. HU It is sometimes more convenient to characterize the agents' actions in terms of excess demand, the difference between consumption and endowment, and to write the market clearing condition as The excess demand set for consumer i is Z g. A basic result of general equilibrium theory [34] states that if the utility function of every agent is quasiconcave and twice differentiable, then E has a unique competitive equilibrium. 6 Observe that any competitive equilibrium can be viewed as a conjectural equilibrium, for an appropriate interpretation of conjectures. The action space A i of agent i is its excess demand set, Z i . Let the state determination function s return the desired consumptions if they satisfy the respective budget constraints with respect to the market prices, and zero otherwise. Utility function U i simply evaluates i's part of the allocation. The agents' conjectures amount to accurately predicting the budget constraint, or equivalently, the prices. In competitive equilibrium, each agent is maximizing with respect to its perceived budget constraint, and the resulting allocation is as expected. Thus, the conditions for conjectural equilibrium are also satisfied. 3.2. Iterative Bidding Processes The basic definition of competitive behavior (1) implicitly assumes that agents are given the prices used to solve their optimization problem. But it is perhaps more realistic for them to form their own expectations about prices, given their observations and other knowledge they may have about the system. Indeed, the dynamics of an exchangeeconomy can be described by adding a temporal component to the original optimization problem, rewriting (1) as where x i (t) denotes i's demand at time t, and ~ its conjectured price vector at that time. 7 A variety of methods have been developed for deriving competitive equilibria through repeated agent interactions. In many of these methods, the agents do not interact directly, but rather indirectly through auctions. Agents submit bids, observe the consequent prices, and adjust their expectations accordingly. Different ways of forming the expected price ~ different varieties of agents, and can be considered alternative learning regimes. For example, the simple competitive agent takes the latest actual price as its expectation, ~ More sophisticated approaches are of course possible, and we consider one in detail in the next section. In the classic method of tatonnement, for example, auctions announce the respective prices, and agents act as simple competitors. Depending on whether there is an excess or CONJECTURAL EQUILIBRIUM 7P j z Figure 1. An aggregate excess demand curve for good j. P 0 j is the market clearing price. of demand, the auction raises or lowers the corresponding price. If the aggregate demand obeys gross substitutability (an increase in the price of one good raises demand for others, which hence serve as substitutes), then this method is guaranteed to converge to a competitive equilibrium (under the conditions under which it is guaranteed to exist) [24]. The walras algorithm [5] is a variant of tatonnement. In walras, agent i submits to the auction for good j at time t its solution to (2), expressed as a function of P j , assuming that the prices of goods other than j take their expected values. In other words, it calculates a demand function, The bid it then submits to the auctioneer is its excess demand for good j, The auctioneer sums up all the agents' excess demands to get an aggregate excess demand z Figure 1 depicts an aggregate demand curve. we assume that z j (P j ) is downward sloping, the general case for normal goods. Given such a curve, the auctioneer determines the price P 0 j such that z j (P 0 and reports this clearing price to the interested agents. Given the bidding behavior described, with expectations formed as by the simple competitive agent, the walras algorithm is guaranteed to converge to competitive equilibrium, under the standard conditions [5]. Such an equilibrium also represents a conjectural equi- librium, according to the definition above. Thus, the simple competitive learning regime is convergent, with respect to both the tatonnement and walras price adjustment protocols. 8 M. P. WELLMAN AND J. HU 4. Learning Agents As defined above, agents learn when they modify their conjectures based on observations. we distinguish alternative learning regimes by the form of the conjectures produced, and the policies for revising these conjectures. 4.1. Competitive Learning Agents An agent is competitive if it takes prices as given, ignoring its own effect on the clearing process. Formally, in our learning framework, this means that the conjectured prices ~ do not depend on the agents' own actions-the excess demands they submit as bids. For example, the simple competitive agent described above simply conjectures that the last observed price is correct. This revision policy is given by (3). Adaptive competitive agents adjust their expectations according to the difference between their previous expectations and the actual observed price, ~ This updating method is a kind of reinforcement learning method. The learning parameter, fl, dictates the rate at which the agent modifies its expectations. When policy is identical to the simple competitive agent's. Variations on this adaptation, for example by tracking longer history sequences, also make for reasonable conjecture revision policies. 4.2. Strategic Learning Agents In designing a more sophisticated learning agent, we must take into account what information is available to the agent. In our market model, the agents cannot observe preference, endowment, or the complete demand functions of other agents. What the agent does observe is the price vector. It also knows the basic structure of the system-the bidding process and the generic properties we assume about demand. This fragmentary information is not sufficient to reconstruct the private information of other agents. In fact, it provides no individual information about other agents at all. The best an agent can do is learn about the aggregate action it faces. Because they know how the auctions work,the agents realize that their individual demands can affect the market price. This effect will be significant unless the agent is of negligible size with respect to the aggregate system. An agent that takes its own action into account in forming its expectation about prices is called strategic. For a strategic agent i, ~ function of excess demand, z i (t), and thus i's optimization problem is subject to a nonlinear budget constraint. In our experiments with strategic learning,we adopt a simple model of an agent's influence on prices. Specifically, the agent assumes that its effect on price is linear for each good j, ~ CONJECTURAL EQUILIBRIUM 9 As in our usual reinforcement-learning approach, the coefficients are adjusted according to the difference between the expected price and actual price, are positive constants. Thus, by substituting (4) into (2) and omitting the time argument, we obtain the optimization problem of the strategic agent, In the appendix, we prove that this problem indeed has a unique solution. 5. Experimental Results we have run several experiments in walras, implementing exchange economies with various forms of learning agents. Our baseline setup explores the behavior of a single strategic learning agent (as described above), included in a market where the other agents are simple competitors. Additional trials consider different numbers of strategic agents, and varying initial conditions. Agents in our experiments have logarithmic utility functions, a This utility function is strategically equivalent to the Cobb-Douglas form, which is a standard parametric family often employed for analytic convenience. 8 For the experiments, we set a agents. Because its price conjecture is a function of its action, the strategic agent faces a non-linear budget constraint, and thus a more complex optimization problem (7). This special form facilitates derivation of first-order conditions, which we solve numerically in our experimental runs to calculate the strategic agent's behavior. In our simulations, the competitive agents form conjectures by Equation (3). The strategic agent forms conjectures by (4), and revises them given observations according to (5) and (6), with Agents bid according to the solutions of their optimization problems. The auctioneer in each market receives bids from agents, and then posts the price that clears its market. The process terminates when the price change from one iteration to the next falls below some threshold. we performed a series of experiments for a particular configuration with three goods and six agents. The agents' endowments e i were randomly generated from a uniform distribution, with results displayed in Table 1. Figure 2 presents results for the case where agent 1 behaves strategically, and the rest competitively. Each point on the graph represents one run of this economy, with various settings of the strategic agent's initial conjecture. The vertical axis represents the utility achieved by the strategic agent when the system M. P. WELLMAN AND J. HU reaches equilibrium. The horizontal axis represents the strategic agent's starting value for its fi coefficient. For comparison, we also ran this configuration with the designated agent behaving competitively, that is, forming expectations independent of its own behavior according to (3). The utility thus achieved is represented by the horizontal line in the graph. Table 1. Initial endowments for agents in the example experiment. Agents Good 1 Good 2 Good 3 Agent 1 231 543 23 Agent 2 333 241 422 Agent 3 43 21 11 Agent 4 33 24 42 Agent 5 431 211 111 Agent 6 12 23 87 As Figure 2 demonstrates, the learning agent can achieve higher or lower payoff by attempting to behave strategically rather than competitively. For 0:03, the agent improves utility by learning the strategic model. Greater than that value, the agent would be better off behaving competitively. (we also ran experiments for higher values of fi 1 (0) than shown, and the trend continues. In some other instances of the market game, the strategic agent also does worse than competitive for excessively low values of fi(0).) Intuitively, the initial estimate of the agent's effect on prices moves it toward a demand policy that would fulfill this expectation. The utility achieved by the other agents also depends on the initial fi of the strategic agent. Figure 3 depicts the results for the competitive agents, using as a measure the ratio of utility achieved when agent 1 is strategic to that achieved when it is competitive. For these agents, we find that two (3 and 5) are better off when agent 1 behaves strategically, and the rest are worse off. Moreover, their resulting utilities are monotone in fi 1 (0). Note that the agents that do better have endowment profiles (see Table 1) relatively similar to agent 1, and thus agent 1's effect on the price turns out to their benefit. The other agents have relatively differing endowment profiles, and thus opposing interests. In general, results need not be so uniform. we have observed cases where competitive agents do not perform uniformly better or worse as another becomes strategic, and indeed it is possible that aggressive strategic behavior can even make all agents worse off. In contrast, it is not possible that strategic behavior can simultaneously make all better off, as competitive equilibria are guaranteed to be Pareto efficient. As we increase the number of competitive agents, the general patterns of Figures 2 and 3 still hold. we also ran experiments with multiple strategic agents in the system. For example, Figure 4 compares strategic agent 1's performance profile for the cases where agent 3 behaves strategically and competitively. In most of our experiments, the system reliably converges to a conjectural equilibrium, although the particular equilibrium reached depends on the initial model of the strategic learning agents. 9 The exceptions CONJECTURAL EQUILIBRIUM 11 Agent 1 strategic Agent 1 competitive Initial Beta of Agent 1 Utility of Agent Figure 2. Utility achieved by the strategic agent, as a function of fi 1 (0). (Since utility is only ordinally scaled, the shape of the curve and degrees of utility difference are not meaningful. Hence, we do not report numeric values on the vertical axis.) M. P. WELLMAN AND J. HU Agent 2 Agent 3 Agent 4 Agent 5 Agent 6 Initial Beta of Agent 1 of Utility Figure 3. Performance of the competitive agents, as a function of fi 1 (0). The vertical axis measures the ratio of utility when agent 1 is strategic versus when it is competitive. CONJECTURAL EQUILIBRIUM 13 are cases where the combined power of the strategic agents is relatively large, opening the possibility that markets will not clear for significantly erroneous conjectures. This situation is explained in more detail in Section 6.2. Agent 3 Strategic Agent 3 Competitive Initial beta of Agent 1 Utility of Agent Figure 4. Utility achieved by strategic agent 1, as a function of fi 1 (0), with agent 3 strategic and competitive, respectively. 6. Theoretical Analysis The sensitivity of outcomes to initial conjectures arises from lack of information. When an agent has incomplete knowledge about the preference space of other agents, its interaction with them may not reveal their true preferences even over time. Nevertheless, agents adopting myopic decision rules (e.g., best response) may well achieve conjectural equilibrium anyway. In this section, we specialize the concept of conjectural equilibrium to the multiagent exchange setting. we define the market conjectural equilibrium, and discuss its existence and multiplicity for particular classes of learning agents. we then consider the dynamics of strategic learning in this framework, and conditions for convergence to conjectural equilibrium. 14 M. P. WELLMAN AND J. HU 6.1. Market Conjectural Equilibrium Our experimental analysis considered agents whose conjectures were either constant (com- petitive) or linear (strategic) functions of their actions. Using Hahn's notion of a conjecture function [14], we provide some more general notation for characterizing the form of an agent's conjectures. Definition 3. The conjecture function, specifies the price system, conjectured by consumer i to result if it submits excess demand z i . Note that C i defines a conjecture about prices, whereas conjectural equilibrium is defined in terms of agent's conjectures about the effects of their actions. In the multiagent exchange setting, actions are excess demands, and an agent's conjecture about the resulting state, ~ is that it will receive its demanded bundle if and only if it satisfies its budget constraint. ~ The actual resulting state is as demanded if the aggregate demands are feasible. 10 For all ae z i if In conjectural equilibrium, the expected and actual consequences of optimizing behavior coincide. Definition 4. A market conjectural equilibrium for an exchange economy is a point such that for all i, ~ and Intuitively, is the price vector determined by the market mechanism. However, nothing in the definition actually requires that all agents conjecture the same price, as the price is not part of an agent's action or the resulting state (9). It is nevertheless worth noting that equivalent price conjectures with overall feasibility is a sufficient condition for market conjectural equilibrium. Theorem 1 Let E be an exchange economy where all agents are allowed to form arbitrary price conjectures. Then any feasible allocation in which each agent prefers the result to its endowment can be supported by a market conjectural equilibrium in E. Proof: Let z set of excess demands satisfying the conditions, that is, z Consider a z i that agent i prefers to z \Lambdai , that is, U It is easy to construct a conjecture CONJECTURAL EQUILIBRIUM 15 function for agent i such that C i (z any such z i , in which case i believes that choosing z i would violate its budget constraint and therefore result in consumption of utility with respect to the conjecture. With restrictions on the form of individual conjectures, the set of equilibria may be somewhat constrained, but not very much. More realistic situations account for the fact that agents' conjectures are connected to each others via prices. If prices are observed by the agents in an exchange economy,then conjectures inconsistent with the observed prices represent implausible agent behavior. we can capture the notion of consistency among price conjectures in a stronger equilibrium concept. Definition 5. A market conjectural equilibrium (C price-ratified if there exists a price vector P such that at the equilibrium actions, Because prices are known by agents in typical market settings (albeit often with some delay), price-ratified equilibrium is usually the more relevant concept. Indeed, the equilibria reached in our experiments of Section 5 are all price-ratified. we can now characterize the existence of price-ratified market conjectural equilibria in terms of the allowable conjecture functions. Theorem 2 Suppose E has a competitive equilibrium, and all agents are allowed to form constant conjectures. Then E has a price-ratified market conjectural equilibrium. Proof: Let P be a competitive equilibrium for E. Then C ratified by P . Theorem 3 Let E be an exchange economy, with all utility functions quasiconcave and twice differentiable. Suppose all agents are allowed to form constant conjectures, and at least one agent is allowed to form linear conjectures. Then E has an infinite set of price-ratified market conjectural equilibria. Proof: Without loss of generality, let agent 1 be the agent with linear conjectures. A linear conjecture function C 1 may be decomposed into conjectures for individual goods Agent 1 is therefore strategic, with an optimal excess demand expressible as a function of ff and fi. 11 Let agents constant conjectures of the form C i In equilibrium, the markets must clear. For all j, For price-ratified equilibrium, we also require that agent 1's price conjecture for all goods j be equivalent to the other agents' conjectures, ff . we define a function M. P. WELLMAN AND J. HU 1. From the discussion above we have that F (P; (ff; price-ratified market conjectural equilibrium. Since ff, fi, and P are each m-vectors with degrees of freedom, F represents the mapping The conditions on utility functions ensure that excess demand functions are continuous, and thus that F is continuously differentiable. The conditions also ensure the existence of a competitive equilibrium P , and therefore there is a point (P ; (P ; 0)) such that by the Implicit Function Theorem [33], there exists an open set containing P and an open set B containing (P ; 0) such that for each P 2 P , there is a unique g(P of these points market conjectural equilibria for E. Note that the conditions of Theorem 3 are satisfied by our experimental setup of Section 5. In that situation, the initial fi determined which of the infinite conjectural equilibria was reached. Adding more strategic learning agents (those that could express non-constant conjecture functions) can only add more potential equilibria. 6.2. Dynamics The dynamics of a multiagent market system are dictated by how each agent changes its conjecture function, C i , as it observes the effects of its chosen z i on the price vector P . The strategic learning process given by Equations (5) and (6) can be transformed into the following system of differential equations, assuming that we allow continuous adjustment. For all j, Note that all variables are functions of time. The z j solve the strategic agent's optimization problem (7), thus each is a function of ff and fi. 12 Since the market determines prices based on specified demands, we can usually express as a function ff and fi as well. The exception is when Equation 10 has no solution, for example when the strategic agent demands resources that the competitive agents are not willing or able to supply at any price. 13 This can happen only when the strategic agent's conjecture is highly inaccurate-but this is not ruled out by the system dynamics. An alternative price-adjustment algorithm-one that does not require an exact market clearing at each stage-may not be as sensitive to this problem. For cases where the market always clears, the system of differential equations can be rewritten as CONJECTURAL EQUILIBRIUM 17 The equilibrium (-ff; - fi) of this system is the solution of the following equations: Since there are equations with the equilibrium is not a single point but a continuous surface, expressed as (-ff; - fi(-ff)), where - Characterizations of conditions under which this learning process converges to a stable equilibrium remains an open problem. 6.3. Perfect Conjectures Our experiments demonstrate that a learning agent might be rendered better or worse off by behaving strategically rather than competitively. However, the ambiguity disappears if it has sufficient knowledge to make a perfect conjecture. In the case where all the other agents are effectively competitive, perfect conjectures correspond to perfect knowledge of the aggregate demand function faced by the agent. Theorem 4 Let economy E satisfy conditions for existence of competitive equilibrium. Then knowledge of the aggregate excess demand function of the other agents is a sufficient condition for an agent to achieve utility at least as great as it could by behaving competitively. Proof: Let agent 1 be the strategic agent, and z 1 its excess demand. Suppose the strategic agent knows the aggregate excess demand function of the other agents, z knows that in market equilibrium, Therefore, the choice set \Gamma for the strategic agent consists of all excess demand bundles that could make the markets clear: If agent 1 behaves competitively, then any outcome it obtains must be part of a competitive equilibrium at some prices P . But by the market clearing condition (11), such an outcome must be contained in the strategic choice set \Gamma. Therefore, by optimizing over \Gamma, the knowledgeable strategic agent can achieve utility at least as great as obtained through competitive behavior. Intuitively, if the agent makes a perfect conjecture, then it makes its choice based on the actual optimization problem it faces. Any other choice would either have lower (or equal) utility, or violate the budget constraint. As we have seen, however, when a strategic agent has imperfect information of the aggregate excess demand-for instance, a linear approximation-it may actually perform worse than had it used the constant approximation of competitive behavior. M. P. WELLMAN AND J. HU 7. Related Work There is a growing literature on learning in games, much of it concerned with conditions under which particular protocols converge to Nash equilibria. Numerous studies have investigated the behavior of simple learning policies such as Bayesian update or fictitious play, or selection schemes inspired by evolutionary models. Researchers typically explore repeated games (especially coordination games), and have tended to find some sort of convergence to coordinated, equilibrium, or near-equilibrium behavior [6, 12, 31]. Economists studying bidding games [3, 27] have noticed that biased starting bid prices strongly influence final bids. More generally, researchers have observed that the results of learning or evolution in games are often path-dependent [41], with selection among multiple equilibria varying according to initial or transient conditions. Most models in the literature assume that agents observe the joint action, as well as the resulting state. Our framework allows unobservable actions, and in the market game studied in depth, agents can reconstruct only an aggregate of other agents' actions. Boutilier [2] also considers a model where only outcomes are observable, demonstrating how to adapt some of the methods for the observable-action case to this setting. Interestingly, he finds that in some circumstances, uncertainty about other agents' actions actually speeds up the convergence to equilibrium for simple coordination games. The last five years has seen some study of learning methods for agents participating in simple exchange markets. (Cliff's recent contribution [7] includes a substantial bibliogra- phy.) Some of this work directly compares the effectiveness of learning strategic policies with competitive strategies. Vidal and Durfee examine a particular model of agents exchanging information goods [37], and find that whether strategic learning is beneficial (or how much) is highly context-dependent. we provide further data distinguishing the cases in our recent experiments within a dynamic trading model [18]. Finally, Sandholm and Ygge [28] investigate a general-equilibrium scenario very similar to ours. Like us, they find that strategic behavior can be counterproductive when agents have incorrect models. Moreover, their study quantifies the costs of acting strategically and competitively as a function of model error, confirming that competitive behavior is far less risky for a range of environment parameters. 8. Conclusion The fact that learning an oversimplified (in our case, linear) model of the environment can lead to suboptimal performance is not very surprising. Perhaps less obvious is the observation that it often leads to results worse than remaining completely uninformed, and adopting an even more oversimplified (constant) model. Moreover, the situation seems to be exacerbated by the behavior of the agent itself, optimizing with respect to the incorrect model, and thus "self-fulfilling" the conjectural equilibrium. 14 Future work may shed some light on the situations in which self-fulfilling bias can arise, and how it might be alleviated. Random restart of the learning process is one straightforward approach, as is any other deviation from myopic optimization aimed at trading exploitation for exploration. One could also expand the space of models considered CONJECTURAL EQUILIBRIUM 19 (e.g., admitting higher-order polynomials), although it is clear that extending the class of conjecture functions can only add to the possible equilibria. Another way to handle self-fulfilling bias is to transform this problem into a more traditional problem of decision under uncertainty. Agents that form probabilistic expectations may be less prone to get trapped in point equilibria. However, there is certainly a possibility of non-optimal expectations equilibrium even in this expanded setting. A simple lesson of this exercise is that attempting to be a little bit more sophisticated than the other agents can be a dangerous thing, especially if one's learning method is prone to systematic bias. From a social perspective (or that of a mechanism designer), the prospect of disadvantageous conjectural equilibria might be a desirable property-discouraging agents from engaging in costly counterspeculations and potentially counterproductive strategic behavior. More generally, our investigation serves to illustrate the role of equilibrium concepts- and specifically the application of conjectural equilibrium-in the analysis of multiagent learning. The interaction among dynamically evolving conjectures is what distinguishes the multiagent problem from its single-agent counterpart, and is thus arguably the learning phenomenon most worthy of the attention of multiagent systems researchers. Appendix The Strategic Agent's Optimization Problem The nonlinear budget constraint faced by our strategic agents presents a problem more complicated than that of the standard competitive consumer. The specific form of the constraint depends on the conjecture function; our results below apply to strategic agents with linear conjectures, and thus quadratic budget constraints. Theorem 5 Let the consumption set include all nonnegative bundles (i.e., and let U be a continuous function on X . Then there exists a solution to the strategic agent's optimization problem (7): z2Z Proof: To establish the existence of an optimum, we apply Weierstrass's Maximum Theorem [15]: if S is a nonempty compact set in ! m , and f(x) is a continuous function on S, then f(x) has at least one global optimum point in S. By assumption, the objective function U is continuous on X , and therefore also on Xg. Let S be the constraint set specified by (A.1), that is we need to prove that S is a nonempty compact set in ! m . S is nonempty, since S. To show that S is compact is equivalent to showing that S is bounded and closed. It is obvious that S is closed. we prove that S is bounded. M. P. WELLMAN AND J. HU From the constraint (A.1), which implies . Let - g. Thus S is bounded. By Weierstrass's theorem, U has at least one global maximum in S. Therefore there exists a solution to the stated optimization problem. Theorem 6 Let U be a continuous, strictly concave function on . Then the optimization problem defined by (A.1) has a unique solution. Proof: Given the strict concavity of the objective function, and the existence of a solution (Theorem 5), it suffices to show that the constraint set S is convex. we need to show that z 2 S. Let thus Therefore, CONJECTURAL EQUILIBRIUM 21 since S. Thus we proved that S is a convex set. Therefore the solution is unique. The logarithmic utility function used in our experiments (Section 5) satisfies the conditions above, and thus our agent's problem has a unique solution. we solve the problem numerically using Lagrangean techniques. Acknowledgments we would like to thank Song Han, Dan Koditschek, Tuomas Sandholm, and Fredrik Ygge for helpful discussions about this work,and the anonymous reviewers for useful suggestions. This research was supported by an NSF National Young Investigator award. Notes 1. Where exactly one draws the line between a change in beliefs and a simple update (incorporation of observational evidence) is fundamentally a matter of definition, and often quite arbitrary. we take no position, except to argue that any study that purports to characterize a learning process must clearly define this line, as does the framework proposed here. 2. Elsewhere, following Vidal and Durfee [36, 37], we have distinguished between 0-level learning agents, which form models of the effects of their own actions, and 1-level learning agents, which form models of other agents (as 0-level agents). Recursive application defines higher levels. The question of which hypothesis space to adopt for multiagent learning problems is an interesting current research issue. Our investigations to date suggest that the appropriate form of target model can be highly problem specific, depending on observations available, and relative sophistication of other agents [18]. we formulate our conjectural equilibrium concept in 0-level terms, to which higher levels can be reduced. 3. A more sophisticated version of this model would have agents form probabilistic conjectures about the effects of actions, and act to maximize expected utility. 4. Investigations of multiagent learning within the Markov game framework brings state dynamics to the fore [8, 17, 21]. 5. The relationship between basic computational resources and results of computation can be modeled explicitly by extending the exchange economy to include production. See our prior work for detailed examples of general-equilibrium models of computational problems [23, 39, 40]. 6. It is possible to express somewhat more general sufficient conditions in terms of underlying preference orders, but the direct utility conditions are adequate for our purposes. 7. In the standard model, no exchanges are executed until the system reaches equilibrium. In so-called non- tatonnement processes [34], agents can trade at any time, and so the endowment e is also a function of time. In either formulation, we still assume that agents are myopic, optimizing only with respect to the current time period. 8. Cobb-Douglas utility is a limiting case of the CES form (constant elasticity of substitution), a ae commonly used in general equilibrium modeling [32], including some of our prior work. we also performed experiments with CES agents results qualitatively similar to those reported for the logarithmic case. 9. For configurations with only competitive agents (whether adaptive or simple), the system converges to the unique competitive equilibrium regardless of initial expectations. 22 M. P. WELLMAN AND J. HU 10. In both (8) and (9), violation of feasibility results in consumption of the agent's own endowment. Reasonable definitions differing in the "otherwise" condition are also conceivable. 11. Here we refer to the vectors since the excess demand for good generally depends on conjectures about the prices for all goods. 12. For a proof that a unique solution exists, see the appendix. 13. For example, the strategic agent's demand could exceed total endowments. For our example case of uniformly weighted logarithmic (Cobb-Douglas) utility, any demand exceeding (m \Gamma 1)=m times the total endowment of the competitive agents for any good is infeasible. 14. Kephart et al. [20] describe another setting where sophisticated agents that try to anticipate the actions of others often make results worse for themselves. In this model, the sophisticated agents' downfall is their failure to account properly for simultaneous adaptation by the other agents. --R Learning conventions in multiagent stochastic domains using likelihood estimates. Starting point bias in contingent valuation bidding games. Knowledge and equilibrium in games. The WALRAS algorithm: A convergent distributed implementation of general equilibrium outcomes. The dynamics of reinforcement learning in cooperative multiagent systems. Evolving parameter sets for adaptive trading agents in continuous double-auction markets Competitive Markov Decision Processes. Game Theory. Game Theory for Applied Economists. Social stability and equilibrium. AAAI Spring Symposium on Adaptation Exercises in conjectural equilibrium analysis. Introduction to Global Optimization. Multiagent reinforcement learning: Theoretical framework and an algorithm. Online learning about other agents in a dynamic multiagent system. Reinforcement learning: A survey. Dynamics of computational ecosystems. Markov games as a framework for multi-agent reinforcement learning Adaptive and sophisticated learning in normal form games. A simple computational market for network information services. The stability of a competitive economy: A survey article. Artificial Intelligence: A Modern Approach. A note on the existence of starting point bias in iterative bidding games. On the gains and losses of speculation in equilibrium markets. On the emergence of social conventions: Modeling Applying General Equilibrium. Calculus on Manifolds. Mathematical Economics. Gerhard Wei- A market-oriented programming environment and its application to distributed multicommodity flow problems A computational market model for distributed configuration design. The economics of convention. --TR --CTR Sunju Park , Edmund H. Durfee , William P. Birmingham, An adaptive agent bidding strategy based on stochastic modeling, Proceedings of the third annual conference on Autonomous Agents, p.147-153, April 1999, Seattle, Washington, United States Wellman , Fredrik Ygge, Combinatorial auctions for supply chain formation, Proceedings of the 2nd ACM conference on Electronic commerce, p.260-269, October 17-20, 2000, Minneapolis, Minnesota, United States Anthony Bagnall , Iain Toft, Autonomous Adaptive Agents for Single Seller Sealed Bid Auctions, Autonomous Agents and Multi-Agent Systems, v.12 n.3, p.259-292, May 2006 Emergent Properties of a Market-based Digital Library with Strategic Agents, Autonomous Agents and Multi-Agent Systems, v.3 n.1, p.33-51, March 2000 P. Wellman, On market-inspired approaches to propositional satisfiability, Artificial Intelligence, v.144 n.1-2, p.125-156, March Parag C. Pendharkar, The theory and experiments of designing cooperative intelligent systems, Decision Support Systems, v.43 n.3, p.1014-1030, April, 2007 Minghua He , Ho-fung Leung, Agents in E-commerce: state of the art, Knowledge and Information Systems, v.4 n.3, p.257-282, July 2002 Junling Hu , Michael P. Wellman, Nash q-learning for general-sum stochastic games, The Journal of Machine Learning Research, 4, p.1039-1069, 12/1/2003 Cooperative Multi-Agent Learning: The State of the Art, Autonomous Agents and Multi-Agent Systems, v.11 n.3, p.387-434, November 2005
market game;conjectural equilibrium;multiagent learning
306259
Elevator Group Control Using Multiple Reinforcement Learning Agents.
Recent algorithmic and theoretical advances in reinforcement learning (RL) have attracted widespread interest. RL algorithms have appeared that approximate dynamic programming on an incremental basis. They can be trained on the basis of real or simulated experiences, focusing their computation on areas of state space that are actually visited during control, making them computationally tractable on very large problems. If each member of a team of agents employs one of these algorithms, a new collective learning algorithm emerges for the team as a whole. In this paper we demonstrate that such collective RL algorithms can be powerful heuristic methods for addressing large-scale control problems.Elevator group control serves as our testbed. It is a difficult domain posing a combination of challenges not seen in most multi-agent learning research to date. We use a team of RL agents, each of which is responsible for controlling one elevator car. The team receives a global reward signal which appears noisy to each agent due to the effects of the actions of the other agents, the random nature of the arrivals and the incomplete observation of the state. In spite of these complications, we show results that in simulation surpass the best of the heuristic elevator control algorithms of which we are aware. These results demonstrate the power of multi-agent RL on a very large scale stochastic dynamic optimization problem of practical utility.
Introduction Interest in developing capable learning systems is increasing within the multi-agent and AI research communities (e.g., Weiss & Sen, 1996). Learning enables systems to be more flexible and robust, and it makes them better able to handle uncertainty and changing circumstances. This is especially important in multi-agent systems, where the designers of such systems have often faced the extremely difficult task of trying to anticipate all possible contingencies and interactions among the agents ahead of time. Much the same could be said concerning the field of decentralized control, where policies for the control stations are developed from a global vantage point, and learning does not play a role. Even though executing the policies depends only on the information available at each control station, the policies are designed in a centralized way, with access to a complete description of the problem. Research has focused on what constitutes an optimal policy under a given information pattern but not on how such policies might be learned under the same constraints. Reinforcement learning (RL) (Barto & Sutton, forthcoming; Bertsekas & Tsitsik- lis, 1996) applies naturally to the case of autonomous agents, which receive sensations as inputs, and take actions that affect their environment in order to achieve their own goals. RL is based on the idea that the tendency to produce an action should be strengthened (reinforced) if it produces favorable results, and weakened if it produces unfavorable results. This framework is appealing from a biological point of view, since an animal has certain built-in preferences (such as pleasure or but does not always have a teacher to tell it exactly what action it should take in every situation. If the members of a group of agents each employ an RL algorithm, the resulting collective algorithm allows control policies to be learned in a decentralized way. Even in situations where centralized information is available, it may be advantageous to develop control policies in a decentralized way in order to simplify the search through policy space. Although it may be possible to synthesize a system whose goals can be achieved by agents with conflicting objectives, this paper focuses on teams of agents that share identical objectives corresponding directly to the goals of the system as a whole. To demonstrate the power of multi-agent RL, we focus on the difficult problem of elevator group supervisory control. Elevator systems operate in high-dimensional continuous state spaces and in continuous time as discrete event dynamic systems. Their states are not fully observable and they are non-stationary due to changing passenger arrival rates. We use a team of RL agents, each of which is responsible for controlling one elevator car. Each agent uses artificial neural networks to store its action value estimates. We compare a parallel architecture where the agents share the same networks with a decentralized architecture where the agents have their own independent networks. In either case, the team receives a global reinforcement signal which is noisy from the perspective of each agent due in part to the effects of the actions of the other agents. Despite these difficulties, our system outperforms all of the heuristic elevator control algorithms known to us. We also analyze the policies learned by the agents, and show that learning is relatively robust even in the face of increasingly incomplete state information. These results suggest that approaches to decentralized control using multi-agent RL have considerable promise. In the following sections, we give some additional background on RL, introduce the elevator domain, describe in more detail the multi-agent RL algorithm and network architecture we used, present and discuss our results, and finally draw some conclusions. For further details on all these topics, see Crites (1996). 2. Reinforcement Learning Both symbolic and connectionist learning researchers have focused primarily on supervised learning, where a "teacher" provides the learning system with a set of training examples in the form of input-output pairs. Supervised learning techniques are useful in a wide variety of problems involving pattern classification and function approximation. However, there are many situations in which training examples are costly or even impossible to obtain. RL is applicable in these more difficult situa- tions, where the only help available is a "critic" that provides a scalar evaluation of the output that was selected, rather than specifying the best output or a direction of how to change the output. In RL, one faces all the difficulties of supervised learning combined with the additional difficulty of exploration, that is, determining the best output for any given input. RL tasks can be divided naturally into two types. In non-sequential tasks, agents must learn mappings from situations to actions that maximize the expected immediate payoff. In sequential tasks, agents must learn mappings from situations to actions that maximize the expected long-term payoffs. Sequential tasks are more difficult because the actions selected by the agents may influence their future situations and thus their future payoffs. In this case, the agents interact with their environment over an extended period of time, and they need to evaluate their actions on the basis of their long-term consequences. From the perspective of control theory, RL techniques are ways of finding approximate solutions to stochastic optimal control problems. The agent is a controller, and the environment is a system to be controlled. The objective is to maximize some performance measure over time. Given a model of the state transition probabilities and reward structure of the environment, these problems can be solved in principle using dynamic programming (DP) algorithms. However, even though DP only requires time that is polynomial in the number of states, in many problems of interest, there are so many states that the amount of time required for a solution is infeasible. Some recent RL algorithms have been designed to perform DP in an incremental manner. Unlike traditional DP, these algorithms do not require a priori knowledge of the state transition probabilities and reward structure of the environment and can be used to improve performance on-line while interacting with the environment. This on-line learning focuses computation on the areas of state space that are actually visited during control. Thus, these algorithms are a computationally tractable way of approximating DP on very large problems. The same focusing phenomenon can also be achieved with simulated online train- ing. One can often construct a simulation model without ever explicitly determining the state transition probabilities for an environment (Barto & Sutton, forthcoming; Crites & Barto, 1996). (For an example of such a simulation model, see section 3.3.) There are several advantages to this use of a simulation model if it is sufficiently ac- curate. It is possible to generate huge amounts of simulated experience very quickly, potentially speeding up the training process by many orders of magnitude over what would be possible using actual experience. In addition, one need not be concerned about the performance level of a simulated system during training. A successful example of simulated online training is found in Tesauro's TD-Gammon system (1992, 1994, 1995), which used RL techniques to learn to play strong master-level backgammon. 2.1. Multi-Agent Reinforcement Learning A variety of disciplines have contributed to the study of multi-agent systems. Many researchers have focused on top-down approaches to building distributed systems, creating them from a global vantage point. One drawback to this top-down approach is the extraordinary complexity of designing such agents, since it is extremely difficult to anticipate all possible interactions and contingencies ahead of time in complex systems. Other researchers have recently taken the opposite approach, combining large numbers of relatively unsophisticated agents in a bottom-up manner and seeing what emerges when they are put together into a group. This amounts to a sort of iterative procedure: designing a set of agents, observing their group behavior, and repeatedly adjusting the design and noting its effect on group behavior. Although such groups of simple agents often exhibit interesting and complex dynamics, there is little understanding as yet how to create bottom-up designs that can achieve complex pre-defined goals. Multi-agent RL attempts to combine the advantages of both approaches. It achieves the simplicity of a bottom-up approach by allowing the use of relatively unsophisticated agents that learn on the basis of their own experiences. At the same time, RL agents adapt to a top-down global reinforcement signal, which guides their behavior toward the achievement of complex pre-defined goals. As a result, very robust systems for complex problems can be created with a minimum of human effort (Crites & Barto, 1996). Research on multi-agent RL dates back at least to the work of the Russian mathematician Tsetlin (1973) and others from the field of learning automata, see Narendra Thathachar (1989). A number of theoretical results have been obtained in the context of non-sequential RL. Certain types of learning automata will converge to an equilibrium point in zero-sum and non-zero-sum repeated games. See Narendra & Thathachar (1989) for details. For teams, an equilibrium point is a local maximum (an element of the game matrix that is the maximum of both its row and its column). However, in more general non-zero-sum games, equilibrium points often provide poor payoffs for all players. A good example of this is the Prisoner's Dilemma, where the only equilibrium point produces the lowest total payoff (Axelrod, 1984). Starting in approximately 1993, a number of researchers began to investigate applying sequential RL algorithms in multi-agent contexts. Although much of the work has been in simplistic domains such as grid worlds, several interesting applications have appeared that have pointed to the promise of sequential multi-agent RL. Markey (1994) applies parallel Q-learning to the problem of controlling a vocal tract model with 10 degrees of freedom. He discusses two architectures equivalent to the distributed and parallel architectures described in section 4.4. Each agent controls one degree of freedom in the action space, and distinguishes Q-values based only on its own action selections. Bradtke (1993) describes some initial experiments using RL for the decentralized control of a flexible beam. The task is to efficiently damp out disturbances of a beam by applying forces at discrete locations and times. He uses 10 independent adaptive controllers distributed along the beam. Each controller attempts to minimize its own local costs and observes only its own local portion of the state information. Dayan & Hinton (1993) propose a managerial hierarchy they call Feudal RL. In their scheme, higher-level managers set tasks for lower level managers, and reward them as they see fit. Since the rewards may be different at different levels of the hierarchy, this is not a team. Furthermore, only a single action selected at the lowest level actually affects the environment, so in some sense, this is a hierarchical architecture for a single agent. Tan (1993) reports on some simple hunter-prey experiments with multi-agent RL. His focus is on the sharing of sensory information, policies, and experience among the agents. Shoham & Tennenholtz (1993) investigate the social behavior that can emerge from agents with simple learning rules. They focus on two simple n-k-g iterative games, where n agents meet k at a time (randomly) to play game g. Littman & Boyan (1993) describe a distributed reinforcement learning algorithm for packet routing based on the asynchronous Bellman-Ford algorithm. Their scheme uses a single Q-function, where each state entry in the Q-function is assigned to a node in the network which is responsible for storing and updating the value of that entry. This differs from most other work on distributed RL, where an entire Q-function, not just a single entry, must be stored at each node. In addition to the multi-agent RL research concerned with team problems, a significant amount of work has focused on zero-sum games, where a single agent learns to play against an opponent. One of the earliest examples of this is Samuel's checker-playing program. A more recent example is Tesauro's TD-Gammon program (1992, 1994, 1995), which has learned to play strong Master level backgam- mon. These types of programs are often trained using self-play, and they can generally be viewed as single agents. Littman (1994, 1996) provides a detailed discussion of RL applied to zero-sum games, both in the case where the agents alternate their actions and where they take them simultaneously. Very little work has been done on multi-agent RL in more general non-zero- sum games. Sandholm & Crites (1996) study the behavior of multi-agent RL in the context of the iterated prisoner's dilemma. They show that Q-learning agents are able to learn the optimal strategy against the fixed opponent Tit-for-Tat. In addition, they investigate the behavior that results when two Q-learning agents face each other. 3. Elevator Group Control This section introduces the problem of elevator group control, which serves as our testbed for multi-agent reinforcement learning. It is a familiar problem to anyone who has ever used an elevator system, but in spite of its conceptual simplicity, it poses significant difficulties. Elevator systems operate in high-dimensional continuous state spaces and in continuous time as discrete event dynamic systems. Their states are not fully observable and they are non-stationary due to changing passenger arrival rates. An optimal policy for elevator group control is not known, so we use existing control algorithms as a standard for comparison. The elevator domain provides an opportunity to compare parallel and distributed control architectures where each agent controls one elevator car, and to monitor the amount of degradation that occurs as the agents face increasing levels of incomplete state information. Buttons up dn? Figure 1. Elevator system schematic diagram. A schematic diagram of an elevator system (Lewis, 1991) is presented in figure 1. The elevators cars are represented as filled boxes in the diagram. '+' represents a hall call or someone wanting to enter a car. '\Gamma' represents a car call or someone wanting to leave a car. The left side of a shaft represents upward moving cars and calls. The right side of a shaft represents downward moving cars and calls. Cars therefore move in a clockwise direction around the shafts. Section 3.1 considers the nature of different passenger arrival patterns, and their implications. Section 3.2 reviews a variety of elevator control strategies from the literature. Section 3.3 describes the particular simulated elevator system that will be the focus in the remainder of this paper. 3.1. Passenger Arrival Patterns Elevator systems are driven by passenger arrivals. Arrival patterns vary during the course of the day. In a typical office building, the morning rush hour brings a peak level of up traffic, while a peak in down traffic occurs during the afternoon. Other parts of the day have their own characteristic patterns. Different arrival patterns have very different effects, and each pattern requires its own analysis. Up- peak and down-peak elevator traffic are not simply equivalent patterns in opposite directions, as one might initially guess. Down-peak traffic has many arrival floors and a single destination, while up-peak traffic has a single arrival floor and many destinations. This distinction has significant implications. For example, in light up traffic, the average passenger waiting times can be kept very low by keeping idle cars at the lobby where they will be immediately available for arriving passengers. In light down traffic, waiting times will be longer since it is not possible to keep an idle car at every upper floor in the building, and therefore additional waiting time will be incurred while cars move to service hall calls. The situation is reversed in heavy traffic. In heavy up traffic, each car may fill up at the lobby with passengers desiring to stop at many different upper floors. The large number of stops will cause significantly longer round-trip times than in heavy down traffic, where each car may fill up after only a few stops at upper floors. For this reason, down-peak handling capacity is much greater than up-peak capacity. Siikonen (1993) illustrates these differences in an excellent graph obtained through extensive simulations. Since up-peak handling capacity is a limiting factor, elevator systems are designed by predicting the heaviest likely up-peak demand in a building, and then determining a configuration that can accomodate that demand. If up-peak capacity is sufficient, then down-peak generally will be also. Up-peak traffic is the easiest type to analyze, since all passengers enter cars at the lobby, their destination floors are serviced in ascending order, and empty cars then return to the lobby. The standard capacity calculations (Strakosch, 1983; Siikonen, 1993) assume that each car leaves the lobby with M passengers (80 to 100 percent of its capacity) and that the average passenger's likelihood of selecting each destination floor is known. Then probability theory is used to determine the average number of stops needed on each round trip. From this one can estimate the average round trip time - . The represents the average amount of time between car arrivals to the lobby, where L is the number of cars. Assuming that the cars are evenly spaced, the average waiting time is one half the interval. In reality, the average wait is somewhat longer. The only control decisions in pure up traffic are to determine when to open and close the elevator doors at the lobby. These decisions affect how many passengers will board an elevator at the lobby. Once the doors have closed, there is really no choice about the next actions: the car calls registered by the passengers must be serviced in ascending order and the empty car must then return to the lobby. Pepyne & Cassandras (1996) show that the optimal policy for handling pure up traffic is a threshold-based policy that closes the doors after an optimal number of passengers have entered the car. The optimal threshold depends upon the traffic intensity, and may also be affected by the number of car calls already registered and by the state of the other cars. Of course, up traffic is seldom completely pure. Some method must be used for assigning any down hall calls. More general two way traffic comes in two varieties. In two way lobby traffic, up-moving passengers arrive at the lobby and down-moving passengers depart at the lobby. Compared with pure up traffic, the round trip times will be longer, but more passengers will be served. In two way interfloor traffic, most passengers travel between floors other than the lobby. Interfloor traffic is more complex than lobby traffic in that it requires almost twice as many stops per passenger, further lengthening the round trip times. Two way and down-peak traffic patterns require many more decisions than does pure up traffic. After leaving the lobby, a car must decide how high to travel in the building before turning, and at what floors to make additional pickups. Because more decisions are required in a wider variety of contexts, more control strategies are also possible in two way and down-peak traffic situations. For this reason, a down- peak traffic pattern was chosen as a testbed for our research. Before describing the testbed in detail, we review various elevator control strategies from the literature. 3.2. Elevator Control Strategies The oldest relay-based automatic controllers used the principle of collective control (Strakosch, 1983; Siikonen, 1993), where cars always stop at the nearest call in their running direction. One drawback of this scheme is that there is no means to avoid the phenomenon called bunching, where several cars arrive at a floor at about the same time, making the interval, and thus the average waiting time, much longer. Advances in electronics, including the advent of microprocessors, made possible more sophisticated control policies. The approaches to elevator control discussed in the literature generally fit into the following categories, often more than one category. Unfortunately the descriptions of the proprietary algorithms are often rather vague, since they are written for marketing purposes, and are specifically not intended to be of benefit to competitors. For this reason, it is difficult to ascertain the relative performance levels of many of these algorithms, and there is no accepted definition of the current state of the art (Ovaska, 1992). 3.2.1. Zoning Approaches The Otis Elevator Company has used zoning as a starting point in dealing with various traffic patterns (Strakosch, 1983). Each car is assigned a zone of the build- ing. It answers hall calls within its zone, and parks there when it is idle. The goal of the zoning approach is to keep the cars reasonably well separated and thus keep the interval down. While this approach is quite robust in heavy traffic, it gives up a significant amount of flexibility. Sakai & Kurosawa (1984) of Hitachi describe a concept called area control that is related to zoning. If possible, it assigns a hall call to a car that already must stop at that floor due to a car call. Otherwise, a car within an area ff of the hall call is assigned if possible. The area ff is a control parameter that affects both the average wait time and the power consumption. 3.2.2. Search-Based Approaches Another control strategy is to search through the space of possible car assignments, selecting the one that optimizes some criterion such as the average waiting time. Greedy search strategies perform immediate call assignment, that is, they assign hall calls to cars when they are first registered, and never reconsider those assign- ments. Non-greedy algorithms postpone their assignments or reconsider them in light of updated information they may receive about additional hall calls or passenger destinations. Greedy algorithms give up some measure of performance due to their lack of flexibility, but also require less computation time. In western countries, an arriving car generally signals waiting passengers when it begins to decelerate (Si- ikonen, 1993), allowing the use of a non-greedy algorithm. The custom in Japan is to signal the car assignment immediately upon call registration. This type of signalling requires the use of a greedy algorithm. Tobita et al (1991) of Hitachi describe a system where car assignment occurs when a hall button is pressed. They assign the car that minimizes a weighted sum of predicted wait time, travel time, and number of riders. A fuzzy rule-based system is used to pick the coefficients and estimating functions. Simulations are used to verify their effectiveness. Receding horizon controllers are examples of non-greedy search-based approaches. After every event, they perform an expensive search for the best assignment of hall calls assuming no new passenger arrivals. Closed-loop control is achieved by re-calculating a new open-loop plan after every event. The weaknesses of this approach are its computational demands, and its lack of consideration of future arrivals. Examples of receding horizon controllers are Finite Intervisit Minimization and Empty the System Algorithm (ESA) (Bao et al, 1994). FIM attempts to minimize squared waiting times and ESA attempts to minimize the length of the current busy period. 3.2.3. Rule-Based Approaches In some sense, all control policies could be considered rule-based: IF situation THEN action. However, here we are more narrowly considering the type of production systems commonly used in Artificial Intelligence. Ujihara & Tsuji (1988) of Mitsubishi describe the AI-2100 system. It uses expert-system and fuzzy-logic technologies. They claim that experts in group-supervisory control have the experience and knowledge necessary to shorten waiting times under various traffic conditions, but admit that expert knowledge is fragmentary, hard to organize, and difficult to incorporate. They created a rule base by comparing the decisions made by a conventional algorithm with decisions determined by simulated annealing. The discrepancies were then analyzed by the experts, whose knowledge about solving such problems was used to create fuzzy control rules. The fuzziness lies in the IF part of the rules. Ujihara & Amano (1994) describe the latest changes to the system. A previous version used a fixed evaluation formula based on the current car positions and call locations. A more recent version considers future car positions and probable future hall calls. For example, one rule is IF (there is a hall call registered on an upper floor) AND (there are a large number of cars ascending towards the upper floors) THEN (assign one of the ascending cars on the basis of estimated time of arrival). Note that this is an immediate call allocation algorithm, and the consequent of this particular rule about assigning cars on the basis of estimated time of arrival bears some similarity to the greedy search-based algorithms described above. 3.2.4. Other Heuristic Approaches The Longest Queue First (LQF) algorithm assigns upward moving cars to the longest waiting queue, and the Highest Unanswered Floor First (HUFF) algorithm assigns upward moving cars to the highest queue with people waiting (Bao et al, 1994). Both of these algorithms are designed specifically for down-peak traffic. They assign downward moving cars to any unassigned hall calls they encounter. The Dynamic Load Balancing (DLB) algorithm attempts to keep the cars evenly spaced by assigning contiguous non-overlapping sectors to each car in a way that balances their loads (Lewis, 1991). DLB is a non-greedy algorithm because it reassigns sectors after every event. 3.2.5. Adaptive and Learning Approaches Imasaki et al (1991) of Toshiba use a fuzzy neural network to predict passenger waiting time distributions for various sets of control parameters. Their system adjusts the parameters by evaluating alternative candidate parameters with the neural network. They do not explain what control algorithm is actually used, what its parameters are, or how the network is trained. Hitachi researchers (Fujino et al, 1992; Tobita et al, 1991) use a greedy control algorithm that combines multiple objectives such as wait time, travel time, crowd- ing, and power consumption. The weighting of these objectives is accomplished using parameters that are tuned online. A module called the learning function unit collects traffic statistics and attempts to classify the current traffic pattern. The tuning function unit generates parameter sets for the current traffic pattern and tests them using a built-in simulator. The best parameters are then used to control the system. Searching the entire parameter space would be prohibitively expensive, so heuristics are used about which parameter sets to test. Levy et al (1977) use dynamic programming (DP) offline to minimize the expected time needed for completion of the current busy period. No discount factor is used, since it is assumed that the values will all be finite. The major difference between this and Q-learning is that it must be performed offline since it uses a model of the transition probabilities of the system and performs sweeps of the state space. The trouble with using DP to calculate an optimal policy is that the state space is very large, requiring drastic simplification. Levy et al use several methods to keep the size of the state space manageable: they consider a building with only cars and 8 floors, where the number of buttons that can be on simultaneously is restricted, the state of the buttons are restricted to binary values (i.e., elapsed times are discarded), and the cars have unlimited capacity. Construction of the transition probability matrix is the principle part of the procedure, and it assumes that the intensity of Poisson arrivals at each floor is known. Value iteration or policy iteration is then performed to obtain the solution. Markon et al (1994) have devised a system that trains a neural network to perform immediate call allocation. There are three phases of training. In phase one, while the system is being controlled by an existing controller (the FLEX-8820 Fuzzy/AI Group Control System of Fujitec), supervised learning is used to train the network to predict the hall call service times. This first phase of training is used to learn an appropriate internal representation, i.e., weights from the input layer to the hidden layer of the network. At the end of the first phase of training, those weights are fixed. In phase two, the output layer of the network is retrained to emulate the existing controller. In phase three, single weights in the output layer of the network are perturbed, and the resulting performance is measured on a traffic sample. The weights are then modified in the direction of improved performance. This can be viewed as a form of non-sequential reinforcement learning. The single-stage reward is determined by measuring the system's performance on a traffic sample. Their input representation uses 25 units for each car, and their output representation uses one unit for each car. Hall calls are allocated to the car corresponding to the output unit with the highest activation. They also describe a very clever way of incorporating the permutational symmetry of the problem into the architecture of their network. As they say, "If the states of two cars are interchanged, the outputs should also be interchanged." This is done by having as many sets of hidden units as there are cars, and then explicitly linking together the appropriate weights. Their system was tested in a simulation with 6 cars and 15 floors. In a "typical building", trained on 900 passengers per hour, there was a very small improvement of around 1 second in the average wait time over the existing controller. In a more "untypical" building with uniformly distributed origin and destination floors and 1500 passengers per hour, the improvement in average wait time was almost 4 seconds. One advantage of this system is that it can maintain an adequate service level from the beginning since it starts with a pre-existing controller. On the other hand, it is not clear whether this also may trap the controller in a suboptimal region of policy space. It would be very interesting to use this centralized, immediate call allocation network architecture as part of a sequential reinforcement learning algorithm. 3.3. The Elevator Testbed The particular elevator system we study in this paper is a simulated 10-story building with 4 elevator cars. The simulator was written by Lewis (1991). Passenger arrivals at each floor are assumed to be Poisson, with arrival rates that vary during the course of the day. Our simulations use a traffic profile (Bao et al, 1994) which dictates arrival rates for every 5-minute interval during a typical afternoon down- peak rush hour. Table 1 shows the mean number of passengers arriving at each of floors during each 5-minute interval who are headed for the lobby. In addition, there is inter-floor traffic which varies from 0% to 10% of the traffic to the lobby. Table 1. The down-peak traffic profile. Time 3.3.1. System Dynamics The system dynamics are approximated by the following parameters: ffl Floor time (the time to move one floor at maximum speed): 1.45 secs. ffl Stop time (the time needed to decelerate, open and close the doors, and accelerate secs. ffl Turn time (the time needed for a stopped car to change direction): 1 sec. ffl Load time (the time for one passenger to enter or exit a car): random variable from a 20th order truncated Erlang distribution with a range from 0.6 to 6.0 secs and a mean of 1 sec. ffl Car capacity: 20 passengers. The simulator is quite detailed, and is certainly realistic enough for our purposes. However, a few minor deviations from reality should be noted. In the simulator, a car can accelerate to full speed or decelerate from full speed in a distance of only one half of a floor, while the distances would be somewhat longer in a real system. Thus, the simulated acceleration and deceleration times are always the same, but in a real system, they will vary depending on the speed of the elevator. For example, an express car descending from the tenth floor at top speed will take longer to decelerate at the first floor than a car that is descending from the second floor. The simulator also allows the cars to commit to stopping at a floor when they are only one half of a floor away. Though this is not realistic for cars moving at top speed, the concept of making decisions regarding the next floor where the car could commit to stopping is valid. Although the elevator cars in this system are homogeneous, the learning techniques described in this paper can also be used in more general situations, e.g., where there are several express cars or cars that only service some subset of the floors. 3.3.2. State Space The state space is continuous because it includes the elapsed times since any hall calls were registered, which are real-valued. Even if these real values are approximated as binary values, the size of the state space is still immense. Its components include 2 possible combinations of the buttons (up and down buttons at each landing except the top and bottom), 2 40 possible combinations of the 40 car buttons, and possible combinations of the positions and directions of the cars (rounding off to the nearest floor). Other parts of the state are not fully ob- servable, for example, the exact number of passengers waiting at each floor, their exact arrival times, and their desired destinations. Ignoring everything except the configuration of the hall and car call buttons and the approximate position and direction of the cars, we obtain an extremely conservative estimate of the size of a discrete approximation to the continuous state space: states. 3.3.3. Control Actions Each car has a small set of primitive actions. If it is stopped at a floor, it must either "move up" or "move down". If it is in motion between floors, it must either "stop at the next floor" or "continue past the next floor". Due to passenger expectations, there are two constraints on these actions: a car cannot pass a floor if a passenger wants to get off there and cannot turn until it has serviced all the car buttons in its present direction. We also added three additional heuristic constraints in an attempt to build in some primitive prior knowledge: a car cannot stop at a floor unless someone wants to get on or off there, it cannot stop to pick up passengers at a floor if another car is already stopped there, and given a choice between moving up and down, it should prefer to move up (since the down-peak traffic tends to push the cars toward the bottom of the building). Because of this last constraint, the only real choices left to each car are the stop and continue actions. The actions of the elevator cars are executed asynchronously since they may take different amounts of time to complete. 3.3.4. Performance Criteria The performance objectives of an elevator system can be defined in many ways. One possible objective is to minimize the average wait time, which is the time between the arrival of a passenger and his entry into a car. Another possible objective is to minimize the average system time, which is the sum of the wait time and the travel time. A third possible objective is to minimize the percentage of passengers that wait longer than some dissatisfaction threshold (usually 60 seconds). Another common objective is to minimize the average squared wait time. We chose this latter performance objective since it tends to keep the wait times low while also encouraging fair service. For example, wait times of 2 and 8 seconds have the same average (5 seconds) as wait times of 4 and 6 seconds. But the average squared wait times are different (34 for 2 and 8 versus 26 for 4 and 6). 4. The Algorithm and Network Architecture This section describes the multi-agent reinforcement learning algorithm that we have applied to elevator group control. In our scheme, each agent is responsible for controlling one elevator car. Each agent uses a modification of Q-learning for discrete-event systems. Together, they employ a collective form of reinforcement learning. We begin by describing the modifications needed to extend Q-learning into a discrete-event framework, and derive a method for determining appropriate reinforcement signals in the face of uncertainty about exact passenger arrival times. Then we describe the algorithm, the feedforward networks used to store the Q-values, and the distinction between parallel and distributed versions of the algorithm. 4.1. Discrete-Event Reinforcement Learning Elevator systems can be modeled as discrete event systems (Cassandras, 1993), where significant events (such as passenger arrivals) occur at discrete times, but the amount of time between events is a real-valued variable. In such systems, the constant discount factor fl used in most discrete-time reinforcement learning algorithms is inadequate. This problem can be approached using a variable discount factor that depends on the amount of time between events (Bradtke & Duff, 1995). In this case, the cost-to-go is defined as an integral rather than as an infinite sum, as where c t is the immediate cost at discrete time t, c - is the instantaneous cost at continuous time - (the sum of the squared wait times of all currently waiting pas- sengers), and fi controls the rate of exponential decay. in the experiments described in this paper. Since the wait times are measured in seconds, we scale down the instantaneous costs c - by a factor of 10 6 to keep the cost-to-go values from becoming exceedingly large. Because elevator system events occur randomly in continuous time, the branching factor is effectively infinite, which complicates the use of algorithms that require explicit lookahead. Therefore, we employ a discrete event version of the Q-learning algorithm since it considers only events encountered in actual system trajectories and does not require a model of the state transition probabilities. The Q-learning update rule (Watkins, 1989) takes on the following discrete event form: e \Gammafi(- \Gammat x where action a is taken from state x at time t x , the next decision is required from state y at time t y , ff is the learning rate parameter, and c - and fi are defined as above. e \Gammafi(t y \Gammat x ) acts as a variable discount factor that depends on the amount of time between events. consider the case where c - is constant between events. We extend their formulation to the case where c - is quadratic, since the goal is to minimize squared wait times. The integral in the Q-learning update rule then takes the form: e \Gammafi(- \Gammat x where w p is the amount of time each passenger p waiting at time t y has already waited at time t x . (Special care is needed to handle any passengers that begin or waiting between t x and t y . See section 4.2.1.) This integral can be solved by parts to yield: A difficulty arises in using this formula since it requires knowledge of the waiting times of all waiting passengers. However, only the waiting times of passengers who press hall call buttons will be known in a real elevator system. The number of subsequent passengers to arrive and their exact waiting times will not be available. We examine two ways of dealing with this problem, which we call omniscient and online reinforcement schemes. The simulator has access to the waiting times of all passengers. It could use this information to produce the necessary reinforcement signals. We call these omniscient reinforcements, since they require information that is not available in a real system. Note that it is not the controller that receives this extra information, however, but rather the critic that is evaluating the controller. For this reason, even if omniscient reinforcements are used during the design phase of an elevator controller on a simulated system, the resulting trained controller can be installed in a real system without requiring any extra knowledge. The other possibility is to train using only information that would be available to a real system online. Such online reinforcements assume only that the waiting time of the first passenger in each queue is known (which is the elapsed button time). If the Poisson arrival rate - for each queue is known or can be estimated, the Gamma distribution can be used to estimate the arrival times of subsequent passengers. The time until the n th subsequent arrival follows the Gamma distribution \Gamma(n; 1 ). For each queue, subsequent arrivals will generate the following expected costs during the first b seconds after the hall button has been pressed:X Z b(prob n th arrival occurs at time - ) \Delta (cost given arrival at time - ) d- Z b\Gamma- Z bZ b\Gamma- This integral can also be solved by parts to yield expected costs. A general solution is provided in section 4.2.2. As described in section 5.4, using online reinforcements produces results that are almost as good as those obtained with omniscient reinforcements. 4.2. Collective Discrete-Event Q-Learning Elevator system events can be divided into two types. Events of the first type are important in the calculation of waiting times and therefore also reinforcements. These include passenger arrivals and transfers in and out of cars in the omniscient case, or hall button events in the online case. The second type are car arrival events, which are potential decision points for the RL agents controlling each car. A car that is in motion between floors generates a car arrival event when it reaches the point where it must decide whether to stop at the next floor or continue past the next floor. In some cases, cars are constrained to take a particular action, for example, stopping at the next floor if a passenger wants to get off there. An agent faces a decision point only when it has an unconstrained choice of actions. 4.2.1. Calculating Omniscient Reinforcements Omniscient reinforcements are updated incrementally after every passenger arrival event (when a passenger arrives at a queue), passenger transfer event (when a passenger gets on or off of a car), and car arrival event (when a control decision is made). These incremental updates are a natural way of dealing with the discontinuities in reinforcement that arise when passengers begin or end waiting between a car's decisions, e.g., when another car picks up waiting passengers. The amount of reinforcement between events is the same for all the cars since they share the same objective function, but the amount of reinforcement each car receives between its decisions is different since the cars make their decisions asynchronously. There- fore, each car i has an associated storage location, R[i], where the total discounted reinforcement it has received since its last decision (at time d[i]) is accumulated. At the time of each event, the following computations are performed: Let t 0 be the time of the last event and t 1 be the time of the current event. For each passenger p that has been waiting between t 0 and t 1 , let w 0 (p) and w 1 (p) be the total time that passenger p has waited at t 0 and t 1 respectively. Then for each car i, 4.2.2. Calculating Online Reinforcements Online reinforcements are updated incrementally after every hall button event (sig- naling the arrival of the first waiting passenger at a queue or the arrival of a car to pick up any waiting passengers at a queue) and car arrival event (when a control decision is made). We assume that online reinforcements caused by passengers waiting at a queue end immediately when a car arrives to service the queue, since it is not possible to know exactly when each passenger boards a car. The Poisson arrival rate - for each queue is estimated as the reciprocal of the last inter-button time for that queue, i.e., the amount of time from the last service until the button was pushed again. However, a ceiling of - - 0:04 passengers per second is placed on the estimated arrival rates to prevent any very small inter-button times from creating huge penalties that might destabilize the cost-to-go estimates. At the time of each event, the following computations are performed: Let t 0 be the time of the last event and t 1 be the time of the current event. For each hall call button b that was active between t 0 and t 1 , let w 0 (b) and w 1 (b) be the elapsed time of button b at t 0 and t 1 respectively. Then for each car i, f )]g: 4.2.3. Making Decisions and Updating Q-Values A car that is in motion between floors generates a car arrival event when it reaches the point where it must decide whether to stop at the next floor or continue past the next floor. In some cases, cars are constrained to take a particular action, for example, stopping at the next floor if a passenger wants to get off there. An agent faces a decision point only when it has an unconstrained choice of actions. The algorithm used by each agent for making decisions and updating its Q-value estimates is as follows: 1. At time t x , observing state x, car i arrives at a decision point. It selects an action a using the Boltzmann distribution over its Q-value estimates: where T is a positive "temperature" parameter that is "annealed" or decreased during training. The value of T controls the amount of randomness in the selection of actions. At the beginning of training, when the Q-value estimates are very inaccurate, high values of T are used, which give nearly equal probabilities to each action. Later in training, when the Q-value estimates are more accurate, lower values of T are used, which give higher probabilities to actions that are thought to be superior, while still allowing some exploration to gather more information about the other actions. As discussed in section 5.3, choosing a slow enough annealing schedule is particularly important in multi-agent settings. 2. Let the next decision point for car i be at time t y in state y. After all cars (including car i) have updated their R[\Delta] values as described in the last two sections, car i adjusts its estimate of Q(x; a) toward the following target value: fstop;contg Car i then resets its reinforcement accumulator R[i] to zero. 3. Let x / y and t x / t y . Go to step 1. 4.3. The Networks Used to Store the Q-Values Using lookup tables to store the Q-values was ruled out for such a large system. In- stead, we used feedforward neural networks trained with the error backpropagation algorithm (Rumelhart et al, 1986). The networks receive some of the state information as input, and produce Q-value estimates as output. The Q-value estimates can be written as - Q(x; a; OE), where OE is a vector of the parameters or weights of the networks. The exact weight update equation is: fstop;contg where ff is a positive learning rate or stepsize parameter, and the gradient 5 OE is the vector of partial derivatives of - Q(x; a; OE) with respect to each component of OE. At the start of training, the weights of each network are initialized to be uniform random numbers between \Gamma1 and +1. Some experiments in this paper use separate single-output networks for each action-value estimate, while others use one network with multiple output units, one for each action. Our basic network architecture for pure down traffic uses 47 input units, 20 hidden sigmoid units, and 1 or 2 linear output units. The input units are as follows: ffl units: Two units encode information about each of the nine down hall but- tons. A real-valued unit encodes the elapsed time if the button has been pushed and a binary unit is on if the button has not been pushed. units: Each of these units represents a possible location and direction for the car whose decision is required. Exactly one of these units will be on at any given time. Note that each car has a different egocentric view of the state of the system. units: These units each represent one of the 10 floors where the other cars may be located. Each car has a "footprint" that depends on its direction and speed. For example, a stopped car causes activation only on the unit corresponding to its current floor, but a moving car causes activation on several units corresponding to the floors it is approaching, with the highest activations on the closest floors. No information is provided about which one of the other cars is at a particular location. This unit is on if the car whose decision is required is at the highest floor with a waiting passenger. This unit is on if the car whose decision is required is at the floor with the passenger that has been waiting for the longest amount of time. unit: The bias unit is always on. In section 4, we introduce other representations, including some with more restricted state information. 4.4. Parallel and Distributed Implementations Each elevator car is controlled by a separate Q-learning agent. We experimented with both parallel and decentralized implementations. In parallel implementations, the agents use a central set of shared networks, allowing them to learn from each other's experiences, but forcing them to learn identical policies. In totally decentralized implementations, the agents have their own networks, allowing them to specialize their control policies. In either case, none of the agents is given explicit access to the actions of the other agents. Cooperation has to be learned indirectly via the global reinforcement signal. Each agent faces added stochasticity and non-stationarity because its environment contains other learning agents. 5. Results and Discussion 5.1. Basic Results Versus Other Algorithms Since an optimal policy for the elevator group control problem is unknown, we measured the performance of our algorithm against other heuristic algorithms, including the best of which we were aware. The algorithms were: SECTOR, a sector-based algorithm similar to what is used in many actual elevator systems; DLB, Dynamic Load Balancing, attempts to equalize the load of all cars; HUFF, Highest Unanswered Floor First, gives priority to the highest floor with people waiting; LQF, Longest Queue First, gives priority to the queue with the person who has been waiting for the longest amount of time; FIM, Finite Intervisit Minimization, a receding horizon controller that searches the space of admissible car assignments to minimize a load function; ESA, Empty the System Algorithm, a receding horizon controller that searches for the fastest way to "empty the system" assuming no new passenger arrivals. FIM is very computationally intensive, and would be difficult to implement in real time in its present form. ESA uses queue length information that would not be available in a real elevator system. ESA/nq is a version of ESA that uses arrival rate information to estimate the queue lengths. For more details, see Bao et al (1994). RLp and RLd denote the RL controllers, parallel and decentralized. The RL controllers were each trained on 60,000 hours of simulated elevator time, which took four days on a 100 MIPS workstation. The results for all the algorithms were averaged over hours of simulated elevator time to ensure their statistical significance. The average waiting times listed below for the trained RL algorithms are correct to within \Sigma0:13 at a 95% confidence level, the average squared waiting times are correct to within \Sigma5:3, and the average system times are correct to within \Sigma0:27. Table 2 shows the results for the traffic profile with down traffic only. Table 3 shows the results for the down-peak traffic profile with up and down traffic, including an average of 2 up passengers per minute at the lobby. The algorithm was trained on down-only traffic, yet it generalizes well when up traffic is added and upward moving cars are forced to stop for any upward hall calls. Table 4 shows the results for the down-peak traffic profile with up and down traffic, including an average of 4 up passengers per minute at the lobby. This time there is twice as much up traffic, and the RL agents generalize extremely well to this new situation. Table 2. Results for down-peak profile with down traffic only. Algorithm AvgWait SquaredWait SystemTime Percent?60 secs DLB 19.4 658 53.2 2.74 ESA 15.1 338 47.1 0.25 RLd 14.7 313 41.7 0.07 Table 3. Results for down-peak profile with up and down traffic. Algorithm AvgWait SquaredWait SystemTime Percent?60 secs HUFF 19.6 608 50.5 1.99 RLd 16.9 468 42.7 1.40 Table 4. Results for down-peak profile with twice as much up traffic. Algorithm AvgWait SquaredWait SystemTime Percent?60 secs BASIC HUFF 23.2 875 54.7 4.94 FIM 20.8 685 53.4 3.10 ESA 20.1 667 52.3 3.12 RLd 18.8 593 45.4 2.40 One can see that both the RL systems achieved very good performance, most notably as measured by system time (the sum of the wait and travel time), a measure that was not directly being minimized. Surprisingly, the decentralized RL system was able to achieve as good a level of performance as the parallel RL system. 5.2. Analysis of Decentralized Results In view of the outstanding success of the decentralized RL algorithm, several questions suggest themselves: How similar are the policies that the agents have learned to one another and to the policy learned by the parallel algorithm? Can the results be improved by using a voting scheme? What happens if one agent's policy is used to control all of the cars? This section addresses all of these questions. First the simulator was modified to poll each of the four decentralized Q-network agents as well as the parallel Q-network on every decision by every car, and compare their action selections. During one hour of simulated elevator time, there were a total of 573 decisions required. The four agents were unanimous on 505 decisions to 1 on 47 decisions (8 percent), and they split evenly on 21 decisions (4 percent). The parallel network agreed with 493 of the 505 unanimous decisions (98 percent). For some reason, the parallel network tended to favor the STOP action more than the decentralized networks, though that apparently had little impact on the overall performance. The complete results are listed in table 5. Table 5. Amount of agreement between decentralized agents. Agents Saying Agents Saying Number of Parallel Parallel STOP CONTINUE Instances Says STOP Says CONT While these results show considerable agreement, there are a minority of situations where the agents disagree. In the next experiment the agents vote on which actions should be selected for all of the cars. In the cases where the agents are evenly split, we examine three ways of resolving the ties: in favor of STOP (RLs), in favor of CONTINUE (RLc), or randomly (RLr). The following table shows the results of this voting scheme compared to the original decentralized algorithm (RLd). The results are averaged over hours of simulated elevator time on pure down traffic. These results show no significant improvement from voting. In the situations where the agents were evenly split, breaking the ties randomly produced results that were almost identical to those of the original decentralized algorithm. This seems to imply that the agents generally agree on the most important decisions, Table 6. Comparison with several voting schemes. Algorithm AvgWait SquaredWait SystemTime Percent?60 secs RLc 15.0 325 41.7 0.09 RLs 14.9 322 41.7 0.10 RLr 14.8 314 41.7 0.12 RLd 14.7 313 41.7 0.07 and disagree only on decisions of little consequence where the action values are very similar. In the next experiment the agent for a single car selects actions for all the cars. RL1 uses the agent for car 1 to control all the cars, RL2 uses the agent for car 2, and so on. The following table compares these controllers to the original decentralized algorithm (RLd). The results are averaged over hours of simulated elevator time on pure down traffic. Table 7. Letting a single agent control all four cars. Algorithm AvgWait SquaredWait SystemTime Percent?60 secs RLd 14.7 313 41.7 0.07 While agent 1 outperformed the other agents, all of the agents performed well relative to the non-RL controllers discussed above. In summary, it appears that all the decentralized and parallel agents learned very similar policies. The similarity of the learned policies may have been caused in part by the symmetry of the elevator system and the input representation we selected, which did not distinguish among the cars. For future work, it would be interesting to see whether agents with input representations that did distinguish among the cars would still arrive at similar policies. 5.3. Annealing Schedules One of the most important factors in the performance of the algorithms is the annealing schedule used to control the amount of exploration performed by each agent. The slower the annealing process, the better the final result. This is illustrated in table 8 and figure , which show the results of one training run with each of a number of annealing rates. The temperature T was annealed according to the schedule: represents the hours of training completed. Once again, the results were measured over hours of simulated elevator time. Even though they are somewhat noisy due to not being averaged over multiple training runs, the trend is still quite clear. Each of the schedules that we tested shared the same starting and ending temper- atures. Although the annealing process can be ended at any time with the current Q-value estimates being used to determine a control policy, if the amount of time available for training is known in advance, one should select an annealing schedule that covers a full range of temperatures. Table 8. The effect of varying the annealing rate. Factor Hours AvgWait SquaredWait SystemTime Pct?60 secs While gradual annealing is important in single-agent RL, it is even more important in multi-agent RL. The tradeoff between exploration and exploitation for an agent now must also be balanced with the need for other agents to learn in a stationary environment and while that agent is doing its best. At the beginning of the learning process, the agents are all extremely inept. With gradual annealing they are all able to raise their performance levels in parallel. Tesauro (1992, 1994, 1995) notes a slightly different but related phenomenon in the context of zero-sum games, where training with self-play allows an agent to learn with a well-matched opponent during each stage of its development. 5.4. Omniscient Versus Online Reinforcements This section examines the relative performance of the omniscient and online reinforcements described in section 4.1, given the same network structure and temperature and learning rate schedule. As shown in table 9, omniscient reinforcements led to slightly better performance than online reinforcements. This should be of little concern regarding the application of RL to a real elevator system, since one would want to perform the initial training in simulation in any case, not only because of the huge amount of experience needed, but also because performance would be poor during the early stages of training. In a real elevator system, the initial training could be performed using a simulator, and the networks could be fine-tuned on the real system. Final average squared wait Hours of training until freezing Figure 2. The effect of varying the annealing rate. Table 9. Omniscient versus online reinforcements. AvgWait SquaredWait SystemTime Pct?60 secs Omniscient 15.2 332 42.1 0.07 Online 15.3 342 41.6 0.16 5.5. Levels of Incomplete State Information If parallel or decentralized RL were to be implemented in a real elevator system, there would be no problem providing whatever state information was available to all of the agents. However, in a truly decentralized control situation, this might not be possible. This section looks at how performance degrades as the agents receive less state information. In these experiments, the amount of information available to the agents was varied along two dimensions: information about the hall call buttons, and information about the location, direction, and status of the other cars. The input representations for the hall call buttons were: REAL, consisting of input units, where two units encode information about each of the nine down hall buttons. A real-valued unit encodes the elapsed time if the button has been pushed and a binary unit is on if the button has not been pushed; BINARY, consisting of 9 binary input units corresponding to the nine down hall buttons; QUANTITY, consisting of two input units measuring the number of hall calls above and below the current decision-making car, and NONE, with no input units conveying information about the hall buttons. The input representations for the configuration of the other cars were: FOOT- PRINTS, consisting of 10 input units, where each unit represents one of the 10 floors where the other cars may be located. Each car has a "footprint" that depends on its direction and speed. For example, a stopped car causes activation only on the unit corresponding to its current floor, but a moving car causes activation on several units corresponding to the floors it is approaching, with the highest activations on the closest floors. Activations caused by the various cars are addi- QUANTITY, consisting of 4 input units that represent the number of upward and downward moving cars above and below the decision-making car; and NONE, consisting of no input units conveying information about the hall buttons. All of the networks also possessed a bias unit that was always activated, 20 hidden units, and 2 output units (for the STOP and CONTINUE actions). All used the decentralized RL algorithm, trained for 12000 hours of simulated elevator time using the down-peak profile and omniscient reinforcements. The temperature T was annealed according to the schedule: is the hours of training. The learning rate parameter was decreased according to the schedule: The results shown in table 10 are measured in terms of the average squared passenger waiting times over hours of simulated elevator time. They should be considered to be fairly noisy because they were not averaged over multiple training runs. Nevertheless, they show some interesting trends. Table 10. Average squared wait times with various levels of incomplete state information. Hall Location of Other Cars Buttons Footprints Quantity None Real 370 428 474 Binary 471 409 553 Quantity 449 390 530 None 1161 778 827 Clearly, information about the hall calls was more important than information about the configuration of the other cars. In fact, performance was still remarkably good even without any information about the other cars. (Technically speaking, some information was always available about the other cars because of the constraint that prevents a car from stopping to pick up passengers at a floor where another car has already stopped. No doubt this constraint helped performance considerably.) When the hall call information was completely missing, the network weights had an increased tendency to become unstable or grow without bound and so the learning rate parameter had to be lowered in some cases. For a further discussion of network instability, see section 5.7. The way that information was presented was important. For example, being supplied with the number of hall calls above and below the decision-making car was more useful to the networks than the potentially more informative binary button information. It also appears that information along one dimension is helpful in utilizing information along the other dimension. For example, the FOOTPRINTS representation made performance much worse than no car information in the absence of any hall call information. The only time FOOTPRINTS outperformed the other representations was with the maximum amount of hall call information. Overall, the performance was quite good except in the complete absence of hall call information (which is a significant handicap indeed), and it could be improved further by slower annealing. It seems reasonable to say that the algorithm degrades gracefully in the presence of incomplete state information in this problem. In a final experiment, two binary features were added to the REAL/FOOTPRINTS input representation. They were activated when the decision-making car was at the highest floor with a waiting passenger, and the floor with the longest waiting pas- senger, respectively. With the addition of these features, the average squared wait time decreased from 370 to 359, so they appear to have some value. 5.6. Practical Issues One of the biggest difficulties in applying RL to the elevator control problem was finding the correct temperature and learning rate parameters. It was very helpful to start with a scaled down version consisting of 1 car and 4 floors and a lookup table for the Q-values. This made it easier to determine rough values for the temperature and learning rate schedules. The importance of focusing the experience of the learner into the most appropriate areas of the state space cannot be overstressed. Training with trajectories of the system is an important start, but adding reasonable constraints such as those described in section 3.3.3 also helps. Further evidence supporting the importance of focusing is that given a choice between training on heavier or lighter traffic than one expects to face during testing, it is better to train on the heavier traffic. This type of training gives the system more experience with states where the queue lengths are long and thus where making the correct decision is crucial. 5.7. Instability The weights of the neural networks can become unstable, their magnitude increasing without bound. Two particular situations seem to lead to instability. The first occurs when the learning algorithm makes updates that are too large. This can happen when the learning rate is too large, or when the network inputs are too large (which can happen in very heavy traffic situations), or both. The second occurs when the network weights have just been initialized to random values, producing excessively inconsistent Q-values. For example, while a learning rate of 10 \Gamma2 is suitable for training a random initial network on moderate traffic (700 passengers/hour), it very consistently brings on instability in heavy traffic (1900 passengers/hour). However, a learning rate of 10 \Gamma3 keeps the network stable even in heavy traffic. If we train the network this way for several hundred hours of elevator time, leading to weights that represent a more consistent set of Q-values, then the learning rate can be safely raised back up to 10 \Gamma2 without causing instability. 5.8. Linear Networks One may ask whether nonlinear function approximators such as feedforward sigmoidal networks are necessary for good performance in this elevator control prob- lem. A test was run using a linear network trained with the delta rule. The linear network had a much greater tendency to be unstable. In order to keep the weights from blowing up, the learning rate had to be lowered by several orders of magnitude, from 10 \Gamma3 to 10 \Gamma6 . After some initial improvement, the linear network was unable to further reduce the average TD error, resulting in extremely poor performance. This failure of linear networks lends support to the contention that elevator control is a difficult problem. 6. Discussion Both the parallel and distributed multi-agent RL architectures were able to outperform all of the elevator algorithms they were tested against. The two architectures learned very similar policies. Gradual annealing appeared to be a crucial factor in their success. Training was accomplished effectively using both omniscient and online reinforcements. The algorithms were robust, easily generalizing to new situations such as added up traffic. Finally, they degraded gracefully in the face of increasing levels of incomplete state information. Although the networks became unstable under certain circumstances, techniques were discussed that prevented the instabilities in practice. Taken together, these results demonstrate that multi-agent RL algorithms are very powerful techniques for addressing very large scale stochastic dynamic optimization problems. A crucial ingredient in the success of multi-agent RL is a careful control of the amount of exploration performed by each agent. Exploration in this context means trying an action believed to be sub-optimal in order to gather additional information about its potential value. At the beginning of the learning process, each RL agent chooses its actions randomly, without any knowledge of their relative values, and thus all the agents are extremely inept. However, in spite of the noise in the reinforcement signal caused by the actions of the other agents, some actions will begin to appear to be better than others. By gradually annealing (or lowering) the amount of exploration performed by the agents, these better actions will be taken with greater frequency. This gradually changes the environment for each of the agents, and as they continue to explore, they all raise their performance levels in parallel. Even though RL agents in a team face added stochasticity and non-stationarity due to the changing stochastic policies of the other agents on the team, they display an exceptional ability to cooperate with one another in learning to maximize their rewards. There are many areas of research in both elevator group control and general multi-agent RL that deserve further investigation. Implementing an RL controller in a real elevator system would require training on several other traffic profiles, including up-peak and inter-floor traffic patterns. Additional actions would be needed in order to handle these traffic patterns. For example, in up-peak traffic it would be useful to have actions to specifically open and close the doors or to control the dwell time at the lobby. In inter-floor traffic, unconstrained "up" and "down" actions would be needed for the sake of flexibility. The cars should also have the ability to "park" at various floors during periods of light traffic. It would be interesting to try something other than a uniform annealing schedule for the agents. For example, a coordinated exploration strategy or round-robin type of annealing might be a way of reducing the noise generated by the other agents. However, such a coordinated exploration strategy may have a greater tendency to become stuck in sub-optimal policies. Theoretical results for sequential multi-agent RL are needed to supplement the results for non-sequential multi-agent RL described in section 2.1. Another area that needs further study is RL architectures where reinforcements are tailored to individual agents, possibly by using a hierarchy or some other advanced organizational structure. Such local reinforcement architectures have the potential to greatly increase the speed of learning, but they will require much more knowledge on the part of whatever is producing the reinforcement signals (Barto, 1989). Fi- nally, it is important to find effective methods of allowing the possibility of explicit communication among the agents. 7. Conclusions Multi-agent control systems are often required because of spatial or geographic distribution, or in situations where centralized information is not available or is not practical. But even when a distributed approach is not required, multiple agents may still provide an excellent way of scaling up to approximate solutions for very large problems by streamlining the search through the space of possible policies. Multi-agent RL combines the advantages of bottom-up and top-down approaches to the design of multi-agent systems. It achieves the simplicity of a bottom-up approach by allowing the use of relatively unsophisticated agents that learn on the basis of their own experiences. At the same time, RL agents adapt to a top-down global reinforcement signal, which guides their behavior toward the achievement of complex specific goals. As a result, very robust systems for complex problems can be created with a minimum of human effort. RL algorithms can be trained using actual or simulated experiences, allowing them to focus computation on the areas of state space that are actually visited during control, making them computationally tractable on very large problems. If each of the members of a team of agents employs an RL algorithm, a new collective algorithm emerges for the group as a whole. This type of collective algorithm allows control policies to be learned in a decentralized way. Even though RL agents in a team face added stochasticity and non-stationarity due to the changing stochastic policies of the other agents on the team, they display an exceptional ability to cooperate with one another in maximizing their rewards. In order to demonstrate the power of multi-agent RL, we focused on the difficult problem of elevator group supervisory control. We used a team of RL agents, each of which was responsible for controlling one elevator car. Results obtained in simulation surpassed the best of the heuristic elevator control algorithms of which we are aware. Performance was also very robust in the face of increased levels of incomplete state information. Acknowledgments We thank John McNulty, Christos Cassandras, Asif Gandhi, Dave Pepyne, Kevin Markey, Victor Lesser, Rod Grupen, Rich Sutton, Steve Bradtke, and the ANW group for assistance with the simulator and for helpful discussions. This research was supported by the Air Force Office of Scientific Research under grant F49620- 93-1-0269. --R The Evolution of Cooperation. Elevator dispatchers for down peak traffic. From chemotaxis to cooperativity: Abstract exercises in neuronal learning strategies. Learning By Interaction: An Introduction to Modern Reinforcement Learning. Distributed adaptive optimal control of flexible structures Reinforcement learning methods for continuous-time Markov decision problems Discrete Event Systems: Modeling and Performance Analysis. PhD thesis Forming control policies from simulation models using reinforcement learning. Improving elevator performance using reinforcement learning. Feudal reinforcement learning. A fuzzy neural network and its application to elevator group control. Optimal control of elevators. A Dynamic Load Balancing Approach to the Control of Multiserver Polling Systems with Applications to Elevator System Dispatching. A distributed reinforcement learning scheme for network routing. Technical Report CMU-CS-93-165 Markov games as a framework for multi-agent reinforcement learning Algorithms for Sequential Decision Making. Efficient learning of multiple degree-of-freedom control problems with quasi-independent Q-agents Adaptive optimal elevator group control by use of neural networks. Learning Automata: An Introduction. Electronics and information technology in high-range elevator systems Optimal dispatching control for elevator systems during uppeak traffic. the PDP Research Group. Development of elevator supervisory group control system with artificial intelligence. Some studies in machine learning using the game of checkers. Multiagent reinforcement learning in the iterated prisoner's dilemma. Elevator traffic simulation. Vertical Transportation: Elevators and Escalators. Neural Computation Temporal difference learning and TD-Gammon An elevator characterized group supervisory control system. Automaton Theory and Modeling of Biological Systems. The latest elevator group-control system The revolutionary AI-2100 elevator-group control system and the new intelligent option series Learning from Delayed Rewards. Adaptation and Learning in Multi-Agent Systems Received Date Accepted Date Final Manuscript Date --TR --CTR Shingo Mabu , Kotaro Hirasawa , Jinglu Hu, A Graph-Based Evolutionary Algorithm: Genetic Network Programming (GNP) and Its Extension Using Reinforcement Learning, Evolutionary Computation, v.15 n.3, p.369-398, Fall 2007 Rajbala Makar , Sridhar Mahadevan , Mohammad Ghavamzadeh, Hierarchical multi-agent reinforcement learning, Proceedings of the fifth international conference on Autonomous agents, p.246-253, May 2001, Montreal, Quebec, Canada Shin Ishii , Hajime Fujita , Masaoki Mitsutake , Tatsuya Yamazaki , Jun Matsuda , Yoichiro Matsuno, A Reinforcement Learning Scheme for a Partially-Observable Multi-Agent Game, Machine Learning, v.59 n.1-2, p.31-54, May 2005 Mohammad Ghavamzadeh , Sridhar Mahadevan, Learning to Communicate and Act Using Hierarchical Reinforcement Learning, Proceedings of the Third International Joint Conference on Autonomous Agents and Multiagent Systems, p.1114-1121, July 19-23, 2004, New York, New York Theodore J. Perkins , Andrew G. Barto, Lyapunov design for safe reinforcement learning, The Journal of Machine Learning Research, 3, 3/1/2003 Shimon Whiteson , Matthew E. Taylor , Peter Stone, Empirical Studies in Action Selection with Reinforcement Learning, Adaptive Behavior - Animals, Animats, Software Agents, Robots, Adaptive Systems, v.15 n.1, p.33-50, March 2007 Tadhg O'Meara , Ahmed Patel, A Topic-Specific Web Robot Model Based on Restless Bandits, IEEE Internet Computing, v.5 n.2, p.27-35, March 2001 Hajime Fujita , Shin Ishii, Model-Based Reinforcement Learning for Partially Observable Games with Sampling-Based State Estimation, Neural Computation, v.19 n.11, p.3051-3087, November 2007 Andrew G. Barto , Sridhar Mahadevan, Recent Advances in Hierarchical Reinforcement Learning, Discrete Event Dynamic Systems, v.13 n.1-2, p.41-77, January-April Andrew G. Barto , Sridhar Mahadevan, Recent Advances in Hierarchical Reinforcement Learning, Discrete Event Dynamic Systems, v.13 n.4, p.341-379, October Philipp Friese , Jrg Rambau, Online-optimization of multi-elevator transport systems with reoptimization algorithms based on set-partitioning models, Discrete Applied Mathematics, v.154 n.13, p.1908-1931, 15 August 2006 Shimon Whiteson , Peter Stone, Evolutionary Function Approximation for Reinforcement Learning, The Journal of Machine Learning Research, 7, p.877-917, 12/1/2006 Gang Chen , Zhonghua Yang , Hao He , Kiah Mok Goh, Coordinating Multiple Agents via Reinforcement Learning, Autonomous Agents and Multi-Agent Systems, v.10 n.3, p.273-328, May 2005 Pasquale Fiengo , Giovanni Giambene , Edmondo Trentin, Neural-based downlink scheduling algorithm for broadband wireless networks, Computer Communications, v.30 n.2, p.207-218, January, 2007 Darse Billings , Lourdes Pea , Jonathan Schaeffer , Duane Szafron, Learning to play strong poker, Machines that learn to play games, Nova Science Publishers, Inc., Commack, NY, 2001
discrete event dynamic systems;reinforcement learning;elevator group control;teams;multiple agents
306628
Generating Quasi-Random Paths for Stochastic Processes.
The need to simulate stochastic processes numerically arises in many fields. Frequently this is done by discretizing the process into small time steps and applying pseudorandom sequences to simulate the randomness. This paper addresses the question of how to use quasi-Monte Carlo methods to improve this simulation. Special techniques must be applied to avoid the problem of high dimensionality which arises when a large number of time steps is required. Two such techniques, the generalized Brownian bridge and particle reordering, are described here. These methods are applied to a problem from finance, the valuation of a 30-year bond with monthly coupon payments assuming a mean reverting stochastic interest rate. When expressed as an integral, this problem is nominally 360 dimensional. The analysis of the integrand presented here explains the effectiveness of the quasi-random sequences on this high-dimensional problem and suggests methods of variance reduction which can be used in conjunction with the quasi-random sequences.
Introduction In many applications ranging from finance to fluid dynamics it is necessary to evaluate the expectation of a function of a random path generated by a stochastic process. For a continuous time process this expectation may often be expressed as a Feynman-Kac type integral over Brownian motion. For numerical simulation, the continuous process is often modeled as a discreet process such that the expectation reduces to a standard integral weighted by the distribution function associated with each step of the discrete process. The time discretization often has physical relevance to the problem, as in the example presented below in which the time step of one month corresponds to monthly cash flows. An important question is how to effectively numerically evaluate the integrals which arise in stochastic simulations. Because the time discretization often requires using a large number of small steps, the resulting expected value integrals are often very high dimensional (see [20, 1, 17, 21] for examples of such integrals in finance). This high dimensionality is generally dealt with by using Monte Carlo simulation, whereby N "random" paths associated with the stochastic process are generated from a pseudo-random number sequence and the desired integral is approximated by the average of the integrand evaluated along all the paths. The standard Monte Carlo method can be quite slow, however, because its convergence rate is only O(N \Gamma1=2 ). We consider here improvements to this method by generating the "random" paths with deterministic, quasi-random sequences. The resulting paths are in fact not random, but have superior distribution properties in the space of all paths associated with the given process, and thus lead to lower integration error. Such quasi-Monte Carlo methods can be much faster with errors approaching size O(N \Gamma1 ) in optimal cases. This dramatic improvement in convergence rate has the potential for significant gains both in computational time and in range of application of Monte Carlo methods. The effectiveness of quasi-Monte Carlo methods does have some important limitations. First, quasi-Monte Carlo methods are valid for integration prob- lems, but may not be directly applicable to simulations, due to the correlations between the points of a quasi-random sequence. This problem can be overcome in many cases by writing the desired result of a simulation as an integral, as was mentioned above. However, as the resulting integral is often of very high dimension (e.g. dimension 360 for the example below), this leads to a second limitation: the improved accuracy of quasi-Monte Carlo methods is generally lost for problems of high dimension or problems in which the integrand is not smooth. This loss of effectiveness has been documented for a series of test problems in [12, 13, 14]. Several researchers in computational finance have recently reported great success with quasi-Monte Carlo computation of problems of very high dimension [1, 17, 21]. One purpose of this paper is to introduce techniques which effectively recast such nominally high dimensional problems into more moderate dimensional forms. These techniques allow for the range of application of quasi-Monte Carlo methods to be significantly extended, in particular when combined with other variance reduction methods. The paper is organized as follows. First a brief review of quasi-random sequences in presented in Section 2. This is followed by the description of a general technique, the generalized Brownian bridge, for generating quasi-random paths for standard Brownian motion in Section 3. An alternate approach for generating paths involving only a one dimensional sequence is described in Section 4. An example involving a coupon bond is presented and analyzed in Section 5, while Section 6 gives the numerical results for the various techniques. This is followed by conclusions. 2 Review of Quasi-Random Sequences Quasi-Monte Carlo methods are based on the idea that random Monte Carlo techniques can often be improved by replacing the underlying source of random numbers with a more uniformly distributed deterministic sequence. Quasi-Monte Carlo methods often include standard approaches of variance reduc- tion, although such techniques do not necessarily directly translate. Other approaches, such as described in Sections 3 and 4, are unique to quasi-Monte Carlo and have no effect when used with random sequences. The fundamental feature underlying all quasi-Monte Carlo methods, however, is the use of a quasi-random sequence. Therefore we now present a brief review of certain properties of such sequences. Quasi-random sequences are often referred to as low discrepancy sequences. This term refers a measure of the uniformity of a sequence, the discrepancy, which is defined as follows. Consider a set of N points in the d dimensional unit cube fx i g. The discrepancy of this set is Here E is a sub-rectangle of the unit cube, m(E) is the volume of E, and the sup is taken over all such sub-rectangles. This definition is based on the idea that for any given rectangle, the percentage of points from a uniformly distributed set which lie in the rectangle should be close to the volume of the rectangle. Thus the more uniformly distributed, the smaller the discrepancy of a set. A uniformly distributed infinite sequence of points in the d dimensional unit cube can them be defined [8] as a sequence for which lim sup Here the discrepancy is take to be the discrepancy (2.1) of the first N terms of the sequence. There are many sequences which have this property. For example, a uniform random sequence satisfies (2.2) almost surely. In fact, by the law of iterated logarithms, we have that for a random sequence the expected value of the discrepancy satisfies E(DN log log N A quasi-random, or low discrepancy, sequence is one which satisfies the condition that log d N For a given function f(x) defined on the unit cube and a set of N integration nodes fx i g, the simple Monte Carlo integration error ffl is defined as Z For functions of bounded variation, the Koksma-Hwalka inequality [16] states that where V (f) is the variation of the function and DN is the discrepancy of the set. This may be contrasted with the mean square error for random Monte Carlo where oe 2 is the variance of the integrand, defined as Z 'Z Inequalities (2.3) and (2.4) then suggest that low discrepancy sequences will lead to smaller integration error, at least for large enough N . A substantial body of work has been devoted to developing low discrepancy sequences, much of which is described in Niederreiter's monograph [16]. Numerous other papers have focused on the applications of quasi-Monte Carlo methods [6, 5, 9, 12, 23, 18, 20]. In the present paper, we work with the Sobol' sequence [22, 24]. This is a sequence for which each individual dimension is a permutation (at every 2 k points, of the Van der Corput sequence2 ;4 ;4 ;8 ;8 ;8 ;8 This is a very uniform one dimensional sequence, so that the one dimensional projections of the Sobol sequence are also quite uniform. The choice of permutations is crucial to ensure that higher dimensional projections, as well as the entire d dimensional sequence, are also uniformly distributed. As the dimension grows large, it becomes increasingly difficult to guarantee that all projections are well distributed, at least for relatively small N . This difficulty is reflected in the discrepancy bound (2.4) 3 The Generalized Brownian Bridge We now consider a class of methods for generating random walks associated with stochastic processes of the form where dz is the derivative of standard Brownian motion and a; b and oe are integrable in time. These methods may lead to substantial error reduction when combined with quasi-random sequences. The presentation here deals with standard Brownian motion with no drift and constant variance. The extension to include the drift term of a mean reverting process is addressed in Section 5. Since Brownian motion is a Markov process, it is most natural to generate a discrete time Brownian motion random walk \Deltat as a random jump from its value \Deltat z (3.2) in which z is sampled from N(0; 1). More generally, any future point xm , (m ? n) may be generated by Any point of the walk in the middle can then be generated from knowledge of the past, xn , and the future xm according to the Brownian bridge formula [7] We remark that this formula is valid only for generating one step k between steps n and m, as any subsequently generated steps must be correlated with x k . Equation (3.4) may continue to be used, however, by simply replacing one of the endpoints with the most recently generated point x k . Note that variance of the random part of the Brownian bridge formula (3.4) for generating x k is reduced by a factor 1=(1 \Gamma fl) compared with the variance for generating x k with formula (3.3). The standard method of generating a random walk x k is based on the up-dating formula (3.2). The initial value is x Each subsequent value x k+1 is generated from the previous value x k using formula (3.2) with independent normal variables z k . Another method, which we refer to as the Brownian bridge discretization can be based on (3.4). Suppose we wish to determine the path x for convenience assume that D is a power of 2. The initial value is x next value generated is D\Deltat z 1 . Then the value at the mid point x D=2 is determined from the Brownian bridge formula (3.4) with values are found at the successive mid-points; i.e. x sweeping along the breadth of the domain at each level of refinement. Although the total variance associated with each x k in this representation is the same as in the standard discretization, the variance associated with the z k is no longer constant. It has been redistributed so that much more of the variance is contained in the first few steps of the Brownian bridge discretization, while the later steps have significantly smaller variance due to the factor of 2 reduction in the variance arising in formula (3.4). This reduces the effective dimension of the random walk simulation, which increases the accuracy of quasi-Monte Carlo. Moskowitz and Caflisch [15] applied this method to the evaluation of Feynman-Kac integrals and showed the error to be substantially reduced when the number of time steps, which is equal to the dimension of the corresponding integral, is large. The Brownian bridge approach allows for a great deal of generalization. Another possibility involves a rearrangement of the breadth-first discretization described above in a depth-first fashion, such that the x k are generated in the following In fact, formula (3.4) provides the means for generating the steps of the random walk in any order desired. Moreover, the number of terms in the walk D, representing the dimension of the problem, need not be a power of two. To formalize these extensions, we introduce now the generalized Brownian bridge discretization. The path of the random walk may be expressed as a vector as may the independent random numbers The standard method of generating the random walk sets x etc. This may be written in matrix notations as where the matrix A is defined as The Brownian bridge discretization described above can also be seen as a linear combination of the z, so that there exist a matrix B such that define now the generalized Brownian bridge discretization to be any matrix B such that the paths oeB z correspond to the same stochastic process as the paths z. Because a Gaussian process is completely specified by its covariance, if the paths oeB z and oeA z have the same covariance, they will necessarily be sampled from the same process. The covariance of the paths xA and xB are given by E(xAx T E(xB x T Thus the matrix B will correspond to a generalized Brownian bridge discretization if and only if It is important to remember that random Monte Carlo methods will not be affected by how the random walk path is generated. From the integration point of view, this follows from the fact that for any function f(x), under the change of variables z we have that for any B satisfying (3.9). In particular, the variance of a given function of the path, which is expressed as an integral, is independent of the path generating matrix, so the random Monte Carlo error is also not affected. As demonstrated in [15, 2], the combination of quasi-random sequences and the Brownian bridge discrectization can lead to significant error reduction. One can imagine that if the last step of the walk is more uniformly distributed, then the set of paths so generated is necessarily more uniformly chosen from the space of all possible paths, leading to smaller integration errors. More generally, properties of the integrand may be used to construct paths that more uniformly sample the space which has the greatest influence on the integrand. This idea is explored more in Section 5. The first Brownian bridge discretization described above is an example of an important sub-class of the generalized discretizations, namely those that concern generating the steps of the walk sequentially according to a specified permutation of the first D integers. The unique Brownian bridge corresponding to this permutation may be generated as follows. Let P be the permutation matrix defined by where R \Pi is the unique lower triangular matrix obtained from the Cholesky decomposition R \Pi R T where again A is given by (3.6). It is easily checked that B \Pi satisfies (3.9). The Brownian bridge formula (3.4) shows that each term of a permutation defined discretization may be express as a linear combination of exactly two previously determined steps of the path. Thus the path x may be generated recursively in O(D) steps. On the other hand, the matrix R \Pi will in general be a dense lower triangular matrix, so that generating z will be an may lead to a significant increase in the computation time necessary to generate the paths x. We prove now in this matrix formulation that the vector x may in fact be generated recursively in O(D) operations, and thereby indicate how to generate the necessary coefficients. We observe first that the relationship may be rewritten with the help of (3.11) as We may easily obtain x from P T x in O(D) steps, and the following lemma shows that system (3.13) may also be solved in O(D) operations. Lemma 3.1 Let the matrix A be defined by (3.6), P be a permutation matrix, and R be the unique lower triangular matrix satisfying the Cholesky decomposition in (3.12). Then R \Gamma1 is a lower triangular matrix with at most three non-zero entries in each row. Proof: That R \Gamma1 exists and is lower triangular follows from A being invertible and the fact that the inverse of a triangular matrix is triangular. Inverting Equation (3.12) leads to the relationship that MD is upper triangular, and It is easily computed that Therefore SD is a symmetric matrix for which each row and column has at most three non-zero entries, and that one of these three occurs at the diagonal element. We now decompose MD in terms of the (D \Gamma 1) \Theta (D \Gamma 1) upper triangular matrix MD\Gamma1 , the and the scalar element mD as As MD is invertible, mD is necessarily non-zero. We also decompose SD in terms of the (D \Gamma 1) \Theta (D \Gamma 1) symmetric matrix TD\Gamma1 , the and the scalar element s D as The matrix TD\Gamma1 shares the same property of SD that no row or column contains more than three non-zero elements and that one of the three occurs at the diagonal element. Equation (3.14) can then be written Because the last column of SD contains no more than three non-zero entries, the vector WD\Gamma1 necessarily contains no more than two non-zero entries. Hence, must also contain no more than two non-zero entries, which occur, say, in rows k 1 and k 2 . Define now the matrix The rank one matrix contains at most four non-zero entries, two of which occur on the diagonal. The other two occur in rows k 1 and k 2 . As had non-zero diagonal entries, the diagonal elements of the rank one matrix will not change the count of zeros. The off-diagonal of the rank one matrix may introduce one additional non-zero term to each row k 1 and k 2 . However, as there were at most three non-zero elements in rows k 1 and k 2 of SD , and one of these appeared in the last column, this leaves at most two non-zero elements for each row k 1 and k 2 of TD\Gamma1 . Therefore SD\Gamma1 is a symmetric matrix with at most three non-zero elements in each row and column, one of which occurs in the diagonal position. This argument shows that the last column of MD , composed of the vector and mD , contains at most three non-zero elements. The same argument may now be repeated on the equation to show that the second to last column of MD (i.e., the last column of contains at most three non-zero elements. This process may be repeated until the matrix M 3 is reached, as which point the statement of at most three non-zero elements follows by definition. This proves that each column of MD has at most three non-zero elements, and therefore the same is true of each row of R \Gamma1 . The proof suggests an efficient algorithm for generating the recursion coefficients stored in R \Gamma1 given the permutation vector \Pi. The non-zero entries of R \Gamma1 may be stored in a D \Theta 3 array, while the indices of the non-zero off-diagonal elements may be stored in a D \Theta 2 array. Once generated, these arrays are easily applied to solve the systems R A permutation based Brownian bridge discretization has the interpretation that the individual steps of the random walk x are generated is a specific order. Equation (3.9) allows, however, for a more general interpretation. Using the fact that B satisfies (3.9) if and only if orthogonal matrix Q, we see that generating the random walk as oeB z is equivalent to applying A to an orthogonal transformation of z. Such a transformation may lead to a diagonalization of the integrand, concentrating much of the variance of the problem into a few principle directions, and thereby reducing the effective dimension. This is discussed further in the Section 5. There is a computational price to be paid for this approach in that, for a general orthogonal matrix Q, it will not be possible to generate the corresponding random walk oeB z by recursion, but will require an O(D 2 ) procedure. Reordering For many problems associated with a stochastic process, there is a natural underlying time discretization. For example, for the bond described in the next section, monthly coupon payments suggest that monthly time steps are the most convenient to work with (leading to a 360 dimensional integral). However, this division and the corresponding dimension of the expected value integral are somewhat arbitrary. For example, daily time steps could be taken (representing the daily fluctuations of interest rates), which would lead to an integral of with dimension close to 11000. There would be little noticeable difference in the value of these integrals as long as the discretization error for the stochastic process is small. It is often the case that the acceptable error of the Monte Carlo computation is much larger than the time discretization error. While a minimum of 360 random variables are required to simulate the bond cash flows, it may be more correct to consider this as a one dimensional problem (corresponding to the use of a one interest rate model) which evolves in time. With this in mind, we now describe an alternate approach to generating random walk paths. We consider a collection of N "simulation particles" x j . The position of particle j (j determined by sampling from the distribution generated by the stochastic process with initial data x n . The approach is described here for standard Brownian motion, but is easily adapted to all stochastic processes, making it a more general approach than the Brownian bridge discretization. The particle positions at time n may be expressed as where z j is sampled from a N(0; 1) distribution. The ensemble of particles evolves in time according to (4.1). If the z j at each time step are sampled randomly, then this procedure is equivalent to the simple Monte Carlo generation of the random walk. Likewise, if z j at time step d is taken from the d th dimension of a D dimensional quasi-random sequence, then the procedure is identical to the simple quasi-Monte Carlo generation of the random walk. In light of the fact that the problem is "spatially" one dimensional, it is possible to use the same one dimensional quasi-random sequence to generate each time step. Because the terms of the sequence are not independent, however, it is necessary to take special measures to insure that correlations across time steps are controlled and to make optimal use of the greater uniformity associated with one dimensional quasi-random sequences. These goals are achieved through the additional step of reordering the particles at each time step. This approach was developed by Lecot [9, 10, 11] for use in the simulation of kinetic equations, and has been applied to the periodic one dimensional heat equation, for which convergence close to O(1=N) was proved [12]. This method proceeds as follows for a one dimensional stochastic process. The particles are assigned positions according to the initial distribution function at time 0 such that The particles may all start from the same initial value (as in the bond example of the next section), or these initials values may be generated using a uniform cell centered discretization of (0; 1) with N points. The positions of the particles after the first time step are generated according to Equation (4.1) whereby the N numbers z j correspond to the first N terms of a one dimensional quasi-random sequence (the Van der Corput sequence is a natural choice). The results is that the particles positions are no longer ordered according to (4.2). The final step is to reorder the particles by sorting and relabeling them, such that the particle labeled with index 1 is always furthest to the left, and the particle labeled with index N is always furthest to the right. The next time step is then carried out by assigning the next N terms of the quasi-random sequence in order to the particles x 1 N . It is easily seen that for a random sequence, this method will have no effect and will lead to the same results as the standard Monte Carlo random walk. The reordering procedure has two effects. First it breaks correlations associated with the low discrepancy sequence. If no relabeling were done, the first particle would be assigned the terms from the sequence. If the Van der Corput sequence is used and N is even, this particle would always received a z 1 - 0 (assuming a direct mapping of (0; 1) to (\Gamma1; 1) is used obtain normally distributed numbers) to generate it's next position, with the result that the path for the first particle would always be increasing. The other particles would have similar problems. Reordering effectively decouples the generating value a particle receives from its position in the sequence. For this reason, it is also advisable to avoid using N equal to a power of two (as- suming a base 2 quasi-random sequence is used) to further minimize structural correlations of the sequence. The second effect helps explain the advantage this procedure offers. If the distribution function at time step n is well represented by the N particle posi- tions, then in general there will be many particles in intervals which are relatively small compared with changes in the distribution function. Thus those particles in a given interval are essentially alike. Reordering groups these particles together and ensures that these like particles receive a contiguous subsequence of the quasi-random sequence, which itself is uniformly distributed. The effect is to obtain a more uniform sampling from the distribution function at time step would have been obtained from a random process. There are several limitations to this quasi-Monte Carlo method. First, it does not immediately generalize to higher dimensional stochastic process because there is no absolute ordering of two or more variables. Partial orderings are feasible in two or three dimensions, but become less effective as dimension increases. A decomposition of the stochastic process into principal components could however be used to identify two or three "directions" to which this procedure could be applied, while the other components are simulated with a random sequence. A second requirement for the success of this method is that there be enough particles to adequately represent the distribution function in the sense described above. If the particles become separated so that their paths do not cross, then the reordering will have no effect. For Brownian motion this will eventually happen, but on time scales such that the diffusion is small in relation to the number of particles, this is not a problem. Processes with mean reversion help contain this effect. Finally, based on the computational results present in Section 6, this method appears to only exhibit superior convergence properties compared with random Monte Carlo for functions which are predominantly the sum of univariate functions. A detailed discussion of the decomposition of functions into lower dimensional components and effective dimensionality for quasi-Monte Carlo integration can be found in [2, 19]. For example, consider path sampled from a standard discrete Brownian motion process with a fixed starting point x 0 . The function where the z i are the independent increments, will exhibit low integration error and convergence close to O(1=N) when reordering is used. However, the introduction of cross terms (e.g., results in much larger error and a significant reduction in the convergence rate. For appropriate stochastic processes, particle reordering may be combined with a permutation based Brownian bridge discretization. The effectiveness of this combination depends on how well the Brownian bridge discretization, when viewed as a change of variables, diagonalizes the integrand into the sum of univariate functions of the underlying independent normal variates. In the example above, the function can be easily mapped to a single univariate function by using a permutation with D. When such a Brownian bridge is used, the question arises as to what is the appropriate quantity to reorder. The answer is given by expressing the d th path position of the i th particle as x d Here z i is the normal variate used to determine x d i , and a d is a constant. The quantity b d depends only on the portion of the path of particle i which has already been determined because the matrix R \Gamma1 defined in Section 3 is lower triangular. The correct application of the reordering method here is to reorder the quasi-random normal samples (z according to the ordering of the b d 5 Application to a Mean Reverting Process 5.1 Bond Valuation for a Stochastic Interest Rate We now investigate the effectiveness of the quasi-Monte Carlo techniques outlined here by applying them to a problem from finance involving a mean reverting stochastic process. The problem is to find the fair price of a with a face value of $100. which pays a monthly coupon of 1% (i.e., $1). This question is closely related to pricing more complicated financial instruments such as mortgage backed securities to which quasi-Monte Carlo methods have also been applied [20, 1, 17, 21]. The simpler bond has been chosen here to help clarify the exposition. For our purposes, all months will be considered of equal length, so that the year bond has 360 payments of $1 which are equally spaced in time. There is an additional payment of the face value of the bond, $100, which occurs at month 360. The present value PV of the bond is simply the sum of all future cash flows discounted back to the present to account for interest accrual: Here p k and Z k are the payment and discount factor at month k, respectively. For the bond, is the price of a zero-coupon bond which expires at month k; in other words, Z k is the value today of $1 paid at month k. This is directly related to the annualized k-month continuously compound interest rate R k by the formula The question thus becomes how to model and compute the discount factors. In previous studies of quasi-Monte Carlo methods, interest rates have generally been modeled as following geometric Brownian motion. This has the advantage of ensuring that the rates never go negative, but it does not capture the fact that interest rates tend to vary over a limited range and never drift off to large values. For the current work we choose the Vasicek model for the short term rate r to illustrate the flexibility of the techniques proposed, as well as because this model has an exact analytic solution for the discount factors which aids in assessing the computational error of the various methods under consideration. The Vasicek model [25] is a mean reverting process with constant speed a, reversion level b and volatility oe (standard deviation): Here dz is the derivative of standard Brownian motion. According to the arbitrage pricing theory [4], the discount factor at time t must be given by where the integral is taken along a given path, and the expectation E(\Delta) is taken over all paths generated by the stochastic process (5.3). Because the variable r(t) has a Gaussian distribution, and because the sum of Gaussian variables is also Gaussian, it is possible to evaluate Equation 5.4 analytically. The result is [4, 25] A Monte Carlo evaluation of the present value of the bond price would involve simulating interest rate paths according to the process (5.3). For a given path realization - r(t), the discount factor for that path could be computed at any time t by evaluating Z t- The bond price conditioned on that realization could then be computed from Equation 5.1. The true bond price is then the expectation of the present value, which is approximated in Monte Carlo by when N interest paths with present values PV i have been simulated. In order to evaluate the integral 5.6 it is necessary to discretize time. (For a general stochastic process, integration of the stochastic differential equation to obtain a path - r(t) will also require a time discretization approximation. How- ever, for the Vasicek model, as well as for geometric Brownian motion, this may be done analytically.) The natural discretization is to choose time steps equal to one month, so that the discount factor at month k is related to the sum of interest rates at the previous months. As the purpose of the current work is to study the effectiveness of various Monte Carlo techniques, we wish to separate the Monte Carlo error from the time discretization error. We will therefore take as the exact solution not Equations 5.6, but that of the time discretized version of Equation 5.4: exp(\Gamma\Deltat i\Deltat. As long as max(a; b; oe= a) \Deltat !! 1, the approximation will be valid. The exact evaluation of this expectation is given by It can be seen that in the limit as M !1 (\Deltat ! 0), ZM (t) ! Z(t). For the purpose of pricing the bond, we set years, so that number of steps of the random walk is 360. The standard approach to generating a random path corresponding to the process (5.3) is given by the recursion where r n is the interest rate at time n\Deltat, fi is given above (5.10), b oe is defined as r and z n is an N(0; 1) variate. Note that b oe = O( \Deltat) as \Deltat ! 0. In matrix notation, the entire path may be expressed as Here z is a vector of independent N(0; 1) variates and with r 0 being the rate at time zero. The lower triangular matrix A is defined as Note that this reduces to standard Brownian motion when the mean reversion speed a is zero (so that The generalized Brownian bridge ideas developed in Section 3 remain the same. The goal is to find a suitable matrix B with such that the paths generated by have better distribution properties when z is a quasi-random vector of N(0; 1) samples. As with standard Brownian motion, permutations of the order in which the points on the path are generated leads to an interesting subset of the possible B's. The proof in Section 3 that a permutation based Brownian bridge may be generated in O(D) operations carries over exactly to the mean reverting process because the matrix given by (5.15) is also tri- diagonal. Here the diagonal elements are all equal to 1 while the non-zero off-diagonal elements are all \Gammafi. The Brownian bridge selected for pricing the bond was based on the permutation :). This has the desirable properties that the early points are well spread through the whole of the sequence, and that the time scale between subsequent points decreases as more points are added. For a financial instrument such as a bond for which the payments are distributed throughout its life, this kind of general permutation works well. There are numerous other similar orderings that could be chosen. Results, however, are likely to be insensitive to reasonable variations. For the simulation we chose the annualized parameters a interest rate r This corresponds to a long term annual interest rate of 7% and a long term annual volatility of 1.25%. With the \Deltat 0:0028. Based on Equations 5.1,5.8 and 5.10, the present value of the bond is 143.2973925856, which corresponds to an annual yield of 8:14%. The variance in this value is computed as 80.3, while the antithetic variance (described below) is 0.415. The Macaulay duration [3] of this bond, defined as ( \Gammak is the discount factor corresponding to the yield, is 128 months, or 10.7 years. This is the average time to maturity weighted by the present values of the cash flows, and it functions as a measure of the bond price's sensitivity to changes in the yield. 5.2 Analysis of the Integrand When random walk processes are used to value functions which smoothly depend on the path, a useful approach for understanding the effectiveness of quasi-Monte Carlo, as well as for providing control variates and indications for selecting a generalized Brownian bridge, is to compute a Taylor series expansion. It is natural (particularly for mean reverting processes) to expand the integrand as a function of independent normal increments about the expected mean, which corresponds to the point As long as the variance of the process is not too large, the Gaussian weights in the expectation integral will cause a sharp drop off in the weighting of paths away from the mean, so that the Taylor expansion is likely to be a good approximation. The choice of the integrand to be expanded depends of how the random walk is generated. As the default, we take the function v A corresponds to the standard random walk generated by (5.12), with A given by (5.15). Denoting the gradient term evaluated at zero by @vA @zD and the Hessian matrix evaluated at zero by we have that Integrating (5.19) against the Gaussian measures from which the z i are sampled gives E(vA Here \Deltav A (0) is the Laplacian of v A evaluated at zero. All of the z i are scaled by b oe, so that every derivative of v A (z) introduces a factor of b oe. Thus the Laplacian is of size b oe 2 , and the remainder term is O(boe 4 ). Note that the terms with odd powers of z integrate to zero by symmetry. Direct evaluation shows that for the choice of constants given above, Evaluating (5.20) to second order gives an approximation with a relative error of less than 2e-5. The constant term alone accounts for all but 0.4% of the value of the integral. We use this information to interpret the effectiveness of various Monte Carlo and quasi-Monte Carlo techniques. These results suggest that a method which accurately evaluates the linear and quadratic terms of the Taylor expansion will produce small relative error. We consider now how to deal with these terms. The linear term integrates to zero. This may be computed with no error by using antithetic random (or quasi-random) variables. This requires that when a point z is sampled from the distribution and used to evaluate v(z), the point \Gammaz is also taken. This is equivalent to replacing the integrand by As mentioned above, the variance of the present value of the bond has been computed in the Monte Carlo calculation to be 80:3. A similar estimate can be obtained from the Taylor expansion as jjrv A (0)jj 78:8. The variance of the antithetic integrand v (z) may also be estimated with a Monte Carlo calculation as 0:415, which is roughly 200 times smaller. Thus for random Monte Carlo, the use of antithetic variables leads to a reduction of error by a factor of around 14. There is of course the additional computational time associated with evaluating both v(z) and v(\Gammaz) to consider; however, for the bond valuation integrand, the increase is less than 25%. It is natural to ask how a quasi-random sequence will perform in evaluating the linear term. The integral of this term is approximated by E(rv 0 A A \Delta \Sigma (5.23) where the elements of the vector \Sigma are the one dimensional averages of the sample points z (d) If antithetic variables are used (so that the sample size is 2N ), then a quasi-random sequence is used without antithetic variables, the dimensions decouple according to (5.23) such that the errors are the sum of the one dimensional errors of (5.24). These errors will in general be O(1=N ), with the constant roughly like jjrv 0 A jj. For small values of N , the error from the linear term will tend to dominate the other errors and convergence close to O(1=N) may ap- pear. For the current problem, however, the cross over from the dominant linear term error to the dominant higher order term error occurs fairly soon. If, for example, the second order terms come in as random errors with the antithetic variance describing the error size, these errors would begin to dominate around Particle reordering is appropriate for such linear functions, as they are the sum of univariate functions. However, the relatively large contribution of the second order terms may limit the effectiveness. We now consider the quadratic term of the Taylor expansion. It is clear that the use of antithetic variables will not lead to any error reduction for this term. It is possible to imagine constructing a set of antithetic points in D dimensions reflecting symmetries across all coordinate axes. In this way, the cross terms of the quadratic could be eliminated; however, the diagonal terms would remain. Moreover, this would require evaluating the function at 2 D points, as opposed to just two (z and \Gammaz). An alternative approach to diagonalizing the quadratic term, and thereby decoupling the dimensions to produce a set of one dimensional integrals, is offered by the Brownian bridge discretization of the random walk. Let QA be the orthogonal matrix which diagonalizes the Hessian matrix HA such that the elements of the resulting diagonal matrix appearing in order of decreasing absolute value. We have that A A generalized Brownian bridge discretization matrix B may be defined by such that A QA z A rv 0 When the random walk is generated with Bz, the effect is to diagonalize the quadratic term. The largest eigenvalue is around 0.893; however, they drop off rapidly, with the 14 th being less that 0.0001. Only the first 24 are greater than 0.00001. Thus the effective dimension of the problem is reduced, and the decoupling of dimensions allows for the superior performance of quasi-random sequences on one dimensional problems to be exploited. Again we remark that no advantage arises if this technique is applied in conjunction with random sequences as this decoupling does not alter the total variance of the integrand. There is a substantial additional computational cost of generating paths with Bz when B is a full matrix such that no recursive generation is possible. It may be more effective to choose a permutation based Brownian bridge discretization matrix for which the associated change of variables leads to a significant (although not complete) diagonalization of the Hessian. Experimentation with various permutations indicates that almost any choice for such a B will be superior in this regard to using the standard random walk generating matrix A. For the price of the matrix vector multiple which, as just described, could diagonalize the quadratic term, this term may in fact be eliminated by using the Taylor series as a control variate. A control variate is a function OE(z) which approximates v(z) such that E(OE(z)) is known exactly. The expectation of v(z) is computed according to If OE(z) is close to v(z), then the variance of the function v(z) \Gamma OE(z) will be small, leading to a more accurate evaluation of E(v(z)) through (5.28). A good choice for OE(z) combines the constant and quadratic terms of the Taylor expansion of v(z) (5.19) (assuming antithetic variates will be used to eliminate the odd terms). It is most natural to choose the expansion which corresponds to the Brownian bridge discretization used to generate the paths, and thus it is more convenient to consider the approximation as a function of the path x (the deviation from the mean path) so that A +2 The function (5.29) will be correct for all oeBz such that B satisfies (5.15); thus the Brownian bridge may be used in conjunction with this control variate. Although the matrix in (5.29) is strongly tridiagonal, it is necessary to retain the off diagonal terms to ensure that E(OE(x)) is close to the true solution. A disadvantage of this choice for OE is therefore that the evaluate of the quadratic term requires O(D 2 ) operations. However, the advantage is that errors should scale like b oe 4 . 6 Computational Results We now describe the accuracy of various integration methods for computing the present value of the bond. The results are presented as a function of N , the number of paths, and as a function of the approximate computational time required for the methods. For each case, we present the root-mean-square of the error over 25 independent computations. Moreover, the computations for different values of N are all independent. For the Sobol' sequence calculations, independence means that non-overlapping subsequences were used. Here the error is computed with respect to the exact solution. The present value of the bond was computed with ten methods. The first was straight forward Monte Carlo using a random sequence (MC). Next, this calculation was repeated using a 360 dimensional Sobol' sequence (QMC) (gen- erated with part of the code FINDER obtained from Columbia University). Both of these computations were then performed using antithetic variates (MC- anti and QMC-anti). The Sobol' sequence was then used with the Brownian bridge discretization and antithetic variates to generate the interest rate paths (QMC-BB-anti). Next the one-dimensional Van der Corput sequence was used in the reordering method (REO), and then used with antithetic variates (REO- anti). Reordering was also used with the Brownian bridge representation and antithetic variates (REO-BB-anti). Finally, the Taylor series control variate approach was used first with random samples (MC-Tay), and then with the Sobol' sequence combined with the Brownian bridge (QMC-BB-Tay). For all but the reordering calculation, the number of sample paths ranged from being chosen as powers of two. For the reordering calculation, in order to avoid possible correlations within the base two sequence, N was chosen for the first two calculations as powers of three, ranging from 59049. For the REO-BB-anti calculation, primes close to powers of two were used. In all cases, the rms error of the 25 runs was computed at each N , and a line was fit to the log-log data to estimate the convergence rate. This assumes that over this range of N , the error may be modeled as cN \Gammaff . For random Monte Carlo, the constant c is the standard deviation, and Table 1 summarizes the results. For each method, the estimated size of the error at 10000 (based on the linear fit), the convergence rate ff, and the approximate computation time for one run with this N are given. All the computation times grow linear with N except for the reordering calculations, which grow as N log N due to the sort. The results are plotted in Figures 1 and 2. Figure 1 shows a log-log plot (base 10) of the relative error as a function of N . Figure 2 shows the same data, but now plotted as a function of time, based on the estimates of computation time per sample. The results for QMC-anti have not been plotted because as a function of N , the errors in this case are essentially the same as for simple QMC. This indicates that there is no advantage in using antithetic variates with the simple quasi-random sequence for this problem. However, the errors for the MC-anti calculation are significantly smaller than those of QMC and QMC-anti. This result may be interpreted in terms of the Taylor series expansion. The use of antithetic variates will eliminate the error from the linear term, but has no effect on the quadratic term. The fact that QMC and QMC-anti give the same error indicates that when quasi-random sequence is used, the errors from the quadratic term dominate the linear term (which may be converging like O(1=N )). This is not true for the random case as there is a substantial error reduction from MC to MC-anti. The fact that MC-anti has lower error than Method Convergence Rate Relative Error Comp. Time (sec) MC 0.508 6.05e-4 34 QMC 0.632 1.05e-4 22 QMC-anti 0.591 9.90e-5 28 MC-TAY 0.508 4.44e-7 496 QMC-BB-TAY 0.650 1.38e-7 517 REO Table 1: Comparison of Monte Carlo and quasi-Monte Carlo methods used to value a coupon bond -5 log N log (relative Bond Valuation REO MC-TAY QMC-BB-TAY QMC MC Figure 1: Error vs. N (log base 10) -5 log (computation time) log (relative Bond Valuation MC QMC REO MC-TAY QMC-BB-TAY Figure 2: vs. Computation Time (log base 10) QMC (with and without the antithetic variates) indicates that quasi-random sequence introduces larger errors in computing the quadratic term than the random sequence. The reason for this lies in the high dimensional nature of the problem when the standard discretization of the random walk is used. The quadratic term is the sum over all possible two dimensional projections of the 360 dimensional sequence. As has been previously demonstrated [13, 2], the Sobol' sequence has good one dimensional projections in all dimensions; however, some of the two (and higher) dimensional projections can suffer from clumping of points together. The corresponding holes are eventually filled in for large enough N , but this may occur on a scale much larger than the number of points of practical interest. As the dimension of the sequence increases, length of these clumping cycles may increase. Of the reordering methods, only the simple REO is plotted. The combination of reordering with antithetic variates and the Brownian bridge discretization did not result in any improvement. In fact, the results for REO-BB-anti were slightly worse. This is attributable to the use of a different set of N (powers of 3 for REO and primes close to powers of 2 for REO-BB-anti), which illustrates the sensitivity of reordering to the choice of N . When powers of 2 are used, substantially greater errors appear. For bond valuation problem, reordering shows random-like convergence 1= N , and gives errors which are slightly smaller than MC-anti. This indicates that reordering is handling the univariate linear terms well (leading to errors smaller than the dominant quadratic term error), and handling the quadratic term only slightly better than the random sequence. This suggests that the two dimensional projections for the reordering process have essentially random properties, while the diagonal, univariate quadratic terms are integrated more accurately. The dominance of the quadratic error explains why the use of antithetic variates does not improve the error. The fact that the Brownian bridge discretization also does not help stems from the dominance of the random like errors associated with the two dimensional pro- jections. These are still important because this discretization only leads to a partial diagonlization of the quadratic term. A major improvement over random Monte Carlo is achieved when the quasi-random sequence is used in the Brownian bridge discretization with antithetic variates. In terms of the Taylor series, the number of quadratic cross terms which significantly contribute to the error has been greatly reduced by the partial diagonlization, and those cross terms which are important occur in relatively low dimensions. For low dimensions, the two dimensional projections of the Sobol' sequence are very uniformly distributed. This results in substantially lower integration errors and faster convergence than with antithetic random Monte Carlo. The validity of the Taylor series analysis of this problem is borne out by the considerable error reduction achieved when the first terms are used as a control variate. In the random case, this leads to a variance of 0.000039, compared with 80.3 for MC and 0.415 for MC-anti. Even greater gains are made by using the quasi-random sequence in the Brownian bridge discretization. Again a kind of partial diagonalization of the fourth order term is achieved and the greater uniformity of the early four dimensional projections is exploited. Figure these results in terms of the estimated computation time. In Table 1 it can be seen that there is in fact a computational advantage to using quasi-random sequences over random for this problem. This is due to the time required for sequence generation. The Sobol' sequence, which may be generated using bit-wise operations [22], is faster to generate than the 48 bit random generator used (drand48). The use of the Brownian bridge discretization comes at a relatively low computational price, and in fact, QMC-BB-anti was faster than simple MC. It should be noted that for more complicated integrands, the importance of sequence generation time will fade and the cost of antithetic variates may increase. A much larger computational effort was required to use the Taylor series control variate, due to the matrix vector multiply associated with the Hessian term. However, the results in Figure 2 still show that the Taylor series control variate leads to the lowest error, even when time is taken into account. This is related to the fact that for random Monte Carlo, it is necessary to compute 100 times longer to reduce the error by a factor of 10. Conclusions In this paper two general procedures have been developed for generating discrete sample paths associated with a stochastic process using quasi-random sequences. The properties of these methods have been illustrated by applying them to an example from finance, the valuation of a coupon bond with a mean reverting stochastic interest rate. The main conclusions are that even for nominally high dimensional integration problems arising from discrete stochastic processes, quasi-Monte Carlo methods can be extremely effective. The best method and the degree of success depends, of course, on the nature of the integrand. For functions which may be decomposed into the sum of dominant univariate straightforward application of quasi-random sequences should result in improved accuracy over random Monte Carlo. For these cases, however, the use of the particle reordering method allows this to be done using the one dimensional Van der Corput sequence, which avoid the need to generate very high dimensional sequences. Moreover, particle reordering appears to avoid the problem of poor two dimensional projections associated with high dimensional sequences. For functions with strong multi-variate components, the Brownian bridge discretization of the random walk can lead to a substantial reduction in the effective dimension of the integrand. If special knowledge of the integrand is available, it may be possible to construct a generalized Brownian bridge representation tailored to the integrand which results in optimal dimension reduction. Finally it has been shown that in some circumstances that quasi-Monte Carlo methods may be effectively combined with standard variance reduction techniques such as antithetic sampling and control variates. In particular for smooth functions of a random walk, the use of a Taylor series expansion about the expected mean path as a control variate has been shown to offer superior results when combined with quasi-random paths generated in a Brownian bridge discretization. Acknowledgments The author wishes to thank Spassimir Paskov and Joseph Traub for kindly providing the use of the quasi-random sequence generator FINDER and for a number of helpful discussions. Many thanks are also due to Russel Caflisch and Art Owen. --R Valuation of mortgage backed securities using brownian bridges to reduce effective dimension. Bond Markets Futures and Other Derivative Securities. A quasi-Monte Carlo algorithm for the global illumination problem in a radiosity setting Radiative heat transfer with quasi-Monte Carlo methods Numerical Solution of Stochastic Differential Equations. Uniform Distribution of Sequences. Low disecrepancy sequences for the Boltzmann equation. A quasi-Monte Carlo method for the Boltzmann equation A quasi-monte carlo scheme using nets for a linear boltzmann equation A Quasi-Monte Carlo approach to particle simulation of the heat equation Smoothness and dimension reduction in quasi-Monte Carlo methods Random Number Generation and Quasi-Monte Carlo Methods Toward real-time pricing of complex financial derivatives Accelerated quasi Monte Carlo integration of the radiative transfer equation. Orthogonal arrays for computer experiments New methodolgies for valuing derivatives. Faster valuation of financial derivatives. Application of quasirandom points for simulation of gamma radiation transfer. On the distribution of points in a cube and the approximate evaluation of integrals. An equilibrium characterization of the term structure. --TR --CTR G. Larcher , G. Leobacher , K. Scheicher, On the tractability of the Brownian bridge algorithm, Journal of Complexity, v.19 n.4, p.511-528, August A. Papageorgiou, The Brownian bridge does not offer a consistent advantage in Quasi-Monte Carlo integration, Journal of Complexity, v.18 n.1, p.171-186, March 2002 Xiaoqun Wang, On the Effects of Dimension Reduction Techniques on Some High-Dimensional Problems in Finance, Operations Research, v.54 n.6, p.1063-1078, November 2006 Xiaoqun Wang , Kai-Tai Fang, The effective dimension and quasi-Monte Carlo integration, Journal of Complexity, v.19 n.2, p.101-124, April Juan A. Acebrn , Maria Pia Busico , Piero Lanucara , Renato Spigler, Probabilistically induced domain decomposition methods for elliptic boundary-value problems, Journal of Computational Physics, v.210 December 2005 Pierre L'Ecuyer, Quasi-monte carlo methods in practice: quasi-monte carlo methods for simulation, Proceedings of the 35th conference on Winter simulation: driving innovation, December 07-10, 2003, New Orleans, Louisiana Per Ltstedt , Jonas Persson , Lina von Sydow , Johan Tysk, Space-time adaptive finite difference method for European multi-asset options, Computers & Mathematics with Applications, v.53 n.8, p.1159-1180, April, 2007 Pierre L'Ecuyer, Quasi-Monte Carlo methods in finance, Proceedings of the 36th conference on Winter simulation, December 05-08, 2004, Washington, D.C. John M. Charnes, Options pricing: using simulation for option pricing, Proceedings of the 32nd conference on Winter simulation, December 10-13, 2000, Orlando, Florida
quasi-Monte Carlo;stochastic process simulation;computational finance
306669
A Behavior Model for Next Generation Test Systems.
Defining information required by automatic test systems frequently involves a description of system behavior. To facilitate capturing the required behavior information in the context of testing, a formal model of behavior was developed for use by test systems. The approach taken in defining the behavior model was based on information modeling and was derived from recent work in formal methods by the hardware and software design communities. Specifically, an information model was developed in EXPRESS capturing the relationships between essential entities characterizing behavior. In this paper, we provide a high level description of the behavior information model and several examples applying the model in a test environment.
INTRODUCTION Defining information required by automatic test systems frequently involves a description of system behavior in one way or another. Behavior is a characteristic of an entity that describes how that entity acts or reacts within some context or environment. Within the context of test systems, behavior is defined by what is observed as a result of testing. Recent work in defining an architecture for next generation test systems has determined that behavior descriptions are relevant in at least five contexts: 1) characterizing expected behavior by the product, 2) defining test requirements, defining resource capabilities and requirements, defining behavior of test strategies, and 5) guiding system diagnostics. To facilitate capturing the required behavior information in each of these contexts, an information model defining behavior has been developed. In this paper, we provide a high level description of the behavior information model and several examples applying the model in a test environment. Specifically, we focus on applying the model to capturing test requirements and resource capabilities. The approach taken in defining the behavior model is derived from recent work in formal methods by the hardware and software design communities (Cook, 1992; Hall, 1990; Thomas, 1993). Formal methods are mathematically-based languages used to capture essential attributes of a system being designed. These methods are used, typically, to guide the process of design verification and proof-of-correctness. As such, most formal methods apply a "declarative" approach to specifying systems. Declarative approaches specify systems by stating logical properties and relationships among entities within the system (Abramsky & Hanking, 1987; Hogger, 1984). The process of instantiating such a design corresponds to assigning legal values to parameters within the system description such that the properties and relationships defined by the description are consistent. The approach taken in defining the behavior model was to develop an EXPRESS information model capturing the relationships between essential entities characterizing behavior 10303-11:1994). The approach is declarative in that, in the simplest case, the process of using the behavior model consists of matching an implementation to a model to verify that the two correspond to one another. Thus, in the case of selecting an appropriate resource to perform a test, a model of the required behavior is instantiated and compared with a model of the possible behaviors provided by each available resource. The resource is selected that matches the required behavior. In the following sections, we discuss a simplified view of the EXPRESS behavior model as well as a slightly more detailed view. This discussion is put in the context of a trivial test program to highlight and describe the major entities of the model. Following this introduction, we provide several examples using the behavior model in the context of test requirements, test program synthesis, resource behaviors, and triggers or events. A simplified view of the behavior model is shown in Figure 1. This simplified model will be expanded later, but it is sufficient to explain the basic concepts. There are five entities in this model. 1. location captures where something happens. In the current model, location can be ports on or in a unit under test (UUT) or cells in a UUT. 2. behavior captures when something happens. This entity is distinct from the whole behavior model in that it is limited to identifying a span of time over which something occurs. This entity is defined by its start and stop attributes. 3. signal captures what happens. Types of signals include the DC_SIGNAL and AC_SIGNAL, as well as standard programming data types, e.g., integer, real, or boolean. 4. constraint defines rules constraining or restricting which values may appear on signals. 5. time exists in the model solely to support the definition of the behavior entity. It is a subtype of the property entity (defined below) and is used to "type" the start and stop attributes of behavior. The behavior model can be used to describe requirements on a test program and capabilities of a test resource. time constraint location behavior signal start stop when where constrains Figure 1. Simplified Behavior Model A more detailed view of the behavior information model is shown in Figure 2. In this figure, the five entities from Figure 1 are shown plus several additional entities capturing constraint information. Significant in this figure is the observation that a behavior can be a composite of lower-level behaviors, ultimately containing zero or more signals. Both behavior and signal are characterized by a set of properties, each of which can be constrained in some way. Further, in addition to constraints being applied to signals, constraints can also be applied to behaviors. Finally, the current version of the behavior model identifies four types of constraints: range constraints (limiting a property to lie within some range of legal values), accuracy constraints (identifying the acceptable variation of a property value from a specified reference), timing constraints (indicating legal ordering or timing relationships with respect to another variable), and value constraints (indicating possible legal values, such as discrete values). Arbitrary relationship constraints can be defined in the constraint supertype without the need to instantiate one of the subtypes. At first glance, it appears that the behavior model describes, for example, how a test program must execute. This is almost, but not quite, correct. The behavior really provides a set of criteria by which one can determine if a test program executed properly. To see why this distinction is important, consider a UUT with two power supplies that may be used to establish type time constraint behavior signal start property timing range accuracy stoplocation includes constrained_by has s[0:?] props s[0:?] props s[0:?] location location constrained_by value Figure 2. Detailed Behavior Model power once the ground has been established. No testing may be done on the UUT until after the power supplies have been established. This situation is shown in the flow chart in Figure 3. The branches labeled "PS 1" and "PS 2" can execute concurrently or sequentially-the only constraints are that the branches cannot begin until "establish ground" is complete, and that "run tests" cannot begin until both power supply branches are complete. Now consider a hypothetical test program. Because the test program is sequential, it might look something like the establish ground establish PS_1 establish PS_2 run tests If the "establish PS_x" routines can be decomposed into a more basic set of statements (consisting, for example, of setup and apply statements), then the following version of the program is also legal. establish ground setup PS_1 setup PS_2 apply PS_1 apply PS_2 run tests There are many different legal execution paths that may be taken by a test program. It would be inappropriate for a behavior specification to state that exactly one of those paths is correct and all others incorrect. Such an approach would improperly restrict other legal paths 1 . The behavior model describes the desired result of a test program rather than the test program itself. The previous example provided pseudo code for a test whose objective was the verification of a specified behavior. If the example was executed, real signals would be generated 1 However, there may be compelling administrative reasons to insist upon a particular order, e.g., procedural reusability or test consistency. establish ground run tests Figure 3. Flow Chart for Providing Power for Tests by the test equipment and applied to the UUT, and real signals would be observed or measured. Ultimately, the behavior model specifies requirements on those signals. Suppose, following execution of a test program, a complete record of all signals at the interface to the UUT is available. For the sake of discussion, assume these signals have been recorded with infinite precision. This record is called an execution trace of the test program. For the example above, the execution trace would include the voltage and current at the ground and power supply pins of the UUT. After a test program has executed the execution trace can be examined to see what the voltages were at any time during the test. The behavior model only defines constraints on the execution traces. The constraints are not applied directly to the test program-they only influence decisions made in configuring and executing the test program. The model is a "declarative" representation of behavior and does not explicitly prescribe the behavior of the test program as might be expected from an imperative (e.g. procedural or functional) description. Instead it describes the behavior that is expected from the program. A psuedo-language invented for illustration purposes is used to demonstrate the structure of a behavior model and associated properties of behavior. Behavior is a class; therefore, each instance of a behavior has a name. The declaration of behavior may include other behaviors (i.e., sub-behaviors) as well as signals, constraints, and other properties. The format used for our pseudo-language is as follows: <behavior-name>: <property definition> The property definition may include sub-behaviors, signals associated with the behavior and their locations, and constraints defined on the behavior or any of its properties. In the following discussion, this pseudo-language will be used to present several example declarative fragments. Let us refine the elements of the behavior model for our example. First, the use of the phrase "establish ground" must be clarified. On a tester, this means that the ground pins of the UUT connect to the digital, analog, or system ground on the tester. Next, consider what it means to "establish PS_1." This means that there is a stable voltage of the proper value at the proper pins on the UUT. This can be brokent into two pieces: the declaration of a voltage at the UUT pins and a constraint on the value of the voltage: establish_PS_1: signal Vcc1 DC_SIGNAL located at (HI=Ps1_Pin, LO=Gnd_Pin) constrain Vcc1.voltage > 4.75V AND Vcc1.voltage < 5.25V At this point, four of the five entities in the simplified behavior model are evident: . There is a signal named Vcc1. The type of the signal is DC_SIGNAL, where the type is an extension to the simplified model (as shown in Figure 2). . There are two locations, named Ps1_Pin and Gnd_Pin, where the signal Vcc1 occurs. . There is a constraint that restricts the voltage attribute of Vcc1 to lie between 4.75V and 5.25V. . There is a behavior named "establish_PS_1" that defines the period over which the property definitions are active 2 . This behavior model states that there is a voltage between two pins on the UUT and that the voltage must lie within the range 4.75V to 5.25V. The behavior does not provide the actual value for the voltage or even constrain the value to be constant for the duration of the behavior (however, constancy is implied by the type, DC-SIGNAL). Given this model, a test program can be verified to satisfy the objectives and constraints of the model, thereby verifying that the test program is "behaving" as specified. Formally, the test program itself cannot be verified. Rather, the test program can be run and the resulting execution trace examined. From the execution trace, the voltage corresponding to signal Vcc1 can be determined to ensure the voltage lies within the proper range for the duration of the establish_PS_1 behavior. Notice that no time entities are defined for the example. In a test program the behavior establish_PS_1 begins at some time and later ends, but no specific values have been assigned, nor should they be. For this example, the start and stop times are identified by examining the execution trace of the program rather than being included in the test program to prescribe specifically when the behavior occurs. In considering the whole test program, however, one finds that the start and stop times are specified, but in terms of timing constraints. For example, whole_test_program: behavior PS1 establish_PS_1 behavior PS2 establish_PS_2 behavior RT run_tests constrain PS1.stop <= RT.start AND PS2.stop <= RT.start In this example, the behavior defined by whole_test_program contains three sub-behaviors (named PS1, PS2, and RT). Behavior whole_test_program also contains a constraint that relates the start and stop times of the three sub-behaviors such that the ordering of the behaviors conforms to the flow chart in Figure 3. Notice that the start and stop times, while specified in the constraint, do not have values specified anywhere. As described above, the actual values are derived from the execution trace of the test program. APPLICATIONS OF BEHAVIOR In the following sections, we will provide several examples using the constraint model. These examples are, necessarily, simplified, but they serve to further illustrate the concepts introduced in the previous section. The behavior model can be applied during test requirements specification, synthesis, and verification. A common thread through these applications is the use of the behavior model for test program specification. Test resource allocation is a fourth application that can occur during test 2 In this example, no specific duration is specified. program development (i.e., static allocation) or during test program execution (i.e., dynamic allocation). Other applications are expected as the model becomes more widely used. Test Requirements Specification The behavior model can be used to capture test requirements. Test requirements, in this context, are requirements on the test program itself, not requirements on the test development process (Nagy & Newberg, 1994; Atkins & Rolince, 1994). The behavior model addresses test requirements such as: . A safe-to-turn-on test must be performed before any other test. . Tests must be run over a range of ambient temperature. . Frequency stability must be measured at 1.250000 Mhz. Using these requirements as examples, we will demonstrate how to represent requirements in the behavior model and how to use the requirements in test program synthesis and verification. The above test requirements are provided in English and, although understandable to engineers, are difficult for a computer to understand. The first step for specifying requirements in a machine-understable way is to add detail to the above statements until they can be expressed formally. Safe-to-Turn-On Test Requirement A safe-to-turn-on (STTO) test is defined as a behavior that precedes all other behaviors in the test program. The test program itself represents an enclosing behavior that includes the STTO test and all other tests. The STTO behavior typically tests for shorts between power and ground with a direct resistance measurement and then tests for excessive current when the UUT is powered. The STTO "returns" a value that determines whether any further tests may be run. Specifically, the STTO behavior can be represented as whole_test_program: behavior ST safe_to_turn_on(safe_to_test boolean) behavior RT run_tests constrain IF RT.execute THEN RT.start >- ST.stop constrain IF RT.execute THEN ST.safe_to_test In this model, a behavior is defined as whole_test_program that contains two sub- behaviors: ST and RT. Behavior ST is an instance of the safe_to_turn_on behavior (defined above). ST has a return parameter called safe_to_test. Behavior RT simply encapsulates all other tests in the test program. 3 In this example, we introduce the "RT.execute" notation. RT.execute is TRUE if the sub-behavior, RT, actually executes and is FALSE otherwise. However, just because a sub-behavior is declared inside a behavior does not mean that the sub-behavior actually executes. Additional constraints are required to ensure that the sub-behavior executes as many or as few times as necessary. The first constraint ensures that, if RT actually executes, then RT follows ST. The second constraint ensures that RT can only execute if behavior ST returns TRUE for the safe_to_test parameter. This constraint looks "backwards" because the behavior that is supposed to occur (RT.execute) appears as the test to the IF statement, and the behavior that is supposed to have occurred appears in the THEN clause of the IF. Behavior descriptions are declarative-they do not prescribe how to execute a test program; they describe what must be true after the test program executes. After the test program executes, the execution trace will have a value for RT.execute and ST.safe_to_test. The only way the constraint can be satisfied is if both ST.safe_to_test and RT.execute are TRUE, or if RT.execute is FALSE. Notice that RT is not required to actually run. Instead, the requirement is that RT not run unless the UUT its safe-to-turn-on test. Test Test Requirement Products typically have a temperature range over which they are expected to operate. This normally implies that the product must be tested at more than one ambient temperature. Let us assume that our example product will be tested at three temperatures: room temperature, a low temperature, and a high temperature. This assumption can be captured by first expanding the definition of the run_tests behavior to include the notion of ambient temperature. run_tests: signal ambient temperature Next the definition of whole_test_program is expanded to require that run_tests execute at least once with the temperature around room temperature, once with the temperature near the low end of the range, and once with the temperature near the high end of the range. whole_test_program: behavior ST safe_to_turn_on(safe_to_test boolean) behavior RT_room: run_tests constrain IF RT_room.execute THEN RT_room.start >= ST.stop constrain IF RT_room.execute THEN ST.safe_to_test constrain IF RT_room.execute THEN RT.ambient in room_range behavior RT_low: run_tests constrain IF RT_low.execute THEN RT_low.start >= ST.stop constrain IF RT_low.execute THEN ST.safe_to_test constrain IF RT_low.execute THEN RT.ambient in low_range behavior run_tests constrain IF RT_high.execute THEN RT_high.start >= ST.stop constrain IF RT_high.execute THEN ST.safe_to_test constrain IF RT_high.execute THEN RT.ambient in high_range The whole_test_program description has been modified to include three copies of run_tests, each of which is constrained to run within a particular temperature range (denoted by names such as room_range, low_range, and high_range, that would be defined in a full model). Note there are no sequencing constraints between the various run_tests; an implementation is free to pick whatever temperature sequence it deems most appropriate. Also notice that none of the run_tests are required to execute. In this particular example, the decision about execution is left to the diagnostic controller. The diagnostic controller might, for instance, decide not to test at high and low temperature if the room temperature test fails. Such a decision is entirely consistent with the test requirements in the example. Frequency Stability Test Requirement A frequency stability test might verify that a UUT output signal has a constant frequency. The term "constant" must be qualified to mean "constant within some error." This test requirement can be captured by defining it in terms of a behavior. One approach to specifying the behavior is: frequency_stable: signal Osc AC_SIGNAL located at (HI=Osc_Pin, LO=Gnd_Pin) constrain abs (Osc.frequency - 1.25 MHz) < Freq_Error This model defines a behavior, frequency_stable, with one signal that is of type AC_SIGNAL. There is a single constraint that forces the frequency to be "close to" 1.25 Mhz, where "close to" is defined as being within Freq_Error. Unfortunately, this description is incorrect because one does not know if the oscillator is really stable, nor can it be forced to be stable. The current description demands that the oscillator be stable and invalidates any observation of behavior for which the oscillator is not stable. The description needs to report whether or not the oscillator is stable rather than forcing the stability of the oscillator. Once again, the focus is on describing rather than prescribing behavior. For example, frequency_stable: property Osc_Ok boolean signal Osc AC_SIGNAL located at (HI=Osc_Pin, LO=Gnd_Pin) This description says that the Osc_Ok property is TRUE if the oscillator frequency is stable, and FALSE otherwise. Notice that Osc_Ok is not required be TRUE. It will be TRUE for a fault-free UUT and may be FALSE for a faulty UUT. The behavior frequency_stable is permitted to take on either value, and it is reasonable to expect that diagnostics will use Osc_Ok (among others) to indicate whether the UUT is faulty. Test Because it is declarative, a behavior description does not usually capture enough information to directly generate code for a test program. However, a behavior can be used to guide test program generation (Papachristou & Carletta, 1995). In general, the code synthesis process can follow a constraint satisfaction process coupled with a code generator as a side effect (Dechter, 1992; Pearl 1988). For example, in determining the order in which to execute RT and ST, legal values (or ranges of values) need to be instantiated for the RT.start and ST.stop variables. As a side effect of instantiating these values, a code generator can determine that functions associated with RT and ST must be generated that are sequenced according to these legal values. For illustration, consider the example from the previous section describing the STTO test. For this example, when synthesis begins, code implementing whole_test_program must be generated. This might involve including standard startup code and may include the generation of site-specific user interfaces. The test requirements in the behavior description are silent on such issues, and the synthesis program is expected to generate such details from other sources of information. The separation of test requirements that depend only on the UUT from information about the test equipment or local test procedures is deliberate and is a principal advantage to using the behavior model. The remaining discussion will assume that the synthesis program will be adding local information, and will talk only in terms of satisfying the test requirements. Having begun whole_test_program, one must select a component of the test program to synthesize. There are four statements in whole_test_program, two behaviors and two constraints. Note that the first constraint prohibits running RT before running ST. Also note that the second constraint cannot be evaluated until ST executes. Therefore, ST will be synthesized first, which is exactly what common sense would dictate. Now a branch that executes RT only if ST returned TRUE for its safe_to_test parameter will be synthesized. When using a programming language like C, the code for whole_test_program would resemble the following skeleton: void whole_test_program ( void ) { boolean safe_to_test; - Execute Safe_To_Turn_On, - getting the safe_to_test parameter back. safe_to_turn_on ( &safe_to_test ); Execute Run_Tests only if safe_to_test is true. - safe_to_test ) { Note that the constraint that ST run before RT is ensured by the order in which the safe_to_turn_on and run_tests routines are called in the test program. Also note that the C program executes run_tests if safe_to_test is TRUE, even though the test requirements did not demand this. Test programs are often more constrained than the test requirements due to considerations such as operator convenience, test time minimization, or other concerns not directly related to the requirements. Test Test program verification is the process of comparing an existing test program with a set of test requirements to ensure that the program satisfies the requirements (Caunegre & Abraham, 1995). As discussed earlier, the behavior description of the test program constrains its execution trace, and only the execution trace truly can be verified. However it is both impractical and inefficient to verify each execution trace; therefore, the alternative is to analyze the test program itself and predict whether or not all execution traces that can be produced by the test program will be correct. Some aspects of an execution trace can be predicted with high confidence. Gross timing relationships are a good example. In the following example, the behavior some_test has two sub-behaviors (B1 and B2), and B2 must occur after B1. some_test: behavior B1 Test_A behavior B2 Test_B constraint B2.start > B1.stop If the corresponding test program is written in a sequential programming language such as C, and if B1 and B2 are implemented as subroutines, the code for some_test might look like: some_test ( void ) { In this case, B2 is guaranteed to follow B1 unless some catastrophic failure occurs in the compiler or in the host computer. Other aspects of an execution trace can be predicted with less certainty. For example, consider a behavior that contains a signal whose voltage is constrained to a small range around 3.3V: some_voltage_test: signal Vcc DC_SIGNAL located at (HI=Ps1_Pin, LO=Gnd_Pin) constrain abs(Vcc.voltage - 3.3V) < 0.1V This behavior might be implemented by code that programs a power supply to 3.3V. Analysis of the test program code would show that the power supply programming is consistent with the behavior; however, the execution trace would be consistent with the behavior only if the selected power supply had adequate accuracy and precision and if the line loss between the supply and the UUT was negligible. These are concerns that test engineers deal with on a daily basis and that must be considered during the analysis. Sometimes analysis of the test program code does not yield enough information to conclude anything about the expected execution trace (e.g., when interactions between the selected test resource and the interface test adapter cannot be predicted easily). In these cases simulation of the test program, also called "virtual tests," can generate predictions of execution traces for the test program (Miegler & Wolz, 1996). These predicted execution traces can be verified with respect to some behavior, and with enough such simulations, the test program could be declared to be acceptable. Test Resource Allocation Test resource allocation identifies candidate resources and then determines if the candidates are suitable for the required task (Hardenburg & Nichols, 1995). Test resource allocation is an important function in test development, and automation of this function is important when automating the test program generation process. Automated allocation also enables dynamic allocation of test resources, that in turn leads to more portable test programs. A test program will have one or more requirements that must be satisfied by a test resource, and a test resource will have a set of capabilities. If the resource capabilities satisfy the requirements then the resource is functionally suitable. The behavior model supports the test for functional suitability by acting as a specification for both the test requirements and the test resource capabilities. For example, supposed the following test requirement is applied to an amplifier with a gain of two. some_test: signal V1 DC_SIGNAL signal Vin DC_SIGNAL located at (HI=In_Pin, LO=Gnd_Pin) signal Vout DC_SIGNAL located at (HI=Out_Pin, LO=Gnd_Pin) signal V2 DC_SIGNAL property Amp_Ok boolean constrain abs(V1.voltage - 4V) < 0.5V constrain abs(Vin.voltage - V1.voltage) < 2mV constrain abs(V2.voltage - Vout.voltage) < 2mV There are four signals in this behavior: 1. V1 is the input voltage to the amplifier program, as programmed 2. V2 is the output voltage, as reported by some instrument 3. Vin is the actual input voltage to the amplifier 4. Vout is the actual output voltage of the amplifier There are also four constraints in this behavior. 1. The programmed input voltage can be any value in the range 3.5V to 4.5V. 2. The actual input voltage must be within 2mV of the programmed voltage. 3. The reported output voltage must be within 2mV of the actual output voltage. 4. The boolean property Amp_Ok is true if the amplifier gain, calculated with the programmed and reported voltages, is two, plus or minus one tenth of one percent. From this description, three things about some_test can be observed. First, the use of signals for the programmed and reported voltages allows the behavior model to capture accuracy requirements. The relationship between Vin and V1 is one accuracy constraint, and the relationship between V2 and Vout is the other. Second, while the behavior model allows the test program to test the amplifier at any voltage in a one volt range (e.g., 3.5V to 4.5V), the accuracy of the overall test is required to be relatively high. This requirements cannot be specified with a simple range on Vin. Third, there is an implicit constraint between Vin and Vout since Vin is constrained relative to V1, Vout is constrained relative to V2, and an explicit constraint exists between V1 and V2. This constraint is similar in form to that between V1 and V2 and might be classified as a product requirement. A test resource is required to implement the behavior specified by this model. To obtain the required behavior, two resources will probably be required-one to apply the input voltage and one to measure the output voltage. For the sake of discussion, consider only the measurement resource. The input resource would be treated similarly. A possible behavior model describing the measurement resource is: property Offset Voltage property Tolerance Real signal Vmeas DC_SIGNAL located at (HI=Input_Pin, LO=Gnd_Pin) signal Vread DC_SIGNAL constrain -10V <= Vmeas AND Vmeas <= 10V constrain abs(Vmeas - Vread) < (Offset constrain 0V <= Offset AND Offset <= 100uV Tolerance AND Tolerance <= 2e-4 This resource has two signals-the voltage that appears at the input and the voltage as reported by the resource. The behavior has four constraints. The first limits the range of the input voltage to plus or minus 10V. The last three constraints limit the measurement error. The first expresses the resource accuracy as a linear function of Offset and Tolerance, the second limits the legal range of Offset, and the third limits the legal range of Tolerance. Notice that the behavior does not state that the Offset, for example, is 100uV. Instead, the behavior states that the Offset is no more than 100uV. When interpreting this model, the measure_spec behavior states the behavior of the resource. It gives no information about how to control the resource. One approach for controlling the resource is for the resource to have a separate set of methods that provide program control. If this was the approach taken, one would expect to find a method that returns Vread.voltage, but no methods for returning Vmeas.voltage, Offset, or Tolerance. Further, there would be no methods for setting any of the properties or signals. This set of methods is entirely consistent with the control of real resources. Assume that some process has chosen the resource associated with measure_spec to implement some of the test requirements in some_test. If the resource is connected to the UUT, a new behavior will be specified that is the union of the original behaviors: some_test_using_resource: behavior X some_test behavior Y measure_spec constrain abs(X.Vout.voltage - Y.Vmeas.voltage) < ITA_Loss There is an instance of some_test and an instance of measure_spec. The sub-behaviors X and Y should be constrained to be simultaneous, but those constraints have been omitted for simplicity. There is an additional constraint that couples the UUT output voltage with the test resource input voltage, corresponding to wiring in the interface test adapter. The constraint does not say that the two voltages are equal. Rather, it states that the two voltages are closer than some factor called ITA_Loss. If the test resource is compatible with the test requirements, there will be no conflicts in the constraints. The constraints (numbered for convenience) that are coupled by connecting the resource with the UUT are: signal V1 DC_SIGNAL signal Vin DC_SIGNAL located at (HI=In_Pin, LO=Gnd_Pin) signal Vout DC_Signal located at (HI=Out_Pin, LO=Gnd_Pin) signal V2 DC_SIGNAL property Amp_Ok boolean 1. constrain abs(V1.voltage - 4V) < 0.5V 2. constrain abs(Vin.voltage - V1.voltage) < 2mV 3. constrain abs(V2.voltage - Vout.voltage) < 2mV 4. constrain property Offset Voltage property Tolerance Real signal Vmeas DC_SIGNAL located at (HI=Input_Pin, LO=Gnd_Pin) signal Vread DC_SIGNAL 5. constrain -10V <= Vmeas AND Vmeas <= 10V 6. constrain abs(Vmeas - Vread) < (Offset 7. constrain 0V <= Offset AND Offset <= 100uV 8. constrain 0 <= Tolerance AND Tolerance <= 2e-4 9. constrain abs(Vout.voltage - Vmeas.voltage) < ITA_Loss If the UUT is good, one can deduce from the model that the output voltage may range from approximately 7V to 8V (the output may actually range from 6.992502V to 9.008502V as derived from constraints 1, 2, and 4). This lies comfortably within the resource input range given by constraint 5. Note that the range of Vout was not constrained; therefore, one cannot be certain that Vmeas will lie within the 10V range. In the present example, one could probably clamp Vout to protect the resource input without affecting the validity of the test program. If the UUT is good, one can also deduce from the model that Vread is an adequate substitute for V2, provided the ITA_Loss is less than 100uV. The maximum error of the resource (given by Vread with respect to Vmeas) occurs at 9V and is 1.9mV, as specified by constraints 6, 7, and 8. The maximum error permitted on V2 (given by V2 with respect to Vout) is 2mV, as specified by constraint 3. The maximum error between Vout and Vmeas is ITA_Loss, as specified by constraint 9. Therefore, if ITA_Loss is no more than 100uV, Vread from the resource can be substituted for V2 in constraint 4. This example illustrates that analyzing the behavior specifications of the test requirements and the resource capabilities "verifies" that the resource satisfies the requirements and can be used in the test program (provided the ITA loss is kept low enough). Different values in any of the constraints could lead to a different conclusion. Triggers and Events One reasonable issue for the behavior model to address is the representation of events, including various triggers and timers. The behavior model quite readily represents these concepts but does not recognize them in any special way. A trigger defines a precise timing relationship between two actions. For example, a trigger can establish a relationship between the rising edge on a voltage signal and the start of an oscillator. This is shown in Figure 4. The behavior model captures the trigger as follows. Assume several sub-behaviors for oscillator_on, oscillator_off, DC_low, and DC_high have been defined. oscillator_trigger: behavior Osc_Off oscillator_off behavior Osc_On oscillator_on constrain Osc_Off.start == Oscillator_Trigger.start constrain Osc_On.start == Osc_Off.stop constrain Osc_On.stop == Oscillator_Trigger.stop behavior Trig_Down DC_low behavior Trig_Up DC_high constrain Trig_Down.start == Oscillator_Trigger.start Figure 5. Pairing Two Oscillators oscillator voltage delay Figure 4. Trigger Initiating Oscillator constrain Trig_Up.start == Trig_Down.stop constrain Trig_Up.stop > Trig_Up.start Trig_Delay constrain Osc_On.start == Trig_Up.start Trig_Delay There are four sub-behaviors of oscillator_trigger. Two govern the behavior of an oscillator and must occur sequentially (i.e., Osc_On starts as soon as Osc_Off stops). Together, these two sub-behaviors span the entire containing behavior. Two sub-behaviors govern the trigger signal itself. These two sub-behaviors are also sequential, but they need not run to the end of the containing behavior. In this example, once the oscillator is running, the trigger signal can change without affecting the oscillator. Finally, a constraint is imposed on the oscillator to turn on after some delay following the rising edge of the trigger signal. This delay is named Trig_Delay in the example and would normally be passed as a parameter to the behavior. Notice that oscillator_trigger describes a simple timing relationship, but there is no indication of how the relationship is to be implemented. It could be implemented through a trigger, through software, or as a side-effect of something else in the test program. The behavior model only describes the constraints and not how to satisfy the constraints. In the real world, equality constraints are difficult to realize. For example, oscillator_trigger requires that the time difference between Trig_Up.start and Osc_On.start be exactly Trig_Delay. The time difference would never be exactly Trig_Delay in a real test program, nor does it matter. Instead, the actual time difference (as measured in the execution trace) should be Trig_Delay, within some error. This is captured in the following constraint: constrain abs((Osc_On.start - Trig_Up.start) - Trig_Delay) < Trig_Error The new constraint says that the difference between the actual delay (Osc_On.start - Trig_Up.start) and the desired delay (Trig_Delay) must be less than some allowable error (Trig_Error). More complicated constraints can be used to capture asymmetric tolerances (i.e., tolerances not symmetrically distributed about the expected value). Returning to the example, it is evident the behavior model adequately describes the relationships implemented by events and triggers. It is also evident that the behavior model does not distinguish between timing relationships that are implemented in hardware (e.g., triggers) or software (e.g., software delay loops). The primary difference between hardware triggers and software timing is in the potential error in the triggering delay. A test programmer selects a voltage delay delay Figure 6. Implementing Two Paired Oscillators. hardware implementation to get a precise delay but is then concerned with issues of accessing, allocating, and controlling the hardware to obtain the desired delay. On the other hand, the test programmer selects a software implementation when precision is less important than ease of programming. A test program would not normally use a behavior such as oscillator_trigger. The trigger signal in the example is probably an implementation detail. A more likely scenario is a behavior in which two oscillators start within a fixed time of each other. This can be illustrated as in Figure 5 and might be implemented as in Figure 6. The behavior should properly describe the requirement that the oscillators begin at the same time and not the implementation detail of referencing both to a common rising edge. In this paper, we provide a description of the behavior information model proposed for the next generation test system architecture under development by the ARI. This model facilitates the specification of behaviors related to test subjects, test requirements, test strategies, test resources, and product diagnostics using a declarative approach. As such, the behavior model provides a formal approach to specifying behaviors, thereby facilitating the specification and development of reusable and transportable test programs. --R Abstract Interpretation of Declarative Languages "TRSL Standard Supports Current and Future Test Processes," "Achieving Simulation-Based Test Program Verification and Fault Simulation Capabilities for Mixed-Signal Systems" "Formal Methods-Mathematics, Theory, Recipes or What?" "Constraint Networks: A Survey," "Seven Myths of Formal Methods," "The IEEE ABBET Lower Layers Definition and Status," Introduction to Logic Programming "Development of Test Programs in a Virtual Test Environment" "Capturing Board-Level Test Requirements in Generic Formats," "Test Synthesis in the Behavioral Domain," Probabilistic Reasoning in Intelligent Systems Information Modeling: The EXPRESS Way "The Industrial Use of Formal Methods," --TR
automatic test systems;test programming;test requirements;behavior modeling
306890
Dynamic Reconfiguration to Support Concurrent Applications.
AbstractThis paper describes the development of a dynamically reconfigurable system that can support multiple applications running concurrently. A dynamically reconfigurable system allows hardware reconfiguration while part of the reconfigurable hardware is busy computing. An FPGA resource manager (RM) is developed to allocate and de-allocate FPGA resources and to preload FPGA configuration files. For each individual application, different tasks that require FPGA resources are represented as a flow graph which is made available to the RM so as to enable efficient resource management and preloading. The performance of using the RM to support several applications is summarized. The impact of supporting concurrency and preloading in reducing application execution time is demonstrated.
Introduction Adaptive Computing Systems (ACS) have been shown to outperform general-purpose systems for some applications because of their abilities in adapting hardware resources to the application requirements[1], [8], [9], [13], [16]. The technology has been demonstrated for a few special purpose applications which have been tediously hand- coded. These systems also have tremendous promise for accelerating more conventional applications such as domain specific visual development environments (Khoros, MATLAB, WiT) and web browsers (Netscape, Internet which dynamically invoke submodules or plug-ins for image and data processing. Programming a device to support all of the possible submodules an application may invoke is not usually feasible due to the large number of submodules and the finite amount of hardware re- sources. However, an ACS may support reconfiguration of some hardware resources while some other programmable hardware is busy computing. Such a system is referred to as a dynamically reconfigurable system. A dynamically re-configurable system can configure the hardware on demand to support the requirements of interactive programs such as MATLAB and web browsers. One way to implement a dynamically reconfigurable ACS is to incorporate a large number of SRAM-based Field Programmable Gate Array (FPGA) chips on a co-processing board which is used in conjunction with a traditional pro- cessor. However, in such a system there is a need to provide an operating system like interface for the programmable hardware to hide the architectural details of the coproces- sor, to manage reconfiguration of the hardware during application execution, and to fairly allocate FPGA resources The authors are with the Department of Computer Science and Engineering, Wright State University, Dayton, Ohio 45435, U.S.A. among multiple processes. Fig. 1. The dynamic reconfiguration system This paper describes the system software development of a dynamically reconfigurable system that can support multiple applications running concurrently. A block diagram illustrating such a system is shown in Fig. 1 where each application consists of a program to be executed on the host machine and a flow graph representing the portion of the application to be executed on the FPGA resources. The host program is responsible for starting the execution of graph nodes through the resource manager (RM). With the information of multiple flow graphs, one for each applica- tion, the RM allocates and de-allocates FPGA resources so that new nodes may be loaded into the system while other nodes are being executed. In addition, a speculative strategy is adopted by the RM in the "pre-loading" of FPGA configuration files to reduce and hide the reconfiguration overhead and to improve performance. The FPGA architecture is modular in the sense that the FPGA resources consist of a number of hardware units and each graph node uses an integer number of hardware units. Note that multiple copies of the same application can be executed at the same time. The system has the following technical advantages ffl Compared to static reconfiguration schemes, which do not reconfigure the hardware during the execution of an application, the system can accommodate more ap- plications, typically those that require more FPGA resources than what is available and their usage of FPGA resources can be satisfied once spread out over time. This is particularly true when the loading of some FPGA implementations is based on execution conditions. The system may also reduce the computation time for an individual application. Since all of the required FPGA resources need not be loaded at once, a larger portion of the application computation can be mapped to FPGAs. ffl Compared to other dynamic reconfiguration schemes that statically determine how to reuse the FPGA resources [1], [2], the system allocates FPGA resources at run time via a RM that relieves application developers from the management of FPGA resources. Due to use of the RM and its speculative loading policy, multiple applications may share the FPGA resources effectively, very much analogous to a virtual memory system. The RAGE project [3] is similar to our own, but emphasizes partial reconfiguration. It does not support pre-loading of configurations. Section 2 of this paper describes the development environment of the project. Section 3 shows the design and the implementation of the RM. Several applications are used for the testing of the RM. Those applications, the testing procedure, and the results are summarized in Section 4. Section 5 compares the system to similar software in an operating system. Section 6 concludes the paper. II. Development Environment A. Hardware Platform Fig. 2. G900 Architecture The reconfigurable computing platform used in this project is a 180 MHz Pentium-pro personal computer hosting a G900 FPGA board which is a PCI bus based board manufactured by Giga Operations Corporation (GigaOps). The board has a modular design, making it suitable for resource sharing among applications. This design consists of eight computing modules (XMODs) where each XMOD contains two XC4020E FPGA chips, 2 MB DRAM, and Fig. 2). Note that a maximum of sixteen XMODs can be configured in one G900 board. The XMODs are connected together by 128 wires, called the XBUS. Among those 128 wires, 21 of them are used to support a custom bus protocol, called HBUS, which defines the pins and timing of signals used for the host (or more specifically, the PPGA) to FPGA interface. The XBUS also contains six 16-bit busses that provide inter-XMOD connectivity. There are two special purpose onboard FPGAs that are not part of any XMOD. They are the PPGA and the CPGA. The PPGA (Xilinx XC4013E-2) controls communication between the host computer and the XMODS (Fig. 2), by acting as the PCI bus interface to the board. The CPGA (Xilinx XC5210-5) implements clock generation, runtime configuration and power up functions. While the FPGAs can run at clock rates up to 66Mhz, the G900 board and host interface is currently limited to 16Mhz. B. Design Environment The G900 board ships with a developer's kit which includes XLINK-OS, GOCOLIB, XLINKLIB and XL [11], [17]. ffl XLINK-OS permits the host program to execute hardware designs by using standard C function calls and to map variables that exist in the FPGAs into the host program's address space (memory mapped variables). The FPGAs can be reconfigured with the configuration the host program requires. ffl Two software libraries, GOCOLIB and XLINKLIB, are provided in the developer's kit. GOCOLIB provides low-level routines to interact with the module FPGAs, monitor CPUs and PPGA etc. XLINKLIB contains higher level routines for interacting with the board. Both XLINKLIB and GOCOLIB need to be linked into every XLINK-OS generated application. ffl The XL language allows the specification of FPGA operations and is loosely based on C syntax with many keywords the same as C. It provides control of the features available in Xilinx FPGAs. There are the standard C operators plus a clock operator (:) which is used in program sequencing. All XL statements between two clock operators are executed during the same clock cycle. Microsoft NT is used as the operating system. The design process begins with three source files which the user must create. 1. The source code for the FPGA design written in either XL or VHDL. 2. A file describing the host to FPGA interface. It declares memory mapped variables and the functions the host calls to execute FPGA designs. 3. The application program that resides and executes on the host computer. It must call functions to initialize, load and execute user FPGA designs in the XMODs. The first two files are input into the XL compiler to produce a Xilinx netlist file. That netlist is used by the Xilinx tools to automatically map the design into an FPGA .bit file that contains the FPGA configuration. In addition, a C header file is generated which can be included in the host program to control the executions of FPGA designs on the G900 board. A more detailed description of the development environment is given in [12]. III. Design and Implementation To provide the dynamic reconfiguration capability and to support concurrent applications, an XMOD RM and a set of library functions have been designed and implemented. The system is diagrammed in Fig. 3. With the XMOD as the basic resource unit, the RM allocates and de-allocates reconfigurable computing resources both on-demand and speculatively. A set of library functions is provided so that application developers can pass information from an application to the RM without worrying about the details of the inter-process communications or the details of G900 board control. In this section, the application scenario of the system is first described. A detailed design is then presented along with the implementation status. Some discussion of design issues follows. Fig. 3. Overview of Resource Manager A. Application Scenario In the following paragraphs we describe the scenario for applications executing with the RM. Both the application development scenario and the application execution scenario with the proposed system are given. Application Development An application is first analyzed or profiled so to determine the computations that can be assigned to FPGAs or XMODs. Those computations are mapped to XMODs by creating the design.lnk file and going through the development process described in the previous section to generate a design.bit file that can be downloaded into the XMODs. Remaining parts of the application are assigned to the host program, which also provides data and controls the execution of computations on the XMOD. The computations mapped to XMODs are represented as a flow graph which is passed to the RM when the application starts executing. An application flow graph is a weighted graph where each node represents XMOD computation and the weighted edges represent the control flow of the host program. The computational granularity of graph nodes may differ greatly and each node requires either a fixed number of XMODs or a range of numbers of XMODs. For exam- ple, a node can be either for a simple integer addition that requires one XMOD or for a complicated 2-dimensional discrete cosine transform that can use from one to eight XMODs depending on the desired performance. An example edge weighting is shown in Fig. 4. After the execution of graph node A, the next candidate node can be either node B, C, or D, depending on a condition evaluated in the host program. Three weighted edges go out of node A and the weight of each edge represents the estimated probability of the destination node being executed given that node A is being executed. The edge weights are used by the RM to pre-load FPGA configuration files. Higher weights lead to a higher chance of pre-loading and zero weight indicates no need for pre-loading. The edge weights are assumed to be constants during the application execution in this paper even though the removing of this assumption may potentially lead to better performance. Fig. 4. A flow chart example The fundamental assumption of the flow graph is that the computational granularity of graph nodes may differ greatly and may only require a portion of the available FPGA resources. It is therefore not efficient to execute a graph node on an FPGA system one at a time. Instead multiple nodes, not necessarily from the same application, should be executed concurrently and new nodes may be loaded into the system while other nodes are being executed Application Execution During the execution of an application, the RM runs as a background process on the host machine. Each application provides a flow graph and the corresponding FPGA configuration files to the RM. The RM loads or pre-loads FPGA implementations during the host program execu- tion. The pre-loading implements a speculative strategy that overlaps XMOD reconfiguration with computation on other XMODs such that the reconfiguration latency is reduced or completely hidden. Because the edges in a flow graph are used only for the pre-loading of FPGA configuration files, an edge missing in a flow graph does not influence the correctness of the computation. It does, however, influence the execution performance. It is assumed that applications are developed in a way that executing one graph node at a time is sufficient, though not necessary, to guarantee the completion of individual applications. With such applications, the system will be able to prevent deadlock. A set of library functions has been developed to simplify the application development. The library functions support the passing of a flow graph, the demand loading request, the node release request, the board release request, and some XMOD I/O capabilities. When a library function is called from within an application, some information is passed to or retrieved from the RM through inter-process socket communication. Initially, the application provides the flow graph, along with the complete pathnames of FPGA configuration files used for each node, to the RM. The RM speculatively loads these configuration files, if free XMODs are available; to reduce and hide the overhead associated with reconfiguration of FPGAs during run-time. When the application needs to do the computation mapped to FPGAs, it requests the RM to load the required bit file in an XMOD. It then waits till the RM responds with the number of the XMOD that has been assigned to the application. If the bit file has been speculatively preloaded then the application does not have to wait for loading of the configuration file and gets the XMOD number of the assigned XMOD immediately. However, if the node has not been pre-loaded or there are available then the application waits until an XMOD becomes available and is loaded as requested. After an XMOD is allocated and loaded, the application packs the input data for computation into an array and sends them to the G900 board. Once the input data has been written to the XMOD, the application initiates computation. On completion of the computation, the function mapped to the FPGA should be designed to interrupt the RM, which in turn will inform the application. Results are retrieved by the application. If the computation is complete for the node represented in the flow graph, the XMOD is released; otherwise the input, execute and result steps are repeated. When the application is done with all the computations that have been mapped to FPGAs then it informs the RM, which will no longer speculate any nodes from the application's flow graph and will release any XMODs pre-loaded for the application. B. Resource Manager Design The RM is implemented as a multi-threaded applica- tion. An overview of the design is shown in Fig. 3. The main thread of RM is the first thread to be created and is the parent thread for the other threads. It first initializes the G900 board, then spawns the loader, interrupt handler and scheduler threads. It also sets up a server socket for incoming connection requests from applications and waits for requests. A new application service thread is created for each requesting application, which then interacts with the application on behalf of the RM. The main thread loops back to listen for new requests. Communication among the different threads of the RM is accomplished through events, mutexes, shared variables and shared memory. The application service thread establishes a stream socket connection with the its client application and services 4its requests. It receives the application flow graph and puts it into the shared memory and notifies the sched- uler. Depending on the type of request sent from the appli- cation, the application service thread responds in different ways. There are six types of requests that can be sent from the application. ffl Load Graph Node: Request the allocation of XMODs for a flow graph node and load FPGA configuration files to one or more XMODs. If the XMODs have been assigned and pre-loaded with the configuration files for that node then the XMOD numbers are returned to the application immediately. If, however, no XMODs have been assigned then the application service thread places a demand request for the XMODs with the scheduler. When the XMODs get assigned and loaded with the required files, it returns the XMOD numbers to the application. ffl Input Data: On receiving the input data array, the application service thread writes the value of each memory mapped input variable at its specified offset within the XMOD. ffl Result Data: The application thread retrieves the result data from the memory mapped variables on the XMODs and returns this data to the host program. ffl Execute Function: The application service thread starts execution of a specific function on the XMODs. and waits till the interrupt handler indicates the occurrence of an interrupt on one or more of the assigned XMODs. It acknowledges the interrupt(s) and then informs the client application. The interrupt(s) may indicate completion of computation or some intermediate stage. The service thread waits for the next request from the application which might be reinitiation of computation or collection of result data. ffl Release XMOD: The service thread de-allocates all of the XMODs associated with a specific flow graph node. ffl Release Flow Graph: The service thread will discard the application's flow graph, inform the scheduler that the application flow graph is no longer valid, and then terminate. When an application executes an FPGA function, it normally blocks until the function is completed. The completion of an FPGA function sends an interrupt from an XMOD to the interrupt handler thread of the RM. The thread checks which XMODs have generated an interrupt, since more than one XMOD could be interrupting at a time. It then informs the corresponding application service thread about the interrupt. Once all the interrupts have been acknowledged by their respective application service threads, the interrupt handler enables further interrupts and loops back to wait till another interrupt occurs. For each graph node, an application developer needs to either implement an interrupt request circuit in FPGAs or let the host program wait for a pre-specified amount of time for the function to complete. The latter approach works only if the function completion time can be known in advance or can be determined in a well formulated way. The scheduler thread which allocates XMODs either on-demand or speculatively normally sits idle until being "trig- gered" by three different types of events from an application service thread: (1) a request for demand loading, (2) the de-allocation of XMODs due to the release of a graph node, and (3) the receiving of a new flow graph. Depending on the type of event, its scheduling parameters and availability of resources, the scheduler either assigns an XMOD to the loader thread for loading or loops back to wait for another event to occur. The scheduling policy accepts three parameters that can be specified as arguments to the RM while invoking it. These parameters determine how aggressively the scheduler speculatively pre-loads graph nodes. They are defined as follows. ffl MAX SPECULATE: Maximum number of immediate successor nodes from currently executing node in the flow graph that can be speculatively loaded ffl THRESHOLD: Minimum edge weight probability for speculative preloading of the successor node ffl FREE XMODS: Minimum number of XMODs that should not be preloaded and should be kept aside for demand loading requests The scheduling policy has three sections based on the events that can trigger the scheduler. Each of these sections is separately explained below: I. Demand Loading: ffl If the node requested for demand loading has been preloaded or is being preloaded then the number of the assigned XMOD is returned to the requesting application service thread. ffl If the requested node has not been or is not currently being preloaded then a free XMOD is searched for and assigned to it for loading. If no free XMOD is available then any XMOD assigned to the application service thread for some other node is searched for and assigned to it. If no XMOD has been assigned to the application service thread then an XMOD that has been preloaded or is being speculatively loaded is pre-empted and assigned. ffl If all XMODs are executing, then the demand request is queued up in a demand queue and the requesting application service thread is suspended. It is woken up when its demand request is serviced and an XMOD is assigned. ffl Once an XMOD has been assigned to the requesting application service thread, its bit file is scheduled for loading and the XMOD number is given to the application service thread which waits till the loading is completed before passing the XMOD number to the client application. ffl Irrespective of the type of event triggering the sched- uler, if there are any demand loading requests pending in the demand queue then they are given highest pri- ority. New demand requests get queued at the end of the demand queue. Preloading for new or existing applications is done only if free XMODs are available after all the demand requests have been serviced. II. Arrival of New Application Flow ffl While the number of free XMODs is higher than FREE XMODS, if a new application flow graph ar- rives, node 0 of the flow graph is preloaded on a free XMOD. All new flow graphs are serviced before speculating existing application flow graphs. ffl The threshold weight probability for preloading is not considered while preloading node 0 for a new graph under the assumption that the application will always start execution of the flow graph from node 0. III. Releasing of An XMOD: ffl While the number of free XMODs is higher than FREE XMODS, one immediate successor node of the currently executing node in a flow graph is speculated till the MAX SPECULATE limit is reached for the currently executing node in a flow graph. If this limit has been reached, the flow graph is skipped. ffl For a node to be speculatively loaded its edge weight probability, which is calculated as a fraction of combined edge weights of all out going edges from the current node, should be higher than THRESHOLD. ffl If the node to be speculated is detected to have been executed before on a XMOD, in case of loops, then it is checked if the configuration file is still loaded on the XMOD. If yes, it is simply marked as preloaded; otherwise the node is loaded on a free XMOD, if its edge weight probability is higher than THRESHOLD. ffl The speculation of flow graphs is done in a circular fashion and continues while the scheduler has not come back to the same application flow graph that it started with, in the present scheduling cycle. Scheduling begins from the flow graph following the last flow graph scheduled in the previous cycle. Fig. 5. XMOD state diagram In order to efficiently allocate XMOD resources under the speculative loading environment, the RM maintains the state of each XMOD as shown in Fig. 5. If an XMOD is pre-loaded but not in use yet, it may be de-allocated when there is another request that cannot be satisfied. If an XMOD is loaded on-demand, it cannot be de-allocated until it is released. Since loading of a configuration bit file is slow and needs to be done serially on the G900 board, actual loading of bit files is done by the loader thread. This allows the scheduler to provide faster response to demand requests and other scheduling events. The scheduler queues bit files to be loaded in two queues maintained in the shared memory, demand queue and speculation queue. The loader thread serially loads the bit files queued by the scheduler on their assigned XMODs. Bit files in the demand queue are given priority over bit files in the speculation queue. On completion of loading, the application service thread that is waiting for an XMOD is signaled. C. More Design Issues The current design and implementation of the RM supports multiple concurrent applications with pre-loading. Several design issues complicate the RM and some have not yet been addressed. These issues are described as follows 1. Direct XMOD Data Access The standard mechanism for an application to load data to XMODs or to unload data from XMODs is to use a library function that requires the copying of data between the application and the RM. For applications with frequent data access or large quantities of Data, a more efficient implementation that allows individual applications to access those XMODs directly without going through the RM is available. 2. Inter-graph-node Constraints Some resources on the G900 board other than the XMODs may be shared by different flow graph nodes. For example the X bus can be used for inter-XMOD commu- nication. If a graph node uses multiple XMODs and some wires from the X bus, such resource requirements should be specified and provided to the RM. Currently none of the test applications in this paper use the X bus for inter- XMOD communication and the current RM does not examine such constraints. 3. Optimal Resource Allocation For an application flow graph node there is a trade-off between the resulting performance and the number of XMODs used. It is expected for most graph nodes that more XMODs do not lead to linear speedup. Therefore when a range of XMOD numbers is specified for a node, the corresponding performance figure for each number of XMODs can be specified so that the RM may use the information to optimally allocate resources at run time. IV. Performance Results Two main applications were used to test the system op- eration. They are an MPEG-2 encoder program, and an application based on an NP-complete satisfiability problem in which we synthesized a flow graph with four nodes, each node exhaustively solving the satisfiability problem for a different logic formula. The two applications are briefly described below. 1. MPEG-2 Encoder MPEG-2 is a standard for digital video and audio com- pression. The MPEG2 encoder that is available from MPEG Software Simulation Group in source code format was profiled with the Visual C++ Profiler [4]. Two time-consuming functions are the full search( ) and the dist1( ) functions that handle the motion estimation of the MPEG- encoding algorithm. The part of those two functions that handles forward matching and backward matching have been mapped to XMODs and implemented. The resulting flow graph for the application has only one graph node. That flow graph node can use one to eight XMODs and all the XMODs use exactly the same FPGA design. A more detailed description of the design can be found in [5]. The design was first tested without using the RM (i.e., with static reconfiguration) and the results show that, even though more XMODs do improve the performance, the last few XMODs do not have as much benefits as the first few XMODs. Although not supported yet, the performance figures in the future can be provided to the resource manager to improve resource utilization and overall performance. 2. Satisfiability The satisfiability problem is the problem of deciding if a formula in conjunctive normal form is satisfied by some truth assignment [15]. For example, the following 4-variable formula is in conjunctive normal form and it can be satisfied when x1=true, x2=false, and x3=false. The formula contains three clauses that are ANDed together. Historically the satisfiability problem was the first decision problem shown to be NP-complete. The satisfiability problem is convenient for testing the RM as different formulae can be tested using the same FPGA design by simply initializing the design with different values. This allows control over the amount of FPGA computation time. A simple FPGA design to exhaustively solve the problem is shown in Fig. 6. Note that the FPGA design was not intended as an accelerator even though the design was faster than the Pentium host. FPGA designs that are meant to accelerate the satisfiability problem can be found in [18] and [14]. Fig. 6. Satisfiability FPGA design The FPGA design in Fig. 6 implements a deterministic solution to the satisfiability problem by checking every truth assignment. It works as follows. A formula in conjunctive normal form that contains at most (n+1) clauses is represented as two matrices of binary values where each clause is represented as two binary vectors, A1[ ] and A2[ Each A1[ ] bit indicates if a variable is in a clause and each A2[ ] bit indicates if a variable is negated or not. Those two matrices are initialized by the host program. Each truth assignment is represented as a binary vector, h, stored in an up counter which starts from zero. For each truth assignment, the formula is evaluated by going through the clauses one by one. The host is interrupted when either the formula is satisfied or all the truth assignments have been exhausted. When the formula is satisfied, the host can read the truth assignment, i.e., the h value, that satisfies the formula. This h value is important in the verification of the system operation. The FPGA design fits in one FPGA chip and therefore one single XMOD. Based on the FPGA design, an application was artificially synthesized. The application, called the multiple- satisfiability, contains four graph nodes in its flow graph where each graph node is for the satisfiability evaluation of a formula. Four formula were pseudo-randomly produced and used in the application. Because those formula are fixed and the specific conditions used in the host program to determine the control flow, it is known which nodes get evaluated and in what order, if the computation is correct. The setup was purposely made to test the speculative loading performance. Note that we pretend that all four graph nodes use different FPGA configuration files to better represent real applications even though in reality the same file is used. Because of this assumption, the execution of a new graph node requires the re-loading of the configuration file. A. Simulation Results The satisfiability problem with different numbers of nodes and different node granularity and the MPEG encoder were used for examining system performance. All readings were taken as an average of three independent runs. At first, timing for system operations such as G900 board initialization and bit file loading was done to quantify the overheads of using our development system. It was found that the board initialization takes about 2.34 seconds while the loading of a configuration file takes about seconds. Each test application was first run without using the RM and then using the RM to find out the overheads of using the RM. When an application does not use the RM it needs to initialize the G900 board and map it into its address space. As a result applications cannot run concurrently without using the RM. When the RM is used the board is initialized only once when it starts. Thus board initialization time was not counted when the test applications were run using the RM. Note that when the application is not using RM it does not have a flow graph but generates interrupts to indicate end of FPGA computation. roblem with High Granularity Nodes An application with four nodes, each a satisfiability problem having FPGA computation times in the range of 1.9 sec to 4 sec was developed. These node granularities were much higher than the FPGA configuration time of 0.35 sec. One, four, eight and twelve copies of the application were run sequentially without the RM and both sequentially and concurrently with RM using no speculative pre- loading. The results obtained are summarized in Fig. 7. Fig. 7. High granularity satisfiability execution times For a single application, it took 14.1 sec to complete without using the RM and 13.5 sec when run through the Resource Manager. Ideally, since the board initialization time was not counted in the second case it should have been 2.34 sec less but due to the overheads of packing/unpacking of data and communicating with Resource Manager it was only 0.6 sec less. Thus the overhead time of using RM was 1.74 sec for this application. When the application was run four times sequentially without Resource Manager it took 56.06 sec to complete versus 54.27 sec with Resource Manager. But when four copies of the application were used concurrently using the RM it took just 14.87 sec to complete, speeding up the execution by a factor of 3.8 against sequential execution without RM. Since loading of bit files needs to be done sequentially even when the applications are running concurrently, of the 14.87 sec total execution time approximately 5.6 sec (= 4 \Theta 4 \Theta 0:35) was spent loading the FPGAs. However, an FPGA on an XMOD in the G900 board can be loaded while FPGAs on other XMODs are executing. Thus the PCI bus is shared between FPGA loading and data load- ing/unloading for other FPGAs, which results in longer FPGA configuration time depending on the dynamic condition of the board. The overlap in loading and execution of FPGAs and concurrent execution on different FPGAs results in the reduced total time. When eight copies of the application were run on the G900 board concurrently through the RM it took 18.17 sec to complete as compared to 111.26 sec for sequential execution without the RM and 108.87 sec with the RM. Since one FPGA on all the eight XMODs on the G900 board are used in parallel a speedup by a factor of 6.1 is achieved over sequential execution without RM, which uses only one FPGA on an XMOD at a time. With twelve copies of the application running concurrently using RM, a speedup by a factor of 8.2 is obtained. Since the number of applications is more than the number of FPGA resources, some applications need to wait till FPGAs become free in the demand queue, before obtaining FPGA resources for computation. roblem with Low Granularity Nodes The satisfiability problem used in test1 was initialized with different formulae to get four nodes with computation times between 8 msec and 26 msec. This was much lower than 350 msec required for loading an FPGA on G900 board with its bit file. It means that much of the application execution time would be spent loading the FPGAs rather than performing computation on FPGAs. The timings for one, four, eight and twelve copies of the application were obtained as in test one. The results are shown in Fig. 8. Fig. 8. Low granularity satisfiability execution times The speedup obtained by running four copies of the application concurrently through the RM is just 2.1, with 8 copies it is 2.31 and with 12 copies it is 2.6. The low speedup factor is because there was less parallelism in the application execution on FPGAs since most of the time was spent in sequentially loading the FPGA configurations. Thus the overhead of communicating with the G900 board through PCI bus and some hardware constraints on the G900, which results in high FPGA configuration time, dictate the minimum node granularity for hiding latency and obtaining impressive speedup for applications running concurrently A test similar to tests 1 and 2 was done with two MPEG encoders. Each MPEG encoder processes 27 frames of images and uses a single XMOD. The motion estimation part of the MPEG encoding is performed on the XMOD. It requires more frequent and larger amounts of data transfer than the satisfiability problem. For each image frame that is used as a reference frame, the whole image frame is sent at once from the host to the XMOD. For the other frames, an image block of 16 \Theta 16 pixels is sent only after the previous block has been processed by the XMOD. Fig. 9. MPEG encoder timings The timings obtained by running the encoders sequentially and concurrently are shown in Fig. 9. When a single encoder was run without using the RM it took 45.35 sec to process the 27 frames whereas through the RM it took 44.85 sec due to the saving of board initialization time. When two encoders were run in parallel using the RM they ran 1.4 times faster than two encoders executing serially without the RM, which required 91.29 sec to complete the processing. The speed up is not very high due to the large amount of data transfer taking place between the FPGA board and host, but the concurrent use of MPEG encoders is very useful for image processing applications. with Speculative P reloading To verify the effect of speculative pre-loading of FPGAs, based on the flow graphs given to the RM by the appli- cations, four copies of the satisfiability problem used in test 1 running concurrently were re-evaluated. The effect of varying the different scheduling parameters on the total execution time of the applications was also obtained. Since there are eight XMODs on G900 board and preloading is done on free XMODs, the number of applications used for testing was limited to four. Fig. 10. Flow graph for satisfiability with high granularity nodes The flow graph used for the satisfiability problem in this test is shown in Fig. 10. The edge weights are arranged such that node 1 will be preloaded after node 0 then node 2 and then node 3. This is the actual execution sequence of the application. The application execution times were obtained as a function of the scheduling parameters MAX SPECULATE and FREE XMODS while THRESHOLD was held constant and as a function of THRESHOLD and MAX SPECULATE, while FREE XMODS was kept constant at zero. Results with THRESHOLD constant The execution times obtained as a function of FREE XMODS and MAX SPECULATE are shown in Fig. 11. THRESHOLD was held constant at 0.3 for these re- sults, which meant that all the nodes in the flow graph shown in Fig. 10, could get preloaded. It can be concluded from Fig. 11, that the speculative preloading of FPGA configurations does help hide the configuration overhead which results in lower overall execution time. The lowest execution time is obtained when the number of speculated nodes is highest. However, as the number of free XMODs for demand loading increases the overall execution time increases due to reduced number of speculated nodes. Fig. 11. Execution times for four satisfiability problems w.r.t. Results with FREE XMODS constant For the results in Fig. 12, FREE XMODS was held constant at zero so that no XMOD was kept aside for demand loading requests. A THRESHOLD value of 0.5 meant that only nodes 1 and 2 could be preloaded. With THRESHOLD equal to 0.6 only node 1 could be preloaded with node 2 and node 3 being demand loaded. From the different values of execution time in Fig. 12, it is again confirmed that with reduced number of speculated nodes the overall execution time increases. Fig. 12. Execution times for four satisfiability problems w.r.t. THRESHOLD Fig. 13. Timing diagram for four high granularity satisfiability problems (MAX Fig. 13 shows the timing distribution for a single run of four copies of High Granularity Satisfiability problems running concurrently. In the figure, the loading of bit files and execution of the nodes of the four applications are overlapped as expected which results in the reduced execution time. In summary, for the four High Granularity satisfiability application, aggressive preloading was advantageous. The best performance was obtained when THRESHOLD was 0.3, MAX SPECULATE was equal to 2, FREE XMODS was 0 and was 17% faster than without any speculative loading of nodes. roblem with optimized F low Graph To study the effect of a flow graph being provided by the application that did not accurately represent the execution flow, the flow graph shown in Fig. 10 was modified to the flow graph shown in Fig. 14. According to the edge weights, node 2 gets preloaded after node 0 and then node 1 gets preloaded depending upon THRESHOLD and MAX SPECULATE values. From node 1, node 3 gets preloaded before node 2 and even though execution is complete after node 3 is executed, the flow graph indicates that node 1 or node 0 may be executed after node 3. Fig. 14. Incorrect flow graph for satisfiability Fig. 15. Timing diagram for four high granularity satisfiability problems (MAX This incorrect representation of the application execution in its flow graph, which could also be due to some condition evaluation differing from the usual case, results in higher number of preemption of nodes and thus increases the overall execution time. The timing values obtained as a function of MAX SPECULATE are shown in Fig. 15. The THRESHOLD value was kept constant at 0.3, which meant that all successors from each node could get preloaded if there were free XMODs. FREE XMODS was zero, thus allowing as much preloading as possible. As can be seen in Fig. 15, the gains obtained by speculative loading are reduced considerably when the flow graph representation is inaccurate. However, the execution time is still lower than without any speculation for this test ap- plication. It is the responsibility of the application developer to provide as accurate a flow graph as possible unless the dynamic conditions of the program can not be predicted accurately. In which case, a lower speedup factor by using the RM should be acceptable. V. Comparison to Other Types of Resource Management The way that FPGA resources are managed in this paper in some regard is similar to what is in a virtual memory system that uses pre-paging with the following two major differences. ffl First, while pre-paging can only be used for processes that were previously swapped out (and not applicable to new processes), the pre-loading of FPGA configurations can be applied to new processes because of the availability of the application flow graphs. Given the relatively coarse granularity of graph nodes, providing an application flow graph is arguably very feasible for an application developer, especially since the FPGA design process is typically lengthy and tedious. ffl Second, while a paged virtual memory system is truly modular in that all the pages are treated the same, the FPGA resources may not be really modular. For example, the X bus on G900 can be used to simultaneously support several groups of inter-XMOD communication as long as the usage of X bus pins is disjoint among different groups. The result is that the execution of one application graph node on XMODs may prevent the execution of another graph node. The requirement of such shared resources by each application graph node should be indicated in the flow graph and sent to the resource manager. Note that this is not supported by the current resource manager. As another example, the FPGA chips on a board may have different I/O capabilities. Since the FPGA resources are mainly used for computing instead of data storage, the RM is in a sense similar to the processor scheduler in a multi-processing operating system. However, because of the assumption of data dependency and conditionals in an application flow graph, deterministic scheduling techniques as summarized in [6] cannot be applied to the RM. Instead techniques such as the one in [7] that is based on the availability of run-time profile at compile-time are more applicable. Such techniques can be used to help produce application flow graphs which were always manually generated in this paper. VI. Conclusions A dynamic reconfiguration system that can support concurrent applications has been designed, implemented, and tested on a PC with a G900 FPGA board. Compared to static reconfiguration schemes, the proposed system can accommodate more applications and potentially reduce computation 9times for individual applications. Compared to other dynamic reconfiguration schemes, the proposed system allocates FPGA resources at run time via a resource manager (RM) that relieves application developers from the management of FPGA resources. The RM can pre-load FPGA configurations by utilizing its knowledge of application flow graphs. Simulation results show that, even though there is overhead associated with using the resource man- ager, the concurrency supported by the system can drastically speedup application execution. As programs such as MATLAB use libraries of functions to improve programmer productivity, one advantage of the proposed dynamic reconfiguration system is that it can support a library of FPGA functions, say, one for a 2-D convolution, one for a histogram equalization, and so on. With the system there is no need to squeeze all of the FPGA functions used by a program into the hardware resources at the same time. Such an environment would allow programmers to enjoy the performance benefits of the adaptive computing technology without worrying about the FPGA design details and would accelerate the adoption of the technology. Future research is necessary to port the RM to other FPGA boards that may not be as modular as the G900 board. In that case, handling the asymmetry in hardware resource units is a very challenging problem. Another issue in dynamic reconfiguration is to design a similar RM for systems that support partial reconfiguration. The "virtual hardware manager" as developed in the RAGE project [3] can probably be integrated with the resource manager in this paper so that not only concurrent applications are supported but also the FPGA function density are improved with partial reconfiguration. In [10], several models of DPGA program execution are presented. One of them is "on demand usage" which is similar to the proposed system. The paper did not pursue the model but it claimed "Although it may seem a rather futuristic scenario, there are good reasons for believing that in the fields of multimedia, communications, databases and cryptography at least, the characteristics of the applications themselves are likely to demand this sort of highly flexible execution environment." Acknowledgments This research is supported by DARPA under Air Force contract number F33615-97-1-1148, an Ohio State investment fund, and an Ohio State research challenge grant. Xilinx Inc. donated an FPGA design tool and FPGA chips on XMODs. --R "Run-Time Reconfiguration: A Method for Enhancing the Functional Density of SRAM-based FPGAs," "Designing A Partially Re-configured System," "A Dynamic Reconfiguration Run-Time System," MPEG Software Simulation Group at: http://www. "Accelerating MPEG-2 Encoder Utilizing Reconfigurable Computing" "Deterministic Processor Scheduling," "Compile-Time Scheduling of Dynamic Constructs in Dataflow Program Graphs," "Real-Time Signal Preprocessor Trade-off Study," "Using MORRPH in an Industrial Machine Vision System," "Reconfigurable Processors," "A Resource Manager for Configurable Computing Systems" "Configurable Computing Solutions for Automatic Target Recognition," "Dynamic Circuit Generation for Solving Specific Problem Instances of Boolean Satisfiability," "Languages and Machines" "Sequencing Run-Time Re-configured Hardware with Software," "Accelerating Boolean Satisfiability with Configurable Hardware," --TR --CTR Klaus Danne, Distributed arithmetic FPGA design with online scalable size and performance, Proceedings of the 17th symposium on Integrated circuits and system design, September 07-11, 2004, Pernambuco, Brazil Ahmed A. El Farag , Hatem M. El-Boghdadi , Samir I. Shaheen, Improving utilization of reconfigurable resources using two-dimensional compaction, The Journal of Supercomputing, v.42 n.2, p.235-250, November 2007 Jack Jean , Xuejun Liang , Brian Drozd , Karen Tomko , Yan Wang, Automatic Target Recognition with Dynamic Reconfiguration, Journal of VLSI Signal Processing Systems, v.25 n.1, p.39-53, May 2000 Christoph Steiger , Herbert Walder , Marco Platzner, Operating Systems for Reconfigurable Embedded Platforms: Online Scheduling of Real-Time Tasks, IEEE Transactions on Computers, v.53 n.11, p.1393-1407, November 2004 Klaus Danne , Marco Platzner, An EDF schedulability test for periodic tasks on reconfigurable hardware devices, ACM SIGPLAN Notices, v.41 n.7, July 2006 David Kearney , Mark Jasiunas, Using simulated partial dynamic run-time reconfiguration to share embedded FPGA compute and power resources across a swarm of unpiloted airborne vehicles, EURASIP Journal on Embedded Systems, v.2007 n.1, p.8-8, January 2007 Katherine Compton , Scott Hauck, Reconfigurable computing: a survey of systems and software, ACM Computing Surveys (CSUR), v.34 n.2, p.171-210, June 2002
reconfiguration;field programmable gate array FPGA;scheduling;resource management;configurable computing
307960
Constructive Quasi-Ramsey Numbers and Tournament Ranking.
A constructive lower bound on the quasi-Ramsey numbers and the tournament ranking function was obtained in [S. Poljak, V. Rdl, and J. Spencer, SIAM J. Discrete Math., (1) 1988, pp. 372--376]. We consider the weighted versions of both problems. Our method yields a polynomial time heuristic with guaranteed lower bound for the linear ordering problem.
Introduction . The quasi-Ramsey number g(n) is defined as the maximum discrepancy between the number of edges and nonedges that appears on some induced subgraph of any graph of order n, i.e., f a function from [n] 2 into {-1, 1} and It is well known (Erdos and Spencer [4]) that for some positive, absolute constants The tournament ranking function h(n) is defined as the maximum size of an acyclic (undirected) subgraph that appears in any tournament of order n. More precisely, let T n be a tournament on n vertices, P n a transitive tournament on n vertices, and let | denote the number of common oriented arcs of T n and P n ; then It was shown by Spencer ([14], [15]) that2 are positive absolute constants. The proof of the upper bound has been simplified by Fernandez de La Vega [5]. Using the method of Spencer, the lower bound on h(n) can be obtained by an algorithmic argument from the lower bound on g(n). Poljak, Rodl, and Spencer [12] proposed a fast O(n 3 log n) time algorithm that finds a set S with discrepancy at least # -1/2n 3/2 , the corresponding result for the tournament ranking function h(n) is also presented in [12]. We will consider the # Received by the editors March 12, 1997; accepted for publication (in revised form) March 5, 1998; published electronically January 29, 1999. http://www.siam.org/journals/sidma/12-1/31830.html Department of Mathematics and Computer Science, Emory University, Atlanta, GA 30322 (aczygri@mathcs.emory.edu, rodl@mathcs.emory.edu). CONSTRUCTIVE TOURNAMENT RANKING weighted version of both problems. Our algorithm uses the Erdos-Selfridge method of conditional expectations that was also applied in [12]. For the lower bound on the quasi-Ramsey number g(n) we prove the following result. Theorem 1. # R be a weight function on the edges of a complete graph K n . Then there is a subset S # [n] such that |f(e)|. Moreover, S can be found in O(n 3 lg (nd) lg n) time, provided the weights are integers from {-d, . , d}. The weighted version of the tournament ranking problem is also known as the linear ordering problem (see Grotschel, Junger, and Reinelt [10]). The problem can be formulated in the following way: For a given tournament T with weight c(i, the arc (i, find the ordering # of vertices for which the sum c(i, is a maximum. The list of applications of the linear ordering problem can be found in Lenstra [11]. It includes applications from di#erent areas of econometrics (input- output matrix analysis), sociology (social choice), psychology, machine scheduling, and even archaeology. The problem is NP-complete (see Garey and Johnson [8]), but there were several methods developed for solving small instances, e.g., up to order of 50 by Grotschel, Junger, and Reinelt [10]. Using the algorithm from Theorem 1, we will get a polynomial time heuristic with a guaranteed lower bound. Theorem 2. Let T be a tournament on n vertices with nonnegative weights w(e) on edges. Then there is an ordering # such that the sum of weights on edges that agree with the ordering is at least where K is the total sum of weights. The ordering # can be constructed by a O(n 3 lg (nd) lg n) time algorithm, provided weights are integers from {0, . , d}. From the upper bound on h(n), we conclude that there exists weight function for which the heuristic is best possible (up to a constant factor). Given a real number #, 0 < # < 1 a polynomial time approximation scheme (PTAS) for an optimization problem is an algorithm which when given an instance of size n, finds in polynomial time (in n) a solution of value at least (1 - #)OPT , where OPT is the optimal value. Using the regularity lemma and its constructive version of Alon et al. [1], we design a PTAS for the "dense" quasi-Ramsey problem and for tournament ranking. For the quasi-Ramsey number we have the following theorem. Theorem 3. Let c > 0 be fixed. If OPT (f) # cn 2 , then for every #, 0 < # < 1, there is a O(n 2.4 that constructs set S such that 50 A. CZYGRINOW, S. POLJAK, AND V. R ODL For the tournament ranking we prove the following theorem for the case when tournament T n . Theorem 4. For 0 < # < 1 there is a polynomial time algorithm that constructs an ordering # of vertices of T n so that at least (1 - #)OPT (T n ) of arcs agree with #. Note that Theorem 3 and Theorem 4 are in some sense counterparts to Theorem 1 and Theorem 2. For example, Theorem 1 provides the existence of a polynomial time algorithm to find the set S with |f(S)| being the guaranteed minimum; Theorem 3 gives for every # the const(#)n 2.4 algorithm that finds a set S with f(S) being a multiple of the optimal. Theorem 3 is based on the algorithmic version of the regularity lemma which "approximates the graph with error of #n 2 ". Therefore, it can be applied only to instances with OPT (f) # cn 2 . On the other hand, in case of Theorem 4, clearly OPT (T n therefore, a PTAS for the linear ordering problem can be obtained with no additional assumptions. Independently, very recently Frieze and Kannan [6] and [7] applied a version of the regularity lemma to the maximum subgraph problem, an equivalent to tournament ranking. Our arguments di#er from those in [7]. The rest of the paper is organized as follows: In section 2, for a given -# v 1 , . , -# v n # R k , we will show how to construct sign vector -# such that |. The algorithm is later applied to quasi-Ramsey numbers and to the linear ordering problem. Section 3 includes the applications of the regularity lemma. We conclude with an open problem in section 4. 2. Constructing sign vectors. Set -# for -# u and -# v from R k , let # v , -# u # denote the dot product of -# v and -# u , and # u # its l 1 - norm, i.e., # u We first establish two auxiliary facts. Lemma 5. # . The proof can be found in [12]. For independent random variables with distribution P r(X and a be real numbers and let u be the arithmetic mean of |b 1 |, . , |b n |. Then we have the following inequality: E(|a Proof. We may assume that all b i 's are nonnegative since the random variables have the same distribution as X i , i.e., E(|a E(|a Given a vector -# w (l) be the vector obtained from -# w by cyclic shifting, with ith coordinate w (l) We have a a CONSTRUCTIVE TOURNAMENT RANKING 51 a Lemma 7. Let -# v 1 , . , -# v n # R k . Then Proof. From Lemma 5 and Stirling's formula, we obtain Let u j be the arithmetic mean of absolute values of the jth components of -# v 1 , . , -# v n , Corollary 8. For given -# v 1 , . , -# v n # R k , there is a choice of signs (X 1 , . , {-1, 1} n such that Next we will show that a vector -# Corollary 8 can be constructed by a polynomial time algorithm. The idea is as follows. We have in the beginning. (For later convenience, we write the vectors in the reverse order.) Let us assume that signs are chosen, one in each step, such that E(#X At this moment there are two possible choices of X i , and we take the better one (the one that maximizes the value of the expectation). As we cannot compute quickly the expected value E(#X n -# we compute E(#X n -# the component-wise "average" of -# v 1 , . , -# v n . To describe the algorithm more precisely, we need to introduce some notation. For vectors -# a we define the polynomials l 52 A. CZYGRINOW, S. POLJAK, AND V. R ODL l For given -# the arithmetic mean of absolute values of the jth coordinates of -# v i , . , -# v 1 , i.e., and set -# u we denote the partial sums: let -# S that E(# S i +X i -# Now we choose otherwise. We can formalize the algorithm in the following procedure. Algorithm input: vectors -# v 1 , . , -# v n # R k output: sign vector (X 1 , . , for i=n downto 1 begin compute else return Proposition 9. The above algorithm returns a vector (X 1 , . , X n ) such that Proof. Since The first inequality holds by the choice of X i , the second one by Lemma 6, and the (obvious) fact that u ij is an arithmetic mean of v ij and i - 1 copies of u i-1j . Hence and l l CONSTRUCTIVE TOURNAMENT RANKING 53 Proposition 10. For O(n), the time complexity of the above algorithm is O(n 3 lg (nd) lg n) provided the vectors -# v 1 , . , -# v n # R k are integral and |v ij | # d . Proof. The procedure consists of n iterations for computing X n , . , X 1 . At each step we evaluate the expression W ( -# S i , i, -# u i ). To keep the computation in integers we replace it by l where l # can be evaluated in advance using the identity # i l # i-1 l # i-1 l-1 # . Since i is of size at most n and the are of size nd, we can compute |iS ij ij | in O(lg n lg (nd)) steps. The sum # k can be evaluated in O(k lg n lg (nd)) steps. The number # i l # is less than 2 n and so the multiplication # i l # k can be computed in O(lg steps. The total complexity of the procedure is (nd) lg n). Using the divide and conquer technique, one can design a slightly faster algorithm that gives a little worse results (for details consult [2]). We will now apply the algorithm to quasi-Ramsey numbers and to the linear ordering problem. Let us start with the proof of Theorem 1. Proof of the Theorem 1. We use the same technique that was applied in [12]. Let First we need to find a large cut of K n with edge weights |f(e)|. Obviously, by a greedy procedure we can construct disjoint sets X and Y such that x#X,y#Y KIndeed, assume that sets X i 1) and W i 1). If W i Y then set X #{i+1}. (Using the Goemans- Williamson algorithm from [9], one can possibly improve a constant in our theorem. However, since the result in [9] provides .878 approximation of the optimal cut, it does not guarantee that the produced cut is bigger than K 2 . For slightly better cut algorithms consult [13].) vector -# v to each vertex x i , 1, . , n 2 . Using the algorithm from section 2, we construct a sign vector (X 1 , . , such that n) -1/2 K We partition sets 54 A. CZYGRINOW, S. POLJAK, AND V. R ODL | Hence, we can choose X # {X We also have f(X # , Y # be one of X # , Y # , We see that S is such that |f(S)| #12 # Taking # we obtain a lower bound on the quasi-Ramsey numbers. Corollary 11. We can now apply the result of Theorem 1 to the linear ordering problem. Since the proof resembles the reasoning for the corresponding result in [12], we omit the details. Proof of Theorem 2. Let w ij be the weight of the pair {i, j}. as follows. For be the sets constructed in the proof of Theorem 1 and let Construct # in the following way. Construct ranking on X # such that at least half of the arcs with both endpoints in X # are consistent with the ranking. (This can be obtained by considering an arbitrary ordering and its inverse.) Similarly construct rankings of Y # and R. Assume that f(X # , Y # 0; then for x # X # and y. Suppose that f(X # Y # , R) # 0; then for r # R and z # X # Y # let z # r. 3. Applications of the regularity lemma. In this section we present the applications of the regularity lemma to both quasi-Ramsey and tournament ranking functions. A variant of the regularity lemma was applied for max-cut, graph bisection, and a quadratic assignment problem in Frieze and Kannan [6] and for computing frequencies in graphs in Duke, Lefmann, and Rodl [3]. For simplicity, we restrict our discussion to the unweighted case, but similar results can be obtained for weighted graphs and tournaments. Let (V, E) be a graph on n vertices, for , the density d(V 1 , defined as d(V 1 , denotes the number of edges between V 1 and V 2 . Definition 12. A pair of subsets called #-regular if for every W 1 with |W 1 | #|V 1 | and for every W CONSTRUCTIVE TOURNAMENT RANKING 55 Definition 13. A partition of V is #-regular if (ii) all except at most # k are #-regular Let us now state the powerful regularity lemma of Szemeredi [16]. Lemma 14. For every # > 0 and every integer l there exist N and L such that any graph with at least N vertices admits an #-regular partition l # k # L. The following version can be easily concluded from the original proof [16]. Lemma 15. For every # > 0 and every integer l, there exists an N such that for any graph with at least vertices and any partition P of the graph into m subsets, there exists m) and an #-regular partition l # k # L which is a refinement of P . The partition postulated in both lemmas can be found in O(n 2.4 using the algorithm described in Alon et al. [1]. Proof of Theorem 3. The algorithm is as follows: Let #c 7 . 1. Find an #-regular partition of the graph G 2. Check all 2 k subsets of V of the form choose S that maximizes | # Note that if (V i , #-regular with density 1-d ij in G-1 = (V, f -1 (-1)). Given the partition V 1 #V k , we define f R in the following way. For T # [n], f # (T Fact 16. Let T # be a minimal set that maximizes f # . Then for every l such that the sum Proof. We use proof by contradiction. Assume that there exists l such that and we get the contradiction with minimality of T # . Fact 17. Let T # be a minimal set that maximizes f # . If T # V l #, then Note that Fact 17 implies that if S is a set found by the algorithm, then |f # (S)| # as the algorithm checks all the possible unions of V i 's to maximize |f # |. In the same way, one can show that |f # (S)| # -f # (L # ) where L # maximizes -f # . A. CZYGRINOW, S. POLJAK, AND V. R ODL Proof. Hence, f # (T # f # (T # V l ) and the equality holds only if |V l # T # l | as by the previous fact. It will be convenient to use the following notation. For two functions A(n) and B(n), we write large enough. Our main lemma shows that f # is a "good" approximation for the discrepancy function f . Lemma 18. For every U # V |f # (U) - f(U)| < 7 Proof. We divide the proof into five claims. Indeed, since |V i | # n and also , we infer that |f(V i #U)| # n Therefore, which proves Claim 19. We partition [k] I #R as follows: {i, j} # S if and only if either |V i #U | < I if and only if the pair (V i , we infer that |f(U) - Indeed, there are at most # k 2irregular pairs and for each of them |f(V i #U,V j # R#I CONSTRUCTIVE TOURNAMENT RANKING 57 I Together with Claim 20, this shows that From Claim 21 we know that can approximate f(U # namely, Thus, which proves the claim. By definition, f # | and by Claim 22 we have computations show From Lemma we can easily conclude that the set S found by the algorithm has discrepancy |f(S)| # (1 - #)OPT (f ). Indeed, let T be such that |f(T and S be the set chosen by the algorithm. From the note after Fact 17 we know that Thus, 58 A. CZYGRINOW, S. POLJAK, AND V. R ODL Since |f(T )| # cn 2 and #cwe get |f(S)| # (1 - #)|f(T )|. We will now turn our attention to the linear ordering problem. Let T be a tournament with We denote by OPT (T n is taken over all transitive tournaments of order n. For a pair of subsets with we define the tournament density d T is the number of arcs that start at V 1 and end at V 2 . Note that d T Proof of Theorem 4. The ranking # can be constructed by the following proce- dure: Let #) 2 . 1. Define an auxiliary graph G T as G and let U l (i-1) , . , v n l i } where 2. Apply Lemma 15 to obtain an #-regular partition of V into which is a refinement of U 1 # U l . 3. Check all k! permutations of the sets {V 1 , . , V k } to find a permutation # that maximizes # 1#i1<i2#k d T (V #(i1 4. Extend # inside each of V i in an arbitrary way to obtain the ranking # of V . Let us first observe that in the first two steps of the algorithm we actually construct an #-regular partition of the tournament T , where the regularity is defined as follows. Definition 24. A pair of subsets is #-regular in tournament (V, for every W 1 and every W 2 # V 2 with |d Then, since maxU i < minU j for i < j, the following fact holds. Fact 25. For i < #-regular in the graph G T with density d ij , then the pair (V i , tournament T with density is an #-regular partition of a tournament T . Without loss of generality, we may assume that the optimal ordering of V is 1 < 2 < < n. For a subset S # V , define h(S) as the number of arcs of T that agree with the optimal ordering, i.e., S}|. For sets with be the number of arcs of T between S 1 and S 2 that agree with the optimal ordering, i.e., h(S 1 , { n s (j -1), . , n s computations show the following. Fact 26. 1. # s 2. 1#j1<j2#s We will show that the number of arcs that agree with the optimal ordering cannot be much larger than h # , namely, the following. Lemma 27. h(V Before giving a proof we will establish some auxiliary facts. CONSTRUCTIVE TOURNAMENT RANKING 59 Indeed, since {W ij } is a partition of V we have 1#j1<j2#s s 1#j1<j2#s by Fact 26. We adopt the notation from the proof of Lemma 18. Let [k] I if and only if ) is not #-regular in a tournament T . Note that if . . is irregular in the graph G T . To prove the claim we bound ) from above. 1#j1<j2#s l Thus, 1#j1<j2#s Finally, let [s] Indeed, for (j 1 , Therefore, s s as Proof of Lemma 27. To show Lemma 27, we need to prove that h(V A. CZYGRINOW, S. POLJAK, AND V. R ODL is #-regular we can approximate From Claim 1#j1<j2#s To complete the proof of Theorem 4, we first introduce an auxiliary digraph K with vertices corresponding to sets W ij , weights on arcs corresponding to approximation of the number of arcs that are consistent with optimal ordering. More for- mally, let K be a complete k-partite, symmetric digraph with a vertex set V with weights on arcs defined as follows: w(y corresponds to the set W ij # V i and Y i corresponds to V i , # to Z j . We define the ordering # of V (K) in the following way: y if and only if either 1#j1<j2#s w(y w(y The final part of the proof is based on the following lemma. Lemma (ordering lemma). There exists a permutation # : [k] # [k] such that for every ordering # of V (K) w(y w(y #(i1 )j 1 In other words, the sum of weights of the arcs is maximized for an ordering < in which Y i 1 . We postpone the proof of Lemma 31 until the end of this section. Proof. By the ordering lemma, there exists a permutation # : [k] # [k] such that w(y w(y #(i1 )j 1 CONSTRUCTIVE TOURNAMENT RANKING 61 The number of arcs that are consistent with constructed ranking # is at least which by Lemma 27 and Lemma 32 is at least h(V . When we combine it with the lower bound mentioned in the introduction we conclude that the number of arcs that are consistent with constructed ordering is at least (1 - #)OPT (T n ) since We will now prove the ordering lemma. Proof of the ordering lemma. To prove the lemma, it is su#cient to show that the sum of weights of arcs is maximized for an ordering in which every Y i is an interval. Let # be an ordering of V (K). We denote by h(#) the sum w(y and for every Y i , where we define a gap-number as the minimum number of intervals I ij such that Y Note that the gap-numbers depend on the ordering of V (K). there exists an ordering # such that 1. h(# h(# ), 2. gap# (Y i 0 3. gap# (Y i Applying the claim to Y 1 , Y 2 , . , Y k , we construct the ordering in which every are intervals. Proof of the claim. Since gap# (Y i 0 there exist two intervals I that I i and I Without loss of generality we may assume that d T |. Then the sum of the weights of arcs between intervals I which equals the sum of weights of arcs between intervals I Therefore, we can reduce the number of gaps of Y i 0 4. Conclusions and an open problem. In this paper, we considered the weighted version of discrepancy and tournament ranking problems. In the first part of the paper we generalized the approach from [12] to weighted graphs. In the second part we presented algorithms for both problems which were based on the algorithmic regularity lemma. We want to conclude with the following open problem. A. CZYGRINOW, S. POLJAK, AND V. R ODL Open Problem 1. For a given n, construct an m n matrix of +1's and -1's with m small which has the following property. For every vector -# u # {-1, 1} nm for some constant c. By probabilistic method one can show the existence of matrix M with and a constant su#ciently small. Note that Hadamard matrices do not possess the required property, taking -# u as one of the row vectors of M results in Let us observe that we can use the solution matrix M to our initial problem of finding a sign vector. Namely, for given -# v 1 , . , -# v n # {-1, 1} n , there is an O(n 2 m) algorithm that finds -# such that Indeed, let -# We can construct a sign vector in the following way: For every row vector -# m i of matrix M we compute and we choose -# m i such that the sum is the largest. By the property of the matrix M , we know that for every vector -# w j , This implies that if a vector chosen by the algorithm, then # n We verify that In computing the sum numbers of size O(1). Note that the same argument can be repeated (resulting in di#erent constant c) if -# v 1 , . , -# v n # As long as m is smaller then n lg n this will improve the time complexity of results in [12]. A similar question can be asked for the weighted case. Acknowledgments . We would like to thank referees for helpful comments and suggestions. --R The algorithmic aspects of the regularity lemma On the Linear Ordering Problem A fast algorithm for computing frequencies in a given graph Probabilistic Methods in Combinatorics The regularity lemma and approximation schemes for dense prob- lems Quick Approximation to Matrices and Applications Computers and Intractability. A cutting plane algorithm for the linear ordering problem Sequencing by Enumerative Methods Tournament ranking with expected profit in polynomial time A polynomial time heuristic for certain subgraph optimization problems with guaranteed lower bound Optimal ranking of tournaments Nonconstructive Methods in Discrete Mathematics --TR --CTR Penny Haxell , Brendan Nagle , Vojtch Rdl, Integer and fractional packings in dense 3-uniform hypergraphs, Random Structures & Algorithms, v.22 n.3, p.248-310, May Y. Dementieva , P. E. Haxell , B. Nagle , V. Rdl, On characterizing hypergraph regularity, Random Structures & Algorithms, v.21 n.3-4, p.293-335, October 2002 V. Rdl , M. Schacht , M. H. Siggers , N. Tokushige, Integer and fractional packings of hypergraphs, Journal of Combinatorial Theory Series B, v.97 n.2, p.245-268, March, 2007 Eldar Fischer, Testing graphs for colorable properties, Proceedings of the twelfth annual ACM-SIAM symposium on Discrete algorithms, p.873-882, January 07-09, 2001, Washington, D.C., United States Packing directed cycles efficiently, Discrete Applied Mathematics, v.155 n.2, p.82-91, January, 2007
linear ordering problem;discrepancy;derandomization;regularity lemma
307963
On-Line Difference Maximization.
In this paper we examine problems motivated by on-line financial problems and stochastic games. In particular, we consider a sequence of entirely arbitrary distinct values arriving in random order, and must devise strategies for selecting low values followed by high values in such a way as to maximize the expected gain in rank from low values to high values.First, we consider a scenario in which only one low value and one high value may be selected. We give an optimal on-line algorithm for this scenario, and analyze it to show that, surprisingly, the expected gain is n-O(1), and so differs from the best possible off-line gain by only a constant additive term (which is, in fact, fairly small---at most 15).In a second scenario, we allow multiple nonoverlapping low/high selections, where the total gain for our algorithm is the sum of the individual pair gains. We also give an optimal on-line algorithm for this problem, where the expected gain is $n^2/8-\Theta(n\log n)$. An analysis shows that the optimal expected off-line gain is $n^2/6+\Theta(1)$, so the performance of our on-line algorithm is within a factor of 3/4 of the best off-line strategy.
Introduction . In this paper, we examine the problem of accepting values from an on-line source and selecting values in such a way as to maximize the difference in the ranks of the selected values. The input values can be arbitrary distinct real numbers, and thus we cannot determine with certainty the actual ranks of any input values until we see all of them. Since we only care about their ranks, an equivalent way of defining the input is as a sequence of n integers x denotes the rank of the ith input item among the first i items. These ranks uniquely define an ordering of all n inputs, which can be specified with a sequence of ranks r these ranks form a permutation of the set ng. We refer to the r i ranks as final ranks, since they represent the rank of each item among the final set of n inputs. We assume that the inputs come from a probabilistic source such that all permutations of n final ranks are equally likely. The original motivation for this problem came from considering on-line financial problems [2, 4, 7, 8, 9], where maximizing the difference between selected items naturally corresponds to maximizing the difference between the buying and selling prices of an investment. While we use generic terminology in order to generalize the setting (for example, we make a "low selection" rather than pick a "buying price"), many of the problems examined in this paper are easily understood using notions from invest- ing. This paper is a first step in applying on-line algorithmic techniques to realistic on-line investment problems. While the original motivation comes from financial problems, the current input model has little to do with realistic financial markets, and is selected for its mathe- Received by the editors July 29, 1996; accepted for publication (in revised form) March 5, 1998; published electronically DATE. y Department of Computer Science, Yale University, New Haven, CT 06520 (kao-ming-yang@cs.yale.edu). Supported in part by NSF Grant CCR-9531028. z Department of Computer Science, University of North Texas, Denton, (srt@cs.unt.edu). Supported in part by NSF Grant CCR-9409945. M. Y. KAO AND S. R. TATE matical cleanness and its relation to fundamental problems in stochastic games. The main difference between our model and more realistic financial problems is that in usual stock trading, optimizating rank-related quantities is not always correlated to optimizing profits in the dollar amount. However, there are some strong similarities as well, such as exotic financial derivatives based on quantities similar to ranks [20]. The current formulation is closely related to an important mathematical problem known as the secretary problem [11, 6], which has become a standard textbook example [3, 5, 19], and has been the basis for many interesting extensions (includ- ing [1, 14, 15, 17, 18]). The secretary problem comes from the following scenario: A set of candidates for a single secretarial position are presented in random order. The interviewer sees the candidates one at a time, and must make a decision to hire or not to hire immediately upon seeing each candidate. Once a candidate is passed over, the interviewer may not go back and hire that candidate. The general goal is to maximize either the probability of selecting the top candidate, or the expected rank of the selected candidate. This problem has also been stated with the slightly different story of a princess selecting a suitor [3, p. 110]. More will be made of the relationship between our current problem and the secretary problem in x2, and for further reading on the secretary problem, we refer the reader to the survey by Freeman [10]. As mentioned above, we assume that the input comes from a random source in which all permutations of final ranks are equally likely. Thus, each rank x i is uniformly distributed over the set f1; all ranks are independent of one another. In fact, this closely parallels the most popular algorithm for generating a random permutation [13, p. 139]. A natural question to ask is, knowing the relative rank x i of the current input, what is the expected final rank of this item (i.e., E[r i jx i ])? Due to the uniform nature of the input source, the final rank of the ith item simply scales up with the number of items left in the input sequence, and so E[r i jx (a simple proof of this is given in Appendix A). Since all input ranks x i are independent and uniformly distributed, little can be inferred about the future inputs. We consider games in which a player watches the stream of inputs, and can select items as they are seen; however, if an item is passed up then it is gone for good and may not be selected later. We are interested in strategies for two such games: ffl Single pair selection: In this game, the player should make two selections, the first being the low selection and the second being the high selection. The goal of the player is to maximize the difference between the final ranks of these two selections. If the player picks the low selection upon seeing input x ' at time step ', and picks the high selection as input x h at time step h, then the profit given to the player at the end of the game is the difference in final ranks of these items: r ffl Multiple pair selection: In this game, the player makes multiple choices of low/high pairs. At the end of the game the difference in final ranks of each selected pair of items is taken, and the differences for all pairs are added up to produce the player's final profit. The strategies for these games share a common difficulty: If the player waits too long to make the low selection, he risks not having enough choices for a good high selection; however, making the low selection too early may result in an item selected before any truly low items have been seen. The player in the second game can afford to be less selective. If one chosen pair does not give a large difference, there may still be many other pairs that are good enough to make up for this pair's small difference. ON-LINE DIFFERENCE MAXIMIZATION 3 We present optimal solutions to both of the games. For the first game, where the player makes a single low selection and a single high selection, our strategy has expected profit From the derivation of our strategy, it will be clear that the strategy is optimal. Even with full knowledge of the final ranks of all input items, the best expected profit in this game is less than n, and so in standard terms of on-line performance measurement [12, 16], the competitive ratio 1 of our strategy is one. The strength of our on-line strategy is rather intriguing. For the second game, where multiple low/high pairs are selected, we provide an optimal strategy with expected profit 1 log n). For this problem, the optimal off-line strategy has expected profit of approximately 1 so the competitive ratio of our strategy is 4 3 . 2. Single Low/High Selection. This section considers a scenario in which the player may pick a single item as the low selection, and a single later item as the high selection. If the low selection is made at time step ' and the high selection is made at time step h, then the expected profit is E[r The player's goal is to use a strategy for picking ' and h in order to maximize this expected profit. As mentioned in the previous section, this problem is closely related to the secretary problem. A great deal of work has been done on the secretary problem and its variations, and this problem has taken a fundamental role in the study of games against a stochastic opponent. Our work extends the secretary problem, and gives complete solutions to two natural variants that have not previously appeared in the literature. Much insight can be gained by looking at the optimal solution to the secretary problem, so we first sketch that solution below (using terminology from our problem about a "high selection"). To maximize the expected rank of a single high selection, we define the optimal strategy recursively using the following two functions: Hn (i): This is a limit such that the player selects the current item if Rn (i): This is the expected final rank of the high selection if the optimal strategy is followed starting at the ith time step. Since all permutations of the final ranks are equally likely, if the ith input item has rank x i among the first i data items, then its expected final rank is n+1 an optimal strategy for the secretary problem is to select the ith input item if and only if its expected final rank is better than could be obtained by passing over this item and using the optimal strategy from step In other words, select the item at time step i ! n if and only if If we have not made a selection before the nth step, then we must select the last item, whose rank is uniformly distributed over the range of integers from 1 to n - and so the expected final rank in that case is Rn 2 . For "Competitive ratio" usually refers to the worst-case ratio of on-line to off-line cost; however, in our case inputs are entirely probabilistic, so our "competitive ratio" refers to expected on-line to expected off-line cost - a worst-case measure doesn't even make sense here. 4 M. Y. KAO AND S. R. TATE and to force selection at the last time step define Hn Furthermore, given this definition for Hn (i), the optimal strategy at step i depends only on the rank of the current item (which is uniformly distributed over the range and the optimal strategy at time i+1. This allows us to recursively define Rn (i) as follows when 2 , we have a full recursive specification of both the optimal strategy and the performance of the optimal strategy. The performance of the optimal strategy, taken from the beginning, is Rn (1). This value can be computed by the recursive equations, and was proved by Chow et al. to tend to n Furthermore, the performance approaches this limit from above, so for all n we have performance greater than For single pair selection, once a low selection is made we want to maximize the expected final rank of the high selection. If we made the low selection at step i, then we can optimally make the high selection by following the above strategy for the secretary problem, which results in an expected high selection rank of Rn (i 1). How do we make the low selection? We can do this optimally by extending the recursive definitions given above with two new functions: Ln (i): This is a limit such that the player selects the current item if Pn (i): This is the expected high-low difference if the optimal strategy for making the low and high selections is followed starting at step i. Thus, if we choose the ith input as the low selection, the expected profit is Rn (i+ We should select this item if that expected profit is no less than the expected profit if we skip this item. This leads to the definition of Ln (i): Using Ln (i), we derive the following profit function: From the derivation, it is clear that this is the optimal strategy, and can be implemented by using the recursive formulas to compute the Ln (i) values. The expected profit of our algorithm is given by Pn (1), which is bounded in the following theorem. Theorem 2.1. Our on-line algorithm for single low/high selection is optimal and has expected profit Proof. It suffices to prove that a certain inferior algorithm has expected profit O(1). The inferior algorithm is as follows: Use the solution to the secretary problem ON-LINE DIFFERENCE MAXIMIZATION 5 to select, from the first bn=2c input items, an item with the minimum expected final rank. Similarly, pick an item with maximum expected rank from the second dn=2e inputs. For simplicity, we initially assume that n is even; see comments at the end of the proof for odd n. Let ' be the time step in which the low selection is made, and h the time step in which the high selection is made. Using the bounds from Chow et al. [6], we can bound the expected profit of this inferior algorithm by Chow et al. [6] show that c - 3:87, and so the expected profit of the inferior algorithm is at least n \Gamma 14:48. For odd n, the derivation is almost identical, with only a change in the least significant term; specifically, the expected profit of the inferior algorithm for odd n is n+3 , which again is at least n \Gamma 14:48. 3. Multiple Low/High Selection. This section considers a scenario in which the player again selects a low item followed by a high item, but may repeat this process as often as desired. If the player makes k low and high selections at time steps respectively, then we require that The expected profit resulting from these selections is 3.1. Off-line Analysis. Let interval j refer to the time period between the instant of input item j arriving and the instant of input item arriving. For a particular sequence of low and high selections, we call interval j active if ' for some index i. We then amortize the total profit of a particular algorithm B by defining the amortized profit AB (j) for interval j to be ae r Note that for a fixed sequence of low/high selections, the sum of all amortized profits is exactly the total profit, i.e., For an off-line algorithm to maximize the total profit we need to maximize the amortized profit, which is done for a particular sequence of r i 's by making interval active if and only if r j+1 ? r j . Translating this back to the original problem of making low and high selections, this is equivalent to identifying all maximal-length increasing intervals and selecting the beginning and ending points of these intervals as low and high selections, respectively. These observations and some analysis give the following lemma. 6 M. Y. KAO AND S. R. TATE Lemma 3.1. The optimal off-line algorithm just described has expected profit6 Proof. This analysis is performed by examining the expected amortized profits for individual intervals. In particular, for any interval j, Since there are and the above analysis is independent of the interval number j, summing the amortized profit over all intervals gives the expected profit stated in the lemma. 3.2. On-line Analysis. In our on-line algorithm for multiple pair selection, there are two possible states: free and holding. In the free state, we choose the current item as a low selection if x furthermore, if we select an item then we move from the free state into the holding state. On the other hand, in the holding state if the current item has x i ? i+1 , then we choose this item as a high selection and move into the free state. We name this algorithm OP, which can stand for "opportunistic" since this algorithm makes a low selection whenever the probability is greater than 1 2 that the next input item will be greater than this one. Later we will see that the name OP could just as well stand for "optimal," since this algorithm is indeed optimal. The following lemma gives the expected profit of this algorithm. In the proof of this lemma we use the following equality: Lemma 3.2. The expected profit from our on-line algorithm is if n is even, if n is odd. In cleaner forms we have E[POP Proof. Let R i be the random variable of the final rank of the ith input item. Let AOP (i) be the amortized cost for interval i as defined in x3.1. Since AOP (i) is nonzero only when interval i is active, Therefore, Under what conditions is an interval active? If x this interval is certainly active. If the algorithm was not in the holding state prior to this step, it would be after seeing input x i . Similarly, if x i ? i+1the algorithm must be in the free state during this interval, and so the interval is not active. Finally, if x 2 the state remains what it has been for interval i \Gamma 1. Furthermore, since i must be odd for this case to be possible, cannot be i (and thus x unambiguously indicates whether interval i is active). In summary, determining whether interval i is active requires looking at only x i and occasionally x i\Gamma1 . Since the expected amortized profit of step i depends on whether i is odd or even, we break the analysis up into these two cases below. Case 1: i is even. Note that P rob[x 2 , and x i cannot be exactly i+1 which means that with probability 1 interval i is active. Furthermore, R i+1 is independent of whether interval i is active or not, and so (i)jInterval i is Case 2: i is odd. Since interval 1 cannot be active, we assume that i - 3. We need to consider the case in which x 2 , and so rob[Interval i is active] Computing the expected amortized cost of interval i is slightly more complex than in Case 1. (i)jInterval i is active] 8 M. Y. KAO AND S. R. TATE A Combining both cases, (i)jInterval i is active] \Delta P rob[Interval i is active] where the first sum accounts for the odd terms of the original sum, and the second sum accounts for the even terms. When n is even this sum becomes which agrees with the claim in the lemma. When n is odd the sum can be simplified as which again agrees with the claim in the lemma. The simplified forms follow the fact that for any odd n - 3 we can bound 1 Combining this result with that of x3.1, we see that our on-line algorithm has expected profit 3=4 of what could be obtained with full knowledge of the future. In terms of competitive analysis, our algorithm has competitive ratio 4=3, which means that not knowing the future is not terribly harmful in this problem! 3.3. Optimality of Our On-Line Algorithm. This section proves that algorithm OP is optimal. We will denote permutations by a small Greek letter with a subscript giving the size of the permutation; in other words, a permutation on the set may be denoted ae i or oe i . A permutation on i items describes fully the first i inputs to our problem, and given such a permutation we can also compute the permutation described by the first We will use the notation oe i j i\Gamma1 to denote such a restriction. This is not just a restriction of the domain of the permutation to unless oe i restriction will not form a valid permutation. Upon seeing the ith input, an algorithm may make one of the following moves: it may make this input a low selection; it may make this input a high selection; or it may simply ignore the input and wait for the next input. Therefore, any algorithm can be entirely described by a function which maps permutations (representing inputs of arbitrary length) into this set of moves. We denote such a move function for algorithm B by MB , which for any permutation oe i maps MB (oe i ) to an element of the set f"low"; "high"; "wait"g. Notice that not all move functions give valid algorithms. For example, it is possible to define a move function that makes two low selections in a row for certain inputs, even though this is not allowed by our problem. We define a generic holding state just as we did for our algorithm. An algorithm is in the holding state at time i if it has made a low selection, but has not yet made a corresponding high selection. For algorithm B we define the set LB (i) to be the set of permutations on i items that result in the algorithm being in the holding state after processing these i inputs. We explicitly define these sets using the move function: The LB (i) sets are all we need to compute the expected amortized profit for interval since i!@ jLB (i)j ae We use the above notation and observations to prove the optimality of algorithm OP. Theorem 3.3. Algorithm OP is an optimal algorithm for the multiple pair selection problem. Proof. Since the move functions (which define specific algorithms) work on permu- tations, we will fix an ordering of permutations in order to compare strategies. We order permutations first by their size, and then by a lexicographic ordering of the actual permutations. When comparing two different algorithms B and C, we start enumerating permutations in this order and count how many permutations cause the same move in B and C, stopping at the first permutation oe i for which MB (oe i i.e., the first permutation for which the algorithms make different moves. We call the M. Y. KAO AND S. R. TATE number of permutations that produce identical moves in this comparison process the length of agreement between B and C. To prove the optimality of our algorithm by contradiction, we assume that it is not optimal, and of all the optimal algorithms let B be the algorithm with the longest possible length of agreement with our algorithm OP. Let oe k be the first permutation in which MB (oe k ) 6= MOP (oe k ). Since B is different from OP at this point, at least one of the following cases must hold: (a) oe k j 2 and MB (oe k ) 6= "low" (i.e., algorithm B is not in the holding state, gets a low rank input, but does not make it a low selection). 2 and MB (oe k ) 6= "wait" (i.e., algorithm B is not in the holding state, gets a high rank input, but makes it a low selection anyway). (c) oe k j 2 and MB (oe k ) 6= "high" (i.e., algorithm B is in the holding state, gets a high rank input, but doesn't make it a high selection). 2 and MB (oe k ) 6= "wait" (i.e., algorithm B is in the holding state, gets a low rank input, but makes it a high selection anyway). In each case, we will show how to transform algorithm B into a new algorithm C such that C performs at least as well as B, and the length of agreement between C and OP is longer than that between B and OP. This provides the contradiction that we need. Case (a): Algorithm C's move function is identical to B's except for the following values: "wait" if ae In other words, algorithm C is the same as algorithm B except that we "correct B's error'' of not having made this input a low selection. The changes of the moves on input k is the same as LB (k 1). It is easily verified that the new sets LC (i) (corresponding to the holding state) are identical to the sets LB (i) for all i 6= k. The only difference at k is the insertion of oe k , i.e., LC g. Let PB and PC be the profits of B and C, respectively. Since their amortized costs differ only at interval k, k!@ jLC (k)j ae k 2LC (k) ae k (k)A ae k 2LB (k) ae k (k)A ON-LINE DIFFERENCE MAXIMIZATION 11 By one of the conditions of Case (a), oe k , so we finish this derivation by noting that 0: Therefore, the expected profit of algorithm C is greater than that of B. Case (b): As in Case (a) we select a move function for algorithm C that causes only one change in the sets of holding states, having algorithm C not make input k a low selection. In particular, these sets are identical with those of algorithm B with the one exception that LC g. Analysis similar to Case (a) shows 0: Case (c): In this case we select a move function for algorithm C such that LC resulting in algorithm C selecting input k as a high selection, and giving an expected profit gain of 0: Case (d): In this case we select a move function for algorithm C such that LC resulting in algorithm C not taking input k as a high selection, and giving an expected profit gain of 0: In each case, we transformed algorithm B into a new algorithm C that performs at least as well (and hence must be optimal), and has a longer length of agreement with algorithm OP than B does. This directly contradicts our selection of B as the optimal algorithm with the longest length of agreement with OP, and this contradiction finishes the proof that algorithm OP is optimal. 4. Conclusion. In this paper, we examined a natural on-line problem related to both financial games and the classic secretary problem. We select low and high values from a randomly ordered set of values presented in an on-line fashion, with the goal of maximizing the difference in final ranks of such low/high pairs. We considered two variations of this problem. The first allowed us to choose only a single low value followed by a single high value from a sequence of n values, while the second allowed selection of arbitrarily many low/high pairs. We presented provably optimal algorithms for both variants, gave tight analyses of the performance of these algorithms, and analyzed how well the on-line performance compares to the optimal off-line performance. Our paper opens up many problems. Two particularly interesting directions are to consider more realistic input sources and to maximize quantities other than the difference in rank. Appendix . Proof of Expected Final Rank. In this appendix section, we prove that if an item has relative rank x i among the first i inputs, then its expected rank r i among all n inputs is given by E[r i jx M. Y. KAO AND S. R. TATE Lemma A.1. If a given item has rank x from among the first i inputs, and if the 1st input is uniformly distributed over all possible rankings, then the expected rank of the given item among the first i inputs is i+2 Proof. If we let R be a random variable denoting the rank of our given item from among the first i then we see that the value of R depends on the rank of the 1st input. In particular, if the rank of the 1st input is - x (which happens with probability x ), then the new rank of our given item will be x + 1. On the other hand, if the rank of the 1st input is ? x (which happens with probability the rank of our given item is still x among the first i inputs. Using this observation, we see that which is what is claimed in the lemma. For a fixed position i, the above extension of rank to position times the rank of the item among the first i inputs. Because of this, we can simply extend this lemma to the case where x is not a fixed rank but is a random variable, and we know the expected rank among the first i items. Corollary A.2. If a given item has expected rank x from among the first i inputs, and if the i +1st input is uniformly distributed over all possible rankings, then the expected rank of the given item among the first i inputs is i+2 Simply multiplying together the change in expected rank from among i inputs, to among and so on up to n inputs, we get a telescoping product with cancellations between successive terms, resulting in the following corollary. Corollary A.3. If a given item has rank x from among the first i inputs, and if the remaining inputs are uniformly distributed over all possible rankings, then the expected rank of the given item among all n inputs is n+1 --R Improved algorithms and analysis for secretary problems and generalizations Fundamentals of Investments Probability and Measure The statistical adversary allows optimal money-making trading strategies The Theory of Optimal Stop- ping "secretary problem" An algorithm for maximizing expected log investment return Competitive analysis of financial games Foundations of Finance The secretary problem and its extensions: A review The Art of Computer Programming Choosing the maximum from a sequence with a discount function Amortized efficiency of list update and paging rules A secretary problem with finite memory Recognizing both the maximum and the second maximum of a sequence Dynamic Programming and Stochastic Control The Mathematics of Financial Derivatives --TR --CTR Avrim Blum , Tuomas Sandholm , Martin Zinkevich, Online algorithms for market clearing, Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms, p.971-980, January 06-08, 2002, San Francisco, California
financial games;analysis of algorithms;secretary problem;on-line algorithms
307967
Convexity and HHD-Free Graphs.
It is well known that chordal graphs can be characterized via m-convexity. In this paper we introduce the notion of m3-convexity (a relaxation of m-convexity) which is closely related to semisimplicial ordering of graphs. We present new characterizations of HHD-free graphs via m3-convexity and obtain some results known from [B. Jamison and S. Olariu, Adv. Appl. Math., 9 (1988), pp. 364--376] as corollaries. Moreover, we characterize weak bipolarizable graphs as the graphs for which the family of all m3-convex sets is a convex geometry. As an application of our results we present a simple efficient criterion for deciding whether a HHD-free graph contains a r-dominating clique with respect to a given vertex radius function r.
Introduction . This paper was inspired by the results of Farber and Jamison [16] on convexity in chordal graphs and by the results of Jamison and Olariu [19] on semisimplicial orderings of graphs produced by "lexicographic breadth first search" (LexBFS) [25] and "maximum cardinality search" (MCS) [28]. Throughout this paper all graphs E) are finite, undirected, and simple (i.e., loop-free and without multiple edges). The complement of a graph G is the graph G with the same vertex set V , where two vertices are adjacent in G i# they are nonadjacent in G. A path is a sequence of vertices v 0 , . , v l such that v i v its length is l. An induced path is a path, where v i An induced cycle is a sequence of vertices v 0 , . , v k such that v k). The length |C| of a cycle C is its number of vertices. Let also |P | be the number of vertices of a path P . A hole is an induced cycle of length at least five, whereas an antihole is the complement of a hole. By P k we denote an induced path on k vertices. A graph G is connected i# for any pair of vertices of G there is a path in G joining these vertices. A set S # V is connected in G i# the subgraph G(S) induced by S is connected. The distance dG (u, v) between two vertices u, v is the minimum number of edges on a path connecting these vertices, and is infinite if u and v lie in distinct connected components of the graph G. If no confusion can arise we will omit the index G. For # Received by the editors June 14, 1995; accepted for publication (in revised form) February 24, 1998; published electronically January 29, 1999. Results of this paper were presented at the 5th Internat. Colloq. on "Graphs and Combinatories," Marseille Luminy, September 3-8, 1995. http://www.siam.org/journals/sidma/12-1/32171.html Fachbereich Informatik, Universitat Rostock, Lehrstuhl fur Theoretische Informatik, D 18051 Rostock, Germany (dragan@informatik.uni-rostok.de, ab@informatik.uni-rostock.de). The research of the first author was supported by DAAD # Gerhard-Mercator-Universitat, GH Duisburg, FB Mathematik, FG Informatik, D 47048 Duis- burg, Germany (nicolai@informatik.uni-duisburg.de). The research of this author was supported by DFG. This author is on leave from the Universitatea de stat din Moldova, Chisinau. ADT a vertex v # V and a set S # V we denote by d(v, S) the minimum over all distances subgraph H of a graph G is isometric i# the distance between any pair of vertices in H is the same as that in G. The kth neighborhood N k (v) of a vertex v of G is the set of all vertices of distance k to v, i.e., whereas the disk of radius k centered at v is the set of all vertices of distance at most k to v: DG (v, Again, if no confusion arises we will omit the index G. We also write N(v) instead of The eccentricity e(v) of a vertex v # V is the maximum value of d(v, x) taken over all vertices x # V . The radius rad(G) of G is the minimum eccentricity of a vertex of G, whereas the diameter diam(G) of G is the maximum eccentricity of a vertex of G. Now we will give a short introduction to the theory of convex geometry related to graph theory following [16] (for more information on abstract convexity and antimatroids the interested reader can consult [21]). Let V be a finite set and M be a family of subsets of V . M is called alignment of V i# the family M is closed under intersection and contains both V and the empty set. Elements of M will be considered as convex sets. An aligned space is a pair (V, M), where M is an alignment of V . The smallest member of M containing a given set S # V is the hull of S, denoted by M(S). An element x of a set X # M is an extreme point of X i# X # {x} # M. The Caratheodory number of an aligned space (V, M) is the minimum integer k such that for all X # V , M(X) is the union of the hulls of all subsets Y of X such that |Y | # k. A convex geometry (antimatroid) on a finite set is an aligned space satisfying the following additional property. Minkowski-Krein-Milman property. Every convex set is the hull of its extreme points. Equivalently, a convex geometry is an aligned space satisfying the following property Antiexchange property. For any convex set S and two distinct points x, y / For any convex geometry the following fundamental result holds. Theorem 1.1 (see [16]). If (V, M) is a convex geometry, then S # M i# is an ordering #S such that x i is an extreme point of S # {x i , . , x k } for each For a given ordering (v 1 , . , v n ) of the vertex set of a graph E) let G i := }) be the subgraph of G induced by the set {v i , . , v n }, Numerous classes of graphs can be characterized in the following way. G is a member of class G i# there is an ordering (v 1 , . , v n ) of V (G) such that v i satisfies a certain property P in the subgraph G i , Theorem 1.1 suggests that such classes of graphs might be related to convex geometries, and so it is natural to ask for a graph theoretical description of convex sets of this aligned space. On the other hand, given a collection M of subsets of V (G), one can ask when (V (G), M) is a convex geometry. CONVEXITY AND HHD-FREE GRAPHS 121 For example, if property P means "is simplicial" then G is the class of chordal graphs, i.e., the graphs without induced cycles of length at least four [7, 24]. A vertex v of G is called simplicial i# D(v, 1) induces a complete subgraph of G, and nonsimplicial otherwise. It is well known that a graph is chordal i# it has a perfect elimination ordering, i.e., an ordering (v 1 , . , v n ) of V such that v i is simplicial in G i for each 24]). Moreover, there are two linear time algorithms for computing perfect elimination orderings of chordal graphs: LexBFS [25] and MCS [28]. Two types of convexity in graphs have been studied most extensively, namely, monophonic (m-) convexity and geodesic (g-) convexity (see, e.g., [4, 12, 13, 14, 15, contains every vertex on every induced (shortest) path between vertices in S. Both types of convexity have a relation to simplicial vertices; a vertex v is an extreme point of a m-convex (g-convex) set S i# v is simplicial in G(S). In [16] it is shown that G is a chordal graph i# the monophonic alignment of G is a convex geometry, while the geodesic alignment of G is a convex geometry i# G is a chordal graph without induced 3-fan (i.e., a P 4 with an additional vertex adjacent to all vertices of P 4 ). To prove that the monophonic alignment of a chordal graph is a convex geometry, the authors of [16] show the following nice result. Every nonsimplicial vertex of a chordal graph lies on an induced path between simplicial vertices. For any notion of convexity on the vertex set of G, at least four degrees of local convexity may be distinguished [17]: D(v, 1) is convex for every vertex v of G, is convex for every vertex v of G and every k # 1, is convex for every convex subset S # V of G, D(v, is convex for every convex subset S # V of G and every k # 1. In [16] it was shown that for m-convexity the conditions (1.1)-(1.4) are equivalent and hold i# the graph is chordal. For g-convexity conditions (1.1)-(1.3) are not equivalent (note that (1.3) implies (1.4) for any convexity in graphs [17]). Several characterizations for graphs with property (1.1), (1.2), or (1.3) are given in [14, 17, 27]. Here we will mention only one result which clearly shows an analogy with chordal graphs. Namely, a graph G fulfills the condition (1.3) i# G is a bridged graph, i.e., a graph which contains no isometric cycles of length at least four. Note that a vertex is simplicial i# it is not midpoint of a P 3 . Jamison and Olariu relaxed this condition in [19] in the following way: A vertex is semisimplicial i# it is not a midpoint of a P 4 , and nonsemisimplicial otherwise. An ordering (v 1 , . , v n ) is a semisimplicial ordering i# v i is semisimplicial in G i for all In [19] the authors characterized the graphs for which every LexBFS-ordering is a semisimplicial ordering as the HHD-free graphs, i.e., the graphs which contain no house, hole, or domino as an induced subgraph (cf. Figure 1). Moreover, the graphs for which every MCS-ordering of an arbitrary induced subgraph F is a semisimplicial ordering of F are the HHP-free graphs, i.e., the graphs which contain no house, hole, or "P" as an induced subgraph (cf. Figure 1). If a HHD-free graph G does not contain the "A" of Figure 1 as an induced subgraph then G is called bipolarizable (HHDA-free) [23]. In this paper we introduce the notion of m 3 -convexity (a relaxation of m-convexity), which is closely related to semisimpliciality. A subset S # V is called 122 FEODOR DRAGAN, FALK NICOLAI, AND ANDREAS BRANDST ADT Fig. 1. for any pair of vertices x, y of S each induced path of length at least 3 connecting x and y is completely contained in S. Note that a m 3 -convex set is not necessarily connected, and it is not di#cult to see that the family of m 3 -convex sets is closed under intersection. Observe also that a vertex v is an extreme point of a m 3 -convex set S i# v is semisimplicial in G(S). In this paper we present new characterizations of HHD-free and HHDA-free graphs via m 3 -convexity. We show that for m 3 -convexity the conditions (1.1)-(1.4) are again equivalent and hold i# the graph is HHD-free. We characterize weak bipo- larizable graphs as the graphs for which the m 3 -convex alignment is a convex ge- ometry, i.e., by Theorem 1.1, for which every m 3 -convex set is reachable via some semisimplicial ordering. Again, as for chordal graphs, in weak bipolarizable graphs every nonsemisimplicial vertex lies on an induced path of length at least 3 between semisimplicial vertices. Convexity in graphs is a useful tool not only for geometric characterizations of several graph classes but also for resolving some problems related to distances in graphs [1, 4, 5, 6, 9, 14, 22]. As an application of our results we present a simple e#cient criterion for deciding whether a HHD-free graph E) with given vertex radius function r has an r-dominating clique. Note that this problem is NP-complete for weakly chordal graphs (i.e., the graphs without holes and antiholes) [2]. From this criterion we obtain the inequality diam(G) # between the diameter and radius of a HHD-free graph G. These results extend the known ones for chordal, distance-hereditary, and house-hole-domino-sun-free graphs [3, 5, 8, 9, 10]. Thus, the results of the paper show strict analogies between these graphs and chordal graphs. HHD-free, HHDA-free, and HHP-free graphs are three very natural generalizations of the class of chordal graphs. 2. m 3 -convex sets in HHD-free graphs. In this section we characterize HHD-free graphs as the graphs with m 3 -convex disks. Using m 3 -convexity we give new properties of LexBFS-and MCS-orderings in HHD-free graphs and obtain known results from [19] as corollaries. Since a vertex v is an extreme point of a m 3 -convex set S i# v is semisimplicial in G(S), we immediately conclude the following. Lemma 2.1. An ordering (v 1 , . , v n ) of the vertices of a graph G is semisimplicial The following lemma will be frequently used in what follows. Lemma 2.2 (cycle lemma for hole-free graphs). Let C be a cycle of length at least 5 in a hole-free graph G. Then for each edge xy of C there are vertices in C such that xw 1 # E, each edge of a cycle is contained in a triangle or a 4-cycle. Proof. By induction on the length of the cycle. CONVEXITY AND HHD-FREE GRAPHS 123 Fig. 2. To make the paper self-contained we present the rules of the LexBFS and MCS algorithms. LexBFS: Order vertices of a graph by assigning numbers from | to 1. Assign the number k to a vertex v (as yet unnumbered), which has lexically largest vector is adjacent to the vertex numbered i, and s MCS: Order vertices of a graph by assigning numbers from | to 1. As the next vertex to number pick a vertex adjacent to the most numbered vertices. Subsequently, we will write x < y whenever in a given ordering of the vertex set of a graph G vertex x has a smaller number than vertex y. In what follows we will often use the following properties: # E, then there exists a vertex d such that c < d, db # E, and da / If a < b < c and ac # E and bc / # E, then there exists a vertex d such that b < d, db # E, and da / Evidently, (P 2) is a relaxation of (P 1). It is well known that any LexBFS-ordering has property (P 1) [18] and any MCS-ordering has property (P 2) [28]. Theorem 2.3. (1) Let G be a HHD-free graph and (v 1 , . , v n ) be a LexBFS-ordering of G. Then for each G. (2) Let G be a HHP-free graph and (v 1 , . , v n ) be a MCS-ordering of G. Then for each G. Proof. We prove assertion (1) by induction on i. Assume that V (G i ) is not m 3 - convex in G but V (G j ) is so for 1. Then there must be a vertex y in G i+1 and an induced path P of length at least 3 connecting v i and y, which contains some vertices not in G i . Choose y and P such that |P | is minimum and y is rightmost in the LexBFS-ordering. Case 1. The neighbor of y in P does not belong to G i . Let x be this neighbor of y, and let y, l # 1. By applying (P 1) to x < v i < y, we obtain a vertex v > y adjacent to v i but not to x. The path both endpoints in G i+1 . By the induction hypothesis V cannot be induced. Since P is induced, all possible chords of Q must be incident to v. If v is adjacent only to y, we obtain a forbidden induced cycle of length at least 5. So let u j be the vertex of P # {y} closest to y on the path P and adjacent to v. We immediately conclude l for otherwise we have a hole. Now the m 3 -convexity applied to v - u l - x - y implies vy # E. Since the house and domino are forbidden subgraphs we conclude l # 3 (see Figure 2). Let j < l be the index such that vu j # E, but vu s / ADT x y Fig. 3. we have a house; for we obtain a domino; Case 2. The neighbor of y in P belongs to G i . By minimality of |P | we immediately conclude y, where w, y # applied to x < v i < w gives a vertex v > w adjacent to v i but not to x. We may choose v with maximum number in the LexBFS- ordering. By considering the path v - v i - x - w the m 3 -convexity implies vw # E. Note that vy / we obtain a house. Therefore, we have constructed a "P" (see Figure 3). Case 2.1. y < v. By applying (P 1) to v i < y < v we obtain a vertex u > v adjacent to y but not to v i . Note that w < v < u implies u #= w. Suppose ux # E. Then (P 1) applied to adjacent to v i but not to x, a contradiction to the maximality of v. Thus ux / # E. In the path v - w - y - u both endpoints have greater numbers than y. Let implies uv # E or uw # E. If we have both edges, then we obtain a house induced by we have a domino. Finally, if uw # E and uv / then we can replace y by u > y in P , a contradiction to the choice of y. Case 2.2. y > v. By applying (P 1) to w < v < y we obtain a vertex u > y adjacent to v but not to w. If uv implies the edges ux and uy. So {v i , u, x, y, w} induces a house. Thus uv i / # E. Moreover, with the same arguments as in Case 2.1 we show ux / # E. In the path u - v - w - y both endpoints have greater numbers than v. Let i. Then the m 3 -convexity of G j+1 implies uy # E. Thus we get a domino. This settles the proof of assertion (1). Now to get a proof for assertion (2) we can repeat the arguments of the proof above up to Cases 2.1 and 2.2 using (P 2) instead of (P 1). Note that any vertex u semisimplicial in G({u, v i , . , v n }) since G. Thus we can conclude the following. Corollary 2.4 (see [19]). (1) For any HHD-free graph G and any LexBFS-ordering (v 1 , . , v n ) of G vertex v i is semisimplicial in G i , (2) For any HHP-free graph G and any MCS-ordering (v 1 , . , v n ) of G vertex v i is semisimplicial in G i , Moreover, since there is a MCS-ordering of the "P," which is not a semisimplicial ordering and neither holes nor a domino contain a semisimplicial vertex we immediately conclude the following. CONVEXITY AND HHD-FREE GRAPHS 125 Fig. 4. Theorem 2.5 (see [19]). A graph G is HHP-free i# any MCS-ordering of any induced subgraph F of G is a semisimplicial ordering of F . Note that in Theorem 2.5 it is necessary to consider all induced subgraphs of a given graph, since the graph presented in Figure 4 contains a "P" but every MCS- ordering of this graph is a semisimplicial ordering. For LexBFS it is su#cient to consider the graph itself, since as we will show the class of graphs where any LexBFS- ordering gives a semisimplicial ordering is a hereditary class. A graph is called nontrivial if it has at least two vertices. Theorem 2.6. The following conditions are equivalent for a graph G: (1) G is HHD-free. (2) Any LexBFS-ordering of G is a semisimplicial ordering. (3) For any LexBFS-ordering (v 1 , . , v n ) of G the set V (G i ) is m 3 -convex in G for all Every nontrivial induced subgraph of G has at least two semisimplicial vertices Proof. It is easy to verify that none of a house, a domino, and holes contains two semisimplicial vertices. We have to show (2) =# (1) and (2) =# (4). All other directions are trivial or follow from Theorem 2.3. (2) =# (1) Let G be a graph such that every LexBFS-ordering is a semisimplicial ordering. Clearly, G cannot contain a hole or a domino since these graphs do not have a semisimplicial vertex. Assume that G contains a house induced by induces a C 4 and a is adjacent to b and c. We start LexBFS at vertex a. By the rules of LexBFS both vertices d, e are smaller than the vertices b, c. Let v i be the smaller one of d and e. Then v i is not semisimplicial in G i . Thus G is HHD-free. (2) =# (4) Let H be a nontrivial induced subgraph of G. Since H is HHD-free by # (2) there must be some semisimplicial vertex v of H. Now starting procedure LexBFS at v gives a second semisimplicial vertex. Corollary 2.7. Let G be a HHD-free graph and v be a vertex of G. Then there is a semisimplicial vertex u such that d(u, Proof. We start procedure LexBFS at v. The first vertex u of the obtained LexBFS-ordering is semisimplicial by the above theorem and fulfills d(u, the rules of LexBFS. We immediately conclude the following. Corollary 2.8. In any nontrivial HHD-free graph G there is a pair of semisim- plicial vertices u, v such that d(u, Theorem 2.9. The following conditions are equivalent for a graph G: (1) G is HHD-free. (2) The disk D(v, 1) is m 3 -convex for all vertices (3) The disks D(v, k), k # 1, are m 3 -convex for all vertices 126 FEODOR DRAGAN, FALK NICOLAI, AND ANDREAS BRANDST ADT Fig. 5. (4) The set D(S, connected sets S # V . (5) The sets D(S, are m 3 -convex for all connected sets Proof. In every forbidden subgraph there is a vertex v such that D(v, 1) is not we have to show only (1) =# (5). Suppose that there is a connected set S such that D(S, 1) is not m 3 -convex. Then there are vertices x, y in D(S, 1) and there is an induced path such that k # 2 and at least one vertex u i is not in D(S, 1). We may choose x, y, and P such that |P | is minimal. Case 1. We immediately conclude x, y / # S. Moreover no u is adjacent to some vertex of S. Let Q be a shortest path in G({x, y}#S) connecting x and y. Since Q# {x, y} is completely contained in S and both P and Q are induced, the cycle C formed by P and Q is chordless. From |P | # 4 we conclude |C| # 5-a contradiction. Case 2. |D(S, By minimality of |P |, we obtain # D(S, 1), and u 2 # D(S, 1) (see Figure 5). Let be a shortest path in G({x, y} # S) connecting x and y and define Q # := Q# {x, y}. First consider the case 2. Note that x, u 2 / # S, and u 1 is not adjacent to any vertex of Q # . Since the cycle x - x is of length at least 5 the cycle lemma applied to the edge xu 1 gives z 1 a house. Hence l # 2. If u 2 z 2 # E then we obtain a house. So let u 2 z 2 / # E. If y is adjacent to z 2 then we have a domino. Thus l # 3 and we can apply the cycle lemma to the edge z 1 u 2 in the cycle of length at least 5. So we conclude which gives a domino. Now consider the case 3. Note that x, y, u 2 / # S. Since Q # is completely contained in S neither u 1 nor u 3 is adjacent to any vertex of Q # . On the other hand, the cycle x - x is of length at least 6. Thus the cycle lemma applied to the edge u 3 y implies u 2 z l # E. If z l x / proceed as in the case we obtain a domino. Thus, for every connected set S, D(S, 1) is m 3 -convex. It is easy to see that D(S, 1) is connected too. Now, since D(S, 1), we are done by induction on k. Corollary 2.10. If in a HHD-free graph nonadjacent vertices x, y # N k (v) are joined by a path P such that P # {x, y} is contained in V # D(v, k), then there is a common neighbor of x and y in N k+1 (v) # P . 3. Weak bipolarizable graphs. Here we characterize weak bipolarizable graphs as the graphs for which the m 3 -convex alignment is a convex geometry. Let M 3 (G) CONVEXITY AND HHD-FREE GRAPHS 127 denote the set of all m 3 -convex sets of a graph G. For a set S # V the m 3 -convex hull m 3 -conv(S) is the smallest member of M 3 (G) containing S. A set H # V is homogeneous i# N(x) # any pair of vertices x, y of H. A homogeneous set H is proper The next lemma gives a nice criterion for checking the semisimpliciality of a vertex. Lemma 3.1. A vertex v of a graph G is semisimplicial in G i# the connected components of the complement of G(N(v)) are homogeneous in G. Proof. If v is not semisimplicial then there is a P 4 containing v as midpoint, say belong to a common connected component C of the complement of G(N(v)). But C is not homogeneous in G due to u 3 . To prove the converse let C be a connected component of the complement of G(N(v)) and suppose that C is not homogeneous in G. Then there must be vertices a vertex z # V #C such that xz # E but yz / # E. We may choose x and y such that their distance in the complement of G(C) is minimal. Obviously, z #= v. Moreover, since yz / every vertex from N(v) # C must be adjacent to every vertex of C, we have z / # N(v). Thus z # N 2 (v). If xy / y be a shortest path in the complement of G(C). Thus xu 1 / # E. The minimal distance of x, y now implies u 1 z / # E. Therefore, z Theorem 3.2 ([23]). A graph G is weak bipolarizable i# each induced subgraph F of G is chordal or contains a proper homogeneous set. Let H be a proper homogeneous set in G and v # H. Then the homogeneous reduction HRed(G,H, v) is the graph induced by V (G) # (H # {v}). Conversely, the homogeneous extension HExt(G, v, H) of G via a graph H in v with V (H)#V is the graph obtained by substituting v by H such that the vertices of H have the same neighbors outside of H as v had in G. Lemma 3.3. Let H be a proper homogeneous set of a HHD-free graph G and (1) If x is semisimplicial in HRed(G,H, v), but not in G, then x # H, i.e., (2) If x # H is semisimplicial in H, but not in G, then no vertex of H is semisim- plicial in G and v is not semisimplicial in HRed(G,H, v). Proof. Since no P 4 contains a proper homogeneous set, we conclude that for any 4-path P of G, either P # H or |P # H| # 1. (1) Since x is not semisimplicial in G it must be a midpoint of some 4-path P . If H then the semisimplicity of x in HRed(G,H, v) implies |P now we can replace the vertex of P #H by v obtaining a P 4 in HRed(G,H, v), which contains x as a midpoint-a contradiction. Thus x # H, i.e., (2) If x # H is semisimplicial in H, but not in G, then no P 4 in G containing x as a midpoint is completely contained in H. Thus P # 4-path P in G with midpoint x. Since H is homogeneous we can replace x in P by any vertex of H. Thus no vertex of H is semisimplicial in G, and v is not semisimplicial in HRed(G,H, v). In [16] it is proved that in a chordal graph every nonsimplicial vertex lies on an induced path between two simplicial vertices. Next we present a stronger result which we will subsequently use. Lemma 3.4. Let G be a chordal graph and be an induced path of length at least 2, i.e., k # 3. Then there are vertices t, such that u 1 , w 1 are simplicial and 128 FEODOR DRAGAN, FALK NICOLAI, AND ANDREAS BRANDST ADT is an induced path in G. Proof. If both v 1 and v k are simplicial then we are done. So suppose that v 1 is not simplicial. Let M be the m-convex hull of {v 1 , . , v k } and S be the neighborhood of v 1 in M . Obviously, S is a v 1 - v 3 -separator in M , i.e., v 1 and v 3 are in di#erent connected components of G(M)#S. We show that S is a v 1 - v 3 -separator in G too. Assuming the contrary there must be an induced path P in V # S joining v 1 and v 3 . Since S is the set of neighbors of v 1 in M the neighbor of v 1 in P does not belong to M . Thus P is an induced path between vertices of M which contains vertices of V #M , a contradiction to the m-convexity of M . Therefore, S is a v 1 - v 3 -separator in G. Recall that every chordal graph is either complete or contains at least two nonadjacent simplicial vertices [7, 24]. Thus G(M) as a chordal graph must contain at least two simplicial vertices. Since deleting a simplicial vertex from a m-convex set preserves m-convexity and since M is the m-convex hull of {v 1 , . , v k } we immediately conclude that v 1 and v k are the only two simplicial vertices of M . Thus S is complete. 1 is not simplicial and all neighbors of v 1 are contained in F := G(K #S), where K is the connected component of G# S containing v 1 , the chordal graph F is not complete and hence there are two nonadjacent simplicial vertices in F . By the completeness of S at most 1 of them is in S. Thus we have a simplicial vertex u 1 in K which is simplicial in G too. Now consider a path P connecting the vertices v 1 and K. Then no vertex up to v 2 of an induced subpath of the path has a neighbor in {v 3 , , v k }. Hence, an induced path. For v k we proceed analogously. Note that every simplicial vertex is semisimplicial and thus, every nonsemisim- plicial vertex is nonsimplicial. Lemma 3.5. Every nonsemisimplicial vertex of a weak bipolarizable graph G lies on an induced path of length at least 3 between two semisimplicial vertices. Proof. We prove the assertion by induction on the size of G. The assertion holds for all graphs with at most 4 vertices since the only graph of these sizes which contains a nonsemisimplicial vertex is the P 4 . Let x be a nonsemisimplicial vertex of G, i.e., x is a midpoint of some P 4 . If G is chordal then by Lemma 3.4 there is a path P of length at least 3 containing x such that both endpoints of P are simplicial and thus semisimplicial in G. Consequently, we are done. Now assume that G is not chordal. Hence, by Theorem 3.2, G contains a proper homogeneous set H. Case 1. x # H. Suppose that x is semisimplicial in HRed(G,H,x). Then by Lemma 3.3 (2), vertex x is not semisimplicial in H. By the induction hypothesis x lies on an induced path of length at least 3 between semisimplicial vertices y, z in H. By Lemma 3.3 (2), both y and z must be semisimplicial in G too. Now assume that x is not semisimplicial in HRed(G,H,x). By the induction hypothesis x lies on an induced path between semisimplicial vertices y, z in HRed(G,H,x). In particular, y, z / # H. Thus by Lemma 3.3 (1), both y and z must be semisimplicial in G too. Case 2. x / From Lemma 3.3 (1) we immediately conclude that x is not semisimplicial in HRed(G,H, v), where v is a semisimplicial vertex in the weak bipolarizable graph H. CONVEXITY AND HHD-FREE GRAPHS 129 By the induction hypothesis x lies on an induced path between semisimplicial vertices y, z in HRed(G,H, v). Suppose that y is not semisimplicial in G. From Lemma 3.3 (1), we infer not semisimplicial in HRed(G,H, v) by Lemma 3.3 (2)-a contradiction. Thus both y and z are semisimplicial in G too. To prove the next corollary we use the arguments of the proof of [16, Corollary 3.4]. Corollary 3.6. The Caratheodory number of the m 3 -convex alignment of a bipolarizable graph is at most 2. Proof. Let E) be a weak bipolarizable graph and S be a subset of V . Pick an arbitrary vertex x # m 3 -conv(S). If x is semisimplicial in the subgraph induced by m 3 -conv(S), then x # S since each extreme point of m 3 -conv(S) is in S by the definition of the hull of S. Otherwise, by Lemma 3.5, x lies on an induced path of length at least 3 between semisimplicial vertices of the subgraph induced by Hence, x is in the m 3 -convex hull of two extreme points of m 3 -conv(S). Since each extreme point of m 3 -conv(S) is in S we are done. Subsequently, we call a vertex set S of G reachable i# there is an ordering (v 1 , . , v k ) of V # S such that for each semisimplicial in Theorem 3.7. The following conditions are equivalent for a graph G: (1) G is weak bipolarizable. (2) In every induced subgraph F of G each nonsemisimplicial vertex lies on an induced path of length at least 3 between semisimplicial vertices of F . Each m 3 -convex set of G is the hull of its semisimplicial vertices, i.e., (V (G), 3 (G)) is a convex geometry. (4) A set S of G is m 3 -convex i# there is an ordering (v 1 , . , v k ) of V (G)#S such that for each i.e., S is reachable. Proof. We only need to prove (4) =# (1). Claim 1. If S is a m 3 -convex set in F := HRed(G,H, v), where H is a proper homogeneous set of G, then is m 3 -convex in G. Suppose S # is not m 3 -convex in G. Then there must be vertices x, y # S # and an induced path P of length at least 3 joining x and y such that P # S #. If is an induced path in F of length at least 3 joining vertices of S which has at least one vertex outside S, a contradiction to the m 3 -convexity of S in F . Now suppose |H #P | # 2. Note that P #H #. Let be a maximal by inclusion subpath of P completely contained in 2. If u since P #H #. Since H is homogeneous must be adjacent to the neighbor of u k in P # P # -a contradiction. If u 1 #= x then the same argument can be applied to u k and the neighbor of u 1 in P #P # . Now 1. For |H # P | # 2 there must be a vertex z # H # P # N(u 1 ). But now imply some chords in P , again a contradiction. Therefore, S # is m 3 -convex in G. 2. Every homogeneous set H of a graph G is m 3 -convex. Let x, y be nonadjacent vertices of a homogeneous set H in G. If x has a neighbor z outside H then yz # E, and vice versa. Thus any induced path between nonadjacent ADT vertices of H containing vertices from V # H must be of length 2. Consequently, H is m 3 -convex in G. 3. Let H be a proper homogeneous set of a graph G. If S is m 3 -convex in then it is so in G. Since S is a subset of H we can use the same arguments as in the proof of 2. 4. If v is a simplicial vertex in a graph G then any m 3 -convex set of G#{v} is m 3 -convex in G. Since the neighborhood of a simplicial vertex v is complete no induced path of length at least 3 can contain v as an inner point. Now we prove by induction on the size of G that any graph fulfilling (4) is weak bipolarizable, i.e., HHDA-free. Since any singleton of V (G) is a m 3 -convex set, G possesses a semisimplicial ordering, and thus does not contain a hole or a domino. Let F be an induced subgraph of G isomorphic to the house and K be the 3-clique of F . Now the m 3 -convex set K must be reachable, but no vertex of F # K is semisimplicial in F -a contradiction. Therefore, G is a HHD-free graph. Case 1. G contains a proper homogeneous set H. Let v be a vertex of H, F := HRed(G,H, v) and S be a m 3 -convex set in F . Then S # as defined in Claim 1 is m 3 -convex in G and thus reachable. Hence, S is reachable in F since each semisimplicial vertex of G is semisimplicial in every induced subgraph containing this vertex. Therefore, F fulfills (4) and, by the induction hypothesis, is HHDA-free. Applying the same arguments to a m 3 -convex set S of H and using implies that H is HHDA-free. Now we conclude that G itself is HHDA-free as the homogeneous extension of the HHDA-free graph F by the HHDA-free graph H (see [23]). Case 2. G has no proper homogeneous set. Suppose G contains an "A" induced by the 4-cycle x - c - d - y - x and the pendant vertices a, b where In what follows we prove that in G. Thus M must be reachable, but neither c nor d are semisimplicial in the "A"-a contradiction. First note that every semisimplicial vertex v of G is simplicial due to Lemma 3.1. From Claim 4 we conclude that G # {v} fulfills (4) and thus, by the induction hypothesis, is HHDA-free. Therefore, a and b are the only semisimplicial vertices of G, and D(a, 1), D(b, 1) are complete. . If there is a common neighbor z of a and b, then z is adjacent to all vertices y. Considering the cycle z - a - x - y - b - z implies the edges zx and zy. Now {z, y, c, d} induces a house, thus zc # E or zd # E. Suppose zc / induces a house. Hence both zc # E and zd # E. . N(a) # N(c) and N(b) # N(d). Let w be a neighbor of a and suppose wc / # E. Thus w #= x, wx # E, and # E. Since G#{a} is HHDA-free w must be adjacent to y or d. If wy # E then the graph induced by {w, x, y, c, d} implies wd # E. Hence wd # E. But now {a, x, w, c, d} induces a house. . Every vertex of N(a) is adjacent to every vertex of N(b). If w # N(a) # N(b), then w is adjacent to all vertices of N(a) # N(b) since both D(a, 1) and D(b, 1) are complete. So suppose for the contrary that there are nonadjacent vertices z # N(a)#N(b) and w # N(b)#N(a). Since xy # E we have either z = x and w #= y, z #= x, and y. CONVEXITY AND HHD-FREE GRAPHS 131 First assume z = x (analogously, y). The graph induced by {w, d, y, c, z} implies wc # E. But now {b, y, w, z, c} induces a house. So let x #= z and y By the same arguments as above we may assume zy # E and wx # E. Now considering {w, d, y, z, c} gives zd # E or wc # E. By symmetry, say wc # E. But this yields a house induced by {b, y, w, z, c}. To complete the proof suppose that G. Then there must be nonadjacent vertices and an induced path P of length at least 3 joining w and z such that P #M is nonempty. Since every vertex of N(a) is adjacent to every vertex of N(b) we conclude {w, z} # {a, b} #. Say z = a. Then # D(a, 1). Let z # be the neighbor of z in P , i.e., z # N(a). If w # N(b) then z # w # E gives a contradiction. Hence b. Now consider the neighbor w # of w in P . From w # N(b) we conclude z # w # E-again a contradiction. 4. The existence of r-dominating cliques. Let r : V # N be some vertex function defined on G. Then a set D # V r-dominates G i# for all vertices x in V #D there is a vertex y # D such that d(x, y) # r(x). D is a r-dominating clique i# D is complete and r-dominates G. Note that there are graphs and vertex functions r such that G has no r-dominating clique. For some graph classes, such as chordal, distance- hereditary, and HHDS-free graphs, there is an existence criterion for r-dominating cliques [9, 8, 10]. In what follows we prove this criterion for HHD-free graphs. The method is similar to the one used for chordal graphs in [9] and essentially exploits 3 -convexity of disks in HHD-free graphs. Lemma 4.1. Let C be a clique in a HHD-free graph G and v be a vertex of G such that for all vertices w of C the distance to v is k # 1. Then there is a vertex u at distance k - 1 to v which is adjacent to all vertices of C. Proof. We prove the assertion by induction on k. For there is nothing to show. Let x be a vertex of N k-1 (v) adjacent to a maximal number of vertices of C. Suppose that there is some vertex a # C which is not adjacent to x, and let y be a neighbor of a in N k-1 (v). By the choice of x there must be a vertex b # C adjacent to x but not to y. Thus we have the path x - b - a - y of length 3 between vertices x, y of D(v, k - 1), which contains vertices a, b outside of D(v, k - 1). By Theorem 2.9 by applying the induction hypothesis to the clique {x, y} we obtain a common neighbor u of x, y in N k-2 (v). Therefore we have constructed a house-a contradiction. In a similar way we can prove the following lemma. Lemma 4.2. If x, y, v are vertices of a HHD-free graph G such that d(x, d(y, #, then there is a vertex u # N(x)#N(y)# Define the projection of a vertex v to a set S by and the projection of a set C to a set S by P roj(C, S) := # v#C P roj(v, S). Lemma 4.3. Let u, v be vertices of a HHD-free graph. Then for any vertex x in D(v, there is a shortest path between u and x going through the projection Proof. If {u} and there is nothing to show. 1. Choose an arbitrary vertex w # P roj(u, D(v, k)) and assume be a shortest path connecting u and x, and let z be the vertex of V (P closest to u on the path P (see Figure 6). Thus ADT z x D(v, z x D(v, a c Fig. 6. then we are done. So assume z / implying d(u, z) > d(u, w). Note that zw / is a contradiction. Thus by Corollary 2.10 there is a common neighbor a of w and z in N k+1 (v) # P implying that d(u, z) # d(u, w) 2. Moreover, applying Lemma 4.2 to z, w, and v gives a common neighbor b of z, w in N k-1 (v). By distance requirements ab / applied to {a, w} and u, yields a common neighbor c of a, w at distance d(u, w) - 1 to u. Thus neither cz # E nor Consequently, {a, b, c, w, z} induces a house. be subsets of V . The sets U 1 , U 2 form a join i# any vertex of U 1 is adjacent to any vertex of U 2 . Lemma 4.4. Let G be a HHD-free graph and xy be an edge outside of D(v, k). Moreover, assuming P roj(x, D(v, implies that the sets P roj Proof. We will present the proof for the equidistant case, i.e., d(x, The cases d(x, can be handled in a similar (even way. Let A := P roj(x, D(v, k)) #P roj(y, D(v, k)), B := P roj(x, D(v, k)) #A, and C := P roj(y, D(v, k)) #A. Suppose we have contradiction to Corollary 2.10. Therefore, w x w y # E. Let b (c) be the neighbor of w x (w y ) in a shortest path P x Lemma 2.2 applied to the edge w x w y in the cycle induced by the vertices of P x and induces a house where s is a common neighbor of w x w y in N k-1 (v) due to Lemma 4.1. Consequently, either Finally, suppose w # E. Consider the three vertices v. By Corollary 2.10 there is a common neighbor z of w and w x at distance to v and d(x, w) - 1 to x. By Lemma 4.2 there is a common neighbor u of w and w x at distance k - 1 to v. Let t be the neighbor of w on a shortest path joining w and y. Since w x / # A we have tw x / # E. By distance requirements zu, tu / induces a house. So assume tz / consider the cycle C formed by w and by the shortest paths joining t, y and z, x. Obviously |C| # 5. Applying the circle lemma to edge zw yields the edge ts, where s is the neighbor of CONVEXITY AND HHD-FREE GRAPHS 133 z in the shortest path between x and z. By distance requirements {s, t, z, w, w x , u} induces a domino. Therefore, A and B form a join. Lemma 4.5. Let G be a HHD-free graph and C be a clique such that C # D(v, #. Then there is some vertex u # N k-1 (v) adjacent to all vertices of Proof. Choose a maximal clique C # in P roj(C, D(v, k)) containing C # D(v, k). By Lemma 4.1 there is a vertex a in N k-1 (v) adjacent to all vertices of C # . Choose such a vertex a with a maximal number of neighbors in P roj(C, D(v, k)) and suppose that there is some vertex y # P roj(C, D(v, k)) # C # nonadjacent to a. Since C # is maximal there is a vertex w # C # which is not adjacent to y. Note y / # C. Thus there is a common neighbor z of y and w in N k+1 (v) (either z # C or the existence of z follows from Corollary 2.10). Now applying Lemma 4.2 to w, y gives a common neighbor b of w and y in N k-1 (v). By distance requirements za, zb / # E. If ab # E, then {a, b, y, z, w} induces a house. If ab / # E, then we can apply Lemma 4.2 to a, b yielding a common neighbor c of a, b in N k-2 (v). But now {c, a, b, y, w, z} induces a domino. Theorem 4.6. Let G be a HHD-free graph and r : V # N be a vertex function on G. Then G has a r-dominating clique i# for all vertices Proof. Obviously, if G has a r-dominating clique then the inequality is fulfilled. To prove the converse let (v 1 , . , v n ) be any ordering of V and suppose that there is a clique C which r-dominates {v 1 , . , v i-1 } but not v i . Thus d(v i , C) # r(v there is some vertex c # C such that d(c, v k Lemma 4.3 there is a shortest path joining c and going through B. Thus v k is r-dominated by some vertex of B. Now choose a vertex x k in D(v k , r(v k Lemma 4.3 there is a shortest path joining c and x k which contains a vertex of B, say y since both c and x k are contained in the m 3 -convex set D(v k , r(v k )). and we are done since v k is r-dominated by y k . So let d(c, x k 2. Again, if then we are done. Thus immediately conclude 4.2 applied to neighbor a of c and x k at distance r(v k ) -1 to v k . Since applying Lemma 4.1 to the edge x k y k and to v i yields a common neighbor b of x k and y k at distance r(v i ) to v i . By distance requirements the set {a, b, x k , y k , c} induces a house-a contradiction. Thus y k r-dominates v k and we are done. Let C # be a maximal clique in P roj(C, D(v i , r(v 1). By Lemma 4.5 there is a vertex a in N r(v i adjacent to all vertices of B. Define C # := C # {a}. 2. C # r-dominates Obviously, a r-dominates v i . Suppose there is some vertex v k , k # i - 1 which is not r-dominated by C # . By r-dominated by B. More exactly, there is a vertex c # C and a vertex y r-dominating ADT is maximal there must be a vertex w # C # nonadjacent to y k . By Lemma 4.4 both vertices y k , w are contained in the projection of c. Let z be a common neighbor of w and y k at distance d(c, w) - 1 to c obtained from Lemma 4.2. If d(y k , c) # 3 then the m 3 -convexity of D(v k , r(v k )) implies z # Now we can apply Lemma 4.1 to the edge y k z obtaining a common neighbor s of y k and z at distance r(v k to v k . By distance requirements sw, sa, az / # E. Thus {s, w, a, z, y k } induces a house. In a similar way we can handle the case 2. If z # then we proceed as above. So by assuming d(z, v k ) > r(v k ) we have Now we can apply Lemma 4.2 to obtaining a common neighbor b of c, y k at distance r(v k ) - 1 to v k . By distance requirements bw, ba / # E. Thus {c, b, z, y k , a, w} induces a domino. Consequently we have constructed a clique which r-dominates {v 1 , . , v i }. Induction on i settles the proof. Corollary 4.7. For a HHD-free graph G we have Proof. Suppose that diam(G) < 2(rad(G) - 1). Then by Theorem 4.6 for r(v) := there exists a r-dominating clique C in G. Hence, any vertex v of C has e(v) # rad(G) - 1, a contradiction to the definition of the radius. Acknowledgments . The authors are indebted to two anonymous referees for constructive comments improving the presentation. --R Perfect elimination orderings of chordal powers of graphs Domination problems on permutation and other graphs Centers of triangulated graphs On rigid circuit graphs Dominating cliques in distance-hereditary graphs "Graphs and Combinatorics," Convex sets in graphs II: Minimal path convexity Ensemble convexes dans les graphes I On diameters and radii of bridged graphs Convexity in graphs and hypergraphs On local convexity in graphs Algorithmic Graph Theory and Perfect Graphs On the semi-perfect elimination A perspective on abstract convexity: Classifying alignment by varieties The Interval Function of a Graph Triangulated graphs and the elimination process Algorithmic aspects on vertex elimination on graphs Conditions for invariance of set diameters under d- convexification in a graph Simple linear time algorithms to test chordality of graphs --TR --CTR J. Sawada, Oracles for vertex elimination orderings, Theoretical Computer Science, v.341 n.1, p.73-90, 5 September 2005 Victor Chepoi , Feodor Dragan, Finding a central vertex in an HHD-free graph, Discrete Applied Mathematics, v.131 n.1, p.93-111, 6 September
convexity;weak bipolarizable graphs;chordal graphs;convex geometry;semisimplicial ordering;antimatroid;HHD-free graphs;lexicographic breadth first search;dominating clique problem
308003
The Timed Asynchronous Distributed System Model.
AbstractWe propose a formal definition for thetimed asynchronous distributed system model. We present extensive measurements of actual message and process scheduling delays and hardware clock drifts. These measurements confirm that this model adequately describes current distributed systems such as a network of workstations. We also give an explanation of why practically needed services, such as consensus or leader election, which are not implementable in the time-free model, are implementable in the timed asynchronous system model.
Introduction Depending on whether the underlying communication and process management services provide "certain com- munication", distributed systems can be classified as either synchronous or asynchronous [7]. By certain communication we mean that 1) at any time there is a minimum number of correct processes, and 2) any message m sent by a correct process to a correct destination process is received and processed at the destination within a known amount of time, i.e. the probability that m is not received and processed in time is "negligible". The authors of [28], [5] explain what it means for failures to be negligible. A synchronous system guarantees certain communication. All other systems are asynchronous. To achieve certain communication, one assumes that the frequency of failures that can occur in a system is bounded. This bounded failure frequency assumption allows system designers to use space [8] or time redundancy [32] to mask lower level communication failures and provide the abstraction of certain communication. However, for almost all distributed systems it is not reasonable to assume that the failure frequency is bounded. Dependable systems are characterized by strict stochastic specifications [5]. Hence, even if one tries to fix the unpredictability of a system to achieve certain communication (e.g. through admission control, resource allocation, redundant communication channels, etc.), the probability of communication failures might still not be negligible. For many dependable systems it is therefore not necessarily reasonable to assume that communication is certain. In this paper we define an asynchronous system model that makes much simpler assumptions than a synchronous sys- Department of Computer Science, UC San Diego, La Jolla, CA 92093\Gamma0114. e-mail: flaviu@cs.ucsd.edu, cfetzer@cs.ucsd.edu. A short version of this paper appeared in the Proceedings of Proceedings of the 28th Annual International Symposium on Fault-Tolerant Computing, 1998. This research was supported by grants F49620-93 and F49620-96 from the Air Force Office of Scientific Re- search. More information about the timed model is available at http: //www.cs.ucsd.edu/~cfetzer/MODEL. model. Hence, the probability that one of these assumptions is violated is much smaller than the probability of a violation of the the assumptions of a synchronous sys- tem. Nevertheless, this asynchronous system model is still strong enough to serve as a foundation for the construction of dependable applications. Most published research on asynchronous systems is based on the time-free model [21]. This model is characterized by the following properties: 1) services are time- free, i.e. their specification describes what outputs and state transitions should occur in response to inputs without placing any bounds on the time it takes these outputs and state transitions to occur, 2) interprocess communication is reliable (some researchers relax this condition), i.e. any message sent between two non-crashed processes is eventually delivered to the destination process, crash failure semantics, i.e. processes can only fail by crash- ing, and 4) processes have no access to hardware clocks. In the time-free model a process cannot distinguish between a non-crashed (but very slow) and a crashed process. Most of the services that are of importance in practice, such as consensus, election or membership, are therefore not implementable [21], [2]. The timed asynchronous distributed system model (or, shorter the timed model) which we define formally in this paper assumes that 1) all services are timed: their specification prescribes not only the outputs and state transitions that should occur in response to inputs, but also the time intervals within which a client can expect these outputs and transitions to occur, 2) interprocess communication is via an unreliable datagram service with omis- sion/performance failure semantics: the only failures that messages can suffer are omission (message is dropped) and performance failures (message is delivered late, have crash/performance failure semantics: the only failures a process can suffer are crash and performance fail- ures, have access to hardware clocks that proceed within a linear envelope of real-time, and 5) no bound exists on the frequency of communication and process failures that can occur in a system. We feel this model adequately describes existing distributed systems built from networked workstations. In contrast with the time-free model, the timed model allows practically needed distributed services such as clock synchronization, mem- bership, consensus, election, and atomic broadcast to be implemented [4], [10], [14], [6], [13]. Since it does not assume the existence of hardware clocks or timed services, the time-free model may appear to be more general than the timed model. However, all workstations currently on the market have high-precision quartz IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, TO APPEAR IN 1999 clocks, so the presence of clocks in the timed model is not a practical restriction. Moreover, while it is true that many of the services encountered in practice, such as Unix processes and UDP, do not make any response-time promises, it is also true that all such services become de facto "timed" whenever a higher level of abstraction that depends on them - at the highest level: the human user - fixes a timeout to decide if they have failed. Therefore, from a practical point of view the requirements that services be timed and processes have access to hardware clocks do not make the timed model less general than the time-free model. In fact, the failure semantics of interprocess communication in the time-free model (as defined in [21]) is much stronger than in the timed model: while in the time-free model there cannot exist system runs in which correct processes are disconnected for the entire run, the timed model allows runs in which correct processes are permanently dis- connected. Thus, while the time-free model excludes the possibility that correct processes be partitioned, the timed model allows such partitioning to be naturally modeled as the occurrence of sufficiently many message omission or performance failures. This characteristic of the timed model reflects the situations in which communication partitions can be observed for hours, or even days in real sys- tems, especially those based on wide area networks, like the Internet. Thus, from a practical point of view, the timed model is more general than the time-free one, because allows partitions to be modeled naturally, and its assumptions that services are timed and processes have access to hardware clocks are not restrictive from a practical point of view. The goals of this paper are to 1) propose a formal definition for the timed asynchronous distributed system model, extensive measurements of actual message and process scheduling delays and clock drifts that confirm that this model adequately describes current run-of-the-mill distributed systems built from networked workstations, and give an intuitive explanation of why practically important services such as consensus or leader election, which are not implementable in the time-free asynchronous system model, are implementable in the timed model. II. Related Work Distributed system models can be classified according to what they assume about network topology, synchrony, failure model, and message buffering [23]. According to this taxonomy, the timed asynchronous model can be characterized as follows: ffl network topology: any process knows the complete set of processes and can send messages to any process. The problem of routing messages for irregular topologies is assumed to be solved by a lower level routing protocol. ffl synchrony: services are timed and processes have access to local hardware clocks whose drift rates from real-time are bounded. The timed service specifications allow the definition of timeout delays for message transmission and process scheduling delays. ffl failure model: processes can suffer crash or performance failures; the communication service can suffer omission or performance failures. ffl message buffering: finite message buffers and non-FIFO delivery of messages. Buffer overflows do not block senders, but result in message omission failures. The most important difference between the timed model and the time-free model [21] is the existence of local hardware clocks. Many distributed applications are specified using real-time constraints. For example, if a component fails, then within X time units the application has to perform some action. Hardware clocks allow one to implement application level "time-outs". The timed asynchronous system model was introduced (without being named) in [4]. It was further refined in [10] and renamed to avoid confusion with the time-free model [21]. In particular, [10] introduces system stability predicates and conditional timeliness properties to capture the intuition that as long as the system is stable, that is, the number of failures affecting the system is below a certain threshold, the system will make progress within a bounded time. Well-tuned systems are expected to alternate between long periods of stability and short periods of instability, in which the failure frequency increases beyond the assumed threshold. In [14] we formalized this as progress assump- tions. A progress assumption is an optional extension of the "core" timed asynchronous system model (see Section IV): a progress assumption states that after an unstable period there always exists a time interval of some given minimum length in which the system will be stable. Progress assumptions allow one to solve problems like consensus, that were originally specified by using unconditional termination conditions (defined in Section VI-A), as opposed to our use of conditional timeliness properties (see Section VI-A). One can view a progress assumption as a formal way to require the parameters of the timed model (the one-way time-out delay Section III-B and the scheduling timeout delay Section III-C.2) to be well chosen. Progress assumptions are similar to the global stabilization requirement of [11] which postulates that eventually a system must permanently stabilize, in the sense that there must exist a time beyond which all messages and all non-crashed processes become timely. However, progress assumption only require that infinitely often there exists a majority set of processes that for a certain minimum amount of time are timely and can communicate with each other in a timely manner. Progress assumptions have also a certain similarity with failure detectors [3], which are mechanisms to strengthen the time-free model: certain failure detector classes provide their desired behavior based on the observation that the system eventually stabilizes. The main differences between the model of [3] and the timed model are the follow- ing: 1) the timed model allows messages to be dropped and processes to recover after a crash, and 2) the timed model provides processes with access to hardware clocks while the model of [3] provides processes with access to a failure de- tector. Note that hardware clocks can be used to detect CRISTIAN AND FETZER: THE TIMED ASYNCHRONOUS DISTRIBUTED SYSTEM MODEL 3 failures. To further highlight the similarities and differences which exist between the synchronous and the timed asynchronous system models, [7] compares the properties of fundamental synchronous and asynchronous services such as membership and atomic broadcast. We will sketch in Section VI that certain problems that are implementable in synchronous systems are not implementable in timed asynchronous systems. Previously, other authors addressed possibility issues. For example, [24] and [27] address the issue of what problems can be simulated in an asynchronous system. In Section VI we do however not address simulation issues: for example, we are concerned about how one can ensure that there are no two leaders at any point in real-time and we are not interested in solutions where there are no two leaders in virtual time. This difference is important for real-time systems that have to interact with external processes. In [15] we introduced the notion of fail-awareness as a systematic means of transforming synchronous service specifications into fail-aware specifications that become implementable in timed asynchronous systems. The idea is that processes have to provide their "synchronous prop- erties" as long as the failure frequency is below a given bound and whenever a property cannot be guaranteed any- more, this is detectable in a timely manner by all correct clients that depend on this property. Our claim is that the weakened fail-aware specification is still useful while implementable in a timed system. Fail-awareness depends on the timely detection of message performance failures. We introduced in [19] a mechanism that allows a receiver r of a message m to detect if m has suffered a performance failure: the basic idea is that 1) one can use local hardware clocks to measure the transmission delay of a message round-trip, and 2) one can use the duration of a round-trip that contains m as an upper bound for the tranmission delay of m. We introduced in [19] several optimizations to provide a better upper bound for m. [12] describes the use of the timed model and a fail-aware datagram service in a fully automated train control system. The quasi-synchronous model [31] is another approach to define a model that is in between synchronous systems and time-free asynchronous systems. It requires (P1) bounded and known processing speeds, (P2) bounded and known message delivery times, (P3) bounded and known drift rates for correct clocks, (P4) bounded and known load pat- terns, and (P5) bounded and known deviations among local clocks. The model allows for at least one of the properties (Px) to have incomplete assumption coverage, that is, a non-zero probability that the bound postulated by (Px) is violated at run-time [28]. In comparison, the timed asynchronous system model assumes that the coverage of (P3) is 1, the coverage of (P1) and (P2) can be any value, and it does not make any assumptions about load patterns or the deviation between local clocks. III. The Model A timed asynchronous distributed system consists of a finite set of processes P , which communicate via a datagram service. Processes run on the computer nodes of a network (see Figure 1). Lower level software in the nodes and the network implements the datagram service. Two processes are said to be remote if they run on separate nodes, otherwise they are local. Each process p has access to a local hardware clock. The process management service that runs in each node uses this clock to manage alarm clocks that allow the local processes to request to be awakened whenever desired. We use o, p, q, and r to denote processes, s, t, u, and v to denote real-times, S, T , U , and V to denote clock times, and m, and n to denote messages. node 7:24 hardware c lock r process networkFig. 1. Processes in a timed asynchronous system have access to local hardware clocks and communicate via datagram messages across a network. A. Hardware Clocks All processes that run on a node can access the node's hardware clock. The simplest hardware clock consists of an oscillator and a counting register that is incremented by the ticks of the oscillator. Each tick increments the clock value by a positive constant G called the clock granular- ity. Other hardware clock implementations are described in [26]. Correct clocks display strictly monotonically increasing values. We denote the set of real-time values with RT and the set of clock values with CT . The clock H p of process p is represented by a function H p from real-time to clock-time: denotes the value displayed by the clock of p at real-time t. Local processes access the same clock, while remote processes access different clocks. Thus, if processes p and q are running on the same node, H Due to the imprecision of the oscillator, temperature changes, and aging, a hardware clock drifts apart from real-time. Intuitively, the drift rate of a hardware clock indicates how many microseconds a hardware clock drifts apart from real-time per second. For example, a drift rate of 2 s s means that a clock increases its value by 1sec every second. We assume the existence of a constant maximum drift rate ae 1 that bounds the absolute value of the drift rate of a correct clock. Thus, the drift rate of a correct clock is at least \Gammaae and at most +ae (see Figure 2). The constant ae is known to all processes. A correct clock measures the duration of a time interval [s; t] with an error within [\Gammaae(t\Gamma G; G]. The term G accounts for the error due to the granularity of the clock and the factor ae for the error due to the drift of the clock. We define a predicate correct u Hp that is true iff p's hardware clock H p is correct at time u. The definition is based on the intuition that H p has to measure the duration of any time interval [s; t] before u with an absolute error of at most correct u The ae bound on the drift rate causes any correct clock to be within a narrow linear envelope of real-time (see Figure 2). +r dt __ __ dT dt dt dT -r __ real-time clock-timet Fig. 2. At any point in time the drift rate of a correct hardware clock Hp is within [-ae,+ae]. Note that the drift rate does not have to be constant since it can change over time and can assume any value within [-ae,+ae]. When one analyzes the drift error of a clock, it is possible to distinguish (1) a systematic drift error due to the imprecision of its oscillator, and (2) drift errors due to other reasons such as aging or changes in the environment. The speed of a calibrated hardware clock is changed by a constant factor c to reduce the systematic drift error. The relation between an uncalibrated clock H p and its calibrated counterpart H calibrated p can be expressed as follows: calibrated Hardware clock calibration can be done automatically in systems that have Internet access or have local access to an external time provider such as a GPS receiver. Clocks are externally synchronized if at any instant the deviation between any correct clock and real-time is bounded by a known constant. Clocks are internally synchronized if the deviation between any two correct clocks is bound by a known constant. If all correct clocks in a system are externally synchronized by some known ffl, then the clocks are also internally synchronized by 2ffl. Clock calibration can be done once during the lifetime of a system. However, to account for aging of a clock, it makes sense to recalibrate the clock occasionally. Internal and external clock synchronization needs to be performed periodically to account for the ongoing drift of all clocks. The timed asynchronous system model does not require clocks to be calibrated, nor to be externally or internally synchronized. Only their drift rate has to be bounded by ae. However, it is advantageous to calibrate hardware clocks since this allows the reduction of the maximum drift rate (see below). A.1 Measurements Common operating systems provide processes access to a "real-time clock". This real-time clock is more or less synchronized with real-time, e.g. UTC (universal time) or GPS time. In many Unix domains one tries to maintain a good synchronization with real-time using time services like NTP [25]. However, processes do not always know how good the synchronization with real-time is. There might not even exist an upper bound on the drift rate of a real-time clock because an operator can change the speed of the real-time clock [1]. More recent operating systems provide processes access to hardware clocks that are not subject to adjustments, i.e. neither the software nor the operator can change the speed of such a clock. For example, Solaris provides a C library function gethrtime (get high-resolution real-time) that returns a clock value expressed in nanoseconds. The high-resolution real-time clocks are an example of hardware clocks provided by an operating system. They are also ideally suited to implement calibrated hardware clocks. For current workstation technology, the granularity of a hardware clock is in the order of 1ns to 1s, and the constant ae is in the order of 10 \Gamma4 to 10 \Gamma6 . We measured the drift rate of the uncalibrated, unsynchronized hardware clocks of several SUN workstations running Solaris 2.5 over a period of several weeks. The Figure 3 shows the drift rate of four hardware clocks. We measured the drift rate using both a NIST timeserver and clocks externally synchronized via NTP. The average drift rate of all four hardware clocks stayed almost constant over the measured period. The computers are all located in air-conditioned rooms. For computers that are subject to higher temperature changes one has to expect a higher variance in the clock drift. Note that we do not assume that the clock drift is constant ; we assume that clock drift is within some [\Gammaae; +ae]. This interval has to be chosen large enough to account for unsteady environmental conditions. days rate in us/s Fig. 3. Measured drift rate (in s s of four hardware clocks over a period of more than 70 days. The drift rate was determined every hour using externally synchronized clocks. We measured the relative drift rate of two calibrated hardware clocks for an interval of several days, i.e. we mea- CRISTIAN AND FETZER: THE TIMED ASYNCHRONOUS DISTRIBUTED SYSTEM MODEL 5 sured how many s two calibrated hardware clocks drift apart from each other every second. The calibrated clocks were implemented on top of the high-resolution real-time clocks of Solaris. Variations in the message transmission delays introduce errors when reading remote clocks in a distributed system. We did read remote clocks using a fail-aware datagram service [19] that calculates an upper bound on the transmission delay of each message it delivers 1 . That allowed us to calculate lower and upper bounds on the remote clock reading errors. With these bounds we calculated lower and upper bounds on the drift rate. To minimize the measurement error, we measured every minute the average relative drift rate over the last 100 minutes Figure 4 shows a lower and an upper bound for the relative drift rate of two calibrated hardware clocks over a period of more than 2 days. In summary, calibrating a hardware clock allows us to decrease its maximum drift rate by two orders of magni- tude: from 10 \Gamma4 to 10 \Gamma6 . For example, clock calibration allowed us to reduce the measured average drift of one clock from about 155 s s to about 0 s s . Because we use in our protocols calibrated hardware clocks, we can use a maximum drift rate ae of 2 s s instead of a ae of about 200 s s . Since ae is such a small quantity, we ignore terms ae i for i 2. For example, we equate (1 with ae). We also assume that the clock granularity G is negligible. -0.4 -0.3 -0.2 -0.10.10.3 time [hour] relative drift rate Lower Bound Upper Bound Fig. 4. The relative drift rate between two calibrated hardware clocks stayed within about 1 s s during our measurements. A.2 Clock Failure Assumption We assume that each non-crashed process has access to a correct hardware clock, i.e. has access to a hardware clock with a drift rate of at most ae. This assumption simplifies applications since they have to deal with crash failures anyhow but they do not have to deal with faulty clocks like "fast" or "slow" clocks. Let predicate crashed t p be true iff process p is crashed at real-time t. Formally, we can express this clock assumption (CA) as follows: Hp . 1 The service requires an upper bound on the drift rate of a clock. We chose that constant based on measurements of the (absolute) drift rate of calibrated clocks using an externally synchronized clock. Hence, there is no "circularity" in this measurement. In practice, one can actually weaken this assumption in the following sense. If a hardware clock H p fails at time s and a process p tries to read the clock at t s, p crashes at t before an incorrect clock value is returned to p. Since p does not read any incorrect clock information, this relaxed assumption is actually equivalent to (CA). In particular, no process can determine that H p failed. One can implement this relaxed assumption by detecting clock failures at lower protocol levels (transparent to application processes) and transform them into process crash failures. There are two basic real-time clock implementations in operating systems: 1) an oscillator increments a long hardware counter (typically, 64 bit long) and the value of the real-time clock is the current value of the hardware counter, and 2) a periodic timer is used to increment a software counter (= value of real-time clock). In the first case, the properties of the clock are determined by the physical properties of the oscillator. In the second case, interrupt priorities might affect the properties of the real-time clock. In most systems, the timer interrupt has the highest priority and these systems do not loose timer interrupts. However, there exist a few systems in which other interrupt sources (e.g. the serial line) have a higher priority than the timer interrupt. These systems might loose timer interrupts, i.e. these clocks can go slower if there are too many interrupts of higher priority. For most systems one can find a reasonable ae such the probability that a hardware clock fails (i.e. its drift rate is not bounded by ae) is very low. Whether this probability can be classified as negligible depends on the stochastic requirements of the application (see [28], [5] for an explanation of what failures can be neglected). If this probability is negligible, one does not even have to detect clock fail- ures. However, if the requirements of an application are too stringent to neglect the probability that a single hardware clock fails, one can use redundant hardware clocks to make sure that the clock failure assumption is valid. We showed in [20] how one can use commercial off the shelf components to build fault-tolerant clocks to make clock failures negligible. For example, one can use two redundant hardware clocks (two 64 bit counters connected to separate oscillators ; available as PC cards) to detect a single hardware clock failure. The detection (or even the masking of clock failures when at least three hardware clocks are used) can be localized in one clock reading procedure so that it becomes transparent to higher level pro- cesses. Whenever a process wants to read its hardware clock, the process calls the clock reading procedure and this procedure reads the two redundant clocks. The procedure uses the two values to determine if the relative drift rate of the two clocks is within an acceptable range. If the failures of hardware clocks are independent, one can detect the failure of a clock with a very high probability. Thus, when stochastic application requirements are stringent, redundant clocks allow the detection of clock failures so that the probability that a process reads a faulty clock becomes negligible. 6 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, TO APPEAR IN 1999 B. Datagram Service The datagram service provides primitives for transmitting unicast (see Figure 5) and broadcast messages (see Figure 6). The primitives are: ffl send(m,q): to send a unicast message m to process q, ffl broadcast(m): to broadcast m to all processes including the sender of m, and initiated by the datagram service to deliver message m sent by process p. time clock real- time td (m) send (m,q) deliver (m,p) Fig. 5. Process p sends unicast message m to q at real-time s and q receives m at real-time t. The transmission delay of m is tdq To simplify the specification of the datagram service, we assume that each datagram message is uniquely identified. In other words, two messages are different even when they are sent by the same process (at two different points in time) and have the same "contents". Let Msg denote the set of all messages. We use the following predicates to denote datagram related events: q (m,p): the datagram service delivers message m sent by p to q at real-time t. We say that process q receives m at t. unicast message m to q at real-time t by invoking the primitive send(m,q). broadcast t broadcast message m at real-time t by invoking the primitive broadcast(m). time clock real- time r s r broadcast td td deliver deliver r Fig. 6. Process p sends broadcast message m at s and q receives m at t, while r receives m at u. The transmission delays of m are Let m be a message that p sends (see Figure 5) or broadcasts (see Figure 6) at s. Let q receive m at t. We call s and t the send and receive times of m, and we denote them by st(m) and rt q (m), respectively. The transmission delay td q (m) of m is defined by, td q (m) The function sender(m) returns the sender of m: sender(m)=p , 9s,q: send s (m,q)broadcast s (m). The destination Dest(m) of a message m is the set of processes to which m is sent: (m,q)broadcast s (m). The requirements for the datagram service (Validity, No- duplication, and Min-Delay) are defined as follows: ffl Validity: If the datagram service delivers m to p at t and identifies q as m's sender, then q has indeed sent m at some broadcast s q (m). ffl No-duplication: each message has a unique sender and is delivered at a destination process at most once. ffl Min-Delay: We assume that any message m sent between two remote processes p and q has a transmission delay that is at least td q (m) ffi min . The Min-Delay requirement does not restrict the minimum transmission delay of a message n sent between two local processes: the transmission delay of n can be smaller than ffi min . The intuition of ffi min is that when knowing the minimum message size and the maximum network band- width, one knows a lower bound on the message transmission delay. One can use ffi min to improve the calculated a posteriori upper bound on the transmission delay of remote messages: the tighter ffi min is to the "real" minimum transmission delay, the tighter the a posteriori upper bound gets (see [19] for details). However, if ffi min is chosen too big (i.e. some remote messages have transmission delays of less than calculate a bound that is too small. Since the network configuration of a system might change during its lifetime, the safest choice is to assume that The datagram service does not ensure the existence of an upper bound for the transmission delay of messages. But since all services in our model are timed, we define a one-way time-out delay ffi, chosen so that the actual messages sent or broadcasted are likely [5] to be delivered within ffi. A message with a transmission delay of less than ffi min is called early (see Figure 7). In the timed model we assume that there are no early messages, i.e. ffi min is well chosen (see Min-Delay requirement). A message m whose transmission delay is at most ffi, i.e. ffi min td q (m) ffi, is called timely. If m's transmission delay is greater than ffi, i.e. td q (m) ? ffi, we say that m suffers a performance failure (or, m is late). If a message is never delivered, we say that m suffered an omission failure (or, m is dropped). real-t ime timely late dropped s+dm in s+d s Fig. 7. In the timed model a message can either be timely, late or dropped. The timed model assumes that no message is early. CRISTIAN AND FETZER: THE TIMED ASYNCHRONOUS DISTRIBUTED SYSTEM MODEL 7 B.1 Measurements The timed model assumes the existence of a one-way time-out delay ffi that is used to define message performance failures. The choice of ffi determines the frequency of message performance failures. The timed model does not put any upper bound on the frequency of failures and hence, the choice of ffi does not affect the correctness of protocols designed for the timed model. We described in [17] several techniques that allow the timely detection of message and process performance failures to be able to detect when certain application properties do not hold anymore. In [19] we describe a mechanism that allows a receiver to detect if a message is timely. A "good" selection of ffi might be system and application dependent. First, for some applications the choice of ffi can be naturally derived from the application re- quirements. For example, 1) an application might have to achieve "something good" within D time units, and 2) the protocol used to implement the application can achieve something good within, say, kffi time units (in case the failure frequency is within some given bound). In this case, it makes sense to define ffi by ffi \Delta k . Second, other applications might not constrain ffi. From a practical point of view for these applications a good choice of ffi is crucial for protocol stability and speed: 1) choosing a too small ffi will increase the frequency of message performance failures and hence, the quality of service might degrade more often, and 2) choosing a too large ffi might increase the response time of a service since service time-outs take longer. The choice of a good ffi is not always easy since message transmission delays increase with message size (see Figure 8) and with network load (see Figure 9), and also depend on the message transmission pattern used by a protocol (see Figure 10). The determination of a good ffi that ensures likely stability and progress might require the measurement of protocol specific transmission delays.2.33.34.3 bytes ms Fig. 8. Measured minimum delay of round-trip message pairs for different message sizes. We used 20,000 round-trips for each of the 156 measured message sizes. We performed all our measurements on a cluster of 9 Sun IPX workstations connected by a 10Mbit Ethernet in our Dependable Systems Laboratory at UCSD. Seven of these computers run SunOS 4.1.2 while 2 machines run Solaris 2.5. The measurement programs use different services provided by the FORTRESS toolkit [18]. FORTRESS uses UDP for interprocess communication. To model the dependence of message transmission times on the message size (see Figure 8), we could replace constants by two functions that increase with the size of a message. We actually use in [19] such a function for increases with the size of a message. This tighter lower bound allowed a receiver to calculate a better upper bound for the transmission delay of a received message. For simplicity, we however assume in the timed model that ffi and ffi min are constant. 70% 75% 80% 85% 90% 95% 100% message delay/ms 704 kByte/s 580kByte/s 232kByte/s Fig. 9. The transmission delay of messages increases with the net-work load. For a network load of 232 kByte/sec, 99% of the messages were delivered within 6.0ms and for 580 kByte/sec within 7.4 ms. For a network load of 704 kByte/sec, less than 99% of the messages were delivered. We measured the distribution of message transmission times for different network loads. During these measurements we used 8 Sun IPX workstations connected by a 10Mbit Ethernet. The workstations were grouped into 4 pairs and the two processes of a pair sent each other ping-pong messages of size 1448bytes (without UDP header). We estimated the network load to be the average number of bytes the 8 workstations sent per second. As expected, the likelihood that a message is delivered within some given time decreases with the network load (see Figure 9). Our measurement showed that the minimum experienced message transmission delay can slightly decrease with an increase in network load. This can be explained by a decrease of cache misses for the network protocol code with an increase in network traffic. To demonstrate that transmission delays can be very protocol dependent, we measured the transmission times experienced by a local leadership service [13]. This measurement involved one process p periodically broadcasting messages and five processes sending immediate replies to each message of p. After receiving a reply, p spends some time processing it before receiving the next reply. Hence, the transmission delays of successive replies increase by the processing time of the preceding replies. The distribution of transmission delays therefore shows five peaks for the five replying processes (see Figure 10). 8 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, TO APPEAR IN 19995001500250035001.1 2.1 3.1 4.1 ms no.messages Fig. 10. Distribution of the transmission delays of unicast messages sent by a local leader election protocol. This distribution is based on 500,000 replies.0.011300 500 700 900 1100 Network Load [kByte/sec] %Dropped Fig. 11. Likelihood that a message is dropped with respect to the network load. The network and the operating system can drop mes- sages. For example, on Ethernet based systems a message can be dropped because of a message collision on the cable or because of a checksum error. However, it is more likely that the operating system drops messages because of buffer overruns, which occur when it cannot deliver the messages fast enough to the receiving processes. We measured the likelihood that a UDP packet is dropped for different net-work loads. We used the same setup as for the network load measurements: 8 Sun IPX workstations grouped into 4 pairs. During a measurement the processes of each pair send each other ping-pong unicast messages with a fixed scheduled wait time between the sending of messages. We changed the network load by changing the scheduled wait time. With a network load of about 1090 kByte/sec, approximately 3.5% of the messages were dropped, while for a load of about 300 kByte/sec this decreased to about 0.003% (see Figure 11). We also performed experiments to test if communication omission failures are "independent". We used again 8 computers in the same setup as before. Note that if omission failures were independent, the probability that two consecutive messages are dropped is the square of the probability that a message suffers an omission failure. We sent 3,000,000 messages between 8 processes to have a high network load (about 1000 kByte/sec). About 2.9% of these0.51.52.5 length of drop-sequence in drop-seq. of length Measured Independent Fig. 12. Message omission failures are not independent. messages suffered omission failures. During this measure- ment, one process experienced the drop of 53 consecutive messages that were sent by some other process. Figure 12 shows the measured likelihood that a message is part of a sequence of X 2 f1; ::; 20g consecutively dropped messages. We also plotted how the curve would look if omission failures were independent This shows that message omission failures are not independent. B.2 Datagram Failure Assumption We did various experiments to test if our system detects message corruption. So far we have sent more than 10 8 messages with a known "random" contents. The system has not delivered any corrupted messages. We also tested if there were any message duplications. None of the messages were delivered more than once. The probability of undetected message corruption and duplication might not be negligible in all systems. However, one can use an additional software layer to reduce this probability to the degree that it becomes negligible. This software layer can be transparent to the processes, i.e. the processes do not need to know of its existence. Source address spoofing occurs when a process p sends a message m to some process q and makes q believe that a different process r 6= p has sent m. The validity assumption implies that we assume that the probability of source address spoofing is negligible. When one cannot neglect this probability, one can use message authentication [30] to reduce this probability so that it becomes negligible. This can be done in a manner transparent to the processes. Note that message authentication can increase the transmission time substantially if there is no special hardware assistance. In summary, the asynchronous datagram service is assumed to have an omission/performance failure semantics [5]: it can drop messages and it can fail to deliver messages in a timely manner, but one can neglect the probability of source address spoofing and that a message delivered by the system is corrupted or is delivered multiple times. Broadcast messages allow asymmetric performance/omission failures in the sense that some processes might receive a broadcast message m in a timely manner, while other processes CRISTIAN AND FETZER: THE TIMED ASYNCHRONOUS DISTRIBUTED SYSTEM MODEL 9 might receive m late or not at all. Since ae, ffi min and ffi are such small quantities, we equate C. Process Management Service C.1 Process Modes A process p can be in one of the following three modes (see Figure ffl up: p is executing its 'standard' program code, ffl crashed: a process stopped executing its code, i.e. does not take the next step of its algorithm and has lost all its previous state, and recovering: p is executing its state 'initialization' code, (1) after its creation, or (2) when it restarts after a crash. A process that is either crashed or "recovering" is said to be down. The following events cause a process p to transition between the modes specified above (see Figure 13): ffl start: when p is created, it starts in "recovering" mode, can crash at any time, for example because the underlying operating system crashes, ffl ready: p transitions to mode "up" after it has finished initializing its state, and ffl recover: when p restarts after a crash, it does so in "re- covering" mode. We define the predicate crashed t p to be true iff p is crashed at time t. While p is crashed, it cannot execute any step of its algorithm. We define the predicate recovering t p to be true iff p is recovering at time t. A process can be recovering only as a consequence of a start or recover event occurrence. up up crash ready crashed crashed recov- ering recov- ering crash recover start Fig. 13. Process modes and transitions. C.2 Alarm Clocks A process p can set an alarm clock to be awakened at some specified future clock time 2 . When p requests to be awakened at clock time T , the process management service will awake p when H p (t) shows a value of at least T . We call T an alarm time. Process p will not take a step after it sets its alarm clock to T unless 1) it is awakened for alarm time T , or 2) it receives a message before it is awakened for time T . We assume that if a process p sets its alarm clock before it was awakened for its previous alarm time T We assume that a process is signaled an error in case it requests to be awakened at a time that has already passed. To avoid this, a process can define a positive alarm time relative to the current time instead of specifying an absolute alarm time. (this can only happen if it receives a message before it is awakened for T ), alarm time T is overwritten, i.e. p will not be awakened for alarm time T . In other words, at any time a process p can have at most one active alarm time, i.e. an alarm time that has not been overwritten and for which p has not been awakened. Note that a process can maintain multiple alarm times based on the alarm clock provided by the timed asynchronous system model. We use the following predicates to specify the behavior of an alarm clock: requests at real-time s to be awakened at some future real-time u such that H p (u) T , i.e. p wants to take its next step when its hardware clock shows at least value T unless it receives a message before T , and ffl WakeUp u p (T): the process management service wakes up p at real-time u for the alarm clock time T . When a process p crashes, the process management service forgets any active alarm time p has set before crash- ing. If p never crashes, we assume that it will eventually be awakened for all active alarm times. The behavior of an alarm clock is constrained by the following requirement process p is awakened for an alarm clock time T at real-time u only if 1) its hardware clock shows at least T at u, 2) p has requested at some previous to be awakened at T , and (s; u], process p has not crashed, has not overwritten the alarm time and has not been awakened for T since s. Formally, the (AC) requirement is expressed as follows: 8p,u,S,T: WakeUp u (S)":crashed v (T). Let t be the earliest real-time (i.e. smallest value) for which H p (t)T. We call t the real alarm time specified by the SetAlarm s event. Consider that the process management awakes process p for alarm time T at real-time u, i.e. WakeUp u holds. The delay is called the scheduling delay experienced by process p. The process management service does not ensure the existence of an upper bound on scheduling delays. However, being a timed service, we define a scheduling timeout delay oe, so that actual scheduling delays are likely [5] to be smaller than oe. Since ae and oe are such small quantities, we equate We say that a non-crashed process p suffers a performance failure when it is not awakened within oe of the last time T it has specified (see Figure 14), i.e. if it is awakened when its local hardware clock H p shows already a value greater than T oe. In this case, we say that p is late. Otherwise, if p is awakened when its hardware clock shows a value in [T is said to be timely. If p is awakened for T before H p shows T , p is said to be early. Since it is easy to avoid early timing failures (by checking that H p T and going to sleep again if H the timed model assumes that processes do not suffer early timing failures. Formally, a process p suffers a performance failure at real-time u if there exists an alarm time T that should have caused a WakeUp event by u: pFail u (T)":crashed v We define the predicate timely u p to be true iff p is timely at u: timely u . We extend the notion of a process p being timely to a time interval I as follows: timely I timely t . Note that we do not include the processing time of messages in the definition of a timely process. The reason for that is that - conceptually - our protocols for the timed model add the processing time of a message m to the transmission delay of the messages sent during the processing of (see [17] for a more detailed description): a too slow processing of messages is therefore transformed into message performance failures. clock-time timely late alarm time Fig. 14. Process p is timely if it is awakened within oe ticks of alarm time T . Process p suffers a performance failure (or, is late) if it is awakened after T oe. The timed model excludes early timing failures, i.e. a process is never awakened before time T . C.3 Measurements To implement alarm clocks in the Unix family of operating systems, one can use the select system call. This call allows the specification of a maximum interval for which a process waits for some specified I/O events in the kernel before it returns. Unix tries to awake the process before the specified time interval expires using an internal timer. In SunOs this timer has a resolution of 10ms. Thus, the scheduling delay timeout oe should be chosen to be at least 10ms. Figure 15 shows the distribution of scheduling delays experienced by a process executing a membership protocol [16]. These measurements where performed during normal daytime use of the system (low load). C.4 Process Failure Asssumption The timed model assumes that processes have crash/performance failure semantics [5]. However, the execution of a process might stop prematurely (crash failure) or a process might not be awakened within oe time units of an active alarm time (performance failure). Processes can recover from crashes. In most applications, the probability that a processor executes the program of a process incorrectly is negligible. In systems in which that probability cannot be neglected, one can use redundancy at lower protocol levels to guarantee the crash/performance process failure semantics. For example, consider that processors can suffer measurements Fig. 15. The distribution shows the difference between the time a process was awakened and the time it requested to be awakened. It is based on 350,000 measurements. failures. In this case one can use a processor pair to execute the program of a process in lock step. If the two processors disagree about the result of some instruction, both processors stop executing. In this way, processor failures can be transformed into crash failures. This dual processor approach is transparent to the processes. Thus, the assumption that processes have crash/performance failure semantics is reasonable. IV. Extensions The core of the timed asynchronous system model assumes the datagram service, the process management ser- vice, and the local hardware clocks. We introduce two optional extensions of the model: stable storage and progress assumptions. Both extensions are reasonable for a network of workstations. However, not all systems might need to have or actually have access to stable storage. A progress assumption states that infinitely often a majority of processes will be "stable" (i.e. behave like a synchronous sys- tem) for a bounded amount of time. While progress assumptions are valid for most local area network based sys- tems, they are not necessarily valid for large scale systems connected by wide area networks. Moreover, most of our service specifications do not need a progress assumption to enable their implementation in timed asynchronous sys- tems. We sometimes use the terms "core model" and "ex- tended models" to distinguish between models that include assumptions about stable storage or progress assumptions in addition to the "core" assumptions about datagram ser- vice, the process management service, and the local hardware clocks. A. Stable Storage lose their memory state when they crash. To allow processes to store information between crashes, we introduce an extension of the timed asynchronous system model: a local stable storage service. This service provides the following two primitives to any local process p: asks the value val to be stored at address addr, and CRISTIAN AND FETZER: THE TIMED ASYNCHRONOUS DISTRIBUTED SYSTEM MODEL 11 asks to read the most recent value it has stored at address addr. If p has not yet stored some value at addr, value ? (undefined) is returned. The predicates that denote the invocation of the above primitives at some real-time t are: store t (addr,val) and read t (addr,val), respectively. The stable storage service guarantees that for any address a that a process p reads, it returns the most recent value that p has stored at address a, if any: read t 8ut,v::store u 9s!t:store s (a,v). A stable storage service can be implemented on top of Unix using the Unix file system. An implementation of such a service and its performance is described in [9]. B. Stability and Progress Assumptions The timeliness requirements encountered in the specification of protocols designed for the timed asynchronous system model are often conditional in the sense that only when some "system stability" predicate is true, the system has to achieve "something good" (see e.g. [7]). Such conditional timeliness requirements express that when some set of processes SP ' P is "stable" (i.e. "behaves like a synchronous system"), that is, the failures affecting SP and the communication between them have a bounded frequency of occurrence, the servers in SP have to guarantee progress within a bounded amount of time. We call a set SP a stable partition [13] iff ffl all processes in SP are timely, ffl all but a bounded number of messages sent between processes in SP are delivered timely, and ffl from any other partition either no message or only "late" messages arrive in SP . The concept of a stable partition is formalized by a stability predicate that defines if a set of processes SP forms a stable partition in some given time interval [s; t]. There are multiple reasonable definitions for stability predicates: examples are the stable predicate in [10], or the majority- stable predicate in [14]. In this paper we formally define the stability predicate \Delta-F-partition introduced informally in [17]. To do that, we first formalize and generalize the notions of connectedness and disconnectedness introduced in [10]. \Delta-F-Partitions Two processes p and q are F-connected in the time interval [s; t] iff (1) p and q are timely in [s; t], and (2) all but at most F messages sent between the two processes in [s; t] are delivered within at most ffi time units. We denote the fact that p and q are F-connected in [s; t] by the predicate timely u timely u A process p is \Delta-disconnected from a process q in [s; t] iff any message m that is delivered to p during [s; t] from q has a transmission delay of more than units. A common situation in which two processes are \Delta- disconnected is when the network between them is over-loaded or at least one of the processes is slow. One can use a fail-aware datagram service [19] to detect all message that have transmission delay of more than \Delta while guaranteeing that no message with a transmission delay of at most ffi is wrongly suspected to have a transmission delay of more than \Delta. We use the predicate \Delta-disconnected(p,q,s,t) to denote that p is \Delta-disconnected from q in [s; t]: \Delta-disconnected(p,q,s,t) \Delta deliver u We say that a non-empty set of processes S is a \Delta-F-partition in an interval [s; t] iff all processes in S are F-connected in [s; t] and the processes in S are \Delta- disconnected from all other processes: \Delta-F-partition(S, s, t) " 8p2S,8r2P-S: \Delta-disconnected(p,r,s,t). As an example of the utility of the above stability pred- icate, consider an atomic broadcast protocol designed to achieve group agreement semantics [6], where all messages that are possibly lost or late are re-sent up to F times. If a group of processes S forms a \Delta-F-partition for sufficiently long time, that group can make progress in successfully broadcasting messages during that time. B.2 Progress Assumptions The lifetime of most distributed systems based on a local area network is characterized by long periods in which there exists a majority of processes that are stable. These stability periods alternate with short instability periods. This can be explained by the bursty behavior of the network traffic which can cause temporary instabilities. For exam- ple, traffic bursts can be caused by occasional core dumps or file transfers via the network. Based on this observa- tion, we introduced the concept of progress assumptions [14] to show that classical services, such as consensus, originally specified by using unconditional termination require- ments, are implementable in the extended timed model. A progress assumption states that the system is infinitely often "stable": there exists some constant j such that for any time s, there exists a t s and a majority of processes SP so that SP forms a stable partition in [t; t B.3 Measurements The first measurement shows how transmission delays are distributed over time (see Figure 16). We used in this experiment 4 processes and each process receives and sends about 36 UDP messages per second. Hence, we sent about 144 messages every second on the Ethernet. Each message contains a payload of 1448 bytes, i.e. we induced a network load of more than 208 KByte/sec. We also measured the behavior of six processes each running on a SUN workstation in our Dependable Systems Lab over a period of a day under normal load conditions (see Figure 17). The set of all six pro- real-time [s] transmission time Fig. 16. The graph shows the transmission delay of messages received by one process over a period of 100 seconds. The transmission delay of messages stayed for long periods of time well below 10ms. However, sporadically the delay increased well above 10ms. cesses were, on the average, "\Delta-1-stable" for about 218s, i.e. the six processes formed a \Delta-F-partition with 30ms. The average distance between two \Delta-1-stable periods was about 340ms. The typical behavior experienced during an "unstable" phase was that one of the six processes was slow. For this measurement, we used a modified membership service [16]: whenever a process declared that it cannot keep its membership up-to- date or not all six processes stayed in the membership, we knew that fp 1 ; :::; p 6 g is not \Delta-1-stable. From a theoretical point of view, one cannot determine perfectly if the system is \Delta-1-stable. However, one can determine if the system looks to the processes like it is \Delta-1-stable - which, from a practical point of view, is equivalent to the system being \Delta-1-stable. Note that the membership service allows the fast processes to continue to make progress even if the system is not \Delta-1-stable because it can temporarily remove the slow process(es) from the membership. In other words, system instabilities might result in the removal of slow or disconnected processes but in our experience in almost all cases the remaining processes can still provide their safety and timeliness properties. V. Communication By Time In synchronous systems, the communication by time (i.e. communication of information achieved by measuring the passage of time) is very important. For example, if a correct process p does not hear in time the 'I-am-alive' message of q, then p knows that q has crashed. The communication uncertainty that characterizes timed asynchronous systems makes "communication by time" more difficult, but it is (in a more restricted form) still possible. For example, in the timed model if p does not hear from q in time the 'I-am- alive' message of q, p does not know that q has crashed. However, p knows that q or the 'I-am-alive' has suffered a failure. In many applications this is sufficient since p103050700 200 400 600 800 1000 ms unstability phases Fig. 17. Observed time between two \Delta-1-stable periods for six pro- cesses, where 30ms during a period of 24 hours. The typical failure behavior observed between consecutive stability periods was that one process was slow. only cares about if or if not it can communicate with q in a timely manner. For example, in a leader election pro- process p might only support the election of q as long as p can communicate with q in a timely manner and otherwise, it might try to support the election of another process (with which it can communicate in a timely man- ner). However, in this leader election example we have to make sure that there is at most one leader at a time. In synchronous systems enforcing this property is straight forward since processes can detect perfectly if the current leader has crashed and hence, when to replace it by a new leader. In asynchronous systems enforcing this property is not that easy, since one cannot decide if the current leader l has crash, or is slow, or the communication to l is slow. We illustrate how two processes p and q can use communication by time to ensure that at any time at most one of them is leader. We use a locking mechanism [17], which can be viewed as a leases mechanism [22] for systems without synchronized clocks. This mechanism enables communication by time even when local clocks are not synchronized. This mechanism works as follows: sends some information in a message m to a process q and p says that this information is only valid for a certain amount of time, ffl if q receives m, it calculates an upper bound on the transmission delay of m to determine for how long it can use m, and ffl p can determine by consulting only its local hardware clock the time beyond which q will no longer make use of the information contained in m. For concreteness, consider the pseudo-code of Figure 18. In this example, we use communication by time to enforce one correct process p is eventually leader while ensuring that there is only one leader at a time even though q might be leader for a bounded amount of time. To concentrate on the main aspect, i.e. how p can detect that q is not leader CRISTIAN AND FETZER: THE TIMED ASYNCHRONOUS DISTRIBUTED SYSTEM MODEL 13 anymore, q gets only one chance to become leader by p sending q a message saying that q is leader for a certain amount of time. A complete leader election protocol using a time locking mechanism can be found in [13]. Process p sends a message m to q informing q that it can become leader for Duration clock time units if the transmission delay of m is at most \Delta real-time units. Process q has to calculate an upper bound on the transmission delay of m to determine if it can use m. The fail-aware datagram service introduced in [19] calculates an upper bound on the transmission delay of messages. It delivers m as "fast" when its transmission delay is at most \Delta. Process q uses m only when m is "fast" and it sets variable Expira- tionTime so that q's leadership expires exactly Duration time units after the reception of m at local clock time RT . Process p waits for Duration(1+2ae)+\Delta(1+ae) clock time units before it becomes leader, where 1) the factor (1 2ae) is necessary because p's and q's hardware clocks can drift apart by up to 2ae, and 2) the factor (1+ae) since p's clock can drift apart from real-time by up to \Deltaae during the maximum transmission delay \Delta of a "fast" message m. A process r 2 fp; qg is leader at t iff the function Leader? evaluates at t to true when called with the value of r's hardware clock at t as argument, i.e. leader t r Process p and q are never leader at the same time since (1) q can only be leader when the transmission delay of m is at most \Delta and it is leader for at most Duration local clock time units after receiving m, and (2) after p has sent m, it waits for at least Duration(1+2ae)+\Delta(1+ae) local clock time units before becoming leader. Note that a leader is implicitly demoted by the advancement of its hardware clock. Since a process might be delayed immediately after checking if it is the leader, a demoted process might not immediately detect that it was demoted. However, when Leader? is used in a proper way, other processes can detect messages from a demoted leader in the following way: ffl A process r first reads its hardware clock and if H r shows a value T, then ffl r determines if it is leader at T by querying function Leader? for time T , if r is leader at T , it does some processing and then sends some message n and it sets the send time-stamp of n to T , and ffl a process receiving n will calculate the transmission time of n based on T , i.e. delays of r are added to the transmission time of n. For example, if r is swapped out after reading Leader? and before sending n, the delay of this swap is added to the transmission delay of n and receiver(s) of n can reject n if the transmission delay of n is too slow. In summary, we typically transform delays of a demoted leader into message performance failures that can be detected by the receivers of the messages. const time Duration, \Delta; boolean Leader?(time now) if now ! ExpirationTime then return true; return false; process p begin are leader", q); select event when WakeUp(T): select process q begin select event when fa\Gammadeliver(m, p, fast, RT); if fast then endif select Fig. 18. This pseudo-code uses communication by time to enforce that a correct p is eventually leader while ensuring that there is only one leader at a time even though q might be leader for a bounded amount of time. VI. Possibility and Impossibility Issues We address in this section the issue of why problems like election and consensus are implementable in actual distributed computing systems while they do not allow a deterministic solution in (1) the time-free model and (2) to some extent in the core timed model. To fix our ideas, we use the election problem to illustrate the issues. Whether the leader problem has a deterministic solution or not depends on 1) the exact specification of the problem, 2) on the use of progress assumptions, and whether the underlying system model allows communication by time. The main intuition of 1) is that one can weaken a problem such that one has only to solve the problem when the system is "well behaved", or 2) one can require instead that the system be "well behaved" from time to time and hence, one can solve the problem while the system is well behaved, and if one can use communication by time to circumvent the impossibility that one cannot decide perfectly if a remote process is crashed, e.g. if one can use a local hardware clock to decide if a time quantum of a remote process has expired. A. Termination Vs Conditional Timeliness Conditions There is no commonly agreed-upon rigorous specification for the election problem. For example, [29] specifies the election problem for the time-free system model as follows: (S) at any real-time there exists at most one leader, and 14 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, TO APPEAR IN 1999 infinitely often there exists a leader, i.e. for any real-time s there exists a real-time t s and a process p so that becomes leader at t. Typically, problems specified for timed systems do not use such strong unconditional termination conditions (like requiring that "something good" eventually hap- pens. Instead, we use conditional timeliness conditions. These require that if a system stabilizes for an a priori known duration, "something good" will happen within a bounded time. With the introduction of the \Delta-F-stable predicate earlier, we can generalize the specifications given in [13] for the election (or the highly available leadership) problem for timed asynchronous systems as follows: (S) at any real-time there exists at most one leader, and (TT) when a majority of processes are \Delta-F-stable in a time interval [s; s there exists a process p that becomes leader in [s; s The specification (S; TF ) is not implementable in time-free systems, even when only one process is allowed to crash [29], while (S; TT ) is implementable in timed systems [10], [13]. To explain why this is so, consider a time-free system that contains at least two processes p and q. To implement one has to solve the following problem: when a process p becomes leader at some real-time s and stays leader until it crashes at a later time t ? s, the remaining processes have to detect that p has crashed to elect a new leader at some time u ? t to satisfy requirement (TF). Since processes can only communicate by messages, one can find a run that is indistinguishable for the remaining processes and in which p is not crashed and is still leader at u. In other words, one can find a run in which at least one of the two requirements (S,TF) is violated. The implementability of (S; TT ) in a timed asynchronous system can be explained as follows. First, to ensure property (S) processes do not have to decide if the current leader is crashed or just slow. A process is leader for a bounded amount of time before it is demoted (see Section V). Processes can therefore just wait for a certain amount of time (without exchanging any messages) to make sure that the leader is demoted. In particular, processes do not have to be able to decide if a remote process is crashed (this is impossible in both the time-free and the timed asynchronous system models). Second, when the system is stable, a majority of processes is timely and can communicate with each other in a timely fashion. This is sufficient to elect one of these processes as leader in a bounded amount of time and ensure that the timeliness requirement is also satisfied [13]. Note that the specification (S; TF ) is not implementable in the core timed model even when only one process is allowed to crash. To explain this, consider a run R in which no process can communicate with any other process (be- cause the datagram service drops all messages). If at most one process l in R is leader, we can construct a run R 0 such that l is always crashed in R 0 and R 0 is indistinguishable from R for the remaining processes, therefore R 0 does not Otherwise, if there exist at least two processes and q in R that become leaders at times s and t, respectively, we can construct a run R 00 that is indistinguishable from R for all processes and in which p and q are leaders at the same point in real-time since p and q cannot communicate with any other process (in R). B. Why Communication by Time is Important for Fault- Tolerance One interesting question is if (S; TT ) could be implemented in time-free systems. Since no notion of stability was defined for time-free systems, we sketch the following alternative result instead: (S; TT ) is not implementable in a timed system from which hardware clocks are removed even if at most one process can crash and no omission failures can occur. Note that, if processes have no access to local hardware clocks, they cannot determine an upper bound on the transmission delay of messages nor can a leader enforce that it demotes itself within a bounded time that is also known to all other processes. In particu- lar, the only means for interprocess communication is, like in the time-free model, explicit messages. Thus, the proof sketched above that (S; TF ) is not implementable in the time-free model also applies for (S; TT ) in the timed system model without hardware clocks. It is thus essential to understand that it is the access to local clocks that run within a linear envelope of real-time, which enables communication by time between processes, that allows us to circumvent in the timed model the impossibility result of [29] stated for the time-free model. C. Progress Assumptions Another observation is that while (S; TF ) does not have a deterministic solution in the core timed model, it is implementable in a practical network of workstations. The reason is that while the timed asynchronous system model allows in principle runs in which the system is never stable, the actual systems that one encounters in practice make such behavior extremely unlikely when ffi and oe are well chosen. As mentioned earlier, such a system is very likely to alternate between long stability periods and relatively short instability periods. To describe such systems, it is therefore reasonable to use a progress assumption (see Section IV-B.2), that is, assume the existence of an j such that the system is infinitely often stable for at least j time units. For j , a progress assumption ensures that a solution of (S; TT ) elects a leader infinitely often. Thus, the introduction of a progress assumption implies that a solution of (S; TT ) is also a solution of (S; TF ). In the service specifications we have defined for asynchronous services implementable in the timed model, we always use conditional timeliness conditions and we never use termination conditions like (TF ). In general we do not need progress assumptions to enable the implementation of services with conditional timeliness conditions in timed asynchronous systems, i.e. these services are implementable in the core timed system model. Furthermore, while progress assumptions are reasonable for local area systems, they are not necessarily valid for wide area systems that frequently partition for a long time. Thus, we have not included progress assumptions as a part of the CRISTIAN AND FETZER: THE TIMED ASYNCHRONOUS DISTRIBUTED SYSTEM MODEL 15 core timed asynchronous system model. VII. Conclusion We have given a rigorous definition of the timed asynchronous system model. Based on the measurements reported previously, performed on the network of workstations in our Dependable Systems Laboratory, and on other unpublished measurements at other labs that we are aware off, we believe that the timed asynchronous system model is an accurate description of actual distributed computing systems. In particular, we believe that the set of problems solvable in the timed model extended by progress assumptions is a close approximation of the set of problems solvable in systems of workstations linked by reliable, possibly local area based, networks. Most real-world applications have soft real-time con- straints. Hence, such applications need a notion of time. Neither the original time-free model [21] nor its extension with failure detectors [3] provides that. These models are therefore not necessarily an adequate foundation for the construction of applications with soft real-time constraints. The timed model instead provides these applications with a sufficiently strong notion of time. The timed model is also a good foundation for the construction of fail-safe hard real-time applications (see [17], [12]). --R Evaluating quorum systems over the internet. On the impossibility of group membership. Unreliable failure detectors for asynchronous systems. Probabilistic clock synchronization. Understanding fault-tolerant distributed systems Synchronous and asynchronous group communica- tion Atomic broad- cast: From simple message diffusion to Byzantine agreement Implementation and performance of a stable storage service for unix. Agreeing on processor-group membership in asynchronous distributed systems Consensus in the presence of partial synchrony. Padre: A protocol for asymmetric duplex redundancy. A highly available local leader service. On the possibility of consensus in asynchronous systems. An approach to construct fail-safe applications A system to support fail- aware real-time applications Building fault-tolerant hardware clocks Impossibility of distributed consensus with one faulty process. An efficient fault-tolerant mechanism for distributed file cache consistency Distributed computing: Models and methods. Simulating synchronous processors. time synchronization: the network time protocol. Modelling and analysis of computer network clocks. Simulating synchronized clocks and common knowledge in distributed systems. Failure mode assumptions and assumption coverage. Election vs. consensus in asynchronous systems. Applied Cryptography. Quasi-synchronism: a step away from the traditional fault-tolerant real-time system models A highly parallel atomic multicast protocol. --TR --CTR Jean-Franois Hermant , Grard Le Lann, Fast Asynchronous Uniform Consensus in Real-Time Distributed Systems, IEEE Transactions on Computers, v.51 n.8, p.931-944, August 2002 Christof Fetzer , Flaviu Cristian, Fail-Awareness: An Approach to Construct Fail-Safe Systems, Real-Time Systems, v.24 n.2, p.203-238, March Robert Miller , Anand Tripathi, The Guardian Model and Primitives for Exception Handling in Distributed Systems, IEEE Transactions on Software Engineering, v.30 n.12, p.1008-1022, December 2004 Roy Friedman , Achour Mostefaoui , Michel Raynal, Asynchronous bounded lifetime failure detectors, Information Processing Letters, v.94 n.2, p.85-91, Ying Zhao , Wanlei Zhou , Elicia J. Lanham , Shui Yu , Mingjun Lan, Self-adaptive clock synchronization based on clock precision difference, Proceedings of the twenty-sixth Australasian conference on Computer science: research and practice in information technology, p.181-187, February 01, 2003, Adelaide, Australia Yun Wang , Emmanuelle Anceaume , Francisco Brasileiro , Fabola Greve , Michel Hurfin, Solving the Group Priority Inversion Problem in a Timed Asynchronous System, IEEE Transactions on Computers, v.51 n.8, p.900-915, August 2002 Christof Fetzer, Perfect Failure Detection in Timed Asynchronous Systems, IEEE Transactions on Computers, v.52 n.2, p.99-112, February Keidar , Sergio Rajsbaum, On the cost of fault-tolerant consensus when there are no faults: preliminary version, ACM SIGACT News, v.32 n.2, June 2001 Ittai Abraham , Gregory V. Chockler , Idit Keidar , Dahlia Malkhi, Byzantine disk paxos: optimal resilience with byzantine shared memory, Proceedings of the twenty-third annual ACM symposium on Principles of distributed computing, July 25-28, 2004, St. John's, Newfoundland, Canada Taisuke Izumi , Akinori Saitoh , Toshimitsu Masuzawa, Adaptive timeliness of consensus in presence of crash and timing faults, Journal of Parallel and Distributed Computing, v.67 n.6, p.648-658, June, 2007 Keidar , Alexander Shraer, Timeliness, failure-detectors, and consensus performance, Proceedings of the twenty-fifth annual ACM symposium on Principles of distributed computing, July 23-26, 2006, Denver, Colorado, USA P. D. V. Van Der Stok , A. H. T. Janssen-Raemaekers, Real-Time Atomic Multicast Algorithms Implemented on a Shared Memory Multiprocessor, Real-Time Systems, v.24 n.1, p.55-91, January Roberto Baldoni , Carlo Marchetti, Three-tier replication for FT-CORBA infrastructures, SoftwarePractice & Experience, v.33 n.8, p.767-797, 10 July Jian Yin , Jean-Philippe Martin , Arun Venkataramani , Lorenzo Alvisi , Mike Dahlin, Separating agreement from execution for byzantine fault tolerant services, Proceedings of the nineteenth ACM symposium on Operating systems principles, October 19-22, 2003, Bolton Landing, NY, USA Shivakant Mishra , Christof Fetzer , Flaviu Cristian, The Timewheel Group Communication System, IEEE Transactions on Computers, v.51 n.8, p.883-899, August 2002 Gregory Chockler , Dahlia Malkhi, Light-weight leases for storage-centric coordination, International Journal of Parallel Programming, v.34 n.2, p.143-170, April 2006 Christof Fetzer , Flaviu Cristian, A Highly Available Local Leader Election Service, IEEE Transactions on Software Engineering, v.25 n.5, p.603-618, September 1999 Massimo Franceschetti , Jehoshua Bruck, A Group Membership Algorithm with a Practical Specification, IEEE Transactions on Parallel and Distributed Systems, v.12 n.11, p.1190-1200, November 2001 Sandeep S. Kulkarni , Ravikant, Stabilizing causal deterministic merge, Journal of High Speed Networks, v.14 n.2, p.155-183, April 2005 P. Cicotti , M. Taufer , Andrew A. Chien, DGMonitor: A Performance Monitoring Tool for Sandbox-Based Desktop Grid Platforms, The Journal of Supercomputing, v.34 n.2, p.113-133, November 2005 Paul D. Ezhilchelvan , Francisco V. Brasileiro , Neil A. Speirs, A Timeout-Based Message Ordering Protocol for a Lightweight Software Implementation of TMR Systems, IEEE Transactions on Parallel and Distributed Systems, v.15 n.1, p.53-65, January 2004 Gregory V. Chockler , Idid Keidar , Roman Vitenberg, Group communication specifications: a comprehensive study, ACM Computing Surveys (CSUR), v.33 n.4, p.427-469, December 2001 Xavier Dfago , Andr Schiper , Pter Urbn, Total order broadcast and multicast algorithms: Taxonomy and survey, ACM Computing Surveys (CSUR), v.36 n.4, p.372-421, December 2004
communication by time;timed model;asynchronous systems;measurements;synchronous systems;distributed systems;failure model;system model
308845
On reducing the processing cost of on-demand QoS path computation.
Quality of Service (QoS) routing algorithms have become the focus of recent research due to their potential for increasing the utilization of an Integrated Services Packet Network (ISPN) serving requests with QoS requirements. While heuristics for determining paths for such requests have been formulated for a variety of QoS models, little attention has been given to the overall processing complexity of the QoS routing protocol. This paper deals with the processing complexity of determining QoS paths in link state based routing architectures. Although on-demand path computation is very attractive due to its simplicity, many believe that its processing cost will be prohibitive in environments with high request rates. In this work, we first characterize the processing cost of QoS routing algorithms that use the widest-shortest path heuristic. Then we study alternatives to on-demand path computation that can reduce this processing overhead. In addition to the well known solution of path pre-computation, we introduce and study path caching, an incremental modification of on-demand path computation. By simulating realistic topologies and traffic conditions we investigate the performance of both alternatives. Our results show that caching is an effective alternative to path pre-computation and that both path caching and pre-computation can achieve significant processing cost savings without severely compromising routing performance.
Introduction Although a considerable amount of work has been done on the problem of supporting QoS in the network, only recently the role that routing will play in an integrated services network came into attention. The main body of the QoS routing work so far focuses on the path finding problem: given the QoS metrics, the network state and the QoS requirements of a request, find a path that maximizes the chances of the request for successful resource reservation and has the minimum negative impact on the network's ability to accept future requests. A variety of heuristics for the unicast version of the above problem under different QoS models have been discussed in the literature [1, 3, 4, 5, 6, 7, 8]. Some ([1, 3, 7, 8]), operate under a bandwidth based QoS model where requests express their QoS requirements in terms of desired bandwidth. This model has the advantage of simplicity, and is the basis of the Controlled Load service model proposed by the working group. Most of the path finding heuristics assume that paths can be calculated on a per request ba- sis, resulting in an on-demand mode of operation. While calculating paths on-demand leads to a simple implementation and reduces storage requirements, many believe that it may not be practical in environments with high rates of QoS requests because of its high processing overhead. Although this claim is hard to verify due to the limited experience with realistic QoS aware network environments, alternatives to on-demand routing have already been proposed [1, 7, 9, 10]. These alternatives are based on the path pre-computation principle: paths to destinations are computed asynchronously to the request arrivals and are used to route multiple requests, reducing in this way the per request processing overhead. In all the aforementioned path pre-computation propos- als, when paths are pre-computed, all possible paths to all destinations have to be computed and stored in a QoS routing table. This may prove inefficient both in terms of processing and storage if most of the pre-computed paths are not used. In addition, in all the path pre-computation proposals so far, the set of pre-computed paths is not updated between pre-computations. It is possible that allowing the addition of new "good" paths to the set of pre-computed paths will improve routing performance without incurring the cost of pre-computing a completely new set of paths. In this work, we propose a caching architecture that is more flexible than the so far proposed path pre-computation approaches. In this caching architecture, paths are computed only on-demand and then are stored in a path cache to be reused for future requests. If a request can not be routed using a cached path then an on-demand computation is used to determine a QoS path for it and the new path is added in the path cache, updating in this way its contents. To the best of our knowledge, the only previous work on path caching appeared in [17]. Although the approach is similar, our work is considerably different as will become apparent when we present our caching scheme in more detail. In ad- dition, a major goal of this work is to compare both the routing performance and the processing cost of path caching to that of a path pre-computation architecture and investigate the overall cost effectiveness of path caching as a method for reducing the processing cost of determining QoS paths. This paper is organized as follows: In Section 2, the algorithms used are discussed and path caching is introduced. Section 3 introduces the simulation environment and in Section 4 the different approaches are compared based on the simulation results. In the last Section we summarize our findings. Algorithms for Path Computation We consider only link state routing protocols where paths are calculated at the source and requests are routed using source routing. There is some evidence that this will be the architecture of choice for the standard QoS routing algorithms. Private Network to Network Interface (PNNI) [14], an already standardized QoS routing protocol, is based on this architecture. Moreover, the QoS routing proposals in IETF's OSPF working group are based on the link state architecture and can operate in both source routing and hop- by-hop mode. In a link state routing protocol, each node maintains a link state database that contains a description of the net-work state as known to the node. The link state database is updated from link state reports generated by other nodes. Link state updates are distributed to all nodes using flood- ing. In contrast to previous studies ([1]), we use a link up-date generation model proposed in [7] that initiates a new link state update when the available bandwidth in a link changes significantly since the last time advertised. A link state update threshold determines the percentage of change necessary for re-advertising the value of the available link bandwidth. If b last is the most recently advertised available bandwidth value and b cur is the current value, an update is originated only if jb cur \Gamma b last j=b last ? th, where th is the link state update trigger threshold. Recent simulation studies ([1]) showed that from among the heuristics proposed for routing requests with bandwidth requirements, the shortest path heuristics [1, 7, 8] perform better than the widest path heuristic [3] that prefers widest over shortest paths. The width of the path, also called bottleneck capacity, is defined as the minimum available band-width over all the links in the path. We will use the widest- shortest path heuristic [7] as the basis of the path computing algorithms. On-demand widest-shortest paths are computed as fol- lows: Links that have insufficient available bandwidth for the request that is being routed are pruned from the network topology before the path is calculated. Then the minimum hop count paths between the source and the destination are discovered and the widest one is used to route the request. If there are more than one widest-shortest paths one of them must be chosen. From among the multiple path pre-computation propos- als, we chose to use in this work the approach described in mainly because it is the only path pre-computation solution that has been proposed to IETF's OSPF working group. uses a modified Bellman-Ford algorithm to pre-compute the widest bottleneck capacity minimum hop path to each destination. In addition, paths that are longer than the minimum hop path (alternate paths) but have larger bottleneck capacity than the shorter paths recorded for this destination are also stored. If there are multiple paths with equal bottle-neck capacity (both minimum hop and alternate) all paths are stored. When a request arrives, a path is selected among the pre-computed paths as follows: paths are checked for feasibility in order of increasing length and the shortest feasible one is selected. As in the on-demand case, a path is feasible if its bottleneck capacity (as calculated during the time of path pre-computation) is larger or equal to the request requirements. If there are multiple feasible paths with the same hop count, a path is selected using the technique discussed above for on-demand path computation. If there are no feasible paths the request is routed over the longest available path for the destination. For comparison purposes we also use a static path computation algorithm. This operates in exactly the same way as the on-demand algorithm except that the link capacity is used as the value for the available bandwidth, making path selection insensitive to variations of resource availability in the network. If there are multiple minimum hop paths with the same (static) bottleneck capacity, one of the them is selected at random using the same load balancing technique as in the previous two cases, only that now the link capacity to the first hop of the path is used instead of the available bandwidth on the interface to the first hop of the path. 2.1 Path Caching Path caching attempts to reduce the processing complexity of on-demand path computation without compromising its on-demand nature and its ability to compute paths for individual requests when necessary. Path caching reduces the number of path computations by reusing already calculated paths. Already discovered paths to a particular destination are stored in a path cache associated with this destination. Future requests are routed on-demand only if they can not be routed using the contents of the path cache. A different path cache is associated with each destination node. Clearly, the path cache needs to be flushed and re-populated in case of topology changes (i.e. change in link status). The path cache can be implemented in a variety of ways. We chose a simple implementation where a path is repre- Link State Database Records Path Cache for destination 8 Network Topology Figure 1. Example path cache organization sented as a list of node structures. Each node structure is essentially a pointer to the corresponding entry in the link state database (Figure 1). This organization allows for simple traversal of the link state database and easy reconstruction of the path when it is needed for routing a request but is not optimize for storage. For each cached path the hop length and the bottleneck bandwidth capacity are maintained in the cache along with the sequence of nodes in the path. The value of the bottleneck capacity does not necessarily reflect the most recent information in the link state database, since it is not re-computed each time a link state update is received. Only feasible cached paths are considered for routing requests. A cached path is feasible if its bottleneck capacity is larger than the bandwidth requirements of the request. If the cache does not contain any feasible path, the request can not be routed using the cache contents and will have to be routed on-demand. 2.2 Operation When a new request arrives, the cache containing the paths to the destination node is searched for a feasible path. Such a path is selected using a cache selection policy. If such a path exists, then it is used to route the request. If there is no feasible path the request is routed on-demand. The on-demand computation may fail to discover an appropriate path, in which case the request is rejected. If a path is found though, it is added in the cache for the destination. If the cache is full, a cache replacement policy determines which cached path will be replaced by the new path. In order to make sure that the cached paths reflect to a reasonable degree the current network state, a cache update policy determines how the cached paths are updated. In the rest of this section we will discuss these cache managements policies in detail. 2.2.1 Cache Selection Policy In accordance with previous studies, in order to minimize the consumption of network resources, the shortest of the feasible cached paths should be used for routing a request. Choosing a longer path results in using resources on more links and potentially penalizes the ability of the network to accept future requests. Still, depending on the topology of the network, there may exist multiple paths of the same hop length. In this case a tie-breaking mechanism is needed. In this work we explore three such mechanisms ffl Round-Robin: For each path a counter of the times the path is used is maintained. When there are multiple feasible paths with the same hop count, the least used of the paths is chosen. This attempts to distribute the load among the multiple paths on a request basis. The usage counter is reset each time the path is added or removed in the cache and when the information about the bottleneck capacity of the path is updated (as we will describe in the next section). ffl Widest path: The path with the largest bottleneck capacity among the feasible equal hop length paths is chosen. This implements a "worse-fit" policy, in an attempt to reduce bandwidth fragmentation (see [16] for a discussion of bandwidth fragmentation). Tightest path: The feasible path with the smallest bottleneck bandwidth is chosen. This policy, in contrast to the previous one, attempts to pack requests and leave large chunks of bandwidth available for future larger requests. In all the above cases, in the occasion that there is also a tie in the amount of available bandwidth, a path is selected among the ones with the same hop length and bottleneck capacity at random with uniform distribution. 2.2.2 Cache Replacement Policy As a result of successful on-demand path computations performed for requests that could not be routed using a cached path, new information needs to be added to the cache. If the path discovered is already in the cache, its bottleneck capacity will be updated. Otherwise, the path will be added in the cache. If the cache is full another path will have to be replaced. The choice of the path to be replaced is such so that a path with low chances of being used later will be replaced. Note that since the new path is the result of a on-demand computation that had to be performed because there was no feasible path in the cache; it follows that the newly discovered path will have bottleneck capacity larger than all the currently cached paths. The search for a path suitable for replacement first considers paths that are longer than the path that is to be added in the cache. If longer paths exist they are ideal candidates for replacement since they will never be selected after the new path is added in the cache. Indeed, the cache selection policy will always prefer the new path to the longer and less wide path. In the next step, paths that have length equal to the new one are considered. If such paths exist, one of them is selected for replacement in agreement with the cache selection policy. i.e., if the widest cached path selection policy is used, then the narrowest of the paths with hop length equal to the new path is selected, if the tightest policy is used then the widest path is chosen and in the round-robin policy, the most used path is replaced. The last case is for the cache to contain only paths that are shorter than the new path. In this case it is not obvious which path is the one that has less chances of being used for routing future request. As a heuristic, we choose a path among all the cached paths again in accordance to the cached path selection policy. 2.2.3 Cache Update Policy Clearly, the network conditions (in our case the available bandwidth in each interface) change continuously, resulting in new feasible paths to destinations that need to be discovered and added to the path cache, and in new values for the bottleneck bandwidth capacity of already cached paths. The contents of the path cache can be updated either by invalidating cached paths or by accessing the link state database and re-computing updated values of the bottleneck band-width capacity of the cached paths. Note that the link state updates generated by nodes are used only to update the local link state database. The information about cached paths in not modified on receipt of a link state update. When cached paths are invalidated, future requests are forced to be routed on-demand, discovering in this way the new network state. As a result, path invalidation is expected to result in a larger overall number of on-demand path computations. On the other hand, re-computing the bottleneck capacity of cached paths will lead to fewer on-demand computations since the paths are still in the cache and can be used for routing future requests. Still, by only updating cached paths the discovery of new paths may be delayed resulting in sub-optimal routes. We investigate the performance of the two alternatives using three different cache update policies: ffl Periodic Invalidation: All the cached paths for all destinations are periodically invalidated, forcing future requests to be routed on-demand and re-populate the path caches. ffl Periodic Update: All cached paths for all destinations are updated periodically by accessing the link state topology database and re-computing bottleneck bandwidth values. ffl Individual Invalidation: Each cached path has a life-time associated with it. After the path's lifetime has expired it is invalidated. All the above cache update policies require performing operations periodically or in the case of individual invalidation setting the lifetime of a cache entry. We will collectively refer to the update period of all the above policies as the cache update period. This term will also include the lifetime of a cache entry when the individual invalidation policy is used and the path pre-computation period when paths are pre-computed. After presenting the details of our path caching architecture we can contrast it with the previous work on caching presented in [17]. The main difference is that [17] allowed only a single path to be cached per destination. We allow caching multiple paths per destination achieving more flexibility for routing requests and also in an attempt to exploit topology characteristics like availability of multiple equal hop paths between sources/destinations. paths and As a result of caching multiple paths per destination, cache management in the form of cache selection and cache replacement is now an important component of the caching archi- tecture. In addition, we investigate the effects of the cache size to the performance of the caching scheme. Finally, cached paths in [17] were invalidated when a sufficiently large number of link state updates was received for any of the links belonging to the cached path. We believe that the implementation of this policy is non-trivial in terms of processing that has to be performed on receipt of a new link state update. We chose to investigate different, lower cost mechanisms for keeping cached paths up to date. 3 Simulation Environment and Performance Metrics We have developed a simulator based on the Maryland Routing Simulator (MaRS) [13]. MaRS was extended to perform source routing and the link state update generation mechanism has been modified to support triggered up- dates. A simple resource reservation protocol has been implemented for unicast connections. The traffic load is expressed in terms of connection requests. If a request is established there is no actual packet traffic over its path. A A A (a) isp A (b) mesh Figure 2. Topologies used in the experiments The current load for the network links is determined by the list of reservations that is maintained for each interface by the reservation protocol. Effectively, all connections are assumed to be constant bit rate and to conform to their stated bandwidth requirements. This is clearly a simplification but issues like traffic policing, shaping, and modeling are orthogonal to the issues we study here. The topologies used in the experiments are shown in Figure 2. The isp is a typical topology of a fairly large ISP provider [1]. The mesh topology is more compact and we expect the differences in running time between computing a path to all destinations and a single destination to be small. In addition, in contrast to isp, the mesh topology has a larger number of equal hop multi-paths. The propagation delay in all links is set to 1 millisecond. It is assumed that links never fail. We believe that QoS routing will be more beneficial in cases where temporary mismatches between traffic pattern and network topology will create increased loads on parts of the network. These conditions can occur either as a result of a network failure (link failure) or simply because of changing traffic patterns. In order to recreate these conditions in our simulations we determine the link capacities so that the topology is dimensioned for uniform traffic. This dimensioning results in link capacities between MBits/sec for the isp topology and 100 and 140 MBits/sec for mesh. We create conditions of non-uniform traffic by establishing two sets of non-uniform traffic nodes. Nodes that belong to one of the sets can request connections only with nodes in the other set and have a mean request arrival rate different than the nodes that do not belong to any of the sets. If the destination set contains more than one node, the destination is chosen randomly among the nodes in the destination set with uniformly distributed probability. The nodes belonging to each set for both topologies are shown in Figure marked with A and B correspondingly. In the case of non-uniform traffic there are two request arrival rates. The background rate for traffic between nodes that do not belong to any of the sets of non-uniform traffic nodes and the foreground rate for the nodes in the sets. The background rate is chosen so that background traffic levels are large enough to limit the routing options available to primary traffic, i.e., reducing the levels of background traffic will reduce the overall blocking ratio. A basic dimension of the comparison between the different routing architectures is their behavior under different workloads. To capture the effects of call duration and requested bandwidth we use two different workloads which combine different duration and request size. The parameters of the workloads are summarized in Table 1. Band-width requirements are uniformly distributed between the minimum value of 64 kbit/sec and maximum value shown while call duration is exponentially distributed with mean of 3 minutes. MIT stands for mean inter-arrival time. The traffic loads are chosen in such a way so that blocking ratios are kept in the 2%-30% range. The arrival rates are Poisson distributed with the mean shown in Figure 1. All experiments were performed with a link state update triggering threshold of 10%. This number results in frequent link state updates, ensuring that link state information is accurate. We also performed experiments with larger threshold values that resulted in link state information inac- curacy. Although we do not report the detailed results here due to space limitations, the overall behavior of the different alternatives is similar to what is described in Section 4 even when link state information is inaccurate. Each node in the network has an individual request arrival process, independent from the ones of the other nodes. The network was simulated until 100,000 connections were requested. The first 30,000 connection requests were used to warm up the network and are ignored when calculating the routing performance and the processing cost. 3.1 Higher Level Admission Control It is well known [11, 12] that excessive alternate routing can actually reduce routing performance in conditions Foreground MIT 2.5 sec 20 sec Background MIT 5 sec 40 sec Foreground MIT .65 sec 5 sec Background MIT 1.3 sec 7.5 sec Table 1. Workload parameters of high load, since traffic following alternate routes can interfere with minimum hop traffic competing for the same links. In order to address this problem, we investigate high level admission control policies similar to trunk reservation. Assuming that explicit routing is used, we propose a trunk reservation approach that may result in rejecting requests routed over alternate paths during the resource reservation phase, even when there are sufficient resources to satisfy the request. A local per node check determines if the request is allowed to continue reserving resources over the path depending on both the resources that remain available on the link after the reservation and the relative length of the path, i.e., how much longer it is compared to the minimum hop path. This information is easy to compute if after each topology change the minimum hop to each destination is computed. When a reservation is attempted through a node, the quantity (b avail capacity is calculated for the outgoing link i, where b avail is the amount of available bandwidth on link i, and b capacity is the capacity of link i. The resource reservation for the request is allowed to continue only if this fraction is larger than a trunk reservation level which depends on the length of the path. If the request fails this test, it is rejected. Computing the trunk reservation level based on the request's requirements and the residual capacity of the link allows us to reject requests only when they really would have resulted in overloading a link. Having different trunk reservation levels for increasingly longer paths allows us to penalize longer paths more and control alternate routing better. For the experiments in this paper, the trunk reservation levels were set to 2% for one hop longer paths, 5% for two, three and four hops longer, and 10% for all longer paths. 3.2 Performance Measures In most circuit switched routing performance studies the connection blocking ratio is used as a measure of routing performance. The connection blocking ratio is defined as the percentage of connection requests rejected out of the total number of requests. As mentioned in [1], this is not necessarily an accurate measure since connections have different bandwidth requirements. Thus we mainly report the bandwidth acceptance ratio, the sum of bandwidths of connection requests accepted over the sum of bandwidths of all the connection requests. To compare the processing cost of the alternative routing architectures we use the processing cost model described in [2]. In this model the routing algorithm is broken down into a number a elementary operations and the cost of each of these operations is measured in carefully designed benchmark experiments. These operations are: a) initialization, b) accessing the link state database, c) data structure opera- tions. Then, in the actual simulations, the number of times that each elementary operation was executed is determined and the aggregate cost of the routing algorithm is computed by summing the products of counts and cost for each elementary operation. The number computed this way corresponds to the total time spent in routing protocol processing for a given simulation run. For path caching, we need to accommodate new elementary operations that are unique to path caching. These operations are: a) updating the cache, b) adding a path in the cache, c) cache lookup, d) invalidating a cached path. We derive the cost of the individual operations by profiling the execution of benchmark experiments using the pixie profiler available in the Digital Unix platform used for the simulations. The profiler gives the total real time spent in each function of the simulation. By associating the total time spent for operations of a particular category with the number of such operations we can derive an approximate cost per operation. The details of the benchmark experiments are described in [2]. The cost of cache operations in measured in conjuction with how many iterations the main loop of these operations required. The number of iterations depends on the number of cached paths. The results are summarized in Table 2. The numbers are derived for the architecture we used for the simulations: Alphaserver servers with 4 Alpha 21064A CPUs at 275 MHz, 256 Mbytes of real memory, and Digital Unix operating system. Cache related costs do not depend on the cache size because of the way they are computed. The cost of initialization is large since part of initialization is spent in releasing the memory of the data structures for the paths used since the last path pre-computation. This cost clearly depends on the size of the network. The cost of all other operations is relatively independent of the size of the network topology and size. In all the numbers reported the 95% confidence interval is under .3% in the isp and 1% in the mesh topology for the bandwidth acceptance ratio and under .5% for the processing cost values in both topologies. Confidence intervals were calculated using the Student's t distribution. Operation isp mesh Iteration (Avg/Round) 2 1.5 Data Structure (Avg/Operation) 4 4 Initialization (Avg/Path Computation) 120 47 Cache Update (Max/Path) 5 Caching a Path (Max/Path Cached) 15 Cache Lookup (Max/Cached Path) 3 Path Selection (Max/Path) 3 Table 2. Cost of the operations performed by the routing algorithms (in sec) Performance Comparison First we determine appropriate values for the path pre-computation period in the particular topologies and workloads used. These values are chosen so that the routing performance of the various alternatives measured using the bandwidth acceptance ratio is better or similar to the performance of static path computation. The values for the up-date period calculated this way and used in the experiments are 5, 10, 30, 60, 120, 180, 220, and 280 seconds. For the larger values of the update period routing performance is actually worse than static path computation in some combinations of topology and workload, nevertheless we use them for comparison purposes. A disadvantage of having fixed update periods is that it has varying effects under different workloads. For example, when the same network topology is used, requests belonging to a workload with requests for large amount of bandwidths, must have a slower arrival rate (since we want to keep the rejection rate low) than requests of a workload with smaller request sizes. For slow arrival rates, path pre-computation is performed more often in terms of number of requests between successive path pre- computations. Still, having a fixed period will most probably be the simplest alternative in a real network. In addition, even for the simplified environment of our experiments, it is not obvious how to choose equivalent pre-computation periods for different workloads since due to non-uniform traffic different nodes have different request rates. The cache size for the path caching experiments was set to four paths. Choosing a small cache size is important since it is desirable to minimize the storage overhead of the path caches. Nevertheless, we verified that in the traffic workloads and topologies used in the experiments, increasing the cache size did not have any effect in the routing performance or the processing cost of all path caching alterna- tives. This is an indication that small caches of very few paths are sufficient for the effective operation of the path caching schemes. We compare the different approaches by evaluating their performance/cost tradeoffs. We accomplish this by plotting the bandwidth acceptance ratio against the processing cost for the different values of the cache update or path pre-computation period. This results in a curve for each different alternative. The points of the curve that have larger costs (x-axis coordinate) correspond to small periods. For on-demand path computation there is only a single point since its routing performance and cost does not dependent of the update period. The processing cost of static computation is negligible but in the graphs we plot a line instead of a single point on the y-axis to make comparisons with the routing performance of the other alternatives easier. In Figure 3 we show the performance of path pre-computation and caching for both topologies for requests up to 1 Mbit/sec, for the widest path cache selection pol- icy. In this figure we see that for larger update periods all alternatives can achieve significant processing cost savings when compared to on-demand routing. For small update periods all alternatives have routing performance similar to on-demand routing but with cost that can be similar or even exceed the cost of on-demand routing. Indeed, path pre-computation and periodic cache update incur a processing cost each time paths are re-computed or the cache is up- dated. If the update period is sufficiently small, their cost can exceed that of on-demand path computation. On the other hand, the cache invalidation policies do not involve any processing cost for cache management. As a result, their processing cost can only be smaller than that of on-demand computation. Path pre-computation and periodic cache update achieve better processing cost savings for similar values of the up-date period. This is more visible in part (b) of Figure 3, in the isp topology. For large values of the update period, the cost of pre-computation and periodic update levels off. This reflects that the processing due to path computation is so small that path selection cost becomes the dominant cost component. On the contrary, the cost of the other two cache policies continues to decrease as the update period increases. This cost decrease is due to the fact that with larger update periods, cached paths are updated less often and tend to be used more, reducing in this way the number of on-demand path computations. Path pre-computation has processing cost similar to that of periodic cache update in the mesh topology. A larger difference in favor of periodic cache update exists in the isp topology. This is due to the fact that in the larger isp topology the cost of computing a path to a single destination is much lower than the cost of computing paths to all destinations. This cost difference is not very pronounced in the mesh topology. Note also that in the mesh topology the routing performance of all alternatives appears to deteriorate quickly and become worse Acceptance Processing Cost (% of total simulation time) Per-Upd Indiv-Inv Per-Inv On-Demand (a) mesh0.890.910.930.950.97 Acceptance Processing Cost (% of total simulation time) Per-Upd Indiv-Inv Per-Inv On-Demand (b) isp Figure 3. Performance comparison, 1 Mbit/sec than static routing even for moderately small values of the update period, while this is not the case in the isp topol- ogy. This is mainly a result of the fact that in the mesh topology most calls (especially between the source and destination of hot-spot traffic) are routed over the equal hop (and in this case also minimum hop) multi-paths. This is in favor of the static routing algorithm that can also use all the available minimum hop multi-paths. In the isp topol- ogy, the existence of alternate paths results in significantly improved routing performance of all alternatives over static routing. The results for the 6 Mbit/sec requests are similar to the 1 Mbit/sec case and are not shown here. 4.1 Effects of Cache Selection Policy In Figure 4 we show the effects of the cache selection policy for both topologies for requests up to 1 Mbit/sec. It turns out that the type of cache selection policy affects the observed behavior of the cache based alternative only when0.780.820.860.90.940.98 Acceptance Processing Cost (% of total simulation time) RR Per-Upd Widest Per-Upd Tightest Per-Upd Widest Per-Inv Widest Indiv-Inv (a) mesh0.890.910.930.950 0.5 1 Acceptance Processing Cost (% of total simulation time) RR Per-Upd Widest Per-Upd Tightest Per-Upd Widest Per-Inv Widest Indiv-Inv (b) isp Figure 4. Effects of cache selection policy, 1 Mbit/sec the periodic update is used. Using the periodic update policy results in a average number of cached paths that is larger than when the invalidation based policies are used. This is intuitive since the periodic update policy never invalidates paths in contrast to the other two policies that periodically invalidate individual or all the cached paths. With more paths in the cache, the effects of the cache selection policy become more pronounced. For the periodic cache update policy, the widest path cache selection policy results in better routing performance for smaller update period values for both topologies. The narrowest path policy always results in the worse routing performance. For the other cache policies the type of cache selection policy does not have any significant effect since the cache occupancy and the hit ratios are lower. For these policies we show the curve for only the widest cache selection policy. Overall, we observe that only the widest cached path selection policy achieves good performance when the periodic update cache update policy is used. This is intuitive since, with increasing cache update periods, the bottleneck bandwidths of the cached paths become increasingly less accu- rate. Choosing the tightest path will soon result in overflowing the chosen path since the reduction of the path's available bandwidth will be discovered later, when the cache is updated again. The round-robin cache selection policy ignores completely the available bandwidth capacity and fails to achieve good performance when caches are updated of- ten. Only choosing the widest cached path combines protection against the infrequent updating of the cached paths with good routing performance for smaller update periods. 5 Other Considerations 5.1 Cache Size In Figure 5 we show how the cache size affects the routing performance of the different cache based alterna- tives. In part (a) of the figure we show data for the mesh topology and in (b) for isp. Again, requests are up to 1 Mbits/sec and the link state update threshold was set to 10%. The update period was set to 5 seconds. The invalidation based policies do not show any important dependence on the cache size, mainly since the cache occupancy is low most of the times. Nevertheless, there are some interesting variations in the behavior of the periodic cache update policy. In the mesh topology, when the widest cached path selection is used, performance increases with increasing cache size. This is reasonable since this topology has multiple equal hop paths that should be in cache to achieve good performance. The more paths exist in the cache, the more information is available about the network each time cached paths are updated and the load balancing performed by choosing the widest of them performs bet- ter. This is an indication that in some types of topologies, caching multiple paths per destination is advantageous to a single path cache architecture similar to [17]. The performance of choosing round robin between the cached paths does not really depend on the cache size. Due to the high degree of link sharing between the minimum hop multi-paths, even rotating between few multi-paths can achieve the same link load as rotating between multiple paths. Selecting the tightest cached path performs bad when the cache size is not 1, showing that this policy is not very appropriate for this topology. In the isp case there will be less equal hop multipaths in the caches due to the topology. As a result, the variations in the routing performance due to varying cache size are much less pronounced. For the periodic cache up-date policy, routing performance of the widest cached path selection policy is independent of the cache size and the tightest cached path selection policy performs bad again. In the isp topology, the routing performance of the round-robin cached path selection policy seems also to be slightly0.860.90.940.98 Acceptance Cache Size RR Per-Upd Widest Per-Upd Tightest Per-Upd Widest Indiv-Inv Widest Per-Inv (a) Acceptance Cache Size RR Per-Upd Widest Per-Upd Tightest Per-Upd Widest Indiv-Inv Widest Per-Inv (b) isp Figure 5. Effects of cache size decreasing with a cache that is larger than 1 path, indicating again that this selection policy does not perform well. Again, for the invalidation based cache update policies the type of cached path selection policy does not affect their performance. As a result, in Figure 5, for the invalidation based policies we show only the curve for the widest cached path selection policy. 6 Conclusions From our experiments it turns out that: ffl Path caching is a viable method for reducing the processing cost of on-demand QoS path computation, at least when the widest-shortest path selection criterion is used. ffl The periodic cache update policy coupled with the widest cached path selection policy achieves the best processing cost/routing performance trade-off, in many cases significantly better than path pre-computation ffl The tightest cached path selection policy performs bad in all cases considered here. ffl Invalidation based cache update policies achieve significant processing cost savings but in general less than path pre-computation and periodic cache update. ffl Topology can play an important role in both the processing cost and the routing performance of the different caching policies. In particular, the amount of equal hop multi-paths and the density and diameter of the topology can determine the relative costs of single-destination and all-destination path computations and the routing performance of the different cached path selection policies. ffl Small cache sizes are sufficient for achieving good routing performance and processing savings. There is always though a dependence on the network topol- ogy. In some cases, the cache should be large enough to hold a specific number of minimum length equal hop paths as was the case in the mesh topology. --R On Path Selection for Traffic with Bandwidth Guarantees "QoS Routing: A Performance Perspective." Quality of Service Routing for Supporting Multimedia Applications Routing Subject to Quality of Service Constraints in Integrated Communication Networks The Design and Evaluation of Routing Algorithms for real-time Channels Two Distributed Algorithms for the Constrained Steiner Tree Problem Routing High-Bandwidth Traffic in Max-Min Fair Share Networks A Route Precomputation Algorithm for Integrated Services Networks Efficient Precomputation of Quality-of-Service Routes Stabilization of Alternate Routing Net- works Dynamic Alternate Routing - Modeling and Behaviour Private Network to Network Interface Specification Adaptive Source Routing of Real Time Traffic in Integrated Service Networks Performance Modeling and Management of High-Speed Networks --TR --CTR Matthew Stafford , Xiangying Yang , Gustavo de Veciana, Connection caching to reduce signaling loads with applications to softswitch telephony, Computer Networks: The International Journal of Computer and Telecommunications Networking, v.42 n.2, p.211-229, 5 June
trunk reservation;link state routing;path caching;path pre-computation
309102
Global Convergence of Trust-region Interior-point Algorithms for Infinite-dimensional Nonconvex Minimization Subject to Pointwise Bounds.
A class of interior-point trust-region algorithms for infinite-dimensional nonlinear optimization subject to pointwise bounds in L p-Banach spaces, $2\le p\le\infty$, is formulated and analyzed. The problem formulation is motivated by optimal control problems with L p-controls and pointwise control constraints. The interior-point trust-region algorithms are generalizations of those recently introduced by Coleman and Li [SIAM J. Optim., 6 (1996), pp. 418--445] for finite-dimensional problems. Many of the generalizations derived in this paper are also important in the finite-dimensional context. All first- and second-order global convergence results known for trust-region methods in the finite-dimensional setting are extended to the infinite-dimensional framework of this paper.
Introduction . This paper is concerned with the development and analysis of a class of interior-point trust-region algorithms for the solution of the following infinite-dimensional nonlinear programming problem: minimize f(u) subject to u ae IR n is a domain with positive and finite Lebesgue measure Moreover, denotes the usual Banach space of real-valued measurable functions, and the objective is continuous on an open neighborhood D ae U of B. All pointwise statements on measurable functions are meant to hold -almost everywhere. The lower and upper bound functions a; are assumed to have a distance of at least - ? 0 from each other. More precisely, This version was generated June 2, 1997. y Institut f?r Angewandte Mathematik und Statistik, Technische Universit?t M-unchen, D-80290 M-unchen, Germany, E-Mail: mulbrich@statistik.tu-muenchen.de. This author was supported by the DFG under Grant Ul157/1-1 and by the NATO under Grant CRG 960945. z Institut f?r Angewandte Mathematik und Statistik, Technische Universit?t M-unchen, D-80290 M-unchen, Germany, E-Mail: sulbrich@statistik.tu-muenchen.de. This author was supported by the DFG under Grant Ul158/1-1 and by the NATO under Grant CRG 960945. x Department of Computational and Applied Mathematics, Rice University, Houston, Texas 77005- This author was supported by the NSF under Grant DMS- 9403699, by the DoE under Grant DE-FG03-95ER25257, the AFSOR under Grant F49620-96-1-0329, and the NATO under Grant CRG 960945. M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS Problems of type (P) arise for instance when the black-box approach is applied to optimal control problems with bound-constrained L p -control. See, e.g., the problems studied by Burger, Pogu [3], Kelley, Sachs [14], and Tian, Dunn [20]. The algorithms in this paper are extensions of the interior-point trust-region algorithms for bound constrained problems in IR N introduced by Coleman and Li [6]. Algorithmic enhancements of these methods have been proposed and analyzed in the finite-dimensional context in Branch, Coleman, Li [2], Coleman, Li [5], and Dennis, Vicente [11]. Dennis, Heinkenschloss, Vicente [10], and Heinkenschloss, Vicente [13] extend these methods to solve a class of finite-dimensional constrained optimization problems with bound constraints on parts of the variables. See also Vicente [23]. The interior-point trust-region methods in [6] are based on the reformulation of the Karush-Kuhn-Tucker (KKT) necessary optimality conditions as a system of nonlinear equations using a diagonal matrix D. This affine scaling matrix is computed using the sign of the gradient components and the distance of the variables to the bounds. See x 2. The nonlinear system is then solved by an affine-scaling interior-point method in which the trust-region is scaled by 2 . These methods enjoy strong theoretical convergence properties as well as a good numerical behavior. The latter is documented in [2], [6], [10], [11] where these algorithms have been applied to various standard finite-dimensional test problems and to some discretized optimal control problems. The present work is motivated by the application of interior-point trust-region algorithms to optimal control problems with bounds on the controls. Even though the numerical solution of these problems requires a discretization and allows the application of the previously mentioned algorithms to the resulting finite-dimensional problems, it is known that the infinite-dimensional setting dominates the convergence behavior if the discretization becomes sufficiently small. If the algorithm can be applied to the infinite-dimensional problem and convergence can be proven in the infinite-dimensional setting, asymptotically the same convergence behavior can be expected if the algorithm is applied to the finite-dimensional discretized problems. Otherwise, the convergence behavior might - and usually does - deteriorate fast as the discretization is refined. In the present context, the formulation of the interior-point trust-region algorithms for the solution of the infinite-dimensional problem (P) requires a careful statement of the problem and of the requirements on the function f . This will be done in x 3. The infinite-dimensional problem setting in this paper is similar to the ones in [12], [14], [15], [20]. The general structure of the interior-point trust-region algorithms presented here is closely related to the finite-dimensional algorithms in [6]. However, the statement and analysis of the algorithm in the infinite-dimensional context is more delicate and has motivated generalizations and extensions which are also relevant in the finite-dimensional context. The analysis performed in this paper allows for a greater variety of choices for the affine scaling matrix and the scaling of the trust-region than those presented previously in [6], [11]. Our convergence analysis is more comprehensive than the ones in [5], [6], [11], [23]. In particular, we adapt techniques proposed in Shultz, Schnabel, and Byrd [18] to prove that under mild assumptions every accumulation point satisfies the second-order necessary optimality conditions. Moreover, the convergence results proven in this paper extend all the finite-dimensional ones stated in [17], [18], [19] to our infinite-dimensional context with bound constraints. In the follow up paper [22] we present a local convergence analysis of a superlinearly convergent affine-scaling interior-point Newton method GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 3 which is based on equation (13) and prove under appropriate assumptions that in a neighborhood of the solution the generated trial steps are accepted by our trust-region algorithms. There a projection onto the set B will be used in the computation of trial steps. This extension to the finite-dimensional method, which was originally motivated by the function space framework, has also led to significant improvements of the finite-dimensional algorithm applied to some standard test problems, not obtained from the discretization of optimal control problems. See [22]. Trust-region methods for infinite-dimensional problems like (P) have also been investigated by Kelley, Sachs [15] and Toint [21]. In both papers the constraints are handled by projections. The paper [21] considers trust-region algorithms for minimization on closed convex bounded sets in Hilbert space. They are extensions of the finite-dimensional algorithms by Conn, Gould, Toint [7]. It is proven that the projected gradient converges to zero. A comprehensive finite-dimensional analysis of trust-region methods closely related to those introduced by Toint can be found in Burke, Mor'e, Toraldo [4]. In contrast to the results in [21], our convergence analysis is also applicable to objective functions that are merely differentiable on a Banach space which reduces the differentiability requirements substantially compared to the L 2 -Hilbert space framework. Furthermore, for the problem class under consideration our convergence results are more comprehensive than the ones in [21]. The infinite-dimensional setting used in [15] fits into the framework of this paper, but is more restrictive. The formulation of their algorithm depends on the presence of a penalty term ff R\Omega in the objective function f and they assume ae IR is an interval. Their algorithm also includes a 'post smoothing' step, which is performed after the trust-region step is computed. The presence of the post smoothing step ensures that existing local convergence results can be applied. Such a 'post smoothing' is not needed in the global analysis of this paper. We introduce the following notations. L(X; Y ) is the space of linear bounded operators from a Banach space X into a Banach space Y . By k \Delta k q we denote the norm of the Lebesgue space L and we write (\Delta; \Delta) 2 for the inner product of the Hilbert space H 2(\Omega\Gamma2 For (v; w) 2 (L denoting the dual space of L q(\Omega\Gamma9 we use the canonical dual pairing hv; wi R\Omega v(x)w(x) dx, for which, if q ! 1, the dual space L is given by L q 0 (in the case means q Especially, if 2(\Omega\Gamma and h\Delta; \Deltai coincides with (\Delta; \Delta) 2 . Finally, we set U 0 which is the same as U , if p ! 1. Moreover, it is easily seen that w 7\Gamma! h\Delta; wi defines a linear norm-preserving injection from L 1 Therefore, we may always interpret U 0 as subspace of U . As a consequence of Lemma 5.1 we get the following chain of continuous imbeddings: Throughout we will work with differentiability in the Fr'echet-sense. We write for the gradient and r 2 f(u) 2 L(U; U ) for the second derivative of f at exist. The k \Delta k 1 -interior of B is denoted by B We often 4 M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS This paper is organized as follows. In the next section we review the basics of the finite-dimensional interior-point trust-region algorithms in [6] and use this to motivate the infinite-dimensional setting applied in this paper. In x 3 we formulate the necessary optimality conditions in the framework needed for the interior-point trust-region algorithms. The interior-point trust-region algorithms are introduced in x 4. Some basic technical results are collected in x 5. The main convergence results are given in x 6, which concerns the global convergence to points satisfying the first-order necessary optimality conditions, and in x 7, which concerns the global convergence to points satisfying the second-order necessary optimality conditions. These convergence results extend all the known convergence results for trust-region methods in finite dimensions to the infinite-dimensional setting of this paper. The local convergence analysis of these algorithms is given in the follow up paper [22], which also contains numerical examples illustrating the theoretical findings of this paper. 2. Review of the finite-dimensional algorithm and infinite-dimensional problem setting. We briefly review the main ingredients of the affine-scaling interior-point trust-region method introduced in [6]. We refer to that paper for more details. The algorithm solves finite-dimensional problems of the form minimize f(u) subject to u is a twice continuously differentiable function and a ! b are given vectors in IR N . (One can allow components of a and b to be \Gamma1 or 1, respec- tively. This is excluded here to simplify the presentation.) Inequalities are understood component wise. The necessary optimality conditions for (PN ) are given by a - - a - 0; - With the diagonal matrix defined by ii (1) , the necessary optimality conditions can be rewritten as a - (2) where the power r ? 0 is applied to the diagonal elements. This form of the necessary optimality conditions - we choose can now be solved using Newton's method. The i-th component of the function D(u) is differentiable except at points where this lack of smoothness is benign since D(u) is multiplied by rf(u). One can use GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 5 where J(u) is the diagonal matrix ii as the approximate derivative of D(u)rf(u). After symmetrization, one obtains One can show that the standard second-order necessary optimality conditions are equivalent to (2) and the positive semi-definiteness of - M(-u). The standard second-order sufficient optimality conditions are equivalent to (2) and the positive definiteness of - M(-u). A point satisfying the necessary optimality conditions (2) is now computed using the iteration u b, the trial step is an approximate solution of subject to k-sk 2 with - . The trust-region radius \Delta k is updated from iteration to iteration in the usual fashion. In (5) the Hessian r 2 f(u k ) might be replaced by a symmetric approximation B k . If the approximate solution - s k of (5) satisfies a fraction of Cauchy decrease condition then under appropriate, standard conditions one can show the basic trust-region convergence result lim inf Stronger convergence results can be proven if the assumptions on the function f and on the step computation - s k are strengthened appropriately. See [6] and [5], [11]. Coleman and Li [6] show that close to nondegenerate KKT-points one obtains trial steps - s k which meet these requirements if one first computes an approximate solution of (5) ignoring the bound constraints and then satisfies the interior-point condition by a step-size rule. A careful analysis of the proofs in [6] unveils that the same holds true for nearly arbitrary trust-region scalings. It becomes apparent that the crucial role of the affine scaling does not consist in the scaling of the trust-region but rather in leading to the additional term diag(rf k )J k in the Hessian - of - Near nondegenerate KKT-points this positive semi-definite diagonal-matrix shapes the level sets of - in such a way that all 'bad' directions - s which allow only for small step-sizes to the boundary of the box cannot minimize - / k on any reasonable trust-region. The trust-region scaling in (5), (6) tends to equilibrate the distance of the origin to the bounding box constraints f-s : g. However, for this feature the equivalence of 2- and 1-norm is indispensable and thus it does not carry over to our infinite-dimensional framework. In fact, in the infinite-dimensional 6 M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS setting the affine-scaled trust-region fk-sk no longer enjoys the property of reflecting the distance to the bounding box constraints. Therefore we will allow for a very general class of trust-region scalings in our analysis. See also [11]. Since, as mentioned above, the term diag(rf k )J k in the Hessian - plays the crucial role in this affine-scaling interior-point all convergence results in [6] remain valid. It is also worth mentioning that in our context an approximate solution - s k of (5) satisfying (6) can be easily obtained by applying any descent method which starts minimization at along the steepest descent direction \Gamma - k . Moreover, we show in [22] that near an optimizer satisfying suitable sufficiency conditions admissible trial steps can be obtained from unconstrained minimizers of - projection onto B. Here our flexibility in the choice of the trust-region scaling will prove to be valuable. The finite-dimensional convergence analysis heavily relies on the equivalency of norms in IR N . This is for example used to obtain pointwise estimates from estimates. In the infinite-dimensional context the formulation of the algorithm and the proof of its convergence is more delicate. We will make use of the following Assumptions: is differentiable on D with g mapping B ae U continuously into U 0 . (A2) The gradient g satisfies g(B) ae V . There exists c 1 ? 0 such that kg(u)k 1 - c 1 for all u 2 B. f is twice continuously differentiable on D. If for all u 2 B, and if converges to zero in all spaces L then r 2 f(u)h k tends to zero in U 0 . For the assumptions (A1) and (A4) simply say that f is continuously Fr'echet-differentiable or that f is twice continuously Fr'echet-differentiable, respec- tively. If then the requirements that g(u); r 2 f(u)h 2 U is a further condition. It allows us to use estimates like hv; g(u)i - 1. Moreover, since on L 1(\Omega\Gamma the norms coincide, assumption (A4) implies that r also for Finally, (A1) ensures that the gradient g(u) is always at least an L 1 - function which will be essential for many reasons, e.g. to allow the definition of a function space analogue for the scaling matrix D. The assumption (A2) is motivated by the choice of the scaling matrix D and the fraction of Cauchy decrease condition (6) in the finite-dimensional case. The infinite-dimensional analogue d(u) of the diagonal scaling matrix D(u) will be a function. Given the definition (1) of D(u) it is to be expected that d(u) 2 L (\Omega\Gamma8 Hence, the candidate for the Cauchy step one will in general not be able to find a scaling - ? 0 so that a ! u b. The assumption (A2) assures that - . The uniform boundedness assumption (A3) is, e.g., used to derive the important estimate (26). We point out that in (A3) the uniform bound on g(u) has to hold only for which is a bounded set in L The conditions (A1)-(A4) limit the optimal control problems that fit into this framework. However, a large and important class of optimal control problems with these conditions. For example, the conditions imposed in [12, p. 1270], [20, p. 517] to study the convergence of the gradient projection method GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 7 imply our assumptions (A1), (A2), and (A4). The assumption (A3) can be enforced by additional requirements on the functions OE and S used in [12], [20]. The boundary control problems for a nonlinear heat equation in [3] and in [14], [15] also satisfy the assumptions (A1)-(A4). See [22]. 3. Necessary optimality conditions and affine scaling. The problem under consideration belongs to the class of cone constrained optimization problems in Banach space for which optimality conditions are available (cf. [16]). But we believe that for our particular problem an elementary derivation of the necessary optimality conditions for problem (P) not only is simpler but also more transparent than the application of the general theory. This derivation also helps us to motivate the choice of the affine scaling which is used to reformulate the optimality condition and which is the basis for the interior-point method. 3.1. First-order necessary conditions. The first-order necessary optimality conditions in Theorem 3.1 are completely analogous to those for finite-dimensional problems with simple bounds (cf. x 2, [6]). We only have to replace coordinatewise by pointwise statements and to ensure that the gradient g(-u) is a measurable function. Theorem 3.1 (First-order necessary optimality conditions). Let - u be a local minimizer of problem (P) and assume that f is differentiable at - u with g(-u) 2 U 0 . Then 2\Omega with 2\Omega with - 2\Omega with - are satisfied. Proof. Condition (O1) is trivially satisfied. To verify (O2), define and assume that A \Gamma has positive measure is continuous from below and A k This yields a contradiction, because - d d- l 0: Hence we must have In the same way we can show that -(A+ 0g. Finally, we look at Assume that -(I) I we can find l ? 0 with -(I l 8 M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS that - u d d- l a contradiction to the local optimality of - u. Hence means that (O2) holds. 3.2. Affine scaling. Let assumption (A1) hold. Our algorithm will be based on the following equivalent affine-scaling formulation of (O2): d r arbitrary and d(u) 2 V , u 2 B, is a scaling function which is assumed to satisfy for all x 2 \Omega\Gamma The equivalence of (O2) and (7) will be stated and proved in Lemma 3.2. Before we do this, we give two examples of proper choices for d. The first choice I is motivated by the scaling matrices used in [6] (see (1)). Except for points x with those used in [6] and [11]: d I (u)(x) The slight modification in comparison to (1) will enable us to establish the valuable relation (16) without a nondegeneracy assumption. While the global analysis could be carried out entirely with this choice, the discontinuous response of d(u)(x) to sign changes of g(u)(x) raises difficulties for the design of superlinearly convergent algorithms in infinite dimensions. These can be circumvented by the choice and and It is easily seen that d = d I and d = d II both satisfy (8). An illustrative example for the improved smoothness of the scaling function d II (u) will be given in x 4.1. Lemma 3.2. Let (A1) hold and - u 2 B. Then (O2) is equivalent to (7) for all r ? 0 and all d satisfying (8). Proof. Since d r , r ? 0, also satisfies (8), we may restrict ourselves to the case First assume that (O2) holds. For all x 2\Omega with GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 9 then - In both cases On the other hand, let hold. For all x 2\Omega with 2\Omega with - would yield the contradiction d(-u)(x) ? 0. Analogously, we see that g(-u)(x) - 0 for all x 2\Omega with - Therefore, (O2) holds. 3.3. Second-order conditions. If assumption (A4) holds, we can derive second-order conditions which are satisfied at all local solutions of (P). These are also analogous to the well known conditions for finite-dimensional problems. Theorem 3.3 (Second-order necessary optimality conditions). Let (A4) be satisfied and g(-u) 2 U 0 hold at the local minimizer - u of problem (P). Then are satisfied, where 2\Omega with - u(x) 2 fa(x); b(x)gg denotes the tangent space of the active constraints. Proof. Let the assumptions hold. As shown in Theorem 3.1, (O1) and (O2) are satisfied. In particular, we have that u). Now assume the existence of s 2 T (B; - I and define restrictions s I s, we get ks 1 . Hence, the restrictions s k converge to s in all spaces L Therefore, tends to zero in U 0 by (A4) and, using the symmetry of for all sufficiently large k. Let l ? 0 be such that hs l ; r 2 f(-u)s l i - \Gamma"=2. The observations that s l 2 T (B; - u) and - u now yield the desired contradiction: d d- This readily shows that (O3) holds. M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS 4. The algorithm. 4.1. A Newton-like iteration. The key idea of the method to be developed consists in solving the equation by means of a Newton-like method augmented by a trust-region globalization. The bound constraints on u are enforced by, e.g., a scaling of the Newton-like step. In particular, all iterates will be strictly feasible with respect to the bounds: u In general it is not possible to find a function d satisfying (8) that depends smoothly on u. For an efficient method, however, we need a suitable substitute for the derivative of dg. Formal application of the product rule suggests to choose an approximate derivative of the form with d u replacing the in general non-existing derivative of at u. Here and in the sequel the linear operator D r (u), r - 0, denotes the pointwise multiplication operator associated with d r (u), i.e. continuously into itself. Moreover, if the assumption (D2) below is satisfied and defines an automorphism of L q In fact, for all there exists d such that on\Omega by (D2). If we look at the special case d = d I , the choice d u I (u)w with for 2\Omega seems to be the most natural. For the general case this suggests the choice is a multiplication operator, e(u) 2 V , which approximates d u (u)g(u). Properties of E will be specified below. We are now able to formulate the following Newton-like iteration for the solution of Given compute the new iterate u (D denotes a symmetric approximation of (or replacement for) r 2 f(u k ), i.e. We assume that B k satisfies the following condition: (A5) The norms kB k k U;U 0 are uniformly bounded by a constant c 2 ? 0. In the following, we will not restrict our investigations to special choices of d and e. Rather, we will develop an algorithm that is globally convergent for all affine scalings d and corresponding e satisfying the assumptions (D1)-(D5): GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 11 (D1) The scaling d satisfies (8) for all u 2 B. (D2) There exists ffi d ? 0 such that for all 2\Omega with (D3) The scaling satisfies d(u)(x) - d I (u)(x) for all u 2 B, x 2\Omega and d I given by (9). In particular, d(u)(x) - c d for some c d ? 0. (D4) For all the function e(u) satisfies 0 - e(u)(x) - c e for all x 2\Omega and (D5) The function e(u) is given by c d 0 for all We have seen that assumption (D1) is essential for the reformulation of the first-order necessary optimality conditions and that (D2) ensures the continuous inverta- bility of the scaling operator D(u) for Furthermore, assumption (D2) will be used in the second-order convergence analysis. The assumption (D4) together with (A5) is needed to ensure uniform boundedness of the Hessian approximations - M k to be defined later (see Remark 4.2). The assumption (D5) is needed to prove second-order convergence results. Obviously, (D1)-(D3) hold for either I and d = d II . The assumption (D4) is satisfied for I (u)g(u), where d 0 I (u) is given by (12), provided that kg(u)k 1 is uniformly bounded on B, i.e. provided that (A3) holds. The following example illustrates that the relaxed requirements on the scaling function d can be used to improve the smoothness of d and the scaled gradient dg substantially Example 4.1. The quadratic function is smooth on L 2 ([0; 1]). The gradient and the (strictly positive) Hessian are given by Z 1v(x) dx: f assumes its strict global minimum on the box 2g at the lower bound - u, - becomes negative for small x. Plot (a) in Figure 1 shows d I (solid) and jg(u " )j (dotted) for 0:001. Note that d II is continuous at the sign- change of retains its order of magnitude in contrast to d I . Plot (b) depicts the remainder terms dotted. Here d 0 i is as in (12). Note that the remainder term for d I g does not tend to zero near the sign-change of in contrast to d II g. In fact, it follows from our investigations in [22] that for locally Lipschitz at - q(\Omega\Gamma is continuously differentiable in a neighborhood of - u. Our example admits the choice 1 The advantages of the improved smoothness will be seen in the local convergence analysis [22]. M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS (a) (b) Fig. 1. Smoothness properties of the scaling functions d I (u) and d II (u) 4.2. New coordinates and symmetrization. Since neither the well-defined- ness nor the global convergence of the Newton-like iteration (13) can be ensured, we intend to safeguard and globalize it by means of a closely related trust-region method. To this end we have to transform (13) into an equivalent quadratic programming problem. While the iterates are required to stay strictly feasible with respect to the bound constraints, we want to use an affine-scaling interior-point approach to reduce the effect of the interfering bound constraints in the quadratic subproblem as far as possible. The affine scaling can be expressed by a change of coordinates s ; - s and has to be performed in such a way that we get enough distance from the boundary of the box B to be able to impose a useful fraction of Cauchy decrease condition on the trial step. An appropriate change of coordinates s is arbitrary but fixed throughout the iteration. Performing this transformation and applying D k , the multiplication operator associated with d k , from the left to (13) leads to the equivalent equation with k , and - k . Remark 4.2. Assumptions (D4) and (A5) imply that k - are uniformly bounded by a constant c 3 ? 0. M k is symmetric, - s k is a solution of (14) if and only if it is a stationary point of the quadratic function We will return to this issue later. 4.3. Second-order necessary conditions revisited. If B the operator also plays an important role in the second-order necessary optimality conditions. In fact, we will show that if conditions (O1), (O2) hold at - u, then (O3) can be equivalently replaced by GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 13 or even The proof requires the following two lemmas. Lemma 4.3. Let (D1) be satisfied, let g(-u) 2 U 0 , and suppose that (O1), (O2) hold at - u. Then I Proof. The inclusion I ae I is obvious from (8). Now let x 2 I be given. Then by (O2) and Lemma 3.2. From (8) we conclude - Lemma 4.4. Let (D1) and (D4) be satisfied, let g(-u) 2 U 0 , and suppose that (O1), (O2) hold at - u. Moreover, assume that f is twice continuously differentiable at - u with the statements (O3 0 ) and (O3 00 ) are equivalent. Proof. Obviously ii) implies i). To show the opposite direction, assume that i) holds. Set A were I is the set defined in (16). For arbitrary s 2 V we perform the splitting 4.3 implies that d r (-u)s and we obtain M(-u)s I i - 0: This completes the proof. Theorem 4.5. Let (D1), (D2), and (D4) be satisfied. Then in Theorem 3:3 condition (O3) can be equivalently replaced by (O3 0 ) or (O3 00 ). Proof. Since the conditions of Theorem 3:3 and Lemma 4.4 guarantee that (O3 0 ) and (O3 00 ) are equivalent, we only need to show that (O3) can be replaced by (O3 0 ). Let (O1), (O2) be satisfied. Then for all s 2 T (B; - u) we have To show that (O3) implies (O3 0 ), let s 2 T (B; - u) be arbitrary. Then contained in T (B; - u). Therefore, hs; - To prove the opposite direction, assume that there exist s 2 T (B; - with hs; r 2 f(-u)si ! \Gamma". As carried out in the proof of Theorem 3.3, we can find l ? 0 such that s I l as defined in (11), satisfies hs l ; r 2 f(-u)s l i - \Gamma"=2. Since d(-u) is bounded away from zero on I l by assumption (D2), we obtain that I l d \Gammar (-u)s is an element of T (B; - u) that satisfies hh; - (note that by (D4)). This contradicts (O3 0 ). with - M(u) given by (15) and - g(u) (u)g(u). Note that - . The previous results show that - /[-u](-s) is convex and admits a global minimum at - u is a local solution of (P). 14 M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS 4.4. Trust-region globalization. The results on the second-order conditions in the previous section indicate that the Newton-like iteration (14) can be used locally under appropriate conditions on B k . To globalize the iteration, we minimize - the intersection of the ball k - and the box B which leads to the following trust-region subproblem: Compute an approximate solution - of subject to k - Here - is a positive scaling function for the trust-region, see assumption (W) below. As noted in x 2, the crucial contributions of the affine scaling are the term E(u)D(u) in the Hessian - M(u) and the scaling - g of the gradient. The trust-region serves as a tool for globalization. Therefore, more general trust-region scalings can be admitted, as long as they satisfy (W) below. This freedom in the scaling of the trust-region will be important for the infinite-dimensional local convergence analysis of this method. See [22]. We will work with the original variables in terms of which the above problem reads Compute as an approximate solution of subject to kw k sk with k , and w The only restriction on the trust-region scaling is that w \Gamma1 k as well as - are pointwise bounded uniformly in k: (W) There exist c w ? 0 and c w 0 ? 0 such that kd r all k. Examples for w k are w which yields a ball in the - s-variables, and w which leads to a ball in the s-variables. Both choices satisfy (W) if (D3) holds. See also [11]. The functions d \Gammar k and d \Gamma1 are only well defined if u . Therefore, the condition on the trial iterate is essential. However, it is important to remark that the bound constraints do not need to be strictly enforced when computing s k . For example, in the finite-dimensional algorithms in [6], [11], an approximate solution of subject to k - is computed and then scaled by - k ? 0 so that also apply in the infinite-dimensional framework. Practical choices for the infinite-dimensional algorithm will be discussed in [22]. 4.5. Cauchy decrease for the trial steps. An algorithm which is based on the iterative approximate solution of subproblem (18) can be expected to converge to a local solution of (P) only if the trial steps s k produce a sufficiently large decrease of / k . A well established way to impose such a condition is the requirement that the decrease provided by s k should be at least a fraction of the Cauchy decrease. GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 15 Here the Cauchy decrease denotes the maximum possible decrease along the steepest descent direction of / k at with respect to an appropriate norm (or, equivalently, appropriate coordinates) inside the feasible region of the subproblem. We will see in Lemma 6.1 that the new coordinates - indeed provide enough distance to the boundary of B to allow the implementation of a useful Cauchy decrease strategy. Unless in the Hilbert space case 2, the steepest descent direction of - / k at is not given by the negative gradient \Gamma - g k but rather by any - s d 6= 0 satisfying h-s On the other hand, if k is the -steepest descent direction of - / k at - This is a strong argument for choosing this direction as basis for the Cauchy decrease condition. Of course this approach is only useful if we ensure that u sufficiently small which can be done by imposing condition (A2) on g which is not very restrictive. Assuming this, we may take \Gammad r k as Cauchy decrease direction of / k , and therefore define the following fraction of Cauchy decrease condition: There exist fi; (fixed for all k) such that s k is an approximate solution of (18) in the following sense: (19a) k is a solution of the one-dimensional problem subject to (19b) 4.6. Formulation of the algorithm. For the update of the trust-region radius k and the acceptance of the step we use a very common strategy. It is based on the demand that the actual decrease ared should be a sufficiently large fraction of the predicted decrease pred promised by the quadratic model. Since the model error is at most O(ks k k 2 p ), the decrease ratio ae k ared pred will tend to one for s k ! 0. This suggests the following strategy for the update of the trust-region radius: Algorithm 4.6 (Update of the trust-region radius \Delta k ). 1. If ae k - j 1 then choose \Delta 2. If ae k 2 (j 3. If ae k 2 [j 4. If ae k - j 3 then choose \Delta M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS Remark 4.7. The forms of predicted and actual decrease follow the choices used in [11], [23] (and [10] for the constrained case). In [6] the decreases and the ratio are computed as follows: pred 1 ared ared 1 pred 1 Since the crucial estimates (25) and (38) also are true for pred 1 the relations pred 1 pred ared 1 hold, all convergence results presented in this paper remain valid if ae k is replaced by k . We restrict the presentation to the choice (20), (21). The algorithm iteratively computes a trial step s k satisfying the fraction of Cauchy decrease condition. Depending on the decrease ratio ae k the trial step is accepted or rejected, and the trust-region radius is adjusted. Algorithm 4.8 (Trust-Region Interior-Point Algorithm). Algorithm 4.6. 1. Choose u 2. For 2.1. If - 2.2. Compute 2.3. Compute ae k as defined in (22). 2.4. If ae k ? j 1 then set u 2.5. Compute using Algorithm 4.6. 5. Norm estimates. In this section we collect several useful norm estimates for -spaces. The first lemma states that k \Delta k q 1 is majorizable by a multiple of k \Delta k q 2 if Lemma 5.1. For all 2(\Omega\Gamma we have with Here 1=1 is to be interpreted as zero. Proof. See e.g. [1, Thm. 2.8]. As a consequence of H-older's inequality we obtain the following result, which allows us to apply the principle of boundedness in the high- and convergence in the low-norm. Lemma 5.2. (Interpolation inequality) Given 1 - 2(\Omega\Gamma the following is true: Proof. In the nontrivial cases apply H-older's inequality: GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 17 The next lemma will be used in the proof of Lemma 7.1. Lemma 5.3. For v 2 L Proof. 6. Convergence to first-order optimal points. The convergence of the algorithm is mainly achieved by two ingredients: A lower bound for the predicted decrease for trial steps satisfying the fraction of Cauchy decrease condition, and the relation ared pred k (s k ) which is always satisfied for successful steps s k . The lower bound on the predicted decrease is established in the following lemma: Lemma 6.1. Let the assumptions (A1), (A2), (D1)-(D4), and (W) hold. Then there exists c 4 ? 0 such that for all u satisfying (19) the following holds: pred c 1\Gamma2r d d Proof. Since C k is obviously positive by (D4), we have pred Now we will derive an upper bound for the minimum of OE(- and Therefore, using (D3), \Gammad d I (u k )(x) d 1\Gamma2r c 1\Gamma2r d c 1\Gamma2r d We have OE(- M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS and observe . Let - be a minimizer for OE on [0; - then OE(- If - OE(- If - the same arguments show c 1\Gamma2r d The first inequality (24) now follows from these estimates and (19). The second inequality (25) follows from (24) and the application of Lemma 5.1. Note that p - 2 and 1=p 2. Remark 6.2. The sequence of inequalities for the estimation of - B uses the inequality d d . This is where we need the restriction to r - 1=2. Let the assumptions of Lemma 6.1 hold. If the kth iteration of Algorithm 4.8 is successful, i.e. ae k ? j 1 (or equivalently u k+1 6= u k ), then Lemma 6.1 provides an estimate for the actual decrease: d If in addition the assumptions (A3) and (A5) hold, Remark 4.2 and the previous inequality imply the existence of c 5 ? 0 with d The next statement is trivial: Lemma 6.3. Let generated by Algorithm 4:8. If ae k - j 2 for sufficiently large k then bounded away from zero. Now we can prove a first global convergence result. Theorem 6.4. Let assumptions (A1)-(A3), (A5), (D1)-(D4), and (W) hold. Let the sequence (u k ) be generated by Algorithm 4:8. Then lim inf kd r Even more: lim inf kd r GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 19 Proof. Assume that there are K ? First we will show that this implies 1. If there is only a finite number of successful steps then \Delta k+1 - large k and we are done. Otherwise, if the sequence steps does not terminate, we conclude from f k # and the boundedness of f that For all use (26) and obtain, since k-g k i tends to zero and, moreover, obeys the inequality for all k i sufficiently large. This shows ! 1. Since for all successful steps In a second step we will show that jae k \Gamma 1j ! 0. Due to ks and (27), (u k ) is a Cauchy sequence in U . Furthermore,fi fi fi fi / k ks The mean value theorem yields jpred converges in the closed set B, g is continuous, and (see (28)) tend to zero, the first factor in the last expression converges to zero, too. Lemma 6.1 garantees that jpred k (s k )j=\Delta k is uniformly bounded away from zero for since by assumption k-g k k p 0 - ". This shows jae yields a contradiction to Therefore, the assumption is wrong and the first part of the assertion holds. The second part follows from Lemma 5.1 for 1 - q - p 0 and from (A3) and the interpolation inequality (23) for Now we will show that if - g is uniformly continuous the limites inferiores in Theorem 6.4 can be replaced by limites. We introduce the following assumptions: (A6) The scaled gradient - uniformly continuous. M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS uniformly continuous and d = d I or d = d II . Condition (A6) is not so easy to verify for most choices of d. With Lemma 6.5, however, we provide a very helpful tool to check the validity of (A6). Moreover, we show in Lemma 6.6 that (A6 0 ) implies (A6). The proofs of both lemmas can be found in the appendix. As a by-product of our investigations we get the valuable result that - g inherits the continuity of g if we choose d = d I or d = d II . We will derive the results concerning continuity and uniform continuity of - simultaneously. Additional requirements for the uniform continuity are written in parentheses. Lemma 6.5. Let (A1)-(A3), (D3) hold and continuous. Assume that k- fg(u)g(~u)?0g tends to zero (uniformly in continuous. Proof. See appendix. The previous lemma is now applicable to the choices I and Lemma 6.6. Let (A1)-(A3) hold and d = d I or d = d II . Then - U \Gamma! U 0 is continuous. If, in addition, g is uniformly continuous, then the same is true for - g. Proof. See appendix. Now we state the promised variant of Theorem 6.4. Theorem 6.7. Let assumptions (A1)-(A3), (A5), (D1)-(D4), (W), and (A6) or the sequence (u k ) generated by Algorithm 4:8 satisfies lim kd r Even more: lim kd r Proof. Since, due to Lemma 6.6, - is uniformly continuous, it suffices to show that under the assumption k-g k k p for an infinite number of iterations there exists a sequence of index pairs (m which is a contradiction to the uniform continuity of - g. us assume that (29) does not hold. Then there is " 1 ? 0 and a sequence (m i ) Theorem 6.4 yields a sequence arbitrary thus find a sequence (l i ) such that and one has for all successful iterations d The left hand side converges to zero, because (f k ) is nonincreasing and bounded from below, i.e. is a Cauchy sequence. We conclude that \Delta k tends to zero for successful steps get with (28) that GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 21 which is clearly true also for unsuccessful iterations. Summing and using the triangle inequality yields Since (f k ) is a Cauchy sequence, the left hand side converges to zero for i !1. Hence, l i This is a contradiction to the uniform continuity of - g. The second assertion follows as in the proof of Theorem 6.4. 7. Convergence to second-order optimal points. The first-order convergence results in the previous section could be shown under rather weak conditions on the trust-region step s k and for arbitrary symmetric and bounded Hessian 'approxi- mations'. If stronger assumptions are imposed on B k and on s k , then it can be shown that every accumulation point of (u k ) satisfies the second-order necessary optimality conditions. This will be done in this section. We need the following assumption on the Hessian approximation: (A7) For all accumulation points - u 2 U of (u k ) and all " ? 0 there is such that ku Obviously (A7) is satisfied if holds. However, (A7) also applies in other important situations. For example, (A7) applies if f is a least squares is the Gauss-Newton approximation of the Hessian. The fraction of Cauchy decrease condition does not take into account any properties of the quadratic part of / k . Apparently, this condition is too weak to guarantee the positivity of - M(-u) at accumulation points of (u k ). The decrease condition has to be strengthened in such a way that for - satisfying (O1) and (O2) but not (O3 00 ) there are for all iterates u k with ku For the finite-dimensional problem one can establish such an inequality near nondegenerate points - u by using techniques similar to those of Coleman and Li [6] if the s k satisfy a finite-dimensional fraction of optimal decrease condition of the form solves subject to kw k sk 2 - This approach is not directly transferable to our setting because the example Z 1ts 2 (t) dt subject to ksk 2 - \Delta shows that even in a Hilbert space s k may not exist. Moreover, the proofs in [6] use extensively a convenient characterization of s k derived from the Karush-Kuhn-Tucker conditions (cf. [19]) and the equivalence of 2- and 1-norm in IR N . Since, as shown by (32), in Banach space the quadratic subproblem may not have a solution, this is not applicable in our framework. Our convergence proof requires that the trial steps yield 22 M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS a fraction of the Cauchy decrease, and, moreover, a fraction of the decrease achievable along directions of negative curvature of / k at convenience and simplicity of notation, however, we favor a more intuitive but stronger fraction of optimal decrease There exist fi; (fixed for all k) such that (33a) where subject to In the next lemma we show that in a neighborhood of an accumulation point - u of k ) at which (O1), (O2), but not (O3 00 ) hold, one can find a direction of negative curvature h n of / k such that u k \Sigma h n 2 B. Lemma 7.1. Let assumptions (A1), (A2), (A5), (A7), (D1)-(D5) hold and let the sequence generated by Algorithm 4:8. Assume that - is an accumulation point of and that there are - Then there exist "; ff; - ? 0 such that for all u k with ku Proof. Since - are satisfied due to Lemma 3.2. Lemma 4.3 yields I as in (D2). We first show that (34) implies the existence of ~ h 2 V with k ~ hk From - we see that I . We write v for measurable functions v and measurable sets A ae \Omega\Gamma Then holds for - h I instead of - h. Furthermore, using the symmetry of - M(-u) and the identity - h Since the measure of I n I ffi can be made arbitrarily small by reducing tends to zero for GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 23 Then (35) holds with ~ . Obviously, f ~ h 6= 0g ae I ffi . For " ? 0 and u k with ~ h(x) d r (-u)(x) d r We have I h I ffi and conclude from assumptions (D2) and (D3) that c d on I h and " d (ffi=4) - d(-u)(x) - c d on I ffi , which implies that d From I Otherwise, due to Lemma 5.3, we can make k ~ h I ffi nI h -(I arbitrarily small by making " ? 0 small. Hence, in all cases we can reduce " such that By the definition of h and the fact that I h we get d k- I h M(-u) ~ hi In the derivation of the last inequality we have used (35), (36), (37), and k ~ hk We have already shown that k ~ h I ffi nI h can be made arbitrarily small by making small. By continuity the same is true for by (A7) for "). Hence, there exist " ? 0 and - ? 0 such that for all u k with ku " we can carry out the above construction to obtain M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS only depends on ffi , we get In addition, we have by construction I h ae fx and consequently d d r Setting d and renorming h to unity completes the proof. Now we establish the required decrease estimate. Lemma 7.2. Let assumption (W) hold and s k satisfy (33). If for u k there exist then pred Proof. The first inequality is obvious. Now let -; ff ? 0 be given. For all u k which and choose the sign such that h-s n assumption (W) and k is admissible for (33b) and can be used to get an upper bound for / k (s k ): The fraction of optimal decrease condition (33) gives -min For a large class of trust-region algorithms for unconstrained finite-dimensional problems Shultz, Schnabel, and Byrd [18] proposed a very elegant way to prove that all accumulation points of the iterates satisfy the second-order necessary optimality conditions. The key idea is to increase the trust-region radius after exceedingly successful steps (case 4. in Algorithm 4.6). The following convergence theorem is an analogue to [18, Thm 3.2]. Theorem 7.3. Let assumptions (A1)-(A7), (D1)-(D5), and (W) hold. Moreover, let the sequence (u k ) be generated by the Algorithm 4:8 and let all s k satisfy (33). Then every accumulation point - satisfies the second-order necessary conditions (O1)-(O3). GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 25 Proof. Let - U be an accumulation point of u k . Then - since Theorem 6.7. Using Lemma 3.2, this implies (O1) and (O2). Now assume that (O3) does not hold at - u. Then due to Theorem 4.5 there are . Lemmas 7.1 and 7.2 yield pred choosing we achieve that for all k with pred Using this estimate, (A4), (A7), and ks k k p - fi 0 c w 0 \Delta k (see (28)) we find - possibly after reducing " - with appropriate - k 2 [0; 1] pred ks This shows ae k - j 3 for all k with For all K ? 0 there is l ? K with In fact, since u is an accumulation point of eventually satisfies . Hence, there is l - l 0 ? K with \Delta, it is easily seen that 1. 2. \Delta l - \Delta and there is m ? l such that ku and 2.1 2.2 In case 1. we get For 2.1. we have 26 M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS In case 2.2. we get \Delta k+1 - and k=l k=l ks k=l k=l This yields Therefore, we get for infinitely many steps k a decrease f of at least a constant value which yields f k ! \Gamma1. This contradicts the boundedness of f on B, which follows from (A1)-(A3). Thus, (O3) must hold at - u. 8. Conclusions and future work. We have introduced and analyzed a globally convergent class of interior-point trust-region algorithms for infinite-dimensional non-linear optimization subject to pointwise bounds in function space. The methods are generalizations of those presented by Coleman and Li [6] for finite-dimensional prob- lems. We have extended all first- and second-order global convergence results that are available for the finite-dimensional setting to our infinite-dimensional L p -Banach space framework. The analysis was carried out in a unified way for The lack of the equivalence of norms required the development of new proof tech- niques. This is also a valuable contribution to the finite-dimensional theory because our results are derived completely without using norm equivalences and hence are almost independent of the problem dimension. In this sense our convergence theory can be considered to be mesh-independent. Moreover, we have carried out our analysis for a very general class of affine scaling operators, and almost arbitrary scaling of the trust-region. This is new also from the finite-dimensional viewpoint. Numerical results for optimal control problems governed by a nonlinear parabolic PDE which prove the efficiency of our algorithms can be found in the forthcoming paper [22]. Furthermore, we present therein results for finite-dimensional standard test-examples compiled in [8] which verify that a combination of the findings in this work and [22] yield improvements also for finite-dimensional problems. Our investigations suggest to incorporate a projection onto the box in the computation of approximate solutions of the trust-region subproblems. This new technique was tested in an implementation of the methods described in [10], [13], and [23], and proved to be superior to other choices. The results of this paper and [22] represent a first important step towards a rigorous justification why trust-region interior-point and trust-region interior-point SQP methods perform so well on discretized control problems. See [10], [13], and [22] for applications. The extension of our theory to methods with additional equality constraints is in progress. Acknowledgements . This work was done while the first and second author were visiting the Department of Computational and Applied Mathematics and the Center for Research on Parallel Computation, Rice University. They are greatly indebted GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 27 to John Dennis for giving them the opportunity to work in this excellent research environment. We would like to thank Richard Byrd, Colorado State University, and Philippe Toint, Facult'es Universitaires Notre-Dame de la Paix, for pointing us to the second-order convergence result in [18] which led to an improvement of generality and elegance in our presentation. We also are grateful to John Dennis, Rice University, and Lu'is Vicente, Universidade de Coimbra, for their helpful suggestions. 9. Appendix . In this section we present proofs of Lemma 6.5 and 6.6. These proofs require the following three technical results: Lemma 9.1. For the following holds: Proof. For the assertion is trivial. For ff; fi - 0, use the estimate This estimate can be seen as follows. Due to symmetry we may assume that ff - fi - 0. The function and, thus, h(ff) - 0 for all ff - fi. In the case the assertion follows immediately from (40). For we use Lemma 5.1 to get 'Z\Omega r dx 'Z\Omega This completes the proof. Lemma 9.2. For r the following inequality holds: Proof. In the case there is nothing to show. First we prove that for all In fact, we may assume ff - fi and compute Therefore, 2\Omega which immediately implies (41). 28 M. ULBRICH, S. ULBRICH, AND M. HEINKENSCHLOSS Lemma 9.3. Let ff be arbitrary real numbers. Then Proof. Without restriction, let fi g. Then the assertion follows from 9.1. Proof of Lemma 6.5. We ae\Omega measurable. For arbitrary u; ~ 0g. The triangle inequality gives the following estimate ;\Omega nN We use the fact that jg(u) \Gamma g(~u)j - jg(~u)j on\Omega n N and obtain Now the (uniform) continuity of - g follows from Lemma 9.1, Lemma 9.2, the (uniform) continuity of g, and the assumption k-N (uniformly in u) on the scaling. 9.2. Proof of Lemma 6.6. We restrict ourselves to the more complicated case . The result follows from Lemma 6.5 if we verify that (uniformly in u): Let u; ~ arbitrary. Using symmetries, it is easily seen that we are done if we are able to establish appropriate upper bounds for for the three cases that g(u)(x) ? 0, g(~u)(x) ? 0 and a) d II (u)(x) and d II (~u)(x) are both determined by the second case in (10), b) d II (u)(x) and d II (~u)(x) are both determined by the else-case in (10), c) d II (u)(x) is determined by the second and d II (~u)(x) by the else-case in (10). We will use Lemma 9.3 several times. Case a): GLOBAL CONVERGENCE OF TRUST-REGION INTERIOR-POINT METHODS 29 Case b): Case c): From d II d II Therefore, we obtain Otherwise, if g(~u)(x) - u(x), we have in the case d II (u)(x) - d II (~u)(x) that and for d II (u)(x) ! d II (~u)(x) we get u(x)j: Taking all cases together, this shows that Now, the application of Lemma 6.5 shows that - inherits the (uniform) continuity of g. --R New York Functional and numerical solution of a control problem originating from heat transfer On the convergence of interior-reflective Newton methods for non-linear minimization subject to bounds Global convergence of a class of trust region algorithms for optimization with simple bounds On l 2 sufficient conditions and the gradient projection method for optimal control problems Analysis of inexact trust-region interior-point SQP algorithms Multilevel algorithms for constrained compact fixed point problems First and second-order necessary and sufficient optimality conditions for infinite-dimensional programming problems A family of trust region based algorithms for unconstrained minimization with strong global convergence properties Newton's method with a model trust region modification On the gradient projection method for optimal control problems with nonnegative L 2 inputs Global convergence of a class of trust-region methods for nonconvex minimization in Hilbert space Superlinear convergence of affine-scaling interior-point Newton methods for infinite-dimensional nonlinear problems with pointwise bounds --TR --CTR Christian Kanzow , Andreas Klug, On Affine-Scaling Interior-Point Newton Methods for Nonlinear Minimization with Bound Constraints, Computational Optimization and Applications, v.35 n.2, p.177-197, October 2006 Matthias Heinkenschloss , Lus N. Vicente, An interface optimization and application for the numerical solution of optimal control problems, ACM Transactions on Mathematical Software (TOMS), v.25 n.2, p.157-190, June 1999 Christian Kanzow , Andreas Klug, An interior-point affine-scaling trust-region method for semismooth equations with box constraints, Computational Optimization and Applications, v.37 n.3, p.329-353, July 2007
optimal control;global convergence;interior-point algorithms;affine scaling;nonlinear programming;trust-region methods;infinite-dimensional optimization;bound constraints
309110
Stochastic Shortest Path Games.
We consider dynamic, two-player, zero-sum games where the "minimizing" player seeks to drive an underlying finite-state dynamic system to a special terminal state along a least expected cost path. The "maximizer" seeks to interfere with the minimizer's progress so as to maximize the expected total cost. We consider, for the first time, undiscounted finite-state problems, with compact action spaces, and transition costs that are not strictly positive. We admit that there are policies for the minimizer which permit the maximizer to prolong the game indefinitely. Under assumptions which generalize deterministic shortest path problems, we establish (i) the existence of a real-valued equilibrium cost vector achievable with stationary policies for the opposing players and (ii) the convergence of value iteration and policy iteration to the unique solution of Bellman's equation.
Introduction . This paper develops basic theory relating to stochastic shortest path games. These are two-player, zero-sum, games where the minimizing player seeks to drive an underlying finite-state dynamic system to a special terminal state along a least expected cost path. The maximizer seeks to interfere with the mini- mizer's progress so as to maximize the expected total cost. In actual play, the players implement actions simultaneously at each stage, with full knowledge of the state of the system but without knowledge of each other's current decision. Games of this type have been studied for some time. The field was initiated by Shapley in his classical paper [7]. In Shapley's games, two players are successively faced with matrix-games (in mixed strategies) where both the immediate cost and transition probabilities to new matrix-games are influenced by the stagewise decisions of the players. In this formulation, the state of the system is the matrix-game currently being played. It is assumed that this set of states is finite and that there is a non-zero minimal probability that, at any stage, the game will transition to a terminal state, ending the sequence of rewards and payoffs. It turns out that this is equivalent to an infinite-horizon game with discounted additive cost. The analysis of such games is straightforward, the main results being (i) the existence and characterization of a unique real-valued equilibrium cost vector achievable in stationary randomized policies and (ii) the convergence of value iteration and policy iteration to the equilibrium cost. Since Shapley's work, game theorists have actively studied extensions to the discounted-cost model. In [4], Kushner and Chamberlain consider undiscounted, pur- suit/evasion, stochastic games where there is a terminal state corresponding to the evader being "caught." The state space is assumed to be finite (with one of which is the terminal state). Making some regularity assumptions on the transition probabilities and cost functions, they consider pure strategies over compact action spaces. In addition, they assume that either, Supported by the National Science Foundation Grant 9300494-DMI and an Office of Naval Re-search fellowship. y Department of Systems Engineering, School of Engineering and Applied Science, University of Virginia, Olsson Hall, Charlottesville, Virginia, 22903 (sdp5f@virginia.edu) z Massachusetts Institute of Technology, Laboratory for Information and Decision Systems, Room Cambridge, MA 02139(dimitrib@mit.edu) S. D. PATEK AND D. P. BERTSEKAS 1. The n-stage probability transition matrix [P (-)] n (from non-terminal states to non-terminal states) is a "uniform contraction" in the stationary policy pairs (-) of the two players. (That is, for some ffl ? 0, [P (-)] n has row-sums less than stationary policy pairs (-).) Or, 2. The transition costs (to the pursuer) are uniformly bounded below by and there exists a stationary policy ~ - for the pursuer that makes [P (~-)] n a uniform contraction under all stationary policies for the evader. They show that there exists an equilibrium cost vector for the game which can be found through value iteration. In [10], van der Wal considers a special case of Kushner and Chamberlain's games. Under more restrictive assumptions about the pursuer's ability to catch the evader, he gives error bounds for the updates in value iteration. In [3], Kumar and Shiau give a detailed analysis of stochastic games with very mild assumptions about the state space and control constraint sets. For the case of nonnegative additive cost (with no discounting), they establish the existence of an extended real equilibrium cost vector in non-Markov randomized policies (where for both players the best mixed action can depend on all of the past states and controls, as well as the current state). They show that the minimizing player can achieve the equilibrium using a stationary Markov randomized policy and that, in case the state space is finite, the maximizing player can play ffl-optimally using stationary randomized policies. Other researchers have studied so-called "non-terminating" stochastic games (also sometimes called "undiscounted" stochastic games), where the costs are not discounted but are averaged instead. Such average-cost games have a rich mathematical structure which has been extensively covered in the literature [13, 5]. In this paper, we consider undiscounted additive cost games without averaging. We admit that there are policies for the minimizer which allow the maximizer to prolong the game indefinitely at infinite cost to the minimizer. We do not assume nonnegativity of cost, as in [4] and [3]. We make alternative assumptions which guarantee that, at least under optimal policies, the terminal state is reached with probability one. Our results imply the results of Shapley [7], as well as those of Kushner and Chamberlain [4]. Because of our assumptions relating to termination, we are able to derive stronger conclusions than those made by Kumar and Shiau [3] for the case of a finite state space. Note that because we do not assume nonnegativity of the costs, the analysis is much more complicated than the corresponding analysis of Kushner and Chamberlain [4]. Our formal assumptions generalize (to the case of two- players) those for stochastic shortest path problems [2]. Because of this, we refer to our class of games as "stochastic shortest path games." Our games are characterized by either (i) inevitable termination (under all policies) or (ii) an incentive for the minimizer to drive the system to termination in a finite expected number of stages. We shall see that the results of [2] are essential in developing our present theory. In Section 2 we give a precise mathematical formulation for stochastic shortest path games. In Section 3, we relate our general formulation to Shapley's original games [7]. We develop our main results in Section 4. This is where we show that stochastic shortest path games have an equilibrium solution which can be characterized by the unique solution to Bellman's equation. We also prove the convergence of value iteration and policy iteration to the equilibrium cost. In Section 5, we give an example of pursuit and evasion, illustrating our main results. Finally, in the Appendix we collect some well known results about dynamic games which are crucial to our development. 2. Mathematical Formulation. Let S denote a finite state space, with elements labeled n. For each i 2 S, define U(i) and V (i) to be the sets of actions available to the minimizer and maximizer at state i, respectively. These are collectively referred to as control constraint sets. The probability of transitioning from v). The expected cost (to the minimizer) of transitioning from i 2 S under u 2 U(i) and v 2 V (i) is denoted We denote the sets of one-stage policies for the minimizing and maximizing players as M and N respectively, where The sets of policies for the minimizing and maximizing players are denoted by - M and Given denote the transition probability matrix that results when - and - are in effect. That is Let c(-) denote the vector whose components are c i (-(i); -(i)). That is Given two allowable opposing policies, M and N , we formally define the resulting cost (to the minimizer) to be where Note that h t -M ;-N can be interpreted loosely as the expected t-stage cost vector under the policies -M and -N . In establishing our main results the definitions and assumptions in the following paragraphs will be helpful. We say that a policy for the minimizer is stationary if - k. When this is the case and no confusion can arise, we use - to denote the corresponding policy -M , and we refer to -M as the stationary policy -. Similar definitions hold for stationary policies of the maximizer. The state 1 2 S has special importance. We shall refer to it as the terminal state. This state is assumed to be absorbing and cost-free, that is p 11 (u; and c 1 (u; M and 4 S. D. PATEK AND D. P. BERTSEKAS N be an arbitrary pair of policies. We say that the corresponding Markov chain terminates with probability one if the following limit satisfies lim (The limit above exists because the sequence (for each i 2 S) is monotonically non-decreasing and bounded above.) We shall refer to a pair of policies (- M ; -N ) as terminating with probability one if the corresponding Markov chain terminates with probability one; otherwise, we refer to the pair as prolonging. A stationary policy - 2 M for the minimizer is said to be proper if the pair (-N ) is terminating with probability one for all -N 2 - N . A stationary policy - is improper if it is not proper. If - is improper then there is a policy for the maximizer N under which there is a positive probability that the game will never end from some initial state. The designation of proper (or improper) applies only to stationary policies for the minimizer. It is convenient to define the set 0g. This is the space (of cost vectors) over which our main results hold. We denote by 0 the zero vector in . Let 1X denote the vector (0; . It is useful to define the following operators on X . sup ~ ~ The suprema and infima in the above are taken componentwise. We use the notation - (x) to denote the t-fold composition of T - applied to x 2 X . Similar definitions hold for T t - (x), and ~ In the Appendix, we collect (and prove for completeness) some well-known results about these "T "-operators: monotonicity (Lemma A.1) and continuity (Lemma A.3). The following are our standing assumptions. Assumption SSP The following are true: 1. There exists at least one proper policy for the minimizer. 2. If a pair of policies (- M ; -N ) is prolonging, then the expected cost to the minimizer is infinite for at least one initial state. That is, there is a state i for which lim t!1 [h t Assumption R (Regularity) The following are true: 1. The control constraint sets are compact. That is, for each i 2 S, U(i) and V (i) are compact subsets of metric spaces. (This implies that M and N are compact.) 2. The functions are continuous with respect to (u; v) 2 U(i) \Theta V (i), and the functions c i (u; v) are (a) lower-semicontinuous with respect to u 2 U(i) (with (b) upper-semicontinuous with respect to v 2 V (i) (with u 2 U(i) fixed). (The Weierstrass theorem implies that the supremum and infimum in the definitions of the operators T- and ~ T - are always achieved by elements of N and M , respectively. That is, for every x 2 X, there exists - 2 N such that X. Similarly, for every x 2 X, there exists that ~ 3. For all x 2 X, the infimum and supremum in the definitions of the operators T and ~ are achieved by elements of M and N . That is, for every x 2 X, there exists 4. For each x 2 X, we have T Note that part 4 of Assumption R is satisfied under conditions for which a minimax theorem can be used to interchange "inf" and "sup". In particular, this part, as well as the entire Assumption R, is satisfied if: 1. the sets U(i) and V (i) are nonempty, convex, and compact subsets of Euclidean spaces, 2. the functions are bilinear of the form u is a real matrix of dimension commensurate with U(i) and V (i), 3. the functions c i (u; v) are (a) convex and lower semi-continuous as functions of u 2 U(i) with v fixed in V (i), and (b) concave and upper semi-continuous as functions of in U(i). This follows from the Sion-Kakutani theorem (see [8], p.232 or [6], p. 397). We will show in Section 3 that dynamic games with "mixed" strategies over finite underlying action spaces satisfy this assumption. To verify that a stationary policy - 2 M is proper, we need only check whether (-) is terminating with probability one for all stationary policies - 2 N for the maximizer. Furthermore, if - 2 M is improper, then we can always find a stationary policy - 2 N for the maximizer which is prolonging when paired with -. This is shown in the following lemma: Lemma 2.1. If - 2 M is such that (-) terminates with probability one for all Proof. The proof uses the analysis of [2]. Let - 2 M be a fixed policy for the minimizer, and suppose that the pair (-) is terminating with probability one for all stationary policies of the maximizer - 2 N . With - fixed, the maximizer is faced with a stochastic shortest path problem of the type considered in [2]. (The maximizer has no improper policies (against -).) Now modify the problem such that the costs of transitioning from nonterminal states are all set to one but all of the transition probabilities are left unchanged. The assumptions of [2] remain satisfied, so the optimal expected cost for the maximizer in the new problem is bounded, even over nonstationary policies. Thus, the maximum expected number of stages to termination under - is finite. This is true for both the modified problem and the original version of the game. This implies that - is proper. Q.E.D. One of the objectives of this paper is to show that under Assumptions SSP and R there exist policies - M and - N such that x(- Such a cost vector x 4 N ) is called the equilibrium cost vector (or value) of the stochastic shortest path game. The policies - M and - N form an equilibrium 6 S. D. PATEK AND D. P. BERTSEKAS solution. Since this is a zero-sum game, we know that the equilibrium cost (if it exists) is unique. Another objective of this paper is to show that the equilibrium cost vector is characterized as the unique solution to Bellman's equation, with stationary equilibrium policies for the opposing players. After these results are established, we proceed to show that value iteration and policy iteration converge to the unique solution of Bellman's equation. 3. Connection to Shapley's Stochastic Games. The mathematical formulation of the preceding section includes as a special case the stochastic games of Shapley. To see this, assume that the number of actions available to either player at any state is finite. As before, the players implement underlying actions simultaneously at each stage, with full knowledge of the state of the system but without knowledge of each other's current decision. However, the players are now allowed to randomize their decisions in formulating a policy so as to keep their opponents from adapting to a deterministic policy. That is, in considering what to do at each state, the players choose probability distributions over underlying control sets rather than specific underlying control actions. In other words, the players use randomized or "mixed" policies. For each i 2 S, define A(i) and B(i) to be the finite sets of underlying actions to the minimizer and maximizer, respectively. These are the physical controls the players may ultimately implement at state i. Let jA(i)j and jB(i)j denote the numbers of elements in each set of actions. We define the players' ``control constraint sets'' for the game as Thus, U(i) is the set of probability distributions over control actions A(i) available to the minimizer from state i 2 S. Similarly, V (i) is the set of probability distributions over underlying control actions B(i) available to the maximizer from state i 2 S. Here the functions are respectively of the form where the functions p ij and g ij denote the transition probabilities and costs of the underlying two-player Markov Decision Process. Since the sets U(i) and V (i) are polyhedral and the functions c i (u; v) and p ij (u; v) are bilinear for all i and j (and continuous) as functions of (u; v) 2 U(i) \Theta V (i), it is clear that Assumption R is satis- fied. (Parts 3 and 4 are satisfied thanks to the Minimax Theorem of von Neumann.) 4. Main Results. We now develop our main results; namely, the existence and characterization of a unique equilibrium cost vector, the convergence of value iteration, and the convergence of policy iteration. In Sections 4.1 and 4.2, we characterize optimal solutions for the maximizer and minimizer, respectively, for the case where the opposing player fixes a policy. After we lay this groundwork, we consider the game proper in Section 4.3. 4.1. The Case Where the Minimizer's Policy is Fixed. Consider the policy M . The cost of -M is defined by The Appendix shows that, with our assumptions on c and P , the maximum in (4.1) is attained for every t (see Lemma A.5). The cost of a stationary policy - for the minimizer is denoted x(-) and is computed according to equation (4.1) where Given a vector w 2 R n whose elements are positive, the corresponding weighted sup-norm, denoted k \Delta k w 1 , is defined by The next lemma follows from the theory of one-player stochastic shortest paths. Lemma 4.1. Assume that all stationary policies for the minimizer are proper. The operator T is a contraction mapping on the set respect to a weighted sup-norm. Moreover, if - 2 M is proper, then T - is a contraction mapping with respect to a weighted sup-norm. Proof. We will show first the result about T for the case that all stationary policies are proper. Our strategy is to identify a vector of weights w and to show that this set of weights is one for which T is a contraction with respect to k \Delta k w 1 . Let us define a new one-player stochastic shortest path problem of the type considered in [2]. This problem is defined such that the transition probabilities remain unchanged and the transition costs are all set equal to -1 for all states other than the terminal state. The important difference is that the maximizer and minimizer "work together" in the sense that the decision space (for the single player of the new prob- lem) is over - M \Theta - N . This is a stochastic shortest path problem where all stationary policies are proper. Using the results of [2], there is an optimal cost vector ~ which can be achieved using a stationary policy (~-; ~ M \Theta - N . Note that, since the transition costs from all non-terminal states are set to -1 in the new stochastic shortest path problem, we have ~ 1. Moreover, from Bellman's equation we have ~ Also, for all ~ Thus, for all . Since the ~ we have that fl 2 [0; 1). Now define . Note that w is a vector in R n whose elements are all strictly positive. 8 S. D. PATEK AND D. P. BERTSEKAS Let us now resume consideration of the original stochastic shortest path game. Let x and - x be any two elements of X such that be such that be such that T Thus, Using this, we see that for all i where the last inequality follows from (4.2). Thus, we get Using similar arguments, we may show that, Combining the preceding inequalities, we see that kT we have that T is a contraction over X with respect to k \Delta k w 1 . Now suppose - 2 M is proper. By viewing T - as the "T "-operator in a new game where U(i) j f-(i)g, we have the desired result. Q.E.D. Lemma 4.2. Given a proper policy -, the following are true. 1. The cost x(-) of - is the unique fixed point of T - in 2. 3. We have T t linear convergence. Proof. An induction argument (cf. Appendix Lemma A.5) easily shows that where 0 is the zero vector in X . Thus, using preceding lemma and the definition of x(-), we have where ~ x- is the unique fixed point of the contraction mapping T - within X , proving statement 1. Consider the following infinite-horizon stochastic shortest path problem for the maximizer: sup lim inf This problem is covered by the theory developed in [2] since the fact that - is proper implies that termination is inevitable under all policies in the maximizer's problem. The optimal cost of this problem is sup -N2 - according to the theory of [2], it is equal to the limit of the successive approximation method applied to this problem, which is lim t!1 T t+1 - (0) and is also the unique fixed point of T - within X . This proves statement 2. Finally, the linear convergence of T t+1 - (0) follows from the contraction property of Lemma 4.3. If x - T - (x) for some x 2 X, then - is proper. Proof. To reach a contradiction, suppose - is improper. According to Assumption SSP and Lemma 2.1, there exists a stationary maximizer's policy - such that (-) is prolonging and results in unbounded expected cost from some initial state when played against -. Let x be an element in X such that x - T - (x). Then, applying T- to x, we have that where the second inequality follows from the definition of T - . From the monotonicity of -)c(- where the last inequality follows again from the definition of T - . Proceeding induc- tively, using the same steps, we have that for all t On the other hand, because the policy - results in infinite expected cost (from some initial state) when played against -, some subsequence of must have a coordinate that tends to infinity. (The term involving x remains bounded because it is just x multiplied by the product of stochastic matrices.) This contradicts the above inequality. Thus, - must be proper. Q.E.D. S. D. PATEK AND D. P. BERTSEKAS 4.2. The Case Where the Maximizer's Policy is Fixed. By Assumption SSP there exists a proper policy for the minimizer. Thus, it is impossible that a single policy for the maximizer prolongs the game for all policies of the minimizer. Let us define ~ x(-N ) to be the cost of the policy -N 2 - ~ min :g. The cost of a stationary policy - for the minimizer is denoted ~ x(-) and is computed according to equation (4.3) where Lemma 4.4. For any - 2 N , the following are true. 1. The cost ~ x(-) of - is the unique fixed point of ~ 2. ~ 3. We have ~ x(-) for all x 2 X. If for all - 2 M , the pair (-) terminates with probability one, then the convergence is linear. Proof. This follows directly from the theory of (one-player) stochastic shortest path problems. Q.E.D. 4.3. Main Results for the Game. We now establish the main results of the paper: the existence and characterization of a unique equilibrium solution, the convergence of value iteration, and the convergence of policy iteration. Proposition 4.5. The operator T has a unique fixed point x on X. Proof. We begin by showing that T has at most one fixed point in X . Suppose x and x 0 are both fixed points of T in X . We can select that we have that - and - 0 are proper. Lemma 4.2 implies that necessarily optimal with respect to x in applying the T operator, we have from the monotonicity of T that have that x - lim t!1 T t Similarly, x 0 - x, which implies that that T has at most one fixed point in X . To establish the existence of a fixed point, fix a proper policy - 2 M for the minimizer. (One exists thanks to Assumption SSP.) By Lemma 4.2, we have that Similarly, by fixing a stationary policy for the maximizer, we obtain from Lemma 4.4 that ~ ~ x(- ~ now claim that ~ x(- x(-). To see this, note that, for every -M 2 - N , and t ? 0, and where we have used the notation defined in (2.2). Thus, for any -N 2 - N and for any min ~ ~ -M By taking the limit inferior of both sides with respect to t, we see that ~ x(-N for all -N 2 - N and -M 2 - M . In particular, ~ x(- x(-). Using the monotonicity of T we have that ~ Again from the monotonicity of T , we obtain for all t ? 1 that Thus, the sequence fT t (~x(-))g converges to a vector x 1 2 X . From the continuity of T , we have that x Thus, T has a fixed point in X . Q.E.D. Proposition 4.6. The unique fixed point x is the equilibrium cost of the stochastic shortest path game. There exist stationary policies - 2 M and - 2 N which achieve the equilibrium. Moreover, if x 2 X, are such that 1. 2. 3. x(-N Proof. That there exists a unique fixed point x from the preceding proposition. Let - 2 M be such that x be such that x (Such policies exist thanks to Assumption R.) By Lemma 4.3, we have that - is proper. Thus, by Lemma 4.2, we have that x Similarly, by Lemma 4.4, we have that Combining these results we obtain sup Since in general we have sup (a statement of the Minimax Inequality), we obtain the desired result: sup Q.E.D. Lemma 4.1 implies that, when all stationary policies for the minimizer are proper, the iteration x converges linearly to the equilibrium cost x for all This follows from the contraction mapping principle. In the following proposition, we extend this result to the case where not all stationary policies for the minimizer are proper. Proposition 4.7. For every x 2 X, there holds, lim where x is the unique equilibrium cost vector. Proof. The uniqueness and existence of a fixed point for T was established in Proposition 4.5. Let x be the unique fixed point, and let - 2 M (proper) be such that T (x Our objective is to show that T t \Delta be the vector with coordinates, ae 0; if S. D. PATEK AND D. P. BERTSEKAS where ffi is some scalar. Let x \Delta be the unique vector in X satisfying T - \Delta. (Such a vector exists because - is proper, making the operator a contraction.) Note that Thus, x \Delta is the minimax cost of the fixed policy - with the immediate transition cost c(- ; \Delta) replaced with c(- \Delta. We have that Thus, from the monotonicity of T - we have that for all t ? 0 By taking the limit as t ! 1, we see that x(- ) - x \Delta . (This is also implied by our interpretation of x \Delta above.) Now using the monotonicity of T and the fact that x Proceeding inductively, we get Hence, fT t (x \Delta )g is a monotonically decreasing sequence bounded below which converges to some ~ x 2 X . By continuity of the operator T , we must have that ~ By the uniqueness of the fixed point of T , we have that ~ We now examine the convergence of the operator T t applied to x \Gamma \Delta. Note that, where the first inequality follows from the fact that P (- and - 2 N . Once again monotonicity of T prevails, implying that T t (x \Gamma \Delta) is monotonically increasing and bounded above. From the continuity of T we have that We saw earlier that x . Then, from the monotonicity of T - Thus, for any x 2 X we can find ffi ? 0 such that x . By the monotonicity of T , we then have, Taking limits, we see that lim t!1 T t Proposition 4.8. Given a proper stationary policy - we have that where x is the unique equilibrium cost vector and f- k g is a sequence of policies (generated by policy iteration) such that T (x(- k Proof. Choose implies that such an initial proper policy - 0 exists.) We have proper. By the monotonicity of T - 1 and Lemma 4.2, we have that for all t Thus, Applying this argument iteratively, we construct a sequence f- k g of proper policies such that, monotonically decreasing and bounded below by x , we have that the entire sequence converges to some vector x 1 . From (4.6) and the continuity of T , we have that x is the unique fixed point of T on X , we have that x(- k 5. An Example of Pursuit and Evasion. Consider the following two-player game, played around a table with four corners. One player, the pursuer (who is actually the minimizer), is attempting to "catch" in minimum time the other player, the evader (who is the maximizer). The game evolves in stages where, in each stage, both players implement actions simultaneously. When the players are across from one another, they each decide (independently) whether to stay where they are, move one corner clockwise, or move one corner counter-clockwise. When the two players are adjacent to one another, they each decide (independently) whether to stay where they are, move toward the other's current location, or move away from the other's current location. The pursuer catches the evader only by arranging to land on the same corner of the table as the evader. (The possibility exists that, when they are adjacent, they can both move toward each other's current location. This does not result in the evader being caught "in mid-air".) The evader is slower than the pursuer in the sense that, when the evader decides to change location, he succeeds in doing so only with probability the evader will wind up not moving at all.) Thus, the pursuer can ultimately catch the evader, provided he implements an appropriate policy (such as "always move toward the present location of the evader"). On the other hand, there exist policies for the pursuer (such as "always stay put") which allow the maximizer to prolong the game indefinitely. This results in infinite cost (i.e. infinite capture time) to the pursuer. This game fits into our framework for stochastic shortest path games. As described above there are three states: evader caught (state 1), players adjacent to one another (state 2), and players across from one another (state 3). Thus, 3g. Once the evader is caught, the game is over, so state 1 serves as the terminal state, which is zero cost and absorbing. In state two, when the players are adjacent, the players may move toward the other's location (action 1), stay where they are (action 2), or move away from the other's location (action 3). Thus, 3g. From the description of the problem given above, it is not hard to see that 14 S. D. PATEK AND D. P. BERTSEKAS The expected transition cost functions c 2 (u; v) take on the value of one for all u 2 U(2) and In state three (when the players are on opposite corners of the table), the players may move clockwise toward the other's current location (action 1), stay where they are (action 2), or move counter-clockwise toward the other's location (action 3). Thus, 3g. It is not hard to see that The expected transition cost functions c 3 (u; v) take on the value of one for all u 2 U(3) and We will show that the equilibrium value of this stochastic shortest path game is given by and that equilibrium randomized strategies for the two players are given by - 2 M and - 2 N such that are nonnegative, and any probability vector forms an equilibrium strategy for the evader. In other words, as long as the evader chooses not to remain at his current location (when the two players are adjacent), any mixed decision (at state 2) for the evader is optimal. The pursuer does not have the same flexibility; his optimal mixed decision is deterministic: always move toward the evader. On the other hand, any probability vector u 2 U(3) such that u forms an equilibrium strategy for the pursuer. In other words, as long as the pursuer decides to not stay at his current location (when the two players are across from one another), any mixed decision for the pursuer (at state 3) is optimal. This time, it is the evader's strategy which is inflexible. His optimal action is to stay at his current location. Thus, when both players play optimally, the game will always transition from state one stage. Happily, the equilibrium cost reflects this: x . To verify that these are indeed equilibrium policies, we will show that x (Notice that the policy - corresponds to one where the pursuer always decides to move in the direction of the current location of the evader. This policy is clearly proper. The desired result follows from Corollary 4.6.) Let us first consider the case where the two players are adjacent (i.e. state 2). Let a general cost-to-go vector be given as (Shortly, we shall consider the case where suggested above.) To evaluate the second element of T (x), we must compute min v2V (2) where the matrix G 2 (x) is computed as In other words, the second element of T (x) is evaluated as the value of the matrix game (in mixed strategies) defined by G 2 (x). It is well known that the equilibrium cost and equilibrium strategies for a matrix game are characterized as the optimal value and solutions to a particular linear program and it's dual [12]. In particular,[T (x)] 2 subject to G 2 (x)-v - subject to G 2 (x)-v - where e is the vector of all ones in R 3 , and v is an equilibrium strategy for the maximizer in the matrix-game. We shall refer to the linear program above as the "primal" problem. The dual of the primal problem characterizes equilibrium strategies for the minimizer of the matrix game: subject to G 2 Now consider G 2 (x ) and define It is straightforward to verify that - v is feasible for the primal linear program and that u is feasible for the dual problem. Moreover, the primal cost corresponding to - v is exactly just as the dual value of - u is also exactly 1 \Gamma p. Thus, we have found a primal/dual feasible pair for which the primal cost equals the dual value. Then, according to the duality theorem of linear programming, - are primal/dual optimal, and the optimal values of the primal and dual problems equal is exactly 1 x . This verifies that x and that - (2) and - (2) form an equilibrium pair of mixed decisions at state 2 2 S. Let us now consider the case where the two players are across from one another (i.e. state 3). To evaluate the third element of T (x) for general x 2 X , we must compute min where G 3 (x) is a matrix computed as S. D. PATEK AND D. P. BERTSEKAS Thus the third element of T (x) is evaluated as the value of the matrix game defined by G 3 (x). As before, the solution to this matrix game can be computed by solving a primal/dual pair of linear programs: subject to G 3 (x)-v - e; - subject to G 3 Now consider the primal and dual problems given by G 3 (x ). Define (0; Again, it is straightforward to verify that - v and - u form a feasible primal/dual pair where the primal cost of - v equals the dual value of - u. Thus, by the duality theorem, v and - u are primal/dual optimal. This time the optimal cost works out to be 1\Gammap which is exactly 1 x . This verifies that x an equilibrium pair of mixed decisions at state 3 2 S. Acknowledgments . Our proof of Lemma 4.1 was inspired by an argument by John Tsitsiklis for a similar result in one-player stochastic shortest path problems. We would like to thank our anonymous SIAM reviewers who, through their persistence, have helped us to find the shortest path to establishing our results. --R Parallel and Distributed Computation: Numerical Methods Analysis of Stochastic Shortest Path Problems Zero Sum Dynamic Games Finite State Convex Analysis Convexity and Optimization in Finite Dimensions I Stationary Markov Decision Problems in Time Proportional to Log(H) Mathematical Centre Tracts 139 Theory of Games and Economic Behavior. Game Theory --TR
game theory;stochastic games;stochastic shortest paths;optimization;dynamic programming
309119
Supporting Scalable Performance Monitoring and Analysis of Parallel Programs.
Tools for performance monitoring and analysis become indispensable parts of programming environments for parallel computers. As the number of processors increases, the conventional techniques for monitoring the performance of parallel programs will produce large amounts of data in the form of event trace files. On the other hand, this wealth of information is a problem for the programmer who is forced to navigate through it, and for the tools that must store and process it. What makes this situation worse is that most of the time, a large amount of the data are irrelevant to understanding the performance of an application. In this paper, we present a new approach for collecting performance data. By tracing all the events but storing only the statistics of the performance, our approach can provide accurate and useful performance information yet require far less data to be stored. In addition, this approach also supports real-time performance monitoring.
Introduction Monitoring the performance of a parallel program at run-time is an extremely useful feature for any powerful performance tool. The existing run-time performance monitors can only provide and display limited information for performance tuning. One of the major reasons is that, with run-time monitoring, there is a limited time for data collection and analysis. The longer time the data collection takes, the more intrusive it is to the behaviour of the program. The intrusiveness of monitoring may result in a change of the program behaviour. Another major difficulty in providing useful performance information at run-time is due to the large amount of performance data. To understand the performance of a parallel program, it is necessary to collect full-sized data sets running on a large number of processors. The conventional techniques for monitoring the performance of parallel programs generate large volumes of performance data. It is common to generate a few megabytes of data per second of program run when collecting basic performance information at the granularity of procedure and system calls. This estimate is based on generating traces of procedure and system call events. For a large scale parallel computer, consisting of say, 1000 nodes, this amount of data would be impractical to collect. Therefore, this creates a dilemma. Identifying a performance bottleneck necessitates collecting detailed information, yet collecting a large amount of data can overload the memory or trace files. To reduce the volume of data to be collected, a performance tool should collect only the information necessary to explain the performance of the program. However, deciding which data are relevant during a program's execution is difficult. On the other hand, this wealth of data is a problem for the user to navigate through, and for the tool to process during run-time monitoring. This paper introduces an instrumentation approach for data collection that supports run-time analysis of parallel programs' performance. The approach can maintain the ordering of program events and collect timing information of interesting events. The paper also presents a trace data organisation scheme that provides performance information rapidly during the execution of the program but require far less amount of data to be stored. The collected trace data are organised into different levels, ranging from the program itself to an individual communication statement, so that the user can tune the program in a top-down fashion, focusing on those areas that have the greatest impact on the performance. Furthermore, this technique is also suitable for post-mortem performance analysis. 2. Related Work We now review the previous work related to the two major concerns mentioned above, i.e. dynamic program instrumentation methods for reducing intrusiveness and trace data organisation methods for reducing the data volume and increasing the scalability. 2.1. Instrumentation Gupta and Spezialetti [8] present an approach for dynamically minimizing the intrusive effect of monitoring and ensuring that the execution selection of a non-deterministic event is the same for the un-instrumented and instrumented versions of a program. They assume an execution model in which a distributed computation is composed of multiple processes located at different processing sites. The processes' communication is via message passing and pending messages are maintained in a message pool for each process. Non-determinism arises due to the order in which the messages arriving at a process from different sources are handle. By restoring the message pool and message ordering, this approach can undo the intrusive effects of monitoring at run-time. It estimates the time at which the messages would have been sent and received if no monitoring actions were performed. On the basis of these estimates each process can restore the message pool by waiting for late messages or ignoring messages that have become available early. In addition, the messages can also be appropriately ordered. The major limitations of this system are: (1) it assumes that all the messages are sent in asynchronous mode; (2) it assumes that the messages that have been sent can arrive and be stored in the destination's message pool before the receiving process is ready to receive; and (3) for a non-deterministic receiving event, it requests the monitor to wait until all the messages from the remote sites to arrive. Cai and Turner [16] introduced a logical clock approach, which monitors the behaviour of occam programs on the transputer system. In this approach, not only the partial ordering of events, but also the communication ordering on each process is preserved. In permitting non-deterministic communication (ALT construct in oc- cam), the monitor has to wait until it is safe to allow the communication to occur. That is, after a process has been granted the permission to receive a message, there will be no other message destined to that process with an earlier logical time. How- ever, this may introduce deadlocks, not normally existing in the programs without monitoring. To avoid the deadlocks introduced by the logical clock approach, Cai and Turner developed a carrier-null message algorithm [2], based on the deadlock avoidance algorithm called null-message [3] developed by Chandy and Misra. 2.2. Scalability Performance Metric Predicate Library (PMPL) [5] attempts to solve the problem of performance data size. PMPL can be used with existing trace monitors such as AIMS [18, 19] and PICL [6]. It uses user-defined predicates (PMPs) to control the output of event trace data during the application's execution. These predicates test the state of the program performance; if the performance does not fall into a specified tolerance, the monitor will output the performance history leading up to the point of performance degradation. The major limitations of this system are that it requires the user to manually specify predicates and its additional perturbation to the application's performance imposed by Performance Metric Predicates. Dynamic Instrumentation [9, 13] controls the amount of data to be collected by deferring the insertion of instrumentation probes until the application is in exe- cution. It can insert or change instrumentation at any time during execution by modifying the application's binary image. Only the instrumentation probes that are required for the currently selected analysis or visualisation are inserted. The approach periodically samples detailed information stored in event counters and timers. These intermediate values provide information useful for making decisions on how to change the instrumentation to meet the need. The volume of data collected is controlled by collecting only the information needed at a given moment, and by controlling the sampling rate. Although this approach provides great flexi- bility, it requires many decisions to be made on what to collect, and when to collect them. The quality of the collected performance data depends on the sampling rate, the time required to make the decisions, and the correctness of the decisions. The MPP Apprentice performance tool [17] is designed to help users to tune the performance of their Cray T3D applications. It collects statistics for each section of code, summarises the data on each processor, and displays the summary across all processors. During program execution, the time and pass count for each code block are summed within each processor and kept locally in each processor's mem- ory. This enables the MPP Apprentice tool to handle very long-running programs without increasing the demand for the processor memory. At the end of program execution, or when requested by the user, a global reduction of the statistics for each code object across the processors is done, and a run-time information file is created. The MPP Apprentice tool then post-processes this file and provides performance information to the user. The major limitation of this tool is that it does not support real-time performance analysis. Quartz [1] is a profiling tool for tuning parallel program performance on shared memory multiprocessors. The philosophy underlying Quartz was inspired by the sequential UNIX tool gprof [7]: to appropriately direct the attention of the programmer by efficiently measuring just those factors that are most responsible for performance and by relating these metrics to one another and to the structure of the program. The primary limitations of the profiling tool are its dependence on an external sampling task and the potential errors inherent in sampling. Another limitation of this tool is that it focuses on finding CPU time bottlenecks only. 3. Design Goals Having compared the existing approaches and identified their limitations, we now discuss four major goals in the design of our run-time performance monitor. Goal 1: Providing accurate performance information This goal includes minimising the intrusiveness of data collection and accurately calculating the performance (e.g. timing) information. Goal 2: Keeping trace data in a manageable size As mentioned before, for a large scale parallel computer, it could be impractical to collect the amount of performance data. The problem also happens for small but long running programs which also generate a large amount of trace data. There- fore, the second goal of the monitor is to maintain the performance data set in a manageable size without losing the characteristics and usefulness of the data. Goal 3: Providing performance information rapidly Parallel programs incur overhead in many different ways, such as synchronisation, load imbalance, and communication. A prompt assessment of how processing time is spent on each of these aspects is useful during performance tuning of parallel programs. The third goal of the monitor is to store the performance data in a form so that the performance information, including the statistics of CPU time (for load imbalance), transmission time (for communication), and blocking time (for synchronisation), can be easily derived and rapidly provided. Goal 4: Providing hierarchical data and relating back to the source program The performance tuning process should be associated with the source program. If a means of focusing on successively detailed regions of the program is provided, one can proceed in a hierarchical manner with respect to the program code, by studying the code at various levels of detail. This helps to systematically focus on the region of code causing the performance problem. A previous informal study [10] shows that users generally start by taking a high level view of the performance of their applications, and isolate the source of their program's poor performance. This process continues until they understand their program's performance well enough to start tuning it. Therefore, the fourth goal of the monitor is to provide the user with different levels of performance statistics, ranging from the whole program to a single communication statement. The performance statistics are organised according to the hierarchical structure of the program. To achieve these four goals, the key questions to be answered are: ffl how to minimize the intrusiveness of data collection, ffl what data should be collected, and ffl how the collected data are organised. The next section discusses various approaches to performance data collection that achieve some of the goals, and presents our design decisions that have been made in order to achieve all the goals. Sections 5 and 6 present our approaches to intrusion minimisation and reduction of the trace data volume. 4. Data Collection Methods and Design Decisions There are three basic approaches to collecting performance data: counting, statistical sampling, and event tracing, each representing a different tradeoff among information volume, potential instrumentation perturbation, accuracy, and implementation complexity. 4.1. Counting The first approach records the number of times each interesting event occurred. In Unix grof [7], a monitoring routine is called in the prologue of each profiled procedure. This monitoring routine updates the count of calls to the procedure from its caller. Given both the count and total time, one can compute the average execution time. This approach significantly reduces the volume of performance data collected. However, it records the number of times an event occurred, but not where or why the event occurred. It therefore loses the important information about the event context. This approach achieves Goals 2 and 3, but cannot achieve Goal 4. It also achieves Goal 1 to some extent since it collects only the counting information which introduces little intrusion. 4.2. Statistical sampling Another approach to data collection is statistical sampling that involves periodic sampling of program resources, such as the currently active procedures, to gauge the program performance. Unix grof [7] periodically interrupts the program to sample the program counter, thereby estimating the execution time of each procedure. In Quartz [1], a set of processors execute the program and maintain their states in a shared memory by special code executed during thread operations and at procedure entries and exits. These states are then sampled by a dedicated processor that does not participate in executing the program. Crovella and LeBlanc's predicate profiling tool [4] uses a similar approach. The primary limitations of these approaches are their dependence on the external sampling task and potential errors inherent in sampling. While sampling procedures provide only an estimate, it is accurate just where it needs to be - for those routines 6 KEI-CHUN LI AND KANG ZHANG which spend most of the program's time and the accuracy of the result depends on the sampling rate. On the other hand, if the total program execution time is too low, the sampling error may be intolerable. Ponder and Fateman [14] identified a number of other limitations of statistical sampling approaches. The statistical sampling approach achieves Goals 2 and 3, but cannot achieve Goals 1 and 4. 4.3. Event tracing Event tracing is the most general and flexible approach to data collection. It generates a sequence of event records. Each event record consists of an encoded instance of an action and its attributes, typically including the following: ffl what action occurred (i. e., an event identifier), ffl the time when the event occurred, ffl the location where the event occurred (e.g., a line number), and ffl any additional data that define the event circumstances. Not only does event tracing identify what happened and where it happened, the event timestamps impose an order on the events that defines the control flow and interactions between system components. One of the strengths is that judiciously chosen events can identify most performance problems and some correctness prob- lems. Task schedules may be directly obtained from trace files, and an immense amount of flexibility is available in assigning and interpreting time-stamped events. Event tracing subsumes counting and sampling; one can compute times and counts from trace data. For example, given a trace of procedure entries and ex- its, one can compute the total number of calls to each procedure by counting the number of instances of each event type, as well as the total procedure execution times by matching procedure entry and exit events, computing the difference in their event times, and adding the difference to a running sum for that procedure. In addition, dynamic procedure call graphs and space-time diagrams can be drawn for program visualisation using the trace data. With tracing, one can capture components interactions, dynamic behavior, transients, as well as load imbalances due to message waiting. Since the performance information is retrieved from trace files, this technique is usually used in post-mortem performance tuning tools, such as AIMS [18, 19], PICL [6], and Pablo [15]. These tools present information from the perspective of time, and try to give the user an idea of what was happening in every processor in the system at any given moment. Event traces have great potential to help the user to understand the program behaviour, but also have some serious problems as discussed below. To understand the performance of parallel programs, it is necessary to collect a large amount of data running on a large number of processors. But the volume of data, which is proportional to the number of processors, the frequency of trace points, and the length of program execution, limit the scalability of the monitoring system. For example, AIMS generates 3.6 megabytes of trace file for a parallelised version of ARC2D (an NAS parallel benchmark) executed on 64 processors in two seconds [5]. For a massively parallel computer, the amount of trace data is too large to collect and maintain for realistic programs. With continued increases in the number of processors and the sizes of applications, event tracing is not a solution that scales well. On the other hand, the data volume is also difficult to manage and display, and the user is left to interpret all the events happening on thousands of processors. Therefore, this approach achieves Goal 4, but cannot achieve Goals 2 and 3. With Goal 1, it collects accurately most of the performance information, such as counting and timing, but it generates serious intrusion especially in monitoring large or long-running parallel programs. 4.4. Design decisions From the above discussion, there is no single approach that can achieve all the four goals. Therefore, we developed an approach which is a hybrid of counting and event tracing that provides a low data volume of counting with detailed tracing. We instrument the most interesting events (e.g. communications) and collect the event traces during the execution of the program. The collected data are not only summarised in counts and times as in the counting approach, but the information such as the locations of the events and the break-down of the timing are also stored as in the event-tracing approach. Moreover, to support the user's cross-referencing, our approach uses the knowledge of the program structure to relate the performance characteristics back to the source program. Data to be collected When collecting performance data of parallel programs, interesting events usually include procedures and communications. To support tuning long-running programs, it is reasonable to assume that most of the execution time is spent on loops. Hence loops are treated as interesting events in our approach. To provide more detailed timing information for procedures, procedure calls are also considered in our monitor as interesting events. Thus, the statements of communications, procedure calls, procedures, and loops are instrumented for performance data collection. Organisation of performance data After collecting the performance data for each interesting event, the monitor will accumulate the collected execution times and store them in a data structure dynamically generated during program execution. It also updates the count for such an event. The locations of all the monitored events in the source program are also stored in the data structure, and are used to relate the performance characteristics of the interesting events back to the source program. Moreover, the break down of the timing is also recorded in more details. For example, the monitor records not only the total execution time and count of calls to a procedure, but also the break down of the information by different procedure calls. All of these are processed on-the-fly during the execution of the program. Cross-reference between performance data and source program To relate the performance characteristics back to the source program, we must maintain a link between the control flow of the computation and the performance data. As a means of representing the original source program and its control flow, we provide an abstraction of the intermediate program representation using program graphs. The following two sections present our approaches, based on the above design decisions, for program instrumentation that aims at minimising intrusiveness and for data organisation that aims at reducing the volume of trace data. 5. Intrusion Minimisation A fundamental problem with any performance monitoring tool is the intrusiveness of data collection and its perturbation to the program behaviour. Intrusiveness may alter the timing of events in the program in an arbitrary manner and can lead to a change of ordering of the events. This means that the result of monitoring with an intrusive monitor can only be taken as an approximation of what has happened in an unmonitored program. It may also hide deadlocks existing in the program or even create new deadlock situations [16]. 5.1. Perturbation of Instrumentation Time characteristics An intrusive monitor may alter the time characteristics of events in a program in an arbitrary manner. The delays introduced by the monitor in the execution of processes can change the relative timings of their executions. Thus not only are the overall execution times of the processes affected, but also are other time characteristics such as waiting for messages, processor idle, and so on. Figure 1 is a space-time diagram showing the effect of intrusiveness in terms of timing. are three different processes. Without instrumentation, the sending event E a in P1 is ready to send a message to P2 at time T 1 . The receiving event E b in P 2 is ready to receive the message from P 1 at time T 2 . Assume that T 2 is earlier than T 1 by t, the ready time of E b is t earlier than E a . Assuming there is one probe inserted before and one probe inserted after each event, and there are two instrumented events before E b . With instrumentation, there is one probe before E a and five probes before E b . For the simplicity of calculation, assuming the delay time of every probe is the same and equal to t, the ready time of E a becomes 3t earlier than E b . Therefore, the instrumentation has altered the ordering of the events, and the timing information, such as synchronisation delay, is no longer the same as that without monitoring. Execution selection The second major problem with program instrumentation is that it may result in a change of the execution selection in a non-deterministic communication which has multiple legal executions for a given input. A non-deterministic message reception is supported using the any-way branch. The receiving process may accept a message R R R R 3t Ea Ea T2+5t (a) Without Instrumentation (b) With Instrumentation receiving event probe R sending event Figure 1. Intrusiveness to the time characteristics from any other process node (i.e., selects the path along the anyway branch (i.e., which corresponds to the sender of the message. The criteria for message selection are not expressed in the application by the user and may differ in different implementations. In distributed systems, this selection is based upon criteria such as the order in which the messages arrive, priorities of the senders, fairness criteria such as selecting a message from a process that has been least recently considered, or a purely random selection may be made, etc. We assume that the receiver selects the path along the any-way branch which corresponds to the sender whose message is the first ready to send to the receiver. Therefore, the selection of a particular execution is made at run-time and is typically influenced by the timing of various events. Since the monitoring actions alter the execution time, the likelihood of the selection of various legal executions may also be altered. 5.2. Instrumentation Methods The existing instrumentation methods can be classified into three groups: software, hardware, and hybrid approaches. The software approach is to add a set of instructions (probes) in an application program to enable the runtime collection of all useful information about system behaviour. This approach offers the advantage of being fairly independent of the target architecture. It also provides information at a high level of abstraction, directly useable by designers or by a graphical display tool. There are many ways of realising software instrumentation. Probes can be inserted manually by editing the source code, automatically by a pre-compiler, by linking instrumented libraries, by modifying the linked executable or by modifying the operating system. According to the programming stages that the probes are inserted, the software instrumentation can be further divided into source instrumen- tation, library instrumentation, object instrumentation, and kernel instrumentation. The main shortcoming of software instrumentation is related to the time overhead introduced by the information gathering. To limit the effect of intrusion, instrumentation is usually limited to events whose observation is considered essential. Other instrumentation methods reply on extensive hardware support and do not have a noticeable effect on the behaviour of the program being observed. The hardware approach involves connecting probes to the system hardware in order to observe its behaviour without disturbing it. However, it has a number of limita- tions. Firstly, they provide very low-level data. Usually considerable processing and complicated mechanisms are required to provide application level monitoring information from machine level data. Secondly, they form the least portable class of monitoring mechanisms. Thirdly, the design of a hardware monitor can be complicated with the use of pipelining and on-chip cache for increasing the throughput of microprocessors and also an increase in the integration of various functional units (e.g., floating point units and memory management units) which makes monitoring difficult. Hybrid monitoring is a compromise between software and hardware monitoring approaches. It is based on the addition of a few instructions in programs in order to select adequate information useful to explain the behaviour off-line. The information is collected with a specific device and transmitted to the host system which interprets it off-line and then displays the result. The approach has the advantages of the two other approaches because it gives information at a high abstraction level and introduces a low overhead. However, the major limitation of hybrid instrumentation is that it is often dedicated to specific hardware architectures. Therefore, standard interfaces are important for supporting instrumentation portability. To achieve high portability and flexibility, we choose a source instrumentation method using software monitoring. The following subsection presents our instrumentation method using virtual time for monitoring parallel message-passing programs 5.3. Virtual Clock Approach In order to achieve Goal 1 stated in Section 3, i.e. accurately capture the performance information such as synchronous delay, transmission time, and to introduce minimal intrusiveness to the program behaviour, we use a virtual clock approach to collect the performance data. Our approach is based on Cai and Turner's logical clocks approach [16] and able to handle parallel programs that involve non-deterministic communications. However, it differs from Cai and Turner's approach in three key aspects [?, 20]: ffl A new deadlock avoidance method is used to speed up the realisation of the global waiting dependency, and decrease the amount of control messages and time for the monitor to select the earliest available sending process. Moreover, it is more suitable for parallel systems containing nodes connected within a network that provides point-to-point communications. ffl Our approach is designed and implemented for monitoring both the synchronous and asynchronous communication functions in CMMD on the CM-5. It is, however, general enough to be applied to other parallel platforms. process is necessary in our approach. The monitor is implemented as a run-time library, which contains a set of routines (i.e. probes) to be inserted into the source code. We assume an execution model in which a parallel computation is composed of multiple processes located on different processors. The processes communicate via message passing and non-determinism arises due to the order in which communication requests to a process from different sources are handled at the destination process. 5.3.1. Virtual time In order to keep the execution selection and the collected timing characteristics of events the same as those of the original un-instrumented program, the estimate of time spent on monitoring activities is maintained by a virtual clock in each process. Using the estimates for all the processes involved, we can infer the times at which various actions would have occurred if no monitoring had been performed. Next we define various times used in our approach. 1 The local time at processor P i during the execution of an instrumented process, denoted by LT i , is given by (RT is the real time of P i obtained from P i 's internal physical clock and I i is the current intrusion time of . The virtual time V T i , which is the estimate of the real time at P i during the execution of the original un-instrumented program, is given by RT For a given application process, the local value of the intrusion time indicates the delay due to monitoring activities in the execution of the process. 5.3.2. Execution control In order to preserve the timing characteristics, and keep the execution selection unchanged, the monitor needs to take over the control of the process which is ready to communicate with other processes and determine the timing and ordering of communication events. When monitoring a deterministic synchronous communication event, the monitor will postpone the permission of the communication until it detects the arrival of the partner communication event. When monitoring a deterministic asynchronous communication event, the monitor will permit the asynchronous function to execute without waiting for the readiness of its communication partner. In permitting a non-deterministic communication, the monitor has to wait until it is safe to allow the communication to occur. After the receiving process oehas been granted permission to receive a message, there should be no other process that will send a message to that process with an earlier virtual time. The timing and counting information is collected by subroutine calls (probes) in a Data Collection Library inserted into the source code by a pre-processor. Probes are inserted before and after each procedure call, communication, and loop statement. For the procedure, a probe will be inserted after the heading of the procedure. When monitoring communication events, the monitoring functionality is divided into two parts, fore monitoring activities and back monitoring activities. The fore monitoring is responsible for recording the synchronisation time and controlling the inter-process communication. Since the fore monitoring activities are performed before a communication statement, the monitor can control the occurrences of communication events. When the monitor notices that its communication partner is ready to communicate or is able to decide which sender should communicate, the monitor can calculate the time spent on synchronisation and permit the communication to start. After the execution of the communication, the back monitoring simply calculates the time spent on the message transmission. 5.3.3. Preservation of time characteristics Consider again the example shown in Figure 1, the use of virtual time to preserve the ordering and execution times of events are illustrated in Figure 2. RT 1 ; RT 2 , and RT 3 are the real times of is the virtual time. The sending event E a and receiving event E b arrive at real times the times spent on monitoring activities before E a and E b are t and 5t respectively, the intrusion time when E a arrives is t and that for E b is 5t. Therefore, E a arrives at virtual time arrives at virtual time Based on the virtual time measurement, the correct ordering of events is preserved, that is, E a arrives after E b , and synchronous delay which is equal to T can also be accurately collected. R R T2+5t 3t T1+t Ea Figure 2. Preservation of time characteristics 5.3.4. Preservation of execution selection The monitor also uses the virtual time to control the occurrence of inter-process communication to keep the execution selection unchanged. To achieve this, when a non-deterministic receiving event arrives, the monitor makes the decision as to which inter-process communication should happen next based on virtual times, rather than real times, of other pro- cesses. It delays the occurrence of a communication if it is aware that there is at least one possible candidate process for that communication which is running in an earlier virtual time. In this way, the communication is prevented from occurring either too early in virtual time or too late in real time. Therefore, although the real-time execution of a process is slowed down by the monitoring activities, the behaviour of the program is unchanged. Figure 3 shows an example how the monitor uses the virtual time to keep the execution selection unchanged, where are virtual times of processes are the non-deterministic receiving events in P 2 . E a and E c are the sending events in P 1 and P 3 respectively. Because of the delays introduced by the monitor routines, E a arrive at real times q; p; r, and s instead of original times executing the uninstrumented program. The relationships between these times are s ? r and Ea r Ec s Real Time Ed Figure 3. Preservation of execution selection 5.3.5. Deadlock avoidance The above virtual clock approach may introduce a deadlock in a non-deterministic communication. Consider the example shown in Figure 4, in which the W end of the line is connected to a waiting process, and the N end of the line is connected to a non-waiting process. In this example, process P 1 is waiting for input from processes P 0 and P 3 . P 0 is ready to output to P 1 at virtual time 30. P 3 is waiting to receive from process P 2 and P 2 is waiting to receive from 1 . It is assumed that the virtual time of P 3 is less than 30, thus, P 3 might have a chance to become ready to output to P 1 before 30. Therefore, according to the virtual clock approach, the monitor cannot permit P 1 to receive from P 0 and no message can be sent out to P 2 . Thus a deadlock occurs, as P 1 is waiting for is waiting for P 2 , and P 2 is waiting for P 1 . Without monitoring, this deadlock situation will not happen, since P 1 will select communication. So, the above deadlock is introduced by the monitoring policy of the virtual clock approach. It is clear that this kind of deadlock should be avoided. Cai and Turner have developed a carrier-null message algorithm [2], 14 KEI-CHUN LI AND KANG ZHANG Figure 4. Deadlock creation which is based on the null-message algorithm [3]. Both of these algorithms avoid deadlocks by transmitting null messages to announce the absence of real messages and to advance the simulation time or logical time of each process in the waiting dependency loop. However, in parallel systems (e.g. CM5, SP2) with tens or hundreds processors, using the carrier-null message algorithm, the amount of protocol messages will overload the system with message traffic. We have developed a new deadlock avoidance method [?, 20] which detects the global waiting dependency and allows the earliest available sending process (P 0 in the above example) to send its message. To obtain the information on the global waiting dependency, the monitor for a non-deterministic receiving event collects the timing and state information from all the other processes. After identifying a dependency loop, the monitor selects the earliest ready process to permit its communication with the non-deterministic receiving event. The approach uses a simple algorithm that introduces little amount of extra control messages. 5.3.6. Performance of instrumentation We compared the times of different stages of a test program executing with monitoring and without monitoring in order to measure the overhead of the monitor and the accuracy of the times collected by the monitor [12]. The test program is a matrix multiplication parallel program written in C and CMMD. In this program, a master process executes on processor 0 and a number of worker processes execute on processors 1 to 31. In the beginning, the master process initialises the matrix A and matrix B. It then sends different portions of matrix A and matrix B to the worker processes. All the worker processes perform their own calculations after receiving the data and send their results back to the master process. The master process then merges the result of the multiplication between matrix A and matrix B to form matrix C. Figure 5 shows the tolerance of the timings of different stages and indicates that the maximum tolerance is 3.6%. We also obtained the monitoring overhead that is 2% of the total execution time of the program without monitoring. By inserting different delays into the monitoring routines to evaluate the variation of the tolerance of the timings, we observed the maximum tolerances that ranged between 1.8% and 12%. The results shown that such tolerances are not proportional to the increase of delays inserted in the monitor. Figure 5. The tolerance of the timings 6. Reducing Trace Data Volume To reduce the amount of trace data to be maintained, we organise the performance data collected by program instrumentation in two major forms of data structure, i.e. static tables and dynamic records. Figure 6 illustrates how the performance information is organised. During the execution of a parallel program, the performance analyser generates a performance report based on the information in static tables and dynamic records and on the user's input from the user interface. At the end of the program execution, the monitor may also save the dynamic records to a system disk for post-mortem analysis. The combined use of static tables and dynamic records ensures that the necessary performance information is structurally maintained. The storage required for such data structures is manageable in size and does not increase proportionally as the program size or running time. 6.1. Program graphs To be able to represent and interpret the performance of a program, and relate the performance back to the source program, we use an abstraction called program graph, as depicted in Figure 7. A program graph consists of nodes that represent major control points in the program such as procedure calls, loops, and procedure headers. The nodes are organised according to the hierarchical structure of the parallel program. Table Analyser Information Analysis Run-time Postmortem analysis Query Performance Interface User Performance Dynamic Records Figure 6. The generation of performance information procedure communication communication procedure procedure call communication loop loop procedure call communication procedure procedure call procedure Figure 7. The program graph of a message passing parallel program The top level of the program graph is the main procedure. The second level consists of the monitored events in the main procedure, such as communication events, procedure calls and loops. For a loop event, if there is a nested loop, procedure call, or communication event within the loop, a lower level description of such an event will be attached to the loop event. For a procedure call event, the called procedure will be attached to the calling event. A program graph is implemented as a number static tables in our monitor. The static tables are constructed during program instrumentation by the pre-processor before the execution of the program since their entries can be determined from the program text. Figure 8 shows the structure of the pre-processor. 6.2. Static tables Static tables are used for storing the hierarchical relationship of the program structures and statements. An interesting program structure or statement is identified Static Tables Application Source Code Instrumented Source Code Pre-processor Figure 8. The pre-processor for program instrumentation by its line number in the program. Tables T pl ; T pcom , and T pc store the information of loop structures, communication statements and procedure calls inside a procedure respectively. Tables T ll , T lcom , and T lc store the information of loop structures, communication statements and procedure calls inside a loop structure respectively. Figure 9 shows the format of static tables, each having the following fields: l p is the line number of a procedure statement. Since the data presented in the monitor is primarily based on procedures, this field is the key in Tables l l is the line number of a loop statement. This field is the key in Tables T ll , lcom , and T lc . l c is the line number of a communication statement. l pc is the line number of a procedure call statement. l pi is the line number of a procedure statement which is invoked in l pc . l il is the line number of a loop statement which is nested in another loop. Fields Table l p l l l c l pc l pi l il ll Figure 9. The format of static tables 6.3. Dynamic records Dynamic records are generated by the monitor during the execution of a parallel program. They store the statistics of interesting events. In our approach, interesting events include procedures, loops, and communications. A dynamic record is allocated for each procedure, loop and communication statement, whose structure is shown in Figure 10. loop_time loop_num Communication Events dest_node trans_time sync_delay trans_num next_dest* COM record record COM line # self_node event_type c_p_l_ptr* activate_line# next_caller* proc_time proc_num LOOP record PROC record Loop Events Procedure Events record records Figure 10. The structure of dynamic records for storing interesting events A list of dynamic records named EVENT records are allocated at run-time to different interesting program events of a parallel program. Each EVENT record stores the statistics of an interesting program event, and is a four tuple, (line#; self node; event where ffl line# is the line number of the first statement of the program event. ffl self node is the identifier of the process which executes the program event. event type is the type of the program event, which can be a communication, a loop, or a procedure. ffl c p l ptr is a pointer pointing to the corresponding records of the type event type. To relate the performance characteristics back to the source program, an interesting program event is identified by its line number in the program. For a communication event, line# stores the line number of the communication statement. For a loop or a procedure event, line# stores the line number of the first statement of the event. Since the performance data may be collected from different processes, self node identifies the process in which the program event is executed. We use multiple EVENT records to store performance data of different program events. According to the type of a program event stored in event type; c p l ptr points to the corresponding records. For a communication event, event points to a list of COM records. For a loop, event to a LOOP record. For a procedure, event points to a list of PROC records. We now describe the design of these records for respective program events. Procedure events A large complex program is usually composed of many small procedures that implement abstractions of the program. To direct the user's attention to the location that is causing the performance problem, the statistics of a procedure such as the count of the procedure's invocations and execution time should be provided. On the other hand, it is useful to know in each procedure the statistics of the other procedures it invokes. Consider the following example: procedure X call Y Assume that procedure X is responsible for 90% of the execution time in a program, and the call Y statement is responsible for 80% of the execution time. We should obviously focus our attention on procedure Y rather than procedure X. For this reason, it is necessary to detect a situation in which the time is dispersed among several procedures. Unix gprof [7] can provide such information. It gathers three pieces of information during the program execution: call counts, execution time of each profiled routine, and the arcs of the dynamic call graph traversed during the program execution. By post-processing these data, gprof builds a dynamic call graph where nodes represent the routines and directed arcs represent the calls to the routines. It then propagates the times along the arcs of the graph to the routines that invoke them. Since it assumes that each call to a routine takes the average amount of time for all calls to that routine, the caller r is accountable for T s \Theta C rs =C s , where T s is the total time spent by the callee s; C rs is the number of calls from a caller r to s, and C s is the number of calls to routine s. This assumption is not always true since the execution time of a routine may depend on the parameters passed when the procedure is invoked. To provide accurate timing in each routine and the times spent by the routines that it invokes, we separately store the execution information of a procedure for different callers. Since our approach provides run-time performance information during the execution of a parallel program, rather than building the dynamic call graph after the execution of the program, a list of PROC records are dynamically allocated for each procedure during the execution to store the statistics of different procedure call statements. Each PROC record in the list stores the statistics of a particular call statement, and is a four tuple, (activate line#; next caller ; proc time; proc num), where ffl activate line# is the line number of the statement that calls the procedure. ffl next caller is a pointer linking the PROC records in the list. ffl proc time is the accumulated execution time of the procedure called by the statement whose line number is stored in activate line#. ffl proc num counts the number of executions of the procedure called by the statement whose line number is stored in activate line#. However, the above arrangement would not work for programs containing recursive calls. Figure 11 shows two simple examples. Because the relationship between the caller and callee is mixed up, the time is propagated from one statement to another in a cycle. Our solution is not to allocate any PROC record to a recursive call. For example, in Figure 11a, no PROC record is allocated to the call X statement. We only provide the counting and timing information of procedure X, just like that the call X statement does not exist. This information is stored in proc time and proc num of PROC record of procedure X with external call statements. In the case of Figure 11b, we treat procedures X and Y as a single procedure Z. All the callers to procedures X and Y become callers to procedure Z. This arrangement results in the situation like in Figure 11a, so that no PROC record will be allocated to either call X or call Y statement. The counting and timing information of procedure Z is stored in the list of PROC record of procedure Z EVENT record with external call statements. procedure X procedure X procedure Y call X call Y call X (a) A recursive routine (b) Mutually recursive routines Figure 11. Program examples containing recursive calls Therefore, we provide the user with simple and accurate performance information for recursive procedures instead of presenting overlapping and complicated timing information. Communication events Communication is one of the most important activities that may be optimised to improve the performance of parallel programs. In order to observe the communication behaviour, we collect the measurements such as transmission time, synchronous delay and the count of the executions for each communication statement. A communication statement may change its destination during the execution of a parallel program. The following is an example of the CM-5's CMMD send statement whose destination changes from 1 to numworkers. dest != numworkers; dest++) CMMD-send-block(dest, 1, &buf, bsize) To provide more detailed timing information of a communication event, such as the time spent on communication between two processes, a list of COM records are dynamically allocated to store the statistical information for all different destinations of each communication statement in the program. A COM record is a five tuple, (dest node; trans time; trans num; sync delay; next dest ), where ffl dest node is the identifier of the process which is the destination of the communication ffl trans time is the accumulated message transmission time of the communication event. ffl trans num counts the number of executions of the communication event. ffl sync delay is the accumulated synchronisation time of the event. ffl next dest is the pointer linking to the next COM record in the list. Loop events For many long-running programs, most of the execution time is spent on loops. We collect the time and count of executions for every loop event in the program. A LOOP record is dynamically allocated to store the statistical information for each loop event in the program. It is a two tuple, (loop time; loop num), where ffl loop time is the accumulated execution time of the loop event. ffl loop num counts the number of executions of the loop event. 6.4. Results The following are two case studies that indicate some results of the evaluation of the effectiveness of the above data structure in performance interpretation and reduction of trace volumes. 22 KEI-CHUN LI AND KANG ZHANG 6.4.1. Performance Interpretation To describe and explain the data structures used in our approach and demonstrate how they can provide performance statistics, an example parallel program is used and shown in Figure 12. In the example program, L1 to L15 are the line numbers of the program state- ments. The main procedure main in L1 consists of two procedure call statements in L2 and L3 which call procedures P1 and P2 in L4 and L6 respectively. Therefore, two records [L1 L2 L4] and [L1 L3 L6] are included in Table T pl . The loop event loop1 in L11 has a nested loop loop2 in L13, and record [L11 L13] is included in Table T ll . Since the communication statement E1 in L9 is inside procedure P3 in L8, record [L8 L9] is in Table T pcom . On the other hand, the communication statement E2 in L12 is inside loop1 in L11, record [L11 L12] is in Table T lcom . Figure 13 shows the static tables generated for the example program. Since procedure P3 can be called by the statements in L7 and L5, two dynamic records, i.e. a PROC record with activate line# = L5 and a PROC record with activate are in the list referenced by c p l ptr of the EVENT record of procedure P3. One LOOP record is also allocated to each of loop1 and loop2. The following performance information is derived from the static tables and dynamic records. Total execution time of the whole program Since the line number of the main procedure is L1, the record with line# = L1 is searched in EVENT records. The main procedure is the first procedure to execute, so only a PROC record with activate line# = 0 is in the list referenced by c p l ptr of the matching EVENT record. The value in proc time of the PROC record is the total execution time of the whole program. Total message transmission time of the whole program All the records with event type equal to communication events are searched in EVENT records. For each of the matching records, the values in trans time of all COM records referenced by the record's c p l ptr are accumulated. The sum of these accumulated values is the total message transmission time of the whole program. Total communication synchronisation time of the whole program The calculation is the same as for the total message transmission time of the whole program except that the values in sync delay rather than in trans time are accumulated. Total execution time of all the procedure calls in the main procedure Using activate line# = L1 as the key, two records [L1 L2 L4] and [L1 L3 L6] are found in Table T pc . This means that there are two procedure call statements in the main procedure. The execution time of the first call statement is proc time of the PROC record whose activate line# = L2 referenced by c p l ptr of the record whose L4. The method to find the execution time of the second procedure call statement is the same as to find the first. The sum of these two values is the total execution time of all the procedure calls in the main procedure. Total execution time of the procedure call in L5 The calculation is the same as the above without searching in Table T pc and only one procedure call statement is searched in the dynamic records. L2 call P1; L3 call P2; L4 procedure P1 L5 call P3; L6 procedure P2 L7 call P3; L8 procedure P3 call P4; L11 loop1- L13 loop2- L14 call P4; procedure P4 Figure 12. An example program Table T pl Table T pcom l p l l l p l c Table l p l pc l pi Table T ll Table T lcom l l l il l l l c Table l l l pc l pi Figure 13. The static tables generated for the example program Total time and count of procedure P3 executions Since the line number of procedure P3 is L8, the record with line# = L8 is searched in EVENT records. The sum of the proc time values in all the PROC records that are referenced by c p l ptr in the matching EVENT record is the total execution time of procedure P3. The sum of the values in proc num is the count of procedure P3 executions. Total execution time of the communication event in L12 The record with line# = L12 is searched in EVENT records. The sum of the values in trans time and sync delay of all COM records in the list referenced by c p l ptr in the matching EVENT record is the total execution time of the communication event in L12. Total execution time of loop1 and the timing information of the events in the loop The record with line# = L11 is searched in EVENT records. The value in loop time of the LOOP record referenced by c p l ptr in the matching EVENT record is the total execution time of loop1. Using line# = L11 as the search key, record [L11 L13] is found in Table T ll . This means that there is a loop at L13 nested inside loop1. The method to find the total execution time of loop2 is the same as for loop1. With the same key, record [L11 L12] is found in Table T lcom . This means that there is a communication event at L12 in loop1. The way to calculate the time spent on this communication event was demonstrated before. Using the same key, no record is found in Table T pc , so there is no procedure call statement in loop1. From the above discussion, we can see that the collected performance data are organised in such a way that they can be related back to the structure of the application program. The performance information can be provided with different levels of performance statistics, ranging from the whole program to a single communication statement. With such information, the user can tune the program in a top-down fashion, focusing effort on those areas that have the greatest impact on the performance. We now use the program in Figure 12 as an example and assume that procedure P4 consumes most of the program's execution time. Firstly, the user checks the performance of the main procedure and finds that most of the execution time was spent on call P1 and call P2 statements. The performance of procedures P1 and P2 is checked and it indicates that call P3 was the most time-consuming statement. The user then checks the performance of procedure P3. It can be found that most execution time of procedure P3 was spent on the call P4 statement. The user can then conclude that procedure P4 has the greatest impact on the whole performance and should focus his/her attention on procedure P4. 6.4.2. Comparison of Data Sizes The size of the performance data needed in our approach is much smaller than those generated by traditional trace-based systems. Let us consider the following portion of a parallel program written in CMMD and executed on CM-5. 48 for 50 CMMD-receive-block(4, stype, &c[offset][0], Bsize) 52 CMMD-send-block(6, mtype, &offset, intsize); 53 CMMD-send-block(6, mtype, &b, NCA*dbsize); - Processor 5 repeatedly receives data from processor 4, calls the subroutine CAL for calculation, and sends the result to processor 6. Assuming that the user is interested in the time spent in communication, we compare the volume of data collected by traditional event trace tools and by our approach. In a traditional event trace tool, monitoring routines are inserted before and after the four communication statements in lines 49, 50, 52, and 53 for collecting the timing information and generating the trace event records. Assume the following format of each event trace record where line is the line number of the event in the source program, type is the event type, source is the process which executes the event, destination is the receiving process identifier of the communication event, and timestamp is the start time of the event execution. Given that the sizes of the five fields are 2, 2, 4, 4, and 8 bytes respectively, each record occupies 20 bytes. The following event records are created in the first iteration of the for loop in line 48. 26 KEI-CHUN LI AND KANG ZHANG (49, 2, 5, 4, 0.308713) (49, 2, 5, 4, 0.308880) (50, 2, 5, 4, 0.308905) (50, 2, 5, 4, 0.484081) (52, 2, 5, 6, 1.423808) (52, 2, 5, 6, 1.424025) (53, 2, 5, 6, 1.424053) (53, 2, 5, 6, 1.583002) Since the loop will be executed for 200 times, 1600 (= 8 \Theta 200) event records will be created. That means that the size of the trace data for storing the timing information of these four communication statements will be 31.25 kbytes (= 1600 \Theta 20=1024). fields size (in bytes) line# 2 self node 4 event type 2 dest node 4 trans time 8 delay 8 trans next dest 2 Table 1: The sizes of the fields in the EVENT and COM records In our approach, four EVENT records are allocated for these four communication statements. Since the destinations of these four communication statements are fixed, only one COM record is allocated in each of the lists pointed to by c p l ptr in each of these EVENT records. Table 1 shows the sizes of the fields in the EVENT and COM records. From the table, we can calculate that each EVENT record occupies 12 bytes (=2+4+2+4) and each COM record occupies 24 bytes (=4+8+8+2+2). The total size of the four EVENT records and four COM records is 144 bytes (= 4 \Theta (12 + 24)). This volume of trace data is significantly less than kbytes generated using the traditional approach. In the traditional event trace tools, the trace data size is increased proportionally to the number of iterations in a loop structure. In our approach, there is no increase in trace data size with increasing number of iterations, so this approach is especially suitable for handling long running programs. On the other hand, the above set of event trace records generated by the traditional event trace tools do not provide the breakdown timing information of the communication, e.g., transmission time and synchronous delay. However, this detailed information can be provided by our approach with a small size of performance data set. 7. Summary Achieving the Four Goals We summarise the above approaches by matching them against our original design goals stated in Section 3. We claim that the four goals have all been achieved to a large extent. As the run-time monitor uses the virtual time instrumentation approach to timestamp and maintain the order of interesting events, it allows the monitor to collect accurate performance data, transfer data for central processing, and perform all the other activities for supporting run-time performance analysis. This achieves the first goal. Since the monitor traces all the events but stores only the statistics of the per- formance, it can obtain sufficient performance information yet require far less data to be stored and thus the amount of trace data is controlled in a manageable size. This achieves the second goal. Stored in a statistical form, the trace data can provide performance information rapidly for run-time monitoring and this achieves the third goal. Combining the information in dynamic records and static tables, the monitor can provide the user with different levels of performance statistics, from the whole program to a single communication statement. It can appropriately direct the user's attention by efficiently measuring the factors that are most responsible for the performance and by relating these metrics to one another and to the structure of the program. With such information, the user can tune the program in a top-down fashion, focusing effort on those areas that have the greatest impact on the performance. This achieves the fourth goal. 8. Conclusion The paper has introduced a monitor for supporting run-time data collection and analysis of parallel program performance with high scalability. It assists the user in the location, identification, and resolution of performance problems in parallel programs. The instrumentation approach preserves the ordering of events without being affected by the speed of monitoring activities, and thus supports run-time performance monitoring. Since the raw performance data in each process is summarised as statistics in the process' dynamic records during the program execution, the monitor requires far less data to be stored and maintained. The performance information can be provided easily and rapidly for run-time monitoring. Further- more, the reduced data volume requires fewer resources and causes less intrusion to the program behaviour. Because the data volume is not proportional to the execution time of the program, the approach can scale well to a growing number of processes and handle long running programs. The lower data volume is manageable for a tool to process and easy for the user to understand. Performance characteristics are referred back to the source code. The monitor provides users with different levels of performance statistics, relating to the entire program, a procedure, a loop block, a procedure call statement or a communication statement. These statistics are organised according the hierarchical structure of 28 KEI-CHUN LI AND KANG ZHANG the program. This approach can appropriately direct the attention of the user by efficiently measuring the factors that are most responsible for the performance and by relating these metrics to one another and to the structure of the program. Therefore, users can tune their programs in a top-down fashion, focusing their effort on the areas that have the greatest impact on the performance. Acknowledgments The authors would like to thank the anonymous referees for their comments which were very useful in improving the paper. --R Quartz: A Tool for Tuning Parallel Program Perfor- mance An Algorithm for Distributed Discrete-event Simulation - the Carrier-Null Message Approach A Case Study in Design and Verification of Distributed Programs Performance Debugging Using Parallel Performance Pred- icates Selective Monitoring Using Performance Metric Pred- icates A User's Guide to PICL - A Portable Instrumented Communication Library gprof: a Call Graph Execution Profiler Dynamic Techniques for Minimizing the Intrusive Effect of Monitoring Actions "Dynamic Program Instrumentation for Scalable Performance Tools," Finding Bottlenecks In Large Scale Parallel Programs Instrumenting Parallel Programs Based on a Virtual Clock Ap- proach Performance Tuning Support for Message-Passing Parallel Programming Inaccuracies in Program Profiles Scalable Performance Analysis: The Pablo Performance Analysis Environment The Logical Clocks Approach to the Visualization of Parallel Programs The MPP Apprentice Performance Tool: Delivering the Performance of the Cray T3D Performance Tuning with AIMS - an Automated Instrumentation and Monitoring System for Multicomputers Visualisation and Modelling of Parallel and Distributed Programs using the AIMS Toolkit Collecting Timing Information While Preserving Events Ordering in Parallel Program Instrumentation --TR
program instrumentation;trace data organisation;performance monitoring
309125
Piecewise-Constant Stabilization.
With the help of topological necessary conditions for continuous stabilization it is shown that, in general, in order to stabilize continuous- and discrete-time systems one has to use time-dependent or discontinuous feedback controls. On the other hand, the criterion of stabilization in the class of piecewise-constant feedbacks is established. In the context of this paper a piecewise-constant feedback is associated with a piecewise-constant function of the form The piecewise-constant feedback synthesis outlined here has several attractive features. First, it can be effectively applied to design feedback stabilizers subjected to control constraints. Second, the designed feedback laws do not cause sliding mode or chattering behavior in the closed loop system; i.e., on a finite interval of time the control in the closed loop system may have only a finite number of jump discontinuities.
Introduction . Stabilization of dynamical systems is one of the basic problems in systems theory. In [9], [10] and [11] it is shown that many nonlinear systems are not stabilizable by any continuous feedback of the form For the purpose of illustration we give a geometrical interpretation of the results presented in [9], [10] and [11]. In particular, one can see from these geometrical illustrations that on a compact simply-connected manifold a nonlinear system can not be globally stabilized at any of its equilibria by a continuous feedback of the form We use this fact as a motivation for our work over the main contribution of this paper, criterion of stabilization by means of piecewise-constant feedbacks that do not cause sliding mode and/or chattering behavior. In other words, on a finite interval of time the control in the closed loop system may have only a finite number of jump discontinuities. This paper is dealing with a dynamical nonlinear system having either the form (1) or (2) (R n denotes n-dimensional Euclidean space) and u 2 U ae R Let pr x denote the projection of R n x \Theta R n It will be shown that (1) (or (2)) is stabilizable at an equilibrium or over a compact set K ae R n if, and only if, one can steer the system from any initial point x 2 K into x with the help of piecewise-constant control inputs and system This paper was written May 16, 1997. y Department of Mathematics, Arizona State University, Tempe, AZ 85287-1804. nikitin@asu.edu and http://lagrange.la.asu.edu (1)(or (2)) satisfies the following condition (of some sort of stability) at neighborhood W of x (open connected set containing x ) there exists another neighborhood V of x ; such that one can move the system (1)(or (2)) from any point in V into x without leaving the neighborhood W: Although, we prove all our results for systems defined on R n ; their reformulation for systems on a smooth manifold is straightforward and does not seem to bring anything new except some changes in phraseology. The use of continuous stationary feedbacks of the form does not allow to solve the problem of stabilization for many nonlinear systems. This fact was understood by many system researchers (see, e.g. [1], [2], [7]). Thus, in order to stabilize a nonlinear system in many practical and theoretical situations one needs to design time-dependent or discontinuous feedbacks instead of continuous feedbacks of the form u(x). The use of time-dependent continuous feedback laws was consid- ered, for instance, in [4], [12] [13], [14] and discontinuous feedback controls have been discussed in, e.g., [9], [10]. The idea of using discontinuous stabilizers instead of continuous is not new and was broadly discussed in the framework of variable structure systems (see, e.g., [5]). The mathematical foundation of variable structure systems was developed in [15]. Necessary conditions of smooth stabilization underline the fact that the use of non-stationary and discontinuous feedback stabilizers is unavoidable in many applications of control theory. The commonly accepted starting point for the discussion on necessary conditions of smooth stabilization is the classical result of [2]. Theorem 1. ( R.W.Brockett [2]) If the system - continuously stabilizable at (bi) all the modes of its linearization - positive real parts are (bii) there exists some neighborhood Q of x 2 R such that for each y 2 Q one can find a control which steers the system from y at to x at (biii) the mapping f(x; u) : R n x \Theta R m every neighborhood of (x ; u ) onto a neighborhood of zero. Theorem 1 was one of the first necessary conditions for smooth stabilizability of nonlinear systems. It played an outstanding role in the development of nonlinear control theory. For example, Theorem 1 was successfully used to establish that many of drift-free nonholonomic nonlinear control systems can not be continuously stabilized. Nevertheless, necessary condition (biii) suffers deficiency of being generic, i.e., (biii) is almost always satisfied. The result obtained in [3] strengthens (biii), but nevertheless it is still generic, and therefore, fulfilled for almost every smooth nonlinear system (1). In [10], [11] the first non-generic topological necessary conditions have been ob- tained. Here we give geometrical illustration of these conditions and generalize them to the class of discrete-time systems having form (2). These necessary conditions imply that on a smooth compact manifold neither any continuous nor discrete-time system is globally stabilized by a continuous feedback of the form prove the criterion of stabilization in the class of piecewise-constant feedbacks and discuss synthesis procedures for this class of feedback control laws. The motivation for studying piecewise-constant feedbacks is threefold. First, a piecewise-constant feedback is meant to be implemented on digital processors and does not require quantization of input-output signals. Second, the control theory ideology and, in particular, piecewise-constant feedback stabilization may serve as a framework for software development projects where a software package is treated as a feedback control. Third, as you can see from the results of this paper, any system, which is stabilized by a continuous feedback can be stabilized by a piecewise-constant feedback. We hope that we have convinced our reader that, in some situations where stabilization of a nonlinear system is concerned, a piecewise-constant feedback could be preferable to continuous one. The structure of the paper is as follows. The first section is introductory. The second section presents geometrical interpretation of the necessary conditions obtained in [11] and generalizes them to the class of discrete-time systems of the form (2). The third section contains the criterion of stabilization in the class of piecewise-constant feedbacks. The fourth section is reserved for conclusion. 2. Topological necessary conditions of continuous stabilization. This section presents topological necessary conditions for continuous stabilization. It also contains geometrical interpretations of the results obtained in [11], as well as, new formulation and proof of these results for discrete-time systems. 2.1. Continuous-time systems. Consider the system: is a complete C 1 vector field on R n for every The set is called the equilibrium set of the control system. A system is said to be continuously stabilizable at K ae R n if there exists a continuous function u(x), such that u(x is an asymptotically stable equilibrium of the closed loop system and the domain of x -attraction contains K; i.e., lim e tf where e tf is the flow generated by the vector field f(x; u(x)). We say that x is stable if for any neighborhood W of x (open connected set containing x ) there is a neighborhood V of x ; such that A system which is continuously stabilizable at to be continuously stabilizable in the large. 2.1.1. Basics of function degree. For the sake of completeness and reader convenience, we briefly recall some facts about the degree of continuous functions. Additional details can be found in [6], [8]. We use the following notation. (i) M is a compact, n - dimensional, oriented C 1 manifold. Its interior is denoted by Int(M ), its boundary by @M: x is also used for local coordinates on M with a fixed orientation. If local coordinates are given, then @ @x f(x) is the Jacobian matrix and det( @ is the Jacobian determinant of f at x: has continuous first order partial derivatives in M: f 2 C(M) if f is a continuous function from M into R (iv) Given a real positive number r and y 2 R (y) is the closed ball center y, radius r : (v) An immersion x \Theta R m homeomorphically into its image i(M) ae R n x \Theta R m u with topology induced by R n x \Theta R m u is called a natural embedding. are used for respectively, where P are the projections: P x (x; Definition 1. Suppose OE 2 C 1 (M); p 62 OE(@M) and p is not a critical value of OE on M;i.e., det( @ @x Define the degree of OE at p relative to M to be d(OE; M; p); where @x OE(x))]: If OE 2 C(M); then the degree of OE can be defined as the degree of a sufficiently good C 1 approximation of OE (for details, see [6], [8]). Definition 2. Suppose that OE 2 C(M) and p 62 OE(@D): Define d(OE; M; p) to be d(/; M; p); where / is any function in C 1 (M) satisfying where ae(x; is not a critical value of / on M: Recall that if X and Y are topological spaces, two continuous functions f and g are said to be homotopic (f - g) if there is a continuous function (homotopy) such that We will need the following properties of degree. Theorem 2. (1) If H(t; x) j h t (x) is a homotopy and p 62 h t (@M) for is independent of t 2 [0; 1]: (2) If a continuous feedback stabilizes the system - (3) Suppose OE 2 C(M): If d(OE; M; p) is defined and non-zero, then there is such that (4) If a continuous feedback stabilizes the system x at where Idn is the identity n \Theta n-matrix. For a proof, see [6], [8]. Lemma 1. Let f : R n x \Theta R m be a smooth function, and let ! be a bounded connected component of f \Gamma1 (0) such that @ @x @ If continuous function such that x \Theta R m x \Theta R m then are the projections: P x (x; This lemma is proved in [10], [11]. 2.1.2. Geometrical illustrations of necessary conditions. We start with the following necessary condition of continuous stabilization. Theorem 3. If f : R n x \Theta R m is a smooth function and f \Gamma1 (0) is bounded, then the system - u) is not continuously stabilizable in the large at any point For a proof of this theorem see [10], [11]. For geometrical illustrations consider a nonlinear single-input system of the form x Fig. 1. If f \Gamma1 (0) is a closed curve, then the graph of a continuous feedback where x \Theta R u Theorem 3 asserts that the system can not be continuously stabilizable. The reason is that the graph of any continuous feedback stabilizing the system has at least two points of intersection with the equilibrium set depicts a geometrical illustration of this fact. Example 1. Consider the system The equilibrium set for this system is defined by The system is locally continuously stabilizable at any point of its equilibrium set with x 2 6= 0 (see [10] for further details). But it is not continuously stabilizable at any compact set containing the entire circle It happens because on a compact set containing the circle the graph of any continuous feedback locally stabilizing the system at (x 2 ) has at least two points of intersection with this circle (Fig.2). As illustrated by Example 1, system (1) is not continuously stabilizable at any point of a connected bounded component of its equilibrium set. This leads us to the following theorem. Theorem 4. Let f : R n x \Theta R m be a smooth function, and let ! be a connected component of f \Gamma1 (0) such that @x Fig. 2. Over a compact set containing the circle (x a graph of a continuous feedback stabilizing the system at has at least two points of intersection with the circle. If the system - smoothly stabilizable in the large at a point then ! is unbounded. The proof of this theorem is given in [10] and [11]. Theorems 3 and 4 give us the topological necessary conditions that are stable under perturbations which are small in fine Whitney topology. Moreover, these conditions remain valid for a system on a compact smooth simply connected manifold, and since on the compact manifold the equilibrium set f \Gamma1 (0) is evidently bounded, we conclude that the system can not be continuously stabilizable over this manifold. Thus a smooth generic system is never globally continuously stabilizable on a compact simply connected manifold. Theorems 3 and 4 may give an impression that the topological barrier for continuous stabilization is provided only by the fact that either the equilibrium set or one of its connected components is bounded. However, stabilization also depends upon the way in which one connected component of the equilibrium set loops around another. Let us consider a single-input nonlinear system. We introduce the normal parameterization of f \Gamma1 (0) as follows. Definition 3. Let i ae R n x \Theta R u be a segment of a connected component of @ @x @ Then a parameterization x \Theta R u of the segment will be called normal if det d- d- We can formulate the following necessary condition of smooth stabilization in the large. Theorem 5. Let - be a smooth single-input system such that @ @x @ segment with the normal parameterization x \Theta R u Then the system is not continuously stabilizable in the large at a point whenever there is a connected component ~ such that one can find points ! such that and The proof of this theorem is given in [10], [11]. If the system - continuously stabilizable at (x ; u ); then without loss of generality [8], we can assume that f(x; u(x)) is differentiable at x and @ where be a segment with the normal parameterization x \Theta R u and - 2 R; x i (- Then it follows from the definition of natural parameterization that there exists a positive real number ff such that d d- d- @x dx d- @ @x f(x; u) @ z Fig. 3. If f \Gamma1 (0) has two connected components knotted as shown, then the graph of a continuous feedback show the normal parameterization of i: @ @x (f(x; u(x))) @ @x since @x Thus and Taking these inequalities into account and using the fact that ~ ! is a connected component of the equilibrium set we conclude that under the conditions of Theorem 5 the graph of the feedback u(x) has at least two points of intersection with the One of these points of intersection is (x ; u ) and another one is on the connected component ~ defined in Theorem 5. A geometrical illustration of this fact is Fig.3. Example 2. Consider the system Fig. 4. Due to the topological structure of the equilibrium set the continuous stabilization at the origin over a set containing the unit disk x 2 impossible. The equilibrium set of this system is defined by It is easy to show that the system is locally stabilizable at the origin by a linear feed-back law. On the other hand, our topological considerations, in particular Theorem 5, show that this system is not continuously stabilizable over any set containing the unit disk centered at the origin (Fig.4). The discussion presented in this subsection shows that many systems are not continuously stabilizable. Hence, it is reasonable and even sometimes necessary to design piecewise-constant stabilizers. 2.2. Discrete-time systems. This subsection shows that many discrete-time systems are not continuously stabilizable. Consider a discrete-time system of the form where u Let pr x denote the projection of R n x \Theta R m denotes the equilibrium set of system (4), x \Theta R m System (4) is said to be continuously stabilizable at over a set K ae R n if there exists a continuous function u(x), such that u(x and x is an asymptotically stable singular point of the closed loop system and the domain of x -attraction contains K; i.e., lim x is the solution of the closed loop system (5) with the initial condition We say that x is stable if for any neighborhood W of x (open connected set containing x ) there is a neighborhood V of x ; such that A system, which is continuously stabilizable at is said to be continuously stabilizable in the large. The analogue of Theorem 3 for discrete-time systems is as follows. Theorem 6. x \Theta R m is a smooth function and (pr x bounded, then the system x u) is not continuously stabilizable in the large at any point (x ; u Proof. If (pr x there is a positive real number that Hence and properties (1), (3) (Theorem 2 ) imply is a continuous function, while whenever is a continuous feedback stabilizing the system in the large. Thus the system can not be continuously stabilized in the large at any point (x ; u hence the theorem is proved. The analogue of Theorem 4 for discrete-time systems is as follows. Theorem 7. Let f : R n x \Theta R m be a smooth function, and let ! be a connected component of (pr x @ @x @ where Idn is the identity matrix with n columns and n rows. If the system x continuously stabilizable in the large at Proof. If is a continuous feedback stabilizing in the large the system u) at a point is bounded, then there is B r (0) such that d Note that x \Theta R m x \Theta R m and Thus making use of Lemma 1, we obtain the contradiction which proves the theorem. Theorems 6 and 7 have the same geometrical sense as Theorems 3 and 4 (Fig.1). In order to formulate the analog of Theorem 5 for discrete-time systems we need to change the definition of natural parameterization. Definition 4. Let i be a segment of a connected component of (pr x and let @ @x @ Then a parameterization x \Theta R u of the segment will be called normal if det d- d- The analogue of Theorem 5 for discrete-time systems is as follows. Theorem 8. Let f(x; u) be such that @x segment with a normal parameterization x \Theta R u Then the system x u) is not smoothly stabilizable in the large at a point there is a connected component ~ (0)ni such that one can find points (~x 2 ; ~ ! such that and The proof and geometrical illustration for this theorem coincide with that of Theorem 5 (Fig.3). After a few technical modifications all topological necessary conditions of continuous stabilization also remain valid for discrete-time systems. Thus, many discrete-time systems are not continuously stabilizable, and therefore, we need to consider either piecewise-continuous or non-stationary stabilizing feedbacks. This fact serves as one of the main motivations for establishing the result presented in the next section. More- over, the approach outlined in the next section can be effectively applied to design feedbacks subjected to state and control constraints. 3. Piecewise constant stabilization criterion. The goal of this section is to give the criterion of piecewise-constant stabilization. The proof of this criterion is constructive and can be used for feedback synthesis. Moreover, it is based on the general topology, and therefore, valid both for discrete- and continuous-time systems. For the sake of brevity, only the criterion for continuous-time systems is presented. Consider the system is a subset in R m : f(x; u) is a complete C 1 vector field on R n for every u 2 U ae R m fixed. PC(U) is the set of all piecewise-constant mappings form R n into U ae R m . A function called piecewise-constant on some set Q if there exists a covering the closure Int V i of the interior Int V i coincides with the restriction uj V i of u to V i is a constant from U: Let u(x) 2 PC(U): Then we define the solution for the initial value problem as follows. Definition 5. A function of time x u (t; x 0 is called a solution for the initial value problem (8), if the following conditions hold: x u (t; x 0 ) is a continuous function of time; the derivative d dt x u (t; x 0 ) exists and d dt x either for all t 2 [0; T ] or for all t 2 [0; T ] excluding a finite number of points. Having fixed the feedback u(x) such that u(x) 2 PC(U) and the solution for exists for all x 0 2 R n we obtain the flow e tf generated by the closed loop system evolving over R n . e tf x 0 denotes the point into which the flow e tf steers x 0 and g. V is called an invariant set of the system, iff e tf Definition 6. A system - is said to be piecewise-constantly stabilizable at a domain K ' R n , if there exists a piecewise-constant feedback from PC(U); such that u(x is an asymptotically stable equilibrium of (8) and K ' D(x ); where D(x ) is the domain of x -attraction, i.e., for every x 0 2 D(x ) the solution e tf x 0 of the closed loop system exists for all t - 0 and lim t!1 e tf x If called piecewise-constantly stabilizable at or in the large). If there exists a neighborhood O(x ) and - piecewise-constantly stabilizable in (x ; u O(x ), then - is said to be locally piecewise-constantly stabilizable at A control said to be piecewise constant, if there exist time points Definition 7. We say that a point p can be piecewise-constantly steered into a point q, if there exist such that the solution x u (t; p) of the initial value problem exists on the time interval [0; T ], is unique and x u q. If for every point such that p is piecewise-constantly steered into q; then the set V is called piecewise-constantly accessible from the set K: The piecewise-constant accessibility has a very important property formulated in the following lemma. Lemma 2. Let K be a compact subset in R be an open subset. Then if V is piecewise constantly accessible from K; then there exist a natural number real number T ? 0 and such that for each point p 2 K there exist a point T , such that denotes the vector field f(x; u Proof. The set is open for all . The piecewise constant accessibility of V from K implies Thus it follows from the compactness of K that there exists a natural number - such that where Therefore we can take and To formulate the main result of this paper we need the following analogue of the Liapunov asymptotic stability. Definition 8. An equilibrium is said to be asymptotically stable if there exists \Delta ? 0 such that for any 0 - \Delta one can find ffi ? 0 such that x is piecewise-constantly accessible from B ffi (x ) without leaving can be 1) and a piecewise-constant control such that the solution x u (t; p) of the initial value problem exists on [0; T lim x x* x* e e Fig. 5. The closed loop system is supposed to move with respect to the sets K; n=0 in accordance with the arrows. Theorem 9. A system - piecewise-constantly stabilizable at its a compact set K if, and only if, asymptotically stable and x is piecewise-constantly accessible from K: Proof. Necessity. If u(x) 2 PC(U) stabilizes - at over K, then (x ; u ) is evidently Liapunov asymptotically stable and x is piecewise constantly accessible from K: Sufficiency. Since asymptotically stable, then there exists a sequence of positive real numbers f" n g 1 n=0 such that lim and for any is accessible from leaving Roughly speaking, the main idea of the proof is to design piecewise constant feedbacks which steer the systems in accordance with the arrows marked in Fig. 5. The point x is piecewise-constantly accessible from K; and therefore, for any constantly accessible from K: Lemma 2 with V being the interior of the ball us the existence of a natural number N; real number T ? 0 and such that for each point p 2 K there exist a point such that denotes the vector field f(x; u Consider the family of open sets generated by Due to Lemma 2 But K is a compact set, and hence, one can choose a finite number of N-tuples j=1 such that The feedback u 0 (x) 2 PC(U) which steers any point of K into the interior of the set can be designed in the following way f and so on until Thus u 0 (x) is defined on the set \Theta ( If then the construction of u 0 (x) is completed. Otherwise, there exists We put Thus we have defined on the set \Theta ( If constructed. Otherwise, there exists j such that j 6= . We can define the feedback on the set \Theta ( in the same way as it has been done on the set \Xi 2 . The existence of a natural number -, such that K Thus the construction of u 0 (x) is completed after a finite number of steps. Let 0 be the domain where u 0 (x) is defined. By construction, if a trajectory of the system closed by u 0 (x) starts at a point of 0 ; then it will reach the set in a finite time. The set therefore, we can employ the method used to construct u 0 (x) for designing which steers any point We denote by 1 the domain where asymptotically stable one can construct a trajectory of the system closed by u 1 (x) starts at a point of 1 ; then it will reach the set in finite time. We proceed in this way and obtain for each the feedback un (x) 2 PC(U) defined on un (x) steers the system from any state in n into Hence, the function u(x) 2 PC(U) which stabilizes - at x over the compact set K can be defined as lim wn where wn (x) is given by wn un (x) for x 2 n wn wn wn The proof is completed. Definitions 6, 7, 8 and Lemma 2 admit natural formulations for discrete-time systems. Moreover, the main ideas in the proof of Theorem 9 are of topological nature and, after minor technical adjustments, they lead us to the following analogue of Theorem 9 for discrete-time systems. Theorem 10. A system x piecewise-constantly stabilizable at its equilibrium a compact set K if, and only if, is Liapunov asymptotically stable and x is piecewise-constantly accessible from K: The proof of Theorem 9 remains valid for much more general objects than discrete-time systems. The method of the proof outlines a general framework which leads to the synthesis of control systems defined over a finite algebra, in particular Boolean algebra. Such systems are very often called algorithms and arise in numerous software engineering problems. In order to demonstrate the use of this framework in software engineering the author developed a simple game "Corners" (Java version of "Corners" is posted at "http://lagrange.la.asu.edu/docs/Corners"). The analysis of algorithms from the point of view of a control theorist is beyond the scope of this paper. Here we only present some examples of the synthesis of piecewise constant stabilizers. Although, in the next example the construction of the piecewise-constant feedback seems completely ad hoc, it contains an effective recipe which, if combined with topological methods developed in [10], leads us to an effective stabilizer synthesis procedure for two-dimensional affine nonlinear systems. Example 3. Consider the linear system where System (10) is continuously stabilizable at the origin by a linear feedback. Hence, by Theorem 9 it is stabilizable by a piecewise constant feedback as well. We look for a piecewise constant feedback stabilizer having the following form. and where '(-) is the function defined as If the real numbers the inequality then the feedback (11) globally stabilizes the system (10) at the origin. Indeed, one can show that the function is monotonically decreasing along the trajectories of the system (10) closed by the feedback (11). Example 3 combined with the topological methods from [10] allows us to construct a piecewise-constant stabilizer for any controllable affine nonlinear system satisfying the following conditions. are continuously differentiable functions where and In this example the system is globally stabilized at the origin by means of a piecewise-constant feedback. We assume that for all x 2 R 2 the functions a(x) and b(x) satisfy the following inequalities It is known [10], that system (13) can be stabilized by a time-dependent continuous feedback. Hence, by Theorem 9 there exists a piecewise-constant stabilizer for (13). Choose positive real numbers ff; fi so that and Then the piecewise-constant feedback with '(-) being defined in (12) and figlobally stabilizes the system at the origin. Indeed, the function is monotonically decreasing along the trajectories of the closed loop system, and therefore, the origin is globally asymptotically stable. Using the topological methods based on, so called, stable covering (see [10]) one can construct piecewise constant stabilizers for a generic nonlinear affine system with an equilibrium set having several connected components. The next example illustrates the use of Theorem 9 in the stabilizability analysis of a nonholonomic system. Example 5. Consider the system It is stated in [2], that system (14) is not continuously stabilizable at the origin. Our goal is to analyze its piecewise-constant stabilizability. Let us show that the origin is Liapunov asymptotically stable. Indeed, for any point 3 the piecewise-constant control r r r r steers system (14) from the point P into the origin. First, this control moves the system from P into (0; 0; x 3 ) along the straight line. Then traces the boundary of the square with the side of length 2 and moves system (14) from (0; 0; x 3 ) into the origin. Thus, the origin is Liapunov asymptotically stable for system (14) and all conditions of Theorem 9 are satisfied. Hence, system (14) is piecewise-constantly stabilizable at the origin over any compact set from R 3 The next example illustrates the use of Theorem 10. Example 6. Consider a discrete time system of the form Let us analyze stabilizability of system (15) at the origin. By Theorem 8 system (15) is not continuously stabilizable at the origin. On the other hand, for any x 1 one can find - u such that sin(x 2 on the next step (15) to the origin. Thus, all conditions of Theorem 10 are satisfied, and therefore, system (15) is piecewise-constantly stabilizable at the origin over any compact set from 4. Conclusion. This paper presents geometrical illustrations of the topological necessary conditions of continuous stabilization obtained in [10], [11]. It follows from these conditions that many systems are not stabilizable by continuous stationary feedbacks. Since in the majority of control applications one needs to implement a control system with the help of digital processors, it is natural to design piecewise-constant stabilizing feedbacks. We have proved the criterion of stabilization in the class of piecewise-constant feedbacks and discussed their synthesis for affine nonlinear two-dimensional systems. It follows from Theorem 9 that any system which is stabilizable by a continuous feedback can be also stabilized by a piecewise-constant feedback of the Moreover, the proof of Theorem 9 leads to the synthesis procedure for stabilizing feedbacks subjected to state and control constraints. The approach proposed in this paper can be applied to deal with a wide variety of control objects that are much more general than those described by differential and/or discrete-time equations. For example, one can use this approach for software development projects. In fact, we tested already the methodology provided by the proof of Theorem 9 and developed a simple computer game (see "http://lagrange.la.asu.edu/docs/ Corners"). In order to use this methodology for computer algorithm synthesis one needs to choose some natural topology and then follow the proof of Theorem 9. In a computer game and/or a program where one needs to minimize some cost function this topology is naturally introduced by this cost function. In general the choice of an appropriate topology raises a number of difficult questions which can serve as topics for further research. 5. Acknowledgement . The author is grateful to Anton Nikitin for his editorial remarks and reading the early version of this manuscript. The author is much obliged to anonymous referees for valuable suggestions. Some ideas presented in this paper have been generated during (or short after) the author's visit to the University of Gent in June, 1996. The author would like to thank Professor D. Aeyels for his kind support of this research and his hospitality. --R Stabilization of a class of nonlinear systems by a smooth feedback control in Differential Geometric Control Theory Necessary Condition for Global asymptotic stabilization for controllable systems without drift Control systems of variable structure Degree Theory Piecewise Smooth Stabilizing Extension "World Scientific Publishing Co Pte Ltd" Topological necessary conditions of smooth stabilization in the large Explicit design of time-varying stabilizing control laws for a class of controllable systems without drift Exponential stabilization of nonholonomic chained systems Control of chained systems application to path following and time-varying point- stabilization of mobile robots Differential equations with discontinuous right-hand sides --TR
discrete-time system;degree of functions;nonlinear system;feedback stabilization
309127
Bifurcation Stabilization with Local Output Feedback.
Local output feedback stabilization with smooth nonlinear controllers is studied for parameterized nonlinear systems for which the linearized system possesses either a simple zero eigenvalue or a pair of imaginary eigenvalues and the bifurcated solution is unstable at the critical value of the parameter. It is assumed that the unstable mode corresponding to the critical eigenvalue of the linearized system is not linearly controllable. Results are established for bifurcation stabilization using output feedback where the critical mode can be either linearly observable or linearly unobservable. The stabilizability conditions are characterized in explicit forms that can be used to synthesize stabilizing controllers. The results obtained in this paper are applied to rotating stall control for axial flow compressors as an application example.
Introduction Stabilization of nonlinear control systems with smooth state feedback control has been studied by a number of people [4, 2, 3, 9, 19]. An interesting situation for nonlinear stabilization is when the linearized system has uncontrollable modes on imaginary axis with the rest of modes stable. This is so called critical cases. for which the linearization theory is inadequate. It becomes more intricate if the underlying nonlinear system involves a real-valued parameter. At critical values of the parameter, linearized system has unstable modes corresponding eigenvalues on imaginary axis, and additional This research was supported in part by grants from AFOSR, ARO, and LEQSF. A preliminary version of this paper is to appear in 1997 American Control Conference. y Department of Electrical and Computer Engineering, Louisiana State University, Baton Rouge, LA 70803-5901. z Control Analysis Section, WL/FIGC, 2210 Eighth Street, Suite 21, WPAFB, OH 45433-7531 equilibrium solutions will be born. The bifurcated solutions may, or may not be stable. The instability of the bifurcated solution may cause "hysteresis loop" in bifurcation diagram for both subcritical pitchfork bifurcation and Hopf bifurcation [11], and induce undesirable physical phenomena. This is manifested by rotating stall in axial flow compressors [1, 17, 18] that has received great attention for the past several years [5, 6, 7, 15, 16, 20]. Thus bifurcation stabilization is an important topic in nonlinear control. Abed and Fu studied bifurcation stabilization using smooth local state feedback control [2, 3]. For Hopf bifurcation, stabilization conditions were obtained for both the case where the critical modes of the linearized system are controllable and uncontrollable. For stationary bifurcation, stabilization conditions were derived for the case where the critical mode of the linearized system is controllable. The uncontrollable case was investigated in [13] where normal forms of the nonlinear system are used. In this paper we study bifurcation stabilization via local output feedback control laws that are smooth. Throughout the paper it is assumed that the critical mode of the linearized system is uncontrollable. Moreover only output measurement is available for feedback. It should be clear that measurement of all state variables is unrealistic in practice, especially when the underlying nonlinear system has a high order. Often some of state variables are more expensive, or more difficult to measure than others. Hence the bifurcation stabilization problem studied in this paper has more engineering significance. Two stabilization issues will be investigated. The first one is concerned with bifurcation stabilization where the critical mode of the linearized system is unobservable through linearized output measurement. Stabilizability conditions are established for both stationary bifurcation and Hopf bifurcation. Roughly speaking, it is shown that nonlinear controllers do not offer any advantage over the linear ones for bifurcation stabilization. Stabilizing controllers, if exist, can be taken as linear ones. The second one is concerned with bifurcation stabilization where the critical mode of the linearized system is observable through linearized output measurement that includes state-feedback as a special case. Stabilizability conditions are also obtained in this case. It is shown that linear controllers are adequate for stabilization of transcritical bifurcation, and quadratic controllers are adequate for stabilization of pitchfork and Hopf bifurcations, respectively. It should be pointed out that the stabilization conditions obtained in this paper are characterized in explicit form that provide synthesis procedures for design of stabilizing controllers, if they exist. Rotating stall control for axial flow compressors will be used as an application example to demonstrate the use of the stabilization results established in this paper. The notations in this paper are standard. The collections of real and complex numbers are denoted by R and C, respectively. If c 2 C, its complex conjugate is denoted by - c. The collection of real and complex vectors with size n are denoted by R n and C n , respectively. A matrix M of size p \Theta m can be viewed as a linear map from C m to C p , and its transpose is denoted by M T . For to be stable, if all its eigenvalues are in the open left half plane. Notions such as linear controllability and linear observability can be found in [13]. Stability and Projection Method This section considers the stability issue for bifurcated system using the projection method developed in [11]. The system under consideration is the following nth order parametrized nonlinear system: where x 2 R n , fl is a real-valued parameter, and ffi ? 0 is a sufficiently small real number. It is assumed that f(\Delta; \Delta) is sufficiently smooth such that the equilibrium solution x e , satisfying f(fl; x e smooth function of fl. Since f(fl; small neighborhood of is a fixed equilibrium point locally which is called zero solution. The linearized system at the zero solution is given by Two different types of bifurcation will be considered in this paper and the determination of their local stability will be discussed in the following two subsections. 2.1 Local Stability for Stationary Bifurcation For stationary bifurcation, it is assumed that L(fl) possesses a simple eigenvalue -(fl), dependent smoothly on fl, satisfying while all other eigenvalues are stable in a neighborhood of It implies that the zero solution changes its stability as fl crosses 0. For instance, - implies that the zero solution is locally stable for fl ? 0 and becomes unstable for additional equilibria x e 6= 0 will be born at are smooth functions of fl by smoothness of f(\Delta; \Delta). Such bifurcated solutions are independent of time t, and called stationary bifurcation. Thus is the critical value of the parameter, and -(fl) is called critical eigenvalue. The nonlinear system (1) at is referred to as critical system. The bifurcated solution of the nonlinear system born at may, or may not be locally stable. For simplicity, only double points [11] will be considered in this paper. It should be clear that stability of the bifurcated solution plays an important role for the dynamics of the nonlinear system, and is hinged to stability of the critical system. A useful tool to determine local stability of the bifurcated solution and of the critical system is the projection method developed in [11] and advocated in [2, 11]. Let ' and r denote the left row and right column eigenvectors of L(0), corresponding to the critical eigenvalue also an equilibrium solution of (1), or bifurcated solution in a small neighborhood of by [11] there exists a series expansion x ek Since f(fl; x) is sufficiently smooth, there exists Taylor expansion near the origin of R n of the form where L(fl)x, Q(fl)[x; x], and C(fl)[x; x; x] are vector valued linear, quadratic, and cubic terms of f(fl; x) respectively having symmetric form in each of their entry, and they can each be expanded into are n \Theta n constant matrices. Let ~ - be the critical eigenvalue for the linearized system matrix at the new (bifurcated) equilibria close to the origin. Then ~ There exists a series expansion [11] ~ The computation of the first two coefficients of ~ - can proceed as follows [11, 2]: is a function of fl. ffl Step 2: Set x and calculate ffl Step 3: Compute x e2 from equations 'x Local stability of the bifurcated solution is given by the following theorem [3]. Theorem 2.1 Suppose that all eigenvalues of L 0 are stable, except one critical eigenvalue. For the case the branch of the bifurcated equilibrium solution is locally stable for fl sufficiently close to For the case the bifurcated solution is locally stable for fl sufficiently close to 0 if ~ ~ It should be clear that local bifurcation for the case fl 1 6= 0 is transcritical [21]. Thus the branch of the bifurcated solution at " ? 0 has the opposite stability property as the one at " ! 0. We are interested in stabilization of transcritical bifurcation for the branch of " ? 0, that has no loss of generality. On the other hand, local bifurcation for the case of the bifurcated solution share the same stability property. 2.2 Local Stability for Hopf Bifurcation For Hopf bifurcation, it is assumed that L(fl) possesses a pair of complex eigenvalues -(fl); - -(fl), dependent smoothly on fl, while all other eigenvalues are stable in a neighborhood of imaginary. It is assumed that Thus -(fl) is a critical eigenvalue, so is its conjugate. It implies that the zero solution changes its stability as fl crosses 0. For instance ff 0 (0) ? 0 implies that the zero solution is locally stable and becomes unstable for fl ? 0. Furthermore Hopf Bifurcation Theorem asserts the existence of a one-parameter family nonconstant periodic solutions of (1) emerging from the zero solution at This is none stationary bifurcation. The positive real number " is a measure of the amplitude of the periodic solution and " 0 is sufficiently small. The periodic solutions period near 2-=! c and occur for parameter values fl given by a smooth function fl("). Exactly one of the characteristic exponents of p " is near zero, and is given by ~ Local stability of Hopf bifurcation is hinged to the first nonzero coefficient of ~ -("), denoted by ~ N - 1. Generically Let the Taylor series of f(fl; x) be of the form in (4) where L An algorithm to compute ~ - 2 is quoted from [2]. See also [10]. right column eigenvector r of L 0 corresponding to the critical eigenvalue of . Normalize by setting ffl Step 2: Solve column vectors - and - from the equations \Gamma1: ffl Step 3: The coefficient ~ - 2 is given by ~ ae oe Theorem 2.2 Suppose all eigenvalues of L 0 are stable in a neighborhood of except the critical pair of complex eigenvalues. Then the Hopf bifurcation is stable, if ~ - 2 ! 0, and unstable if ~ To facilitate the development of our main results for bifurcation stabilization, Theorems 2.1 and 2.2 will be employed to serve for the definition of bifurcation stability throughout the rest of the paper, although they differ from the conventional notion. 3 Output Feedback Stabilization for Stationary Bifurcation We consider first feedback stabilization for stationary bifurcation. The nonlinear control system in consideration has the form where f(fl; x) is the same as in (4), and g(\Delta; \Delta) and h(\Delta) are also smooth functions satisfying It is assumed that u 2 R, and y 2 R p with p - 1. Thus the nonlinear system (7) has only one control input, but may have more than one output measurement. Its Taylor series expansion is given by by assumptions in (8) where ~ are the linear and quadratic terms for the linear control component of g(x; u), ~ is the linear term for the quadratic control component and ~ L[x; x] is the quadratic term for the linear control component of of g(x; u), and are the coefficient vectors of u, u 2 , and u 3 , respectively. It is assumed that L 0 has only one zero eigenvalue with rest of the eigenvalues stable, and that the bifurcated solution born at locally stable. The assumption on stability of the nonzero eigenvalues of L 0 has no loss of generality. If some of the nonzero eigenvalues of L 0 are unstable, then linear control method, such as pole placement [12], can be employed to stabilize those unstable modes corresponding to nonzero eigenvalues. It is the unstable mode corresponding to the critical eigenvalue renders linear control methods inadequate because of bifurcation. We seek a local output feedback control law of the form that stabilizes the bifurcated solution, where K 2 [\Delta; \Delta]; K 3 [\Delta; \Delta; \Delta] are the quadratic, and cubic terms of K(y) respectively, satisfying K 2 [0; The output has a Taylor series expansion are the linear, quadratic and cubic terms of h(x) respectively, satisfying loss of generality, it is assumed that the quadratic and cubic terms of the feedback control law in (10) are of the form ~ ~ ~ ~ with K 2 and K 3 some constant matrices, and ~ Abed and Fu studied the same problem in [3] for the case of state feedback where the critical mode of the linearized system at We will consider the case of output feedback where the critical mode of L 0 is linearly uncontrollable. It should be clear that in practice, measurement of all state variables is unrealistic. Moreover some of the state variables are more expensive and more difficult to measure than others. Often only partial, or a nonlinear function of state variables are measurable. Under this circumstance, the critical mode of the linearized system may, or may not be observable based on linearized output measurements. Hence the problem considered in this paper has more engineering significance than that of [3]. Because y our results are also applicable to state feedback by taking H We will establish stabilizability conditions for bifurcated systems where the bifurcated solution is unstable near in the following two subsections. 3.1 Unobservable Critical Mode We consider first when the critical mode of the linearized system corresponding to the zero eigenvalue at is not observable through linearized output measurement y Note that by assumption the eigenvalue is invariant under feedback control because of both uncontrollability and unobservability of the critical mode. Thus L also possesses the critical zero eigenvalue as L 0 . Denote ' and r the left row and right column eigenvectors for L 0 corresponding to the critical eigenvalue. Then it is easy to see that ' due to again the uncontrollability and unobservability of the critical eigenvalue. This can be seen from PBH test [12]. Denote ~ - as the critical eigenvalue of the linearized feedback system at the bifurcated solution to be stabilized. It is a function of in the form of local feedback controller in (10) does not change the zero solution. Denote L (fl) as linearized system matrix for the closed-loop system at the zero solution. Its critical eigenvalue is denoted by - (fl). Since L d- is also invariant under feedback control. It follows that the bifurcated solution x of the closed-loop system changes its stability and bifurcates at well. The problem is whether or not the bifurcated solution can be stabilized with output feedback control. The next result is negative for the transcritical bifurcation. Theorem 3.1 Consider the nonlinear control system in (9) with output feedback control law in (10). Suppose that the critical mode of L 0 is not linearly observable. Then for the case ~ - 1 ? 0, there does not exist a feedback control law that stabilizes the branch of the bifurcated solution at " ? 0, and ~ is invariant under output feedback control in (10). Proof: With smooth feedback controller in (10), the closed-loop system has the form where the linear, quadratic, and cubic terms are given by ~ ~ ~ ~ ~ ~ ~ The uncontrollability and unobservability of the critical mode for the linearized system at imply that both 'B test [12]. Hence applying Theorem 2.1 to the nonlinear system in (14) gives the first coefficient of the critical eigenvalue for the branch of the bifurcated solution at ~ by again 'B imply 'Q It follows that the sign of ~ - 1 is the same as ~ - 1 that can not be altered by feedback controller in (10). Although the stability property of transcritical bifurcation can not be altered by output feedback, the situation for pitchfork bifurcation is quite different. We have the following result. Theorem 3.2 Consider the nonlinear control system in (9) with output feedback control law in (10) under the same hypothesis as in Theorem 3.1. For simplicity, assume in addition that ~ Then for the case there exists a smooth feedback control law K(y) as in (10) that ensures ~ stabilizes the bifurcated solutions, if and only if there exists a linear feedback control law that stabilizes the bifurcated solution. Moreover there exists a nonsingular matrix T 2 R n\Thetan such that where as the identity matrix of size (n \Gamma 1) \Theta (n \Gamma 1), and I Then the existence of the stabilizing feedback control law is equivalent to that and that L 00 +B 11 K 1 H 11 is stable for some K 1 Proof: Let x e2 and x e2 be the unique solutions for By the proof of Theorem 3.1, and the condition 'B ~ ~ The formula governing the vector x e2 as in (18) can be readily verified by noting that Q due to ~ Applying Theorem 2.1 again yields that ~ ~ ~ ~ It follows that the bifurcated solution is stabilized, if and only if there exists K 1 6= 0 such that ~ holds, and the nonzero eigenvalues of L lie in the open left half plane. It remains to show that stabilizability of the bifurcated solution is equivalent to the existence of K 1 6= 0 such that (17) holds, plus stability of L 00 +B 11 K 1 H 11 . From (18), the following equations are obtained. Thus the solutions x e2 and x e2 solved from (18) satisfy The expression for ~ - 2 can now be written as where ae is the same as in (16). Since the critical mode of the linearized system is uncontrollable and unobservable, there exists a nonsingular matrix T 2 R n\Thetan such that (15) is true by Kalman decomposition. Denoting L the last two equations of (18) yield that implies that the last element of the column vector e2 is zero. Denote I I where I n\Gamma1 is an identity matrix of size (n \Gamma 1) \Theta (n \Gamma 1). Then x e2 is determined by ff and T as ff Applying (15) and (20) to the expression in (19) gives by (20). Denote - Using the identity whenever the products AB and BA are square matrices and make sense, and the following sequence of equalities is true: I ~ ~ I ~ Similarly there holds Thus the expression of ~ - 2 in (21) can now be written as ~ Hence stabilization of pitchfork bifurcation is equivalent to the existence of K 1 6= 0 such that L 00 stable, and ~ ~ because stability of L 00 , and L 00 +B 11 K 1 H 11 ensures that det(L 00 ) and det(L 00 +B 11 K 1 H 11 ) have the same sign. This concludes the proof. Theorem 3.2 is surprising as it indicates that even though the critical mode of the linearized system is neither controllable, nor observable, there exists an output feedback control law that stabilizes pitchfork bifurcation under some mild conditions. This is in sharp contrast to the linear control theory. Moreover, nonlinear feedback control law does not offer any advantage over the linear ones as far as stabilization of stationary bifurcation is concerned. This is due to the fact that linear feedback control, though has no influence on stability of the linear term, changes quadratic terms of the state-space equation that in turn determines the stability property of the pitchfork bifurcation. It is worth to point out that the condition (17) in Theorem 3.2 is characterized in explicit form. It simplifies greatly the synthesis part for bifurcation stabilization. Indeed, all K 1 satisfying (17) can be easily parameterized, and then be substituted into L to determine the right K 1 that ensures stability of L 00 . To be specific for is a semi-infinite interval of the real line. Thus the stabilizing value of K 1 can be easily determined through root locus of where K 1 changes in the semi-infinite interval determined by inequality (17). If p ? 1, then all stabilizing lie on one side of a hyper-plane in R p that does not pass through the origin, as K stabilizing. In this case one needs search for the right K 1 on the given side of the hyper-plane in R p to ensures the stability of L parameterized root locus method can be used for (22). The assumption ~ Theorem 3.2 is not very restrictive if the critical mode of the linearized system is not observable through linearized output measurement. For instance it holds for the case where output measurement consists of linear combination of state-variables. In the case ~ the quadratic gain K 2 plays a role as well for stabilization of pitchfork bifurcation that will be illuminated further in the next subsection. 3.2 Observable Critical Mode Suppose that the stabilizability condition in Theorem 3.2 does not hold. Then bifurcation stabilization with smooth controllers is not possible. In this case we have to consider the case where the critical mode is linearly observable based on output measurement. Extra sensor or sensors have to be deployed so that H 1 r 6= 0 is valid. Clearly the nonlinear differential equation (14) holds with output feedback controller in (10) for the case H 1 r 6= 0 where the linear, quadratic, and cubic terms, have the same expressions as in the proof of Theorem 3.1. Consider first transcritical bifurcation. Without loss of generality, the branch of " ? 0 is assumed to be unstable for fl ? 0. This is equivalent to ~ Our goal is to seek a controller of the form that stabilizes the bifurcated solution for changing the stability property of the zero solution. It is noted that by assumption the eigenvalue is invariant under feedback control. Thus L also possesses the critical zero eigenvalue as L 0 . Denote ' and r the left row and right column eigenvectors for L 0 corresponding to the critical eigenvalue. Then ' due to the uncontrollability of the critical eigenvalue. Denote ~ - as the critical eigenvalue of L under feedback. It has the same form of the series expansion as in (13). However r 6= r in general due to H 1 r 6= 0 by the observability of the critical mode. The next result concerns with stabilization for transcritical bifurcation. Theorem 3.3 Consider the nonlinear control system as in (9) with output feedback control law in (10). Suppose that the critical mode of the linearized system corresponding to the zero eigenvalue at observable. Then for the case ~ there exists a nonlinear feedback control law that stabilizes the given branch of the bifurcated solution at " ? 0, if and only if there exists a linear feedback control law that stabilizes the given branch of the bifurcated solution at " ? 0. Moreover there exists a nonsingular matrix T 2 R n\Thetan such that where have the same sizes as in Theorem 3.2, respectively. Let ' i be the ith element of ', and r T Q 0k r be the kth element of Q Partition The existence of stabilizing feedback control law, subject to the same stability property for the zero solution, is equivalent to the existence of K 1 6= 0 such that ~ ? 0; and where d ~ d ~ scalar, d I is the critical eigenvalue in (3). Proof: From the proofs of Theorem 3.1, and of Theorem 2.1, the first non-zero coefficient of the critical eigenvalue for the feedback system has the expression ~ due to 'B by the uncontrollability of the critical mode and the condition of the theorem. Because only linear gain K 1 is present in the expression of ~ 1 , the existence of stabilizing control law is equivalent to the existence of linear stabilizing control law. It remains to show that conditions (i) - (iii) are equivalent to the existence of the stabilizing feedback control law with the same stability property for the zero solution retained. By Kalman decomposition a nonsingular matrix T exists such that (23) holds where the lower triangular Schur form of used. The hypothesis on L 0 implies that yields the form of 'T \Gamma1 as in (23). Since 'r the right eigenvector of L 0 corresponding to the zero eigenvalue is found to be r By noticing that the expression for can be simplified as It is claimed that the condition (ii) is equivalent to the invariance of the stability property for the zero solution, provided that L stable. Indeed, denote - as the critical eigenvalue of the linearized system under feedback control law d- I n\Gamma1# by the fact that if K reduces to -(fl). Substituting the expression of j as in (25) yields that It follows that (ii) is equivalent to that 'L 1 r has the same sign as - 0 (0) due to stability assumption for L 00 and L 00 , that is in turn equivalent to that the zero solution for the feedback system changes its stability also at shares the same stability property as that of uncontrolled system. Thus the stability property of the zero solution is retained. Similarly, ~ ~ ~ ~ d ~ with ~ Combining with the expression in (26), there holds ~ ~ For the term 'Q 0 [r ; r ], there holds for some real symmetric matrix Q ' . To show that Q setting leads to ~ because the last element of T r is one, by ('T Therefore, Combining (26)-(28) with rearrangement yields the expression a that can be simplified to (i). The necessity of the conditions (i)-(iii) are now clear. For the sufficiency, (iii) implies that L Hence Condition (i) then implies that ~ ensures stability of the given branch of the bifurcated solution, while condition (ii) guarantees the invariance of the stability property of the zero solution under feedback. It is noticed that if then (i) of Theorem 3.6 can be further simplified to as by the fact that condition (iii) and stability of L 00 imply that Theorem 3.6 indicates that nonlinear control does not offer any advantage over linear control for stabilization of transcritical bifurcation either. More importantly the conditions (i)-(iii) also provide explicit formulas for synthesis of stabilizing linear gain K 1 . Indeed, for the case of The set of K 1 satisfying each of (i)-(iii) can be easily computed that are either finite intervals, or semi-infinite intervals. In particular, the set of K 1 satisfying (iii) can be obtained through root locus. For the case p ? 1, the conditions (i)-(iii) offer more freedoms for the synthesis of stabilizing linear gain But on the other hand, the synthesis becomes more complex due to more than one element for K 1 . Remark 3.4 Suppose that the linearized system has been transformed into the form of (23). Then the last entry of the state vector is the critical state variable. Measurement of this critical state variable corresponds to H 12 6= 0. Theorem 3.6 indicates that the feedback of the critical state variable is crucial. This is due to the fact that if H the sign of ~ 1 remains the same as that of ~ - 1 , and thus the given branch of the bifurcated solution at " ? 0 is not stabilizable that is exactly the result of Theorem 3.1. However this fact does not imply that the measurement of non-critical state-variables is unnecessary that corresponds to H 11 6= 0. By condition (i) of Theorem 3.3, the measurement of non-critical state variables becomes necessary, if a then the measurement of non-critical state variables are redundant, and thus unnecessary for the purpose of bifurcation stabilization. Theorem 3.3 has its implications to state feedback control: with the linear state feedback gain, and K 2 [\Delta; \Delta]; K 3 [\Delta; \Delta; \Delta] the quaratic and cubic terms respectively. The next result is a direct consequence of Theorem 3.3. Corollary 3.5 Suppose that all the hypotheses in Theorem 3.3 hold. Then there exists nonlinear state feedback control law that stabilizes the given branch of the bifurcated solution, if and only if there exists a linear state feedback control law that stabilizes the given branch of the bifurcated solution. Moreover with the same notation as in Theorem 3.3, the existence of stabilizing state feedback control law, subject to the same stability property for the zero solution, is equivalent to the existence of K ? 0; and Proof: The theorem can be easily proven by setting K 1 noting that with T the similarity transform, in the proof of Theorem 3.3. For pitchfork bifurcation, i.e., ~ the situation is again different. We adopt an approach as in [3] by setting the linear term of the controller to zero. In fact, by the proof of Theorems 3.1 and 3.3, the nonzero gain K 1 will result in ~ - thereby changing the pitchfork bifurcation into transcritical bifurcation for which only one branch of the bifurcated solution can be stable. Hence this is not a desirable situation unless for some exceptional situations. It is noted that with K the eigenvectors of L 0 corresponding to the critical eigenvalue at Hence both row and column eigenvectors of the critical eigenvalue are invariant under feedback control. Since L there holds ' L (0). Thus the zero solution of the feedback system changes its stability at well. The stabilizability of the bifurcated solution is given by the following result. Theorem 3.6 Consider the nonlinear control system in (9) with output feedback control law in (10) under the same hypothesis as in Theorem 3.3. Then for the case there exists a feedback control law subject to K that ensures ~ changes the pitchfork bifurcation from subcritical into supercritical, if and only if Note that the expression of ae is the same as in (16). Proof: By the proof of Theorem 3.2 and 'B there holds ~ ~ ~ Setting yields that ~ - ~ e2 can be solved from ~ Combined with 'x x Substituting the above into the expression of ~ ~ ~ ~ ~ ~ there exists K 2 6= 0 such that ~ Conversely, stability of the bifurcated solution implies that ~ ~ that in turn implies that ae 6= 0, and ~ by the hypothesis that ~ It is noted that terms of higher order than two do not have effect on stability. Thus the stabilizing controllers can be taken as quadratic ones. Moreover if the output measurements consist of linear combination of state-variables, then the observability condition implies that ~ In this case, stabilizability for pitchfork bifurcation is equivalent to ae 6= 0. For bifurcation stabilization using state feedback in the case of pitchfork bifurcation, the stabilizability condition is again equivalent to ae 6= 0, because state feedback is a special case of output feedback satisfying observability. 4 Output Feedback Stabilization for Hopf Bifurcation It is assumed that the linearized system matrix L(fl) as in (2) has a pair of complex (critical) eigen-values other eigenvalues are stable. As explained in the previous section, this assumption has no loss of generality. The problem to be investigated in this section is stabilization of Hopf bifurcation with output feedback control, if the Hopf bifurcation born at for the nonlinear system in (1) is unstable. We consider first the case when the pair of critical modes corresponding to the pair of complex eigenvalues -(fl) are neither controllable, nor observable. According to PBH test [12], both left and right eigenvectors corresponding to the pair of critical eigenvalues satisfy It follows that when the feedback controller (10) is employed, L retains the pair of the critical eigenvalues \Sigmaj ! c at as the left and right eigenvectors of L corresponding to the pair of critical eigenvalues, respectively. Then there hold ' thus Hopf bifurcation is again born at which the zero solution changes its stability as fl crosses [11]. The next result gives the condition on stabilizability of Hopf bifurcation. Theorem 4.1 Consider the nonlinear control system in (9) with output feedback control law in (10). Suppose that ~ - 2 ? 0 with ~ -(") as in (6), and the critical modes of L 0 is neither controllable, nor observable in the sense that 'B simplicity, assume in addition that ~ 0 be as in the proof of Theorem 3.1. Let - and - be as in Section 2.2, and define - and - by \GammaL where L . Then there exists a feedback control law that stabilizes Hopf bifur- cation, if and only if there exists a linear feedback control law stabilizes Hopf bifurcation. Moreover the existence of stabilizing feedback control law is equivalent to that and the none critical eigenvalues of L 0 lie on open left half plane for some K 1 Proof: Denote ~ - (") as the function in (6) for controlled system, and ~ - 2 as the first coefficient of ~ - ("). From the proof of Theorem 3.1, by using 'B there hold The above equalities imply that Although Q due to the feedback term. In fact, The coefficient ~ - 2 can now be computed as ~ jo By - ~ where ' and OE are as in (30). For any square nonsingular matrices M , and M +NF , whenever FM \Gamma1 N is a scalar. The expression for ~ - 2 as in (29) can now be verified. Hence stabilization of Hopf bifurcation with nonlinear controllers in (10) is equivalent to the existence of K 1 6= 0 such that ~ and the rest of eigenvalues of L remain in open left half plane. The result in Theorem 4.1 is similar to stabilizability of pitchfork bifurcation in Theorem 3.2 where nonlinear controllers do not offer any advantage over linear ones in terms of bifurcation stabilization. Hence if the pair of critical modes of the linearized system are uncontrollable and unobservable, linear controllers are adequate for bifurcation stabilization. Moreover a necessary condition for stabilizability of Hopf bifurcation as in Theorem 4.1 is that denotes the Euclidean norm in R p . If the above holds, all K 1 such that ~ - can be easily parameterized, especially for scalar K 1 that is a collection of limited number of finite intervals, or semi-infinite intervals, while stability of the non-critical eigenvalues of L 0 can be tested using root locus of (22) as argued in the previous section. In the rest of the section, we study the case when stabilizability condition in Theorem 4.1 is not additional sensors have to deployed such that H 1 r 6= 0 is valid in order for Hopf bifurcation to be stabilizable. Although linear controllers can be investigated, it is much easier to consider the class of nonlinear controllers in (10) with K discussed in [2]. The next result generalizes the result in [2] to output feedback stabilization. Theorem 4.2 Consider the nonlinear control system in (9) with output feedback control law in (10) subject to K as in (6), - as in Subsection 2.2, and the critical modes of L 0 is observable through linearized output measurement y x. Then there exists a feedback control law that stabilizes the Hopf bifurcation, if and only if Re ~ jo 0: (32) If the above condition holds, stabilizing controllers can be taken as quadratic ones. Proof: With K critical eigenvalues and left/right eigenvectors are invariant under feed- back. Moreover ~ ~ by It follows that ~ ~ ~ By the property of the quadratic term, ~ ~ After lengthy calculation, we finally obtain ~ jo Because ~ bifurcation of uncontrolled system is unstable. Hence stabilization requires ~ - to hold that implies the condition in (32). Conversely, if (32) holds, then there exists K 2 such that ~ ensures stability of Hopf bifurcation for the feedback system. Since only quadratic term of the nonlinear controller is involved in determination of ~ - 2 , the stabilizing controller can be taken as quadratic one. It is worth to point out that the condition (32) in Theorem 4.2 reduces to that of [2] if ~ ~ r] is a nonzero real number, that was derived for state feedback control laws. 5 Applications to Rotating Stall Control Rotating stall is primarily flow instability in axial flow compressors of gas turbines, induced by nonlinear bifurcations. It can not only lead to large penalties in performance, but also cause catastrophe. Hence there is a growing interest in suppression of rotating stall using feedback control in order to extend the stable operating range, and to improve turbine-based aeroengines for axial flow compressors. A number of control laws are proposed in [8, 14, 16, 20] for rotating stall control, and shown to be effective based on low order Moore-Greitzer model [18]. In this section established results on stationary bifurcation in Section 3 will be applied to Moore-Greitzer model that yield identical results as in [8, 14, 16, 20], thereby validating our results on bifurcation stabilization. Clearly our results are more general, and apply to more broad bifurcation instability problems, other than rotating stall. The post-stall model developed by Moore and Greitzer is of the form where \Phi is the average flow rate, \Psi the pressure rise, R the amplitude square of the disturbance flow (R and u the actuating signal implemented with throttle, that are all non-dimensionalized. An obvious equilibrium It can be easily shown that there exists such that the above equilibrium is stable for unstable for with Thus the equilibrium as in (36) is the local zero solution for both \Psi e and \Phi e are functions of fl. Moreover the linearized system at the origin possesses exactly one zero eigenvalue at that implies that fl c is the critical value. The equilibrium in (36) at the critical value of fl is determined as See [16, 14, 20]. Clearly the nonlinear system (37) can be expanded in the same form as (9) with c ~ c . Thus the critical mode of the linearized system is uncontrollable. By the assumption in [16, 14, 20], oe ? 0, and fi ? 0. For the uncontrolled system, 0: Therefore it is transcritical bifurcation, and bifurcated solution for R e ? 0 is unstable. Corollary 3.5 is now applied to compute linear state feedback gain K 1 that stabilizes the bifurcated solution at Recall that R is the amplitude square of the disturbance flow. Thus R e ! 0 has no physical meaning. Let T be the required similarity transform as in (23). Then Straightforward computation gives 23that yield a = \Gamma2 of Corollary 3.5 are equivalent to Note that (iii) implies that (ii) is true, and (i) is reduced used. After simplification, the stabilizing state feedback gain satisfies c that are exactly the same as in [14]. Taking that is the same condition obtained in [8]. Taking k that implies that 0:5 as in [16, 20] is stabilizing too. It should be pointed out that the results of [16, 20] can also be obtained from Theorem 3.6 directly that is skipped. A more interesting case is that condition (44) can be obtained using Theorem 3.2 as well. Indeed, set with A the amplitude of disturbance flow. Then (35) can be written as Together with (33), and (34), Moore-Greitzer model has a new coordinates (\Psi; \Phi; A), and rotating stall corresponds to subcritical pitchfork bifurcation that is unstable due to ~ and the output measurement be given by Then it is easy to see that the critical mode of the linearized system at neither controllable, nor observable in light of that are of the same form as (15) with I. By Theorem 3.2, linear controllers suffice for stabilization that has the form Direct computation gives "\Gamma2 6oe oe Hence the stabilizing conditions in Theorem 3.2 are equivalent to c that are exactly the same as in (44) as 6 Conclusion This paper investigated bifurcation stabilization using smooth local output feedback controllers for parameterized nonlinear systems where the critical mode of the linearized system is uncontrollable. Stabilizability conditions were established for both the case where the critical mode is linearly unob- servable, and observable through output measurement. The later case includes state feedback as a special case. It was shown that nonlinear controllers do not offer any advantage over the linear ones for bifurcation stabilization if the critical mode of the linearized system is unobservable. For the case that the critical mode of the linearized system is observable, it was shown that linear controllers are adequate for stabilization of transcritical bifurcation, and quadratic controllers are adequate for stabilization of pitchfork and Hopf bifurcations, respectively. Stabilization conditions for nonlinear bifurcations with single critical parameter were characterized in explicit form that can be used to synthesize stabilizing controllers, if they exist. The applicability of the bifurcation stabilization results was demonstrated for rotating stall control of axial flow compressors. --R "Bifurcation analysis of nonuniform flow patterns in axial-flow gas compressors," "Local feedback stabilization and bifurcation control, I. Hopf bifurcation," "Local feedback stabilization and bifurcation control, II. stationary bifurcation," "Stabilization of a class of nonlinear systems by a smooth feedback control," "A simplified approach for control of rotating stall - Part 1/2," "Nonlinear control design for systems with bifurcations with applications to stabilization and control of compressors," "Control of rotating stall in a low-speed axial flow compressor using pulsed air injection: Modeling, simulations, and experimental validation," "Rotating stall control via bifurcation stabilization," "Asymptotic stability and feedback stabilization," "Nonlinear bifurcations," Elementary Stability and Bifurcation Theory Linear Systems "Bifurcation control via state feedback for single input nonlinear systems: Part I and Part II" "The feedbacks which soften the primary bifurcation of MG3" "Backstepping designs for jet engine stall and surge control," "Active control of compressor stall inception: A bifurcation-theoretical approach," "Bifurcation analysis of axial flow compressor stability," "A theory of post-stall transients in axial compressors: Part I - development of the equations," "Subanalytic sets and feedback control," "Nonlinear analysis and control of rotating stall in axial flow compressors," Introduction to Applied Nonlinear Dynamical Systems and Chaos --TR
bifurcations;linear controllability observability;bifurcation stabilization;projection method;nonlinear systems
309133
Locating Corruptions in a Replicated File in a Distributed Environment.
When a data file is replicated at more than one site, it is of interest to detect corruption by comparing the multiple copies. In order to reduce the amount of messaging for large files, techniques based on page signatures and combined signatures have been explored. However, for 3 or more sites, the known methods assume that the number of corrupted page copies is at most M/2 1, where M is the number of sites. This is a pessimistic assumption which is unrealistic. In this paper, this assumption is replaced by another assumption which is shown to be reasonable. Based on this assumption, and based on a finer model of the system, three distributed algorithms are derived, which can either improve the performance or provide more tolerance to corruptions compared to previous methods. As in some previous work, the amount of signature transmission in the algorithms varies according to the number and patterns of page copy corruptions that actually occur, and two of the algorithms achieve the optimal amount of signature transmission when no failure occurs.
Introduction When a data file is replicated at one or more sites in a distributed computer net- work, it is of interest to discover corruptions in the file copies by making comparison among the multiple physical copies of the file. Since a data file is typically large, it is inefficient to transmit the entire file to a remote site for comparison. The methods using combined signatures tackle this problem as follows. Since each page in a file may be large, a more concise representation, called a page signature is computed based on the information stored in each page. The size of a page signature is typically much smaller than the size of the page, though some information may be lost in the compression. From the page signatures, combined signatures are computed and transmitted among sites. The corruptions are detected by performing some computations on the set of combined signatures. Each combined signature is derived from the entire set of page signatures, and typically the number of combined signatures needed for corruption detection is smaller than the total number of page signatures. Hence this method uses less signature transmission compared to methods using only page signatures. Previous work caters for the worst case scenario in which the page signatures for corrupted copies can be identical. Due to this consideration, the number of corrupted page copies is assumed to be at most dM=2e\Gamma1, where M is the number of sites. It is noted that when the number of pages is large, which is a basic assumption motivating the method of combined signatures, this assumption is unrealistic. In this paper, it is argued that the chance of 2 page copies being corrupted and having identical page signatures is small and comparable to the tolerable probability of two differing pages having the same page signature. Thus here it is assumed that 2 corrupted page copies do not have the same signature. With the new assumption, and with a finer model of the system, 3 distributed algorithms are derived that either need to transmit a smaller number of signatures or have greater tolerance of corruption. Two of the algorithms are shown to achieve the minimal number of signature transmission when no failure occurs. One of the algorithms (Algorithm GF SIG A) has been presented in [6]. The paper is organized as follows: Section 2 describes the problem and previous work. Section 3 is a description of some properties of the combined signatures that will be useful for the algorithms that follow. Section 4 presents the distributed algorithms. Section 5 is a performance analysis and comparison with previous work. Section 6 gives a lower bound of the problem in non-faulty case and optimality of the algorithms with respect to this. Section 7 relaxes some restrictions. Concluding remarks are given in Section 8. 2. Problem Definition Consider the case where a file is replicated among a set of M sites g. Assume that the file contains N pages, fP 1 ; :::; PN g, and the copy of page P i at site s j is P i;j . Some previous work has assumed centralized control so that communication is always between a coordinator and the other sites. In this paper decentralized control is assumed so that any site can communicate with any other site. LOCATING CORRUPTIONS IN A REPLICATED FILE 3 When there is no failure, the copies of each page are identical. When there is one or more site failures, some page copies may become corrupted. As in most previous papers, it is assumed that the total number of corrupted page copies will not exceed f . Furthermore, it is assumed that each site contains at most h corrupted page copies, and at most g sites have corruption. If these values are not known, then h is set to minfN; fg, and g is set to a greatest possible value. The file size is assumed large, hence it is not cost-effective if the entire file copies are transmitted among the sites. A known approach is to compute a page signature for each page copy, and transmit and compare the signatures instead. The page signature is typically much smaller than the page. For example [8] proposed to use a parity structure for the page signatures. Two pages with different page signatures are definitely not identical, but two pages that are different may happen to be translated into the same page signature. However the chance of this happening can be made small by making the signature size large. By exchanging the page signatures among the sites, it is possible to discover corruption. The number of page signatures may still be large. To further reduce the amount of messages that need to be sent around, each site could compute a number of combined signatures from the page signatures. For example, the combined signature can be a bit-wise exclusive OR of a number of page signatures. Hence the number of combined signatures will be smaller than the number of page signatures. By exchanging the combined signatures the corrupted pages are determined. Another way to compute the combined signatures is based on an error-correcting code over some finite field and is introduced in [9, 11]. In particular, a method using Reed-Solomon codes [5] has been suggested in [11] for problems with only 2 sites. [1] extended the method of Reed-Solomon codes and solves the problem for M replicated sites, where M - 3. Table 1 summarizes the characteristics of a number of previous work for this problem. In Table 1, N is the number of pages in the file, a1 is the assumption that an uncorrupted copy resides in a known site, and a2 is the assumption that N is a power of 2. Algorithm # copies failures (centralized) Table 1: results of previous work The following are notations used in this paper N number of pages in the file, M number of sites, M - 3 b number of bits in each page signature of the file P i;j copy of page P i at site s j page signature of page copy P i;j sig j;m a combined signature for site s m where j is an integer ff a primitive element in the finite field GF used to find a combined signature f maximum number of corrupted page copies in all sites at file comparison maximum number of sites that contain corrupted page copies at file comparison h maximum number of corrupted page copies at a site at file comparison Table Notations Although [1] solves a more general problem for M copies of the file, it makes the following assumption. Assumption Z: M - 2f + 1. LOCATING CORRUPTIONS IN A REPLICATED FILE 5 Assumption Z is made for the worst case consideration: Consideration Z: the page signatures for corrupted copies of a page can be identical. The condition in consideration Z implies one of the following cases: 1. two or more copies of the same page happen to be corrupted with identical error pattern, or 2. two or more copies of the same page are corrupted with different error patterns, but their page signatures turn out to be the same. Note that the use of the method of page signatures comes with the tolerance of a problem related to the second case, in that a page copy may be corrupted so that its content is different from a correct copy, but the page signature generated for it happens to be identical to that of a correct copy, in which case, the method fails to identify the corruption. If corrupted copies of a page can be identical, then it must be the case that in order to identify a correct version. This is because if M ! 2f and a majority number of sites has failed at the same page, then a majority of the page signatures (the corrupted ones) of this page can be identical and there is no way to tell whether the corresponding copies are corrupted. Consider some realistic figures for M and N . Suppose f is at most 2, that is, Assumption Z says that at most 2 page copies can be corrupted. As there are in total 10,000 page copies, and memory corruption may occur in burst modes, one sees that this may not be a reasonable assumption. It can be concluded that Assumption Z is unrealistic, and that an algorithm based on this assumption and Consideration Z is probably a design with over-precaution. One would then consider if Consideration Z can be ignored. For example, can one instead assume that the page signatures for any 2 corrupted copies of the same page will not be identical? Here it is shown that such an assumption is reasonable. In particular, This assumption is supported with the following arguments. 1. The probability P rob A that given any 2 corrupted page copies of the same page, their error patterns are identical is very small. 2. The probability P rob B that given any 2 corrupted page copies of the same page with different error patterns, their page signatures are the same is very small. 3. The use of page signatures has an inherent probability of assigning a corrupted page copy to the same page signature as a correct page copy, which has been 6 WAICHEE FU AND SIU-CHEUNG CHAU claimed acceptable in previous work such as [3, 1, 11, 10]. Therefore, the probability rob C that given a correct page copy and a corrupted page copy, they are given the same page signatures is assumed negligible. P rob A and P rob B will be shown to be no greater than P rob C , and hence P rob A and P rob B should also be negligible. The argument is based on the assumption that site failures are independent. Suppose that each page of the file has b bits, then there are different possible error patterns, it is assumed that the chance of occurrence of each pattern is the same. Probability of a given corrupted page copy having a given error pattern (say Probability of 2 given corrupted page copies having the same given error pattern Since there are choices of the error patterns X in the above, probability of 2 given corrupted page copies having the same error . For reasonable values of b, this probability is very small. Next consider the value of P rob B . Suppose that for an acceptable method, the probability that 2 different page copies being given identical page signatures is x. Therefore the probability P rob C that given a correct page copy and a corrupted page copy, they are given the same page signatures is x. The probability P rob B that given 2 corrupted page copies with different error patterns, their page signatures are the same is also x. Since P rob C is negligible, P rob B is also negligible. Finally note that P rob A is comparable to acceptable values of P rob C . For exam- ple, for the algorithm given in [8], suppose each signature has c bits, if the parity rules are chosen at random and the replicated file copies differ in a random fashion, there would be a probability of 2 \Gammac that two page copies with different contents have the same page signature, or P rob for this page signature method. For a 40-bit parity parity sequence suggested in the paper, this probability will be about . The value of b is typically large compared to c, for example, in [8], the method is illustrated with is typically much smaller than P rob C . Hence P rob A is negligible. This paper thus put forward the proposal that the probability of 2 corrupted pages having the same page signature is negligible. It will be seen that this relaxation LOCATING CORRUPTIONS IN A REPLICATED FILE 7 leads to algorithms with better performance or fault-tolerance. The assumption in this paper is the following: Assumption A: The probability that any 2 corrupted copies of the same page have identical page signatures is negligible. Assumption A is based on a more basic assumption: Assumption B: site failures are independent. Assumption B may not hold if, for example, some copies are obtained from duplicating another. However, in such cases, it is not obvious that a feasible corruption detection method exists, since a majority of the copies may be corrupted. 3. Properties of Combined Signatures We shall adopt the combined signature techniques as in [11, 3, 1]. In this method, each site s A calculates a page signature S(P i;A ) for each of its page copies P i;A . For this method to work, it must be the case that N ! 2 b , where b is the number of bits of a page signature. Since there are 2 b possible values of page signatures, each page signature can be considered as an element in a finite field (Galois field) GF (2 b ). From these page signatures, s A can further compute combined signatures of b bits. Suppose a site s A with a file copy FA =! P 1;A ; :::; PN;A ? computes k combined signatures. These combined signatures are given by where ff is a primitive element in GF (2 b ) and the addition and multiplication operations are those of GF (2 b ). Hence the elements are distinct. Note that ff ff. There are 2 b possible values for a combined signature. We refer to the signatures sig j;A for as the first k combined signatures. To help explain the algorithm in the next section, a few properties of the combined signatures are first described. In the algorithm two sets of combined signatures from two different sites s A and s B are compared. In a special case, suppose the first N combined signatures in each site are computed, and it is known that one of the sites, say s A , is correct. The two sets of signatures are given by If site s A sends its first N combined signatures to site s B , then s B can compute the difference between sig j;A and sig j;B for 1. The difference between the two sets is given by Equation (1) can be written in a matrix only if the signatures S(P i;A ) and We see that E j is in GF (2 b ). ThenB In the above, the left most matrix is a Vandermonde matrix. A Vandermonde matrix is a matrix of the LOCATING CORRUPTIONS IN A REPLICATED FILE 9 Theorem 7.2.1 of [5]: The above Vandermonde matrix has a nonzero determinant if and only if all of the X i for are distinct. 2 Since the elements ff j are distinct, for 1 and it is assumed that therefore the left most matrix in the above equation is nonsingular, and hence given there is a unique solution for e i 's. If site s A contains no corruption, then the non-zero e i 's identify the locations of page corruptions for site s B . This property has been stated as follows: Remark 1 [1]: For any given E the system of equations has a unique solution for Given the first N combined signatures sig i;C of a correct site s C , for and the first N combined signatures sig i;A of a site s A , one can solve the set of equations: en ff to identify the location of all corruptions in s A . Observation 1 provides a way to detect errors at a corrupt site given a correct site. However, in the beginning we do not know any correct site, a correct site must first be discovered. Here a property of the combined signatures allows such a discovery without the need of sending too many combined signatures. It will be shown that if there are at most v errors located at a set of 2 sites, one needs only compare the first v combined signatures of two sites to determine if they are both correct or if at least one contains error. This property has been noted as follows: has at most v non-zero entries. If The set of equations in Remark 2 can be written asB ff Remark 2 is based on the following argument. We note that the above equation can be simplified if at most v of the e i 's are non-zero. We simplify by retaining only the columns C i in the left most matrix for e i 6= 0. Suppose the columns indexed remains. We form a square matrix by further extracting only the rows with indices as in the following set of equations.B We need only observe that e i j trivial solution to the above set of equations, which are also part of the solutions for the set of equation in (3). The left-most matrix in (4) is a sub-matrix of the previous Vandermonde matrix, one can show that this sub-matrix is non-singular by a similar proof as that for Theorem 7.2.1 in [5]. Hence there is exactly one solution for the above matrix. The set of equations in Remark 2 can be written asB ff Therefore, if the first v combined signatures for s A and s B are compared and it is found that sig then the signatures S(P i;A ) and are identical for all i's, and therefore the page copies P i;A and P i;B are also identical. Since it is assumed (Assumption A) that two page copies of the same page that are corrupted are not identical, it can only be the case that sites s A and s B are both correct. there can be at most v errors at 2 sites s A and s B , and the first v combined signatures for s A and s B are identical, then sites s A and s B are both correct. Given that a correct site is found, from Remark 1, one can identify the corrupted page copies if the first N combined signatures are computed. However, if it is known LOCATING CORRUPTIONS IN A REPLICATED FILE 11 that the maximum number of corrupted page copies is not large, one can compute and transmit fewer combined signatures. In order to do this, note the following remark. Remark 3 [1]: For any given E the system of equations 1, has at most one solution for than or equal to bJ=2c non-zero entries. This solution can be obtained using a Reed-Solomon decoder [5]. In fact, only part of a Reed-Solomon decoder need to be utilized since it is of interest to identify the location of errors rather than in correcting the combined signatures for corrupted copies. Remark 3 is based on the following argument. First assume on the contrary that there are 2 different solutions N ), each having fewer than or equal to bJ=2c non-zero e 0e 0: Next subtract the second set of equations from the first set:B entries, the vector entries. Hence from Remark 2, we deduce that or the two sets of solutions are in fact identical. Therefore the solution is unique. If the first J combined signatures of a correct site s A and another are given, and it is known that for s B there can be at most bJ=2c corrupted page copies, then there is a unique solution for the system of J equations as described in Remark 3, corresponding to the 2 set of combined signatures. The solution identifies the locations of all the corruptions in s B . 4. Distributed Algorithms The decentralized algorithm in [1] is considered since it achieves better performance. Call this algorithm Algorithm GF SIG. Algorithm GF SIG works for M ? 2g, since a majority number of sites will be correct and contain identical combined signatures. However, since the algorithms are based on a very pessimistic consid- eration, they may be using more message transmissions than necessary. In the first proposed algorithm (Algorithm GF SIG A), the amount of messaging is reduced mainly due to replacing Assumption Z and Consideration Z by Assumption A. The second proposed algorithm (Algorithm GF SIG B) makes use of a more refined model, which considers the parameter of h, the maximumnumber of corrupted pages at a site. A further improvement on the number of message transmission is achieved, given reasonable values of h. Finally Algorithm GF SIG is modified to handle the case of M ? Assumption A. The amount of message transmission is the same but the tolerance of corruptions is greater than Algorithm GF SIG. Note that Algorithm GF SIG cannot handle the case where M - 2g because in such cases there can be a majority of sites that are corrupted, and Algorithm GF SIG will not be able to find a correct site. 4.1. Algorithm GF SIG A In this subsection, a distributed algorithm called Algorithm GF SIG A is pro- posed. The parameter of h is not considered. Algorithm GF SIG A makes three assumptions: (1) Assumption A. LOCATING CORRUPTIONS IN A REPLICATED FILE 13 2g. (3) the number of sites is a multiple of 2. The third assumption is made only for the sake of simplicity in presentation. This can be readily relaxed : If the number of sites is odd, partition the set SS into groups such that one and only one group has size 3, and the remaining groups has size 2. The algorithm proceeds in much the same way and the performance analysis is also similar. Consider two different cases: Case 1: N - f The sites are first partitioned into groups of 2 sites, and the N page signatures between the 2 sites in each group are compared. Any two page signatures that do not agree indicates one or two corrupted copies. At the end of the comparison of all groups, one must be able to locate at least one correct site since there must be at least one group that contains two correct sites (see Lemma 2 at the end of this subsection). The amount of signature transmission is given by dM=2eN . Let FG be the set of groups that are found to contain some corruption. Suppose there are F groups in FG. In the second phase, the correct site sends its page copies to locate the corruptions in each of the groups in FG. The maximum number of signatures sent for this purpose is bounded by FN . Hence the total number of signature transmission is (dM=2e Case 2: N ? f For the procedure is shown in Figure 1. Most of the computations in Figure are based on the local view of a site s i1 . Lines (1)-(2), (19)-(21), and (36)-(38) in Figure are where global computation or global consideration of some kind is made. For Case 2, Algorithm GF SIG A is made up of 2 phases. Phase 1 will either discover that all sites are correct or locate at least one correct site. Phase 2 makes use of the combined signatures of the correct site to detect corruptions. A brief outline of the algorithm is first given: 1. Phase 1: partition the set of sites into groups of size 2 each, find a correct site by comparison of some combined signatures between the 2 sites in each group. 14 WAICHEE FU AND SIU-CHEUNG CHAU ALGORITHM GF SIG A: Given: a set of sites SS. Preprocessing Partition SS into groups of size 2. Let the partitioning be The followings are operations at site s i1 of G i . Phase 1: Find a correct site Else message (5) SEND( message i ) to s j1 of all other groups G j . j1 of all other groups G j . Figure 1a: Phase 1 of distributed algorithm for detecting corruption 2. Phase 2: A set of groups FG will be found to contain corruptions. One site s i1 in each group G i in FG will be active, it receives the first f combined signatures from a correct site found in Phase 1. 3. Phase 2 (cont.): s i1 solves a set of equation in order to detect corruptions if the sites of this group has fewer than f=2 errors each. 4. Phase 2 (cont.): After the above step, at most one site will be discovered to contain more than f=2 corrupted page copies. 2f combined signatures are requested from a correct site for the error detection of this site. Next the algorithm is described in more details. Phase 1 tries to locate one or more correct sites, as well as discover a number of sites which are correct and hence need not be considered in Phase 2. This is done by partitioning the set of sites into groups of 2 sites each. The reason for comparing sites is that by Observation 2, the comparison of 2 sites can discover correct sites if both the sites are correct, and that a set of 2 sites is the smallest possible set of sites to detect a correct file copy. More messaging is needed if signatures in groups of more than 2 sites are compared. Suppose groups are of 3 sites, the number of sets of signatures to be sent in total is d 2 3 Me, which is greater than d 1 2 Me for the case with groups of size 2. 1 It will be seen in Section 6 that with this arrangement, LOCATING CORRUPTIONS IN A REPLICATED FILE 15 ALGORITHM GF SIG A: The followings are operations at site s i1 of G i . Phase 2: Find corrupted page copies (1) *.Let FG be the set of groups G j with message (2) *.Let F be the number of groups in FG. sites in this group are correct); (5) If chosen by Protocol A, SEND the first f combined signatures to some sites messages and SEND signatures according to requests. Else (8) There is a site sc which is correct and chosen by Protocol A for G i . are incorrect) If it is not true that (The site is corrupted) Compute a vector (e1;m ; :::; eN;m ) of at most minfN; f=2g non-zero elements as a solution to the system of equations (each site has - f=2 errors), then all corrupted pages are found (20) Else at most one site sw has more than f=2 errors, sw has no solution in the above. G is the number of corrupted page copies found so far. exists and is in this group Compute a vector (e1;w ; :::; eN;w ) with at most f non-zero elements (34) as a solution to the system of equations (38) *. ( Note: Cm is the set of corrupted pages in site sm .) Figure 1b: Phase 2 of Algorithm GF SIG A a minimum amount of combined signature transmission is achieved if no failures occur, which is a desirable property given a relatively reliable system. Phase 1 is where Assumption A leads to a significant gain in minimizing the signature transmission compared to Consideration Z. With Consideration Z, in order to locate a correct site, one must find a majority of sites whose first k combined signatures are identical, where k is the number of possible errors at a site. In the worst case one would have to collect the combined signatures from every site before the majority is found. The number of signature transmissions is given by With Assumption A, one can find a correct site by comparing 2 sites at a time, and hence in Phase 1 of Algorithm GF SIG A, only M transmissions are necessary. In Phase 1, for each group of 2 sites, a number of combined signatures are com- pared. The maximum possible number of differing page copies between 2 sites is given by f . Hence the first f pairs of combined signatures are compared. By Observation 2, if the values of the two sets of combined signatures and are the same, then it means that both sites s i and s j have no corruption. Otherwise, one or both contains corruption. it can be sured that at least one group contains correct sites (see Lemma 2 in the following). The groups inform each other whether they contain corruptions by sending messages "Correct" or "Incorrect" to each other. In Phase 2, for each group G i of FG, the site s i1 is active, and its operations are shown in Figure 1b. In this phase, a Protocol A is applied which chooses a correct site found in Phase 1 for each of the groups in FG. For example, there may be unique site IDs for all sites and Protocol A may simply choose the correct site that has the smallest ID. Alternatively, Protocol A may choose different correct sites for different subsets of FG to minimize communication distances. Since this paper considers only the transmission of messages in the performance analysis, the exact detail in Protocol A is not of concern. The first mission for s i1 is to receive the first f combined signatures from the chosen correct site s c . There can be at most f corruptions at a site, therefore, by Observation 2, these f combined signatures can be used to determined whether s i1 or s i2 are correct sites (Lines 10 to 12 of Algorithm GF SIG A). The next step is to compute a solution with at most f=2 non zero elements to the set of the first f signature equations for each corrupted site in G i (Lines (16)-(18) of Algorithm GF SIG A). There are two possible cases, LOCATING CORRUPTIONS IN A REPLICATED FILE 17 1. In the first case, each site has fewer than f=2 errors, since there are in total at most f errors, then by Observation 3, there will be a unique solution for the signature equations for each group in FG, and the solutions solve the problem. 2. In the second case, not every site has fewer than f=2 then there is at most one site which has more than f=2 errors, and at this site, if it exists, there is no solution with at most f=2 non-zero elements in the above computation. Let this site be s w if it exists. Continue with the steps for Case (2) above. For this case, corruptions at all sites other than s w have been detected. For s w , more correct signatures will be necessary for discovering the corrupted copies. Suppose G errors have been discovered at sites other than s w , then the maximum number of errors at s w is bounded by f \Gamma G. Let G)g. By Observations 1 and 3, the first f 00 combined signatures of s w is compared with a correct site to solve the corresponding set of equation. If s w is s i2 of group G i , since the first f of the combined signatures of both s w and a correct site is known, site s i1 will ask for the next f + 1 to f 00 combined signatures from s i2 . In this case, if s i1 is not a correct site, it would need to request for the f to f 00 combined signatures from s c for the error detection. If s w is s i1 , then it needs only collect the next (f +1) to f 00 combined signatures from a correct site s c . Finally, a solution to the set of equations at Line (35) of Algorithm GF SIG A in Figure 1b will give a solution for s w . Since this is the only site remaining unsolved, error detection is now completed. The following lemma is thus shown: computes the locations of corruption under the given assumptions. The following lemma establishes the correctness of Phase 1. Phase 1 of Algorithm GF SIG A can always find a site s c , and s c contains no corruption. Proof: First note that at least one of the groups in GG contains 2 sites that are correct. This is because of the assumption M - 2g none of the groups in GG contains 2 sites that are correct, then g would be greater than M=2, a contradiction to the assumption. For the two correct sites, the combined signatures will be identical. Hence one can always find a site s c . From the definition of sig k;i and sig k;j , The vector (S(P n;i has weight at most f . Since the combined signatures sig k;i and sig k;j for agrees with each other, . By Assumption A, two sites that contain corrupted pages will have different signatures. If the two sites have identical signatures, it means that the two sites are correct. Hence one concludes that site s c has no corruption. 2 4.2. Algorithm GF SIG B: Considering bound on corruptions per site The next proposed algorithm is called Algorithm GF SIG B. In this algorithm a finer model than that of Algorithm GF SIG A is adopted. In particular, h, the maximumnumber of corrupted page copies at a site at file comparison is considered. Algorithm GF SIG B is shown in Figure 2. As in Algorithm GF SIG A, three assumptions are made: (1) Assumption A. 2g. (3) the number of sites is a multiple of 2. As in Algorithm GF SIG A, the third assumption is made only for the sake of simplicity in the presentation. A brief outline of the algorithm is first given: 1. Phase 1: partition the set of sites into groups of size 2 each, find a correct site by comparison of some combined signatures between the 2 sites in each group. 2. Phase 2: A set of groups FG will be found to contain corruptions. One site in each such group will be active, it first receives some combined signatures from a correct site found in Phase 1, in order to decide if itself is a correct site. 3. Phase 2 (cont.) The active site in each group determines if each site in the group is correct, if the other site is not correct, more of its combined signatures are requested if necessary. If both sites are incorrect, then more combined signatures are received from a correct site. 4. Phase 2 (cont.) The active site solves a set of equations to identify the error copies in each corrupted site in its group. LOCATING CORRUPTIONS IN A REPLICATED FILE 19 ALGORITHM GF SIG B: Given: a set of sites SS. Preprocessing Partition SS into groups of size 2. Let the partitioning be The followings are operations at site s i1 of G i . Phase 1: Find a correct site Else message (5) SEND( message i ) to s j1 of all other groups G j . j1 of all other groups G j . Figure 2a: Phase 1 of Algorithm GF SIG B Next the algorithm is described in more details. Algorithm GF SIG B is shown in Figure 2. In the figure, most of the computations are based on the local view of a site s i1 in a certain set of 2 sites. The lines (1)-(3) and (31)-(33) in Figure 2 are where global computation or global consideration of some kind is made. Phase 1 tries to locate one or more correct sites, as well as discover a number of sites which are correct and hence need not be considered in Phase 2. As in Algorithm GF SIG A, this is done by partitioning the set of sites into groups of sites each. The reasons for this are the same as before. For each group in the partition, a number of combined signatures are compared. At this stage, the maximal number of corrupted page copies at any site is h - N is known. The maximum possible number of differing page copies between 2 sites is given by 2hg. Hence the first f 0 pairs of combined signatures are compared. Using the arguments in Algorithm GF SIG A, at least one correct site will be discovered. Phase 2 makes use of the combined signatures of the correct site discovered in phase one to identify the corrupted pages in the corrupted sites. After Phase 1, a set FG of groups of 2 sites is identified, where each such group has at least one corrupted site (refer to Figure 2). Suppose there are F groups in FG, it implies that at least F of the sites contain at least one corrupted page copy each. ALGORITHM GF SIG B: The followings are operations at site s i1 of G i . Phase 2: Find corrupted page copies (1) *. Let FG be the set of groups G j with message (2) *.Let F be the number of groups in FG, i.e. g. sites in this group are correct); If chosen by Protocol A, SEND(sig1;c ; :::sig f 00 ;c ) to some sites and Wait for REQUEST messages and SEND signatures according to requests. Else There is a site sc which is correct and chosen by Protocol A. are incorrect) If it is not true that Compute a vector (e1;m ; :::; eN;m ) of weight at most 1g as a solution to the system of equations corresponds to S(Pi;m is the set of corrupted page copies in site sm .) Figure 2b: Phase 2 of Algorithm GF SIG B LOCATING CORRUPTIONS IN A REPLICATED FILE 21 Then the maximal possible number of corrupted page copies at any site is given by f 1g. In order to identify f 00 errors, from Observation 3, if one needs to compare the first 2f 00 combined signatures with a correct site. If 2f 00 ? N , from Observation 1, one needs to compare only the first N pairs of combined signatures. Therefore, let f (Line (3) of Algorithm GF SIG B). The values of f 00 and f 000 will help to determine the number of signature transmission in the following steps. As in Algorithm GF SIG A, Protocol A is applied to choose a correct site for each of the groups in FG. At each group fs i1 ; s i2 g in FG, one site, s i1 , is active. The first task for s i1 is to find out if itself is a correct site, because if so, fewer number of combined signatures need to be received in a later stage. To do so, it receives the first f 00 combined signatures from a correct site s c . It compares its own first f 00 combined signatures with these (Line (11) of Algorithm GF SIG B). By Observation 2, if the two sets of combined signatures are identical, then s i1 is correct. In this case, s i1 will act as the correct site s d in discovering the corruptions of s i2 , and it would not need any more messages from s c . Otherwise, s i1 is corrupted, in which case the way to find out if s i2 is correct is similar (Line(13) of Algorithm GF SIG B). If s i1 is corrupted but s i2 is correct, then it is better to let s i2 act as the correct site for error detection, since possibly more combined signatures (the first f 00 of them) are received from s i2 than from s c . If s i2 is incorrect, then s i2 will send the (f 00 + 1)-th to f 000 -th combined signatures to s i1 for error detection (Lines of Algorithm GF SIG B). If both s i1 and s i2 are found to be corrupted the role of correct site s d is played by s c . If s i2 (s c ) is chosen as the correct site, then the remaining signatures in the first f 000 combined messages, if any, will be collected from s i2 (s c ) (Lines (18-19) and Lines (22-23) of Algorithm GF SIG B). Finally, or i2) is corrupted, the solution to e n;m ff is computed (Lines (27)-(29) of Algorithm GF SIG B). There are two possible cases, and the solution in each case gives a correct answer: 1. if f 000 = N , then by Observation 1, the corrupted page copies can be found; 2. if f since the maximalnumber of corrupted pages in s m is f 00 , therefore, by Observation 3, the corrupted page copies can also be found. 22 WAICHEE FU AND SIU-CHEUNG CHAU 4.3. Algorithm GF SIG C: Considering bound on number of corrupted sites Given Assumption A, one can assume that M ? is the maximum number of sites that contain corruptions. If M ? 2, then at least 2 sites are correct, and the algorithm in [1] can be slightly modified to detect all corruptions for this case: In finding a correct site, instead of finding a majority of sites that agree with each other, find a set of 2 sites that agree with each other. In the worst case, the resulting amount of messaging is the same as the original algorithm but now a much greater number of possible errors can be tolerated. The resulting algorithm is called Algorithm GF SIG C. 5. Performance Analysis In this section, the performance of Algorithm GF SIG A and Algorithm GF SIG B is analyzed. The performance among the two algorithms and Algorithm GF SIG are also compared. Both proposed Algorithms are shown to perform better than Algorithm GF SIG in that fewer number of signature transmissions is necessary. The choice between Algorithm GF SIG A and Algorithm GF SIG B are also discussed. 5.1. Performance of Algorithm GF SIG A In Phase 1 of Algorithm GF SIG A, the number of messages transmitted will be \Sigma M\Upsilon f . In Phase 2, let F be the number of groups in FG. Consider the number of messages required for a group G i of FG. More messages are required if site s i1 is not a correct site. 1. The total number of combined signatures transmitted from s c for a RECEIVE at Line (9) of Algorithm GF SIG A in Figure 1b is given by f , and at most F sites would receive these messages. Since f is the maximum number of failures, F is at most f . 2. In the worst case no error may be found at sites other than s k . The total number of combined signatures transmitted from s c for a RECEIVE at Line (32) of Algorithm GF SIG A in Figure 1b is bounded by minfN \Gamma f; fg, and at most one site would receive these messages. LOCATING CORRUPTIONS IN A REPLICATED FILE 23 3. The total number of combined signatures transmitted from s i2 for a RECEIVE at Line (28) of Algorithm GF SIG A in Figure 1b is bounded by minfN \Gamma f; fg, and at most one site would receive these messages. Together with the consideration of the cases for N - f , the total number of combined signature transmissions is bounded by d A tighter bound is to consider the value of F which is defined in the above. The bound is d If there is no failure, then the number of combined signature transmissions is given by 5.2. Performance of Algorithm GF SIG B In Phase 1 of Algorithm GF SIG B the number of messages transmitted will be 2hg. In Phase 2, let F be the number of groups in FG. Consider the number of messages required for a group G i of FG. More messages are to be received if site s i1 is not a correct site. 1. The total number of combined signatures transmitted from s c for a RECEIVE at Line (10) of Algorithm GF SIG B in Figure 2b is given by f would receive these messages. 2. Since g is the maximum number of failed sites, the number of groups in FG with corrupted sites is bounded from the above by bg=2c. The total number of combined signatures transmitted from s c for a RECEIVE at Line (23) of Algorithm GF SIG B in Figure 2b is given by f g, and at most would receive these messages. 2 3. The total number of combined signatures transmitted from s i2 for a RECEIVE at Line (19) of Algorithm GF SIG B in Figure 2b is also given by f 000 , and at most F sites would receive these messages. The total number of combined signature transmissions for Lines (3) and (19) of Algorithm GF SIG B is bounded by 2hg. The total number of combined signature transmissions for Lines (10) and (23) in Algorithm GF SIG B is bounded by bg=2cg. To summarize, given that f g, the number of combined signature transmissions for Algorithm bounded by If there is no failure, then the number of combined signature transmissions is given by 5.3. Performance Comparisons: Cases of No Failure For reliable systems, it is likely that no failure has occurred at most file comparisons. Therefore first consider the cases of no failure. Compare the performance of Algorithm GF SIG A and Algorithm GF SIG B with the bounds achieved by [1]. Recall that the more efficient decentralized algorithm in [1] is called Algorithm GF SIG. The maximum number of signature transmission it requires is given by LOCATING CORRUPTIONS IN A REPLICATED FILE 25 However, when it happens that none of the sites contains more than f=2 failures, then the number of signature transmission is given by: First consider the case where no error actually occurs. The number of signature transmission required in Algorithm GF SIG A, Algorithm GF SIG B and Algorithm GF SIG for different sets of parameters are plotted in Figure 3. The difference between the number of signature transmission for the two algorithms is shown in Figure 4. (In these figures, fl A f) is denoted by Gamma(0A), denoted by Gamma(0A), fi 0 (M; N; f) is denoted by Beta(0).) When comparing fl A Note that the minimum value of fi 0 (M;N; f) occurs at the smallest possible value of f , namely 1, in which case fg. From Figure 4(a), the savings of Algorithm GF SIG A on the message transmission approximately ranges from M at minfN; fg at 1c. It can be seen that the enhancement in performance of Algorithm GF SIG A and Algorithm GF SIG B over Algorithm GF SIG increases with the number of errors to be detected. 5.4. Cases with Failures The maximumnumbers of signature transmission required for Algorithm GF SIG A and Algorithm GF SIG B under different system parameters of N;M; f; g and F are shown in Figure 5. The requirements of Algorithm GF SIG are also shown. In the remaining figures, fi(M; N; f) is denoted by Beta(w), and fi 0 (M;N; f) is denoted by Beta(0). fl A (M;N; f) and are denoted by Gamma(A) and Gamma(B), respectively. The value for the case of no failure is a lower bound on the value of From the figure, it is seen that the value of furthest away from fl B relatively unreliable system, where the number of possible failing sites is almost half the number of sites (Figure 5(a)). The difference becomes smaller as the number of possible failing sites is decreased (Figure 5(c)). 5.4.1. Favourable Conditions for Algorithm GF SIG A. The previous performance comparisons show that both Algorithm GF SIG A and Algorithm GF SIG B have better performance than Algorithm GF SIG. Next the choice between Algo- 26 WAICHEE FU AND SIU-CHEUNG CHAU (a) (b) (c) (d) Figure 3: Signature transmission of Algorithm GF SIG A, Algorithm GF SIG B and GF SIG under no failure LOCATING CORRUPTIONS IN A REPLICATED FILE 27 (a) (b) Figure 4: Difference between Algorithm GF SIG A and GF SIG under no failure rithm GF SIG A and Algorithm GF SIG B is examined. Algorithm GF SIG A will be shown to be a good choice if the parameter of h is not considered. Figure 6 shows the performance of Algorithm GF SIG, Algorithm GF SIG A, and Algorithm GF SIG B, without considering the parameters h and g, that is, h and g are set to their greatest possible values, respectively. The values of fi(M; N; f), fl A (M; N; f), are plotted for for each of From the figures, if F is small compared to f , then Algorithm GF SIG A performs better than Algorithm GF SIG in that the amount of messaging is less. These diagrams show that Algorithm GF SIG AA is a better choice if the parameter of h is not considered. 5.4.2. Favourable Condition for Algorithm GF SIG B: The parameter h. Figure 7 illustrates the significance of parameter h, the maximumnumber of corrupted page copies at a site. If this is not known, h may be assumed to be minfN; fg. However, it is not likely that all pages of a file are corrupted. In the figures, some reasonable values of h, such as 10% of the total number of pages, are assumed. Compared with Figure 5, the number of required signature transmission are reduced significantly. Since only Algorithm GF SIG B takes advantages of h, it is the best choice if a reasonable value of h is known. 28 WAICHEE FU AND SIU-CHEUNG CHAU Beta(w) Beta(w) (a) (b) Beta(w) Beta(w) (c) (d) Figure 5: Number of signature transmissions for Algorithm GF SIG A, Algorithm Algorithm GF SIG with failure LOCATING CORRUPTIONS IN A REPLICATED FILE 29 Beta(w) Beta(w) (a) (b) Beta(w) Beta(w) (c) (d) Figure Signature transmission of Algorithm GF SIG, Algorithm GF SIG A and Algorithm GF SIG B with failure Beta(w) Beta(w) (a) (b) Beta(w) Beta(w) (c) (d) Figure 7: Effects of reasonable values of h for Algorithm GF SIG B LOCATING CORRUPTIONS IN A REPLICATED FILE 31 6. A Lower Bound and Optimality It can be shown that Algorithm GF SIG A and Algorithm GF SIG B transmit the minimal number of combined signatures for the case where no failure occurs. Any failure that could have occurred must be detected. Therefore each site must compare its combined signatures with some other site in order to determine if it is correct. The minimal number of site comparisons is dM=2e. If less number of comparison is made, then there must be at least one site which has not compared with any other site. Reasoning similar to that in [1, 2] is applied in our proof of optimality. When sites compare to discover if either one or both is corrupted, if there can be at most k failures in the 2 sites, then they must compare at least minfN; kg combined signatures. Assume this is not true, i.e. the number of combined signatures t compared is fewer than minfN; kg. If the signature size is b, then t combined signatures can distinguish 2 bt different sets of page signatures. For a given pattern in page signatures S(P minfN;kg+1 ); :::; S(PN ), there are 2 b minfN;kg different patterns for the entire set of page signatures. Since t is less than minfN; kg, there are two sets of page signatures and that agree on the last pages but disagree in at least one page signature among the first pages, such that the combined signatures of these two sets are identical in the comparison. Hence there is no way to discover the difference if one site contains the set of page signatures p and another site contains the set of page signatures p 0 . Under the system model for Algorithm GF SIG B, the number of possible differing copies of 2 sites is given by minfN; f; 2hg. Under the system model for Algorithm GF SIG A, the number of possible differing copies of 2 sites is given by minfN; fg. In practice, if comparison is made one by one, we may discover some corruptions in the earlier comparisons and reduce this number of possible errors for later comparisons. However, in the worse case, all the errors can occur at the in the the last comparison, so that this number cannot be reduced for any of the comparisons. Therefore, in the worst case, the number of combined signatures needed to be transmitted is given by \Sigma M\Upsilon minfN; f; 2hg ( \Sigma M\Upsilon minfN; fg). This is achieved by Algorithm GF SIG B and GF SIG A when no corruption occurs (i.e. the assumptions in Algorithm GF SIG B, the minimum number of combined signature transmission in the case of no failure is given by the assumptions in Algorithm GF SIG A, the minimum number of combined signature transmission in the case of no failure is given by 7. Relaxing Assumption A Assumption A states that the probability that 2 copies of the same page are corrupted and that their signatures are identical is negligible. Now it is shown how this assumption may be relaxed. Assumption A is replaced by the following assumption, 2: Assumption C: the probability that any R corrupted copies of a page have identical signatures is negligible. Assumption C, for X ! R corrupted copies of a page, the error patterns can be identical (the chance is not assumed to be negligible). Hence when there are X sites showing identical signatures, it cannot be concluded that there is no corruption. However, with R sites, if at least one copy is corrupted but not all copies are corrupted, the differences in the signatures of the corrupted copies as compared to those of the correct site(s) will be seen; if all R copies are corrupted, at least one copy would have a corruption pattern that is different from some other copy. Hence, when it is found that all signatures are identical in R copies, one can conclude that all R copies are correct. It may also be desirable to relax the second assumption of Algorithm GF SIG A and Algorithm GF SIG B which states that M ? 2g. Note that this assumption and Assumption A are actually related. With Assumption C, Phase 1 of Algorithm GF SIG A and Algorithm GF SIG B may be modified as follows: Partition the set of sites into groups of k(k - R) sites so that one leader site in each group gets to know the necessary combined signatures of all sites in the group. Note that any R sites which contain identical signatures will be correct sites. In order to prevent such a set from appearing in a group of k sites, at least k must be corrupted in the group. Therefore, the assumption M ? 2g can be replaced by Rg. For is an integer - 2. Using larger values of k implies that more site failures can be tolerated, but it would also increase the number of signature transmissions in cases where there is no corrupted site. LOCATING CORRUPTIONS IN A REPLICATED FILE 33 Assumption C, the value of g is bounded by 8. Summary and Conclusion By making the realistic assumption that different sites are unlikely to contain corrupted copies of a page of a replicated file with identical page signatures, three algorithms are proposed for locating corruptions which have advantages over previous methods. The first algorithm is based on a system model as in previous work, and achieves better performance in terms of the number of signature transmission than previous work. The second algorithm is based on a finer model in which the maximum number of corrupted pages in each site is defined, and is shown to have further enhancements in the amount of signature transmission. The third algorithm allows more tolerance in data corruption compared to previous methods. The first two algorithms are also shown to be optimal in terms of the number of signature transmission in the case of no failure. Notes 1. However, in this case of partitions of size 3, in order for at least one group to discover a correct file copy, it is no longer required that M ? 2g, one need only require that M ? 3 g. There will be more discussion about this in Section 7. 2. Note that the analysis can be refined by considering the number of groups in FG that contain 2 corrupted sites. Suppose this value is K. K is typically much smaller than F . This is because the chance of having 2 corrupted sites in a group in FG equals the probability that a site contains corruption, and for a reliable system this is small. If K is taken into consideration in the analysis, better performance can be achieved. This is not considered for the sake of simplicity. --R Efficient Detection of Corrupted Pages in a Replicated File 12th ACM Symposium on Principles on Distributed Computing. Comparing multiple file copies with a primary copy using minimal communication. An optimal strategy for comparing file copies Exploiting symmetries for low-cost comparison of file copies Theory and Practice of Error Control Codes. Locating more corruptions in a Replicated File. A parity structure for large remotely located replicated data files. Reliable and efficient broadcast of files to a group of locally interconnected stations. Efficient replicated remote file comparison. --TR --CTR Changsik Park , John J. Metzner, Efficient Location of Discrepancies in Multiple Replicated Large Files, IEEE Transactions on Parallel and Distributed Systems, v.13 n.6, p.597-610, June 2002
performance analysis;message transmission;signatures;file comparison;coding theory;fault tolerance;replicated file
309181
A Variable Metric Proximal Point Algorithm for Monotone Operators.
The proximal point algorithm (PPA) is a method for solving inclusions of the form $0\in T(z)$, where T is a monotone operator on a Hilbert space. The algorithm is one of the most powerful and versatile solution techniques for solving variational inequalities, convex programs, and convex-concave mini-max problems. It possesses a robust convergence theory for very general problem classes and is the basis for a wide variety of decomposition methods called splitting methods. Yet the classical PPA typically exhibits slow convergence in many applications. For this reason, acceleration methods for the PPA algorithm are of great practical importance. In this paper we propose a variable metric implementation of the proximal point algorithm. In essence, the method is a Newton-like scheme applied to the Moreau--Yosida resolvent of the operator T. In this article, we establish the global and linear convergence of the proposed method. In addition, we characterize the superlinear convergence of the method. In a companion work, we establish the superlinear convergence of the method when implemented with Broyden updating (the nonsymmetric case) and BFGS updating (the symmetric case).
Introduction The Proximal Point Algorithm (PPA) is one of the most powerful and versatile solution techniques for problems of convex programming and mini-max convex-concave program- ming. It possesses a robust convergence theory for very general problem classes in finite- and infinite-dimensions (e.g. see [11, 16, 21, 22, 23, 28, 32, 41, 40]), and is the basis for a wide variety of decomposition methods called splitting methods (e.g. see [4, 9, 12, 43, 44]). Yet, the classical PPA typically exhibits slow convergence in many applications. For this reason, acceleration methods for the PPA are of great practical importance. In this paper we propose a variable metric implementation of the proximal point algorithm. Our approach extends and refines results that originally appeared in [38] and is in the spirit of several recent articles [3, 7, 10, 18, 20, 24, 25, 36]. However, there is a fundamental difference between the method presented here and those studied in [3, 7, 10, 18, 20, 24, 25, 36]. This difference has a profound impact on the methodology applied in this article. All previous work on this topic (except [38]) applies exclusively to monotone operators that arise as the subdifferential of a finite-valued, finite-dimensional convex function. The results of this article apply to general monotone operators on a Hilbert space. The resulting difference in methodology roughly corresponding to the difference between methods for function minimization and methods for solving systems of equations. There are both advantages and disadvantages to the more general approach. The advantages are that the method applies to a much broader class of problems. This is so not only because the theory is developed in the Hilbert space setting, but, more impor- tantly, because many monotone operators cannot be represented as the subdifferential of a finite-valued, finite-dimensional convex function. General monotone operators do not possess many of the rich structural properties associated with the subdifferential of a convex function (e.g., subdifferentials of convex functions are the only maximal cyclically monotone operators [33]). In addition, in the case where the operator is the subdifferential of a convex function, we do not require the usual assumption that the underlying function be finite-valued. The disadvantages of our general approach arise from the fact that the method cannot make use of the additional structure present when the operator is the subdifferential of a convex function. This complicates both the structure of the method and its analysis. Of particular note in this regard is the complexity of our global convergence result. If the operator is the subdifferential of a convex function, then solving the inclusion is equivalent to minimizing the underlying convex function. The global convergence of a method is then typically driven by a line-search routine (e.g., see [3, 7, 10, 18, 20, 24, 25, 36]). In the general setting we do not have direct recourse to this strategy. This complicates both the structure of the algorithm and its convergence theory. Nonetheless, the proof technique developed in this paper can be refined in the convex programming setting, thereby significantly simplifying both the global and local convergence results [5, 6]. Notwithstanding these differences in methodology, our approach is still nicely motivated by recalling the behavior of the PPA in the context of convex programming: min where H is a Hilbert space and f : H 7! IR [ f+1g is a lower semi-continuous convex function that is not identically +1. Define the Moreau-Yosida regularization of f to be the function f - : H 7! IR given by f -z) := min The set of solutions to (1) corresponds precisely to the set of points at which f - attains its minimum value. The function f - is continuously Fr'echet differentiable [28, Proposition 7.d]. The PPA applied to (1) is approximately the steepest decent algorithm applied to f - [11]. This analogy immediately suggests that a variable metric approach could be applied to the function f - to accelerate the method. This idea was first studied in [38] and is the basis of the acceleration techniques described in [3, 7, 10, 18, 20, 24, 25, 36]. In [3], Bonnans, Gilbert, Lemar'echal, and Sagastiz'abal develop methods along an algorithmic pattern originally suggested by Qian in [38]. This pattern circumvents many of the difficulties associated with a variable metric approach applied directly to the function f - . The key is to employ a matrix secant update based on the function f instead of f - . The local convergence results in [3, Section 3] require some smoothness assumptions. In partic- ular, linear convergence is established when the function f is differentiable with Lipschitz continuous derivative, and super-linear convergence is established when f is twice strictly Fr'echet differentiable at a unique solution - z where the second derivative is positive definite (we only speak of quotient or q-rate of convergence). In [18, 20, 24, 25], the authors apply the bundle concept for nonsmooth convex minimization [17] to approximate the Moreau-Yosida regularization f - and its derivative. Variable metric updates, in particular, quasi-Newton updates, are then applied using these approximate values. The super-linear convergence results in the papers [18, 20, 24] either require strong smoothness assumptions on the function f (such as the Lipschitz continuity of rf) or that the regularization parameter - diverges to +1. In [20], Lemar'echal, and Sagastiz'abal propose a clever reversal quasi-Newton formula which uses the value of the gradient of f - at a variety of points other than those strictly obtained by the iterates. This promising idea deserves further theoretical and numerical study. In [10] and [36], the authors develop an approach based on Newton's method for semi- smooth functions as developed in [30, 31, 37, 34]. Properly speaking, these methods are neither an adaptation of the PPA algorithm nor a variable metric method. Nonetheless, the flavor of both these methodologies are present. In order to obtain super-linear convergence, smoothness hypotheses are again required, however, these hypotheses are of a somewhat more technical nature. Specifically, it is required that (a) the function f be semi-smooth at a unique solution to (1) [37], (b) every element of the set-valued mapping exists for all is nonsingular at the unique solution - z, and (c) the sequence of Hessian approximates fV k g used to generate the iterates fz k g must lim dist One can show that the semi-smoothness hypotheses is satisfied in many cases of interest when f is finite-valued. Moreover, by Rademacher's theorem on the differentiability of Lipschitz continuous functions, it follows that the set-valued mapping @ 2 B f(z) is always well-defined and compact-valued in the finite dimensional, finite-valued case with the non-singularity property being closely tied to the usual hypothesis of strong convexity. Although the limiting hypotheses on the V k 's is a bit strong, it is not entirely unreasonable in the absence of differentiability. In [36], Chen and Qi propose a very nice preconditioning technique wherein an exact value for the gradient of a shifted Moreau-Yosida regularization can be computed from inexact values for the gradient of f - . This technique is similar in spirit to the reversal quasi-Newton formula found in [20]. Both of these techniques should prove useful in numerical implementations. The algorithm presented in this paper is most closely related to the methods proposed by Chen and Fukushima [7] and Mifflin, Sun, and Qi [25]. However, there are several fundamental distinctions. The foremost of which is that the methods in [7, 25] are restricted to finite dimensional finite-valued convex programming problems. Within this framework, these authors use bundle strategies to approximate f - and its gradient and establish the global convergence of their methods with the aid of a line search routine. Chen and Fukushima establish global and linear convergence results along with a generalization of the Dennis-Mor'e characterization theorem for super-linear convergence [14]. One of the most important features of the Chen-Fukushima algorithm is that the line search is based on the function f rather than approximations to the function f - . This is very important in practise since obtaining sufficiently accurate approximations to the function f - is usually quite time consuming. Their linear and super-linear convergence results blend bundle techniques with the theory of nonsmooth equations. Consequently, the convergence hypotheses are reminiscent of those employed in [10] and [36], in particular, they require semi-smoothness, CD-regularity, and the strong approximation property (2). In [6], the methods of this paper are applied to the Chen-Fukushima algorithm to obtain the super-linear convergence of the method when BFGS matrix secant updating is employed. In [25], Mifflin, Sun, and Qi obtain the first super-linear convergence result for a variable metric proximal point algorithm using the BFGS matrix secant update in the setting of finite dimensional finite-valued convex programming. Their proposed algorithm uses a line search based on approximations to the function f - and requires that the function f - is strongly convex with rf - Fr'echet differentiable at the unique global solution to the convex program. In addition it is assumed that the iterates satisfy a certain approximation property involving the gradient rf - . In Section 4 of this paper, we discuss how these hypotheses are related to those that are also required in our convergence analysis. In this paper, we provide a general theory for a variable metric proximal point algorithm applied to maximal monotone operators from a Hilbert space to itself. In the important special case of convex programming, where T is taken to be the subdifferential of the function f , we do not assume that f is finite-valued or differentiable on the whole space. However, to obtain super-linear convergence, we do require certain smoothness hypotheses at a unique global solution - z. These smoothness hypotheses differ from those assumed in [3, 18, 20, 24] since they are imposed on the operator T \Gamma1 rather than T . In this regard, they are reminiscent of the hypotheses employed in [25]. The choice of smoothness hypotheses has deep significance in the context of convex programming. Differentiability hypotheses on imply the second-order differentiability of f , whereas differentiability hypotheses are related to the standard strong second-order sufficiency conditions of convex programming [40, Proposition 2] and thus reduce to the standard hypotheses used in local analysis of convergence. In particular, the differentiability of (@f) \Gamma1 does not imply that @f is single-valued or differentiable nor does it imply that f is finite-valued. Our smoothness hypotheses also differ from those that appear in [7, 10, 36]. These methods rely on the theory of nonsmooth equations and require hypotheses such as semi- smoothness and non-singularity of the elements of @ 2 In addition, the proof theory for these methods specifically requires that the underlying convex function be finite-valued in a neighborhood of the unique solution to (1) (again, these methods assume that the function is finite-valued on all of IR n ). This limits direct application to constrained problems since in the constrained case solutions typically lie on the boundary of the constraint region (i.e., on the boundary of the domain of the essential objective function). Throughout the paper we illustrate many of the ideas and results by applying them to the case of convex programming. Our purpose here is not only to show how the results can be applied, but also to ground them in the familiar surroundings of this concrete application. Further details on the application of these results to the case of convex programming can be found in [5]. The paper is structured as follows. We begin with a review of the classic proximal point algorithm in x2. The VMPPA is introduced in x3. This section contains the approximation criteria that must be satisfied at each iteration. Two criteria are presented. The first is required to obtain global convergence and the second is required to accelerate the local convergence of the method. This division into global and local criteria is one of the recurring themes of the paper. On the global level the method behaves like a steepest descent method while at the local level it becomes more Newton like. This feature is common to most general purpose methods in nonlinear programming such as the non-monotone descent methods, the dogleg method, and trust-region methods. In x4 we discuss the smoothness hypotheses required for the local analysis. We also extend some of the differentiability results appearing in [19, 35] to maximal monotone operators. In x5, we study the operators N k associated with the Newton-like iteration proposed in x3. The focus of this section is to provide conditions under which the operators N k are non-expansive at a solution to the inclusion global convergence result paralleling Rockafellar's 1976 result [41] is given in x6. In x7 we study local convergence rates. Linear convergence is established under a Lipschitz continuity assumption on T \Gamma1 , and a characterization of super-linear convergence for the VMPPA is also given. This characterization is modeled on the landmark characterization of super-linear convergence of variable metric methods in nonlinear programming due to Dennis and Mor'e [14]. In [6], we use this characterization result to establish the super-linear convergence of the method when the derivatives are approximated using the BFGS and Broyden updating strategies. A word about our notation is in order. We denote the closed unit ball in the Hilbert space H by IB. Then the ball with center a and radius r is denoted by a+ rIB. Given a set and an element z 2 H, the distance of z to Z is dist (z; be two Hilbert spaces. Given a multi-function (also referred to as a mapping or an operator depending on the context) , the graph of T , gph T , is the subset of the product space H 1 \Theta H 2 defined by gph (z)g. The domain of T is the set domT := fz ;g. The identity mapping will be denoted by I. The inverse of an operator T is defined by T gph Tg. Given a lower semi-continuous convex function f S f+1g, the conjugate of f is defined by f (z f(z)g. Monotone Operators and the Classic Algorithm Given a real Hilbert space H with inner product h\Delta; \Deltai, we say that the multi-function for every z and z 0 in domT , and w 2 T (z) and w have is said to be strongly monotone with modulus -. The monotone operator T is said to be maximal if its graph is not properly contained in the graph of any other monotone operator. An important example of a monotone operator is the subgradient of a convex function (see Minty [27] and [28]). We are concerned with solving inclusions of the form where T is a maximal monotone operator. In the case of the convex programming problem (1), the operator T is the subdifferential of the convex function f and the inclusion (3) characterizes the points z at which f attains its minimum value. A wide variety of other problems can be cast in this framework, e.g. variational inequalities, complementary problems, and mini-max problems. Existence results for inclusion (3) can be found in [41]. In 1962, Minty [27] showed that, when the operator T is maximal monotone, the Moreau- Yosida Resolvent of T , is single-valued and non-expansive on H. This result suggests that a solution to the inclusion can be iteratively approximated by the recursion z can modify this scheme by varying the scalar - and by choosing the iterates z k+1 to be an approximate solution to the equation . The proximal point algorithm applies precisely these ideas. The algorithm, starting from any point z 0 , generates a sequence in H by the approximation rule z The principle difficulty in applying the proximal point algorithm lies in executing the operators In the case of convex programming, the iteration (4) reduces to the iteration z Notice that executing the algorithm exactly (i.e., with "=" instead of "-" in the above algorithm) can be as difficult as solving the original problem directly. Hence it is critical that the convergence results are obtained under the assumption of approximation. In [22] and [23], Martinet proved the convergence of the exact proximal point algorithm for certain cases of the operator T with fixed c k j c. The first theorem on the convergence of the general proximal point algorithm was proved by Rockafellar [41] in 1976. His theorem not only insures the global convergence under an approximating rule, but also describes the global behavior when the inclusion 0 2 T (z) has no solution. The convergence rate of the proximal point algorithm depends on properties of the operator T , the choice of the sequence fc k g, and the accuracy of the approximation in (4). The first rate of convergence results were also obtained by Rockafellar [41] in 1976, under the assumption that the solution set is a singleton f-zg. He proved that if the sequence is bounded away from 0, and T \Gamma1 (w) is bounded by a linear function of kwk when w is near 0, then the rate of convergence is at least linear. Luque [21] extended Rockafellar's theorem to the case where T \Gamma1 (0) is not required to be a singleton, and showed that such an estimate of the convergence rate is tight. 3 The Algorithm and Approximation Criteria The algorithm proposed in this section is a Newton-like iteration for solving the resolvent equation In the context of the convex programming problem, the iteration takes the form z where the operator H k is used to approximate second-order properties of the function f - . If f - is twice differentiable with [r method one sets However, in general, f - is only known to be differentiable with Lipschitz continuous gradient [28]. Thus, in the finite dimensional case, the Hessian r 2 f - (x) is only guaranteed to exist on a dense subset by Rademacher's Theorem. Further results on the second-order properties of f - can be found in [19, 35, 42]. It is well known that the negative gradient \Gammarf - (z k ) is the unique element w k solving the problem min or equivalently, satisfying the inclusion The proximal point algorithm for a general maximal monotone operator T can be formally derived from equation (5) by replacing -, z k , and @f by c k , z k , and T respectively, to obtain or equivalently, where equality follows from the fact that w k is unique. This motivates us to define the operator This operator provides the analog of the direction of steepest descent in the operator setting. The algorithm we propose for solving the inclusion 0 2 T (z) can be succinctly stated as follows: The Variable Metric Proximal Point Algorithm: Having z k , set z and choose c k+1 - 1. As mentioned in the previous section, it is critical that the convergence results are obtained under the assumption that D k (z k ) can only be approximated. We use the following approximation criteria: and The approximation criteria (G) is used to establish global convergence properties, while criteria (L) is used to obtain local rates of convergence. Although these criteria are used in the proof of convergence, they are impractical from the perspective of implementation. In their stead, we provide criteria that are imple- mentable. To obtain these criteria we recall the following result from Rockafellar [41]. Proposition 1 [41, Proposition 3] Let S k (w) := T (z k we have the bound dist (0; S k Proposition 1 yields the following alternative approximation criteria for the w k 's. Since this result is an immediate consequence of Proposition 1, its proof is omitted. Proposition 2 Consider the following acceptance criteria for the w k 's: dist (0; S k (w k dist (0; S k (w k We have Remark Note that to satisfy either (G 0 ) or (L 0 ) it is not necessary to find an element of least norm. Before leaving this section we recall from [41] a few properties of the operators D k and I that are essential in the analysis to follow. Proposition 3 [41, Proposition 1] a) The operator D k can be expressed as and for any z b) For any z; z c) For any z; z Remark An important consequence of Part c) above is that the operators P k and D k are Lipschitz continuous with Lipschitz constant 1, that is, they are non-expansive. Henceforth, we use of this fact. 4 On the Differentiability of T \Gamma1 and D k Just as Newton's method for minimization locates roots of the gradient, one can view the variable metric proximal point algorithm as a Newton-like method for locating roots of the operator D k . This perspective motivates our approach to the local convergence analysis. For this analysis, we require that the operator T \Gamma1 possesses certain smoothness properties. These properties in turn imply the smoothness of the operators D k . Smoothness hypotheses are used in the convergence analysis in much the same way as they are used in the convergence analysis for Newton's method. For example, recall that to ensure the quadratic convergence of Newton's method one requires the derivative at a solution to be both locally Lipschitz and non-singular. Non-singularity insures that the iterates are well defined and can be bounded, while the Lipschitzian hypothesis guarantees that the error in the linearization is quadratically bounded (see [29, 3.2.12 and 10.2.2]). We make use of similar properties in our analysis. In order to discuss the smoothness of T \Gamma1 and D k , we recall various notions of differentiability for multi-valued functions from the literature. For a more thorough treatment of these ideas in the context of monotone operators, we refer the reader to [1, 19, 26, 35, 42]. Definition 4 We say that an operator continuous at a point - (with modulus ff - 0 ) if the set \Psi( - w) is nonempty and there is a - ? 0 such that We say that \Psi is differentiable at a point - w) consists of a single element - z and there is a continuous linear transformation J H such that for some ffi ? 0, We then write w). Remarks 1) These definitions of Lipschitz continuity and differentiability for multifunction are taken from [41, pages 885 and 887] (also see [2, page 41]). Note that these notions of Lipschitz continuity and differentiability correspond to the usual notions when \Psi is single-valued. Rockafellar [41, Theorem 2] was the first to use Lipschitz continuity to establish rates of convergence for the proximal point algorithm. When the set \Psi( - w) is restricted to be a singleton f-zg, the differentiability of \Psi at - implies the Lipschitz continuity of \Psi at - Moreover, one can take ff(- This observation is verified in [41, Proposition 4]. It follows from the definition of monotonicity that if T is a maximal monotone operator, then the operator rT (x) is positive semi-definite whenever it exists. We now give a result that relates the differentiability of a multi-valued function to the differentiability of its inverse. The proof is omitted since it parallels the proof of a similar result for single-valued functions. Lemma 5 Assume that \Psi : H \Gamma! \Gamma! H is differentiable at - z with wg and with J \Gamma1 bounded. Also assume that \Psi \Gamma1 is Lipschitz continuous at - w with \Psi f-zg. is differentiable at - w with r\Psi In the two examples that follow, we examine the concepts introduced in Definition 4 when the operator in question is the subdifferential of a convex function. The first example illustrates that @f \Gamma1 can be Lipschitz continuous but not differentiable at the origin, while in the second example @f \Gamma1 is differentiable at the origin but @f is not differentiable on Example 6 Let z if z - 0 and T (z) := T \Gamma1 is Lipschitz continuous at 0 but is not differentiable at 0. Example 7 Let \Gammaz if z ! 0 z 5=3 if z - 0 and T (z) := z 2=3 if z ? 0 . y 3=2 if y - 0 . T \Gamma1 is differentiable at 0 with but T is not differentiable on T \Gamma1 (0). The super-linear convergence result of x7 requires the assumption that the operator T \Gamma1 be differentiable at the origin. Although this is a severe restriction on the applicability of these results, it turns out that in the case of convex programming it is a consequence of the standard second-order sufficiency conditions for constrained mathematical programs. This and related results were established by Rockafellar in [40, Proposition 2]. In this context, it is important to note that the second-order sufficiency condition is the standard hypothesis used in the mathematical programming literature to insure the rapid local convergence of numerical methods. So, at least in the context of constrained convex programming, such a differentiability hypothesis is not as severe an assumption as one might at first suspect. To the contrary, it is a bit weaker than the standard hypothesis employed for such results. For the sake of completeness, we recall a portion of Rockafellar's result below. Theorem 8 Consider the convex programming problem (1) given by otherwise, with m. Suppose that the following conditions are (i) The functions f i for are k - 2 times continuously differentiable in a neighborhood of a point - z 2 IR n . (ii) There is a Kuhn-Tucker vector - z such that - (iii) The gradients frf are linearly independent. (iv) The matrix Then the operator @f \Gamma1 is continuously differentiable in a neighborhood of the origin. Remark Theorem 8 follows by applying the implicit function theorem to the Kuhn-Tucker conditions for the parameterized problems minff(z) \Gamma hw; zig in a neighborhood of The relationship to @f \Gamma1 comes from the fact that @f zig. Rockafellar only establishes the result for 2. The extension to k ? 2 follows trivially from the implicit function theorem. We now examine the differentiability properties of the mapping D k . Two results in this direction are given. The first uses equation (8) to relate the differentiability of the operators T \Gamma1 and D k , while the second uses the definition of D k given in (6) to relate the differentiability of the operators T and D k . Proposition 9 Let w. The operator T \Gamma1 is differentiable at - y with bounded if and only if the operator D is differentiable at - z with In either case, we have Proof First assume that T \Gamma1 is differentiable at - y with r(T \Gamma1 )(-y) bounded. The differentiability of T \Gamma1 at - y clearly implies that of D \Gamma1 at - w with Since D is Lipschitzian with implies that D is differentiable at - z with derivative given by (10). Since r[D we conclude that the latter is bounded. Conversely, assume that D is differentiable at - z with (rD(-z)) \Gamma1 bounded. We show that D \Gamma1 is single-valued and Lipschitzian at - w. The result will then follow from Lemma 5. be as in Definition 4 for rD(-z). Since D is single-valued and rD(-z) surjective (it is invertible), we may apply a standard open mapping result from functional analysis (e.g. [8, Theorem 15.5]) to obtain the existence of a ae ? 0 and a Hence for each w 2 - is bounded, there is a - ? 0 such that Hence, by reducing ae and - if necessary, we may assume that wk for aeIB, where the second inequality follows since D is non-expansive. Therefore, we can assume that o(kz \Gamma - w+aeIB and z 2 D ffiIB). By substituting this into (12) and re-arranging, we obtain w+ aeIB and z 2 D We now show that (13) implies the existence of an ffl ? 0 such that D ffiIB. Indeed, if this were not the case, then there would exist sequences fw i g and fz i g such that z i its images are convex, hence, by (11), there exists a sequence f-z i g with - implies that for all This contradicts the fact that w w and k-z and so such an ffl ? 0 must exist. This fact combined with (13) implies that D \Gamma1 is Lipschitzian at - w with D now applies to yield the result. be defined as in (9). Let - D)(-z). The operator T is differentiable at - y with [I bounded if and only if the operator D is differentiable at - z with [I +rD(-z)] \Gamma1 bounded. In either case we have the formula Proof Replace D by P := I observe that D is differentiable at - z with [I +rD(-z)] \Gamma1 bounded if and only if P is differentiable at - z with [rP (-z)] \Gamma1 bounded. The proof now follows the same argument as in the proof of Proposition 9 with D replaced by replaced by T and - w replaced by - y. Propositions 9 and 10 say quite different things about the differentiability of D k . To illustrate this difference, observe that in Example 7, the operator T is not differentiable at 0, while T \Gamma1 and D are differentiable at 0. On the other hand, if we take with not differentiable at 0, while T and D are differentiable at It is also important to note that even if neither T nor T \Gamma1 is differentiable, D may be differentiable. But, in this case, we know from Propositions 9 and 10, that if D is differentiable and neither T nor T \Gamma1 is differentiable, then both rD(-z) and rP (-z) have to be singular or have unbounded inverses. For a further discussion of these issues in the context of finite dimensional convex programming see [35]. When T is assumed to be the subdifferential of a convex function f , Propositions 9 and can be refined by making use of the relation @f is the convex conjugate of f [39, Corollary 12A]. This allows us to extend [35, Theorem 1] and [35, Theorem 2] to the Hilbert space setting (also see [19, Theorem 3.1]). However, some caution in terminology is required since f is not necessarily twice differentiable in the classical sense at points where @f is differentiable in the sense of Definition 4. Indeed, @f may be multi-valued arbitrarily close to a point of differentiability. The best way to interpret this result is through Alexandrov's Theorem [1] which states that at almost every point - z in the interior of the domain of a convex function f : IR n 7! IR [f1g there is a quadratic function q - z such that In [19] and [35], the matrix r 2 q - z is called a generalized Hessian and is denoted Hf(x). Note that the existence of a generalized Hessian at the point - z guarantees that f is strictly differentiable at - z. Moreover, if @f(x) is single-valued in a neighborhood of a point - z at which Hf(-z) exists, then r 2 f(-z) exists and equals Hf(-z). We extend this terminology to the Hilbert space setting with the following definition. Definition 11 Let OE: H 7! IR [ f1g be a function on the Hilbert space H. We say that OE is twice differentiable in the generalized sense at a point - there is a continuous quadratic functional q - z such that z is called a generalized Hessian of OE at - z and is denoted by HOE(-z). With this terminology in hand, we apply Propositions 9 and 10 to the case of convex programming. The proofs of these results are not required since they are a direct translation of Propositions 9 and 10 into the terminology of convex programming. Corollary S f+1g be lower semi-continuous and convex. Let - and set - differentiable at - z with bounded if and only if f has a generalized Hessian at - y with [I bounded. In either case we have S f+1g be lower semi-continuous and convex. Let - and set - differentiable at - z with [I +r 2 f -z)] \Gamma1 bounded if and only if f is twice differentiable in the generalized sense at - y with [I In either case we have Remark As observed earlier, the generalized Hessian is necessarily positive semi-definite. This observation can be used to further refine the statement of Corollaries 12 and 13. 5 Newton Operators In this section we study the operators associated with the variable metric proximal point iteration: This notation emphasizes the fact that these operators produce Newton-like iterates. Just as in the case of the classical Newton's method for equation solving [29, x12.6], one of the keys to the convergence analysis is to show that these operators are contractive with respect to the solution set T \Gamma1 (0). Clearly the operators N k are single-valued. Moreover, fixed points of the operators N k are solutions to the inclusion 0 2 T (z) since Thus, conditions that ensure that the operators N k are non-expansive with respect to are important for the global analysis of the variable metric proximal point iteration. To obtain this property, we impose the following conditions on the linear transformations g. Each H k is a continuous linear transformation with continuous inverse. (H2) There is a nonempty closed bounded subset \Gamma of T \Gamma1 (0) such that where Remark The set \Gamma in (H2) is used to guarantee the boundedness of the sequence fz k g. By taking one can show that every weak cluster point of the sequence fz k g is an element of T \Gamma1 (0). It was observed by Iusem [13] that if T \Gamma1 (0) is bounded and one takes then the sequence fz k g has a weak limit z Theorem 17 and [41, Theorem 1]). Hypothesis (H1) is standard and is automatically satisfied in the finite dimensional case. On the other hand, hypothesis (H2) is quite technical and requires careful examination. This hypothesis is problematic since it specifies that the matrices H k satisfy a condition that depends on the unknown values oe k and kD k (z k )k. We will show that in certain cases it is possible to satisfy (H2) without direct knowledge of these unknown values. This is done in two steps. First it is shown in Lemma 14 that if T \Gamma1 is Lipschitz continuous or differentiable at the origin, then fl k is bounded below by a positive constant (which can be taken to be 1=6 as kD k (z k )k approaches zero). Then, in Lemma 15, it is shown that (H2) is satisfied if a related condition in terms of H k and w k is satisfied. Taken together, these results imply that at least locally (H2) can be satisfied by checking a condition based on known quantities. Further insight into hypothesis (H2) can be gained by considering the case in which T \Gamma1 is differentiable at the origin. In this case H k is intended to approximate \Gamma(rD k (0)) k J . Therefore, one can guarantee that (H2) is satisfied by choosing c k sufficiently large and H k - I. This fact is used in [6] to establish the super-linear convergence of the method when the H k 's are obtained via matrix secant updating techniques. The purpose of hypothesis (H2) is to globalize what is essentially a local algorithm (Newton's method). In the context of convex programming, one commonly obtains global convergence properties with the aid of a line search routine applied to the objective function f , or its regularization f - . However, in the operator setting there is no natural underlying objective function to which a line search can be applied. This is a key difference between the approach taken in this paper and those in [3, 7, 10, 18, 20, 24, 36]. In the convex programming setting, the global convergence of the VMPPA is driven by a line search routine applied to the objective function f (or its regularization f - ). In the operator setting, hypothesis (H2) replaces the line search and the associated hypotheses needed to make the line search strategy effective (such as the finite-valuedness of the objective function f and the boundedness of the sequence fH k g). On the other hand, when it is known that the operator T is the subdifferential of a finite-valued finite dimensional convex function, then the algorithm of this paper can be modified to include the line search routine of Chen and Fukushima [7] thereby avoiding the need for hypothesis (H2) [6]. We now show three cases where the fl k 's are bounded away from zero. Lemma 14 Suppose T \Gamma1 (0) is nonempty. (i) If the operator T is strongly monotone with modulus -, then T and 5+2=- for all k. (ii) If the operator T \Gamma1 is Lipschitz continuous at the origin with modulus ff, then dist for all k such that kD k (z k )k - where - is given in Definition 4. Moreover, if 5+2ff for all k such that kD k (z k )k - . is differentiable at the origin with derivative J , then T there is a such that for all k with kD k (z k )k - we have and for all k, where oe(- Proof (i) If T is strongly monotone with modulus -, then kz \Gamma z any z; z single-valued and continuous. Let z where 3 (a) we have Hence since I. By the definition of fl k , This establishes the result since c k - 1 for all k. (ii) If kD k (z k )k - , Definition 4 implies that or hence (15) holds. If T then the lower bound on fl k follows as in Part (i). (iii) This result follows as in Part (ii) using the second remark after Definition 4. When w k - D k (z k ), one can establish the inequality in hypothesis (H2) from a related condition on the vectors w k . A specific technique for accomplishing this is given in the following lemma. Lemma be such that and let H k be a continuous linear transformation from H to itself. If z then Therefore, if (H1) and criterion (L) are satisfied, and if - and the sequence f(-fl defined in (H2)), then hypothesis (H2) is satisfied. Proof Now from (16) and (17), we have hence Again by (17), since the inequality - fl k - 1=3 implies that -+ 6 - 1. We conclude this section by showing that the operators N k are non-expansive with respect to the set T \Gamma1 (0). Proposition nonempty. If the linear transformations fH k g satisfies hypotheses (H1) and (H2), then for all k we have kH k D k (z k )k - 3kD k (z k )k and Proof Let - z 2 \Gamma. From the definitions of P k and N k , we have hence From hypothesis (H2), we have Hence Then, again by hypothesis (H2), Thus, from (20) and (21), Letting z in Proposition 3 Part (c) yields From (22) and (23) we have We now consider ff . If ff k - fl k, then (18) holds by (24). Suppose that From (19), we have Therefore, by (23), Using the inequality 2a for a ? b ? 0, zk But kD k (z k )k From (25) we again obtain (18). 6 Global Convergence The statement and proof of the global convergence result given below parallels the development given by Rockafellar in [41, Theorem 1] for the classical proximal point algorithm. Theorem 17 Let fz k g be any sequence generated by the variable metric proximal point algorithm under criterion (G) (or (G 0 )). Suppose that the solution set T \Gamma1 (0) is nonempty and the sequence of linear transformations fH k g satisfies the hypotheses (H1) and (H2). Then the sequence fz k g is bounded, each weak cluster point of this sequence is an element of 0: If it is also assumed that T \Gamma1 (0) is bounded and in (H2), then there is a - z converges weakly to - z. In order to establish this result we require the following technical lemma whose proof is straightforward and so is omitted. Lemma Suppose the nonnegative sequences fffl k g satisfies is a nonnegative sequence satisfying u is a Cauchy sequence. Proof of Theorem 17 We begin by showing that the limit lim k kz exists for every - z 2 \Gamma. To this end let - observe that the definition of N k and Proposition imply that Therefore, Lemma implies that the sequence fkz zkg is Cauchy and so -z) exists for every - z 2 \Gamma. An immediate consequence of the existence of these limits is the boundedness of the sequences fz k g and oe k . We now show that the sequence fD k (z k )g converges strongly to the origin. Indeed, if this is not the case, then there is a subsequence J ae This in turn implies that inf J due to the boundedness of the sequence foe k g. Let - z 2 \Gamma. By Proposition 16, z +N k (z k with fC k g bounded, where the final inequality follows from criterion (G). Hence whereby we obtain the contradiction Therefore, lim k kD k (z k Next let J ae be such that the subsequence fz k g J converges weakly to z 1 , i.e. z 1 is a weak cluster point of the sequence fz k g. We show that z 1 must be an element of T \Gamma1 (0). From Proposition 3 (a), we have that \Gamma 1 or equivalently, hz \Gamma z all k and z; w with w 2 T (z). Taking the limit over J yields the inequality for all z; w with w 2 T (z). Since T is maximal monotone, we get Under the assumption that (0), the argument showing that there is no more than one weak cluster point of fz k g is identical to the one given by Rockafellar in ([41] Theorem 1). Remark To ensure the strong convergence of the sequence fz k g, one again requires a growth condition on the inverse mapping T \Gamma1 in a neighborhood of the origin. Rockafellar has shown that Lipschitz continuity of T \Gamma1 at the origin suffices for this purpose [41, Theorem 2]. Other conditions can be found in the work of Luque [21, Proposition 1.2]. The results of Rockafellar and Luque are easily extended to the variable metric proximal point algorithm. 7 Convergence Rates 7.1 Linear Convergence Just as in Rockafellar [41, Theorem 2], we require that the operator T \Gamma1 is Lipschitz continuous at the origin in order to establish that the convergence rate is at least linear. Theorem 19 Let fz k g be any sequence generated by the variable metric proximal point algorithm satisfying both criterion (G) and (L) for all k. Assume that T \Gamma1 is Lipschitz continuous at the origin with modulus ff and the solution set T \Gamma1 (0) is a singleton f-zg. If the sequence fH k g satisfies the hypotheses (H1) and (H2) with then the sequence fz k g strongly converges to the solution and there is an index - k such that where oe k satisfies limsup k!1 oe k ! 1. That is, the convergence rate is linear. Proof By Theorem 17, we have kD k (z k )k ! 0. Hence, Part (ii) of Lemma 14 implies that converges strongly to - z. We now establish the linear rate. be as in Definition 4 and let ~ k be such that k 1 Proposition 3 (a) and the Lipschitz continuity of T \Gamma1 at 0, we have Hence relation (14) and hypothesis (H2) yield zk Let a k := ff Using (26) and (27), Let . By Proposition 16 and Lemma 14 we have, for k - ~ k, that By (28) and (29), when k - ~ k a 2 . From (30) we have By (31), criterion (L) (or (L 0 )), and Proposition 3 (c), zk . Since there is a ~ for any k, and sufficiently large. Moreover, we have limsup k!1 oe limsup ffi. 7.2 Super-linear Convergence We now give an analog of Dennis and Mor'e 's [14] characterization theorem for the super-linear convergence of variable metric methods in nonlinear programming that applies to the VMPPA. This result is used in [6] to establish the super-linear convergence of the variable metric proximal point algorithm when the Broyden (non-symmetric case) or the BFGS (symmetric case) updating formulas are used to generate the matrices H k . Theorem 20 Let fz k g be any sequence generated by the variable metric proximal point algorithm satisfying criterion (L) for all k. Suppose that the operator T \Gamma1 is differentiable at the origin with T converges to the solution - z super-linearly if and only if Remark By Proposition 9 we have Consequently, condition (32) can be recast in the more familiar form given in [15, Theorem 8.2.4]. Note that the assumption in (32) on the sequence fH k g is much weaker than assuming that this sequence converges. Specific choices of the linear transformations H k satisfying (32) are discussed in [6]. The proof of Theorem 20 requires the following lemma. Lemma 21 Under the conditions in Theorem 20 we have zk)IB, for all k sufficiently large. Proof For part (a), let ffi ? 0 be such that z ae o(kwk)IB (33) be such that whenever k ? - k 1 , kD k (z k )k - ffi. Then, by (33) and Proposition 3 (c), when k ? - We now prove (b). Note that N k (z k hence by criterion (L) Therefore by (34) and Proposition 3 (c), Proof of Theorem 20: Let ~ z k+1 := N k (z k have ~ z Hence z z or equivalently, z z z z k+1 ))] By Lemma 21 the first and third of the three terms appearing on the right hand side of this inclusion can be bounded by an expression of the form o(kz zk)IB. If (32) holds, then Therefore there are positive sequences fff 1k g and fff 2k g each converging to zero such that, for k ? - zk be such that ff 1k ! 1for all k ? - k 2 . Then, denoting ff 1k +ff 2k by - k , zk converges to - z super-linearly. Conversely, suppose that lim zk zk Divide (35) by kz From (36) and Lemma 21 we obtain However, from (36) we have zk zk zk as k !1. Hence (32) holds. Concluding Remarks In this paper, we introduced a new proximal point algorithm for solving the inclusion is an arbitrary maximal monotone operator. The global convergence of the algorithm is demonstrated with an inexact solution at each step. This is important in practice, since solving for the exact solution at each step is impractical, and may in fact be almost as difficult as solving the original problem. If it is assumed that T \Gamma1 is Lipschitz continuous at the origin, then the method is shown to be linearly convergent. If it is further assume that T \Gamma1 is differentiable at the origin, then the classical characterization of super-linear convergence due to Dennis and Mor'e also holds for the VMPPA. In [6], this characterization of super-linear convergence is applied to establish the super-linear convergence of the method when certain matrix secant updating strategies are employed to generate the matrices H k . In [5], we give some of the implementation details in the case of convex programming. We show how to apply the method to solve the associated primal, dual, and Lagrangian saddle point problems. In particular, it is shown how the bundle technique [17] can be applied to satisfy the approximation criteria (L) and (G) in both the primal and saddle point solution techniques. Preliminary numerical results comparing these three approaches are also presented. Acknowledgments The authors would like to thank the reviewers for their thorough work. Their comments and suggestions have greatly contributed to our exposition. In particular, we would like to thank Professor Alfredo Iusem of observing an error in an earlier version of Theorem 17 and for his suggested revision of this result when the set T \Gamma1 (0) is assumed to be bounded. --R The existence almost everywhere of the second differential of a convex function and some associated properties of convex surfaces. A family of variable metric proximal point methods. The method of successive projection for finding a common point of convex sets. Application of a variable metric proximal point algorithm to convex programming. On the super-linear convergence of the variable metric proximal point algorithm using Broyden and BFGS matrix secant updating Proximal quasi-Newton methods for nondifferentiable convex optimization Nonlinear Functional Analysis. Splitting Methods for Monotone Operators with Application tp Parallel Optimization. A globally and superlinearly convergent algorithm for non-smooth convex minimization New proximal point algorithms for convex minimization. A decomposition method and its application to convex programming. Personal communication A characterization of superlinear convergence and its application to quasi-Newton methods Numerical Methods for Unconstrained Optimization and Nonlinear Equations. The proximal points algorithm for reflexive Banach spaces. Bundle methods in nonsmooth optimization. An approach to variable metric bundle meth- ods Practical aspects of the Moreau-Yosida regularization i: Theoretical preliminaries Variable metric bundle methods: from conceptual to implementable forms. Asymptotic convergence analysis of the proximal point algorithm. Regularisation d'inequations variationelles par approximations successive. Determination approach'ee d'un point fixe d'une application pseudo A quasi-second-order proximal bundle algorithm Control dan les inequations variationelles elliptiques. Proximit'e et dualit'e dans un espace Hilbertien. Iterative Solution of Nonlinear Equations in Several Variables. Nonsmooth equations: Motivation and algorithms. A globally convergent Newton method for SC 1 problems. Weak convergence theorems for nonexpansive mappings in Banach spaces. Convex Functions Convergence analysis of some algorithms for solving nonsmooth equations. A preconditioning proximal Newton method for nondifferentiable convex optimization. A nonsmooth version of Newton's method. The Variable Metric Proximal Point Algorithm: Theory and Application. Conjugate Duality and Optimization. Augmented Lagrangians and applications of the proximal point algorithm in convex programming. Monotone operators and the proximal point algorithm. Maximal monotone relations and the second derivatives of nonsmooth functions. Partial inverse of a monotone operator. Applications of the methods of partial inverses to convex programming: Decomposition. --TR
variable metric;global convergence;maximal monotone operator;proximal point methods;convergence rates
309228
Convergence of a Class of Inexact Interior-Point Algorithms for Linear Programs.
We present a convergence analysis for a class of inexact infeasible-interior-point methods for solving linear programs. The main feature of inexact methods is that the linear systems defining the search direction at each interior-point iteration need not be solved to high accuracy. More precisely, we allow that these linear systems are only solved to a moderate accuracy in the residual, but no assumptions are made on the accuracy of the search direction in the search space. In particular, our analysis does not require that feasibility is maintained even if the initial iterate happened to be a feasible solution of the linear program. We also present a few numerical examples to illustrate the effect of using inexact search directions on the number of interior-point iterations.
Introduction Since the publication [6] of Karmarkar's original interior-point algorithm for linear programs, numerous variants of the method have been developed; see, e.g., Kojima, Mizuno, and Yoshise [8], Megiddo [13], Monteiro and Adler [17], and Tanabe [21]. Especially interesting is the algorithm by Kojima, Megiddo, and Mizuno [7], since it is also practically efficient; see, e.g., [9]. Numerical Analysis Manuscript No. 96-16, Bell Laboratories, Murray Hill, New Jersey, September 1996. Available on WWW at http://cm.bell-labs.com/cs/doc/96. 1.1 Inexact Interior-Point Methods The motivation for the study in this paper is to provide a theoretical justification for recent modifications of the algorithm [7] in which the search directions are computed only inexactly at each interior-point iteration. One feature of such inexact interior-point methods is that they allow the use of iterative techniques to approximately solve the linear systems defining the search directions. For example, in [3], we employ a preconditioned QMR algorithm for the iterative solution of these linear systems. First, we describe a modification of the algorithm in [7] that is adapted to inexact computations of the search directions, and then we show its global convergence. Our goal is to design an algorithm such that the number of iterations to solve a given linear program under "reasonably" inexact computations is not much higher than for the algorithm in [9]. We are aware that the algorithm in [9] has been improved in the meantime; see, e.g., [10] and many other more recent publications. However, we are not aware of any more efficient algorithm that is readily extended to inexact computations. In some applications, an initial strictly dual-feasible solution of the linear program is known. For such problems, in [18], an implementation of a primal-infeasible dual-feasible interior-point method is presented and results of numerical experiments are reported. Our approach originates from [3], and it is distinctly different from [18]. In particular, the method of our paper also converges even if there is no strictly dual-feasible solution. 1.2 Outline The outline of this article is as follows. In Section 2, we formulate the linear program in standard form and state our assumptions. In Section 3, we describe the class of inexact interior-point methods studied in this paper. In Section 4, we discuss issues in defining appropriate inexact search directions. In particular, we explain why we assume a certain accuracy requirement, and how we can achieve it. In Section 5, we establish global convergence. In Section 6, we make some concluding remarks. Finally, in an Appendix, we define a certain condition number of a linear program, and explain how it relates to our analysis in Section 5. 1.3 Notation Throughout the paper, we use the following notation. Lower-case letters are used for vectors, and upper-case letters are used for matrices. For a vector denoted by a lower-case letter, the upper-case version means the diagonal matrix whose diagonal elements are the components of the vector. For example, is the diagonal matrix associated with the vector . By e we denote the vector . The vector norm x T x is always the Euclidean norm, and denotes the corresponding Euclidean matrix norm. The notation means that all components of the vector x are positive (respectively, nonnegative). Instead of x - 0, we also write x 2 IR n . The same symbol, 0, will be used to denote the number zero, the zero vector, and the zero matrix. When 0 denotes the zero vector or the zero matrix, then its length or dimension, respectively, will always be clear from the context. The capital letter I is used to denote the (square) identity matrix; its size will always be apparent from the context as well. 2. The Problem 2.1 Formulation and Optimality Conditions We consider linear programs in the standard form minimize x2IR n c T x subject to (1) We assume that A is a given real m \Theta n matrix, and b and c are given real vectors of length m and n, respectively. The dual problem to (1) can be written as maximize subject to A T y (2) The Karush-Kuhn-Tucker optimality conditions for the primal-dual problems (1) and (2) can be stated as follows: Equations (3) and (4) are referred to as primal and dual feasibility, respectively, and the nonlinear equation (5) is called the complementarity condition. 2.2 Assumptions In the sequel, we always assume that A has full row rank. Theoretically, this assumption could be enforced by computing a singular value decomposition of A, but given a sparse constraint matrix A, this is not done in practice. Instead, a given linear program is typically preprocessed before an interior-point method for its solution is applied; see, e.g., [1, 5]. For example, simple heuristics are used to detect fixed variables, empty rows and columns, redundancies, and certain implicit dependencies. These heuristics are often sufficient to reduce the linear program not only in size but also to a form that the matrix A has linearly independent rows, even if the constraint matrix of (1) in its initial form has not. The convergence analysis of our inexact interior-point method depends on the smallest singular value, oe min (A), of A. The smaller oe min (A), the higher the accuracy that is required at each step of the method. We now briefly discuss the size of oe min (A), assuming that all rows of A are scaled to Euclidean norm 1. We then have 1 - oe is the largest singular value of A. When oe min (A) is very small, the linear program (1) is not well-conditioned. However, assuming that oe min (A) is large (say greater than 0:1) does not imply that the problem (1) is well- conditioned. In fact, also for 0 - oe min (A) - 1, the linear program may be degenerate, and then the pair of primal-dual problems has infinite condition see the Appendix. In particular, prior to solving a given linear program (1), the problem could always be transformed into an equivalent linear program with a constraint matrix A 0 such that oe min since A is assumed to have full rank, the matrix A T admits a QR factorization of the form where Q is an orthogonal n \Theta n matrix with Q 1 denoting its first m columns, and R 1 is a nonsingular upper triangular matrix. By means of (7), the equality constraints in (1) can be rewritten as follows: The reformulation Q T 1 b of the equality constraints is obviously well-conditioned with oe min (Q T theoretically, one might first compute the QR factorization (7) as well as R \GammaT (possibly with higher accuracy than the standard machine precision), and then solve the transformed linear program. Unfortunately, the reformulation (8) typically destroys the sparsity of the constraint matrix, as Q T may have considerably more nonzero entries than A, and therefore, this reformulation is not used in practice. We do, however, assume in the sequel that a positive lower bound, for the smallest singular value of the original constraint matrix A is available. 3. A Class of Inexact Interior-Point Algorithms The class of algorithms considered in this paper generates a sequence of iterates that simultaneously converge to feasibility and optimality. To guarantee convergence, we require that all iterates lie in a certain set N . 3.1 An Infinity-Norm-Neighborhood of the Perturbed Path The set N depends on some initial point and a real number - ? 0 be given such that x For a real number fi ? 1, a neighborhood N defined by the set of equalities (11) and the two sets of inequalities (12) and (13) below. A point belongs to N (fi) if there exist vectors such that and e A closely-related neighborhood was proposed in [7]. The new element in the above definition is the perturbation vectors ~ b; ~ c in (11) and (12); in [7], the vectors ~ b and ~ c are zero. Unless some good initial estimate the solution of problems (1) and (2) is available, we will think of - as a large number, - AE 0, and of x large vectors. The set N is a "wide" infinity-norm-neighborhood of the "perturbed path" It is well known that there exists a unique solution (x; of (14)-(16) for each t 2 (0; 1], provided (3), (4), and (6) have a solution and A has full rank; see, e.g., [8, 13]. Above, "infinity-norm" refers to the neighborhood with respect to the nonlinear equation -e, while the deviation from the linear equalities is measured in the Euclidean norm. The requirement on the size of ~ b in (12) could be weakened slightly by requiring kR \GammaT~ bk -=2 where R 1 is as in (7) and (8). However, our goal is to formulate a method that does not require the QR factorization (7). To emphasize this principle, we formulate the neighborhood in terms of the lower bound (9), oe, on the smallest singular value of A. 3.2 The Newton Step The class of interior-point algorithms considered in this paper can be viewed as variants of damped Newton's method applied to the system of equations c; -e: are nonnegative numbers. They are adjusted at each iteration of the interior-point method such that they converge to zero in the course of the algorithm. The step lengths in the damped Newton method are suitably chosen to guarantee that (x; Applying Newton's method to (17)-(19) yields the system of linear equations A T \Deltay for the Newton correction (\Deltax; \Deltay; \Deltas). We now denote by the right-hand sides in (20)-(22). Then, after a reordering, the linear system (20)-(22) can be written in the form 2X S 0 I 0 A T \Deltas \Deltax \Deltay5 =4 with a 3 \Theta 3-block matrix. In our algorithm, the systems (24) are not solved exactly but only to a given accuracy in the primal and dual residual, As we will explain in Section 4, it is meaningful and easily possible to solve the last equation in exactly (up to machine precision), even when allowing possibly larger errors " x and " s for (20) and (21). In Section 4, we will also define appropriate values for " x and " s . 3.3 An Infeasible-Interior-Point Algorithm Let be the iterate at step k of the interior-point method, and let (\Deltax; \Deltay; \Deltas) be the solution of the linear system (24). Then, an improved iterate at the next step, k + 1, is obtained via where the step lengths ff x and ff s are chosen such that is a parameter that can be chosen very close to 1. The sole purpose of this parameter is to ensure that the possibility of ff The class of algorithms considered in this paper is designed to support the iterative solution of the linear systems (24) (as in [3]). The concept of an algorithm using an iterative solver is based on the following principles. predictor-corrector strategy is applied since solving for the corrector step is approximately as expensive as solving for the predictor step. (This is in contrast to the standard methods based on direct solvers that use the same sparse factorization of some reduced version of the coefficient matrix of (24) for the predictor and the corrector step.) ffl Relatively short steps (i.e., not the usual 99.995% of the way to the boundary) are taken. This is done for two reasons. First, if the search direction is computed to low relative accuracy, a long step is not meaningful, and secondly, very long steps might worsen the condition number of the linear systems. The stopping criterion in the interior-point algorithm is based on the error measure ck Algorithm 1 (Inexact infeasible-interior-point algorithm) INPUT: Parameters and an initial point For If by solving the linear system (24) (with right-hand side (23) and to an error satisfying (25) with " Choose ff k x \Deltax; s \Deltas: 3 to -n Next, we specify the choice of the parameters - k s and the step lengths ff k s in the above algorithm. This choice guarantees that all iterates remain in the neighborhood N (fi); see Theorem 1. 3.4 Specifications of the Algorithm The quantities ff k s , and - k 3 depend on three additional input parameters - 1 , - 2 , and - 3 of the Step We set and - k For later use, we note that The number - k 3 depends on an additional quantity fl k . First, the number fl k is chosen such that min and then we set - k . The possibility of a small choice of fl k for small ffi(x k ; y is to allow for superlinear convergence. Step The accuracy in (24) for solving A(x is chosen as x := -oen for the primal residual, and as s := -n for the dual residual. Here, x s where ff ant x and ff ant s are anticipated values for the actual step lengths ff k x and ff k s , respectively. These values need to be chosen such that In general, the values of ff ant x and ff ant s will depend on k. Given any approximation or guess (\Deltax; \Deltay; \Deltas) for the solution of (24), values for ff ant x and ff ant s can be computed easily, for example, by using the step-length strategy (35) and (36) below. With these values of ff ant x and ff ant s , one then s in (29) and (30), and subsequently, one checks if the current approximation (\Deltax; \Deltay; \Deltas) satisfies the accuracy requirements (29) and (30). If yes, (\Deltax; \Deltay; \Deltas) is accepted as a sufficiently accurate solution of (24). If not, one continues the iterative method used for the inexact solution of (24), until the stopping criteria (29) and (30) (with appropriately updated values of ff ant x and ff ant s are met. Step To determine the step lengths ff k s at iteration step k, we first compute - ff k as the maximum such that the point for all 0 - ff - ff. As we will see below, the definition of " k s in (29) and (30) guarantees that (12) holds as well, and thus, Furthermore, we will show that - ff k is always positive and bounded away from zero. Then ff k are chosen as to satisfy i x \Deltax s \Deltas as well as (fi). The rules (33) and (34) were proposed in [7], and there, a cheap way of computing - ff k is also discussed. ffl In [3], an adaptive choice of the step lengths ff k s was proposed using the following strategy that is based on two further parameters - 4 - 1 and - 5 2 (0; 1) with suggested default values First, one determines and chooses ae k such that Then one sets x and ff k The motivation for this strategy is that fl k being small implies a large reduction in comple- mentarity, and - x and - s being close to 1 implies a large reduction of infeasibility by the full Newton step. If both is the case, a large ae k seems profitable even though it may bring the iterate close to the boundary of the feasible set. Therefore, ff k s may be a practically efficient choice. When - 3 ! 1 is close to 1, the constraint (34) on the step lengths is fairly weak, and the above choice of ff k x ; ff k s may satisfy (34) for most iterations k. If (34) is not satisfied or if the result does not lie in N (fi), then step lengths that do satisfy these criteria may be computed as in [7]. The main computational effort in Algorithm 1 lies in the solution of the systems (24). Before solving these systems, we first employ the stable reduction described in Section 4.1 below to reduce the 3 \Theta 3-block system to a smaller 2 \Theta 2-block system. The smaller systems can be solved by either a direct method (see, e.g., [2, 22]), or by an iterative method, such as the one proposed in [3]. 3.5 The Main Result The main result, which is stated as Theorem 1 in Section 5 below, is that all iterates generated by Algorithm 1 remain in the neighborhood N (fi). Furthermore, the iterates either converge to the set of optimal solutions if this set is nonempty, or it is detected that no optimal solution exists whose norm is less than a given bound. The result that the iterates remain in N (fi) is a consequence of the following two features of Algorithm 1. (i) The first two equality constraints in (11) are trivially maintained by a suitable update of ~ b and ~ c, while the third equality constraint in (11) is trivially satisfied due the choice of 3 in Algorithm 1. (ii) The norm constraints (12) on ~ b and ~ c are guaranteed by a proper choice of " x and " s , and the inequality constraints (13) on Xs and on the t i 's are maintained by selecting suitable parameters 4. Inexact Search Directions In this section, we discuss how the accuracy requirement in Step 3) of Algorithm 1 can be satisfied, and why we have chosen this type of accuracy requirement. 4.1 A Stable Reduction of the 3 \Theta 3-Block System To show how a search direction satisfying an accuracy requirement of the form (25) can be obtained in practice, we first review the stable reduction (introduced in [3]) of the 3 \Theta 3-block system (24) to a linear system with the 2 \Theta 2-block matrix The basis of the stable reduction is a partition 1 of the vectors x and s into two parts x 1 , x 2 and respectively, such that x 1 Moreover, for the ease of notation, we assume that x 1 and s 1 are the leading entries of x and s, i.e., and In this subsection, we do not refer to specific components of the vectors x or s; instead x 1 and s 2 always denote vectors containing all "large" components of x and s, respectively. We partition the constraint matrix A conforming with (37), and write Similarly, (37) induces the partition and of the residual vectors p and q defined in (23). As usual, we denote by X 1 , X 2 , S 1 , and S 2 the diagonal matrices associated with the vectors x 1 , x 2 , s 1 , and s 2 , respectively. Instead of the original system (24), we propose to solve the equivalent reduced 2 \Theta 2-block system - \Deltay ~ r ~ where ~ r := and ~ Furthermore, the new variable u is connected with x 1 and s 2 via the relation \GammaX Using (37)-(39), (41), and (42), together with one readily verifies that the reduced 2 \Theta 2-block system (40) is indeed equivalent to the original system (24). We consider interior-point methods that solve the reduced system (40) (iteratively) to a low relative accuracy, and thus obtain only an approximate solution. Given such an approximate solution u, \Deltay of (40), the quantity \Deltax 1 is computed by using the relation (42). Note that We stress that the choice of this partition may be changed, for example, to further reduce the primal residual at the cost of the dual residual. In preliminary numerical experiments, it was our observation that a partitioning according to x1 - s1=10 and x2 ! s2=10 might be slightly more efficient. computing \Deltas 2 from (42) would involve the inverse of the "small" matrix X 2 . This can be avoided by computing \Deltas 2 via and then obtaining \Deltax 2 and \Deltas 1 from (43). In the above computations, only the inverses of the "large" matrices X 1 and S 2 are used, but not X \Gamma1 2 or S \Gamma1 1 . Furthermore, we remark that the partition of x into x 1 and x 2 has nothing to do with guessing active indices. The partition is merely done to improve the stability for solving the current linear system, it does not involve any additional computational cost, and there is no loss if the partition changes at each iteration. 4.2 Motivation of Inexactness Requirements Next, we further motivate our requirement in Step 3) of Algorithm 1 on the accuracy of the computation of the search directions in (25). We implicitly assume that we could compute the search direction to arbitrarily high precision, but that we are not willing to invest more computational effort for more accuracy than necessary. To guarantee convergence of the interior-point method even for inexact search directions, we need a careful analysis of the errors introduced by the inexactness of the search direction. Assume for the moment that we set - in (24). If (\Deltax; \Deltas; \Deltay) solve the linear systems (24) exactly, then, by the linearity of r, the primal residual r + at Thus, the norm of the primal residual r is reduced by the factor 1 \Gamma ff x in the case of exact solution of (24). If we allow for some tolerance " in the approximate solution of (24) by requiring that \Deltax is merely computed to a certain relative accuracy in the residual, instead of straightforward computations, we have inexact The result r inexact obtained from inexact computations is almost as good as the result obtained from exact computations. Above inequality also shows that the size of ff x is important for the reduction of r. It is obvious that the maximum feasible step lengths - ff s are very sensitive functions of the accuracy of the third residual q in (19), especially if the current iterate is close to the boundary of the positive orthant. We therefore assume, that the stable reduction (43) above is used so that q holds true. Of course, analogous considerations as above for r and r + also hold for p and p + . Finally, we remark that criterion (44) is not satisfactory in this form for the following reason. An iterative approach for solving the linear systems requires that we allow for a low relative accuracy even if the initial residual happened to be zero, i.e., if Ax criterion (44) does not allow any increase in the residual. We therefore do not use criterion (44) but a more appropriate modification of (44), which is discussed next. 4.3 Analysis of the Perturbed Feasible Sets We consider the perturbed constraints, that are part of the relations defining N (fi). In the following proposition, we give a condition on the perturbation vectors ~ b and ~ c that still guarantees the feasibility of (46)-(48). This result is crucial for the convergence analysis in the next section. Furthermore, we remark that the lower bound (9) on the smallest singular value of A is used only in the proof of this result. Proposition 1 Assume that the problems (1) and (2) have an optimal solution. If x then the constraints (46)-(48) have a feasible solution for all perturbation vectors ~ b; ~ c with and for all In particular, there exists a feasible solution (~x; ~ s) of (46)-(48) with ~ x -2 -t 1 e and ~ e: Moreover, if t can be chosen to satisfy Proof: Let the point (-x; - s) be a feasible solution of (1) and (2), i.e., it satisfies the constraints (3), (4), and (6). We need to construct a feasible solution (~x; ~ s) of (46)-(48). To this end, we first set h := A +~ b, where A + denotes the pseudoinverse of A (see, e.g., [20]). The vector h clearly satisfies Moreover, since and by the first inequality in (49), we have We now define (~x; ~ ~ Using (3), (4), (52), and the definition of - b; - c in (10), one readily verifies that the point (~x; ~ satisfies (46) and (47). It remains to show (50) and (51). Note that (53) implies h - \Gamma- e=2. Together with - x - 0, it follows from (54) that which is just the first inequality in (50). Note that, by the second inequality in (49), we have and thus ~ Together with (55), this implies the second inequality in (50). Finally, (51) follows from (54) (with t Here, we would like to stress our observation of Section 2, that theoretically, one can transform problem (1) to an equivalent problem such that prior to applying the interior-point method, and practically, when this transformation is not appropriate, we may still anticipate that 1=oe is moderate even if (1) happened to be poorly conditioned. In particular, degeneracy or near- degeneracy do not depend on oe. 4.4 Required Accuracy In the course of Algorithm 1, the vectors - are reduced to t k- b and t k respectively. Furthermore, by the inexactness of the search direction, "new" perturbation vectors ~ b k and ~ c k are introduced. More precisely, we have where ~ b k and ~ c k are defined as follows: We now show that the vectors (56) remain bounded, provided that in Step 3) of Algorithm 1 the search directions are computed to the accuracies " s defined in (29) and (30), respectively. Proposition 2 For all iterates computed by Algorithm 1, the associated perturbations vectors ~ b k and ~ c k defined in (56) satisfy Proof: The proof is by induction on k. For A T y thus (57) is trivially satisfied for Now assume that (57) holds for some k - 0. We show that then (57) is also satisfied for k + 1. We will only verify the first relation in (57); the second relation is treated analogously. Recall that where we omitted indices in 1 . Using (56) (with k replaced by (58), we obtain By the first relations in (56) and (57), respectively, we have Taking norms in (59) and using (29) and (60), it follows that Next, recall from (27) and (32) that - 1 - t 1 and ff - ff ant x . Thus, together with the definition of 1 in (31), it follows that Using the definition of " x in (29), we further obtain Inserting (62) into (61) and using t k+1 This is just the desired first relation in (57) (with k replaced by k 1). Remark: When - k the upper bound (62) for " k x reduces to x To relate this to some statement about relative accuracy, we point out that the norm of the right-hand side r in (23) is bounded by 2t k 1). Note that - and k - bk are known and k - bk=- can easily be bounded for a suitable choice of x 0 . If k - bk is zero or very small compared to -, the concept (44) of solving for a certain relative accuracy is more restrictive than (29), and if k - bk is large, say k roughly means that x This is in the spirit of (44), except for the additional factor t k 1. (Likewise for p.) Conditions implying that for very small t k 2 a high relative accuracy is required, coincides with the desire of a higher relative accuracy in the final iterations of the interior-point method to obtain superlinear convergence. 5. Convergence Analysis In this section, we present a proof of convergence of the inexact interior-point Algorithm 1. Proposition 3 If the primal and dual linear programs (1) and (2) have an optimal solution, then the x- and s-components of the neighborhood N (fi) are bounded, i.e., there exists a constant M 1 such that Furthermore, if (1) and (2) have a solution (-x; - s) with ks for all (x; Proof: This proposition was used in slightly different form in [14, 15]. Since the form stated here is more general than in [14, 15], we give a complete proof. Let be an optimal solution of (1) and (2). By Proposition 1, there exists a point (~x; ~ s) such that c; ~ We now set and hence, using (65), Straightforward algebra leads to x -: This concludes the proof of (63). Now assume that (1) and (2) have a solution (-x; - !. We can then choose x opt and s opt as minimum-norm solutions in the inequality (66). Also, note that, by (51), ~ . The proof of (64) then follows from the inequality (66). Proposition 4 For all fi ? 1, there is a - ? 0 such that e for all (x; Proof: The proof is straightforward by using the definition of N (fi). Proposition there is an M 3 ! 1 such that for any point generated by Algorithm 1 with and ks , the bound k\Deltaxk; k\Deltask - M 3 holds. Here, \Deltax and \Deltas are determined from (24) and (23) for a given accuracy specified by (25). Proof: Note that kA T y ck is bounded for all iterates. From boundedness of ks k k thus follows boundedness of k. Note that " x and " s are bounded as well, and \Deltax, \Deltas are the exact solution of a system (24) with r and q perturbed by a (bounded) quantity of size " x and " s . Thus, we may assume that the right-hand sides (23) are bounded, and from Proposition 4 and our full-rank assumption on A follows that the inverses of the matrices in (24) are uniformly bounded. (The inverse exists for any x ? 0 and s ? 0, and is a continuous function of x and s!) This concludes the proof. Next, we state and prove our main result. Theorem 1 The iterates generated by Algorithm 1 are contained in N (fi). If the iterates generated by Algorithm 1 are unbounded, then the linear program (1) has no solution. If all iterates generated by Algorithm 1 are bounded, then the stopping criterion in Step 1) of Algorithm 1 will be satisfied after a finite number of iterations. Proof: This proof is based on ideas in Kojima et. al. [7]. By Proposition 2, the vectors ~ b and ~ c associated to x k and s k satisfy (57), and hence (12). Relation (13) is guaranteed by the update in Step 4) of Algorithm 1, and hence, the iterates remain in N (fi). If the iterates generated by Algorithm 1 are unbounded, then, in view of Proposition 3, the linear program (1) has no solution. We now assume that the sequence of iterates is bounded, say kx ks We show that then Algorithm 1 finds an approximate optimal solution after a finite number of iterations. Suppose that t k by (13), and by the bounds (12), also ck ! 0. By (11), we also have Therefore, in view of (26), the stopping criterion of Algorithm 1 is satisfied after a finite number of steps. Conversely, as long as Algorithm 1 is running, we have Hence there is some (for which Algorithm 1 does not halt). By Proposition 4, there is some - 3 ? 0 such that x k - 3 e and s k - 3 e. Also, by (28), fl k is bounded away from zero, without loss of generality, Further, Proposition 5 is applicable, and there is some M 3 ! 1 such that k\Deltax k k; k\Deltas k k - M 3 for all k. (Without loss of generality, we assume M 3 - 1.) Finally, in view of (28), we may assume that independent of k. To conclude the proof, we show that - ff k is bounded away from zero, i.e., that there is some Note that both, ff k x and ff k s can be chosen equal to - ff k . Thus (67) guarantees that a step length as required by (33) can indeed be found, and (34) ensures that t k converges to zero. Hence, showing (67) indeed completes the proof of convergence. The computation of - ff k depends on (13) and (33). By the definition of " x and " s , all the equalities defining N (fi), as well as the bounds on ~ b and ~ c are maintained for all ff 2 [0; - consider some iteration k, and verify that all bounds are maintained. Bound on Xs=(t 3 -) For completeness, we write the proof from [7] in our notation. ff\Deltas. Clearly, since x k (independently of k), there is some ff 1 ? 0 such that x(ff); s(ff) ? 0 for 0 - ff - ff 1 . We consider This number is positive if, and only if, the first relation of (13) is satisfied. From (45) it follows that fin with We also have Thus we can bound (68) from below by \Deltax T \Deltas Note that j\Deltax i \Deltas 3 and j\Deltax T \Deltas=nj - M 2 3 . It follows that for all the relation (68) holds provided that it holds for Bounds linking t 1 and t 3 First we show that there is some ff 3 ? 0 (independent of k) such that t 1 assuming that t 1 are defined in the obvious way, n- n- Recall that, in Algorithm 1, either g. We refer to the first instance as "Case a)" and to the latter as "Case b)". In Case a), it follows that calculations yield that t 1 (j \Deltax T \Deltas n- In Case b), it follows from fit 1 - for some - 6 ? 0 independent of k. Since fit further conclude that t 1 3 . The minimum of these bounds yields ff 3 . Next we show that t 3 This expression is written as \Deltax T \Deltas n- In Case a), the quantity - 3 bounded away from zero, and in Case b), fit away from zero, so that the desired result follows again in a straightforward manner. Finally, the bounds relating t 2 and t 3 are analogous to the ones between t 1 and t 3 . We close by noting that the rules (33), (34) are identical to [7], so that the analysis there fully applies to our algorithm, and guarantees, that the step lengths are bounded away from zero as long as the algorithm does not stop. 6. Concluding Remarks In this paper, we proved global convergence of the infeasible-interior-point method stated as Algorithm 1. This method allows that the linear systems at each iteration are solved only to moderate relative accuracy in the residual. Here, the accuracy requirement depends on an estimate oe for the smallest singular value oe min (A) of the constraint matrix A. The numbers oe or oe min (A) are not used elsewhere in the algorithm. Algorithm 1 is very similar to the algorithm in the paper [7], which, however does not provide an analysis for the case where the search directions are not computed exactly. For very large linear programs, direct methods for solving the linear systems are often prohibitively expensive, and iterative methods must be used. The iterative solutions, of course, contain a non-negligible error. In [3], an efficient iterative method, namely a variant of the QMR algorithm [4] tailored to indefinite symmetric systems, is discussed along with different strategies for preconditioning the linear systems arising in Algorithm 1. The assumptions made for Algorithm 1 originated from and were motivated by the method in [3]. We chose the method in [7] as a reference, since it can be adapted to inexact computations without substantial loss in its performance, and since it is known to be efficient also for numerical implementations; see, e.g., [9]. Other efficient interior-point methods, for example the methods based on a self-dual formulation of the linear program, do not allow such a simple extension to inexact computations. Apart from the specifications of the inexactness, the only modification of the algorithm in [7] that was made for Algorithm 1 is a slightly different choice of the parameters - 1 and - 2 . These parameters are set to zero in [7]. They are also set to zero in Step 2) of Algorithm 1, except for the case that the corresponding residual r or p is already very small. In the latter case we do not expect much loss by not further reducing the residual at the current iteration. In [16], another inexact infeasible-interior-point method is analyzed. The main difference lies in the choice of the parameters - 1 and - 2 . The method in [16] uses positive values for - 1 and - 2 that must satisfy certain conditions, and that may not be close to zero. Moreover, the algorithm in [16] uses the value oe, or more precisely a certain norm that can be bound in terms of oe, not only for the accuracy of the search direction, but also for determining a certain parameter ' and the step length. Therefore, the method in [16] does not lend itself to an actual practical numerical implementation. However, the theoretical results for the method in [16], are somewhat stronger; linear convergence could be established, and for a special case, also a proof of polynomiality is given. Appendix Forms of Ill-Conditioning When looking at standard optimization literature, we found that the definition of a condition number of a linear program is often not explained there. Some books do talk about condition but only for linear systems of equations. In [11, 12], a condition number of linear programs is defined that only takes into account perturbations in the right-hand sides of the constraints. For convex optimization problems, Renegar [19] introduced a condition-number-like distance to the nearest ill-posed (degenerate, primal or dual having empty interior) problem. In this Appendix, we include a precise definition of a condition number of a linear program, and explain its derivation. We further relate the quantity oe used in our analysis to this condition number. We note that the described condition number is different from the ones in [11, 12, 19]. The following definition is essentially taken from [20]. Let D be some open set in IR N . The condition number of a function OE at some point x 2 D is defined as lim sup \Deltax!0 If both the condition number is not defined. If only the condition is defined as +1. Observe that this condition number still depends on the choice of a suitable norm. It is obvious, that (in the limit, for small changes in x) this condition number is the lowest upper bound for the quotient ' relative change of x resulting relative change of OE(x) For linear programs, we may define a map OE that maps the data (A; b; c) to the set of primal-dual optimal solutions. Let D be the open set of data such that linear programs given by (A; b; c) have a unique solution. Then OE is a function (and not a set-valued map), and the above definition of a condition number can be applied to the linear program given by (A; b; c) . If the set of primal-dual optimal solutions of a given linear program contains more than one point, we define the condition number as +1. (This is a "continuous" completion of the condition number One can also define a condition number for infeasible programs, by defining as "solution" a certificate that the primal or dual program is infeasible. We omit this case. We remark that for systems of linear equations, the condition number defined in the above manner coincides with a condition number defined as the inverse of the "distance" to the nearest ill-posed system (i.e., to the nearest singular matrix). Recall that, for convex problems, Renegar [19], introduced a distance to the nearest ill-posed problem; it is easy to see that the inverse of this distance does not coincide with the above condition number. Both, the above definition as well as the definition based on the nearest ill-posed problem have properties that one would like to associate with the condition number of the optimization problem. From the point of view of sensitivity analysis, the above definition seems to be more appropriate, and we therefore use this definition. Thus, the condition number of a linear program (A; b; c) with a unique solution [x; can be defined as Next, we assume that (A; b; c) 2 D and briefly discuss the norm to be used. First, we observe that for any two given positive diagonal matrices n and m of order n and m, respectively, the data (A; b; c) and ( mA n ; m b; n c) are equivalent in the sense that (x; y; s) is a solution of the first problem if, and only if, is a solution to the second problem. Likewise, we see that b and c can be multiplied by some positive scalars - 1 and - 2 resulting in equivalent programs by multiplying x and . The above transformations do not encounter any cancellation error; they have condition number one. Hence, any such transformation can be carried out almost exactly prior to solving a given linear program. ffl Example: Consider the linear program subject to [ with some 1. For simplicity, we ignore the dual variables. The solution is . The 1-norm of the data 1. The above condition number with respect to the 1-norm is at least lim \Deltaffl!0 This is seen when restricting oneself to equal changes \Deltaffl to both ffl-entries of the data. Note that the last "column" of A is of norm ffl - 1. If the system is rescaled as above with , then the rescaled version, minimize subject to [ has optimal solution - perfectly well-conditioned. It seems appropriate to eliminate the effect of such scalings from the definition of a condition of a linear program. We may, for example, assume that the data is scaled such that b, c, and all rows and columns of A have norm approximately 1. As mentioned before, prior to solving the linear program, one might even compute a QR factorization (7) of the matrix A T in a stable fashion and possibly at a higher accuracy than the standard machine precision. If A partitioned in a square nonsingular upper triangular matrix R 1 , then, Given Q 1 and R \GammaT b, the right hand side is a stable representation of the equality constraints. After computing such a stable representation, the more difficult computations of solving the linear program may then be performed by using Q T rather than A. We stress again, because of the anticipated loss of sparsity, the QR factorization is not computed in practice. We would like to know, however, what kind of ill-conditioning of the linear program can occur when in addition to eliminating the effects of diagonal scaling, we also assume a stable choice 1 . For this purpose we will rewrite the linear program as follows. Given a primal program c T x subject to its dual can be written as either (D subject to A T y - c; or as (D subject to A T y Given 1 , the matrix Q 2 is not unique in general. The dependence of Q 2 on Q 1 , however, is well conditioned with respect to the Euclidean norm k \Delta k, in the sense that lim sup ae oe Since y is not restricted in its sign, the constraint "A T is equivalent to "Q T Under this constraint, the dual objective value is given by b T Thus, up to an additive constant b problem (D 2 ) is equivalent to (D 0 subject to Q T c and s - 0; 1 b. In particular, the solution s does not depend on b T R \Gamma1 c. The primal-dual algorithm of this paper does not depend on the variable y, except for estimating the size of the dual residual. We therefore concentrate on the changes in x and s due to small perturbations of the data. The set of vectors s that are feasible for (D 2 ) and for (D 0 2 ) is of course the same, and also the angles between the rows of [ A T I ] and Q T [ A T I ] is the same. In particular, oe min ([ A T I We consider the condition number of (D 0 rather than the one of (D 2 ). Various sensitivities of the solutions x and s with respect to the data of (P ) and (D 0 2 ) can be interpreted geometrically as follows. For the primal problem, we can identify three possible forms of ill-conditioning that we characterize by the condition numbers C 1 , C 2 , and C 3 . 1. Assuming that the columns of A are scaled to Euclidean norm 1, we have 1 - oe where oe max is the largest singular value of A. The condition number C 1 of computing any point satisfying the linear equality constraints depends on oe min (A), the smallest singular value of A. The number C 1 can be interpreted as the inverse of the smallest angle between two linear manifolds generated by two disjoint sets of rows of the matrix A; see the angle d 1 in Figure 1. We point out that oe min (A)=oe max (A) is not invariant under scaling of rows and columns of A. The assumption that rows and columns have approximately constant norm is to reduce the effect of such scaling on oe min (A). By assuming and an ill-conditioning where C 1 is large does not occur. 2. The condition number C 2 refers to the problem of computing a certain vertex of the feasible set, and may be interpreted as the inverse of the angle with which the affine manifold intersects the manifold spanned by the active inequality constraints; see d 2 in Figure 1. This condition number depends on the particular vertex, and can approximately be expressed as the inverse of the smallest singular value of the matrix [ A T e selection of active indices f g. 3. The condition number C 3 refers to the problem of finding which vertex is optimal in the primal space. It depends on the angle that the objective vector c forms with the affine manifold or with some submanifold f x d 3 in Figure 1. If oe min (A) is large, the condition number C 3 is linked to the inverse of the smallest singular value of [ A T e Program (D 0 Program (D 0 2 ) has the same structure as (P ). Tts constraint matrix Q T , however, has perfect condition, and thus the equivalent to C 1 vanishes. If oe min (A) is small, the dependence of Q 2 on A, however, is not well conditioned. In fact, the equivalent to C 1 is still present in problems (D 1 ) and d Figure 1: Illustration of the primal problem (P ) d s=consts ~d Figure 2: Illustration of the dual problem (D 0 (D 2 ). The equivalent to C 2 will be denoted by C 4 , and depends on the inverse of the angles d 4 in Figure 2, and the equivalent to C 3 will be denoted by C 5 . The corresponding angle is denoted by d 5 in Figure 2. --R Presolving in linear programming. Solving symmetric indefinite systems in an interior-point method for linear programming QMR: a quasi-minimal residual method for non-Hermitian linear systems A computational view of interior-point methods for linear programming A new polynomial-time algorithm for linear programming A primal-dual infeasible-interior-point algorithm for linear programming A primal-dual interior point algorithm for linear programming Computational experience with a primal-dual interior point method for linear programming A condition number for linear inequalities and linear programs. Lipschitz continuity of solutions of linear inequalities Pathways to the optimal set in linear programming. Polynomiality of infeasible interior point algorithms for linear programming An infeasible-interior-point algorithm using projections onto a convex set Interior path following primal-dual algorithms A truncated primal-infeasible dual-feasible interior point network flow method Incorporating condition numbers into the complexity theory of linear programming. Introduction to Numerical Analysis Centered Newton method for mathematical programming. Symmetric indefinite systems for interior point methods. --TR --CTR Hans D. Mittelmann, Interior Point Methods for Second-Order Cone Programming and OR Applications, Computational Optimization and Applications, v.28 n.3, p.255-285, September 2004 Stefania Bellavia , Sandra Pieraccini, Convergence Analysis of an Inexact Infeasible Interior Point Method for Semidefinite Programming, Computational Optimization and Applications, v.29 n.3, p.289-313, December 2004
infeasible-interior-point method;convergence;linear program;residual;inexact search direction;linear system
309238
Primal-Dual Affine-Scaling Algorithms Fail for Semidefinite Programming.
In this paper, we give an example of a semidefinite programming problem in which primal-dual affine-scaling algorithms using the HRVW/KSH/M, MT, and AHO directions fail. We prove that each of these algorithms can generate a sequence converging to a non-optimal solution and that, for the AHO direction, even its associated continuous trajectory can converge to a non-optimal point. In contra st with these directions, we show that the primal-dual affine-scaling algorithm using the NT direction for the same semidefinite programming problem always generates a sequence converging to the optimal solution. Both primal and dual problems have interior feasible solutions and unique optimal solutions which satisfy strict complementarity, and are nondegenerate everywhere.
INTRODUCTION We consider the standard form semidefinite programming (SDP) problem: minimize C . X subject to A i . and its dual: subject to Z where C, X, A i belong to the space S(n) of n - n real symmetric matrices, the operator . denotes the standard inner product in S(n), i.e., C . X := tr(CX means that X is positive semidefinite. SDP bears a remarkable resemblance to LP. In fact, it is known that several interior-point methods for LP and their polynomial convergence analysis can be naturally extended to SDP (see Alizadeh [1], Jarre [15], Nesterov and Nemirovskii [28, 29], Vandenberghe and Boyd [38]). However, in extending primal-dual interior-point methods from LP to certain choices have to be made and the resulting search direction depends on these Date. March 4, 1998. 1991 Mathematics Subject Classification. Primary 60E05, Secondary 60C05. Key words and phrases. Semidefinite Programming, Primal-dual Interior-Point Method, Affine-Scaling Al- gorithm, Global Convergence Analysis. research partially supported by the NSF through grant CCR94-03789. choices. As a result, there can be several search directions for SDP corresponding to a single search direction for LP. This paper deals with primal-dual interior-point algorithms for SDP based on the following four search directions: (i) HRVW/KSH/M direction, (ii) MT direction, (iii) AHO direction, (iv) NT direction. We study a specific simple SDP problem, and for this problem carefully investigate the behavior of the sequence generated by the interior-point methods using these four directions to show how the convergence property of the algorithm varies depending on the choice of direction. There are two popular classes of interior-point methods: affine-scaling algorithm and path-followingalgorithm. Path-following algorithm is characterized by a parametric relaxation of the following optimality conditions for SDP: A i . is a barrier parameter. In such algorithm, it is necessary to specify a specific choice of - at any iteration. The particulars vary from paper to paper, and we therefore omit them here. When - # 0 the corresponding method is called affine-scaling algorithm. Most of the existing SDP literature considers path-following algorithm. In this paper, we restrict our attention to affine-scaling algorithm. The affine-scaling algorithm was originally proposed for LP by Dikin [8], and independently rediscovered by Barnes [5], Vanderbei, Meketon and Freedman [39] and others, after Karmarkar [16] proposed the first polynomial-time interior-point method. Though polynomial-time complexity has not been proved yet for this algorithm, global convergence using so-called long steps was proved by Tsuchiya and Muramatsu [37]. This algorithm is often called the primal (or dual) affine-scaling algorithm because the algorithm is based on the primal (or dual) problem only. There is also a notion of primal-dual affine-scaling algorithm. In fact, for LP, there are two different types of primal-dual affine-scaling algorithm proposed to date; one by Monteiro, Adler and Resende [23], and the other by Jansen, Roos, and Terlaky [14]. The latter is sometimes called the Dikin-type primal-dual affine- scaling algorithm. Both of these papers provide a proof of polynomial-time convergence for the respective algorithm, though the complexity of the former algorithm is much worse than the latter. All of the affine-scaling algorithms just described can be naturally extended to SDP. Faybusovich [9, 10] dealt with the SDP extension of the primal affine-scaling algorithm. Global convergence of the associated continuous trajectory was proved by Goldfarb and Scheinberg [12]. However, Muramatsu [27] gave an example for which the algorithm fails to converge to an optimal solution for any step size, showing that the primal affine- scaling algorithm for SDP does not have the same global convergence property that one has for LP. For both primal-dual affine-scaling algorithms, de Klerk, Roos and proved polynomial-time convergence. However, as was mentioned before, there exist several different search directions in primal-dual interior-point methods for SDP, and each of the primal-dual affine-scaling algorithms studied by de Klerk, Roos and Terlaky was based on a certain specific choice of search direction. Below we discuss in detail how the various search directions arise. The primal-dual affine-scaling direction proposed by Monteiro, Adler and Resende [23] is the Newton direction for the set of optimality conditions, i.e., primal feasibility, dual feasibility and complementarity. For SDP, the optimality conditions are (3), (4) and A direct application of Newton's method produces the following equations for #X , #u and #Z (throughout this paper, we assume that the current point is primal and dual feasible): A i . However, due to (9), the solution of this system does not give a symmetric solution in general (actually #Z must be symmetric by (8) but #X is generally not symmetric). To date, several ways have been proposed to overcome this difficulty, each producing different directions in general. In this paper, we study a specific simple SDP problem, and for this problem carefully investigate the behavior of the sequence generated by the primal-dual affine-scaling algorithms using these four directions to show how the convergence property of the algorithm varies depending on the choice of direction. Now we describe the four directions we deal with in this paper. Note that the papers mentioned below deal exclusively with path-following algorithms, for which the corresponding affine-scaling algorithms can be derived by setting 1.1. The HRVW/KSH/M Direction. This direction is derived by using (7)-(9) as is, and then taking the symmetric part of the resulting #X . This method to make a symmetric direction was independently proposed by Helmberg, Rendl, Vanderbei and Wolkowicz [13], Kojima, Shindoh and Hara [18], and Monteiro [21]. Polynomial-time convergence was proved for the path-following algorithms using this direction. For related work, see also the papers of Lin and Saigal [19], Potra and Sheng [32], and Zhang [40]. The HRVW/KSH/M direction is currently very popular for practical implementation because of its computational simplicity. Almost all SDP solvers have an option to use this direction, and some serious solvers (for example, Borchers [6] and Fujisawa and Kojima [11]) use this direction only. 1.2. The MT Direction. Monteiro and Tsuchiya [24] apply Newton's method to the system obtained from (3)-(6) by replacing (6) with The resulting direction is guaranteed to be symmetric. It is the solution of (7), (8) and 4 MASAKAZU MURAMATSU AND ROBERT J. VANDERBEI is an auxiliary variable. They proved polynomial-time convergence of the path-following algorithm using this direction. Recently, Monteiro and Zanjacomo [25] discussed a computational aspects of this direction, and gave some numerical experiments. 1.3. The AHO Direction. Alizadeh, Haeberly, and Overton [2] proposed symmetrizing equation (6) by rewriting it as and then applying Newton's method to (3), (4) and (12). The resulting direction is a solution of (7), (8) and Several convergence properties including polynomial-time convergence are known for the path-following algorithm using the AHO direction. See for example the work of Kojima, Shida and Shindoh [17], Monteiro [22], and Tseng [36]. The AHO direction however, is not necessarily well-defined on the feasible region as observed by Shida, Shindoh and Kojima [33]; the linear system (7), (8), and (13) can be inconsistent for some problems. In fact, a specific example was given by Todd, Toh and T-ut-unc-u [35]. On the other hand, Alizadeh, Haeberly, and Overton [4] report that the path-following algorithm using the AHO direction has empirically better convergence properties than the one using the HRVW/KSH/M direction. 1.4. The NT Direction. Nesterov and Todd [30, 31] proposed primal-dual algorithms for more general convex programming than SDP, which includes SDP as a special case. Their search direction naturally produces a symmetric direction. The direction is the solution of (7), (8) and where D # S(n) is a unique solution of Polynomial-time convergence of the corresponding path-following algorithm was proved in their original paper [30]. Also, see the works of Monteiro and Zhang [26], Luo, Sturm and Zhang [20], and Sturm and Zhang [34] for some convergence properties of the algorithms using the NT direction. The primal-dual affine-scaling algorithm studied by de Klerk, Roos and Terlaky [7] was based on this direction. As for numerical computation, Todd, Toh and T-ut-unc-u [35] reported that the path-following algorithm using the NT direction is more robust than algorithms based on the HRVW/KSH/M and AHO directions. 1.5. Notation and Organization. The rest of this paper is organized as follows. In Section 2, we introduce the specific SDP problem we wish to study. Section 3, deals with the HRVW/KSH/M direction. We consider the long-step primal-dual affine-scaling algorithm. One iteration of the long-step algorithm using search direction (#X,#u,#Z ) is as follows: #X, # is defined by where #D := sup { # | Z and # is a fixed constant less than 1. We prove that, for any fixed #, there exists a region of initial points such that the long-step primal-dual affine-scaling algorithm using the HRVW/KSH/M direction converges to a non-optimal point. In Section 4, we prove the same statement as above for the MT direction by showing that the MT direction is identical to the HRVW/KSH/M direction for our example. In Section 5, we deal with the AHO direction. We consider the continuous trajectory which is a solution of the following autonomous differential equation: We prove that the continuous trajectory of the AHO direction can converge to a non-optimal point. In Section 6, we show that the long-step primal-dual affine-scaling algorithm using the direction generates a sequence converging to the optimal solution for any choice of #. Note that this result does not mean the global convergence property of the algorithm, but a robust convergence property for the specific problem, for which the other three algorithms can fail to get its optimal solution. Section 7 provides some concluding remarks. Note that each section is fairly independent of the others and we use the same symbol (#X,#u,#Z ) for different directions; e.g., #X in Section 3 refers to the HRVW/KSH/M direction, while in Section 5, it's the AHO direction. 2. THE SDP EXAMPLE The primal-dual pair of SDP problem we deal with in this paper is as follows: subject to 0 1 maximize 2u subject to Z where X, Z # S(2) and u # R. The equality condition of the primal (20) says that the off-diagonal elements of X must be 1 for X to be feasible. Thus, putting and noting that X # 0 # x # 0, y # 0, x y # 1, we see that problem (20) is equivalent to subject to x # 0, y # 0, x y # 1, (23) whose optimal solution is 6 MASAKAZU MURAMATSU AND ROBERT J. VANDERBEI Similarly, from the equality condition of the dual (21), we see that Z can be written as follows: and that the dual is equivalent to the following linear program: maximize 2u subject to whose optimal solution is obviously Since we assume that the current point is primal and dual feasible in this paper, we see from (22) and (24) that each of the search directions has the following form: In the following, we put F := { (x, y, u) | x y # 1, x > 0, y > 0, We see that X and Z with (22) and (24) are feasible if and only if (x, y, u) # F , thus F is called primal-dual feasible region. We also define the interior of the feasible region: { (x, y, u) | x y > 1, x > 0, y > 0, Obviously, if (x, y, u) # F then the corresponding X and Z are feasible and positive definite. It is easy to see that is the unique optimal solutions of (23) and (25), hence is the unique optimal solutions of (20) and (21). It can also be easily seen that the optimal values of (20) and (21) coincide, that the optimal solutions satisfy strict complementarity, and that the problems are nondegenerate (see Muramatsu [27]; for degeneracy in SDP, see Alizadeh, Haeberly, and Overton [3]). In fact, this example problem was first proposed in Muramatsu [27] to prove that the primal affine-scaling algorithm fails. 3. THE HRVW/KSH/M DIRECTION In this section, we consider the long-step primal-dual affine-scaling algorithm using the HRVW/KSH/M direction. To calculate the HRVW/KSH/M direction (#X,#u,#Z ) at a feasible point (X, u, Z ), we first solve the following system: From (27) and (28), we see that d #X and #Z have the following form: d Note that since we apply the HRVW/KSH/M-type method, we do not assume that d #X is symmetric here. Then we symmetrize d d #x #w #w #y . Therefore, #X is independent of #w. The third equation, (29), can be written componentwise as: y. Solving these linear equalities, we have There is also an equation for #w but we don't write it since it disappears after symmetrization Figure 1 shows the vector field (#x, #y) on the primal feasible region with In fact, since (#x, #y) is independent of u after normalization, u can be arbitrary. From this figure, we can see that when x is tangential to the boundary of the primal feasible region, and that its length is not 0 unless the current point is optimal. In the following, we will see that the primal discrete sequence (x, y) can be trapped in the curved while u remains negative. Letting the step length - #(x, y, u) absorb the common factor, we can write one iteration of the primal-dual affine-scaling algorithm in terms of (x, y, u) as follows: #(x, y, u)(2 - x y #(x, y, u)(2 - x y #(x, y, u)(1 - where # is a fixed fraction less than 1 and - #(x, y, u) is defined by (16). Here, we emphasize the fact that - #, which is originally a function of (X, u, Z ), can be regarded as a function of (x, y, u) due to the correspondence (22) and (24). In fact, we identify (x, y, u) and (X, u, Z ) in the following. Now we consider the set G := { (x, y, u) # F | u and investigate the property of the iteration sequence starting in this region. In fact, our aim in this section is to prove the following theorem: 8 MASAKAZU MURAMATSU AND ROBERT J. VANDERBEI x y 1. Vector Field of the HRVW/KSH/M method Theorem 1. Let for any 2/3 # < 1, { (x, y, u) # G | x If, for the HRVW/KSH/M primal-dual affine-scaling algorithm (34), (35) and (36), we choose the initial point then the limit point is contained in the closure of G # . Since the closure of G # does not contain the optimal solution, this theorem implies that the sequence converges to a non-optimal point. Note also that the condition (38) can be satisfied for all # and #. In fact, fixing x 0 < 1-# and u 0 < 0, we can reduce the left hand side arbitrarily by choosing y 0 close to 1/x 0 . We first show that - # P on G. Lemma 2. If (x, y, u) # G, then - #(x, y, u) is a positive solution of where on G. Proof. Noting that 2(1 - on the interior feasible region, we have on G. For the primal problem (20), since x hold when x is the solution of x namely, Expanding this quadratic equation and dividing by x y - 1, we have Now we have (40) as on G. Since the coefficient of # 2 P and the constant of (41) have the opposite signs, this quadratic equation has one positive solution and one negative, and # P is the positive solution. From (41), it follows that from which we have Therefore, we have - which is the solution of (41). The following two lemmas are used to prove that the sum of - # k is bounded, which is essential for the proof of the theorem. Lemma 3. We have #(x, y, u) # 1/ p R(x, y) on G. Proof. It follows from Lemma 2 that #(x, y, u) 2 #(x, y, u) R(x, y) #R(x, y) . Thus we have #(x, y, u) # 1/ p R(x, y). Lemma 4. Assume that we do one iteration of the primal-dual affine-scaling algorithm and (36)) from (x, y, u) # G to get fraction #. Then we have Proof. The lemma can be seen as follows: #(x, y, u)(x #(x, y, u) 2 #(x, y, u)(x #(x, y, u)(x #(x, y, u)(x Lemma 5. Assume that the sequence { generated by (34), (35) and (36) is contained in G. Then we have Proof. We have (by Lemma Now we are ready to prove the theorem. Proof of Theorem 1. We show that if (x l , y l , , from which the theorem follows by induction. We have l l (by Lemma 5) which implies Similarly, we have l l (by Lemma 5) which implies From Lemma 4, x l+1 y l+1 # 3/2 follows. The relation x l+1 y l+1 > 1 is obvious due to the choice of the step-size. Also x l+1 from which we have x l+1 +y l+1 # 3. Therefore, the proof. Remark: By replacing 3/2 with in the definition (37) of G, the same analysis provides an initial point arbitrary close to the primal optimal solution but for which convergence is to a non-optimal point. 4. THE MT DIRECTION We will show in this section that the MT direction applied with the primal and dual interchanged is identical to the HRVW/KSH/M direction for our primal-dual pair of SDP problems (20) and (21). As is well-known, we can transform the standard form SDP problem to the dual form and vice versa to get the following primal-dual pair # - P# of SDP problems: subject to 1 0 maximize -x - y subject to X - x 1 0 which is equivalent to #D# and #P#. In fact, the feasible solutions for # - P# and # - D# are again given by (22) and (24) where (x, y, u) # F . According to (7), (8), (10) and (11), the MT direction (#X,#x,#y,#Z ) for this primal-dual pair at a feasible solution (X, x, y, Z ) is the solution of equivalently, (26) and (47) and (48). The following lemma shows that the MT direction is the same as the HRVW/KSH/M direction in our problem. Lemma 6. For (X, Z ) satisfying (22) and (24) with (x, y, u) # F o , the system (47), (48) and (26) has a unique solution (#X M , #Z M , VM ). Let ( d be the solution of (26), (29), and (30) for the same (X, Z ). Then we have #X Proof. From (29) and (30), it is easy to see that #X H is a unique solution of We prove the lemma by showing that (47) and (48) are equivalent to (49) in our case. In view of (24), we can write Z 1/2 sin # cos # , Putting we have . Due to (48) and (26), the diagonal components of V Z 1/2 must be 0, i.e., Therefore, we have which implies that V Z 1/2 is symmetric. Now we have from which Substituting these relations into (47), we have Obviously, (#X M , #Z M ) is a solution of this system. Multiplying this equation by Z -1/2 from the right and left, we have (49). Since the solution of (26) and (49) is unique, the MT direction is unique and identical to the HRVW/KSH/M direction. The following theorem is immediate by Lemma 6. Theorem 7. Let for any 2/3 # < 1, { (x, y, u) # G | x For the long-step primal-dual affine-scaling algorithm using the MT direction, if, given a step-size parameter #, we choose the initial point then the limit point is contained in the closure of G # . 5. THE AHO DIRECTION We deal with the continuous trajectories of the AHO directions on our problem in this section. Let us denote the AHO direction by (#X,#u,#Z ). The system for the direction is (27), (28), and (13), or equivalently, (26) and (13). The third equation, (13), can be written componentwise as follows: Solving these linear equalities, we have Figure 2 shows the vector field (#x, #y) on the primal feasible region with and In contrast with the HRVW/KSH/M direction case, the vector field drastically changes depending on u. Namely, when is near the boundary of the primal feasible region, the direction is not nearly tangential to the boundary, aiming at somewhere outside of the feasible region. On the other hand when the direction aims inside. The former observation leads to the convergence of the continuous trajectories of the AHO direction to a non-optimal point (Theorem 9). We deal with the trajectory (17), (18) and (19) in the space of (x, y, u) by using the one- to-one correspondence (22) and (24). Furthermore, since the trajectory is not changed if we multiply each right-hand side by a common positive factor, we can multiply by x which is greater than 0, to get The equation (55) can be easily solved as follows: 14 MASAKAZU MURAMATSU AND ROBERT J. VANDERBEI x y x y 2. Vector Fields of the AHO method where u 0 is the initial value of u t . The following properties of the vector field can easily be observed. Lemma 8. We have Proof. We omit subscript t in this proof for simplicity. The former equation can be seen as: The latter equation can be seen as: Now we restrict our attention to the set H := { (x, y, u) # F | u # -1/2, y # 16x } . (60) We then introduce the following change of variables: y, (61) # =2 log y x . (62) The inverse mapping is: re -# , re # . Putting #(x, y, u) := (r, #, u), we can easily see that Now consider the trajectory in the new coordinate system: starting from (r 0 , # 0 , We use ( - y, - u), (-r , - #, - y, - u), (-r , - #, - u) for respectively, for notational simplicity. We will prove the following theorem in this section: Theorem 9. Let the initial point denote the corresponding point in #(H). If then The following lemma elucidates the behavior of the continuous trajectories on #(H) Lemma 10. For t , we have Proof. It follows from (61) and (62) that . (67) We have from (66) that d < -4 (Since y - x > 3 and u # 1/2 on H). Therefore, we have The second assertion of the lemma can be easily derived from (59) and (67), since x-y < 0 Now we prove the theorem. Proof of Theorem 9. Obviously, if - # > log 4, and - then the solution cannot be extended in the feasible region any more, i.e., - t. Since - follows from (65), we will show that - in the following. we have from (64) that t must satisfy In other words, we have log . (68) On the other hand, in view of (56), we have log Therefore, from (68), we have - u < -1/2, and since (-r , - u) is at the boundary of #(H), we have r - 6. THE NT DIRECTION In this section, we prove that the long-step primal-dual affine-scaling algorithm using the NT direction generates a sequence converging to an optimal point for our SDP problem. We denote the NT direction by (#X,#u, dZ ). To calculate the NT direction, we first calculate the scaling matrix D. From (22), (24) and (15), we see that where # (x, y, #(x, y, Solving (7), (8) and (14) with (69), we have where #(x, y, The figure 3 shows the vector fields (#x, #y) on the primal feasible region with -0.5 and Note that the direction depends on u like the AHO direction does, but the length of the direction differs from that of the AHO direction; the length of the direction becomes small if (x, y) is close to the boundary, and in fact, it vanishes at the boundary. Now imagine that a discrete sequence generated by the primal-dual affine-scaling algorithm using the NT direction approaches the boundary { (x, y, u) # F | x saying, the movement in the (x, y) space becomes small if x y is close to 1, and instead u is improved so much that u converges to 1, which is the optimal solution. Then the primal direction (#x, #y) aims inside the feasible region, and the stagnation ends. The following is what we prove in this section. Theorem 11. For any step-size parameter 0 < # < 1, and any initial point the sequence generated by the long-step primal-dual affine-scaling algorithm for the primal-dual pair of SDP problems (20) and (21) using the NT direction converges to the optimal point. x y x y 3. Vector Fields of the NT method First, we observe that the duality gap X . monotonically decreasing. Lemma 12. We have or equivalently, This is a standard calculation, thus we omit the proof. Note that if the duality gap does not converge to 0, then Q # k=1 (1 - # 0. On the other hand, if # 0, then, since the optimal solution is unique, the sequence converges to the optimal solution (1, 1, 1). We use these relations in the following extensively Next lemma shows that the sequence converges, and the search direction is bounded along the sequence. Lemma 13. We have Proof. From (77), #u k > 0 follows. Since {u k } is an increasing sequence and bounded by 1, the limit u # exists. We have from Lemma 12 that which implies that By definition (78), we have Therefore, since for some positive constant M. We see in the same way that #y k is bounded, and, from (79), that #u k is also bounded. If x k # 0, obviously the sequence converges to the optimal solution. Therefore, we deal with the case that x k that there exists some # > 0 such that Y Taking logarithm of the both sides, we have log # log(1 - Using this inequality, we have l | # l | # -M log # for all l, which implies that {x k } is a Cauchy sequence. Thus {x k } converges. The convergence of {y k } can be shown in the same way. Using the lemma above, we prove that the dual iterates converges to its optimal. Lemma 14. We have u k # 1. Proof. Let us assume that u # < 1. Since cannot be an interior point, we have x k y k # 1. If - occurs infinitely many times, then obviously u k # 1, which contradicts the assumption. Thus we can assume that # k # k for sufficiently large k and that # k On the other hand, we have Therefore, # k Since #u k is bounded, we have # k # 0, which implies that the left hand side of (80) converges to 1 - while the right hand side is 0. This is a contradiction, and we have Now we know that u k # 1, and converging. We will prove (1, 1) in the following. To show this, we first show that the limit point is on the boundary of the primal feasible region. Lemma 15. We have x # y Proof. Assume that x # y 1. In this case, we have # k # 2 from definitions (71) and (78), and also - # 0 from Lemma 12. Since we see that # k # k for sufficiently large k and that # k For P , we have Therefore, - However, since are bounded, the left hand side of (81) goes to while the right hand side is 0. This is a contradiction, and we have The following relation can be seen by a straightforward calculation. Lemma 16. We have #(x, y, u), #(x, y, u) # 0 when x y # 1 and u # 1. Proof. We have Therefore, putting #(x, y, u) := -4(1 - we have the lemma. Now we are ready to prove that the optimality of (x # , y # ). Obviously, this lemma together with Lemma 17 proves Theorem 11. Lemma 17. We have Proof. It can be seen that We claim that # k #x k #y k is bounded. Assume by contradiction, # k #x k #y k is not bounded. Then we can take a diverging subsequence, i.e., there exists a subsequence L # {0, 1, 2, . } such that lim k#L # k | #. Since #x k and #y k are bounded, we have lim k#L # k #, and from the definition of # k , lim k#L # k #, too. Therefore this is a contradiction because, for k # L , (y k 22 MASAKAZU MURAMATSU AND ROBERT J. VANDERBEI Assume that implies that - 14, 15, and 16, we have that for sufficiently large k, while, since # k #x k #y k is bounded and - Therefore, holds for sufficiently large k. This and (82) imply that is increasing for sufficiently large k. This contradicts the fact that x k y k # 1. Therefore, we have 7. CONCLUDING REMARKS The practical success of interior-point methods for LP relies heavily on the ability to take the long steps, i.e., stepping a fixed fraction of the way to the boundary for the next iterate. Even when convergence has not been proved, it is necessary in practice to take such a long step. For LP, these long steps are very successful, and every implementation uses bold step-length parameters. These bold choices of step-length parameters are supported by the robustness of the primal-dual affine-scaling algorithm (not the Dikin-type variant). It is known that the continuous trajectories associated with the primal-dual affine-scaling algorithm converge to the optimal solution, and there is no evidence so far that the long-step primal-dual affine- scaling algorithm fails to find the optimal solution. However in SDP, the situation is different; even a continuous trajectory can converge to a non-optimal point. The results of this paper suggest that, for finding the optimal solution, such bold steps as are taken in the LP case should not be taken at least for the HRVW/KSH/M, MT and AHO directions; otherwise, jamming may occur. It seems that the algorithm corresponding to the NT direction is more robust than those corresponding to the other directions. The same observation was reported by Todd, Toh and T-ut-unc-u [35]. ACKNOWLEDGEMENTS We thank Professor Michael Overton of New York University for showing us the bad local behavior of the HRVW/KSH/M method, which motivated us to do this research. We also thank Dr. Masayuki Shida of Kanagawa University for many stimulating discussions which inspired us to develop the results for the AHO direction, and kindly pointing out that the MT direction is identical to the HRVW/KSH/M direction in our example. --R Interior point methods in semidefinite programming with application to combinatorial opti- mization Complementarity and nondegeneracy in semidefinite programming. A variation on Karmarkar's algorithm for solving linear programming problems. CSDP, a C library for semidefinite programming. Polynomial primal-dual affine scaling algorithms in semidefinite programming Iterative solution of problems of linear and quadratic programming. Dikin's algorithm for matrix linear programming problems. On a matrix generalization of affine-scaling vector fields Interior point trajectories in semidefinite programming. An interior point method for semidefinite pro- gramming A polynomial primal-dual dikin-type algorithm for linear program- ming An interior-point method for minimizing the maximum eigenvalue of a linear combination of ma- trices A new polynomial time algorithm for linear programming. A predictor-correctoe interior-point algorithm for the semidefinite linear complementarity problem using Alizadeh-Haeberly-Overtonsearch direction Interior point methods for the monotone semidefinite linear complementarity problem in symmetric matrices. A predictor-corrector method for semi-definite programming Superlinear convergence of a symmetric primal-dual path-following algorithms for semidefinite programming Polynomial convergence of primal-dual algorithms for semidefinite programming based on Monteriro and Zhang family of directions A polynomial-time primal-dual affine scaling algorithm for linear and convexquadratic programming and its power series extension Polynomial convergence of a new family of primal-dual algorithms for semidefinite programming Implementation of primal-dual methods for semidefinite programming based on monteiro and tsuchiya newton directions and their variants A unified analysis for a class of path-following primal-dual interior-point algorithms for semidefinite programming Affine scaling algorithm fails for semidefinite programming. Optimization over positive semidefinite matrices: Mathematical background and user's manual. Interior Point Polynomial Methods in Convex Programming A superlinearly convergent primal-dual infeasible-interior-point algorithm for semidefinite programming Existence of search directions in interior-point algorithms for the sdp and the monotone SDLCP Symmetric primal-dual path-following algorithms for semidefinite programming Analysis of infeasible path-following methods using the Alizadeh-Haeberly-Overton direction for the monotone semidefinite lcp Global convergence of a long-step affine scaling algorithm for degenerate linear programming problems A modification of Karmarkar's linear programming algorithm. On extending primal-dual interior-point algorithms from linear programming to semidefinite pro- gramming --TR
affine-scaling algorithm;global convergence;primal-dual interior-point method;semidefinite programming
309241
Probabilistic Analysis of An Infeasible-Interior-Point Algorithm for Linear Programming.
We consider an infeasible-interior-point algorithm, endowed with a finite termination scheme, applied to random linear programs generated according to a model of Todd. Such problems have degenerate optimal solutions, and possess no feasible starting point. We use no information regarding an optimal solution in the initialization of the algorithm. Our main result is that the expected number of iterations before termination with an exact optimal solution is O(n ln(n)).
Introduction A number of recent papers have attempted to analyze the probabilistic behavior of interior point algorithms for linear programming. Ye (1994) showed that a variety of algorithms, endowed with the finite termination scheme of Ye (1992) (see also Mehrotra and Ye 1993), obtain an exact optimal solution with "high probability" (probability approaching one as 1) in no more than O( iterations. Here n is the number of variables in a standard form primal problem. Several subsequent works - Huang and Ye (1991), Anstreicher, Ji, and Ye (1992), and Ji and Potra (1992) - then obtained bounds on the expected number of iterations until termination, using various algorithms and termination methods. The analysis in each of these latter papers is based on a particular random linear programming model from Todd (1991) (Model 1 with - e, see Todd 1991, p.677), which has a known initial interior solution for the primal and dual problems, and is nondegenerate with probability one. Unfortunately, we eventually realized that these three papers all suffer from a fatal error in conditional probability, and consequently do not provide correct analyses of the probabilistic behavior of interior point algorithms. The error is basically the following: Todd (1991, Theorem 3.6) determines the distribution of the components of a primal basic feasible solution for this case of his Model 1, and similar analysis can be used to obtain the distribution of the components of a dual basic feasible solution. What is required in the probabilistic analysis is the distribution of the positive components of the primal and dual optimal solutions. However, conditioning on optimality is equivalent to conditioning on primal and dual feasibility, and these are not independent of one another. (Theorem 3.6 of Todd (1991) itself contains an error which will be addressed in a forthcoming erratum to that paper, and which is further discussed in Section 4.) A variant of Todd's Model 1 which allows for degeneracy is given in Todd (1991, Section 4). Throughout the paper we will refer to this model as "Todd's degenerate model.'' Todd's degenerate model controls the degree of degeneracy by specifying optimal primal and dual solutions, but provides no feasible starting point. This presents a difficulty for most interior point methods, which require feasible primal and/or dual solutions for initialization. One way around this difficulty is to use a combined primal-dual feasibility problem, as in Ye (1994). Another approach would be to use an artificial variable, with "M " objective coefficient, and increase M as necessary to insure feasibility. Interior point algorithms which employ such a strategy have been suggested by Ishihara and Kojima (1993), and Kojima, Mizuno, and Yoshise (1993). In fact, for Todd's degenerate model the required value of M could be inferred from the known optimal dual solution, but the use of such information is clearly "cheating," since a general linear programming algorithm cannot take as input properties of a (usually unknown) optimal solution. Finally, one could attempt a probabilistic analysis of a combined Phase I - Phase II algorithm, for example Anstreicher (1989, 1991) or Todd (1992, 1993). In practice, another algorithm, the primal-dual "infeasible-interior-point" method, has been very successful for problems which have no initial feasible solution (see for example Lustig, Marsten, and Shanno 1989). A theoretical analysis of this method proved to be elusive for many years. Finally Zhang (1994) showed that a version of the infeasible-interior- point algorithm is globally convergent, and is actually an O(n 2 L) iteration (hence polynomial time) method if properly initialized. Here L is the bit size of a linear program with integer data. Unfortunately, however, this "polynomial time" initialization requires essentially the value of M which would be needed if an artificial variable were added to the problem. Mizuno subsequently obtained an O(n 2 L) bound for the infeasible-interior-point algorithm of Kojima, Megiddo, and Mizuno (1993), while Mizuno (1994) and Potra (1994, 1996) obtain an improved O(nL) iteration result for infeasible-interior-point predictor-corrector algorithms. The purpose of this paper is to obtain a probabilistic result for an infeasible-interior- point algorithm, endowed with the finite termination scheme of Ye (1992), applied to instances of Todd's degenerate model. As mentioned above, an infeasible-interior-point algorithm is a natural solution technique for instances of the degenerate model since these problems possess no initial feasible solution. A very important feature of our analysis is that we use no information regarding an optimal solution in the initialization of the algo- rithm. In particular, because the optimal solution is known for instances of the model, it would be easy to use a "polynomial time" initialization which would greatly simplify our analysis. However, as mentioned in the discussion of M above, such an approach is clearly cheating. Instead, we use a "blind" initialization of the algorithm, which could be applied to any linear program. In the initial version of the paper, our main result was that for Zhang's algorithm applied to Todd's degenerate model, the expected number of iterations before termination with an exact optimal solution is O(n 2 ln(n)). For the final version of the paper we have modified our original analysis to obtain an improved O(n ln(n)) bound, using the infeasible-interior-point predictor-corrector algorithm of Potra (1994) in place of Zhang's method. At the end of the paper we also describe how our analysis can be applied to other infeasible-interior-point methods. The methodology used to obtain these results is relatively complex, for a number of reasons. First, the analysis of finite termination is complicated by the infeasibility of the iterates. Second, properties of the initial solution, such as "gap" and amount of infeasibility, are random variables. Third, due to our blind initialization, the global linear rate of improvement for the algorithm is itself a random variable. Fourth and finally, this random rate of improvement is dependent on other random variables connected with the initial solution, and finite termination criterion, resulting in product terms which cannot be simply factored (as would be the case with independence) in the expected value computation. Subsequent to the initial version of this paper, an O( was devised by Ye, Todd and Mizuno (1994). The method of Ye, Todd, and Mizuno is based on an ingenious "homogenous self-dual" formulation for LP problems. The resulting algorithm is "infeasible" in the sense that iterates are infeasible for the original LP being solved, but is fundamentally different from the other infeasible-interior-point algorithms discussed above because the iterates are feasible for the homogenous self-dual problem. Anstreicher et al. (1992a) uses a number of results from this paper to obtain a bound of O( the expected number of iterations before termination with an exact optimal solution, for the algorithm of Ye, Todd, and Mizuno (1994) applied to instances of Todd's degenerate model. 2. The Infeasible-Interior-Point Algorithm In this section we describe the main features of the infeasible-interior-point algorithm of Potra (1994). We assume familiarity with Potra's paper, and give major theoretical results concerning the algorithm without proof. Our notation generally follows Potra's, with a few minor changes to avoid conflicts with notation used in our later analysis. Throughout the paper, if x 2 R n , then X is used to denote the diagonal matrix and S, etc. We use e to denote a vector of varying dimension with each component equal to one, and k \Delta k to denote k \Delta k 2 . Consider then primal and dual linear programs: where A is an m \Theta n matrix with independent rows. We assume throughout that n - 2. A problem equivalent to the linear programs LP and LD, is then the LCP: F (x; s; F (x; s; y) =@ Xse The algorithm is initiated with a point which is not assumed to satisfy the equality constraints of LCP. The algorithm generates a solution sequence On iteration k, in the predictor step, a predictor- direction vector (u; v; w) is obtained by solving the Newton system A step is then taken to a new point (-x; - s; - y), where for 0 - s; - In the corrector step, we first find the solution (-u; - v; - w) of the linear system and define (~x; ~ s; ~ s; - s=n. Next we find the solution (~u; ~ v; ~ of the linear system ~ wA =@ ~ and finally set s; ~ Note that the two linear systems solved in the corrector step have the same coefficient matrix, so that only one matrix factorization is needed for the corrector step. Potra's predictor-corrector algorithm is a generalization of the Mizuno-Todd-Ye (1993) predictor-corrector algorithm, designed so that both "optimality" and "feasibility" are improved at the same rate, in the sense that with the algorithm obtains Given constants ff and fi such that the steplength - ' k is chosen by a specific rule (see Potra 1994) that guarantees that In (2.3), - x(') and - s(') represent the predictor step parameterized by the steplength s(')=n, and - =n. The parameters ff and fi in (2.3) enforce centering conditions on all iterates of the algorithm, i.e., all iterates are forced to lie in two cones around the central path. Clearly Throughout the remainder of the paper, we will use this choice of ff and fi so as to simplify the exposition . We will also assume throughout that the initial solution has the form scalar ae - 1. Note that (2.3) implies that unless the steplength - leads directly to a solution of LCP. Suppose LP and LD have optimal solutions, say - x and s). Potra's analysis uses several scalar parameters, which for the particular ff, and fi considered here specialize to: major component in Potra's analysis of global convergence is the following result, which follows from his Lemmas 3.2 and 3.3, specialized for the particular case considered here: Proposition 2.1. If - x and - s are optimal solutions of LP and LD, then there is a feasible steplength - oe From Proposition 2.1, and the fact that it is clear that the key quantity in the analysis of the algorithm is -. In general - is a fixed finite number, implying that the algorithm globally converges with a linear rate. Now let - for an optimal solution s). Note that k - p n-ae. It is then immediate that if the parameter ae that defines the starting point enough, in the sense that ae= \Omega\Gamma2 =n) and therefore the algorithm attains O(nL) polynomial time complexity. Unfortunately, however, specifying ae in this manner requires knowledge of - ae, which is tantamount to knowledge of the required value of M when LP is solved by simply adding an artificial variable. Our analysis of the algorithm will not require such knowledge, but will instead use the fact that (2.4) implies that so long as 3. Finite Termination In this section we consider the issue of finite termination of the infeasible-interior-point algorithm of Section 2, using the projection termination scheme of Ye (1992) (see also Mehrotra and Ye 1993). As in Ye (1992), our analysis requires the assumption that optimal solutions of LP and LD exist. We require a careful derivation of the technique, modified to deal with infeasibility of the iterates, for our probabilistic analysis in Section 5. The bounds obtained in this section are not necessarily the simplest, or tightest, possible, but are specifically chosen for applicability in our probabilistic analysis. To begin, let (-x; - s; - y) be an optimal strictly complementary solution of LP/LD, that is, s k. Let - 0g. We refer to - oe as the "optimal partition." As in the previous section, we assume that where ae - 1. Our goal is to use the iterates of the infeasible primal-dual algorithm to eventually identify the optimal partition, and generate exact optimal solutions of LP and LD. To begin, we characterize at what point the algorithm can correctly identify oe. In the following analysis it is convenient to define / ' k is the steplength used on the predictor step of the algorithm in iteration k. Lemma 3.1. In order to obtain s k oe, and x k suffices to have 3n ae= n) Proof: From (2.1) we have (Ax from which it follows that together imply that which can be re-written as Using the facts that then obtain ae Now assume that (3.1) holds. Note that - -, so ae ae ae= From (3.1) and (3.2), for j 2 - oe we then have ae= ae= n) On the other hand, (3.2) implies that ae= Applying (2.3), ae= ae= n) ae= n) Combining (3.3) and (3.4), we have x k oe. The argument for Next we consider the problem of generating an exact optimal solution to LP. (The analysis for obtaining a solution to LD is similar, and is omitted in the interest of brevity.) Given an iterate denote the columns of A having x k denote the corresponding components of x. Similarly let N and xN denote the remaining columns of A and components of x. The projection technique of Ye (1992) attempts to generate an optimal solution of LP by solving the primal projection problem A similar projection problem can be defined for the dual. Clearly if B corresponds to the optimal partition - oe, and the solution x B of PP is nonnegative, then is an optimal solution of LP. In what follows, we will choose k large enough so that, by Lemma 3.1, B does in fact correspond to the optimal partition - oe. Let B 1 be any set of rows of having maximal rank (B the rows of B are independent). Let N 1 , A 1 , and b 1 denote the corresponding rows of N and A, and components of b. Let B 11 denote any square, nonsingular submatrix of B 1 . Theorem 3.2. The solution of PP generates an optimal solution of LP whenever ae= where A 1j denotes the jth column of A 1 . Proof: Note that if the assumption of the theorem is satisfied, then B corresponds to the optimal partition - oe by Lemma 3.1. Clearly PP is equivalent to the problem The solution to PP, x x Next we consider the two terms in (3.5). First, we have 2-oe 2-oe ae= n) where the first inequality uses the fact that u ? for any conforming vector u, and the last inequality uses (3.2) as in the proof of Lemma 3.1. To bound the second term of (3.5), we use x and the fact that iterates k, to obtain 2-oe Using n), we then certainly have ae= 2-oe Substituting (3.6) and (3.7) into (3.5), using - ae - ae= 2-oe Finally (3.4) implies that if ae= n) then x and the hypothesis of the theorem imply (3.9), and the proof is complete. 4. Random Linear Programs In this section we describe the random linear programming model to be used in our probabilistic analysis. We also describe an alternative version of the model, and briefly discuss the technical problems that arise if an analysis using the second version is attempted. Todd's Degenerate Model, Version 1 each component of A is i.i.d. from the N(0; 1) distribution. Let where the components of - xB and - s N are i.i.d. from the j N(0; 1) j distribution. Let y, where the components of - y are i.i.d. from any distribution with O(1) mean and variance. TDMV1 is a special case of Model 1 from Todd (1991). The simplest choice for - y in the model is - Note that in any case - is an optimal, strictly complementary solution for LP/LD. If and LD are nondegenerate with probability one, but results in a degenerate optimal solution for LP, and results in a degenerate optimal solution for LD. In the sequel we will analyze the behavior of the IIP algorithm of Section 2 applied to problems generated according to TDMV1, using the finite termination scheme of Section 3. In preliminary versions of the paper we also considered the following degenerate version of Todd's Model 1. Todd's Degenerate Model, Version 2 (TDMV2): Let A i is each component of A is i.i.d. from the N(0; 1) distribution. Let where the components of - x 1 and - s 3 are i.i.d. from the j N(0; 1) j distribution. Let y, where the components of - y are i.i.d. from any distribution with O(1) mean and variance. TDMV2 is described in Todd (1991, Section 4). Note that in TDMV2, (-x; - s) are clearly optimal solutions for LP/LD , but are not strictly complementary. Since our analysis of the finite termination scheme of Section 3 is based on a strictly complementary solution, to analyze the performance of our IIP algorithm on an instance of TDMV2 we would first need to characterize the properties of a strictly complementary solution (x ; s ). One approach to this problem, based on Section 7 of Ye (1994), proceeds as follows. As in Section 3, let B denote the columns of A corresponding to the optimal partition - oe, and let N denote the remaining columns of A. From Todd (1991, Proposition 4.2) we have either Consider the case of A 2 ). Then the system is feasible, and with probability one has a solution with adjusting the signs of columns of - A 1 to form a new matrix ~ A 1 , we can assume that the system ~ is feasible, and with probability one has a solution with In Ye (1994, Lemma it is shown that if (4.2) is feasible then (4.2) must have a certain "basic feasible partition." Moreover, using a result of Todd (1991), the distribution of a solution to (4.2) given by a basic feasible partition can easily be determined (see the proof of Ye 1994, Theorem 4). Such a solution can then be used to construct an x so that (x ; - s) are strictly complementary solutions to LP/LD. Unfortunately it was eventually pointed out to us by Mike Todd (private communication) that the above line of reasoning is incorrect, for a rather subtle reason. Essentially the problem is that taking a given basic partition for (4.2), and conditioning on that partition's feasibility, does not provide a valid distribution for a solution to (4.2) conditional on (4.2) being feasible. A similar problem occurs in a simpler context in Todd (1991, Theorem 3.6), and will be described in a forthcoming erratum to that paper. Because of the above, references to results in earlier versions of this paper using TDMV2, in Anstreicher et al. (1992a) and Ye (1997), are incorrect. In particular, Proposition 4.1 of Anstreicher et al. (1992a), which is the basis of the probabilistic analysis in that paper, is invalid. However, it is very easy to modify the statement and proof of Lemma 4.2 of Anstre- icher et al. (1992a) to apply using TDMV1 instead of TDMV2. As a result, Theorem 4.3, the main result of Anstreicher et al. (1992a), holds exactly as stated if "Todd's degenerate model" in the statement of the theorem is taken to be TDMV1, rather than TDMV2. Similarly the analysis of TDMV2 in Section 7 of Ye (1994) is incorrect, but Theorem 6, the main result of that section, can easily be shown to hold using TDMV1 in place of TDMV2. 5. Probabilistic Analysis In this section we consider the performance of the infeasible-interior-point algorithm of Section 2, equipped with the finite termination criterion of Section 3, applied to the random linear program TDMV1 of Section 4. Given an instance of LP, we first obtain A b, the minimum norm solution of a procedure which requires O(n 3 ) total operations. We then set 0). The algorithm is then applied until the projection technique of Section 3 yields an exact optimal solution of LP. Let ae= From Theorem 3.2, the algorithm will certainly terminate once - from Proposition 2.1, - k - so to obtain - k - ffl it certainly suffices to have where the last inequality uses \Gammaffi. Finally, from (2.5) we have ae 2 ), so termination of the algorithm definitely occurs on some iteration K, with By (5.2), to obtain bounds on E[K] we require bounds on E[(n We obtain these bounds via a series of lemmas, below. Throughout we use k A k to denote the Frobenius norm of a matrix A: k A i;j a 2 It is then well known that for any matrix A and conforming vector x, k Ax k - k A k k x k. We also use (d) to denote a - 2 random variable with d degrees of freedom. Lemma 5.1. For an instance of TDMV1, E[-ae Proof: Note that - with mean n and variance 2n. Let Q denote a random variable with the - 2 (n) distribution. Then where the last inequality uses the fact that ln(1 + a) - a for a - 0. The proof is completed by noting that Lemma 5.2. For an instance of TDMV1, E[(n Proof: Note that x k. Moreover y, so k c k - k - s y k. immediately have Finally, we use the fact that ln(1 to obtain Now - n). Finally - y k, and k A k are independent of one another. Combining all these facts with (5.3), and using E[ln(X)] - ln(E[X]) for any random variable X, we obtain Lemma 5.3. For an instance of TDMV1, E[\Gamma - Proof: By definition we have It is also easily shown (see Lemma A.2 of the Appendix) that E[\Gamma ln( - O(n). The lemma follows immediately. Lemma 5.4. For an instance of TDMV1, E[ln(1 Proof: An application of the Cauchy-Schwarz inequality results in 2-oe 2-oe 2-oe Results of Girko (1974) and Todd (1991) imply that for each oe, we may write Therefore 2-oe 2-oe 2-oe ~ where ~ 2-oe ~ Combining (5.4) and (5.5) we obtain 2-oe However, in Lemmas A.2 and A.3 of the Appendix it is shown that Lemma 5.5. For an instance of TDMV1, E[\Gamma(n Proof: From (5.1), we have ae= 2-oe Note that 1 ae= O(n ln(n)), from Lemma 5.1. Furthermore E[\Gamma ln( - O(n ln(n)), from Lemma 5.3. Finally E[ln(1+ from Lemma 5.4, and moreover 11 A 1j k is independent of - ae. Combining these facts with (5.6) we immediately obtain E[\Gamma(n Combining Lemmas 5.2 and 5.5 with (5.2), we arrive at the major result of the paper: Theorem 5.6. Assume that the infeasible-interior-point algorithm of Section 2, equipped with the finite termination technique of Section 3, is applied to an instance of TDMV1. Then the expected number of iterations before termination with an exact optimal solution of LP is O(n ln(n)). Note that our analysis of E[K] for our IIP algorithm applied to TDMV1 is complicated by dependencies between - ae and ae, and between - ae and ffl. These dependencies would not affect a simpler "high probability" analysis (see for example Ye 1994), since if a fixed collection of events each holds with high probability, then the joint event also holds with high probability, regardless of dependencies. (The events of interest here are that - ae, ln(ae), and ln(ffl), satisfy certain bounds.) In the interest of brevity we omit the details of a high probability analysis of K, which also obtains a bound of O(n ln(n)) iterations using TDMV1. 6. Application to Other Algorithms A large literature on the topic of infeasible-interior-point methods for linear programming, and related problems, has developed since this paper was first written. See for example Bonnans and Potra (1994) for a discussion of the convergence properties for a broad class of such methods. In this section we describe the key features of Potra's (1994) algorithm that are exploited in our probabilistic analysis, and discuss the extent to which our analysis can be applied to a number of other infeasible-interior-point methods. To begin, as described in Section 2, the algorithm of Potra (1994) satisfies it is straightforward to verify that the analysis of finite termination, in Section 3, continues to hold if the conditions in (6.1) are relaxed to The conditions in (6.2) are satisfied by almost all primal-dual infeasible-interior-point algo- rithms, and consequently the analysis in Section 3 applies very generally to these methods. (For simplicity we used throughout the paper, but obviously the analysis in Section 3 can be adapted to other ff.) In Section 5, the important feature of Potra's (1994) algorithm, for our purposes, is that if then on each iteration k we have are any primal and dual optimal solutions. An initialization of the form (6.3) is quite standard for primal-dual infeasible-interior-point methods. The exact relationship between the initial normalization (6.4), and the lower bound on the steplength (6.5), does not carry over immediately to other methods. However, similar relationships between ae and the convergence rate do hold for many other algorithms. For example, in the original version of this paper we used the fact that if ae - k u for any F whose rows span the nullspace of A, and ae =\Omega\Gamma351 then Zhang's (1994) method achieves ' k is the steplength used on iteration k. (The analysis of Zhang's algorithm is actually complicated somewhat by the fact that his proofs are based on the decrease of a "merit rather than decrease in the individual components k. Consequently a lower bound on the steplength must be translated into a lower bound on the decrease in the merit function.) Note that here again an initialization similar to (6.4) fits the analysis well, since we can take where c. The difference between (6.5) and (6.6) results in a bound of O(n 2 ln(n)) on the expected number of iterations before termination when Zhang's (1994) algorithm is applied to Todd's degenerate model. Our analysis could similarly be used to obtain an O(n 2 ln(n)) expected iteration bound for the algorithms of Wright (1994), Zhang and Zhang (1994), and Wright and Zhang (1996). These three papers modify the method of Zhang (1994) to add asymptotic superlinear convergence to the algorithm. (The paper of Wright and Zhang obtains superquadratic convergence.) It is worth noting that applying the probabilistic analysis devised here to these methods ignores their improved asymptotic behavior. An interesting line of further research would attempt to exploit the superlinear convergence of these algorithms in the probabilistic analysis. Our analysis could also be applied to the algorithms of Mizuno (1994), whose work is based on the infeasible-interior-point method of Kojima, Megiddo, and Mizuno (1993). Mizuno's algorithms include a termination condition that halts the iterative process if it can be proved that for all optimal solutions (x ; s ). With a "polynomial time" initialization, involving a very large ae, (6.7) has no effect when the algorithm is applied to a problem having an optimal so- lution. However, to perform an analysis similar to the one here one would need to bound the probability of termination due to (6.7), and possibly consider restarting the algorithm with a larger ae, following termination(s) due to (6.7), until the finite projection technique yielded exact optimal solutions. A probabilistic analysis involving such restarts is undoubtedly pos- sible, but we have not attempted to work out the details. Infeasible-interior-point potential reduction algorithms are devised by Mizuno, Kojima, and Todd (1995). These methods are quite similar to other primal-dual infeasible-interior-point methods, except that a potential function is used to motivate the search directions, and prove convergence. The algorithms developed by Mizuno, Kojima, and Todd (1995) also use the added termination condition (6.7). As a result, to apply our probabilistic analysis to these methods one would again need to bound the probability of termination due to (6.7), and possibly consider a "restart" strategy as described above. In addition, Algorithms II and III of Mizuno, Kojima, and Todd (1995) do not explicitly enforce the "feasibility before optimality" condition - in (6.2), and therefore our analysis of finite termination, in Section 3, would not immediately apply to these methods. Freund (1996) devises an infeasible-interior-point method that uses search directions based on a primal barrier function, as opposed to the primal-dual equations used by all the methods mentioned above. Freund's complexity analysis is also given in terms of explicit measures of the infeasibility and nonoptimality of the starting point. A probabilistic analysis of this algorithm would require substantial modifications of the techniques used here. Potra also shows that the complexity of his method can be improved if the infeasibility of the initial point is sufficiently small, but our analysis based on the initialization (6.3)-(6.4) ignores this refinement. Acknowledgement We are very grateful to the referees for their careful readings of the paper, and numerous comments which substantially improved it. We are indebted to Mike Todd for pointing out the error in our original analysis using the second version of his degenerate model for linear programming. Appendix In this appendix we provide several simple probability results which are required in the analysis of Section 5. Throughout, x 2 R k is a random vector whose components are not assumed to be independent of one another. We begin with an elementary proposition whose proof is omitted. Proposition A.1. Let x i , be continuous random variables, with sample space 1). Define the new random variables g. Then for any u - 0, f - (u) - (u), and f i (u) - is the p.d.f. of a random variable X. Lemma A.2. Let x Proof: Z 1k Applying Proposition A.1, with each x j having p.d.f and therefore E[\Gamma Using Proposition A.1 in a similar way, Finally, from Jensen's inequality and Proposition A.1, Z 1uf(u) du Lemma A.3. Let x 2 R k , where each x Proof: This follows from the same analysis used to bound E[ln(i)] in Lemma A.2, but letting f(\Delta) be the p.d.f. of the - 2 (d) distribution, and recalling that the expected value of a - 2 (d) random variable is d. --R A combined phase I-phase II projective algorithm for linear programming A combined phase I-phase II scaled potential algorithm for linear programming of Management Sciences Infeasible path following algorithms for linear complementarity problems An infeasible-start algorithm for linear programming whose complexity depends on the distance from the starting point to the optimal solution On the distribution of solution of systems of linear equations with random coefficients. On the average number of iterations of the polynomial interior-point algorithms for linear programming On the big M in the affine scaling algorithm. A primal-dual infeasible-interior-point algorithm for linear programming A little theorem of the big M in interior point algorithms. Computational experience with a primal-dual interior point method for linear programming Finding an interior point in the optimal face of linear programs. Polynomiality of infeasible-interior-point algorithms for linear program- ming On adaptive-step primal-dual interior-point algorithms for linear programming A quadratically convergent predictor-corrector method for solving linear programs from infeasible starting points An infeasible interior-point predictor-corrector algorithm for linear programming Probabilistic models for linear programming. On Anstreicher's combined phase I-phase II projective algorithm for Todd An infeasible interior point algorithm for linear complementarity prob- lems A superquadratic infeasible-interior-point algorithm for linear complementarity problems On the finite convergence of interior-point algorithms for linear programming Towards probabilistic analysis of interior-point algorithms for linear program- ming Interior Point Algorithms: Theory and Analysis. An O( p nL) On the convergence of a class of infeasible interior-point algorithms for the horizontal linear complementarity problem Superlinear convergence of infeasible-interior-point methods for linear programming --TR --CTR Asa Ben-Hur , Joshua Feinberg , Shmuel Fishman , Hava T. Siegelmann, Probabilistic analysis of a differential equation for linear programming, Journal of Complexity, v.19 n.4, p.474-510, August Petra Huhn , Karl Heinz Borgwardt, Interior-point methods: worst case and average case analysis of a phase-I algorithm and a termination procedure, Journal of Complexity, v.18 n.3, p.833-910, September 2002
infeasible-interior-point algorithm;linear programming;average-case behavior
309247
Solutions to Affine Generalized Equations Using Proximal Mappings.
The normal map has proven to be a powerful tool for solving generalized equations of the form: find z &#949; C, with 0 &#949; F(z) a convex set and NC(z) is the normal cone to C at z. In this paper, we use the T-map, a generalization of the normal map, to solve equations of the more general form: find z &#949; dom(T), with 0 &#949; F(z) We present a path-following algorithm that determines zeros of coherently oriented piecewise-affine functions, and we use this algorithm, together with the T-map, to solve the generalized equation for affine, coherently oriented functions F, and polyhedral multifunctions T. The path-following algorithm we develop here extends the piecewise-linear homotopy framework of Eaves to the case where a representation of a subdivided manifold is unknown.
Introduction This paper is concerned with solving generalized equations [20, 21] of the form where T is a maximal monotone multifunction from IR n into IR n and F is a continuously differentiable function from an open set\Omega oe dom(T ) into IR n . We recall that a monotone multifunction T is a point to set mapping such that for each in the graph of T , where h\Delta; \Deltai denotes the inner product, T is maximal if its graph is not properly contained in that of any other monotone multifunction and dom(T ) represents the effective domain of T . To date, most of the algorithmic development for generalized equations has been focused on the special case where T := NC , the normal cone to a convex set C, defined by This case yields the generalized equation This material is based on research supported by National Science Foundation Grant CCR-9157632, the Air Force Office of Scientific Research Grant F49620-94-1-0036, and the Department of Energy Grant DE-FG03-94ER61915 y Mathematics Department, University of Colorado, Denver, Colorado 80217 z Computer Sciences Department, University of Wisconsin, Madison, Wisconsin 53706 Many problems from mathematical programming, equilibrium, complementarity and other fields can be expressed in this form. For example, if F := rf , then (2) represents the first order necessary optimality conditions for the problem minimize f(x) subject to x 2 C: Another important instance of (2) is the variational inequality problem, which is to find z 2 C such that This problem is known to be equivalent to (2) (see [21]). As a final example, we mention the complementarity problem; this has a wealth of applications and appears in a variety of forms [13]. The standard nonlinear complementarity problem is to find such that It is well known [13, 15] that complementarity problems can be reformulated as variational inequal- ities, and therefore can be treated in the context of the generalized equation (2). A prominent tool for solving (2) is the normal map [8, 22, 26]. The normal map FC for a function F and a nonempty, closed, convex set C oe\Omega is defined by where -C (x) denotes the projection (with respect to the Euclidean norm) of x onto the set C. The importance of the normal map lies in the fact that solving (2) is equivalent to finding a zero of the normal map FC . Specifically, if x is a zero of the normal map, then z := -C (x) solves (2). Conversely, if z is a solution to (2), then x := z \Gamma F (z) is a zero of the normal map. Thus, the problem of solving the generalized equation (2), which is expressed with set-valued functions, is reduced to finding a zero of a piecewise smooth, single-valued function. Several algorithms have been developed based on this idea. Most of these algorithms are based on the theory of piecewise linear homotopies given by Eaves [9]. The specialization of the general algorithm given in [9] determines a zero of the normal map by tracing the zero curve of a piecewise linear homotopy mapping. It is shown in [12] that Lemke's famous method [16] for solving linear complementarity problems is conceptually equivalent to path following in a corresponding piecewise linear system. This idea is easily extended to more general algorithms [10, 11]. Based on Eaves' work, Cao and Ferris [3] analyzed an algorithm for solving affine (i.e. F (x) is affine) variational inequality problems over polyhedral sets and showed that Lemke's method processed matrices in the class PC [2]. For non-affine problems with C rectangular, Ralph [18] proposed a Newton-based algorithm where at each iteration the Newton point is calculated by solving an affine variational inequality (AVI) that is a linearization of the normal map equation at the current point. This approach was developed computationally by Dirkse and Ferris [5, 6, 7] to produce PATH, an efficient and robust code for solving mixed complementarity problems. A similar approach was developed by Rutherford [24]. In this paper, we begin to generalize the above class of algorithms by removing the restriction that T be the normal cone to a convex set. As a first step, in this paper we focus on solving the affine generalized equation where F is an affine function and T is polyhedral (that is, the graph of T is the union of finitely many convex polyhedrons). Our strategy is, in essence, a generalization of the AVI algorithm of Cao and Ferris. We use a generalization of the normal map to reformulate (1) as a zero finding problem of a piecewise affine function; then we use the piecewise-linear homotopy framework of Eaves [9] to generate an algorithm for determining zeros of piecewise-affine functions. We describe this algorithm in detail in Section 2 and prove that under the assumption of coherent orientation, the algorithm finds a zero after a finite number of steps. The remainder of the paper describes how the algorithm is used to solve affine generalized equations. In Section 3 we discuss a generalization of the normal map called the T-map. This mapping, which to our knowledge was introduced by Minty [17], provides a means of reformulating generalized equations involving operators T that do not necessarily correspond to the normal cone of any set. After describing this reformulation, we focus on the case where T is polyhedral. This case can be viewed as an extension of the special case where T := NC , with C a convex polyhedron. In Section 4 we describe how the algorithm presented in Section 2 can be used to solve affine generalized equations. In Section 5 we further specialize to the case where T is separable. Finally, in Section 6 we discuss how the algorithm can be applied to solve piecewise linear-quadratic programming problems [25]. Some words about notation are needed. The notation that T is a point to set mapping, or multifunction, which maps points in IR n to subsets of IR n . In discussing multi- functions, we may refer either to a point to set mapping, T (\Delta), or to the graph of that mapping, T , which is the set T := f(x; y) j y 2 T (x)g. The expression T \Gamma1 (\Delta) is defined as a set inverse; i.e., Tg. The effective domain of T , is defined by dom(T ) := fxjT (x) 6= ;g. In discussing matrices and vectors, subscripts are used to refer to components. For example refer to the ith row, jth column, and (i; j)th entry of A, respectively. We may also use index sets to refer to specific components. For example if g. Further, we use the MATLAB notation of a comma to separate columns, and a semicolon to separate rows. For example (x; y) is a row vector, whereas (x; y) is a column vector. Unless otherwise indicated, all vectors are taken to be column vectors. Superscripts are used to indicate an iteration count, index, or some other label for matrices and vectors. In contrast, for scalars, sets, and functions, subscripts are used as labels. For a set C, aff(C), int(C), ri(C), rec(C), dim(C), and ffi(\DeltajC ) refer to the affine hull, interior, relative interior, recession cone, dimension, and indicator function of C respectively. (see [23] for definitions of these terms). 2 Algorithm for Finding Zeros of M-PA Maps Our first task is to describe an algorithm for finding zeros of piecewise affine functions. The algorithm we present can be viewed as a generalization of Lemke's method for the linear complementarity problem and of the algorithm for solving affine variational inequalities over convex polyhedral sets that was described in [3]. The theoretical basis for the algorithm is derived from the theory of piecewise-linear homotopies given in [9]. In order to describe the algorithm carefully, we need some preliminary definitions. Definition 2.1 (cell) A polyhedral convex set oe ae IR n is called a cell. If then oe is called a k-cell. Let oe := fxjAx - ag, where A 2 IR p\Thetan , and a 2 IR p , with p a nonnegative integer. Then (p; A; a) is said to represent oe. If p is the smallest number for which a representation of oe exists, then (p; A; a) is called a minimal representation of oe. A set - 2 IR n is called a face of oe if for some set of indices ff ae g. If dim(-) = i, then - is called an i-face of oe. any cell has a minimal representation. Definition 2.2 (piecewise affine) Let M be a collection of n-cells and let M := oe2M oe. A is said to be piecewise-affine with respect to M, denoted M-PA, if for each (i.e. the restriction of F to oe) is affine. If F is M-PA for some M satisfying the above assumptions, then we say that F is piecewise affine. Note that in the above definition, if M is convex, then the function F must be continuous on M , because F must be single-valued on the boundaries between cells. Furthermore, in contrast to the work of Eaves [9], M is not required to correspond to a subdivided manifold. Definition 2.3 (function representation) Let M be a collection of n-cells in IR n , let F be a M-PA function, and let oe be an n-cell of M. Let b oe 2 IR m and let B oe be an m \Theta n matrix. is said to represent F on oe if F We now describe an algorithm to find a zero of an M-PA function G, for a given collection of cells M. We will assume that representations of the cells of M and of the map G have already been constructed. The basis of the algorithm is to construct a piecewise affine homotopy mapping F (x; -) with the following properties 1. is a zero of F if and only if x is a zero of G. 2. A point direction (d 1 ; \Gamma1) is known such that - 1 - 0 and F for all - 0. The algorithm uses a method described by Eaves [9] to trace the zero curve of F , proceeding in the direction (d 1 ; \Gamma1) from the starting point To prove that the algorithm finds a solution in a finite number of steps, we restrict ourselves to the case where G is coherently oriented: Definition 2.4 (coherent orientation) Let G be an M-PA map with representation (B oe ; b oe ) on each oe 2 M. We say that G is coherently oriented if is nonzero and constant for all oe in M, where Since M is finite and oe2M rec(oe), and further that there is a oe such that int(rec(oe)) 6= ;. Choose d such that \Gammad 2 int(rec(oe)). Then for any x 0 in IR n , and for all - sufficiently large, x In the AVI algorithm described by Cao and Ferris, the cell oe and the direction d were constructed by finding an extreme point x e of the set C. The cell was then given by oe := x e +NC (x e ), and the direction d was chosen such that \Gammad was in the interior of NC (x e ). For our algorithm, rather than constructing the cell and direction, we can rely instead on the fact that since IR then for any direction d, there will be a cell oe d for which \Gammad 2 rec(oe d ). Note further that for each cell oe, the boundary rec(oe) n int(rec(oe)) of rec(oe) has Lebesgue measure zero. Therefore, since the number of cells is finite, oe2M rec(oe) n int(rec(oe)) has measure zero. Thus, for almost all d, there will be a cell oe d for which \Gammad 2 int(rec(oe d )). Thus, if x 0 is any point in IR n , then for all - sufficiently large, x lie interior to the cell oe d . In other words, the cell can be chosen simply by picking an arbitrary d and proceeding in the direction \Gammad until a cell oe d is reached for which \Gammad is in the recession cone of oe d . For almost all d (excepting a set of Lebesgue measure zero), \Gammad will be in the interior of rec(oe d ). We note, however, that for some special cases, construction of an extreme point may still be preferable. Once d and oe d have been identified, the homotopy map can be constructed. Let (B; b) be the representation of G in oe d . Define a function F : Note that F (x; exactly when Under the assumption that G is coherently oriented, Then, since \Gammad 2 int(rec(oe d ))), there exists - 0 - 0 such that w(-) 2 int(oe d ); 8- 0 . Thus, for 0: By choosing d, we see that F satisfies the conditions needed for the homotopy map. We are now ready to state the algorithm, which is given in Figure 1. Note that by normalizing d in the discussion above to be a unit vector, we can start the algorithm from the point constructed above with oe 1 := oe d . Some comments about Algorithm AGE are in order: 1. Most of the work in the algorithm is in step 8 where the direction (d At the end of this section, in Theorem 2.13, we show that B is a rank-1 matrix. Thus, an efficient implementation of the algorithm can be obtained by keeping the matrices B k in factored form and performing rank-1 updates of the factors at each step of the algorithm. 2. At step 8 in the algorithm, there may be more than one possible choice of cells oe k+1 . However, a lexicographic ordering, as described by Eaves [9, Section 15], can be used to resolve any ambiguity concerning which cell to choose. The use of such a lexicographic ordering will be assumed in the convergence proof, and will be presented in more detail in the discussion preceding Lemma 2.9. 3. The requirement that arbitrarily chosen to force the choice of d k+1 to be unique. 4. The requirement that x guarantees that the zero curve of F (x; -) := contains a ray, and therefore assures us that it will not have any loops. This fact will be useful in our convergence proof. However, we shall also show that, under the assumption of coherent orientation, v k is always negative, which by itself guarantees that no Figure 1: Algorithm AGE Given a finite collection of n-cells M such that and an M-PA function G on IR n . Let G have representation (B Repeat for 0g. output("ray termination"); return. Else output("solution found at", x k+1 ); return. Else determine oe k+1 (possibly using lexicographic ordering), d k+1 , and v k+1 such that d k+1 points into oe k+1 from x k+1 , and oe loops occur. Thus, under the assumption of coherent orientation, it is not necessary to find a ray start. However, in future work, we will prove convergence for a broader class of problems, in which case the ray start requirement will be useful. The next few pages are devoted to proving the following convergence theorem: Theorem 2.5 Let M be a finite collection of n-cells whose relative interiors are disjoint and whose union is IR n . Let G be a coherently oriented, M-PA function. Algorithm AGE, using lexicographic ordering, terminates after finitely many steps with a zero x of G. Proof (Outline) There are three main parts to the proof. First, as Lemma 2.9, we will show that the algorithm terminates at a solution if M is a subdivision of IR n (see Definition 2.6). Second, in Lemma 2.11, we will show that even if M is not a subdivision of IR n , there is a refinement (see Definition 2.10) N of M that is a subdivision. Finally, we show in Lemma 2.12 that if a subdivision N is a refinement of M, then running the algorithm using N will generate exactly the same path as would be generated by using M. Thus, the fact that the algorithm terminates at a solution using N guarantees that it will terminate at a solution using M. We now prove the three lemmas mentioned above. At this point, we recommend that the impatient reader skip ahead to Theorem 2.13. Our proof technique is based on the work of Eaves [9]. Eaves' analysis relies heavily on the notion of a subdivided manifold: Definition 2.6 (subdivided manifold) Let N be a set in some Euclidean space, and let N be a finite or countable collection of n-cells in that space such that oe2N oe. Let ~ N be the collection of all faces of elements of N . (N; ~ N ) is a subdivided n-manifold if 1. any two n-cells of N are either disjoint or meet in a common 2. each point of N has a neighborhood meeting only finitely many n-cells of N ; 3. each (n \Gamma 1)-cell of ~ N lies in at most two n-cells; If (N; ~ N ) is a subdivided n-manifold for some subdivision N , we call N an n-manifold and we call N a subdivision of N . The following lemma shows that when in Definition 2.6 is redundant. This result was proved by Robinson [22] in the proof of Proposition 2.4. While Robinson's proposition is stated for the normal manifold, his proof is valid for general subdivisions of IR n . Lemma 2.7 If N is a collection of cells whose union is IR n and if N satisfies 1 and 2 of Definition 2.6, then N is a subdivision of IR n . The next step in our analysis is to prove that the algorithm works whenever M is a subdivision of IR n . In this case, by defining S := foe \Theta IR + joe 2 Mg, we see that S is a subdivision of IR n \Theta IR and further that F is S-PA. The starting point of the algorithm lies interior to the cell of S. Further, the ray f(x lies within j 1 . Let ~ S be the collection of all faces of elements of S. Algorithm AGE is then seen to be equivalent to the algorithm described by Eaves [9, Section 10.2], with the following relationships between the algorithms: Eaves' Algorithm Algorithm AGE To discuss the behavior of this algorithm in more detail, we need some definitions from [9]. Definition 2.8 (regularity) Let (N; ~ N ) be a subdivided (n be the collection of n-cells in ~ be a N-PA map. A point x in N is said to be degenerate (otherwise regular) if x lies in a cell oe of ~ N with dim(F (oe)) ! n. A value y in F (N) is said to be a degenerate value (otherwise a regular value) if F \Gamma1 (y) contains a degenerate point. Note that if y is a regular value, then F \Gamma1 (y) cannot intersect any k-cells of S with k ! n. By the assumption of coherent orientation, G is one-to-one in every n-cell of M. Thus, of S. Since the starting point of the algorithm is interior to j 1 , it is a regular point of F . According to [9, Theorem 15.13], since S is finite, the algorithm generates, in finitely many steps, either a point in the boundary of IR n \Theta IR or a ray in F \Gamma1 (0) different from the starting ray. In the first case, we know that - the boundary of IR n \Theta IR + is IR n \Theta f0g. It then follows, from our earlier remarks that x satisfies Therefore, to guarantee that the algorithm finds a solution, we need only show that it cannot produce a ray different from the starting ray. We first consider the case when 0 is a regular value of F . In this case, by [9, Theorem 9.1], F \Gamma1 (0) is a 1-manifold which is subdivided by sets of the form j cannot intersect any k-cells with k ! n, each point on F \Gamma1 (0) is in at most two (n + 1)-cells of S. Thus, in step 8 of the algorithm, the choice of oe k+1 is well-defined. (The only difficulty would be if lies in only one (n so that no oe k+1 could be selected. But in this case, would be a boundary point of IR n \Theta IR + . Thus, - so the algorithm would have terminated in step 5.) be the direction of the path within the (n of S, and let G have representation on the n-cell oe k of M. Then by [9, Lemma 12.3], the curve index, given by is constant everywhere along the path. Since v for the starting direction (d G is coherently oriented, it follows that v k is negative in each cell that the path enters. But this means that the parameter - decreases strictly in each cell. Thus, after finitely many steps, we must have When 0 is a degenerate value of F , F \Gamma1 (0) may intersect a k-cell of S with k ! n. Thus, in step 8 of the algorithm, there may be multiple choices for which cell oe k+1 to enter next. To address this problem, a lexicographic ordering can be used to resolve ambiguities concerning which cell the path will enter. Such a scheme is conceptually equivalent to solving a perturbed problem, which we now describe. be an (n+1) \Theta n matrix such that [X; d 1 ] is of rank (n+1). Define the vector (note: the superscripts here refer to exponentiation). Define Algorithm AGE is interior to j 1 , then small enough ffl. Further, since (\Gammad the starting conditions needed to apply the algorithm to the perturbed problem given by where p(ffl) := F Y is an invertible n \Theta n matrix, so that by [9, Lemma 14.2], p(ffl) is a regular value for all ffl sufficiently small. Thus, by the arguments given above for regular values, using Algorithm AGE to solve the perturbed problem will, after a finite number of steps J , produce a point (x J (ffl)) such that G(x J be the sequence of points generated by the algorithm for the perturbed prob- lem. By the discussion in [9, Section 15], there is a sequence of matrices X k 2 IR (n+1)\Thetan and a sequence of points ffl. The points are exactly the sequence of points generated by the algorithm for solving the unperturbed problem using the lexicographic ordering. Since the algorithm terminates after J steps for all small ffl, we see that - J It follows that - further that G(x J Thus, using a lexicographic ordering, the algorithm finds a solution after a finite number of steps. We have proved the following lemma: Lemma 2.9 Let M be a subdivision of IR n and A T be a coherently oriented, M-PA function. Algorithm AGE, using lexicographic ordering, terminates after finitely many steps with a zero x of G. We now address the case where M is not a subdivision of IR n . We begin by proving that M can be refined to produce a subdivision. Definition 2.10 (refinement) Let M and N be finite collections of n-cells. N is said to be a refinement of M if each cell oe of M is the union of a finite collection of cells - i of N , and if each cell of N is contained in some cell of M. The following lemma is proved by Hudson [14, Lemma 1.5], however, using different nomencla- ture. In particular, the term "subdivision" is used in place of our term "refinement". Lemma 2.11 Let M := fC i g be a collection of J ! 1 n-cells which covers IR n . There exists a subdivision N of IR n such that N is a refinement of M. We now show that using N , the algorithm follows the same path as it would using M. Lemma 2.12 Let G be an M-PA function, where M is a finite collection of relatively disjoint n-cells whose union is IR n . Let N be a refinement of M such that N is a subdivision of IR n . Then Algorithm AGE, using lexicographic ordering, will find a solution x to in a finite number of steps. Furthermore, the sequence of points generated by the algorithm using M is a subsequence of the points that would be generated using N . Proof Consider first running the algorithm using N instead of M. By Lemma 2.9, the algorithm will terminate after some finite number of steps J . The algorithm will visit a sequence of n- cells f- k g ae N , and will generate a sequence of points f(x k ; - k )g and directions f(d k ; v k )g, for be the unique cell in M that contains - 1 . Then for be the smallest index greater than j i\Gamma1 such that - j i be the unique cell in M that contains - . Let K be such that j This process defines a sequence of cells We will show that if the algorithm is run using M, then the sequence of points f(- generated by the algorithm satisfies the equation (- for each i. Thus, (- so the algorithm finds a solution after a finite number of steps. be the sequence of directions chosen by the algorithm using M. Clearly, since the algorithm is started at the point in the direction (d 1 ; \Gamma1), the following is true: (- ), and the first cell visited by the algorithm is oe 1 . We now proceed by induction: Assume that (- ), and that, using M, the ith cell visited by the algorithm is oe i . We shall prove that (- ), and that the (i 1)st cell visited by the algorithm is oe i+1 . be the representation of G on oe i . This is also the representation of G on - k whenever . Thus, in step 8 of the algorithm using N , the direction (d entering cell - k+1 must satisfy coherently oriented, B i is invertible. Further, by our earlier discussion, v k+1 is negative. Thus, the direction is uniquely determined by the representation. In particular, (d From this it is clear that x j i+1 lies on the ray f- is on the boundary of oe i . If the ray f- i (')j' - 0g contains a point in the interior of oe i , then the ray cannot be extended past x j i+1 without exiting oe i . Thus, x g. In other words, If the ray f- i (')j' - 0g does not contain an interior point of oe i , then we must resort to the lexicographic ordering to prove that x j are relatively disjoint convex sets, there exists a separating hyperplane H i defined by a vector c i , and a scalar ff i such that . Suppose we run the algorithm using N to solve the perturbed problem G ffl (x) := defined by (6). Then, small enough, the algorithm will visit the same sequence of cells f- k g as it visits in the unperturbed problem. Also, by our earlier discussion, the algorithm will generate the sequence of points is a fixed sequence of matrices. Since 0 is a regular value of G ffl , dim(G ffl (- k k. Thus, G \Gamma1 ffl (0) contains only one point in - k namely x k+1 . Therefore, the direction d k+1 must point into the interior of - k+1 . By similar arguments as before, x j i+1 lies on the ray f- i But, since d k+1 points into the interior of - j i , this ray must contain a point - x in the interior of . It follows that c i ? d Thus, even for the unperturbed problem, the ray - i (') cannot be extended past the point x without crossing the hyperplane H i , and thereby exiting oe i . Thus, x Finally, note that for all small ffl, the point x j i+1 (ffl) is a regular point, so - (j i+1 \Gamma1) and - j i+1 are the only n-cells of N that contain x j i+1 (ffl). Thus, oe i and oe i+1 are the only n-cells of M that contain x j i+1 (ffl). Thus, for all small ffl, the algorithm, using M will enter cell oe i+1 at the next iteration. But this means that using lexicographic ordering the algorithm will enter cell oe i+1 next when solving the unperturbed problem. Finally, since the representation of G on oe i+1 is identical to the representation of G on - j i+1 , we must have The lemma is now proved by induction. This completes the proof of Theorem 2.5. Our final task in this section is to establish the claim made in Comment 1 following Algorithm AGE. Theorem 2.13 Under the hypothesis of Theorem 2.5, let foe k g be the sequence of cells chosen in Step 8 of Algorithm AGE using lexicographic ordering, and let (B has rank 1. Proof Using lexicographical ordering, the algorithm will choose the same cell oe k+1 in step 8 as it would when solving the perturbed problem for small ffl. However, 0 is a regular value for the perturbed problem, so - k := oe k must have dimension n \Gamma 1. Now, for any two points Thus, dim 3 The T-map The T-map, denoted F T , is a generalization of the normal map that is formed by replacing the projection operator -C in (3) by the resolvent operator Specifically, the T-map is given by We assume throughout that T is a maximal monotone operator. In this case, Minty [17] showed that P T is a continuous, single-valued, nonexpansive function defined on all of IR n . Since the image of P T is dom(T ) (which is contained in the domain of F ,\Omega\Gamma3 it follows that F T is a single-valued function defined on all of IR n . By [1, Example 2.1.2], I + T is monotone, and therefore P T is monotone. We now show that solving GE(F; T ) is equivalent to finding a zero of F T . Theorem 3.1 Given a maximal monotone multifunction be defined by (7). If x is a zero of F T , then z := P T (x) solves GE(F; T ). Conversely, if z solves GE(F; T ), then x := z \Gamma F (z) is a zero of F Proof Suppose F T Conversely, suppose \GammaF (z) 2 T (z) and let x := z \Gamma F (z). Then x So far, we have not made any assumptions on T other than that it is maximal monotone. We now focus on the case where T is polyhedral. Definition 3.2 (polyhedral) A multifunction T is polyhedral if its graph is the union of finitely many polyhedral convex sets. Our first task will be to show that, for polyhedral T , the resolvent operator a piecewise-affine map. Lemma 3.3 A single-valued multifunction whose graph is a convex polyhedron is affine on dom(T ). Proof Assume dom(T ) 6= ;. (Otherwise the lemma is true vacuously). Since the graph of T is a polyhedron, T can be written as nonnegative integer. Let K := fijA Tg. In words, K is the set of row indices for which the corresponding constraint is active for all points in T . We first establish the fact that ker B f0g. To do this, let H := fiji 62 Kg. Then for each is the cardinality of the index set H. Note that (~x; ~ y) is a convex combination of points in T and is therefore also in T . Further, A i\Delta ~ . But since T is single-valued, - Now, by the definition of K, we have (x; Conversely, suppose 9-y such that (x; - . But this means that A implies that - f0g. That is - y. We have thus shown that Finally, since ker B has a left inverse R 2 IR m\Thetap . Thus, for x 2 dom(T ), So T is an affine function on dom(T ). Theorem 3.4 Given a maximal monotone polyhedral multifunction , the resolvent operator affine function on all of IR n . Proof Since T is polyhedral, I +T is also polyhedral [19] and therefore so is P is a finite collection of polyhedral convex sets. Let C i be the projection of \Gamma i onto the domain of P T (i.e., C is defined on all of IR n , is closed, its complement, nM := IR n n M , is open. Thus, nM is either the empty set, or it has nonempty interior. But nM ae S Thus, nM has no interior. In other words To show that P T is M-PA, all that is needed is to show that for each C i 2 M, the restriction of P T to C i is affine. However, since P T is single-valued, the graph of P T restricted to C i is simply the convex polyhedral set \Gamma i . By Lemma 3.3, P T is affine on C i . Corollary 3.5 If T is polyhedral and F is affine, then the T-map, F T , defined by (7) is piecewise affine. 4 Affine Generalized Equations We now show how to apply the algorithm of Section 2 to construct an algorithm to solve the affine generalized equation: where A 2 IR n\Thetan , a 2 IR n , and T is a maximal monotone polyhedral multifunction. For this problem, the T-map is given by As was shown in Section 3, for polyhedral T , A T is piecewise affine with respect to some finite collection M of n-cells whose union is IR n . Thus, to complete the description of the algorithm for affine generalized equations, it remains to show how to generate the representations. The task of constructing M is dependent upon how T is described. For example, in [22], T is taken as the normal cone NC to a polyhedral convex set C. M is then chosen to be the normal manifold, which is defined in terms of the nonempty faces F i of C. Specifically, the cells of the normal manifold are defined by is the common value of N F i for x 2 ri(F i ). This particular choice of cells leads to the algorithm given in [3]. For more general T , we assume that T is described as the union of a finite collection of polyhedral convex sets C i . We can then describe P T as the union of the sets S i g. By projecting each S i onto the domain of P T , we produce a collection of sets Since we know dom(P T To provide an example of this process, we return to the case where . Observe that fxg \Theta N Thus, we see that NC is the union of the polyhedral convex sets It follows that the process described above yields the normal manifold. Robinson [22, Proposition 2.4] proved that the normal manifold is a subdivision of IR n . However, in general, the collection of cells M generated by the above process is not a subdivision. This can be demonstrated by the following example. Let and let T := that T is simply the zero mapping, and is thus a maximal monotone multifunction. However, employing our procedure for constructing M, we obtain oe . Since oe 1 is not a face of oe 1 , we see that M := foe is not a subdivision of IR n . Since P T is single-valued, then by Lemma 3.3, P T is affine on each cell oe i 2 M. A representation of A T on each cell is then given by (9). In order to have a workable description of these affine maps, it would appear necessary to exploit the underlying structure of T . One such case is the subject of the next section. A particularly important class of affine variational inequalities is that for which the set C is rect- angular, i.e., C is defined by the constraints l - z - u where l and u are vectors in IR n , with l problem class has a number of features that are very attractive for pivotal algorithms similar to Algorithm AGE. In particular, the cells of linearity of the normal map are rectangular, and furthermore the normal map itself takes on a very simple form. Specifically, for an affine function F (z) := Az the matrix used to represent the normal map on any cell is formed simply by replacing some of the columns of A by the corresponding columns of the identity matrix. Rectangular variational inequalities are also attractive from a theoretical standpoint. In par- ticular, if at least one of l i and u i is finite for each i, then the normal map is coherently oriented with respect to C if and only if A is a P-matrix. Definition 5.1 ([4]) A matrix A is said to be a P-matrix if all its principal minors are positive. Note that when C is rectangular, then NC that we can extend the notion of rectangularity to generalized equations by requiring that the multifunction T be separable, i.e., it is of the form where for each i, T i is a maximal monotone polyhedral multifunction from IR to IR. With such a T , we shall see that the cells of linearity of the T-map A T are rectangular. We begin by looking at the resolvent operator . Note that where for each i, P T i is a continuous piecewise affine function, it follows that is a a continuous piecewise affine function from IR into IR. Let k i be the number of breakpoints of . Then, for some strictly increasing sequence of breakpoints f- ij of coefficients fd ij d Note that since P T is monotonic and nonexpansive, 0 - d ij - 1. The breakpoint sequence defines a subdivision of IR given by M We then define a subdivision of IR n by defined by oe [j 1 ;j 2 ;:::;j n \Theta Clearly, P T (and therefore A T ) is M-PA. This establishes our earlier statement that the cells of linearity of A T are rectangular. For each cell oe [j 1 ;j 2 ;:::;j n ] of M, define a diagonal matrix D [j 1 ;j 2 ;:::;j n ] by . Further, define the vector b [j 1 ;j 2 ;:::;j n represented by (D [j 1 ;j 2 ;:::;j n the T-map is given by A T \Deltan Thus, we see that the matrix M [j 1 ;j 2 ;:::;j n ] which represents A T on oe [j 1 ;j 2 ;:::;j n ] has columns which are convex combinations of columns of A and the corresponding columns of I . We now set about proving the main result of this section. Namely, if A is a P-matrix, then A T is coherently oriented for any separable polyhedral maximal monotone multifunction T . We first need to prove two technical lemmas. Lemma 5.2 If A and B are n \Theta n matrices where B is rank-1 such that det(A) ? 0 and Proof (j 1 ;:::;j n ) where the summation is taken over all possible choices of (j is either A \Deltai or -B \Deltai . Since B is rank-1, the determinants in the above sum are zero for all choices that include at least two columns of -B. Thus, Thus, is an affine function of -, which is positive at Thus, it is positive for all - 2 [0; 1]. Lemma 5.3 Let A be an n \Theta n matrix and let fB be a collection of rank-1 n \Theta n matrices. choices of - for all choices of - i 2 [0; 1]. Proof (By induction). The lemma is true for suppose the lemma is true for all k ! m, we shall prove the lemma true for Suppose is a collection of rank-1 n \Theta n matrices such that choices of - or 1. Let - A := A +B m . Then - A and fB the conditions of the lemma for Similarly, with - A := A, we have From these two results, we see that if we let ~ A := A A and B m satisfy the hypotheses for Lemma 5.2. Thus, for -m 2 [0; 1] Theorem 5.4 If A is a P -matrix, then for any separable maximal monotone polyhedral multi-function T , the T-map A T defined by (9) has the property that in any cell of linearity, the matrix representing A T has positive determinant. In particular, A T is coherently oriented. Proof Let A T have the representation ( - b) in the n-cell oe. By the our earlier discussion, - A can be formed by replacing columns of A by a convex combination of columns of A and the corresponding columns of the identity matrix. Thus, the matrix is of the form \Deltai . Observe that B i is a rank-1 matrix. Since A is a P-matrix, the matrix formed by replacing an arbitrary set of columns of A by corresponding columns of the identity matrix has positive determinant. Thus, the matrices satisfy the hypotheses of Lemma 5.3. Thus, by Lemma 5.3, det( - Corollary 5.5 If A is a P-matrix and T is a separable maximal monotone polyhedral multifunction, then using lexicographic ordering, Algorithm AGE will find a solution to A T in a finite number of steps. 6 Piecewise Linear-Quadratic Programming We conclude by giving an example of a well known problem in mathematical programming that can be solved using the technique we have presented. The piecewise linear-quadratic programming problem (PLQP) is given by S f1g are convex piecewise linear-quadratic defined below. Definition 6.1 A function f : S f1g is piecewise linear-quadratic if domf is closed and convex and there exists a finite subdivision M of dom(f) such that for each oe 2 M, f joe is a quadratic function. Note that domf is polyhedral, and further that since the cells in the subdivision are closed, f is a continuous function on domf . The optimality conditions for PLQP are stated by the relation where @h is the convex subdifferential operator defined by Under an appropriate constraint qualification (i.e. ri(A(dom(f))) T ri(dom(OE)) 6= ;), it follows that Thus, for the optimality conditions to be satisfied, there must be an x 2 dom(f) and y 2 @OE(Ax) such that \GammaA ? y 2 @f(x). By [23, Theorem 23.5], the first statement is equivalent to where OE is the conjugate of OE. The optimality conditions are then Thus, if we define A := the optimality conditions for PLQP can stated as the generalized equation The fact that T is polyhedral was shown in [25]. Thus, the optimality conditions for the piecewise linear-quadratic program can be expressed as an affine generalized equation, which can then be solved using our algorithm. Acknowledgement The authors would like to thank Stephen Robinson for constructive comments, suggestions and pertinent references that greatly improved the presentation of the material given in this paper. --R Op'erateurs Maximaux Monotones et Semi-Groupes de Contractions dans les Espaces de Hilbert PC matrices and the linear complementarity problem. A pivotal method for affine variational inequalities. The Linear Complementarity Problem. Robust Solution of Mixed Complementarity Problems. The PATH solver: A non-monotone stabilization scheme for mixed complementarity problems A pathsearch damped Newton method for computing general equilibria. On the basic theorem of complementarity. A short course in solving equations with PL homotopies. Computing stationary points. Computing stationary points Equivalence of LCP and PLS. Engineering and economic applications of complementarity prob- lems Piecewise Linear Topology. Generalized complementarity problem. Equilibrium points of bimatrix games. Global convergence of damped Newton's method for nonsmooth equations Some continuity properties of polyhedral multifunctions. Generalized equations and their solution: Part I: Basic theory. Generalized equations. Normal maps induced by linear transformations. Convex Analysis. MILES: A mixed inequality and nonlinear equation solver. On Monotropic Piecewise Quadratic Programming. A note on computing equilibria in economies with activity analysis models of production. --TR
normal map;homotopy;generalized equations;piecewise affine
309500
Similarity-Based Models of Word Cooccurrence Probabilities.
In many applications of natural language processing (NLP) it is necessary to determine the likelihood of a given word combination. For example, a speech recognizer may need to determine which of the two word combinations eat a peach and eat a beach is more likely. Statistical NLP methods determine the likelihood of a word combination from its frequency in a training corpus. However, the nature of language is such that many word combinations are infrequent and do not occur in any given corpus. In this work we propose a method for estimating the probability of such previously unseen word combinations using available information on most similar words.We describe probabilistic word association models based on distributional word similarity, and apply them to two tasks, language modeling and pseudo-word disambiguation. In the language modeling task, a similarity-based model is used to improve probability estimates for unseen bigrams in a back-off language model. The similarity-based method yields a 20% perplexity improvement in the prediction of unseen bigrams and statistically significant reductions in speech-recognition error.We also compare four similarity-based estimation methods against back-off and maximum-likelihood estimation methods on a pseudo-word sense disambiguation task in which we controlled for both unigram and bigram frequency to avoid giving too much weight to easy-to-disambiguate high-frequency configurations. The similarity-based methods perform up to 40% better on this particular task.
Introduction Data sparseness is an inherent problem in statistical methods for natural language processing. Such methods use statistics on the relative frequencies of configurations of elements in a training corpus to learn how to evaluate alternative analyses or interpretations of new samples of text or speech. The most likely analysis will be taken to be the one that contains the most frequent configurations. The problem of data sparseness, also known as the zero-frequency problem (Witten & Bell, 1991), arises when analyses contain configurations that never occurred in the training corpus. Then it is not possible to estimate probabilities from observed frequencies, and some other estimation scheme that can generalize from the training data has to be used. In language processing applications, the sparse data problem occurs even for very large data sets. For example, Essen and Steinbiss (1992) report that in a 75%-25% split of the million-word LOB corpus, 12% of the bigrams in the test partition did not occur in the training portion. For trigrams, the sparse data problem is even more severe: for instance, researchers at IBM (Brown, DellaPietra, deSouza, examined a training corpus consisting of almost 366 million English words, and discovered that one can expect 14.7% of the word triples in any new English text to be absent from the training sample. Thus, estimating the probability of unseen configurations is crucial to accurate language modeling, since the aggregate probability of these unseen events can be significant. We focus here on a particular kind of configuration, word cooccurrence. Examples of such cooccurrences include relationships between head words in syntactic constructions (verb-object or adjective-noun, for instance) and word sequences (n- grams). In commonly used models, the probability estimate for a previously unseen cooccurrence is a function of the probability estimates for the words in the cooc- currence. For example, in word bigram models, the probability P (w 2 |w 1 ) of a conditioned word w 2 that has never occurred in training following the conditioning word w 1 is typically calculated from the probability of w 2 , as estimated by w 2 's frequency in the corpus (Jelinek, Mercer, & Roukos, 1992; Katz, 1987). This method makes an independence assumption on the cooccurrence of w 1 and w 2 : the more frequent w 2 is, the higher the estimate of P (w 2 |w 1 ) will be, regardless of w 1 . Class-based and similarity-based models provide an alternative to the independence assumption. In these models, the relationship between given words is modeled by analogy with other words that are in some sense similar to the given ones. For instance, Brown et al. (1992) suggest a class-based n-gram model in which words with similar cooccurrence distributions are clustered into word classes. The cooccurrence probability of a given pair of words is then estimated according to an averaged cooccurrence probability of the two corresponding classes. Pereira, Tishby, and Lee (1993) propose a "soft" distributional clustering scheme for certain grammatical cooccurrences in which membership of a word in a class is probabilistic. Cooccurrence probabilities of words are then modeled by averaged cooccurrence probabilities of word clusters. Dagan, Marcus, and Markovitch (1993, 1995) present a similarity-based model, which avoids building clusters. Instead, each word is modeled by its own specific class, a set of words that are most similar to it. Using this scheme, they predict which unobserved cooccurrences are more likely than others. Their model, however, does not provide probability estimates and so cannot be used as a component of a larger probabilistic model, as would be required in, say, speech recognition. Class-based and similarity-based methods for cooccurrence modeling may at first sight seem to be special cases of clustering and weighted nearest-neighbor approaches used widely in machine learning and pattern recognition (Aha, Kibler, Albert, 1991; Cover & Hart, 1967; Duda & Hart, 1973; Stanfill & Waltz, 1986; Devroye, Gy-orfi, & Lugosi, 1996; Atkeson, Moore, & Schaal, 1997). There are important di#erences between those methods and ours. Clustering and nearest-neighbor techniques often rely on representing objects as points in a multidimensional space with coordinates determined by the values of intrinsic object features. However, in most language-modeling settings, all we know about a word are the frequencies of its cooccurrences with other words in certain configurations. Since the purpose of modeling is to estimate the probabilities of cooccurrences, the same cooccurrence statistics are the basis for both the similarity measure and the model predictions. That is, the only means we have for measuring word similarity are the predictions words make about what words they cooccur with, whereas in typical instance or (non-distributional) clustering learning methods, word similarity is defined from intrinsic features independently of the predictions (cooccurrence probabilities or classifications) associated with particular words (see for instance the work of Cardie (1993), Ng and Lee (1996), Ng (1997), and Zavrel and Daelemans (1997)). 1.1. Main Contributions Our main contributions are a general scheme for using word similarity to improve the probability estimates of back-o# models, and a comparative analysis of several similarity measures and parameter settings in two important language processing tasks, language modeling and disambiguation, showing that similarity-based estimates are indeed useful. In our initial study, a language-model evaluation, we used a similarity-based model to estimate unseen bigram probabilities for Wall Street Journal text and compared it to a standard back-o# model (Katz, 1987). Testing on a held-out sample, the similarity model achieved a 20% perplexity reduction over back-o# for unseen bigrams. These constituted 10.6% of the test sample, leading to an overall reduction in test-set perplexity of 2.4%. The similarity-based model was also tested in a speech-recognition task, where it yielded a statistically significant reduction (32 versus 64 mistakes in cases where there was disagreement with the back-o# model) in recognition error. In the disambiguation evaluation, we compared several variants of our initial method and the cooccurrence smoothing method of Essen and Steinbiss (1992) against the estimation method of Katz in a decision task involving unseen pairs of direct objects and verbs. We found that all the similarity-based models performed almost 40% better than back-o#, which yielded about 49% accuracy in our experimental setting. Furthermore, a scheme based on the Jensen-Shannon divergence (Rao, 1982; Lin, 1991) 1 yielded statistically significant improvement in error rate over cooccurrence smoothing. We also investigated the e#ect of removing extremely low-frequency events from the training set. We found that, in contrast to back-o# smoothing, where such events are often discarded from training with little discernible e#ect, similarity-based smoothing methods su#er noticeable performance degradation when singletons (events that occur exactly once) are omitted. The paper is organized as follows. Section 2 describes the general similarity-based framework; in particular, Section 2.3 presents the functions we use as measures of similarity. Section 3 details our initial language modeling experiments. Section 4 describes our comparison experiments on a pseudo-word disambiguation task. Section 5 discusses related work. Finally, Section 6 summarizes our contributions and outlines future directions. 2. Distributional Similarity Models We wish to model conditional probability distributions arising from the cooccurrence of linguistic objects, typically words, in certain configurations. We thus consider necessarily disjoint. In what follows, we use subscript i for the i th element of a the conditional probability (or rather, some empirical estimate drawn from a base language model, the true probability being unknown) that a pair has second element given that its first element is denotes the probability estimate, according to the base language model, that w 1 is the first word of a pair given that the second word is w 2 . P (w) denotes the base estimate for the unigram probability of word w. A similarity-based language model consists of three parts: a scheme for deciding which word pairs require a similarity-based estimate, a method for combining information from similar words, and, of course, a function measuring the similarity between words. We give the details of each of these three parts in the following three sections. We will only be concerned with similarity between words in V 1 , which are the conditioning events for the probabilities P (w 2 |w 1 ) that we want to estimate. 2.1. Discounting and Redistribution Data sparseness makes the maximum likelihood estimate (MLE) for word pair probabilities unreliable. The MLE for the probability of a word pair (w 1 , w 2 ), conditional on the appearance of word w 1 , is simply is the frequency of (w 1 , w 2 ) in the training corpus and c(w 1 ) is the frequency of w 1 . However, PML is zero for any unseen word pair, that is, any such pair would be predicted as impossible. More generally, the MLE is unreliable for events with small nonzero counts as well as for those with zero counts. In the language modeling literature, the term smoothing is used to refer to methods for adjusting the probability estimates of small-count events away from the MLE to try to alleviate its unreliability. Our proposals address the zero-count problem exclusively, and we rely on existing techniques to smooth other small counts. Previous proposals for the zero-count problem (Good, 1953; Jelinek et al., 1992; Katz, 1987; Church & Gale, 1991) adjust the MLE so that the total probability of seen word pairs is less than one, leaving some probability mass to be redistributed among the unseen pairs. In general, the adjustment involves either interpolation, in which the MLE is used in linear combination with an estimator guaranteed to be nonzero for unseen word pairs, or discounting, in which a reduced MLE is used for seen word pairs, with the probability mass left over from this reduction used to model unseen pairs. The back-o# method of Katz (1987) is a prime example of discounting: where P d represents the Good-Turing discounted estimate (Katz, 1987) for seen word pairs, and P r denotes the model for probability redistribution among the unseen word pairs. #(w 1 ) is a normalization factor. Since an extensive comparison study by Chen and Goodman (1996) indicated that back-o# is better than interpolation for estimating bigram probabilities, we will not consider interpolation methods here; however, one could easily incorporate similarity-based estimates into an interpolation framework as well. In his original back-o# model, Katz used P (w 2 ) as the model for predicting word pairs, that is, his model backed o# to a unigram model for unseen bigrams. However, it is conceivable that backing o# to a more detailed model than unigrams would be advantageous. Therefore, we generalize Katz's formulation by writing P r (w 2 |w 1 ) instead of P (w 2 ), enabling us to use similarity-based estimates for unseen word pairs instead of unigram frequency. Observe that similarity estimates are used for unseen word pairs only. We next investigate estimates for P r (w 2 |w 1 ) derived by averaging information from words that are distributionally similar to w 1 . 2.2. Combining Evidence Similarity-based models make the following assumption: if word w # 1 is "similar" to word w 1 , then w # 1 can yield information about the probability of unseen word pairs involving w 1 . We use a weighted average of the evidence provided by similar words, or neighbors, where the weight given to a particular word w # 1 depends on its similarity to w 1 . More precisely, let W (w 1 , w # denote an increasing function of the similarity between denote the set of words most similar to w 1 . Then the general form of similarity model we consider is a W-weighted linear combination of predictions of similar words: normalization factor. According to this formula, w 2 is more likely to occur with w 1 if it tends to occur with the words that are most similar to w 1 . Considerable latitude is allowed in defining the set S(w 1 ), as is evidenced by previous work that can be put in the above form. Essen and Steinbiss (1992) and Karov and Edelman (1996) (implicitly) set S(w 1 However, it may be desirable to restrict S(w 1 ) in some fashion for e#ciency reasons, especially if V 1 is large. For instance, in the language modeling application of Section 3, we use the closest k or fewer words w # 1 such that the dissimilarity between w 1 and w # 1 is less than a threshold value t; k and t are tuned experimentally. One can directly replace P r (w 2 |w 1 ) in the back-o# equation (2) with P SIM (w 2 |w 1 ). However, other variations are possible, such as interpolating with the unigram probability This represents, in e#ect, a linear combination of the similarity estimate and the back-o# estimate: if then we have exactly Katz's back-o# scheme. In the language modeling task (Section 3) we set # experimentally; to simplify our comparison of di#erent similarity models for sense disambiguation (Section 4), we set # to 0. It would be possible to make # depend on w 1 , so that the contribution of the similarity estimate could vary among words. Such dependences are often used in interpolated models (Jelinek & Mercer, 1980; Jelinek et al., 1992; Saul & Pereira, 1997) and are indeed advantageous. However, since they introduce hidden vari- ables, they require a more complex training algorithm, and we did not pursue that direction in the present work. 2.3. Measures of Similarity We now consider several word similarity measures that can be derived automatically from the statistics of a training corpus, as opposed to being derived from manually-constructed word classes (Yarowsky, 1992; Resnik, 1992, 1995; Luk, 1995; Lin, 1997). Sections 2.3.1 and 2.3.2 discuss two related information-theoretic functions, the KL divergence and the Jensen-Shannon divergence. Section 2.3.3 describes the L 1 norm, a geometric distance function. Section 2.3.4 examines the confusion probability, which has been previously employed in language modeling tasks. There are, of course, many other possible functions; we have opted to restrict our attention to this reasonably diverse set. For each function, a corresponding weight function W (w 1 , w # 1 ) is given. The choice of weight function is to some extent arbitrary; the requirement that it be increasing in the similarity between w 1 and w # 1 is not extremely constraining. While clearly performance depends on using a good weight function, it would be impossible to try all conceivable W (w 1 , w # 1 ). Therefore, in section 4.5, we describe experiments evaluating similarity-based models both with and without weight functions. All the similarity functions we describe depend on some base language model may or may not be the Katz discounted model - Section 2.1 above. While we discuss the complexity of computing each similarity function, it should be noted that in our current implementation, this is a one-time cost: we construct the of word-to-word similarities before any parameter training takes place. 2.3.1. KL divergence The Kullback-Leibler (KL) divergence is a standard information-theoretic measure of the dissimilarity between two probability mass functions (Kullback, 1959; Cover & Thomas, 1991). We can apply it to the conditional distributions induced by words in V 1 on words in non-negative, and is zero if and only if P (w 2 |w 1 . However, the KL divergence is non-symmetric and does not obey the triangle inequality. For 1 ) to be defined it must be the case that P (w 2 |w Unfortunately, this generally does not hold for MLEs based on samples; we must use smoothed estimates that redistribute some probability mass to zero-frequency events. But this forces the sum in (4) to be over all w which makes this calculation expensive for large vocabularies. Once the divergence D(w 1 #w # 1 ) is computed, we set The role of the free parameter # is to control the relative influence of the neighbors closest to non-negligible only for those w # 1 that are extremely close to w 1 , whereas if # is low, distant neighbors also contribute to the estimate. We chose a negative exponential function of the KL divergence for the weight function by analogy with the form of the cluster membership function in related distributional clustering work (Pereira et al., 1993) and also because that is the form for the probability that w 1 's distribution arose from a sample drawn from the distribution of w # 1 (Cover & Thomas, 1991; Lee, 1997). However, these reasons are heuristic rather than theoretical, since we do not have a rigorous probabilistic justification for similarity-based methods. 2.3.2. Jensen-Shannon divergence A related measure is the Jensen-Shannon divergence (Rao, 1982; Lin, 1991), which can be defined as the average of the KL divergence of each of two distributions to their average distribution: is shorthand for the distribution2 (P (w 2 |w 1 Since the KL divergence is nonnegative, J(w 1 , w more, letting p(w 2 is easy to see that log q(w) is the entropy of the discrete density q. This equation shows that J gives the information gain achieved by distinguishing the two distributions p and p # (conditioning on contexts w 1 and w pooling the two distributions (ignoring the distinction between w 1 and w # 1 ). It is also easy to see that J can be computed e#ciently, since it depends only on those conditioned words that occur in both contexts. Indeed, letting grouping the terms of (6) appropriately, we obtain ranging between 0 and log 2, and smoothed estimates are not required because probability ratios are not involved. As in the KL divergence case, we set W J (w 1 , w plays the same role as before. 2.3.3. L 1 norm The L 1 norm is defined as By grouping terms as before, we can express L(w 1 , w # 1 ) in a form depending only on the "common" It follows from the triangle inequality that 0 # L(w 1 , w # with equality to 2 if and only if there are no words w 2 such that both P (w are strictly positive. Since we require a weighting scheme that is decreasing in L, we set with # again free. 2 As before, the higher # is, the more relative influence is accorded to the nearest neighbors. It is interesting to note the following relations between the L 1 norm, the KL- divergence, and the Jensen-Shannon divergence. Cover and Thomas (1991) give the following lower bound: where b is the base of the logarithm function. Lin (1991) notes that L is an upper bound for J : 2.3.4. Confusion probability Extending work by Sugawara, Nishimura, Toshioka, Okochi, and Kaneko (1985), Essen and Steinbiss (1992) used confusion probability to estimate word cooccurrence probabilities. 3 They report 14% improvement in test-set perplexity (defined below) on a small corpus. The confusion probability was also used by Grishman and Sterling (1993) to estimate the likelihood of selectional patterns. The confusion probability is an estimate of the probability that word w # 1 can be substituted for word w 1 , in the sense of being found in the same contexts: serves as a normalization factor). In contrast to the distance functions described above, PC has the curious property that w 1 may not necessarily be the "closest" word to itself, that is, there may exist a word w # 1 such that PC (w # 1 Section 4.4 for an example. The confusion probability can be computed from empirical estimates provided all unigram estimates are nonzero (as we assume throughout). In fact, the use of smoothed estimates such as those provided by Katz's back-o# scheme is problem- atic, because those estimates typically do not preserve consistency with respect to marginal estimates and Bayes's rule (that is, it may be that # w2 using consistent estimates (such as the MLE), we can safely apply Bayes's rule to rewrite PC as follows: Table 1. Summary of Similarity Function Properties name range base LM constraints tune? J [0, log 2] none yes Bayes consistency no As with the Jensen-Shannon divergence and the L 1 norm, this sum requires computation only over the "common" w 2 's. Examination of Equation (8) reveals an important di#erence between the confusion probability and the functions D, J , and L described in the previous sec- tions. Those functions rate w # 1 as similar to w 1 if, roughly, P (w 2 |w # 1 ) is high when however, is greater for those w # 1 for which P (w # 1 , w 2 ) is large when P (w 2 |w 1 )/P (w 2 ) is. When this ratio is large, we may think of w 2 as being exceptional, since if w 2 is infrequent, we do not expect P (w 2 |w 1 ) to be large. 2.3.5. Summary Several features of the measures of similarity listed above are summarized in Table 1. "Base LM constraints" are conditions that must be satisfied by the probability estimates of the base language model. The last column indicates whether the weight W (w 1 , w # associated with each similarity function depends on a parameter that needs to be tuned experimentally. 3. Language Modeling The goal of our first set of experiments, described in this section, was to provide proof of concept by showing that similarity-based models can achieve better language modeling performance than back-o#. We therefore only used one similarity measure. The success of these experiments convinced us that similarity-based methods are worth examining more closely; the results of our second set of experiments, comparing several similarity functions on a pseudo-word disambiguation task, are described in the next section. Our language modeling experiments used a similarity-based model, with the KL divergence as (dis)similarity measure, as an alternative to unigram frequency when backing o# in a bigram model. That is, we used the bigram language model defined by: the entire vocabulary. As noted earlier, the estimates of must be smoothed to avoid division by zero when computing we employed the standard Katz bigram back-o# model for that purpose. Since |V 20, 000 in this application, we considered only a small fraction of V in computing using the tunable thresholds k and t described in Section 2.2 for this purpose. The standard evaluation metric for language models is the likelihood of the test data according to the model, or, more intuitively, the test-set perplexity which represents the average number of alternatives presented by the (bigram) model after each test word. Thus, a better model will have a lower perplexity. In our task, lower perplexity will indicate better prediction of unseen bigrams. We evaluated the above model by comparing its test-set perplexity and e#ect on speech-recognition accuracy with the baseline bigram back-o# model developed by MIT Lincoln Laboratories for the Wall Street Journal (WSJ) text and dictation corpora provided by ARPA's HLT program (Paul, 1991). 4 The baseline back-o# model follows the Katz design, except that, for the sake of compactness, all frequency one bigrams are ignored. The counts used in this model and in ours were obtained from 40.5 million words of WSJ text from the years 1987-89. For perplexity evaluation, we tuned the similarity model parameters by minimizing perplexity on an additional sample of 57.5 thousand words of WSJ text, drawn from the ARPA HLT development test set. The best parameter values found were these values, the improvement in perplexity for unseen bigrams in a held-out HLT evaluation test set) is just over 20%. Since unseen bigrams comprise 10.6% of this sample, the improvement on unseen bigrams corresponds to an overall test set perplexity improvement of 2.4% (from 237.4 to 231.7). Table 2 shows reductions in training and test perplexity, sorted by training reduction, for di#erent choices of the number k of closest neighbors used. The values of # and t are the best ones found for each k. 5 From equation (9), it is clear that the computational cost of applying the similarity model to an unseen bigram is O(k). Therefore, lower values for k (and t) are computationally preferable. From the table, we can see that reducing k to incurs a penalty of less than 1% in the perplexity improvement, so relatively low values of k appear to be su#cient to achieve most of the benefit of the similarity model. As the table also shows, the best value of # increases as k decreases; that is, for lower k, a greater weight is given to the conditioned word's frequency. This suggests that the predictive power of neighbors beyond the closest or so can be modeled fairly well by the overall frequency of the conditioned word. The bigram similarity model was also tested as a language model in speech recog- nition. The test data for this experiment were pruned word lattices for 403 WSJ Table 2. Perplexity Reduction on Unseen Bigrams for Di#erent Model Parameters training reduction (%) test reduction (%) 50 2.5 4.0 0.15 18.38 20.45 100 2.5 4.5 0.1 18.23 20.54 90 2.5 4.5 0.1 18.23 20.59 closed-vocabulary test sentences. Arc scores in these lattices are sums of an acoustic score (negative log likelihood) and a language-model score, which in this case was the negative log probability provided by the baseline bigram model. From the given lattices, we constructed new lattices in which the arc scores were modified to use the similarity model instead of the baseline model. We compared the best sentence hypothesis in each original lattice with the best hypothesis in the modified one, and counted the word disagreements in which one of the hypotheses was correct. There were a total of 96 such disagreements; the similarity model was correct in 64 cases, and the back-o# model in 32. This advantage for the similarity model is statistically significant at the 0.01 level. The overall reduction in error rate is small, from 21.4% to 20.9%, because the number of disagreements is small compared with the overall number of errors in the recognition setup employed in these experiments. Table 3 shows some examples of speech recognition disagreements between the two models. The hypotheses are labeled 'B' for back-o# and `S' for similarity, and the bold-face words are errors. The similarity model seems to be better at modeling regularities such as semantic parallelism in lists and avoiding a past tense form after "to." On the other hand, the similarity model makes several mistakes in which a function word is inserted in a place where punctuation would be found in written text. 4. Word-Sense Disambiguation Since the experiments described in the previous section demonstrated promising results for similarity-based estimation, we ran a second set of experiments designed to help us compare and analyze the somewhat diverse set of similarity measures given in Table 1. Unfortunately, the KL divergence and the confusion probability have di#erent requirements on the base language model, and so we could not run a direct four-way comparison. As explained below, we elected to omit the KL divergence from consideration. Table 3. Speech Recognition Disagreements between Models commitments . from leaders felt the three point six billion dollars S commitments . from leaders fell to three point six billion dollars followed by France the US agreed in Italy S followed by France the US Greece . Italy he whispers to made a he whispers to an aide B the necessity for change exist S the necessity for change exists B without . additional reserves Centrust would have reported S without . additional reserves of Centrust would have reported B in the darkness past the church S in the darkness passed the church We chose to evaluate the three remaining measures on a word sense disambiguation task, in which each method was presented with a noun and two verbs, and was asked which verb was more likely to have the noun as a direct object. Thus, we did not measure the absolute quality of the assignment of probabilities, as would be the case in a perplexity evaluation, but rather the relative quality. We could therefore ignore constant factors, which is why we did not normalize the similarity measures. 4.1. Task Definition In the usual word sense disambiguation problem, the method to be tested is presented with an ambiguous word in some context, and is asked to identify the correct sense of the word from that context. For example, a test instance might be the sentence fragment "robbed the bank"; the question is whether "bank" refers to a river bank, a savings bank, or perhaps some other alternative meaning. While sense disambiguation is clearly an important problem for language processing applications, as an evaluation task it presents numerous experimental di#cul- ties. First, the very notion of "sense" is not clearly defined; for instance, dictionaries may provide sense distinctions that are too fine or too coarse for the data at hand. Also, one needs to have training data for which the correct senses have been as- signed; acquiring these correct senses generally requires considerable human e#ort. Furthermore, some words have many possible senses, whereas others are essentially monosemous; this means that test cases are not all uniformly hard. To circumvent these and other di#culties, we set up a pseudo-word disambiguation experiment (Sch-utze, 1992a; Gale, Church, & Yarowsky, 1992), the format of which is as follows. First, a list of pseudo-words is constructed, each of which is the combination of two di#erent words in V 2 . Each word in V 2 contributes to exactly one pseudo-word. Then, every w 2 in the test set is replaced with its corresponding pseudo-word. For example, if a pseudo-word is created out of the words "make" and "take", then the data is altered as follows: make plans # {make, take} plans take action # {make, take} action The method being tested must choose between the two words that make up the pseudo-word. The advantages of using pseudo-words are two-fold. First, the alternative "senses" are under the control of the experimenter. Each test instance presents exactly two alternatives to the disambiguation method, and the alternatives can be chosen to be of the same frequency, the same part of speech, and so on. Secondly, the pre- transformation data yields the correct answer, so that no hand-tagging of the word senses is necessary. These advantages make pseudo-word experiments an elegant and simple means to test the e#cacy of di#erent language models; of course they may not provide a completely accurate picture of how the models would perform in real disambiguation tasks, although one could create more realistic settings by making pseudo-words out of more than two words, varying the frequencies of the alternative pseudo-senses, and so on. For ease of comparison, we did not consider interpolation with unigram probabil- ities. Thus, the model we used for these experiments di#ers slightly from that used in the language modeling tests; it can be summarized as follows: 4.2. Data We used a statistical part-of-speech tagger (Church, 1988) and pattern matching and concordancing tools (due to David Yarowsky) to identify transitive main verbs nouns of the corresponding direct objects in 44 million words of 1988 Associated Press newswire. We selected the noun-verb pairs for the 1000 most frequent nouns in the corpus. These pairs are undoubtedly somewhat noisy given the errors inherent in the part-of-speech tagging and pattern matching. We used 80%, or 587, 833, of the pairs so derived for building models, reserving 20% for testing purposes. As some, but not all, of the similarity measures require smoothed models, we calculated both a Katz back-o# model P in equation (2), with P r (w 2 |w 1 and a maximum-likelihood model Furthermore, we wished to evaluate the hypothesis that a more compact language model can be built without a#ecting model quality by deleting singletons, word pairs that occur only once, from the training set. This claim had been made in particular for language modeling (Katz, 1987). We therefore built four base models, summarized in Table 4. Table 4. Base Language Models with singletons no singletons Katz BO-1 BO-o1 Since we wished to test the e#ectiveness of using similarity for unseen word cooc- currences, we removed from the test data any verb-object pairs that occurred in the training set; this resulted in 17, 152 unseen pairs (some occurred multiple times). The unseen pairs were further divided into five equal-sized parts, T 1 through T 5 , which formed the basis for fivefold cross-validation: in each of five runs, one of the used as a performance test set, with the other four combined into one set used for tuning parameters (if necessary) via a simple grid search that evaluated the error on the tuning set at regularly spaced points in parameter space. Finally, test pseudo-words were created from pairs of verbs with similar frequencies, so as to control for word frequency in the decision task. Our method was to simply rank the verbs by frequency and create pseudo-words out of all adjacent pairs (thus, each verb participated in exactly one pseudoword). Table 5 lists some randomly chosen pseudowords and the frequencies of the corresponding verbs. Table 5. Sample pseudoword verbs and frequencies. The word "meeet" is a typo occurring in the corpus. make (14782)/take (12871) fetch (35)/renegotiate (35) magnify (13)/exit (13) meeet (1)/stupefy (1) relabel (1)/entomb (1) We use error rate as our performance metric, defined asN of incorrect choices + (# of ties)/2) where N was the size of the test corpus. A tie occurs when the two words making up a pseudo-word are deemed equally likely. 4.3. Baseline Experiments The performances of the four base language models are shown in Table 6. MLE-1 and MLE-o1 both have error rates of exactly .5 because the test sets consist of unseen bigrams, which are all assigned a probability of 0 by maximum-likelihood estimates, and thus are all ties for this method. The back-o# models BO-1 and BO-o1 also perform similarly. Table 6. Base Language Model Error Rates Since the back-o# models consistently performed worse than the MLE models, we chose to use only the MLE models in our subsequent experiments. Therefore, we only ran comparisons between the measures that could utilize unsmoothed data, namely, the L 1 norm, L(w 1 , w # 1 ); the Jensen-Shannon divergence, J(w 1 , w # 1 ); and the confusion probability, PC (w # 1 |w 1 ). 6 4.4. Sample Closest Words In this section, we examine the closest words to a randomly selected noun, "guy", according to the three measures L, J , and PC . Table 7 shows the ten closest words, in order, when the base language model is MLE-1. There is some overlap between the closest words for L and the closest words for J , but very little overlap between the closest words for these measures and the closest words with respect to PC : only the words "man" and "lot" are common to all three. Also observe that the word "guy" itself is only fourth on the list of words with the highest confusion probability with respect to "guy". Let us examine the case of the nouns "kid" and "role" more closely. According to the similarity functions L and J , "kid" is the second closest word to "guy", and "role" is considered relatively distant. In the PC case, however, "role" has the highest confusion probability with respect to "guy," whereas "kid" has only the 80th highest confusion probability. What accounts for these di#erences? Table which gives the ten verbs most likely to occur with "guy", "kid", and "role", indicates that both L and J rate words as similar if they tend to cooccur with the same verbs. Observe that four of the ten most likely verbs to occur with "kid" Table 7. closest words to the word "guy" for L, J , and P C , using MLE-1 as the base language model. The rank of the words "role" and "kid" are also shown if they are not among the top ten. GUY kid 1.23 kid 0.15 people 0.024 lot 1.35 thing 0.1645 fire 0.013 thing 1.39 lot 0.165 GUY 0.0127 man 1.46 man 0.175 man 0.012 doctor 1.46 mother 0.184 year 0.01 girl 1.48 doctor 0.185 lot 0.0095 rest 1.485 friend 0.186 today 0.009 son 1.497 boy 0.187 way 0.008778 bit 1.498 son 0.188 part 0.008772 (role: rank 173) (role: rank 43) (kid: rank 80) Table 8. For each noun w 1 , the ten verbs w 2 with highest P (w 2 |w 1 ). Bold-face verbs occur with both the given noun and with "guy." The base language model is MLE-1. Noun Most Likely Verbs guy see get play let give catch tell do pick need kid get see take help want tell teach send give love role play take lead support assume star expand accept sing limit Table 9. Verbs with highest P (w 2 |"guy")/P (w 2 ) ratios. The numbers in parentheses are ranks. (1) electrocute (2) shortchange (3) bedevil (4) admire (5) bore (6) fool are also very likely to occur with "guy", whereas only the verb "play" commonly occurs with both "role" and "guy". If we sort the verbs by decreasing P (w 2 |"guy")/P (w 2 ), a di#erent order emerges Table 9): "play", the most likely verb to cooccur with "role", is ranked higher than "get", the most likely verb to cooccur with "kid", thus indicating why "role" has a higher confusion probability with respect to "guy" than "kid" does. Finally, we examine the e#ect of deleting singletons from the base language model. Table shows the ten closest words, in order, when the base language model is MLE-o1. The relative order of the four closest words remains the same; however, the next six words are quite di#erent from those for MLE-1. This data suggests Table closest words to the word "guy" for L, J , and P C , using MLE-o1 as the base language model. GUY kid 1.17 kid 0.15 people 0.025 lot 1.40 thing 0.16 fire 0.021 thing 1.41 lot 0.17 GUY 0.018 reason 1.417 mother 0.182 work 0.016 break 1.42 answer 0.1832 man 0.012 ball 1.439 reason 0.1836 lot 0.0113 answer 1.44 doctor 0.187 job 0.01099 tape 1.449 boost 0.189 thing 0.01092 rest 1.453 ball 0.19 reporter 0.0106 that the e#ect of singletons on calculations of similarity is quite strong, as is borne out by the experimental evaluations described in Section 4.5. We conjecture that this e#ect is due to the fact that there are many very low-frequency verbs in the data (65% of the verbs appeared with 10 or fewer nouns; the most common verb occurred with 710 nouns). Omitting singletons involving such verbs may well drastically alter the number of verbs that cooccur with both of two given nouns w 1 and w # 1 . Since the similarity functions we consider in this set of experiments depend on such words, it is not surprising that the e#ect of deleting singletons is rather dramatic. In contrast, a back-o# language model is not as sensitive to missing singletons because of the Good-Turing discounting of small counts and inflation of zero counts. 4.5. Performance of Similarity-Based Methods Figure 1 shows the results of our experiments on the five test sets, using MLE-1 as the base language model. The parameter # was always set to the optimal value for the corresponding training set. RAND, which is shown for comparison purposes, simply chooses the weights W (w 1 , w set equal to V 1 in all cases. The similarity-based methods consistently outperformed Katz's back-o# method and the MLE (recall that both yielded error rates of about .5) by a large margin, indicating that information from other word pairs is very useful for unseen pairs when unigram frequency is not informative. The similarity-based methods also do much better than RAND, which indicates that it is not enough to simply combine information from other words arbitrarily: word similarity should be taken into account. In all cases, J edged out the other methods. The average improvement in using J instead of PC is .0082; this di#erence is significant to the .1 level (p < .085), according to the paired t-test. The results for the MLE-o1 case are depicted in Figure 2. Again, we see the similarity-based methods achieving far lower error rates than the MLE, back-o#, RAND Figure 1. Error rates for each test set, where the base language model was MLE-1. The methods, going from left to right, are RAND , P C , L, and J . The performances shown are for settings of # that were optimal for the corresponding training set. # ranged from 4.0 to 4.5 for L and from 20 to 26 for J . and RAND methods, and again, J always performed the best. However, omitting singletons amplified the disparity between J and PC : the average di#erence was .024, which is significant to the .01 level (paired t-test). An important observation is that all methods, including RAND, su#ered a performance hit if singletons were deleted from the base language model. This seems to indicate that seen bigrams should be treated di#erently from unseen bigrams, even if the seen bigrams are extremely rare. We thus conclude that one cannot create a compressed similarity-based language model by omitting singletons without hurting performance, at least for this task. We now analyze the role of the parameter #. Recall that # appears in the weight functions for the Jensen-Shannon divergence and the L 1 norm: It controls the relative influence of the most similar words: their influence increases with higher values of #. Figure 3 shows how the value of # a#ects disambiguation performance. Four curves are shown, each corresponding to a choice of similarity function and base language model. The error bars depict the average and range of error rates over the five disjoint test sets. It is immediately clear that to get good performance results, # must be set much higher for the Jensen-Shannon divergence than for the L 1 norm. This phenomenon results from the fact that the range of possible values for J is much smaller than Error Rates on Test Sets, Base Language Model MLE-o1 RAND Figure 2. Error rates for each test set, where the base language model was MLE-o1. # ranged from 6 to 11 for L and from 21 to 22 for J error rate beta Effect of beta on test set error using different similarities Jensen, MLE1 Jensen, MLE-o1 Figure 3. Average and range of test-set error rates as # is varied. The similarity function is indicated by the point style; the base language model is indicated by the line style. that for L. This "compression" of J values requires a large # to scale di#erences of distances correctly. We also observe that setting # too low causes substantially worse error rates; however, the curves level o# rather than moving upwards again. That is, as long as a su#ciently large value is chosen, setting # suboptimally does not greatly impact performance. Furthermore, the shape of the curves is the same for both base language models, suggesting that the relation between # and test-set performance is relatively insensitive to variations in training data. The fact that higher values of # seem to lead to better error rates suggests that #'s role is to filter out distant neighbors. To test this hypothesis, we experimented with using only the k most similar neighbors. Figure 4 shows how the error rate depends on k for di#erent fixed values of #. The two lowest curves depict the performance of the Jensen-Shannon divergence and the L 1 norm when # is set to the optimal value with respect to average test set performance; it appears that the more distant neighbors have essentially no e#ect on error rate because their contribution to the sum (9) is negligible. In contrast, when too low a value of # is chosen (the upper two curves), distant neighbors are weighted too heavily. In this case, including more distant neighbors causes serious degradation of performance.0.260.30.340.380.42100 200 300 400 500 600 700 800 900 1000 error rate Effect of k on test set error using different similarities (MLE1) Jensen, beta=21 Jensen, beta=2 confusion Figure 4. Average and range of test-set error rates as k is varied. The base language model was MLE-1. The similarity function is indicated by the point style; the dashed and dotted lines indicate a suboptimal choice of #. Interestingly, the behavior of the confusion probability is di#erent from these two cases: adding more neighbors actually improves the error rate. This seems to indicate that the confusion probability is not correctly ranking similar words in order of informativeness. However, an alternative explanation is that PC is at a disadvantage only because it is not being employed in the context of a tunable weighting scheme. To distinguish between these two possibilities, we ran an experiment that dispensed with weights altogether. Instead, we took a vote of the k most similar neighbors: the alternative chosen as more likely was the one preferred by a majority of the most similar neighbors (note that we ignored the degree to which alternatives were preferred). The results are shown in Figure 5.0.280.320.360.40.44100 200 300 400 500 600 700 800 900 1000 error rate Effect of k on test set error, ignoring weights and probabilities Jensen, MLE1 Jensen, MLE-o1 confusion, MLE1 confusion, MLE-o1 Figure 5. Average and range of voting-scheme test-set error rates as k is varied. The similarity function is indicated by the point style; the base language model is indicated by the line style. We see that the k most similar neighbors according to J and L were always more informative than those chosen according to the confusion probability, with the largest performance gaps occurring for low k (of course, all methods performed the same for since in that case they were using the same set of neighbors). This graph provides clear evidence that the confusion probability is not as good a measure of the informativeness of other words. 5. Related Work There is a large body of work on notions of work similarity, word clustering, and their applications. It is impossible to compare all those methods directly, since the assumptions, experimental settings and applications of methods vary widely. Therefore, the discussion below is mainly descriptive, highlighting some of the main similarities and di#erences between the methods. 5.1. Statistical similarity and clustering for disambiguation and language modeling Our work is an instance of a growing body of research on using word similarity to improve performance in language-processing problems. Similarity-based algorithms either use the similarity scores between a word and other words directly in making their predictions, or rely on similarity scores between a word and representatives of precomputed similarity classes. An early attempt to automatically classify words into semantic classes was carried out in the Linguistic String Project (Grishman, Hirschman, & Nhan, 1986). Semantic classes were derived from similar cooccurrence patterns of words within syntactic relations. Cooccurrence statistics were then considered at the class level and used to alleviate data sparseness in syntactic disambiguation. Sch-utze (1992b, 1993) captures contextual word similarity by first reducing the dimensionality of a context representation using singular value decomposition and then using the reduced-dimensionality representation to characterize the possible contexts of a word. This information is used for word sense disambiguation. All occurrences of an ambiguous word are clustered and each cluster is mapped manually to one of the senses of the word. The context vector of a new occurrence of the ambiguous word is mapped to the nearest cluster which determines the sense for that occurrence. Sch-utze emphasizes that his method avoids clustering words into a pre-defined set of classes, claiming that such clustering is likely to introduce artificial boundaries that cut o# words from part of their semantic neighborhood. Karov and Edelman (1996) have also addressed the data sparseness problem in word sense disambiguation by using word similarity. They use a circular definition for both a word similarity measure and a context similarity measure. The circularity is resolved by an iterative process in which the system learns a set of typical usages for each of the senses of an ambiguous word. Given a new occurrence of the ambiguous word the system selects the sense whose typical context is most similar to the current context, applying a procedure which resembles the sense selection process of Sh-utze. Our scheme for employing word similarity in disambiguation was influenced by the work of Dagan et al. (1993, 1995). Their method computes a word similarity measure directly from word cooccurrence data. A word is then modeled by a set of most similar words, and the plausibility of an unseen cooccurrence is judged by the cooccurrence statistics of the words in this set. The similarity measure is a weighted Tanimoto measure, a version of which was also used by Grefenstette (1992, 1994). Word association is measured by mutual information, following earlier work on word similarity by Hindle (1990). The method of Dagan et al. does not provide probabilistic models. Disambiguation decisions are based on comparing scores for di#erent alternatives, but they do not produce explicit probability estimates and therefore cannot be integrated directly within a larger probabilistic framework. The cooccurrence smoothing model of Essen and Steinbiss (1992), like our model, produces explicit estimates of word cooccurrence probabilities based on the cooccurrence statistics of similar words. The similarity-based estimates are interpolated with direct estimates of n-gram probabilities to form a smoothed n-gram language model. Word similarity in this model is computed by the confusion probability measure, which we described and evaluated earlier. Several language modeling methods produce similarity-based probability estimates through class-based models. These methods do not use a direct measure of the similarity between a word and other words, but instead cluster the words into classes using a global optimization criterion. Brown et al. (1992) present a class-based n-gram model which records probabilities of sequences of word classes instead of sequences of individual words. The probability estimate for a bigram which contains a particular word is a#ected by bigram statistics for other words in the same class, where all words in the same class are considered similar in their cooccurrence behavior. Word classes are formed by a bottom-up hard-clustering algorithm whose objective function is the average mutual information of class cooc- currence. Ushioda (1996) introduces several improvements to mutual-information clustering. His method, which was applied to part-of-speech tagging, records all classes which contained a particular word during the bottom-up merging process. The word is then represented by a mixture of these classes rather than by a single class. The algorithms of Kneser and Ney (1993) and Ueberla (1994) are similar to that of Brown et al. (1992), although a di#erent optimization criterion is used, and the number of clusters remains constant throughout the membership assignment pro- cess. Pereira et al. (1993) use a formalism from statistical mechanics to derive a top-down soft-clustering algorithm with probabilistic class membership. Word cooccurrence probability is then modeled by a weighted average of class cooccurrence probabilities, where the weights correspond to membership probabilities of words within classes. 5.2. Thesaurus-based similarity The approaches described in the previous section induce word similarity relationships or word clusters from cooccurrence statistics in a corpus. Other researchers developed methods which quantify similarity relationships based on information in the manually crafted WordNet thesaurus (Miller, Beckwith, Fellbaum, Gross, & Miller, 1990). Resnik (1992, 1995) proposes a node-based approach for measuring the similarity between a pair of words in the thesaurus and applies it to various disambiguation tasks. His similarity function is an information-theoretic measure of the informativeness of the least general common ancestor of the two words in the thesaurus classification. Jiang and Conrath (1997) combine the node-based approach with an edge-based approach, where the similarity of nodes in the thesaurus is influenced by the path that connects them. Their similarity method was tested on a data set of word pair similarity ratings derived from human judgments. Lin (1997, 1998) derives a general concept-similarity measure from assumptions on desired properties of similarity. His measure is a function of the number of bits required to describe each of the two concepts as well as their "commonality". He then describes an instantiation of the measure for a hierarchical thesaurus and applies it to WordNet as part of a word sense disambiguation algorithm. 5.3. Contextual similarity for information retrieval Query expansion in information retrieval (IR) provides an additional motivation for automatic identification of word similarity. One line of work in the IR literature considers two words as similar if they occur often in the same documents. Another line of work considers the same type of word similarity we are concerned with, that is, similarity measured derived from word-cooccurrence statistics. Grefenstette (1992, 1994) argues that cooccurrence within a document yields similarity judgements that are not sharp enough for query expansion. Instead, he extracts coarse syntactic relationships from texts and represents a word by the set of its word-cooccurrences within each relation. Word similarity is defined by a weighted version of the Tanimoto measure which compares the cooccurrence statistics of two words. The similarity method was evaluated by measuring its impact on retrieval performance. Ruge (1992) also extracted word cooccurrences within syntactic relationships and evaluated several similarity measures on those data, focusing on versions of the cosine measure. The similarity rankings obtained by these measures were compared to those produced by human judges. 6. Conclusions Similarity-based language models provide an appealing approach for dealing with data sparseness. In this work, we proposed a general method for using similarity-based models to improve the estimates of existing language models, and we evaluated a range of similarity-based models and parameter settings on important language-processing tasks. In the pilot study, we compared the language modeling performance of a similarity-based model with a standard back-o# model. While the improvement we achieved over a bigram back-o# model is statistically signifi- cant, it is relatively modest in its overall e#ect because of the small proportion of unseen events. In a second, more detailed study we compared several similarity-based models and parameter settings on a smaller, more manageable word-sense disambiguation task. We observed that the similarity-based methods perform much better on unseen word pairs, with the measure based on the Jensen-Shannon divergence being the best overall. Our experiments were restricted to bigram probability estimation for reasons of simplicity and computational cost. However, the relatively small proportion of unseen bigrams in test data makes the e#ect of similarity-based methods necessarily modest in the overall tasks. We believe that the benefits of similarity-based methods would be more substantial in tasks with a larger proportion of unseen events, for instance language modeling with longer contexts. There is no obstacle in principle to doing this: in the trigram case, for example, we would still be determining the probability of pairs would consist of word pairs instead of single words. However, the number of possible similar events to a given element in V 1 is then much larger than in the bigram case. Direct tabulation of the events most similar to each event would thus not be practical, so more compact or approximate representations would have to be investigated. It would also be worth investigating the benefit of similarity-based methods to improve estimates for low-frequency seen events. However, we would need to replace the back-o# model by another one that combines multiple estimates for the same event, for example an interpolated model with context-dependent interpolation parameters. Another area for further investigation is the relationship between similarity-based and class-based approaches. As mentioned in the introduction, both rely on a common intuition, namely, that events can be modeled to some extent by similar events. Class-based methods are more computationally expensive at training time than nearest neighbor methods because they require searching for the best model structure (number of classes and, for hard clustering, class membership) and estimation of hidden parameters (class membership probabilities in soft clustering). On the other hand, class-based methods reduce dimensionality and are thus smaller and more e#cient at test time. Dimensionality reduction has also been claimed to improve generalization to test data, but the evidence for this is mixed. Furthermore, some class-based models have theoretically satisfying probabilistic interpretations (Saul & Pereira, 1997), whereas the justification for our similarity-based models is heuristic and empirical at present. Given the variety of class-based language modeling algorithms, as described in the section on related work above, it is beyond the scope of this paper to compare the performance of the two approaches. How- ever, such a comparison, especially one that would bring both approaches under a common probabilistic interpretation, would be well worth pursuing. Acknowledgments We thank Hiyan Alshawi, Joshua Goodman, Rebecca Hwa, Slava Katz, Doug McIl- roy, Stuart Shieber, and Yoram Singer for many helpful discussions, Doug Paul for help with his bigram back-o# model, and Andrej Ljolje and Michael Riley for providing word lattices for our speech recognition evaluation. We also thank the reviewers of this paper for their constructive criticisms, and the editors of the present issue, Claire Cardie and Ray Mooney, for their help and suggestions. Portions of this work have appeared previously (Dagan, Pereira, & Lee, 1994; Dagan, Lee, & Pereira, 1997); we thank the reviewers of those papers for their comments. Part of this work was done while the first author was a member of technical sta# and then a visitor at AT&T Labs, and the second author was a graduate student at Harvard University and a summer visitor at AT&T Labs. The second author received partial support from the National Science Foundation under Grant No. IRI-9350192, a National Science Foundation Graduate Fellowship, and an AT&T GRPW/ALFP grant. Notes 1. To the best of our knowledge, this is the first use of this particular distribution dissimilarity function in statistical language processing. The function itself is implicit in earlier work on distributional clustering (Pereira et al., 1993) and has been used by Tishby (p.c.) in other distributional similarity work. Finch (1993) discusses its use in word clustering, but does not provide an experimental evaluation on actual data. 2. We experimented with using 1 ) as well, but it yielded poorer performance results. 3. Actually, they present two alternative definitions. We use their model 2-B, which they found yielded the best experimental results. 4. The ARPA WSJ development corpora come in two versions, one with verbalized punctuation and the other without. We used the latter in all our experiments. 5. Values of # and t refer to base 10 logarithms and exponentials in all calculations. 6. It should be noted, however, that on BO-1 data, the KL-divergence performed slightly better than the L 1 norm. --R Locally weighted learning. An empirical study of smoothing techniques for language modeling. Nearest neighbor pattern classification. Pattern classification and scene analysis. Finding structure in language. Work on statistical methods for word sense disambiguation. The population frequencies of species and the estimation of population parameters. Use of syntactic context to produce term association lists for text retrieval. Explorations in automatic thesaurus discovery. Discovery procedures for sublanguage selectional patterns - initial experiments Noun classification from predicate-argument structures Principles of lexical language modeling for speech recognition. Semantic similarity based on corpus statistics and lexical taxonomy. Academia Sinica. Learning similarity-based word sense disambiguation from sparse data Estimation of probabilities from sparse data for the language model component of a speech recognizer. Improved clustering techniques for class-based statistical language modelling Information theory and statistics. Using syntactic dependency as local context to resolve word sense ambiguity. Morgan Kaufmann. Statistical sense disambiguation with relatively small corpora using dictionary definitions. WordNet: an online lexical database. Integrating multiple knowledge sources to disambiguate word sense: An exemplar-based approach Distributional clustering of English words. Wordnet and distributional analysis: A class-based approach to lexical discovery Disambiguating noun groupings with respect to WordNet senses. Experiments on linguistically-based term associations Aggregate and mixed-order Markov models for statistical language processing Word space. Morgan Kaufmann. Toward memory-based reasoning Isolated word recognition using hidden Markov models. An extended clustering algorithm for statistical language models (Tech. Hierarchical clustering of words and applications to NLP tasks. The zero-frequency problem: Estimating the probabilities of novel events in adaptive text compression --TR --CTR Yoichi Tomiura , Shosaku Tanaka , Toru Hitaka, Estimating satisfactoriness of selectional restriction from corpus without a thesaurus, ACM Transactions on Asian Language Information Processing (TALIP), v.4 n.4, p.400-416, December 2005 Kilyoun Kim , Key-Sun Choi, Dimension-reduced estimation of word co-occurrence probability, Proceedings of the 38th Annual Meeting on Association for Computational Linguistics, p.571-578, October 03-06, 2000, Hong Kong Doina Tatar, Word Sense Disambiguation by Machine Learning Approach: A Short Survey, Fundamenta Informaticae, v.64 n.1-4, p.433-442, January 2005 Egidio Terra , Charles L. A. Clarke, Fast computation of lexical affinity models, Proceedings of the 20th international conference on Computational Linguistics, p.1022-es, August 23-27, 2004, Geneva, Switzerland Yu-Seop Kim , Jeong-Ho Chang , Byoung-Tak Zhang, A comparative evaluation of data-driven models in translation selection of machine translation, Proceedings of the 19th international conference on Computational linguistics, p.1-7, August 24-September 01, 2002, Taipei, Taiwan Mats Rooth , Stefan Riezler , Detlef Prescher , Glenn Carroll , Franz Beil, Inducing a semantically annotated lexicon via EM-based clustering, Proceedings of the 37th annual meeting of the Association for Computational Linguistics on Computational Linguistics, p.104-111, June 20-26, 1999, College Park, Maryland Anna Korhonen , Yuval Krymolowski, On the robustness of entropy-based similarity measures in evaluation of subcategorization acquisition systems, proceeding of the 6th conference on Natural language learning, p.1-7, August 31, 2002 Maayan Geffet , Ido Dagan, Feature vector quality and distributional similarity, Proceedings of the 20th international conference on Computational Linguistics, p.247-es, August 23-27, 2004, Geneva, Switzerland Egidio Terra , C. L. A. Clarke, Frequency estimates for statistical word similarity measures, Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology, p.165-172, May 27-June 01, 2003, Edmonton, Canada Chin-Yew Lin , Guihong Cao , Jianfeng Gao , Jian-Yun Nie, An information-theoretic approach to automatic evaluation of summaries, Proceedings of the main conference on Human Language Technology Conference of the North American Chapter of the Association of Computational Linguistics, p.463-470, June 04-09, 2006, New York, New York Jianfeng Gao , Hisami Suzuki , Wei Yuan, An empirical study on language model adaptation, ACM Transactions on Asian Language Information Processing (TALIP), v.5 n.3, p.209-227, September 2006 Yair Even-Zohar , Dan Roth, A classification approach to word prediction, Proceedings of the first conference on North American chapter of the Association for Computational Linguistics, p.124-131, April 29-May Lillian Lee, Measures of distributional similarity, Proceedings of the 37th annual meeting of the Association for Computational Linguistics on Computational Linguistics, p.25-32, June 20-26, 1999, College Park, Maryland Lillian Lee , Fernando Pereira, Distributional similarity models: clustering vs. nearest neighbors, Proceedings of the 37th annual meeting of the Association for Computational Linguistics on Computational Linguistics, p.33-40, June 20-26, 1999, College Park, Maryland Maria Lapata , Scott McDonald , Frank Keller, Determinants of adjective-noun plausibility, Proceedings of the ninth conference on European chapter of the Association for Computational Linguistics, June 08-12, 1999, Bergen, Norway Sabine Schulte im Walde, Experiments on the Automatic Induction of German Semantic Verb Classes, Computational Linguistics, v.32 n.2, p.159-194, June 2006 Yuseop Kim , Byoung-Tak Zhang , Yung Taek Kim, Collocation Dictionary Optimization Using WordNetand k-Nearest Neighbor Learning, Machine Translation, v.16 n.2, p.89-108, June 2001 Viktor Pekar, Acquisition of verb entailment from text, Proceedings of the main conference on Human Language Technology Conference of the North American Chapter of the Association of Computational Linguistics, p.49-56, June 04-09, 2006, New York, New York Julie Weeds , David Weir , Diana McCarthy, Characterising measures of lexical distributional similarity, Proceedings of the 20th international conference on Computational Linguistics, p.1015-es, August 23-27, 2004, Geneva, Switzerland Maria Lapata , Frank Keller , Scott McDonald, Evaluating smoothing algorithms against plausibility judgements, Proceedings of the 39th Annual Meeting on Association for Computational Linguistics, p.354-361, July 06-11, 2001, Toulouse, France Zoltn Szamonek , Istvn Bir, Similarity based smoothing in language modeling, Acta Cybernetica, v.18 n.2, p.303-314, January 2007 Kristina Toutanova , Christopher D. Manning , Andrew Y. Ng, Learning random walk models for inducing word dependency distributions, Proceedings of the twenty-first international conference on Machine learning, p.103, July 04-08, 2004, Banff, Alberta, Canada Pablo Gamallo , Alexandre Agustini , Gabriel P. Lopes, Clustering Syntactic Positions with Similar Semantic Requirements, Computational Linguistics, v.31 n.1, p.107-146, March 2005 Frank Keller , Maria Lapata , Olga Ourioupina, Using the web to overcome data sparseness, Proceedings of the ACL-02 conference on Empirical methods in natural language processing, p.230-237, July 06, 2002 Alexander Budanitsky , Graeme Hirst, Evaluating WordNet-based Measures of Lexical Semantic Relatedness, Computational Linguistics, v.32 n.1, p.13-47, March 2006 Maria Lapata, The disambiguation of nominalizations, Computational Linguistics, v.28 n.3, p.357-388, September 2002 Julie Weeds , David Weir, Co-occurrence Retrieval: A Flexible Framework for Lexical Distributional Similarity, Computational Linguistics, v.31 n.4, p.439-475, December 2005 Claudio Carpineto , Renato de Mori , Giovanni Romano , Brigitte Bigi, An information-theoretic approach to automatic query expansion, ACM Transactions on Information Systems (TOIS), v.19 n.1, p.1-27, Jan. 2001 Claire Grover , Alex Lascarides , Mirella Lapata, A comparison of parsing technologies for the biomedical domain, Natural Language Engineering, v.11 n.1, p.27-65, March 2005 Frank Keller , Mirella Lapata, Using the web to obtain frequencies for unseen bigrams, Computational Linguistics, v.29 n.3, p.459-484, September John Chen , Srinivas Bangalore , K. Vijay-Shanker, Automated extraction of Tree-Adjoining Grammars from treebanks, Natural Language Engineering, v.12 n.3, p.251-299, September 2006
sense disambiguation;statistical language modeling
309503
A Winnow-Based Approach to Context-Sensitive Spelling Correction.
A large class of machine-learning problems in natural language require the characterization of linguistic context. Two characteristic properties of such problems are that their feature space is of very high dimensionality, and their target concepts depend on only a small subset of the features in the space. Under such conditions, multiplicative weight-update algorithms such as Winnow have been shown to have exceptionally good theoretical properties. In the work reported here, we present an algorithm combining variants of Winnow and weighted-majority voting, and apply it to a problem in the aforementioned class: context-sensitive spelling correction. This is the task of fixing spelling errors that happen to result in valid words, such as substituting to for too, casual for causal, and so on. We evaluate our algorithm, WinSpell, by comparing it against BaySpell, a statistics-based method representing the state of the art for this task. We find: (1) When run with a full (unpruned) set of features, achieves accuracies significantly higher than BaySpell was able to achieve in either the pruned or unpruned condition&semi; (2) When compared with other systems in the literature, WinSpell exhibits the highest performance&semi; (3) While several aspects of WinSpells architecture contribute to its superiority over BaySpell, the primary factor is that it is able to learn a better linear separator than BaySpell learns&semi; (4) When run on a test set drawn from a different corpus than the training set was drawn from, WinSpell is better able than BaySpell to adapt, using a strategy we will present that combines supervised learning on the training set with unsupervised learning on the (noisy) test set.
Introduction A large class of machine-learning problems in natural language require the characterization of linguistic context. Such problems include lexical disambiguation tasks such as part-of-speech tagging and word-sense disambiguation; grammatical disambiguation tasks such as prepositional-phrase attachment; and document-processing tasks such as text classification (where the context is usually the whole document). Such problems have two distinctive properties. First, the richness of the linguistic structures that must be represented results in extremely high-dimensional feature spaces for the problems. Second, any given target concept depends on only a small subset of the features, leaving a huge balance of features that are irrelevant to * An earlier version of this work appeared in ICML'96. that particular concept. In this paper, we present a learning algorithm and an architecture with properties suitable for this class of problems. The algorithm builds on recently introduced theories of multiplicative weight-update algorithms. It combines variants of Winnow (Littlestone, 1988) and Weighted Majority (Littlestone and Warmuth, 1994). Extensive analysis of these algorithms in the COLT literature has shown them to have exceptionally good behavior in the presence of irrelevant attributes, noise, and even a target function changing in time (Littlestone, 1988; Littlestone and Warmuth, 1994; Herbster and Warmuth, 1995). These properties make them particularly well-suited to the class of problems studied here. While the theoretical properties of the Winnow family of algorithms are well known, it is only recently that people have started to test the claimed abilities of the algorithms in applications. We address the claims empirically by applying our Winnow-based algorithm to a large-scale real-world task in the aforementioned class of problems: context-sensitive spelling correction. Context-sensitive spelling correction is the task of fixing spelling errors that result in valid words, such as I'd like a peace of cake, where peace was typed when piece was intended. These errors account for anywhere from 25% to over 50% of observed spelling errors (Kukich, 1992); yet they go undetected by conventional spell checkers, such as Unix spell, which only flag words that are not found in a word list. Context-sensitive spelling correction involves learning to characterize the linguistic contexts in which different words, such as piece and peace, tend to occur. The problem is that there is a multitude of features one might use to characterize these contexts: features that test for the presence of a particular word nearby the target word; features that test the pattern of parts of speech around the target word; and so on. For the tasks we will consider, the number of features ranges from a few hundred to over 10,000. 1 While the feature space is large, however, target concepts, such as "a context in which piece can occur", depend on only a small subset of the features, the vast majority being irrelevant to the concept at hand. Context-sensitive spelling correction therefore fits the characterization presented above, and provides an excellent testbed for studying the performance of multiplicative weight-update algorithms on a real-world task. To evaluate the proposed Winnow-based algorithm, WinSpell, we compare it against BaySpell (Golding, 1995), a statistics-based method that is among the most successful tried for the problem. We first compare WinSpell and BaySpell using the heavily-pruned feature set that BaySpell normally uses (typically 10- 1000 features). WinSpell is found to perform comparably to BaySpell under this condition. When the full, unpruned feature set is used, however, WinSpell comes into its own, achieving substantially higher accuracy than it achieved in the pruned condition, and better accuracy than BaySpell achieved in either condition. To calibrate the observed performance of BaySpell and WinSpell, we compare them to other methods reported in the literature. WinSpell is found to significantly outperform all the other methods tried when using a comparable feature set. At their core, WinSpell and BaySpell are both linear separators. Given this fundamental similarity between the algorithms, we ran a series of experiments to understand why WinSpell was nonetheless able to outperform BaySpell. While several aspects of the WinSpell architecture were found to contribute to its superiority, the principal factor was that WinSpell simply learned a better linear separator than BaySpell did. We attribute this to the fact that the Bayesian linear separator was based on idealized assumptions about the domain, while Winnow was able to adapt, via its mistake-driven update rule, to whatever conditions held in practice. We then address the issue of dealing with a test set that is dissimilar to the training set. This arises in context-sensitive spelling correction, as well as related disambiguation tasks, because patterns of word usage can vary widely across documents; thus the training and test documents may be quite different. After first confirming experimentally that performance does indeed degrade for unfamiliar test sets, we present a strategy for dealing with this situation. The strategy, called combines supervised learning on the training set with unsupervised learning on the (noisy) test set. We find that, using this strategy, both BaySpell and WinSpell are able to improve their performance on an unfamiliar test set. WinSpell, however, is found to do particularly well, achieving comparable performance when using the strategy on an unfamiliar test set as it had achieved on a familiar test set. The rest of the paper is organized as follows: the next section describes the task of context-sensitive spelling correction. We then present the Bayesian method that has been used for it. The Winnow-based approach to the problem is introduced. The experiments on WinSpell and BaySpell are presented. The final section concludes. 2. Context-sensitive spelling correction With the widespread availability of spell checkers to fix errors that result in non- words, such as teh, the predominant type of spelling error has become the kind that results in a real, but unintended word; for example, typing there when their was intended. Fixing this kind of error requires a completely different technology from that used in conventional spell checkers: it requires analyzing the context to infer when some other word was more likely to have been intended. We call this the task of context-sensitive spelling correction. The task includes fixing not only "classic" types of spelling mistakes, such as homophone errors (e.g., peace and piece) and typographic errors (e.g., form and from), but also mistakes that are more commonly regarded as grammatical errors (e.g., among and between), and errors that cross word boundaries (e.g., maybe and may be). The problem has started receiving attention in the literature only within about the last half-dozen years. A number of methods have been proposed, either for context-sensitive spelling correction directly, or for related lexical disambiguation tasks. The methods include word trigrams (Mays et al., 1991), Bayesian classifiers (Gale et al., 1993), decision lists (Yarowsky, 1994), Bayesian hybrids (Golding, 1995), a combination of part-of-speech trigrams and Bayesian hybrids (Golding and Schabes, 1996), and, more recently, transformation-based learning (Mangu and Brill, 1997), latent semantic analysis (Jones and Martin, 1997), and differential grammars (Powers, 1997). While these research systems have gradually been achieving higher levels of accuracy, we believe that a Winnow-based approach is particularly promising for this problem, due to the problem's need for a very large number of features to characterize the context in which a word occurs, and Win- now's theoretically-demonstrated ability to handle such large numbers of features. 2.1. Problem formulation We will cast context-sensitive spelling correction as a word disambiguation task. The ambiguity among words is modelled by confusion sets. A confusion set means that each word W i in the set is ambiguous with each other word. Thus if C =fhear ; hereg, then when we see an occurrence of either hear or here in the target document, we take it to be ambiguous between hear and here; the task is to decide from the context which one was actually intended. Acquiring confusion sets is an interesting problem in its own right; in the work reported here, however, we take our confusion sets largely from the list of "Words Commonly Confused" in the back of the Random House dictionary (Flexner, 1983), which includes mainly homophone errors. A few confusion sets not in Random House were added, representing grammatical and typographic errors. The Bayesian and Winnow-based methods for context-sensitive spelling correction will be described below in terms of their operation on a single confusion set; that is, we will say how they disambiguate occurrences of words W 1 through Wn . The methods handle multiple confusion sets by applying the same technique to each confusion set independently. 2.2. Representation A target problem in context-sensitive spelling correction consists of (i) a sentence, and (ii) a target word in that sentence to correct. Both the Bayesian and Winnow- based algorithms studied here represent the problem as a list of active features; each active feature indicates the presence of a particular linguistic pattern in the context of the target word. We use two types of features: context words and collocations. Context-word features test for the presence of a particular word within \Sigmak words of the target word; collocations test for a pattern of up to ' contiguous words and/or part-of-speech tags 2 around the target word. In the experiments reported here, k was set to 10 and ' to 2. Examples of useful features for the confusion set fweather ; whetherg include: (1) cloudy within \Sigma10 words (2) to verb Feature (1) is a context-word feature that tends to imply weather. Feature (2) is a collocation that checks for the pattern "to verb" immediately after the target word, and tends to imply whether (as in I don't know whether to laugh or cry). The intuition for using these two types of features is that they capture two im- portant, but complementary aspects of context. Context words tell us what kind of words tend to appear in the vicinity of the target word - the "lexical atmo- sphere". They therefore capture aspects of the context with a wide-scope, semantic flavor, such as discourse topic and tense. Collocations, in contrast, capture the local syntax around the target word. Similar combinations of features have been used in related tasks, such as accent restoration (Yarowsky, 1994) and word sense disambiguation (Ng and Lee, 1996). We use a feature extractor to convert from the initial text representation of a sentence to a list of active features. The feature extractor has a preprocessing phase in which it learns a set of features for the task. Thereafter, it can convert a sentence into a list of active features simply by matching its set of learned features against the sentence. In the preprocessing phase, the feature extractor learns a set of features that characterize the contexts in which each word W i in the confusion set tends to occur. This involves going through the training corpus, and, each time a word in the confusion set occurs, generating all possible features for the context - namely, one context-word feature for every distinct word within \Sigmak words, and one collocation for every way of expressing a pattern of up to ' contiguous elements. This gives an exhaustive list of all features found in the training set. Statistics of occurrence of the features are collected in the process as well. At this point, pruning criteria may be applied to eliminate unreliable or uninformative features. We use two criteria (which make use of the aforementioned statistics of occurrence): (1) the feature occurred in practically none or all of the training instances (specifically, it had fewer than 10 occurrences or fewer than 10 non-occurrences); or (2) the presence of the feature is not significantly correlated with the identity of the target word (determined by a chi-square test at the 0.05 significance level). 3. Bayesian approach Of the various approaches that have been tried for context-sensitive spelling cor- rection, the Bayesian hybrid method, which we call BaySpell, has been among the most successful, and is thus the method we adopt here as the benchmark for comparison with WinSpell. BaySpell has been described elsewhere (Golding, 1995), and so will only be briefly reviewed here; however, the version here uses an improved smoothing technique, which is described below. Given a sentence with a target word to correct, BaySpell starts by invoking the feature extractor (Section 2.2) to convert the sentence into a set F of active features. BaySpell normally runs the feature extractor with pruning enabled. To a first approximation, BaySpell then acts as a naive Bayesian classifier. Suppose for a moment that we really were applying Naive Bayes. We would then calculate the probability that each word W i in the confusion set is the correct identity of the target word, given that features F have been observed, by using Bayes' rule with the conditional independence assumption: where each probability on the right-hand side is calculated by a maximum-likelihood estimate 3 (MLE) over the training set. We would then pick as our answer the W i with the highest P (W i jF). BaySpell differs from the naive approach in two respects: first, it does not assume conditional independence among features, but rather has heuristics for detecting strong dependencies, and resolving them by deleting features until it is left with a reduced set F 0 of (relatively) independent features, which are then used in place of F in the equation above. This procedure is called dependency resolution. Second, to estimate the P (f jW i ) terms, BaySpell does not use the simple MLE, as this tends to give likelihoods of 0.0 for rare features (which are abundant in the task at hand), thus yielding a useless answer of 0.0 for the posterior probability. Instead, BaySpell performs smoothing by interpolating between the MLE of P (f jW i ) and the MLE of the unigram probability, P (f ). Some means of incorporating a lower-order model in this way is generally regarded as essential for good performance (Chen and Goodman, 1996). We use: We set - to the probability that the presence of feature f is independent of the presence of word W i ; to the extent that this independence holds, P (f) is an accurate (but more robust) estimate of P (f jW i ). We calculate - as the chi-square probability that the observed association between f and W i is due to chance. The enhancement of smoothing, and to a minor extent, dependency resolution, greatly improve the performance of BaySpell over the naive Bayesian approach. (The effect of these enhancements can be seen empirically in Section 5.4.) 4. Winnow-based approach There are various ways to use a learning algorithm, such as Winnow (Littlestone, 1988), to do the task of context-sensitive spelling correction. A straightforward approach would be to learn, for each confusion set, a discriminator that distinguishes specifically among the words in that set. The drawback of this approach, however, is that the learning is then applicable only to one particular discrimination task. We pursue an alternative approach: that of learning the contextual characteristics of each word W i individually. This learning can then be used to distinguish word W i from any other word, as well as to perform a broad spectrum of other natural language tasks (Roth, 1998). In the following, we briefly present the general approach, and then concentrate on the task at hand, context-sensitive spelling correction. The approach developed is influenced by the Neuroidal system suggested by Valiant (1994). The system consists of a very large number of items, in the range of 5 . These correspond to high-level concepts, for which humans have words, as well as lower-level predicates from which the high-level ones are composed. The lower-level predicates encode aspects of the current state of the world, and are input to the architecture from the outside. The high-level concepts are learned as functions of the lower-level predicates; in particular, each high-level concept is learned by a cloud or ensemble of classifiers. All classifiers within the cloud learn the cloud's high-level concept autonomously, as a function of the same lower-level predicates, but with different values of the learning parameters. The outputs of the classifiers are combined into an output for the cloud using a variant of the Weighted Majority algorithm (Littlestone and Warmuth, 1994). Within each classifier, a variant of the Winnow algorithm (Littlestone, 1988) is used. Training occurs whenever the architecture interacts with the world, for example, by reading a sentence of text; the architecture thereby receives new values for its lower-level predicates, which in turn serve as an example for training the high-level ensembles of classifiers. Learning is thus an on-line process that is done on a continuous basis 4 (Valiant, 1995). Figure 1 shows the instantiation of the architecture for context-sensitive spelling correction, and in particular for correcting the words fdesert ; dessertg. The bottom tier of the network consists of nodes for lower-level predicates, which in this application correspond to features of the domain. For clarity, only five nodes are shown; thousands typically occur in practice. High-level concepts in this application correspond to words in the confusion set, here desert and dessert. Each high-level concept appears as a cloud of nodes, shown as a set of overlapping bubbles suspended from a box. The output of the clouds is an activation level for each word in the confusion set; a comparator selects the word with the highest activation as the final result for context-sensitive spelling correction. The sections below elaborate on the use of Winnow and Weighted Majority in followed by a discussion of the properties of the architecture. 4.1. Winnow The job of each classifier within a cloud of WinSpell is to decide whether a particular word W i in the confusion set belongs in the target sentence. Each classifier runs the Winnow algorithm. It takes as input a representation of the target sentence as a set of active features, and returns a binary decision as to whether its word W i belongs in the sentence. Let F be the set of active features; and for each feature be the weight on the arc connecting f to the classifier at hand. The Winnow algorithm then returns a classification of 1 (positive) iff: where ' is a threshold parameter. In the experiments reported here, ' was set to 1. Initially, the classifier has no connection to any feature in the network. Through training, however, it establishes appropriate connections, and learns weights for these connections. A training example consists of a sentence, represented as a set of active features, together with the word W c in the confusion set that is correct for that sentence. The example is treated as a positive example for the classifiers for W c , and as a negative example for the classifiers for the other words in the confusion set. Training proceeds in an on-line fashion: an example is presented to the system, the representation of the classifiers is updated, and the example is then discarded. The first step of training a classifier on an example is to establish appropriate desert desert Weighted majority words hot within in the ___ arid within words desert activation desert Comparator cake within words desert/dessert decision dessert dessert Weighted majority dessert activation dessert Figure 1. Example of WinSpell network for fdesert; dessertg. The five nodes in the bottom tier of the network correspond to features. The two higher-level clouds of nodes (each shown as overlapping bubbles suspended from a box) correspond to the words in the confusion set. The nodes within a cloud each run the Winnow algorithm in parallel with a different setting of the demotion parameter, fi, and with their own copy of the input arcs and the weights on those arcs. The overall activation level for each word in the confusion set is obtained by applying a weighted majority algorithm to the nodes in the word's cloud. The word with the highest activation level is selected. connections between the classifier and the active features F of the example. If an active feature f 2 F is not already connected to the classifier, and the sentence is a positive example for the classifier (that is, the classifier corresponds to the target word W c that occurs in the sentence), then we add a connection between the feature and the classifier, with a default weight of 0.1. This policy of building connections on an as-needed basis results in a sparse network with only those connections that have been demonstrated to occur in real examples. Note that we do not build any new connections if the sentence is a negative example for the classifier 5 ; one consequence is that different words in a confusion set may have links to different subsets of the possible features, as seen in Figure 1. The second step of training is to update the weights on the connections. This is done using the Winnow update rule, which updates the weights only when a mistake is made. If the classifier predicts 0 for a positive example (i.e., where 1 is the correct classification), then the weights are promoted: promotion parameter. If the classifier predicts 1 for a negative example (i.e., where 0 is the correct classification), then the weights are demoted: parameter. In the experiments reported here, ff was set to 1.5, and fi was varied from 0.5 to 0.9 (see also Section 4.2). In this way, weights on non-active features remain unchanged, and the update time of the algorithm depends on the number of active features in the current example, and not the total number of features in the domain. The use of a sparse architecture, as described above, coupled with the representation of each example as a list of active features is reminiscent of the infinite attribute models of Winnow (Blum, 1992). 4.2. Weighted Majority Rather than evaluating the evidence for a given word W i using a single classifier, combines evidence from multiple classifiers; the motivation for doing so is discussed below. Weighted Majority (Littlestone and Warmuth, 1994) is used to do the combination. The basic approach is to run several classifiers in parallel within each cloud to try to predict whether W i belongs in the sentence. Each classifier uses different values of the learning parameters, and therefore makes slightly different predictions. The performance of each classifier is monitored, and a weight is derived reflecting its observed prediction accuracy. The final activation level output by the cloud is a sum of the predictions of its member classifiers, weighted by the abovementioned weights. More specifically, we used clouds composed of five classifiers, differing only in their values for the Winnow demotion parameter fi; values of 0.5, 0.6, 0.7, 0.8, and were used. The weighting scheme assigns to the jth classifier a weight is the total number of mistakes made by the classifier so far. The essential property is that the weight of a classifier that makes many mistakes rapidly disappears. We start with decrease its value with the number of examples seen, to avoid weighing mistakes of the initial hypotheses too heavily. 6 The total activation returned by the cloud is then: where C j is the classification, either 1 or 0, returned by the jth classifier in the cloud, and the denominator is a normalization term. The rationale for combining evidence from multiple classifiers is twofold. First, when running a mistake-driven algorithm, even when it is known to have good behavior asymptotically, there is no guarantee that the current hypothesis, at any point in time, is any better than the previous one. It is common practice, therefore, to predict using an average of the last several hypotheses, weighting each hypothesis by, for example, the length of its mistake-free stretch (Littlestone, 1995; Cesa-Bianchi et al., 1994). The second layer of WinSpell, i.e., the weighted-majority layer, partly serves this function, though it does so in an on-line fashion. A second motivation for the weighted-majority layer comes from the desire to have an algorithm that tunes its own parameters. For the task of context-sensitive spelling correction, self-tuning is used to automatically accommodate differences among confusion sets - in particular, differences in the degree to which the words in the confusion set have overlapping usages. For fweather ; whetherg, for example, the words occur in essentially disjoint contexts; thus, if a training example gives one word, but the classifier predicts the other, it is almost surely wrong. On the other hand, for famong ; betweeng, there are numerous contexts in which both words are acceptable; thus disagreement with the training example does not necessarily mean the classifier is wrong. Following a mistake, therefore, we want to demote the weights by more in the former case than in the latter. Updating weights with various demotion parameters in parallel allows the algorithm to select by itself the best setting of parameters for each confusion set. In addition, using a weighted- majority layer strictly increases the expressivity of the architecture. It is plausible that in some cases, a linear separator would be unable to achieve good prediction, while the two-layer architecture would be able to do so. 4.3. Discussion Multiplicative learning algorithms have been studied extensively in the learning theory community in recent years (Littlestone, 1988; Kivinen and Warmuth, 1995). Winnow has been shown to learn efficiently any linear threshold function (Little- stone, 1988), with a mistake bound that depends on the margin between positive and negative examples. These are functions f for which there exist real weights w wn and a real threshold ' such that f(x iff In particular, these functions include Boolean disjunctions and conjunctions on k - n variables and r-of-k threshold functions (1 - r - k - n). The key feature of Winnow is that its mistake bound grows linearly with the number of relevant attributes and only logarithmically with the total number of attributes n. Using the sparse architecture, in which we do not keep all the variables from the beginning, but rather add variables as necessary, the number of mistakes made on disjunctions and conjunctions is logarithmic in the size of the largest example seen and linear in the number of relevant attributes; it is independent of the total number of attributes in the domain (Blum, 1992). Winnow was analyzed in the presence of various kinds of noise, and in cases where no linear threshold function can make perfect classifications (Littlestone, 1991). It was proved, under some assumptions on the type of noise, that Winnow still learns correctly, while retaining its abovementioned dependence on the number of total and relevant attributes. (See Kivinen and Warmuth (1995) for a thorough analysis of multiplicative update algorithms versus additive update algorithms, and exact bounds that depend on the sparsity of the target function and the number of active features in the examples.) The algorithm makes no independence or other assumptions about the attributes, in contrast to Bayesian predictors which are commonly used in statistical NLP. This condition was recently investigated experimentally (on simulated data) (Littlestone, 1995). It was shown that redundant attributes dramatically affect a Bayesian pre- dictor, while superfluous independent attributes have a less dramatic effect, and only when the number of attributes is very large (on the order of 10,000). Winnow is a mistake-driven algorithm; that is, it updates its hypothesis only when a mistake is made. Intuitively, this makes the algorithm more sensitive to the relationships among attributes - relationships that may go unnoticed by an algorithm that is based on counts accumulated separately for each attribute. This is crucial in the analysis of the algorithm and has been shown to be crucial empirically as well (Littlestone, 1995). One of the advantages of the multiplicative update algorithms is their logarithmic dependence on the number of domain features. This property allows one to learn higher-than-linear discrimination functions by increasing the dimensionality of the feature space. Instead of learning a discriminator in the original feature space, one can generate new features, as conjunctions of original features, and learn a linear separator in the new space, where it is more likely to exist. Given the modest dependency of Winnow on the dimensionality, it can be worthwhile to increase the dimensionality so as to simplify the functional form of the resulting discriminator. The work reported here can be regarded as following this path, in that we define collocations as patterns of words and part-of-speech tags, rather than restricting them to tests of singleton elements. This increases the dimensionality and adds redundancy among features, but at the same time simplifies the functional form of the discriminator, to the point that the classes are almost linearly separable in the new space. A similar philosophy, albeit very different technically, is followed by the work on Support Vector Machines (Cortes and Vapnik, 1995). Theoretical analysis has shown Winnow to be able to adapt quickly to a changing target concept (Herbster and Warmuth, 1995). We investigate this issue experimentally in Section 5.5. A further feature of WinSpell is that it can prune poorly- 2performing attributes, whose weight falls too low relative to the highest weight of an attribute used by the classifier. By pruning in this way, we can greatly reduce the number of features that need to be retained in the representation. It is important to observe, though, that there is a tension between compacting the representation by aggressively discarding features, and maintaining the ability to adapt to a new test environment. In this paper we focus on adaptation, and do not study discarding techniques. This tradeoff is currently under investigation. 5. Experimental results To understand the performance of WinSpell on the task of context-sensitive spelling correction, we start by comparing it with BaySpell using the pruned set of features from the feature extractor, which is what BaySpell normally uses. This evaluates WinSpell purely as a method of combining evidence from multiple features. An important claimed strength of the Winnow-based approach, however, is the ability to handle large numbers of features. We tested this by (essentially) disabling pruning, resulting in tasks with over 10,000 features, and seeing how WinSpell and BaySpell scale up. The first experiment showed how WinSpell and BaySpell perform relative to each other, but not to an outside reference. To calibrate their performance, we compared the two algorithms with other methods reported in the literature, as well as a baseline method. The success of WinSpell in the previous experiments brought up the question of why it was able to outperform BaySpell and the other methods. We investigated this in an ablation study, in which we stripped WinSpell down to a simple, non-learning algorithm, and gave it an initial set of weights that allowed it to emulate BaySpell's behavior exactly. From there, we restored the missing aspects of WinSpell one at a time, observing how much each contributed to improving its performance above the Bayesian level. The preceding experiments drew the training and test sets from the same popula- tion, following the traditional PAC-learning assumption. This assumption may be unrealistic for the task at hand, however, where a system may encounter a target document quite unlike those seen during training. To check whether this was in fact a problem, we tested the across-corpus performance of the methods. We found it was indeed significantly worse than within-corpus performance. To address this problem, we tried a strategy of combining learning on the training set with unsupervised learning on the (noisy) test set. We tested how well WinSpell and BaySpell were able to perform on an unfamiliar test set using this strategy. The sections below describe the experimental methodology, and present the ex- periments, interleaved with discussion. 5.1. Methodology In the experiments that follow, the training and test sets were drawn from two corpora: the 1-million-word Brown corpus (Ku-cera and Francis, 1967) and a 3/4- million-word corpus of articles from The Wall Street Journal (WSJ) (Marcus et al., 1993). Note that no particular annotations are needed on these corpora for the task of context-sensitive spelling correction; we simply assume that the texts contain no context-sensitive spelling errors, and thus the observed spellings may be taken as a gold standard. The algorithms were run on 21 confusion sets, which were taken largely from the list of "Words Commonly Confused" in the back of the Random House dictionary 1983). The confusion sets were selected on the basis of being frequently-occurring in Brown and WSJ, and include mainly homophone confusions (e.g., pieceg). Several confusion sets not in Random House were added, representing grammatical errors (e.g., famong ; betweeng) and typographic errors (e.g., may beg). Results are reported as a percentage of correct classifications on each confusion set, as well as an overall score, which gives the percentage correct for all confusion sets pooled together. When comparing scores, we tested for significance using a McNemar test (Dietterich, 1998) when possible; when data on individual trials was not available (the system comparison), or the comparison was across different test sets (the within/across study), we instead used a test for the difference of two proportions (Fleiss, 1981). All tests are reported for the 0.05 significance level. 5.2. Pruned versus unpruned The first step of the evaluation was to test WinSpell under the same conditions that BaySpell normally runs under - i.e., using the pruned set of features from the feature extractor. We used a random 80-20 split (by sentence) of Brown for the training and test sets. The results of running each algorithm on the 21 confusion sets appear in the 'Pruned' columns of Table 1. Although for a few confusion sets, one algorithm or the other does better, overall WinSpell performs comparably to BaySpell. The preceding comparison shows that WinSpell is a credible method for this task, but it does not test the claimed strength of Winnow - the ability to deal with large numbers of features. To test this, we modified the feature extractor to do only minimal pruning of features: features were pruned only if they occurred exactly once in the training set (such features are both extremely unlikely to afford good generalizations, and extremely numerous). The hope is that by considering the full set of features, we will pick up many "minor cases" - what Holte et al. have called "small disjuncts" - that are normally filtered out by the pruning process. The results are shown in the 'Unpruned' columns of Table 1. While both algorithms do better in the unpruned condition, WinSpell improves for almost every confusion set, sometimes markedly, with the result that it outperforms BaySpell in the unpruned condition for every confusion set except one. The results below will all focus on the behavior of the algorithms in the unpruned case. Table 1. Pruned versus unpruned performance of BaySpell and WinSpell. In the pruned condition, the algorithms use the pruned set of features from the feature extractor; in the unpruned condition, they use the full set (excluding features occurring just once in the training set). The algorithms were trained on 80% of Brown and tested on the other 20%. The first two columns give the number of features in the two conditions. Bar graphs show the differences between adjacent columns, with shading indicating significant differences (using a McNemar test at the 0.05 level). Confusion set Pruned Unpruned Pruned Unpruned features features BaySpell WinSpell BaySpell WinSpell accept, except 78 849 88.0 87.8 92.0 96.0 affect, effect 36 842 98.0 100.0 98.0 100.0 among, between 145 2706 75.3 75.8 78.0 86.0 amount, number 68 1618 74.8 73.2 80.5 86.2 begin, being 84 2219 95.2 89.7 95.2 97.9 cite, sight, site 24 585 76.5 64.7 73.5 85.3 fewer, less 6 1613 96.0 94.4 92.0 93.3 I, me 1161 11625 97.8 98.2 98.3 98.5 its, it's 180 4679 94.5 96.4 95.9 97.3 lead, led 33 833 89.8 87.5 85.7 91.8 maybe, may be 86 1639 90.6 84.4 95.8 97.9 passed, past 141 1279 90.5 90.5 90.5 95.9 peace, piece 67 992 74.0 72.0 92.0 88.0 principal, principle 38 669 85.3 84.8 85.3 91.2 quiet, quite 41 1200 95.5 95.4 89.4 93.9 raise, rise 24 621 79.5 74.3 87.2 89.7 than, then 857 6813 93.6 96.9 93.4 95.7 their, there, they're 946 9449 94.8 96.6 94.5 98.5 weather, whether 61 1226 93.4 98.4 98.4 100.0 your, you're 103 2738 90.4 93.6 90.9 97.3 5.3. System comparison The previous section shows how WinSpell and BaySpell perform relative to each other; to evaluate them with respect to an external standard, we compared them to other methods reported in the literature. Two recent methods use some of the same test sets as we do, and thus can readily be compared: RuleS, a transformation-based learner (Mangu and Brill, 1997); and a method based on latent semantic analysis (Jones and Martin, 1997). We also compare to Baseline, the canonical straw man for this task, which simply identifies the most common member of the confusion set during training, and guesses it every time during testing. The results appear in Table 2. The scores for LSA, taken from Jones and Martin (1997), are based on a different 80-20 breakdown of Brown than that used by the other systems. The scores for RuleS are for the version of that system that uses the same feature set as we do. The comparison shows WinSpell to have significantly higher performance than the other systems. Interestingly, however, Mangu and Brill were able to improve RuleS's overall score from 88.5 to 93.3 (almost up to the level of WinSpell) by making various clever enhancements to the feature set, Table 2. System comparison. All algorithms were trained on 80% of Brown and tested on the other 20%; all except LSA used the same 80-20 breakdown. The version of RuleS is the one that uses the same feature set as we do. BaySpell and WinSpell were run in the unpruned condition. The first column gives the number of test cases. Bar graphs show the differences between adjacent columns, with shading indicating significant differences (using a test for the difference of two proportions at the Ragged-ended bars indicate a difference of more than 15 percentage points. The three 'overall' lines pool the results over different sets of confusion sets. Confusion set Test Baseline LSA RuleS BaySpell WinSpell cases accept, except 50 70.0 82.3 88.0 92.0 96.0 affect, effect 49 91.8 94.3 97.9 98.0 100.0 among, between 186 71.5 80.8 73.1 78.0 86.0 amount, number 123 71.5 56.6 78.0 80.5 86.2 begin, being 146 93.2 93.2 95.3 95.2 97.9 cite, sight, site 34 64.7 78.1 73.5 85.3 country, county 62 91.9 81.3 95.2 91.9 95.2 fewer, less 75 90.7 92.0 93.3 I, me 1225 83.0 98.3 98.5 its, it's 366 91.3 92.8 95.9 97.3 lead, led maybe, may be 96 87.5 95.8 97.9 passed, past 74 68.9 80.3 83.7 90.5 95.9 peace, piece 50 44.0 83.9 90.0 92.0 88.0 principal, principle 34 58.8 91.2 88.2 85.3 91.2 quiet, quite 66 83.3 90.8 92.4 89.4 93.9 raise, rise 39 64.1 80.6 84.6 87.2 89.7 than, then 514 63.4 90.5 92.6 93.4 95.7 their, there, they're 850 56.8 73.9 94.5 98.5 weather, whether 61 86.9 85.1 93.4 98.4 100.0 your, you're 187 89.3 91.4 90.9 97.3 including using a tagger to assign a word its possible tags in context, rather than merely using the word's complete tag set. This suggests that WinSpell might get a similar boost by adopting this enhanced set of features. A note on the LSA system: LSA has been reported to do its best for confusion sets in which the words all have the same part of speech. Since this does not hold for all of our confusion sets, LSA's overall score was adversely affected. 5.4. Ablation Study The previous sections demonstrate the superiority of WinSpell over BaySpell for the task at hand, but they do not explain why the Winnow-based algorithm does better. At their core, WinSpell and BaySpell are both linear separators (Roth, 1998); is it that Winnow, with its multiplicative update rule, is able to learn a better linear separator than the one given by Bayesian probability theory? Or is it that the non-Winnow enhancements of WinSpell, particularly weighted-majority voting, provide most of the leverage? To address these questions, we ran an ablation study to isolate the contributions of different aspects of WinSpell. The study was based on the observation that the core computations of Winnow and Bayesian classifiers are essentially isomorphic: Winnow makes its decisions based on a weighted sum of the observed features. Bayesian classifiers make their decisions based not on a sum, but on a product of likelihoods (and a prior proba- bility) - but taking the logarithm of this functional form yields a linear function. With this understanding, we can start with the full BaySpell system; strip it down to its Bayesian essence; map this (by taking the log) to a simplified, non-learning version of WinSpell that performs the identical computation; and then add back the removed aspects of WinSpell, one at a time, to understand how much each contributes to eliminating the performance difference between (the equivalent of) the Bayesian essence and the full WinSpell system. The experiment proceeds in a series of steps that morph BaySpell into WinSpell: BaySpell The full BaySpell method, which includes dependency resolution and interpolative smoothing. Simplified BaySpell Like BaySpell, but without dependency resolution. This means that all matching features, even highly interdependent ones, are used in the Bayesian calculation. We do not strip BaySpell all the way down to Naive Bayes, which would use MLE likelihoods, because the performance would then be so poor as to be unrepresentative of BaySpell - and this would undermine the experiment, which seeks to investigate how WinSpell improves on BaySpell (not on a pale imitation thereof). Simplified WinSpell This is a minimalist WinSpell, set up to emulate the computation of Simplified BaySpell. It has a 1-layer architecture (i.e., no Weighted Majority layer); it uses a full network (not sparse); it is initialized with Bayesian weights (to be explained momentarily); and it does no learning (i.e., it does not update the Bayesian weights). The Bayesian weights are simply the log of Simplified BaySpell's likelihoods, plus a constant, to make them all non-negative (as required by Winnow). Occasionally, a likelihood will be 0.0, in which case we smooth the log(likelihood) from \Gamma1 to a large negative constant (we used \Gamma500). In addition, we add a pseudo-feature to Winnow's representation, which is active for every example, and corresponds to the prior. The weight for this feature is the log of the prior. 1-layer WinSpell Like Simplified WinSpell, but adds learning. This lets us see whether Winnow's multiplicative update rule is able to improve on the Bayesian feature weights. We ran learning for 5 cycles of the training set. 2-layer WinSpell Like 1-layer WinSpell, but adds the weighted-majority voting layer to the architecture. Replaces the full network of 2-layer WinSpell with a sparse network. This yields the complete WinSpell algorithm, although its performance is affected by the fact that it started with Bayesian, not uniform weights. Table 3. Ablation study. Training was on 80% of Brown and testing on the other 20%. The algorithms were run in the unpruned condition. Bar graphs show the differences between adjacent columns, with shading indicating significant differences (using a McNemar test at the 0.05 level). Confusion set BaySpell Simplified 1-layer 2-layer (Bayesian) BaySpell WinSpell WinSpell WinSpell accept, except 92.0 92.0 94.0 90.0 96.0 affect, effect 98.0 95.9 98.0 98.0 100.0 among, between 78.0 79.6 77.4 90.9 89.2 amount, number 80.5 78.0 84.6 88.6 85.4 begin, being 95.2 88.4 96.6 98.6 99.3 cite, sight, site 73.5 73.5 79.4 76.5 88.2 country, county 91.9 80.6 91.9 93.5 96.8 fewer, less 92.0 94.7 93.3 96.0 97.3 I, me 98.3 97.9 98.6 99.1 99.5 its, it's 95.9 94.5 95.9 98.4 97.8 lead, led 85.7 91.8 87.8 87.8 93.9 maybe, may be 95.8 96.9 95.8 99.0 99.0 passed, past 90.5 93.2 91.9 87.8 93.2 peace, piece 92.0 84.0 88.0 84.0 88.0 principal, principle 85.3 85.3 82.4 85.3 91.2 quiet, quite 89.4 97.0 92.4 90.9 93.9 raise, rise 87.2 79.5 82.1 82.1 89.7 than, then 93.4 95.7 95.3 97.1 96.7 their, there, they're 94.5 92.7 97.3 98.1 98.2 weather, whether 98.4 96.7 98.4 100.0 100.0 your, you're 90.9 89.3 96.8 97.9 98.9 The ablation study used the same 80-20 breakdown of Brown as in the previous section, and the unpruned feature set. The results appear in Table 3. Simplified WinSpell has been omitted from the table, as its results are identical to those of Simplified BaySpell. The primary finding is that all three measured aspects of WinSpell contribute positively to its improvement over BaySpell; the ranking, from strongest to weakest benefit, is (1) the update rule, (2) the weighted-majority layer, and (3) sparse networks. The large benefit afforded by the update rule indicates that Winnow is able to improve considerably on the Bayesian weights. The likely reason that the Bayesian weights are not already optimal is that the Bayesian assumptions conditional feature independence and adequate data for estimating likelihoods - do not hold fully in practice. The Winnow update rule can surmount these difficulties by tuning the likelihoods via feedback to fit whatever situation holds in the (imperfect) world. The feedback is obtained from the same training set that is used to set the Bayesian likelihoods. Incidentally, it is interesting to note that the use of a sparse network improves accuracy fairly consistently across confusion sets. The reason it improves accuracy is that, by omitting links for features that never co-occurred with a given target word during training, it effectively sets the weight of such features to 0.0, which is apparently better for accuracy than setting the weight to the log of the Bayesian likelihood (which, in this case, is some smoothed version of the 0.0 MLE probability). A second observation concerns the performance of WinSpell when starting with the Bayesian weights: its overall score was 97.2%, as compared with 96.4% for when starting with uniform weights (see Table 2). This suggests that the performance of Winnow can be improved by moving to a hybrid approach in which Bayes is used to initialize the network weights. This hybrid approach is also an improvement over Bayes: in the present experiment, the pure Bayesian approach scored 93.1%, whereas when updates were performed on the Bayesian weights, the score increased to 95.1%. A final observation from this experiment is that, while it was intended primarily as an ablation study of WinSpell, it also serves as a mini-ablation study of BaySpell. The difference between the BaySpell and Simplified BaySpell columns measures the contribution of dependency resolution. It turns out to be almost negligible, which, at first glance, seems surprising, considering the level of redundancy in the (unpruned) set of features being used. For instance, if the features include the collocation "a treaty ", they will also include collocations such as "det treaty ", "a noun sing ", and so on. Nevertheless, there are two reasons that dependency resolution is of little benefit. First, the features are generated systematically by the feature extractor, and thus tend to overcount evidence equally for all words. Second, Naive Bayes is known to be less sensitive to the conditional independence assumption when we only ask it to predict the most probable class (as we do here), as opposed to asking it to predict the exact probabilities for all classes (Duda and Hart, 1973; Domingos and Pazzani, 1997). The contribution of interpolative smoothing - the other enhancement of BaySpell over Naive Bayes - was not addressed in Table 3. However, we investigated this briefly by comparing the performance of BaySpell with interpolative smoothing to its performance with MLE likelihoods (the naive method), as well as a number of alternative smoothing methods. Table 4 gives the overall scores. While the overall score for BaySpell with interpolative smoothing was 93.8%, it dropped to 85.8% with MLE likelihoods, and was also lower when alternative smoothing methods were tried. This shows that while dependency resolution does not improve BaySpell much over Naive Bayes, interpolative smoothing does have a sizable benefit. 5.5. Across-corpus performance The preceding experiments assumed that the training set will be representative of the test set. For context-sensitive spelling correction, however, this assumption may be overly strong; this is because word usage patterns vary widely from one author to another, or even one document to another. For instance, an algorithm may have been trained on one corpus to discriminate between desert and dessert, but when tested on an article about the Persian Gulf War, will be unable to detect the misspelling of desert in Operation Dessert Storm. To check whether this is in fact a problem, we tested the across-corpus performance of the algorithms: we again trained on 80% of Brown, but tested on a randomly-chosen 40% of the sentences Table 4. Overall score for BaySpell using different smoothing methods. The last method, interpolative smoothing, is the one presented here. Training was on 80% of Brown and testing on the other 20%. When using MLE likelihoods, we broke ties by choosing the word with the largest prior (ties arose when all words had probability 0.0). For Katz smoothing, we used absolute discounting (Ney et al., 1994), as Good-Turing discounting resulted in invalid discounts for our task. For Kneser-Ney smoothing, we used absolute discounting and the backoff distribution based on the "marginal constraint". For interpolation with a fixed -, Katz, and Kneser-Ney, we set the necessary parameters separately for each word W i using deleted estimation. Smoothing method Reference Overall MLE likelihoods 85.8 Interpolation with a fixed - Ney et al. (1994) 89.8 Laplace-m Kohavi et al. (1997) 90.9 Kohavi et al. (1997) 91.0 Katz smoothing Katz (1987) 91.6 Kneser-Ney smoothing Kneser and Ney (1995) 93.4 Interpolative smoothing Section 3 93.8 of WSJ. The results appear in Table 5. Both algorithms were found to degrade significantly. At first glance, the magnitude of the degradation seems small - from 93.8% to 91.2% for the overall score of BaySpell, and 96.4% to 95.2% for However, when viewed as an increase in the error rate, it is actually fairly serious: for BaySpell, the error rate goes from 6.2% to 8.8% (a 42% increase), and for WinSpell, from 3.6% to 4.8% (a 33% increase). In this section, we present a strategy for dealing with the problem of unfamiliar test sets, and we evaluate its effectiveness when used by WinSpell and BaySpell. The strategy is based on the observation that the test document, though im- perfect, still provides a valuable source of information about its own word usages. Returning to the Desert Storm example, suppose the system is asked to correct an article containing 17 instances of the phrase Operation Desert Storm, and 1 instance of the (erroneous) phrase Operation Dessert Storm. If we treat the test corpus as a training document, we will then start by running the feature extractor, which will generate (among others) the collocation: (3) Operation Storm. The algorithm, whether BaySpell or WinSpell, should then be able to learn, during its training on the test (qua training) corpus, that feature (3) typically co-occurs with desert, and is thus evidence in favor of that word. The algorithm can then use this feature to fix the one erroneous spelling of the phrase in the test set. It is important to recognize that the system is not "cheating" by looking at the test set; it would be cheating if it were given an answer key along with the test set. What the system is really doing is enforcing consistency across the test set. It can detect sporadic errors, but not systematic ones (such as writing Operation Dessert Storm every time). However, it should be possible to pick up at least some systematic errors by also doing regular supervised learning on a training set. This leads to a strategy, which we call sup/unsup, of combining supervised learning on the training set with unsupervised learning on the (noisy) test set. The Table 5. Within- versus across-corpus performance of BaySpell and WinSpell. Training was on 80% of Brown in both cases. Testing for the within-corpus case was on 20% of Brown; for the across-corpus case, it was on 40% of WSJ. The algorithms were run in the unpruned condition. Bar graphs show the differences between adjacent columns, with shading indicating significant differences (using a test for the difference of two proportions at the 0.05 level). Ragged-ended bars indicate a difference of more than 15 percentage points. Confusion set Test cases Test cases BaySpell WinSpell Within Across Within Across Within Across accept, except 50 affect, effect among, between 186 256 78.0 79.3 86.0 87.1 amount, number 123 167 80.5 69.5 86.2 73.7 begin, being 146 174 95.2 89.1 97.9 98.9 cite, sight, site 34 country, county 62 71 91.9 94.4 95.2 95.8 fewer, less 75 148 92.0 94.6 97.3 97.3 I, me 1225 328 98.3 97.9 97.9 92.5 its, it's 366 1277 95.9 95.5 93.3 95.9 lead, led maybe, may be 96 67 95.8 92.5 91.8 89.9 passed, past 74 148 90.5 95.9 95.9 98.0 peace, piece 50 19 92.0 78.9 88.0 73.7 principal, principle 34 quiet, quite 66 20 89.4 65.0 93.9 75.0 raise, rise 39 118 87.2 72.0 89.7 82.2 than, then 514 637 93.4 96.5 95.7 98.4 their, there, they're 850 748 94.5 91.7 98.5 98.1 weather, whether 61 95 98.4 94.7 100.0 96.8 your, you're 187 74 90.9 85.1 97.3 95.9 learning on the training set is supervised because a benevolent teacher ensures that all spellings are correct (we establish this simply by assumption). The learning on the test set is unsupervised because no teacher tells the system whether the spellings it observes are right or wrong. We ran both WinSpell and BaySpell with sup/unsup to see the effect on their across-corpus performance. We first needed a test corpus containing errors; we generated one by corrupting a correct corpus. We varied the amount of corruption from 0% to 20%, where p% corruption means we altered a randomly-chosen p% of the occurrences of the confusion set to be a different word in the confusion set. The sup/unsup strategy calls for training on both a training corpus and a corrupted test corpus, and testing on the uncorrupted test corpus. For purposes of this experiment, however, we split the test corpus into two parts to avoid any confusion about training and testing on the same data. We trained on 80% of Brown plus a corrupted version of 60% of WSJ; and we tested on the uncorrupted version of the other 40% of WSJ. The results for the 5% level of corruption are shown in Table 6; this level of corruption corresponds to typical typing error rates. 7 The table compares across- Table 6. Across-corpus performance of BaySpell and WinSpell using the sup/unsup strategy. Performance is compared with doing supervised learning only. Training in the sup/unsup case is on 80% of Brown plus 60% of WSJ (5% corrupted); in the supervised case, it is on 80% of Brown only. Testing in all cases is on 40% of WSJ. The algorithms were run in the unpruned condition. Bar graphs show the differences between adjacent columns, with shading indicating significant differences (using a McNemar test at the 0.05 level). Ragged-ended bars indicate a difference of more than 15 percentage points. Confusion set Test cases BaySpell WinSpell only Sup/unsup Sup only Sup/unsup accept, except affect, effect 66 87.9 90.9 95.5 93.9 among, between 256 79.3 81.2 87.1 90.6 amount, number 167 69.5 78.4 73.7 87.4 begin, being 174 89.1 94.3 98.9 99.4 cite, sight, site country, county 71 94.4 95.8 95.8 97.2 fewer, less 148 94.6 93.2 95.9 98.0 I, me 328 97.9 98.5 98.5 99.1 its, it's 1277 95.5 95.6 97.3 97.8 lead, led 69 79.7 75.4 89.9 88.4 maybe, may be 67 92.5 91.0 92.5 97.0 passed, past 148 95.9 96.6 98.0 98.0 peace, piece 19 78.9 84.2 73.7 89.5 principal, principle quiet, quite 20 65.0 75.0 75.0 90.0 raise, rise 118 72.0 87.3 82.2 89.8 than, then 637 96.5 96.2 98.4 98.3 their, there, they're 748 91.7 90.8 98.1 98.5 weather, whether 95 94.7 95.8 96.8 96.8 your, you're 74 85.1 87.8 95.9 97.3 corpus performance of each algorithm with and without the additional boost of unsupervised learning on part of the test corpus. Both BaySpell and WinSpell benefit from the unsupervised learning by about the same amount; the difference is that WinSpell suffered considerably less than BaySpell when moving from the within- to the across-corpus condition. As a result, WinSpell, unlike BaySpell, is actually able to recover to its within-corpus performance level, when using the sup/unsup strategy in the across-corpus condition. It should be borne in mind that the results in Table 6 depend on two factors. The first is the size of the test set: the larger the test set, the more information it can provide during unsupervised learning. The second factor is the percentage corruption of the test set. Figure 2 shows performance as a function of percentage corruption for a representative confusion set, famount; numberg. As one would expect, the improvement from unsupervised learning tends to decrease as the percentage corruption increases. For BaySpell's performance on famount ; numberg, 20% corruption is almost enough to negate the benefit of unsupervised learning. WinSpell sup only BaySpell sup/unsup BaySpell sup only Percentage corruption Performance15595857565 Figure 2. Across-corpus performance of BaySpell (dotted lines) and WinSpell (solid lines) with the sup/unsup strategy and with supervised learning only. The curves show performance as a function of the percentage corruption of the test set. Training in the sup/unsup case is on 80% of Brown, plus 60% of WSJ (corrupted); for the supervised-only case, it is on 80% of Brown only. Testing in both cases is on 40% of WSJ. The algorithms were run for the confusion set in the unpruned condition. 6. Conclusion While theoretical analyses of the Winnow family of algorithms have predicted an excellent ability to deal with large numbers of features and to adapt to new trends not seen during training, these properties have remained largely undemonstrated. In the work reported here, we have presented an architecture based on Winnow and Weighted Majority, and applied it to a real-world task, context-sensitive spelling correction, that has a potentially huge number of features (over 10,000 in some of our experiments). We showed that our algorithm, WinSpell, performs significantly better than other methods tested on this task with a comparable feature set. When comparing WinSpell to BaySpell, a Bayesian statistics-based algorithm representing the state of the art for this task, we found that WinSpell's mistake-driven update rule, its use of weighted-majority voting, and its sparse architecture all contributed significantly to its superior performance. was found to exhibit two striking advantages over the Bayesian ap- proach. First, WinSpell was substantially more accurate than BaySpell when running with full (unpruned) feature sets, outscoring BaySpell on 20 out of 21 confusion sets, and achieving an overall score of over 96%. Second, WinSpell was better than BaySpell at adapting to an unfamiliar test corpus, when using a strategy we presented 3that combines supervised learning on the training set with unsupervised learning on the test set. This work represents an application of techniques developed within the theoretical learning community in recent years, and touches upon some of the important issues still under active research. First, it demonstrates the ability of a Winnow-based algorithm to successfully utilize the strategy of expanding the space of features in order to simplify the functional form of the discriminator; this was done in generating collocations as patterns of words and part-of-speech tags. The use of this strategy in Winnow shares much the same philosophy - if none of the technical underpinnings - as Support Vector Machines (Cortes and Vapnik, 1995). Second, the two-layer architecture used here is related to various voting and boosting techniques studied in recent years in the learning community (Freund and Schapire, 1995; Breiman, 1994; Littlestone and Warmuth, 1994). The goal is to learn to combine simple learners in a way that improves the overall performance of the system. The focus in the work reported here is on doing this learning in an on-line fashion. There are many issues still to investigate in order to develop a complete understanding of the use of multiplicative update algorithms in real-world tasks. One of the important issues this work raises is the need to understand and improve the ability of algorithms to adapt to unfamiliar test sets. This is clearly a crucial issue for algorithms to be used in real systems. A related issue is that of the size and comprehensibility of the output representation. Mangu and Brill (1997), using a similar set of features to the one used here, demonstrate that massive feature pruning can lead to highly compact classifiers, with surprisingly little loss of accu- racy. There is a clear tension, however, between achieving a compact representation and retaining the ability to adapt to unfamiliar test sets. Further analysis of this tradeoff is under investigation. The Winnow-based approach presented in this paper is being developed as part of a research program in which we are trying to understand how networks of simple and slow neuron-like elements can encode a large body of knowledge and perform a wide range of interesting inferences almost instantaneously. We investigate this question in the context of learning knowledge representations that support language understanding tasks. In light of the encouraging results presented here for context-sensitive spelling correction, as well as other recent results (Dagan et al., 1997; Reddy and Tadepalli, 1997; Roth and Zelenko, 1998), we are now extending the approach to other tasks. Acknowledgments We would like to thank Neal Lesh, Grace Ngai, Stan Chen, the reviewers, and the editors for helpful comments on the paper. The second author's research was supported by the Feldman Foundation and a grant from the Israeli Ministry of Science and the Arts; it was done partly while at Harvard University supported by NSF grant CCR-92-00884 and DARPA contract AFOSR-F4962-92-J-0466. Notes 1. We have tested successfully with up to 40,000 features, but the results reported here use up to 11,000. 2. Each word in the sentence is tagged with its set of possible part-of-speech tags, obtained from a dictionary. For a tag to match a word, the tag must be a member of the word's tag set. 3. The maximum-likelihood estimate of P (f jW i ) is the number of occurrences of f in the presence of W i divided by the number of occurrences of W i 4. For the purpose of the experimental studies presented here, we do not update the knowledge representation while testing. This is done to provide a fair comparison with the Bayesian method which is a batch approach. 5. This does not interfere with the subsequent updating of the weights - conceptually, we treat a "non-connection" as a link with weight 0.0, which will remain 0.0 after a multiplicative update. 6. The exact form of the decreasing function is unimportant; we interpolate quadratically between 1:0 and 0:67 as a decreasing function of the number of examples. 7. Mays et al. (1991), for example, consider error rates from 0.01% to 10% for the same task. --R Learning boolean functions in an infinite attribute space. Bagging predictors. An empirical study of smoothing techniques for language modeling. Approximate statistical tests for comparing supervised classification learning algorithms. On the optimality of the simple Bayesian classifier under zero-one loss Pattern Classification and Scene Analysis. Statistical Methods for Rates and Proportions. Random House Unabridged Dictionary. A decision-theoretic generalization of on-line learning and an application to boosting A method for disambiguating word senses in a large corpus. A Bayesian hybrid method for context-sensitive spelling correction Combining trigram-based and feature-based methods for context-sensitive spelling correction Tracking the best expert. Concept learning and the problem of small disjuncts. Estimation of probabilities from sparse data for the language model component of a speech recognizer. Exponentiated gradient versus gradient descent for linear predictors. Improved backing-off for m-gram language modeling on Acoustics Improving simple Bayes. Techniques for automatically correcting words in text. Computational Analysis of Present-Day American English Brown University Press Learning quickly when irrelevant attributes abound: A new linear-threshold algorithm Redundant noisy attributes Comparing several linear-threshold learning algorithms on tasks involving superfluous attributes The weighted majority algorithm. Automatic rule acquisition for spelling correction. Building a large annotated corpus of English: The Penn Treebank. Context based spelling correction. On structuring probabilistic dependences in stochastic language modelling. Integrating multiple knowledge sources to disambiguate word sense: An exemplar-based approach Learning and application of differential grammars. Active learning with committees for text categorization. Learning to resolve natural language ambiguities: A unified approach. National Conference on Artificial Intelligence Part of speech tagging using a network of linear separators. In COLING-ACL 98 Circuits of the Mind. Decision lists for lexical ambiguity resolution: Application to accent restoration in Spanish and French. --TR --CTR Paisarn Charoenpornsawat , Virach Sornlertlamvanich , Thatsanee Charoenporn, Improving translation quality of rule-based machine translation, COLING-02 on Machine translation in Asia, p.1-6, September 01, 2002 Derrick Higgins, The use of error tags in ARTFL's Encyclopdie: does good error identification lead to good error correction?, Proceedings of the workshop on Student research, p.30-34, April 29-May Brill , Robert C. Moore, An improved error model for noisy channel spelling correction, Proceedings of the 38th Annual Meeting on Association for Computational Linguistics, p.286-293, October 03-06, 2000, Hong Kong Filip Ginter , Jorma Boberg , Jouni Jrvinen , Tapio Salakoski, New Techniques for Disambiguation in Natural Language and Their Application to Biological Text, The Journal of Machine Learning Research, 5, p.605-621, 12/1/2004 Michele Banko , Eric Brill, Mitigating the paucity-of-data problem: exploring the effect of training corpus size on classifier performance for natural language processing, Proceedings of the first international conference on Human language technology research, p.1-5, March 18-21, 2001, San Diego Pattern-based disambiguation for natural language processing, Proceedings of the 2000 Joint SIGDAT conference on Empirical methods in natural language processing and very large corpora: held in conjunction with the 38th Annual Meeting of the Association for Computational Linguistics, p.1-8, October 07-08, 2000, Hong Kong Xin Li , Dan Roth, Learning question classifiers, Proceedings of the 19th international conference on Computational linguistics, p.1-7, August 24-September 01, 2002, Taipei, Taiwan Jianhua Li , Xiaolong Wang, Combining trigram and automatic weight distribution in Chinese spelling error correction, Journal of Computer Science and Technology, v.17 n.6, p.915-923, November 2002 Yair Even-Zohar , Dan Roth, A classification approach to word prediction, Proceedings of the first conference on North American chapter of the Association for Computational Linguistics, p.124-131, April 29-May Rayid Ghani , Rosie Jones, Learning a monolingual language model from a multilingual text database, Proceedings of the ninth international conference on Information and knowledge management, p.187-193, November 06-11, 2000, McLean, Virginia, United States Adam J. Grove , Dan Roth, Linear Concepts and Hidden Variables, Machine Learning, v.42 n.1-2, p.123-141, January-February 2001 Hema Raghavan , James Allan, Matching inconsistently spelled names in automatic speech recognizer output for information retrieval, Proceedings of the conference on Human Language Technology and Empirical Methods in Natural Language Processing, p.451-458, October 06-08, 2005, Vancouver, British Columbia, Canada Yoshimasa Tsuruoka , Jun'ichi Tsujii, Training a naive bayes classifier via the EM algorithm with a class distribution constraint, Proceedings of the seventh conference on Natural language learning at HLT-NAACL 2003, p.127-134, May 31, 2003, Edmonton, Canada Cong Li , Hang Li, Word translation disambiguation using Bilingual Bootstrapping, Proceedings of the 40th Annual Meeting on Association for Computational Linguistics, July 07-12, 2002, Philadelphia, Pennsylvania Michele Banko , Eric Brill, Scaling to very very large corpora for natural language disambiguation, Proceedings of the 39th Annual Meeting on Association for Computational Linguistics, p.26-33, July 06-11, 2001, Toulouse, France Hiyan Alshawi, Online Multiclass Learning with k-Way Limited Feedback and an Application to Utterance Classification, Machine Learning, v.60 n.1-3, p.97-115, September 2005 Leslie G. Valiant, A neuroidal architecture for cognitive computation, Journal of the ACM (JACM), v.47 n.5, p.854-882, Sept. 2000 phrase-based statistical model for SMS text normalization, Proceedings of the COLING/ACL on Main conference poster sessions, p.33-40, July 17-18, 2006, Sydney, Australia Rayid Ghani , Rosie Jones , Dunja Mladeni, Mining the web to create minority language corpora, Proceedings of the tenth international conference on Information and knowledge management, October 05-10, 2001, Atlanta, Georgia, USA Hang Li , Cong Li, Word translation disambiguation using bilingual bootstrapping, Computational Linguistics, v.30 n.1, p.1-22, March 2004 Rayid Ghani , Rosie Jones , Dunja Mladenic, Building Minority Language Corpora by Learning to Generate Web Search Queries, Knowledge and Information Systems, v.7 n.1, p.56-83, January 2005 Rocco A. Servedio, Computational sample complexity and attribute-efficient learning, Proceedings of the thirty-first annual ACM symposium on Theory of computing, p.701-710, May 01-04, 1999, Atlanta, Georgia, United States Cucerzan , David Yarowsky, Augmented mixture models for lexical disambiguation, Proceedings of the ACL-02 conference on Empirical methods in natural language processing, p.33-40, July 06, 2002 Adam J. Grove , Nick Littlestone , Dale Schuurmans, General Convergence Results for Linear Discriminant Updates, Machine Learning, v.43 n.3, p.173-210, June 2001 Adam R. Klivans , Rocco A. Servedio, Toward Attribute Efficient Learning of Decision Lists and Parities, The Journal of Machine Learning Research, 7, p.587-602, 12/1/2006 Mirella Lapata , Frank Keller, Web-based models for natural language processing, ACM Transactions on Speech and Language Processing (TSLP), v.2 n.1, p.3-es, February 2005 Dan Roth , Ming-Hsuan Yang , Narendra Ahuja, Learning to recognize three-dimensional objects, Neural Computation, v.14 n.5, p.1071-1103, May 2002 Dan Roth, Learning in natural language: theory and algorithmic approaches, Proceedings of the 2nd workshop on Learning language in logic and the 4th conference on Computational natural language learning, September 13-14, 2000, Lisbon, Portugal Graeme Hirst , Alexander Budanitsky, Correcting real-word spelling errors by restoring lexical cohesion, Natural Language Engineering, v.11 n.1, p.87-111, March 2005 Mike Thelwall, Text characteristics of English language university Web sites: Research Articles, Journal of the American Society for Information Science and Technology, v.56 n.6, p.609-619, April 2005 Russell Greiner , Adam J. Grove , Dan Roth, Learning cost-sensitive active classifiers, Artificial Intelligence, v.139 n.2, p.137-174, August 2002 Julie Weeds , David Weir, Co-occurrence Retrieval: A Flexible Framework for Lexical Distributional Similarity, Computational Linguistics, v.31 n.4, p.439-475, December 2005 Hans van Halteren , Walter Daelemans , Jakub Zavrel, Improving accuracy in word class tagging through the combination of machine learning systems, Computational Linguistics, v.27 n.2, p.199-229, June 2001
winnow;context-sensitive spelling correction;bayesian classifiers;multiplicative weight-update algorithms
309505
Learning to Parse Natural Language with Maximum Entropy Models.
This paper presents a machine learning system for parsing natural language that learns from manually parsed example sentences, and parses unseen data at state-of-the-art accuracies. Its machine learning technology, based on the maximum entropy framework, is highly reusable and not specific to the parsing problem, while the linguistic hints that it uses to learn can be specified concisely. It therefore requires a minimal amount of human effort and linguistic knowledge for its construction. In practice, the running time of the parser on a test sentence is linear with respect to the sentence length. We also demonstrate that the parser can train from other domains without modification to the modeling framework or the linguistic hints it uses to learn. Furthermore, this paper shows that research into rescoring the top 20 parses returned by the parser might yield accuracies dramatically higher than the state-of-the-art.
Introduction The task of a natural language parser is to take a sentence as input and return a syntactic representation that corresponds to the likely semantic interpretation of the sentence. For example, some parsers, given the sentence I buy cars with tires would return a parse tree in the format: I buy NP cars PP with NP tires * The author is now working at the IBM TJ Watson Research Center, P.O. Box 218, Yorktown Heights, NY 10598 where the non-terminal labels denote the type of phrase (e.g., "PP" stands for prepositional phrase). Accurate parsing is difficult because subtle aspects of word meaning-from the parser's view-dramatically affect the interpretation of the sen- tence. For example, given the sentence I buy cars with money a parser might propose the following two parses ffl (Unlikely:) S I buy NP cars PP with NP money ffl (Likely:) S I buy NP cars with NP money Both parses are grammatical, in the sense that a typical context free grammar for English will allow both structures, but only one corresponds to the likely interpretation of the sentence. A parser actually needs detailed semantic knowledge of certain key words in the sentence in order to distinguish the likely parse; it needs to somehow know that with money refers to buy and not cars. The parsers which currently show superior accuracies on freely occurring text are all classified as statistical or corpus-based, since they automatically learn to approximate syntactic and semantic knowledge for parsing from a large corpus of text, called a treebank, that has been manually annotated with syntactic information. In order to evaluate the accuracy of a statistical parser, we first train it on a subset of the treebank, test it on another non-overlapping subset, and then compare the labelled syntactic constituents it proposes with the labelled syntactic constituents in the annotation of the treebank. The labelled constituent accuracies of the best parsers approach roughly 90% when tested on freely occurring sentences in the Wall St. Journal domain. Sfbuysg NPfmang The man VPfbuysg buys NPfcarsg fast cars PPfwithg with NPftiresg big tires Figure 1. A parse tree annotated with head words 2. Previous Work Recent corpus-based parsers differ in the simplicity of their representation and the degree of supervision necessary, but agree in that they resolve parse structure ambiguities by looking at certain cooccurrences of constituent head words in the ambiguous parse. A head word of a constituent, informally, is the one word that best represents the meaning of the constituent, e.g., Figure 1 shows a parse tree annotated with head words. Parsers vary greatly on how head word information is used to disambiguate possible parses for an input sentence. Black et al. (1993) introduces history-based parsing, in which decision tree probability models, trained from a treebank, are used to score the different derivations of sentences produced by a hand-written grammar. Jelinek et al. (1994), Magerman (1995) also train history-based decision tree models from a treebank for use in a parser, but do not require an explicit hand-written grammar. These decision trees do not look at words directly, but instead represent words as bitstrings derived from an automatic clustering technique. In contrast, Hermjakob and Mooney (1997) use a rich semantic representation when training decision tree and decision list techniques to drive parser actions. Several other recent parsers use statistics of pairs of head words in conjunction with chart parsing techniques to achieve high accuracy. Collins (1996, 1997) uses chart-parsing techniques with head word bigram statistics derived from a treebank. Charniak (1997) uses head word bigram statistics with a probabilistic context free grammar, while Goodman (1997) uses head word bigram statistics with a probabilistic feature grammar. Collins (1996), Goodman (1997), Charniak (1997), Collins (1997) do not use general machine learning algorithms, but instead develop specialized statistical estimation techniques for their respective parsing tasks. The parser in this paper attempts to combine the advantages of other approaches. It uses a natural and direct representation of words in conjunction with a general Table 1. Tree-Building Procedures of Parser Pass Procedure Actions Description First Pass tag A POS tag in tag set Assign POS Tag to word Second Pass chunk Start X, Join X, Other Assign Chunk tag to POS tag and word Third Pass build Start X, Join X, where X is a constituent label in label set Assign current tree to start a new constituent, or to join the previous one check Yes, No Decide if current constituent is complete machine learning technique, maximum entropy modeling. We argue that the successful use of a simple representation with a general learning technique is the combination that both minimizes human effort and maintains state-of-the-art parsing accuracy. 3. Parsing with Maximum Entropy Models The parser presented here constructs labelled syntactic parse trees with actions similar to those of a standard shift-reduce parser. (Many other parsing techniques exist for natural language, see Allen (1995) for an introduction.) The sequence of actions ang that construct a completed parse tree T are called the derivation of T . There is no explicit grammar that dictates what actions are allowable; instead, all actions that lead to a well-formed parse tree are allowable and maximumentropy probability models are used to score each action. The maximum entropy models are trained by examining the derivations of the parse trees in a treebank. The individual scores of the actions in a derivation are used to compute a score for the whole derivation, and hence the whole parse tree. When parsing a sentence, the parser uses a search procedure that efficiently explores the space of possible parse trees, and attempts to find the highest scoring parse tree. Section 3.1 describes the actions of the tree-building procedures, section 3.2 describe the maximum entropy probability models, and section 3.3 describes the algorithm that searches for the highest scoring parse tree. 3.1. Actions of the Parser The actions of the parser are produced by procedures, that each take a derivation predict some action an+1 to create a new derivation d an+1g. The actions of the procedures are designed so that any possible complete parse tree T has exactly one derivation. The procedures are called tag, chunk, build, and check, and are applied in three left-to-right passes over the input sentence; the first pass applies tag, the second pass applies chunk, and the third pass applies build and check. The passes, the procedures they apply, and the actions of the procedures are summarized in Table 1. Typically, the parser explores many different derivations when parsing a sentence, but for illustration purposes, Figures 2-8 trace one possible derivation for the sentence "I saw the man with the telescope", using the consituent labels and part-of-speech tags of the University of Pennsylvania treebank (Marcus et al., 1994). The actions of the procedures are scored with maximum entropy probability models that use information in the local context to compute their probabilities. detailed discussion of the probability models will occur in Section 3.2.) Using three passes instead of one pass allows the the use of more local context. For example, the model for the chunk procedure will have the output from tag in its left and right context, and the models for the build and check procedures will have the output of tag and chunk and their left and right contexts. If all these procedures were implemented in one left-to-right pass, the model for chunk would not have the output of tag in its right context, and the models for build and check would not have the output of tag and chunk in their right context. 3.1.1. First Pass The first pass takes an input sentence, shown in Figure 2, and uses tag to assign each word a part-of-speech (POS) tag. The result of applying tag to each word is shown in Figure 3. The tagging phase resembles other stand-alone statistical taggers in the literature (Weischedel et al., 1993) but is integrated into the parser's search procedure, so that the parser does not need to commit to a single POS tag sequence. 3.1.2. Second Pass The second pass takes the output of the first pass and uses chunk to determine the "flat" phrase chunks of the sentence, where a phrase is "flat" if and only if it is a constituent whose children are not constituents. Starting from the left, chunk assigns each (word,POS tag) pair a "chunk" tag, either Start X, Join X, or Other, where X is a constituent label. Figure 4 shows the result after the second pass. The chunk tags are then used for chunk detection, in which any consecutive sequence of words wn (m n) are grouped into a "flat" chunk if wm has been assigned Start X and wn have all been assigned Join X. The result of chunk detection, shown in Figure 5, is a forest of trees and serves as the input to the third pass. The granularity of the chunks, as well as the possible constituent labels of the chunks, are determined from the treebank that is used to train the parser. Examples of constituents that are marked as flat chunks in the Wall St. Journal domain of the Penn treebank include noun phrases such as a nonexecutive director, adjective phrases such as 61 years old, and quantifier phrases such as about $ 370 million. The chunking in our second pass differs from other chunkers in the literature (Ramshaw and Marcus, 1995; Church, 1988) in that it finds chunks of all constituent Table 2. Comparison of build and check to operations of a shift-reduce parser Procedure Actions Similar Shift-Reduce Parser Action check No shift check Yes reduce ff, where ff is CFG rule of proposed constituent build Start X, Join X Determines ff for subsequent reduce operations I saw the man with the telescope Figure 2. Initial Sentence VBD saw the man IN with the telescope Figure 3. The result after First Pass Start NP I Other VBD saw Start NP the Join NP man Other IN with Start NP the Join NP telescope Figure 4. The result after Second Pass I VBD saw the man IN with the telescope Figure 5. The result of chunk detection labels, and not just noun phrase chunks. Our multi-pass approach is similar to the approach of the parser in Abney (1991), which also first finds chunks in one pass, and then attaches them together in the next pass. I Start VP VBD saw Join VP the man IN with the telescope Figure 6. An application of build in which Join VP is the action I Start VP VBD saw Join VP the man IN with the telescope Figure 7. The most recently proposed constituent (shown under ?) I Start VP VBD saw Join VP the man IN with the telescope Figure 8. An application of check in which No is the action, indicating that the proposed constituent in figure 7 is not complete. build will now process the tree marked with ?. The derivation of this partially completed tree is f PRP, VBD, DT, NN, IN, DT, NN, Start NP, Other, Start NP, Join NP, Other, Start NP, Join NP, Start S, no, Start VP, no, Join VP, no g. 3.1.3. Third Pass The third pass always alternates between the use of build and check, and completes any remaining constituent structure. build decides whether a tree will start a new constituent or join the incomplete constituent immediately to its left. Accordingly, it annotates the tree with either Start X, where X is any constituent label, or with Join X, where X matches the label of the incomplete constituent to the left. build always processes the leftmost tree without any Start X or Join X annotation. Figure 6 shows an application of build in which the action is Join VP. After build, control passes to check, which finds the most recently proposed constituent, and decides if it is complete. The most recently proposed constituent, shown in Figure 7, is the rightmost sequence of trees (m n) such that t m is annotated with Start X and t are annotated with Join X. If check decides yes, then the proposed constituent takes its place in the forest as an actual constituent, on which build does its work. Otherwise, the constituent is not finished and build processes the next tree in the forest, t n+1 . We force check to answer no if the proposed constituent is a "flat" chunk, since such constituents must be formed in the second pass. (Otherwise, flat chunks would not have unique derivations.) Figure 8 shows the result when check looks at the proposed constituent in Figure 7 and decides No. The third pass terminates when check is presented with a constituent that spans the entire sentence. A complete derivation for an n word sentence consists of n actions of tag, n actions of chunk, and alternating actions of build and check. For reference purposes, the derivation of the partially completed tree in Figure 8 is included in the caption. The constituent labels produced by build, i.e., the types of X in the Start X and Join X actions, are determined from the treebank that is used to train the parser. Table 2 compares the actions of build and check to the operations of a standard shift-reduce parser. The No and Yes actions of check correspond to the shift and reduce actions, respectively. The important difference is that while a shift-reduce parser creates a constituent in one step (reduce ff), the procedures build and check create it over several steps in smaller increments. While the use of maximum entropy models together with shift-reduce parsing is novel (to our knowledge), shift-reduce parsing techniques have been popular in the natural language literature. Aho et al. (1988) describe shift-reduce parsing techniques (for programming languages) in detail, Marcus (1980) uses shift-reduce parsing techniques for natural language, and Briscoe and Carroll (1993) describe probabilistic approaches to LR parsing, a type of shift-reduce parsing. Other recent machine learning approaches to shift-reduce parsing include Magerman (1995) and Hermjakob and Mooney (1997). 3.2. Probability Models that Use Context to Predict Parsing Actions The parser uses a history-based approach (Black et al., 1993), in which a probability pX (ajb) is used to score an action a of procedure X 2 f tag, chunk, build, check g, depending on the partial derivation b (also called a context or history) that is available at the time of the decision. The conditional probability models pX are estimated under the maximum entropy framework. The advantage of this framework is that we can use arbitrarily diverse information in the context b when computing the probability of an action a of some procedure X. While any context b is a rich source of information, it is difficult to know exactly what information is useful for parsing. However, we would like to implement the following inexact intuitions about parsing: ffl Using constituent head words is useful. ffl Using combinations of head words is useful. ffl Using less-specific information is useful. ffl Allowing limited lookahead is useful. The above intuitions are implemented in the maximum entropy framework as fea- tures, and each feature is assigned a "weight" which corresponds to how useful it is for modeling the data. We will later show that a mere handful of guidelines are sufficient to completely describe the feature sets used by the parsing models. 3.2.1. The Maximum Entropy Framework The maximumentropy framework is a clean way for experimenters to combine evidence thought to be useful in modeling data. While the exact nature of the evidence is task dependent, the framework itself is independent of the parsing task and can be used for many other problems, like language modeling for speech recognition (Lau et al., 1993; Rosenfeld, 1996) and machine translation (Berger et al., 1996). The basic unit of evidence in this framework is a feature, a function f : where A is the set of possible actions, and B is the set of possible contexts. A feature, given an (a; b) pair, captures any information in b that might be useful for predicting a. Given a training set b) as the observed probability of the pair (a; b) in the training set, and define E ~ as the observed expectation of feature a;b ~ Intuitively, is just the normalized count of the feature f j in the training set T . (We will later describe in Section 3.2.3 how to obtain training sets from a treebank.) We desire a conditional probability model p that is consistent with the observed expectation of f j , but also one that is likely to generalize well to unseen data. The Principle of Maximum Entropy (Jaynes, 1957) recommends that we choose the model p with the highest entropy over the set of those models that are consistent with the observed expectations, i.e., the model is that is maximally noncomittal beyond meeting the observed evidence. We follow the conditional maximumentropy framework described in Berger et al. (1996), which chooses p such that a;b ~ a;b ~ p(b)p(ajb) log p(ajb) are the features in the model, ~ p(b) is the observed probability of a context b in the training set, P is the set of consistent models, is the model's expectation of f j , and H(p) is the entropy of the model p, averaged over the contexts of the training set. The form of the solution for p is Y a2A Y are the parameters of the model (ff j ? 0), and Z(b) is a normalization factor. There is an interesting relationship between maximum likelihood estimates of models of form (2) and maximum entropy models. It also the case that: Y (a;b) ~ where Q is the set of models of form (2), and where L(p) is proportional to the log-likelihood of the training set according to the model p. Therefore p can be viewed under both the maximum entropy and maximum likelihood frameworks: it maximizes the entropy over the set of consistent models P and maximizes likelihood over the set of models of form (2), Q. The duality is appealing since as a maximum entropy model, p will not assume anything beyond the evidence, and as a maximum likelihood model, p will have a close fit to the observed data. The maximum entropy framework and its duality with maximum likelihood estimation are discussed in more detail elsewhere (Berger et al., 1996; Della Pietra et al., 1997). An advantage of this framework is that there are no independence assumptions or inherent restrictions on the features beyond the form (1). Therefore, experimenters can add arbitrarily diverse or complicated features to the parsing models. This advantage is significant because informative features in parsing (described below in section 3.2.2) are often inter-dependent by nature. 3.2.2. Features All evidence in the maximum entropy framework must be expressed through features, and any feature is implemented with a function called a contextual predicate. A contextual predicate checks for the presence or absence of useful information in a context b 2 B and returns true or false accordingly. In this implementation of the maximumentropy framework, every feature f has the format and therefore expresses a cooccurrence relationship between some action a 0 and some linguistic fact about the context captured by cp. The contextual predicates for a procedure X are denoted by CPX , and Table 3 specifies the guidelines, or templates, for creating CPX , where build, check g. The templates are only linguistic hints, in that they do not specify the information itself, but instead, specify the location of the useful information in a context b. The templates use indices relative to the tree that is currently being modified. For example, if the current tree is the 5th tree, cons(\Gamma2) looks at the constituent label, head word, and start/join annotation of the 3rd tree in the forest. The actual contextual predicates in CPX are obtained automatically, by recording certain aspects of the context (specified by the templates) in which procedure X was used in the derivations of the trees in the treebank. For an example, an actual contextual predicate cp 2 CP build , derived (automatically) from the template cons(0), might be ae true if the 0th tree of b has label "NP" and head word "he" false otherwise In order to obtain this predicate, there must exist a derivation in the manually parsed example sentences in which build decides an action in the presence of some partial derivation b, such that the 0th tree of b had a constituent label "NP" and head word "he". Constituent head words are found, when necessary, with the algorithm in Black et al. (1993), Magerman (1995). Contextual predicates which look at head words, or especially pairs of head words, may not be reliable predictors for the procedure actions due to their sparseness in the training set. Therefore, for each lexically based contextual predicate, there also exist one or more corresponding less specific contextual predicates which look at the same context, but omit one or more words. For example, the templates cons(0; 1 ), are the same as cons(0; 1) but omit references to the head word of the 1st tree, the 0th tree, and both the 0th and 1st tree, respectively. The less specific contextual predicates should allow the model to provide reliable probability estimates when the words in the history are rare. Less specific predicates are not enumerated in Table 3, but their existence is indicated with a and y . The default predicates in Table 3 return true for any context and are the least specific (and most frequent) predicates; they should provide reasonable estimates when the model encounters a context in which every other contextual predicate is unreliable. The contextual predicates attempt to capture the intuitions about parsing information discussed earlier. For example, predicates derived from templates like cons(0) look at constituent head words, while predicates derived from templates like cons(\Gamma1; 0) look at combinations of head words. Predicates derived from templates like look at less specific information, while predicates derived from templates like cons(0; use limited lookahead. Furthermore, the information expressed in the predicates is always local to where the parsing action is taking place. The contextual predicates for tag, discussed elsewhere (Ratnaparkhi, 1996), look at the previous 2 words and tags, the current word, and the following 2 words. The contextual predicates for chunk look at the previous 2 words, tags, and chunk labels, as well as the current and following 2 words and tags. build uses head word information from the previous 2 and current trees, as well as the following 2 chunks, while check looks at the surrounding 2 words and the head words of the children of the proposed constituent. The intuitions behind the contextual predicates are not linguistically deep, and as a result, the information necessary for parsing can be specified concisely with only a few templates. 3.2.3. Training Events The contextual predicates for a procedure X are used to encode the derivations in the treebank as a set of training events g. Each (a; b) 2 TX represents an action of procedure X in a derivation and is encoded as (a; cp are contextual predicates such that cp i 2 CPX and cp i is the context in which action a occurred for procedure X. For example, Figure 9 shows the encoding of a partial derivation in which the build procedure predicts Join VP. While any context b 2 B is, in practice, encoded as a sequence of contextual predicates, the encoding is just an implementation choice; the mathematics of the maximum entropy framework do not rely upon any one particular encoding of the space of possible contexts B. The training events TX for a procedure X 2 f tag, chunk, build, check g are used for feature selection and parameter estimation, described below. 3.2.4. Feature Selection Feature selection refers to the process of choosing a useful subset of features SX from the set of all possible features PX for use in the maximum entropy model corresponding to procedure X. If CPX are all the contextual predicates used to encode the training events TX , and AX are the possible Table 3. Contextual Information Used by Probability Models ( possible less specific contexts are used, y = if a less specific context includes a word, it must include the head word of the current tree, i.e., the 0th tree.) Procedure Templates Description Templates Used tag See Ratnaparkhi (1996) chunk chunkandpostag(n) The word, POS tag, and chunk tag of nth leaf. Chunk tag omitted if n 0. chunkandpostag(0), chunkandpostag(\Gamma1), chunkandpostag(1), default Returns true for any context. build cons(n) The head word, constituent (or POS) label, and start/join annotation of the nth tree. Start/join annotation omitted if n 0. punctuation The constituent we could join (1) contains a "[" and the current tree is a "]"; (2) contains a "," and the current tree is a ","; (3) spans the entire sentence and current tree is "." bracketsmatch, iscomma, end- ofsentence default Returns true for any context. check checkcons(n) The head word, constituent (or POS) label of the nth tree, and the label of proposed constituent. begin and last are first and last child (resp.) of proposed constituent checkcons(begin) checkcons(m;n) checkcons(m) & checkcons(n) checkcons(i;last) last production Constituent label of parent (X), and constituent or POS labels of children of proposed constituent tag and word of the nth leaf to the left of the con- stituent, if n ! 0, or to the right of the constituent, if default Returns true for any context. I Start VP VBD saw Join VP the man IN with the telescope The above action (Join VP) is encoded as follows (a vertical bar - separates information from the same subtree, while a comma , separates information from different subtrees. A tilde ~ denotes a constituent label, as opposed to a part-of-speech tag.): Contextual cons(0)=~NP-man cons(1)=IN-with cons(2)=~NP-telescope cons(-1*,0)=StartVP-VBD,~NP-man cons(-1,0)=StartVP-VBD-saw,~NP-man cons(0*,1)=~NP,IN-with cons(0,1)=~NP-man,IN-with cons(0,1*,2)=~NP-man,IN,~NP-telescope cons(0,1,2)=~NP-man,IN-with,~NP-telescope cons(-1*,0,1)=StartVP-VBD,~NP-man,IN-with cons(-1,0,1)=StartVP-VBD-saw,~NP-man,IN-with cons(-2*,-1*,0)=StartS-~NP,StartVP-VBD,~NP-man cons(-2,-1*,0)=StartS-~NP-I,StartVP-VBD,~NP-man cons(-2*,-1,0)=StartS-~NP,StartVP-VBD-saw,~NP-man cons(-2,-1,0)=StartS-~NP-I,StartVP-VBD-saw,~NP-man Figure 9. Encoding a derivation with contextual predicates actions for procedure X, the set of possible features PX for use in X's model are: Thus any contextual predicate cp that occurs with any action a 0 can potentially be a feature. However, many of these features occur infrequently, and are therefore not reliable sources of evidence since their behavior in the training events may not represent their behavior in unseen data. For example, it is unlikely that all of the contextual predicates in Table 9 would form reliable features. We use a very simple feature selection strategy: assume that any feature that occurs less than 5 times is noisy and discard it. Feature selection with a count cutoff does not yield a minimal feature set; many of the selected features will be redundant. However, in practice, it yields a feature set that is mostly noise-free with almost no computational expense. Therefore, the selected features for use in procedure X's model are In this approach, the burden of deciding the contribution of each selected feature towards modeling the data falls to the parameter estimation algorithm. 3.2.5. Parameter Estimation Each training set TX is used to estimate the parameters of a corresponding probability model pX of the form (2), where tag, chunk, build, check g. Each feature f j corresponds to a parameter ff j , which can be viewed as a "weight" that reflects the importance or usefulness of the feature. The parameters fff of each model are found automatically with the Generalized Iterative Scaling algorithm (Darroch and Ratcliff, 1972), which is summarized below: 1. Add a "correction" feature f k+1 to the model, defined as where C is some constant 1 such that for any (a; b) pair: 2. Estimate the parameters using the following iterative algorithm: where (a;b) ~ l Y (ff (n) The algorithm guarantees that the likelihood of the training set is non-decreasing, i.e., L(p n+1 ) L(p n ), and that the sequence fp n will eventually converge to p , the maximum likelihood estimate for models of form (2). In practice, the parameter updates can be stopped after some fixed number of iterations (e.g., 100) or when L(p heuristically set threshold. The GIS algorithm is applied separately to the training sets to create the models pX , where X 2 f tag, chunk, build, check g. 3.2.6. Scoring Parse Trees We then use the models p tag , p chunk , p build , and p check to define a function score, which the search procedure uses to rank derivations of incomplete and complete parse trees. For notational convenience, define q as follows tag (ajb) if a is an action from tag chunk (ajb) if a is an action from chunk build (ajb) if a is an action from build check (ajb) if a is an action from check ang be the derivation of a parse T , where T is not necessarily complete, and where each a i is an action of some tree-building procedure. By design, the tree-building procedures guarantee that ang is the only derivation for the parse T . Then the score of T is merely the product of the conditional probabilities of the individual actions in its derivation: Y a is the context in which a i was decided. 3.3. Search The search heuristic attempts to find the best parse T , defined as: advance: d \Theta Q \Gamma! d Applies relevant tree building procedure to d and returns list of new derivations whose action probabilities pass the threshold Q */ insert: d \Theta h \Gamma! void /* inserts d in heap h */ extract: h \Gamma! d /* removes and returns derivation in h with highest score */ completed: d \Gamma! ftrue,falseg /* returns true if and only if d is a complete derivation */ of completed parses */ contains derivations of length i */ while then break for if (completed(d q then insert(d q , C) else insert(d q , h Figure 10. Top K BFS Search Heuristic where trees(S) are all the complete parses for an input sentence S. The heuristic employs a breadth-first search (BFS) which does not explore the entire frontier, but rather, explores only at most the top K scoring incomplete parses in the frontier, and terminates when it has found M complete parses, or when all the hypotheses have been exhausted. Furthermore, if an g are the possible actions for a given procedure on a derivation with context b, and they are sorted in decreasing order according to q(a i jb), we only consider exploring those actions that hold most of the probability mass, where m is defined as follows: and where Q is a threshold less than 1. The search also uses a tag dictionary, described in Ratnaparkhi (1996), that is constructed from training data and reduces Seconds Sentence Length Figure 11. Observed running time of top K BFS on Section 23 of Penn Treebank WSJ, using one 167Mhz UltraSPARC processor and 256MB RAM of a Sun Ultra Enterprise 4000. the number of actions explored by the tagging model. Thus there are three parameters for the search heuristic, namely K,M , and Q and all experiments reported in this paper use describes the top K BFS and the semantics of the supporting functions. It should be emphasized that if K ? 1, the parser does not commit to a single POS or chunk assignment for the input sentence before building constituent structure. All three of the passes described in section 3.1 are integrated in the search, i.e., when parsing a test sentence, the input to the second pass consists of K of the top scoring distinct POS tag assignments for the input sentence. Likewise, the input to the third pass consists of K of the top scoring distinct chunk and POS tag assignments for the input sentence. The top K BFS described above exploits the observed property that the individual steps of correct derivations tend to have high probabilities, and thus avoids searching a large fraction of the search space. Since, in practice, it only does a constant amount of work to advance each step in a derivation, and since derivation lengths are roughly proportional to the sentence length, we would expect it to run in linear observed time with respect to sentence length. Figure 11 confirms our assumptions about the linear observed running time. Table 4. Sizes of Training Events, Actions, and Features Procedure Number of Training Events Number of Actions Number of Features tag 935655 43 119910 chunk 935655 41 230473 check 1097584 2 182474 build 1097584 52 532814 4. Experiments Experiments were conducted on a treebank that is widely used in the statistical natural language processing community, namely, the Wall St. Journal treebank (release 2) from the University of Pennsylvania (Marcus et al., 1994). The maximum entropy parser was trained on sections 2 through 21 (roughly 40000 sentences) of the Wall St. Journal corpus, and tested on section 23 (2416 sentences) for comparison with other work. Table 4 describes the number of training events extracted from the Wall St. Journal corpus, the number of actions in the resulting probability models, and the number of selected features in the resulting probability models. It took roughly hours to train all the probability models, using one 167 Mhz Sun UltraSPARC processor and 1 Gb of disk space. Only the words, part-of-speech tags, constituent labels, and constituent boundaries of the Penn treebank were used for training and testing. The other annotation, such as the function tags that indiciate semantic properties of constituents, and the null elements that indicate traces and coreference, were removed for both training and testing. Previous literature on statistical parsing has used the following measures, based on those proposed in Black et al. (1991), for comparing a proposed parse P with the corresponding correct treebank parse correct constituents in P # constituents in T correct constituents in P # constituents in P A constituent in P is "correct" if there exists a constituent in T of the same label that spans the same words. 2 Table 5 shows results using these measures, as well as results using the slightly more forgiving measures used in Magerman (1995). Table 5 shows that the maximum entropy parser compares favorably to other state-of-the- art systems (Magerman, 1995; Collins, 1996; Goodman, 1997; Charniak, 1997; Collins, 1997) and shows that only the results of Collins (1997) are better in both precision and recall. The parser of Hermjakob and Mooney (1997) also performs well (90% labelled precision and recall) on the Wall St. Journal domain, but uses a test set comprised of sentences with only frequent words and recovers a different Table 5. Results on 2416 sentences of section 23 (0 to 100 words in length) of the WSJ Treebank. Evaluations marked with \Pi ignore quotation marks. Evaluations marked with ? collapse the distinction between the constituent labels ADVP and PRT, and ignore all punctuation. Parser Precision Recall Maximum Entropy \Pi 86.8% 85.6% Maximum Entropy ? 87.5% 86.3% Table 6. Speed and accuracyon 5% random sample of test set, as a function of search parameters K;M Seconds/Sentence Precision Recall form of annotation, and is therefore not comparable to the parsers in Table 5. Figure 12 shows the effects of training data size versus performance, and Table 6 shows the effect of varying the search parameters K and M on the parser's speed and accuracy. Parsing accuracy degrades as K and M are reduced, but even with accuracy is over 82% precision and recall. % Sample of Original Training Figure 12. Performance on section 23 as a function of training data size. The X axis represents random samples of different sizes from sections 2 through 21 of the Wall St. Journal corpus. 4.1. Portability across domains is an important concern, since corpus-based methods will suffer in accuracy if they are tested in a domain that is unrelated to the one in which they are trained (e.g., see Sekine (1997)). Since treebank construction is a time-consuming and expensive process, it is unlikely (in the near future) that treebanks will exist for every domain that we could conceivably want to parse. It then becomes important to quantify the potential loss in accuracy when training on a treebanked domain, like the Wall St. Journal, and testing on a new domain. The experiments in this section address the following two practical questions : ffl How much accuracy is lost when the parser is trained on the Wall St. Journal domain, and tested on another domain (compared to when the parser is trained and tested on the Wall St. Journal) ? ffl How much does a small amount of additional training material (2000 sentences) on a new domain help the parser's accuracy on the new domain ? The new domains, namely "Magazine & Journal Articles", "General Fiction", and "Adventure Fiction", are from the Brown corpus (Francis and Kucera, 1982), a collection of English text from Brown University that represents a wide variety of Table 7. Description of training and test sets Name Description Category WSJ.train Sections 2 through 21 of the WSJ corpus Financial News G.train First 2000 sentences of section G in Brown corpus Magazine Articles G.test Remaining 1209 sentences of section G in Brown corpus Magazine Articles K.train First 2000 sentences of section K in Brown corpus General Fiction K.test Remaining 2006 sentences of section K in Brown corpus General Fiction N.train First 2000 sentences of section N in Brown corpus Adventure Fiction N.test Remaining 2121 sentences of section N in Brown corpus Adventure Fiction Table 8. Portability Experiments on the Brown corpus. See Table 7 for the training and test sets. Description Test Corpus Accuracy (Precision/Recall) Avg. Accuracy G K N (Precision/Recall) 1 Train on WSJ.train, test on X.test 80.2%/79.5% 79.1%/78.8% 80.6%/79.9% 80.0%/79.4% 2 Train on WSJ.train test on X.test 81.0%/80.5% 80.9%/80.3% 82.0%/81.0% 81.3%/80.6% 3 Train on X.train, test on X.test 78.2%/76.3% 77.7%/76.7% 78.7%/77.6% 78.2%/76.9% different domains. These domains have been annotated in a convention similar to the text of the Wall St. Journal treebank, as part of the Penn treebank project. Table 8 describes the results of several different training schemes, and Table 7 describes the training and test corpora. The feature sets of the parser were not changed in any way when training from the Brown corpus domains. According to Table 8, the training schemes for parsing a new domain D, ranked in order from best to worst, are: 1. Strategy 2: Train on a mixture of a lot of Wall St. Journal (WSJ) and a little of D 2. Strategy 1: Train on a lot of WSJ 3. Strategy 3: Train on a little of D All experiments on a particular new domain (G, K, and N) are controlled to use the same test set, and the additional training sets G.train, K.train, and N.train all consist of 2000 sentences from their respective domain. Compared to the accuracy achieved when training and testing on the Wall St. Journal (86.8% precision/85.6% recall as shown in Table 5), we conclude that: ffl on average, we lose 6.8% precision and 6.2% recall when training on the Wall St. Journal and testing on the Brown corpus (strategy 1), ffl on average, we lose 5.5 % precision and 5% recall when training on the Wall St. Journal and the domain of interest, and testing on that same domain (strategy 2). The discussion thus far has omitted one other possibility, namely, that the lower Brown corpus performance in strategies 1 and 2 is due to some inherent difficulty in parsing the Brown corpus text, and not to the mismatch in training and test data. A quick glance at Figure 12 and Table 8 dispels this possibility, since training on roughly 2000 sentences of the Wall St. Journal yields 79% precision and 78% recall, which is only slightly higher (1%) than the results on the Brown corpus under identical circumstances (strategy 3), roughly 78% precision 77% recall. It follows that the Brown corpus is only slightly more difficult to parse than the Wall St. Journal corpus, and that the training domain/test domain mismatch must account for most of the accuracy loss when using strategies 1 and 2. 4.2. Reranking the Top N It is often advantageous to produce the top N parses instead of just the top 1, since additional information can be used in a secondary model that re-orders the top N and hopefully improves the quality of the top ranked parse. Suppose there exists a perfect reranking scheme that, for each sentence, magically picks the best parse from the top N parses produced by the maximum entropy parser, where the best parse has the highest average precision and recall when compared to the treebank parse. The performance of this perfect scheme is then an upper bound on the performance of an actual reranking scheme that might be used to reorder the top N parses. Figure 13 shows that the perfect scheme would achieve roughly 93% precision and recall, which is a dramatic increase over the top 1 accuracy of 87% precision and 86% recall. Figure 14 shows that the "Exact Match", which counts the percentage of times the proposed parse P is identical (excluding POS tags) to the treebank parse T , rises substantially to about 53% from 30% when the perfect scheme is applied. It is not surprising that the accuracy improves by looking at the top N parses, but it is suprising-given the thousands of partial derivations that are explored and discarded-that the accuracy improves drastically by looking at only the top 20 completed parses. For this reason, research into reranking schemes appears to be a promising and practical step towards the goal of improving parsing accuracy. Accuracy Number of Parses For Each Sentence Recall Figure 13. Precision & recall of a "perfect" reranking scheme for the top N parses of section 23 of the WSJ Treebank, as a function of N . Evaluation ignores quotation marks. 5. Comparison With Previous Work When compared to other parsers, the accuracy of the maximum entropy parser is state-of-the-art. It performs slightly better than or equal to most of the other systems compared in Table 5, and performs only slightly worse than Collins (1997). However, the differences in accuracy are fairly small, and it is unclear if the differences will matter to the performance of applications that require parsed input. The main advantage of the maximum entropy parser is not its accuracy, but that it achieves the accuracy using only simple facts about data that have been derived from linguistically obvious intuitions about parsing. As a result, the evidence it needs can be specified concisely, and the method can be re-used from other tasks, resulting in a minimum amount of effort on the part of the experimenter. Furthermore, the maximum entropy parser combines some of the best aspects of other work. For example, the parsers of Black et al. (1993), Jelinek et al. (1994), Magerman (1995) use a general learning technique-decision trees-to learn parsing actions, and need to represent words as bitstrings derived from a statistical word clustering technique. The maximum entropy parser also uses a general learning technique, but uses natural linguistic representations of words and constituents, and therefore does not require a (typically expensive) word clustering procedure. Accuracy Number of Parses For Each Sentence Exact Match 33333 3 3 3 3 3 3 3 3 3 3 3 3 3 Figure 14. Exact match of a "perfect" reranking scheme for the top N parses of section 23 of the WSJ Treebank, as a function of N . Evaluation ignores quotation marks. Other parsers, like those of Collins (1996), Goodman (1997), Charniak (1997), Collins (1997) use natural linguistic representations of words and constituents, but do not use general machine learning techniques. Instead, they use custom-built statistical models that combine evidence in clever ways to achieve high parsing ac- curacies. While it is always possible to tune such methods to maximize accuracy, the methods are specific to the parsing problem and require non-trivial research effort to develop. In contrast, the maximum entropy parser uses an existing modeling framework that is essentially independent of the parsing task, and saves the experimenter from designing a new, parsing-specific statistical model. In general, more supervision typically leads to higher accuracy. For example, Collins (1997) uses the semantic tags in the Penn treebank while the other, slightly less accurate parsers in Table 5 discard this information. Also, Hermjakob and Mooney (1997) uses a hand-constructed knowledge base and subcategorization table and report 90% labelled precision and recall, using a different test set and evaluation method. The additional information used in these approaches, as well as the word clusters used in Magerman (1995), could in theory be implemented as features in the maximum entropy parser. Further research is needed to see if such additions to the parser's representation will improve the parser's accuracy. The portability of all the parsers discussed here is limited by the availability of treebanks. Currently, few treebanks exist, and constructing a new treebank requires a tremendous amount of effort. It is likely that all current corpus-based parsers will parse text less accurately if the domain of the text is not similar to the domain of the treebank that was used to train the parser. 6. Conclusion The maximum entropy parser achieves state-of-the-art parsing accuracy, and minimizes the human effort necessary for its construction through its use of both a general learning technique, and a simple representation derived from a few intuitions about parsing. Those results which exceed those of the parser presented here require much more human effort in the form of additional resources or annotation. In practice, it parses a test sentence in linear time with respect to the sentence length. It can be trained from other domains without modification to the learning technique or the representation. Lastly, this paper clearly demonstrates that schemes for reranking the top 20 parses deserve research effort since they could yield vastly better accuracy results. The high accuracy of the maximum entropy parser also has interesting implications for future applications of general machine learning techniques to parsing. It shows that the procedures and actions with which a parser builds trees can be designed independently of the learning technique, and that the learning technique can utilize the exactly same sorts of information, e.g., words, tags, and constituent labels, that might normally be used in a more traditional, non-statistical natural language parser. This implies that it is feasible to use maximum entropy models and other general learning techniques to drive the actions of other kinds of parsers trained from more linguistically sophisticated treebanks. Perhaps a better combination of learning technique, parser, and treebank will exceed the current state-of-the-art parsing accuracies. 7. Acknowledgments The author would like to thank Mike Collins and Mitch Marcus of the University of Pennsylvania for their many helpful comments on this work. The author would also like to thank the three anonymous reviewers of this paper for their constructive comments. This work was supported by ARPA grant N66001-94C-6043. Notes 1. The parameters K,M , and Q were optimized for speed and accuracy on a "development set" which is separate from the training and test sets. 2. The precision and recall measures do not count part-of-speech tags as constituents. --R Parsing By Chunks. Natural Language Understanding. A Maximum Entropy Approach to Natural Language Processing. A Procedure for Quantitatively Comparing the Syntactic Coverage of English Grammars. Towards History-based Grammars: Using Richer Models for Probabilistic Parsing Generalized Probabilistic LR Parsing of Natural Language (Corpora) with Unification-Based Grammars Statistical Parsing with a Context-free Grammar and Word Statistics A stochastic parts program and noun phrase chunker for unrestricted text. Three Generative A New Statistical Parser Based on Bigram Lexical Dependencies. Generalized Iterative Scaling for Log-Linear Models Inducing Features of Random Fields. IEEE Transactions Pattern Analysis and Machine Intelligence Frequency analysis of English usage: lexicon and grammar. Probabilistic Feature Grammars. Learning Parse and Translation Decision From Examples With Rich Context. Information Theory and Statistical Mechanics. Decision Tree Parsing using a Hidden Derivational Model. Adaptive Language Modeling Using The Maximum Entropy Principle. Statistical Decision-Tree Models for Parsing A Theory of Syntactic Recognition for Natural Language. Building a large annotated corpus of English: the Penn Treebank. Text Chunking using Transformation-Based Learning In Yarowsky A Maximum Entropy Part of Speech Tagger. The Domain Dependence of Parsing. Coping With Ambiguity and Unknown Words through Probabilistic Models. --TR --CTR Tong Zhang , David Johnson, A robust risk minimization based named entity recognition system, Proceedings of the seventh conference on Natural language learning at HLT-NAACL 2003, p.204-207, May 31, 2003, Edmonton, Canada Nanda Kambhatla, Combining lexical, syntactic, and semantic features with maximum entropy models for extracting relations, Proceedings of the ACL 2004 on Interactive poster and demonstration sessions, p.22-es, July 21-26, 2004, Barcelona, Spain A. Ittycheriah , L. Lita , N. Kambhatla , N. Nicolov , S. Roukos , M. Stys, Identifying and tracking entity mentions in a maximum entropy framework, Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology: companion volume of the Proceedings of HLT-NAACL 2003--short papers, p.40-42, May 27-June 01, 2003, Edmonton, Canada Michele Banko , Eric Brill, Mitigating the paucity-of-data problem: exploring the effect of training corpus size on classifier performance for natural language processing, Proceedings of the first international conference on Human language technology research, p.1-5, March 18-21, 2001, San Diego Hongyan Jing , Radu Florian , Xiaoqiang Luo , Tong Zhang , Abraham Ittycheriah, HowtogetaChineseName(Entity): segmentation and combination issues, Proceedings of the conference on Empirical methods in natural language processing, p.200-207, July 11, Analysis of the grammatical functions between adnoun and noun phrases in Korean using Support Vector Machines, Natural Language Engineering, v.9 n.3, p.269-280, September Yasemin Altun , Mark Johnson , Thomas Hofmann, Investigating loss functions and optimization methods for discriminative learning of label sequences, Proceedings of the conference on Empirical methods in natural language processing, p.145-152, July 11, David McClosky , Eugene Charniak , Mark Johnson, Reranking and self-training for parser adaptation, Proceedings of the 21st International Conference on Computational Linguistics and the 44th annual meeting of the ACL, p.337-344, July 17-18, 2006, Sydney, Australia James Henderson , Ivan Titov, Data-defined kernels for parse reranking derived from probabilistic models, Proceedings of the 43rd Annual Meeting on Association for Computational Linguistics, p.181-188, June 25-30, 2005, Ann Arbor, Michigan Nanda Kambhatla, Minority vote: at-least-N voting improves recall for extracting relations, Proceedings of the COLING/ACL on Main conference poster sessions, p.460-466, July 17-18, 2006, Sydney, Australia Eugene Charniak , Mark Johnson, Edit detection and parsing for transcribed speech, Second meeting of the North American Chapter of the Association for Computational Linguistics on Language technologies 2001, p.1-9, June 01-07, 2001, Pittsburgh, Pennsylvania Eugene Charniak, Immediate-head parsing for language models, Proceedings of the 39th Annual Meeting on Association for Computational Linguistics, p.124-131, July 06-11, 2001, Toulouse, France Dan Klein , Christopher D. Manning, A parsing: fast exact Viterbi parse selection, Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology, p.40-47, May 27-June 01, 2003, Edmonton, Canada James Henderson, Discriminative training of a neural network statistical parser, Proceedings of the 42nd Annual Meeting on Association for Computational Linguistics, p.95-es, July 21-26, 2004, Barcelona, Spain Zhou GuoDong, Discriminative hidden Markov modeling with long state dependence using a kNN ensemble, Proceedings of the 20th international conference on Computational Linguistics, p.22-es, August 23-27, 2004, Geneva, Switzerland Michael Collins , Brian Roark, Incremental parsing with the perceptron algorithm, Proceedings of the 42nd Annual Meeting on Association for Computational Linguistics, p.111-es, July 21-26, 2004, Barcelona, Spain James Henderson, Inducing history representations for broad coverage statistical parsing, Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology, p.24-31, May 27-June 01, 2003, Edmonton, Canada Eugene Charniak, A maximum-entropy-inspired parser, Proceedings of the first conference on North American chapter of the Association for Computational Linguistics, p.132-139, April 29-May James R. Curran , Stephen Clark, Investigating GIS and smoothing for maximum entropy taggers, Proceedings of the tenth conference on European chapter of the Association for Computational Linguistics, April 12-17, 2003, Budapest, Hungary Joseph Turian , I. Dan Melamed, Advances in discriminative parsing, Proceedings of the 21st International Conference on Computational Linguistics and the 44th annual meeting of the ACL, p.873-880, July 17-18, 2006, Sydney, Australia Gerard Escudero , Llus Mrquez , German Rigau, A comparison between supervised learning algorithms for word sense disambiguation, Proceedings of the 2nd workshop on Learning language in logic and the 4th conference on Computational natural language learning, September 13-14, 2000, Lisbon, Portugal Wang , Kenji Sagae , Teruko Mitamura, A fast, accurate deterministic parser for Chinese, Proceedings of the 21st International Conference on Computational Linguistics and the 44th annual meeting of the ACL, p.425-432, July 17-18, 2006, Sydney, Australia James Henderson, Neural network probability estimation for broad coverage parsing, Proceedings of the tenth conference on European chapter of the Association for Computational Linguistics, April 12-17, 2003, Budapest, Hungary Brian Roark , Michiel Bacchiani, Supervised and unsupervised PCFG adaptation to novel domains, Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology, p.126-133, May 27-June 01, 2003, Edmonton, Canada Xiaoqiang Luo , Imed Zitouni, Multi-lingual coreference resolution with syntactic features, Proceedings of the conference on Human Language Technology and Empirical Methods in Natural Language Processing, p.660-667, October 06-08, 2005, Vancouver, British Columbia, Canada Rahul Gupta , Sunita Sarawagi, Creating probabilistic databases from information extraction models, Proceedings of the 32nd international conference on Very large data bases, September 12-15, 2006, Seoul, Korea Ryan McDonald , Koby Crammer , Fernando Pereira, Online large-margin training of dependency parsers, Proceedings of the 43rd Annual Meeting on Association for Computational Linguistics, p.91-98, June 25-30, 2005, Ann Arbor, Michigan A. Xavier Carreras , B. Llus Mrquez , C. Jorge Castro, Filtering-Ranking Perceptron Learning for Partial Parsing, Machine Learning, v.60 n.1-3, p.41-71, September 2005 Rens Bod, What is the minimal set of fragments that achieves maximal parse accuracy?, Proceedings of the 39th Annual Meeting on Association for Computational Linguistics, p.66-73, July 06-11, 2001, Toulouse, France Ismael Garca-Varea , Francisco Casacuberta, Maximum Entropy Modeling: A Suitable Framework to Learn Context-Dependent Lexicon Models for Statistical Machine Translation, Machine Learning, v.60 n.1-3, p.135-158, September 2005 Rebecca Hwa , Philip Resnik , Amy Weinberg , Clara Cabezas , Okan Kolak, Bootstrapping parsers via syntactic projection across parallel texts, Natural Language Engineering, v.11 n.3, p.311-325, September 2005 Exploiting dictionaries in named entity extraction: combining semi-Markov extraction processes and data integration methods, Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, August 22-25, 2004, Seattle, WA, USA Rens Bod, Parsing with the shortest derivation, Proceedings of the 18th conference on Computational linguistics, p.69-75, July 31-August Rens Bod, Do all fragments count?, Natural Language Engineering, v.9 n.4, p.307-323, December
parsing;natural language processing;maximum entropy models
309594
Value of Information in Capacitated Supply Chains.
We incorporate information flow between a supplier and a retailer in a two-echelon model that captures the capacitated setting of a typical supply chain. We consider three situations: (1) a traditional model where there is no information to the supplier prior to a demand to him except for past data; (2) the supplier knows the (s, S) policy used by the retailer as well as the end-item demand distribution; and (3) the supplier has full information about the state of the retailer. Order up-to policies continue to be optimal for models with information flow for the finite horizon, the infinite horizon discounted and the infinite horizon average cost cases. Study of these three models enables us to understand the relationships between capacity, inventory, and information at the supplier level, as well as how they are affected by the retailer's (S - s) values and end-item demand distribution. We estimate the savings at the supplier due to information flow and study when information is most beneficial.
Introduction The industrial supplier-customer relations have undergone radical changes in recent years as the philosophy behind managing manufacturing systems continues to be influenced by several Japanese manufacturing practices. As more organizations realize that successful in-house implementation of Just-In-Time alone will have limited effect, they are seeking other members of their supply chain to change their operations. This has resulted in a certain level of co-operation, mainly in the areas of supply contracts and information sharing, that was lacking before. This is especially true when dealing with customized products, and is most commonly seen between suppliers and their larger customers. Our primary motivation to develop the models in this paper came from two sources. One was from the food industry, when North Side Foods - the largest supplier on the East Coast for McDonald's - was asked to take the lead in integrated supply chain management. One of the issues was to improve the understanding of the interactions between informa- tion, inventory and capacity (because it affects customer service and cost) and to provide insights for the entire McDonald's supply chain, consisting of 160 suppliers. Consequently, we take the supplier's point of view in this paper. The second (and a broader) motivation to study the benefits of information arose because of differing reactions to Electronic Data Interchange (EDI) benefits from industrial sources: while some were very happy with improved information, others were disappointed at the benefits (see [3] and [20]). Thus, while information is always beneficial, we would like to know when it is most beneficial and when it is only marginally useful. In the latter case, some other characteristic of the system, such as end-item demand variance or supplier capacity may have to be improved before expecting significant benefits from information. Thus, our computational efforts will be directed towards understanding some of these issues. The degree of co-operation varies significantly from one supply chain to another. The information sharing could range from generic (e.g. type of inventory control policy being used, type of production scheduling rules being used) to specific (e.g. day-to-day inventory levels, exact production schedules). This is similar to long term contracts, which may be loose (e.g. 'customer will purchase a certain cumulative quantity over the next six months') or tight (e.g. 'customer will purchase a certain quantity every Monday'); see Anupindi and Akella [1] and Anupindi and Bassok [2]. We develop and analyze new models of these recent developments in information sharing because traditional inventory models were developed under demand and informational assumptions that still hold, perhaps, when dealing with commodity products or at a retail level but no longer universally hold in the manufacturing sector. Previous research in this area, i.e. incorporating information flow into inventory control and supply chains, has mainly followed two approaches. The first approach used by Scarf [19], Iglehart [12], Azoury [4], and Lovejoy [17] was to use the information to more accurately forecast the demand distribution using Bayesian updates. The second approach, followed in this paper, incorporates the information flow by developing new analytical models. This approach was used by Zheng and Zipkin [22] to analyze the value of information flow in a two product setting. They showed that using the information about the outstanding orders of both the products resulted in improvement of system performance. Zipkin [24] extended this to a multi-item production facility. Hariharan and Zipkin [11] incorporated information about order arrivals, termed demand leadtimes, into inventory control and studied its effect on system performance. They observed that demand leadtimes behave in a fashion that is exactly opposite to supply leadtimes. An increase in demand leadtime improves the system performance exactly like a reduction in supply leadtime. Chen [6] studied the benefit of information flow by observing that echelon-stock policies and installation-stock policies in a multi-echelon environment differ in their informational requirements. He also studied the effect of parameters such as number of stages, leadtimes, demand variance, and customer service on the benefit of information flow. Traditional capacitated models have recently received attention: Federgruen and Zipkin [7] [8] provide the optimal policy for the stationary demand case; Glasserman and Tayur [9], [10] study multi-echelon systems operated via a base stock policy; Kapuscinski and Tayur [13] study the periodic demand case. Demand Control Inventory Supplier Figure 1: Model 0 - The traditional supply chain. In this paper, we study two different levels of information flow in a two-echelon capacitated supply chain (and also compare them to a base case of no information). We are interested in policies for a supplier who faces demand from a customer who is in reality a middleman facing final (end-item) demand. In some sense, we are broadening the 'informa- tion structure' (see concluding remarks of [11]) by providing differential abilities to better anticipate the next demand. Model 0 (shown in Fig. 1) represents the traditional view of supply chains in which the demands are seen as originating from a black box. The supplier is not aware of the logic behind the demand process, and so there is no 'advance warning' of the demand, and has to rely on past data. When there is some co-operation in the supply chain, the producer finds out the real driver behind his demand process. As represented in Model 1 (shown in Fig. 2) the customer is using an (s; S) policy for inventory control while facing an i.i.d. (independent and identically distributed) demand process. Here, the supplier can improve his prediction of the demand by incorporating the value, the Control Inventory i.i.d Demand Customer Demand Supplier Figure 2: Model 1 - Supply chain with some information flow. time that has elapsed since the last demand from the customer and the distribution of the end-item demand. Model 2 (shown in Fig. 3) represents a tighter co-operation in the supply chain. In every period the supplier also knows the current inventory level at the customer, either because of an EDI link or because the customer explicitly provides the information on a periodic basis. This helps the supplier to predict the demand process more reliably, and comes close to an 'early warning' or an `advance ordering' situation. Control Inventory i.i.d Demand Customer Demand Day to Day Inventory levels Supplier Figure 3: Model 2 - Supply chain with full information flow. Some of our qualitative results are as follows. Information is always beneficial, and as it becomes more precise it appears to retain its incremental value. However, when the end- item demand variance is high, or the values of customer are very high or very low, information is not very beneficial. On the other hand, if the end-item demand variance is moderate, the values are not extreme and holding costs (at the supplier) are high, the benefits of information are high. Similarly, information is not as beneficial if the supplier's capacity is low as compared to when his capacity is high. The benefits of information, as penalty costs (at the supplier) increase, appears to first increase and then drop off, especially when the end-item demand variances are moderate to high. Thus, before embarking on an EDI implementation, the supplier should verify his capacity and the fixed cost imputed onto his customer (resulting in the customer's while the customer should attempt to reduce the end-item demand variance. When have reduced to moderate values, and the supplier has moderate to high capacity, the information link is bound to be most beneficial. We justify these insights and other results in subsequent sections. The rest of the paper is organized as follows: In section 2, we develop optimal policies for both models 1 and 2. We show that modified order up-to policies are optimal for the finite horizon, infinite horizon with discounted cost, and infinite horizon with average cost. Since the results (and the proofs) are similar for both models, we only present detailed proofs for Model 1. In section 3, we present structural properties of the optimal order up-to levels. In section 4, we first present a fast recursive solution procedure to compute the optimal parameters for the uncapacitated problem. Then, for the capacitated situation we develop and validate the Infinitesimal Perturbation Analysis (IPA) solution procedure to compute the optimal parameters. In section 4, we also provide solution procedures for Model 0 and Model 2. Using these solution procedures we estimate the savings due to information flow. A detailed computational study reveals interesting insights with regard to when information is most beneficial. Section 5 contains these computational results and insights. As by-products, we also gain some insight on how to manage multiple customers and obtain a simple approximation to compute the optimal parameters. We conclude in section 6 by summarizing our findings and discussing future directions of research. Models We consider a periodic review inventory control problem (at the supplier level) with linear holding and penalty costs (h and b per unit), finite capacity (C), and no purchase or salvage costs. The unit variable purchase cost does not affect our results; see [13]. The customer is following a (s; S) policy. The (s; S) policy was shown to be optimal for infinite horizon inventory problem with periodic review, fixed ordering cost, linear holding and penalty costs, constant leadtime, facing stationary demands and full backlogging by Scarf [18]. This is the setting of the customer. Let us first consider Model 1 where the supplier knows that the customer is using a (s; S) policy and is also aware of the end-item demand distribution. The sequence of events in every period is as follows. The supplier decides on his production quantity for the period. The customer realizes the end-item demand for the period and after satisfying the demand, if her inventory level is below s, she places an order with the supplier to bring her inventory level to S. If the supplier cannot satisfy the full order of the customer, we assume that the customer acquires the missing part of the order elsewhere and brings her inventory level to S. All this happens with no lead time. fixed non-zero delivery lead time does not change the analysis.) The supplier pays holding cost if there is inventory at his level at the end of the period or pays penalty cost if a portion of the demand was lost (i.e. satisfied from elsewhere). The objective is to find a control policy for the supplier that minimizes the total holding and penalty costs. At the supplier level, incorporation of this information into inventory models results in a non-stationary demand process although the end-item demand is stationary. From the supplier's point of view, every period is in one of k possible `states' (see remark below). State is defined as the number of periods since the last demand. Let p i be the probability that a demand to the supplier will be realized in state i. If the demand is realized in state i, it is from a cumulative distribution function (cdf) \Phi i (:) (and probability distribution function, pdf, OE i (:)) with mean i and the next period will be in state 1. If the demand is not realized, then the next period will be in state i + 1. We further assume that p i p and \Phi i (:) st \Phi i+1 (:) i.e. the chance and quantity of realization of demand increases in time since last demand ('monotonicity'). If a period reaches state k, a demand will be realized in that period from distribution \Phi k (:). This monotonicity assumption is satisfied if the end-item demand to the customer has an Increasing Failure Rate (IFR) distribution (such as Uniform, Normal or Erlang distributions); see Appendix A for a proof. We further assume that the end-item demand has a finite mean, and so Remarks. We have made two assumptions above that simplify our analysis. (1) We assume a finite k; this is satisfied if the end-item demand is non-zero in every period, bounded below by some ffl ? 0. Then we can choose 1. Alternatively, we can ignore the states larger than k is the end-item demand and ffl sufficiently small. (2) We allow the customer to obtain all the requirements not met from this supplier at a higher price from elsewhere (or due to overtime at this supplier), and pass on the cost difference to this supplier. This cost differential is what b represents. Both these assumptions are reasonable based on our industry experience. We believe that without the finite k assumption, the analysis will be more technical, but provide no sharper insights on benefits of information. Similarly, if the customer at the time of placing her order could not be guaranteed of the full amount demanded, then she will not follow a simple stationary (s,S) policy. Again we believe, the analysis will become complicated, without adding significant insights into the benefits of information flow. Even the assumption of fixed lead time is reasonable, since transportation can be assumed to be fairly reliable. In fact, in the McDonald's supply chain, the period may be considered as one week and the transportation time is less than two days, thus allowing the 'zero lead time' assumption to be applicable directly. In Model 2, the state captures the inventory level at the customer exactly. As we shall see in section 4.2, Model 2 is a straightforward extension of Model 1 from structural point- of-view, and some of the demand assumptions made above can be relaxed. In what follows, we will deal with Model 1 and provide a summary of results for Model 2 in section 4.2. In the base case, Model 0, the supplier faces a demand process that we assume comes from an independent and identically distributed process, both in inter-arrival time as well as order quantity, whose distribution is determined from past data. (Thus this model assumes that the supplier does not know that the customer is using a (s,S) policy.) The policy used to manage under Model 0 assumptions and the method to compute the specific parameters are described in section 4.3. Note that at the supplier-customer interface there is an implicit fixed ordering cost in our model, and hence the customer uses a (s; S) policy (with optimal parameters based on her holding and penalty costs). Once the supplier uses the optimal policy, which we derive for models 1 and 2, the entire supply chain is 'optimal'. This is a pleasing property obtained due to the simplicity of our setting. The rest of this section is devoted to showing the structure of optimal policies for Model 1. As is standard practice in inventory theory, we start with the finite horizon case. 2.1 Finite Horizon : Model 1 As defined in [7] [8], a modified order up-to policy with level z is one where if the inventory level is less than z, we raise it to z; if this level cannot be reached, we exhaust the available capacity; if the inventory level is above z, we produce nothing. Property 1 For the one period problem and any starting state i k, a modified order up-to policy is optimal. Proof Suppose we have x units on hand at the beginning of the period. We can place an order and bring the level to y(x) such that y(x) 2 [x; x+C]. In state i, the one period cost 1 (y) is where y Since the holding and penalty costs are linear, L i (y) is convex, J i 1 (y) is also convex and its minimum occurs at \Phi i (y i stands for max(0,x).) The optimal control policy is as follows: which is a modified order up-to policy. 2 Consider an n-period problem with initial state i. If the demand is realized in period n, then we have a (n \Gamma 1)-period problem with initial state 1, otherwise we have a (n \Gamma 1)-period problem with starting state (i + 1). Let i be the demand in period i, with cdf \Phi i (:). The optimal n-period cost V i We use to denote first and second derivatives respectively. See [13] for a proof of the existence of the derivatives we use below. Property 2 For all values of n: 1. J i n (y) is convex in 2. (x) is convex in x; and 3. a modified order up-to policy is optimal. Proof These statements can be proved using induction. From our assumption that we know that V i 0 (x) is convex in x and V 0 i \Gammab. Assume that J i are convex and V 0 i \Gammab. Notice that J i n (y) is y (y)]: Using Leibniz's rule, the derivatives of these cost functions, are: \Gammab; 0; The non-negativity of J 00 i n follows from the convexity of V i (x) and the fact that (x) is convex. Based on the fact that if f(t) is convex then also n (x) is also convex. Also since V 0 i (y) is convex in y, it is optimal to order up-to y i that minimizes J i (y). If we do not have enough capacity to reach y i n it is optimal to go as close to y i n as possible. 2 n be the quantities defined above when the capacities are C 1 and C 2 respectively. If C 2 C 1 then Proof We will first prove (a) and (b) by induction. They are obviously true for n=0. Assume they are true for n (x), and using (b) for easily established that C 1 J (x). Furthermore from the convexity of J n and inductional assumption C 1 J Using the expression for n (x) from the proof of Property 2, and the observation that if it is easily established that (x). So, by induction parts (a) and (b) of the property are true for all n. Since both C n (x) are convex and C 1 n (x), we have n . This proves part (c). 2 2.2 Infinite Horizon : Model 1 We consider both the discounted cost criterion as well as the average cost criterion. 2.2.1 Discounted Cost Under this criterion, the costs in the future are discounted by a factor 1. The finite horizon recursive relation for V i (x) is modified as below to include fi. (y)]: Let us define V i (x); the objective is to minimize V i (x). Property 4 For any finite x, V i (x) is finite. Proof Since the single period cost L i (x) is non-negative for all i and x, V i n (x) is non-decreasing in n. Consider the policy that is order up-to zero. For this policy, the holding cost in any period is less than hx and the penalty cost in any period is less than b i . The total expected cost of this policy is bounded above by 1\Gammafi which is finite. Since fV i (x)g is a non-decreasing sequence with a finite upper bound, lim exists and is finite. Therefore, the expected cost of the optimal policy, if it exists, must be finite. 2 Property 5 For each state i, the optimal policy is modified order up-to y i . (x) is finite, from pp. 210-212 in Bertsekas [5], the optimal policy exists and it satisfies the following recursion: (y)]: (1) Since L i (:) and yh are continuous, V i (:) is convex as it is a pointwise limit of convex functions. Therefore the right hand side of eq. (1) is convex and there exists y i that minimizes it. As y i n and since lim sup n!1 fy i n g is finite (see Property 6 must be finite. 2 2.2.2 Average Cost The following technical result is repeatedly used to show several interesting properties of our models. Property 6 lim supfy i Proof We will establish this result by first showing that lim supf 0 y i 1. We will prove this by contradiction. Assume that there exists a sequence fn t g such that 0 y i for all us choose a particular n t and compare the cost of the optimal policy, , to the cost of a policy that is order up-to zero and starts with zero inventory. The cost of these policies is different only for a few periods early in the horizon when the inventory at the beginning of a period is positive. As soon as the inventory at the beginning of a period reaches zero, both the policies operate the same way resulting in equal costs. Let the number of periods over which the costs differ be l t . Let be the demands observed when the inventory is positive. Let be the inter arrival times of these demands. Thus l d demands occurred during the l t periods and For ease of presentation, we will assume that the initial state s n t 1. The proof for the case when the initial state is different from 1 requires minor adjustments. The demands are i.i.d. and a 1 ; a are also i.i.d. Let us assume these demands have mean and the inter arrival times have mean . These demands satisfy the condition and . This implies that +D l d l d Taking expectations, we get l d are i.i.d and l d is a stopping time, from Wald's equality, we have The total inventory over these l t periods is l d l d l d Noting that D j 0 is independent of a and l d is a stopping time, the expected total inventory is E(l d l d l d Rewriting the terms in the expectation, the total expected inventory is E(l d We know that if two random variables X and Y are negatively correlated then E(XY ) E(X)E(Y are negatively correlated, the total expected inventory is at least E(l d Upon simplification, the expected total inventory is at least E(l d The total expected inventory cost over these l t periods is greater than or equal to E(l d E(l d )E(l The expected cost of order up-to zero policy with zero initial inventory is at most +). The difference in the cost of the optimal policy and the cost of the order up-to zero policy is greater than or equal to which is quadratic and is positive for large values of 0 y 1 thus contradicting our assumption of optimality. This proves that lim supf 0 y 1 n g can not go to infinity as n goes to infinity. 1. Since the sequence fy 1 n g is dominated from above by the sequence (Property 3), we obtain lim supfy 1 1. Using similar arguments and handling appropriately, we can establish that lim supfy i For the average cost criterion, the objective is to determine a policy that minimizes (:). To analyze this situation we will use the discrete version of the problem (i.e. end-item demand is discrete). This implies that the possible inventory levels are also discrete. Furthermore since we know that lim sup n!1 fy i g is finite, the possible inventory levels are f0; fy i gg. The complete state space Ag which is finite. Property 7 For each state i, the optimal policy is modified order up-to " y i . Proof Since the state space is finite, the result follows from pp. 310-313 in [5]. 2 3 Structural Properties for Model 1 Property 8 When the capacity is infinite, 1, the order up-to levels for the finite horizon are ordered. i.e. y i Proof From the results of the one period problem, we have y i Comparing with it is easily seen that J 0 i (x), which in turn implies that V 0 i By induction, we have 8n, which implies y i as the length of the horizon increases, the order up-to level for state i decreases. Assume y i . We will show by induction that the same relation holds for n+1 and y i+1 are solutions to the equations: (y ((y We know that L 0 (y). Since i is stochastically increasing and V 0 1 decreasing function of i , we have Based on similar reasoning to the one used in proving Property 9 below, we obtain y i n+1 . By induction this relation holds for all n. 2 Property 9 The infinite horizon cost function satisfies V 0 i Proof Recall that V i and (y)]: Compare (x) and J (y)]: Using the relations and we establish J 0 (k\Gamma1) (x). This further implies that V 0 (k\Gamma1) (x). Assume that kg. We will show that V 0 i (x). From definition (y)]: By simple comparison and from the induction hypothesis we know that h (y). Since (y) J (x), we have and (y) J implying that their linear combination must be greater or equal to J (x). So, we have implying that V 0 i Corollary 1 A direct result of Property 9 is that the order up-to levels for the infinite horizon (discounted and average cost) are ordered. That is y i . Let us assume that the i.i.d. demand that the customer has cdf \Psi(:) and pdf /(:). Let be defined as minfijp i ? h g. Let fl := inffyj\Psi(y) b g. Then the optimal solution satisfies the following property. the optimal order up-to levels satisfy 1. 2. y i \Delta; and 3. y k Proof 1. From Property 1, we know that the myopic solution in period i satisfies the condition When i is less than i then we know that p i h implying that the myopic solution is order up-to zero. Under infinite capacity, the infinite horizon optimal solution is lower than the myopic solution. Since a negative order up-to level is never optimal the optimal order up-to level must be zero. 2. Clearly due to infinite capacity . Observe that (\Delta) which is equal to h which is negative since i i . So implying that \Delta. By induction for all i i we have y i \Delta. 3. When we reach state k, a demand at the supplier will certainly occur and this demand will be bounded above by random variable from the distribution \Psi(:). If part of the demand to the supplier is lost, the penalty cost is b per unit. The holding cost on remaining inventory is at least h. Thus, in period k, we will never want to have more inventory than the relation . In other words, the optimal order up-to level y k Note It is possible to tighten the upper bound on y k by estimating the holding cost over periods adding it to the denominator in the right hand side of the equation for \Psi(fl). 4 Solution Methods In this section, we develop solution procedures for our models. 4.1 Model 1 To find the optimal solution analytically in a capacitated setting is hard even for the stationary newsboy problem in a general setting. Further, even simple non-stationary cases are analytically intractable. However, for the uncapacitated case, easy solution methods have been presented by Karlin [14] and Zipkin [23] for the non-stationary problem with periodic data. In the first part of this subsection, we present a simple procedure to estimate the optimal order up-to levels for the uncapacitated case. For ease of presentation, in this section we represent the infinite horizon optimal order up-to level in state i by z i . 4.1.1 Uncapacitated System, We know from eq. (1) (Property 5) that the derivative of the infinite horizon cost will follow the recursive relation (y From Property 7, we know that the optimal order up-to levels fz 1 are ordered. Since we have infinite capacity, whenever dx Therefore Similarly, whenever x z i+1 implies V (y Using these two observations, we will develop a procedure that calculates V 0 i (x) for all values of i and x. Let W i (y(x)). We discretize the demand to evaluate the integral term. jg. We assume that when a demand occurs, it is strictly positive. Since the demand has been discretized, the lowest value the demand can take is \Delta. The derivative at every point for every state can be estimated using the algorithm below. values of i. Repeat the following recursion for values of x starting at 1 and increasing by 1 and noting that L 0 x x At any point during the recursion, if W i (x) is negative, we set it equal to zero indicating that x is below the optimal solution and the future cost does not depend on x. The recursion can be stopped when W 0 k (x) becomes positive. However, if the derivatives at higher values are also needed for further analysis, the recursion procedure can be continued until x reaches a predefined limit. Step 3 For each state i, find the order up-to level z Remark. For faster execution, we can start with W i is the solution to the equation \Phi 1 (z 1 4.1.2 Capacitated System For the capacitated situation, we will develop a solution procedure using Infinitesimal Perturbation Analysis (IPA). Let I be the inventory level after demand, demand, and the state of the system in period n. If z i is the order up-to level in state i, the simulation recursions are: there is no demand there is a demand I The derivative recursions are dI n+1 if I n+1 ! z s n+1 or I n+1 ? z s n+1 and To validate the derivatives for the finite horizon and the infinite horizon discounted, the approach is similar to Glasserman and Tayur [9],[10]. To show that the IPA derivatives are valid for the infinite horizon average cost case, using the approach similar to Kapuscinski and Tayur [13], we need to show that each of the order up-to levels z are reached infinite number of times. To show this we make the following non-restrictive assumption on the demand distributions: i is continuous and \Phi i when the customer is following an (s; S) policy.) From here on, when we say fz i g is an order up-to policy, we will assume that z Definition z i communicates with z j if we can reach inventory level z j in state j while starting with inventory z i in state i. Definition An order up-to policy fz i g is regenerative if for all pairs (i; j), z i communicates with z j . Property 11 If C ? \Delta, then every order up-to policy fz i g is regenerative. Proof If probfz communicates with z 1 . This is true since k is continuous above \Delta and z Next we will show that state i communicates with state i + 1. If z i+1 z it is obviously true. If z there exists a number N ! 1 such that z can be reached in state i due to N demands that are less than C+\Deltain state i + 1 which occur with a non-zero probability. We have shown that state k communicates state 1 and state i ! k communicates with the state i + 1. This implies that the order up-to policy fz i g is regenerative. 2 Property 12 If C \Delta, than an order up-to policy fz i g is regenerative if and only if for every state defined above. Proof (() Let us assume that for every state Cg. Assume that we are currently in state k with inventory z k . If z 1 is less than C, then a large demand in period k can bring the inventory to zero and z 1 can be reached in state 1. If z 1 is bigger than C but smaller that (z close to will drop the inventory to z which can be brought upto z 1 in state 1. So z k communicates with z 1 . We will establish that i 1 communicates with i + 1. Let us Cg. For all must be less than or equal to z indicating that state i communicates with i + 1. Further we know that implying that Consider be the biggest that does not communicate with communicates with some state j where j ? i, then i communicates with k through state j and state i + 1 can be reached from state k. Thus i communicates with state i + 1. If i does not communicate directly with any state j ? i, then we will construct a sequence of events such that state i + 1 can be reached. We are currently in state i with inventory z i . In step zero set I 0 , the inventory in step will be I n using full capacity till we reach state k and then observing a demand of \Delta. I n+1 is clearly greater than I n and so there will be no production until we reach state i. Since these events occur with a non-zero probability, I n will eventually reach a value equal to or greater than Cg. If the inventory level reaches z can be reached with inventory z k from which we can reach state we reach the inventory level z then we can reach inventory level z i+1 in state i + 1. In both cases state i communicates with state i + 1. We have shown that every state i communicates with state communicates with state 1 thus implying that is regenerative. Assume that fz i g is regenerative. This implies that any state i\Gamma1 0 communicates with i. If state directly with i then obviously z i z indirectly, then state i has to be reached from some inventory level X after seeing a demand (say ) which implies that z i But we know that X must be less than z k and \Delta. This automatically implies that thus proving that z i [z C. The property is obviously true for state 1 by noting that z 1 will never be reached if it is greater than [z states i, z i must be less than or equal to minfz Following the reasoning in [9] and [13], the IPA procedure is valid. A simple gradient search provides us with optimal parameters. 4.2 Model 2 In Model 2, as shown in Fig. 3, the supplier has information about the day-to-day inventory levels at the customer as well as the (s; S) values and the end-item demand distribution. The state of the system is no longer captured fully by the number of periods since the last demand. So, we redefine the state space to incorporate the information about the total demand seen so far by the customer. Thus, his inventory model corresponding to Model 2 has the following characteristics. State is defined as the total demand seen by the customer since receiving her last order from the supplier. (Other equivalent definitions are possible. All of them will capture the exact inventory at the customer at the beginning of every period.) Every period is in one of possible \Delta states f0; As before, p i is the probability that a demand to the supplier will be realized in state i. If the demand to the supplier is realized in state i, it (exactly equal to i plus the end-item demand at the customer for one period) is from a distribution with cdf \Phi i (:) with mean i and the next period will be in state 0. If the demand is not realized, then the next period will be in state j ? i with probability (j \Gammai) which is exactly the probability that the end-item demand in a single period is (j \Gamma i). (In Model It is easily verified that st \Phi i+1 (:). i.e. the chance and quantity of realization of demand increases in time. Here we do not need the IFR assumption on the end-item demand distribution for monotonicity, nor a lowerbound on the end-item demand for finiteness of states. With minor adjustments the proofs presented for Model 1 apply to this model as well. Briefly: (1) the cost function is convex and the optimal policy is modified order up-to; (2) the optimal policy exists and has finite cost for the discounted cost criterion and the average cost criterion; (3) the infinite horizon order up-to levels are ordered; (4) for the uncapacitated system, a recursive procedure can be used to find the optimal order up-to levels; when the capacity is finite, IPA can be used to find the optimal order up-to levels. Control Inventory i.i.d Demand Customer Demand Day to Day Inventory levels Uniform[15,25] (Model Supplier Figure 4: The experimental setup. 4.3 Model 0 In Model 0, the supplier has no information about the customer, except what is available from past demand data. The supplier observes periods of no demand, followed by a period with demand. We calculate a policy using the following approach, where the supplier is implicitly making an assumption that the demands are following an i.i.d. process, both in inter-arrival time and quantity (that is, assuming a 'traditional' model). 1. Calculate the mean and the variance of the non-zero demands observed. 2. Assuming normal distribution for the non-zero demands, calculate an order up-to using the newsboy formula and the given values for h and b. 3. Set z z 8j l for some value of l ? 0. Adjust the order up-to levels for finite capacity using the following rule: If an order up-to level in period l then set the order up-to level z 4. Simulate the system for various values of l and choose the value that gives the lowest cost. We believe that this is a reasonable 'straw' policy. Computational Results In this section we implement the solution procedures developed in earlier sections for all three models. Our goal is to understand the trade-offs between inventories, capacities and information. We vary h; b; \Delta and variance of end-item demand. Note that the customer policy structure and parameters are the same across all three models for any given set of cost, capacity and demand values. The experimental design is shown in Fig. 4. The values of b,\Delta and mean demand were held constant at 14, 50 and 20 respectively. The holding cost h was varied from 1 to 5 in increments of 1, while the capacity was varied from 25 to 65 in increments of 10. Three (Uniform, Erlang and Normal) distributions were used for the end item demand seen by the customer. For each distribution, three values of the parameters were chosen: Uniform[10,30], and Uniform[15,25]; Exponential(20), Erlang(10,2), and Erlang(5,4) (mean 20, standard deviation of 10); Normal(20,20), Normal(20,10), and Normal(20,5) where the first number is the mean and the second number is the standard deviation. It should be noted that while generating demands using the Normal distribution, the non-positive demands were discarded and so the non-truncated mean was selected so that the modified demands had a mean of 20. The standard deviations of the observed demands for these three cases were 13.5, 9.5 and 5 and these values were used while analyzing the results. An experiment is a combination of the holding cost, the capacity, the demand distribution and the model type. There were a total of 675 experiments in this computational setup. 5.1 Costs and Savings We observed that for all the models the total cost increased with increase in holding cost, decrease in capacity or increase in variance. These results are expected and so we will not elaborate on them here. We will look more closely at the savings realized due to information flow and their change due to changes in capacity, holding cost and variance. The percentage savings from Model 0 to Model 1 were estimated using the formula: cost Model The percentage savings from Model 1 to Model 2 were also calculated using a similar formula. We want to understand how these savings are affected by parameters such as capacity, the ratio of holding cost to penalty cost, the variance of the end-item demand (as seen by the customer) and \Delta. Notice that the cost for Model 2 was always smaller than the cost for Model 1 which in turn was smaller than the cost for Model 0. This would imply that information flow will always result in savings. This leads us to conclude that information is always beneficial. First, we study the percentage savings realized between Models 0 and 1: the benefits of some information. The graphs of these savings versus capacity, holding cost and standard deviation are given in Figures 5, 6 and 7. These savings vary from 3% to 17%. As shown in Figure 5: Plot of % savings comparing Model 0 to Model 1 versus capacity. Figure 5, the savings from Model 0 to Model 1 are highest when the capacity was 55; other experiments show that the information is most beneficial when the ratio C \Delta is around one. In Figures 6 and 7, these savings form a horizontal band of near constant width indicating that there is no significant pattern with respect to changes in holding cost and variance. We next study the percentage savings realized between Model 1 to Model 2: the benefits of increased (and full) information. The plots of these savings with respect to capacity, holding cost and variance are given in Figures 8, 9 and 10. These savings have a wide range, varying from 1% to 35%. In general, the savings realized between Models 1 and 2 are at least as large as the savings realized between Models 0 and 1. This would lead us to believe that more information results in continued large savings in our setting. Details of the savings due to changes in capacity, holding cost and variance between Model 1 and Model 2 are described below. 1. Effect of capacity. For every value of capacity and each demand distribution we averaged the percentage savings over all the holding costs. The results are presented in Fig. 8. It is easily noticed that as the capacity was increased, the percentage savings also increased. This would lead us to conclude that between Models 1 and 2, the benefit of information flow is higher at higher capacities. 2. Effect of penalty cost. Fig. 9 shows the information benefits as function of Holding Figure Plot of % savings comparing Model 0 to Model 1 versus holding cost.30% Standard Deviation Figure 7: Plot of % savings comparing Model 0 to Model 1 versus variance. Figure 8: Plot of % savings comparing Model 1 to Model 2 versus capacity. - Normal(20,5)30%BenefitPenalty Cost Figure 9: Plot of % savings comparing Model 1 to Model 2 versus penalty cost. Standard Deviation Figure 10: Plot of % savings from Model 1 to Model 2 versus variance. penalty cost. For small variances, the information value increases as the service level increases, while for medium to high variances, the benefits decrease. This is because, at higher variances, there remains significant uncertainty on the total demand quantity to the supplier (although the timing uncertainty may have reduced). In the extreme case when the end-item demand has an Exponential distribution, the excess over \Delta has the same distribution, independent of the state at the end of the previous period. So we conclude that if the variance of the demand seen by the customer is small (high), we can expect the benefit of information flow to increase (decrease) with increase in penalty cost. 3. Effect of end-item demand distribution and variance. Fig. 10 contains the plot of percentage savings versus standard deviation for each of the demand distri- butions. For the uniform distribution as the standard deviation was decreased from 11.55 to 5.78 to 2.89 the percentage savings decreased while for the Erlang distributions as the variance was decreased from 20 to 14.14 to 10 the percentage savings increased. For the normal distribution as the standard deviation was changed from 13.5 to 9.5 to 5.0 the percentage savings initially increased from 7.55% to 9.37% and then dropped to 7.37%. The plot seems to indicate a bell shaped relation between 200 250 300 Figure 11: Plot of % savings from Model 1 to Model 2 versus \Delta. variance and percentage savings 1 . This could be due to the fact that when the variance is very high, as in item 2 above, the uncertainty in quantity to the supplier is not reduced significantly. When the variance is very low the system almost acts like a deterministic system and the information is not really beneficial. Information is most beneficial at moderate values of variance. 4. Effect of \Delta. The percentage savings between models 1 and 2 as a function of \Delta are given in Fig. 11 for two distributions, exp(20) and erlang(5,4). For each distribution, we averaged the savings over four simulations For both the distributions, as the value of \Delta is increased these savings increase initially and then start to decrease. This behavior can be explained as follows. The value of \Delta determines the size of the order. Due to finite capacity, in anticipation of a large order we start building up inventory over a horizon which we call "production horizon". When \Delta is large (compared to capacity and mean end-item demand), the production horizon is so large that (1) holding costs accrue and (2) Central Limit Theorem applies reducing the coefficient of variation of quantity demanded. On the other hand, when small (relative to mean end-item only the right side of this bell curve in his uncapacitated model, as we would if we did not test Normal distributions but limited ourselves to the Erlang family. demand), the end-item demand is passed through to the supplier almost every period. So we conclude that information is less beneficial at extreme values of \Delta. 5.2 Inventory Levels The optimal order up-to levels for Model 1 in two situations, namely fexponential(20), are given in Figures 12 and 13. First consider the case of that these order up-to levels follow the pattern proved in Property 10 for 1. For the case of exp(20) and the optimal order up-to levels are zero for the two periods immediately following a demand. In period 3(=i ) the order up-to level jumps to 55 and from then on slowly climbs to 80. Similarly for the case the order up-to level is zero for the first period immediately following the demand. In period 2 it jumps to 63 and slowly climbs to 80 from there on. Next observe the optimal order up-to levels for other values of capacity for these two situations: the optimal order up-to levels do not change significantly with capacity for periods that had non-zero order up-to levels when the capacity was (periods 3 and above in Fig. 12, and Periods 2 and above in Fig. 13) or higher. The major changes occur, if at all, in periods immediately after the demand to facilitate reaching the required inventory level for period i . Using these observations we can draw the following two insights into how these systems can be managed. 1. Managing multiple customers. This property of order up-to levels can help manage multiple customers as follows. For example, in the case of exp(20), we know that if we have just seen the demand, we need not produce this product for another 2 periods. If there are other products in the system we can schedule this product 3 periods from now and use the first 2 periods for some other products. If there is another product already scheduled in period 3 we can compare the costs of these two products to come up with a schedule for them in periods 2, 3 or 4. This also suggests that if the same capacity is being shared by two or more products, it may be better to assign the total capacity in a period to one product thus treating the system as multiple large capacity channels and breaking ties among products myopically rather than pre-allocating capacities to products in every period thus creating many low capacity channels. A parallel paper studies this issue in greater detail. 2. Approximating order up-to levels in the finite capacity case without IPA. Solve a given finite capacity system as if it had infinite capacity to obtain the Order upto level Periods since last demand Figure 12: The optimal order up-to levels for exp(20), Model 1. Order upto level Periods since last demand Figure 13: The optimal order up-to levels for Model 1. order up-to levels fz i g particularly i and z i . To obtain the order up-to levels for finite capacity, set the order up-to levels for i and states above it for the capacitated case are same as the ones from the uncapacitated solution. For states below i define order up-to levelsfz c g in such a way so that the order up-to level in i can be reached under the capacity restriction by defining production levels as late as possible. That is z c 6 Conclusions In this paper, we have incorporated information flow into inventory control models. This gave rise to interesting non-stationary demand processes. Optimal policy structures are found to be order up-to policies. We have provided solution procedures to compute the optimal parameters. An extensive computational study provided us with insights on the savings and relative benefits due to information flow. Future work is in three directions: (1) extending this analysis with multiple customers; (2) studying inventory-information-capacity interactions in a supply chain with more than two stages; and (3) studying, at a theoretical level, more general demand processes 2 at the supplier, where the transition from one state to another follows a general probability matrix, of which the current non-stationary situations are special cases. We conjecture that if the transition probability matrix is totally positive of order 2 (TP 2 , see Karlin [15]), then the properties of order up-to levels presented in this paper still apply. A Monotonicity of Demands at the Supplier: Model 1 Assume that the end-customer sees an i.i.d demand process with pdf /() and cdf \Psi(). Let be the sequence of demands seen by the customer and D be the total demand in i periods. Then the customer places an order for D i in period i if D i \Delta and the probability that the customer places an order at the end of period i, is These probabilities represent the distribution of the first passage times of a jump process and from [16] we know that p i p i+1 . We thank Professor George Shanthikumar for this suggestion. Let \Psi n (\Delta) be the nth convolution of \Psi(\Delta) and clearly \Psi st \Psi n (\Delta). \Phi i (y) and can be expressed as If we assume that \Psi(\Delta) is a function with increasing failure rate (IFR), then [\Psi(y\Gammax)\Gamma\Psi(\Delta\Gammax)] is a decreasing function in x and thus \Phi i (y) \Phi i+1 (y) implying that \Phi i (\Delta) st \Phi i+1 (\Delta). --R "An Inventory Model with Commitments," "Analysis of Supply Contracts with Total Minimum Commitment," "The impact of supply chain integration on operating performance," "Bayes solutions to dynamic inventory models under unknown demand distributions," "Dynamic programming: Deterministic and stochastic models," "Echelon Reorder Points, Installation Reorder Points, and the Value of Centralized Demand Information," "An inventory model with limited production capacity and uncertain demands I : The average-cost criterion," "An inventory model with limited production capacity and uncertain demands II : The discounted-cost criterion," "The stability of a capacitated, multi-echelon production- inventory system under a base-stock policy," "Sensitivity analysis for base-stock levels in multi-echelon production-inventory systems," "Customer-order Information, Leadtimes, and Invento- ries," "The dynamic inventory problem with unknown demand distributions," "A capacitated production-inventory model with periodic demand," "Optimal policy for dynamic inventory process with stochastic demands subject to seasonal variations," "Total Positivity Vol. I," "Uniform Monotonicity of Markov Processes and its Related Properties," "Myopic policies for some inventory models with uncertain demand distributions," " The Optimality of (s; S) policies in the dynamic inventory problem," "Bayes solutions to the statistical inventory problem," " Electronic data interchange (EDI): an avenue to better performance and the improvement of trading relationships?," "Computing the optimal policy for capacitated inventory models," "A Queueing Model to Analyze the Value of Centralized Inventory Information," "Critical number polices for inventory models with periodic data," "Performance Analysis of a Multi-item Production-inventory System under Alternative Policies," --TR --CTR Srinagesh Gavirneni, Simulation based evaluation of information-centric supply chains, Proceedings of the 37th conference on Winter simulation, December 04-07, 2005, Orlando, Florida Wen-Yau Liang , Chun-Che Huang, Agent-based demand forecast in multi-echelon supply chain, Decision Support Systems, v.42 n.1, p.390-407, October 2006 Logan Huggins , Tava Lennon Olsen, Supply Chain Management with Guaranteed Delivery, Management Science, v.49 n.9, p.1154-1167, September Srinagesh Gavirneni, Information Flows in Capacitated Supply Chains with Fixed Ordering Costs, Management Science, v.48 n.5, p.644-651, May 2002 David Simchi-Levi , Yao Zhao, THE VALUE OF INFORMATION SHARING IN A TWO-STAGE SUPPLY CHAIN WITH PRODUCTION CAPACITY CONSTRAINTS: THE INFINITE HORIZON CASE, Probability in the Engineering and Informational Sciences, v.18 n.2, p.247-274, April 2004 Khalid S. Soliman , Brian D. Janz, An exploratory study to identify the critical factors affecting the decision to establish internet-based interorganizational information systems, Information and Management, v.41 n.6, p.697-706, July 2004 Jingquan Li , Riyaz Sikora , Michael J. Shaw , Gek Woo Tan, A strategic analysis of inter organizational information sharing, Decision Support Systems, v.42 n.1, p.251-266, October 2006 Yuliang Yao , Philip T. Evers , Martin E. Dresner, Supply chain integration in vendor-managed inventory, Decision Support Systems, v.43 n.2, p.663-674, March, 2007 Lode Li, Information Sharing in a Supply Chain with Horizontal Competition, Management Science, v.48 n.9, p.1196-1212, September 2002 Kamran Moinzadeh, A Multi-Echelon Inventory System with Information Exchange, Management Science, v.48 n.3, p.414-426, March 2002 Takamichi Hosoda , Stephen M. Disney, The governing dynamics of supply chains: The impact of altruistic behaviour, Automatica (Journal of IFAC), v.42 n.8, p.1301-1309, August, 2006 Toru Higuchi , Marvin D. Troutt, Dynamic simulation of the supply chain for a short life cycle product: lessons from the Tamagotchi case, Computers and Operations Research, v.31 n.7, p.1097-1114, June 2004 Yanfeng Ouyang , Carlos Daganzo, Characterization of the Bullwhip Effect in Linear, Time-Invariant Supply Chains: Some Formulae and Tests, Management Science, v.52 n.10, p.1544-1556, October 2006 John A. Buzacott , Rachel Q. Zhang, Inventory Management with Asset-Based Financing, Management Science, v.50 n.9, p.1274-1292, September 2004 Rathindra Sarathy , Krishnamurty Muralidhar, Secure and useful data sharing, Decision Support Systems, v.42 n.1, p.204-220, October 2006 Jayashankar M. Swaminathan , Sridhar R. Tayur, Models for Supply Chains in E-Business, Management Science, v.49 n.10, p.1387-1406, October
Infinitesimal Perturbation Analysis;Capacitated Production-Inventory Model;information sharing;S Policy;optimal policies
309690
Minimal Decomposition of Model-Based Invariants.
Model-based invariants are relations between model parameters and image measurements, which are independent of the imaging parameters. Such relations are true for all images of the model. Here we describe an algorithm which, given L independent model-based polynomial invariants describing some shape, will provide a linear re-parameterization of the invariants. This re-parameterization has the properties that: (i) it includes the minimal number of terms, and (ii) the shape terms are the same in all the model-based invariants. This final representation has 2 main applications: (1) it gives new representations of shape in terms of hyperplanes, which are convenient for object recognition&semi; (2) it allows the design of new linear shape from motion algorithms. In addition, we use this representation to identify object classes that have universal invariants.
Introduction An image provides us with relations between 3 different kind of parameters: image measurements, shape parameters, and imaging parameters (e.g., camera parameters). Here we restrict ourselves to the domain of multiple points in multiple frames, where the image measurements are 2D point co- ordinates, and the shape parameters are 3D point coordinates. There has been much interest in relations involving only image measurements and imaging parameters (e.g., the epipolar geometry and the essential matrix [8]). In this paper we are interested in the dual relations involving only shape measurements and imaging parame- ters, which are called model-based invariants. The analysis of invariants arose much interest in computer vision and pattern recognition. As we use the concept here, an invariant is a relation between the image measurements and the model (or shape) parameters. This relation does not depend on variables of the imaging process, such as the camera orientation (viewing position). There are 2 types of invariants: Model-free invariant: there exist image measurements which always identify the object, so that their value is completely determined by the object regardless of the details of the imaging process. This is usually called an invariant in the literature. Such invariant relations do not exist for 2D images of general 3D objects [1, 10]; for special classes of ob- 76 D. Weinshall jects, such as planar or symmetrical objects, invariant relations may be found [10, 12]. Model-based invariant: a relation which includes mixed terms, representing image measurements or model parameters. Model-based invariant relations exist for many interesting cases [16]. Typically, model-based invariants are complex polynomial relations between the known image measurements and the unknown shape parame- ters. In the external calibration literature, where the dual relations between camera parameters and image measurements are ordinarily used, it proved very useful to re-parameterize the original relations in a linear form; this turned the computation of camera parameters into a linear problem. Obviously the problem is linear in some new variables, that could be complex functions of the original camera parameters. Examples are the epipolar geometry with the essential matrix [8] or the fundamental bilinear matrix [9], the trilinear tensor [14, 5], and the quadrilinear tensor [15, 18, 4]. In the context of model-based invariants, this lead us to the following questions: Given a model-based invariant, how do we nd its \optimal" (or most compact) linear re-parameterization? in other words, how do we rewrite it with the minimal number of terms, that truly re ect the number of degrees of freedom of the system? Given L model-based invariants, what is the simultaneous minimal linear decomposition of these relations? By simultaneous we specically mean that the shape terms are the same in all relations. The reason we seek such simultaneous decomposition of model-based invariants is that when the shape terms are the same, all relations can be used simultaneously in applications such as direct shape reconstruction. Our attempt to answer these questions was motivated by two applications: one is object recog- nition, the other is 3D reconstruction: If shape is reconstructed from images for the sole purpose of recognition, the parametric representation of the shape in the model-based invariants captures all the relevant information on the shape. Our algorithm produces a set of L linear relations with a minimal number of terms (these are the equation's un- knowns), say n. We would now need at least e frames to compute shape. This automatically gives us new linear shape reconstruction algorithms, which are likely to be more robust than other linear algorithms. Often the shape (or depth) can be computed directly from the reconstructed models, as will be shown in the examples below. Clearly, for the initial indexing step in object recognition, model-based invariants are most suitable (imaging parameters may be computed and used later during the verication step). More specically, a model-based invariant represents a relation between image measurements and shape parameters that is true in all images of the model. The database which includes these models may be thought of as a big multi-dimensional table, where an object corresponds to the manifold dened by its model-based invariant, and individual images are points on (or pointers into) these manifolds. In such a framework indexing is quick (but the representation is very space in- e-cient). Our algorithm provides an automatic tool to compute low dimensional linear representations of the model-based invariants; when used, these representations simplify the complexity of the recognition process by reducing the indexing complexity. In other words, the representation of objects is made simpler because simple manifolds - hyperplanes - are stored; recognition is made easier because an image provides a pointer - a point which should lie on the hyperplane representing the object depicted in the image. One other application motivated our work: model-based invariants have a special meaning when the number of linear terms is no larger than 2. In this case it is possible to separate the shape dependency from the dependency on image measurements, and get a model-free invariant - a \true" invariant. Such invariant relations do not normally exist [1, 10] unless the class of objects is restricted [10, 12]. Our theory allows us to iden- Minimal decomposition of model-based invariants 77 tify the kind of class constraints that can be used to reduce the number of linear terms, so that a model-based invariant becomes a model-free invariant In this paper we assume that a set of L model-based invariants, which describe the images of some set of objects, is initially given. In Section 3 we describe an algorithm which produces a linear re-parameterization of the invariants, with minimal number of terms. In Section 4 we generalize this algorithm to produces a linear re-parameterization of the L invariants simultane- ously, such that at the end the shape terms are the same in all the re-parameterized model-based invariants. Jacobs [3, 6] studied the complexity of invariants and model-based invariants in their raw form. In [6] he showed that for 6 points in a single perspective image, there exists a nonlinear model-based invariant with 5 unknowns. We obtained a linear re-parameterization with 5 terms, thus the linear representation is no more complex than the nonlinear one in this example. In ECCV '96 [19] we reported a follow up of the basic technique described in Section 3: we united two approaches, the elimination discussed in [18] and the linear re-parameterization of one relation described in Section 3, to accomplish an automatic process that optimizes indexing given a general vision problem. 2. Model-based invariants for n projective points in 1 image To demonstrate the procedures described in Sections 3,4 we will work out 2 examples in detail, where the model is of 6 or 7 points and the projection model is perspective. We start by using homogeneous coordinates to represent the 3D co-ordinates of the points; thus the representation of the i-th point is Since we are working in P 3 , 5 points dene a ba- sis; we select the rst 5 points to be a certain projective basis, leading to the following representation of the 3D shape of the points: Similarly we use homogeneous coordinates to represent the projected 2D coordinates of the points; thus the representation of the i-th image point is Since we are working in P 2 , 4 points dene a basis; we select the rst 4 points to be the projective basis, leading to the following representation of the image of the points: c 2A Given any image of the points, we can always compute the 2D projective transformation which will transform the points to the representation given above. In [2] we showed how to compute model-based invariants in such cases. In this section we review these relations for the special cases of 6 projective points and 7 projective points. Note that the model-based invariants listed below have many terms. Clearly these expressions are of little value for linear reconstruction and indexing unless we can re-parameterize them in a \simpler" way. 2.1. Model-based invariants for 6 projective points The model-based invariants in this case are obtained from the observation that the following matrix has rank 3 [2, 4], and thus its determinant should be 0:6 6 6 6 6 4 This gives the following constraint (see derivation in [2, 17], cf. with [11]): 78 D. Weinshall a a a 2.2. Model-based invariants for 7 projective points The model-based invariants in this case are obtained from the observation that the following matrix has rank 3 [2, 4], and thus each of its 15 4 4 minors should vanish:6 6 6 6 6 6 6 6 6 6 6 4 In [2] we show that there are only 4 algebraic independent constraints which involve all 7 projective points, one of them is the following (the other 3 look similar): a 1 a a 3. Minimal linear invariant: one relation Let S denote the set of parameters describing the object shape. Let D denote the data - a set of image measurements. Let I = ff l (S; 0g L l=1 denote the set of independent model-based invariants; we assume that each model-based invariant is polynomial. We start with the simple case where I includes a single We seek a decomposition of f() in the following compact way, explicitly separating image variables D from shape variables S: r k and h k are polynomial functions of the shape S and the image D respectively. We call (1) the canonical representation of f(S; D). Note that if f(S; D) is algebraic, as we assume here, such a decomposition always exists. In the simplest case where would become: Thus if 2, the model-based invariant is really a model-free (a \true") invariant. 3.1. Algorithm The algebraic expression f(S; be written as a sum of multiplications since f() is polynomial; we start by arbitrarily choosing one Minimal decomposition of model-based invariants 79 such representation for f(S; D): are constants, s i and d j are distinct products of element of S and D respectively, and Q is the n m matrix whose elements are q ij . Denition 1. Q is the complexity-matrix of the relation f(S; Theorem 1. The minimal linear decomposition r k (S) h k (D) has r terms, where r is equal to the rank of the complexity- matrix Q. Proof: The theorem follows from (2), the fact that elementary operations on the rows and columns of a matrix are algebraic operations, and because the rank of a matrix is the minimal number of outer products of vectors that sum to the matrix. Note, however, that this representation obtains the minimal number of terms in a limited context, where a term can only be a linear combination of s i 's or d j 's. Algorithm to compute the minimal linear model-based invariant: 1. Compute the SVD (or similar) decomposition of the rank of Q is equal to the number of non-0 elements in the diagonal matrix . 2. By construction r where Although the rank of Q is unique, the decomposition above is not; other expressions can all be derived using the same SVD decomposition. For example, we can decompose the complexity matrix Q as where H denotes any regular r r matrix. Now and h 0 H . Thus there are essentially independent decompositions of type (1). 3.2. Example: 6 projective points We use the notations of Section 2 and the deni- tions above, where: denotes the set of 4 shape variables X 1 , Y 1 , the 3D projective coordinates of the 6th point. D denotes the set of 6 image variables a 0 , b 0 , these are the image measurements - the projective image coordinates of the points. In this case we get the following model-based invariant (see Section 2.1): a 0 a 1 Z 1 In order to represent f(S; D) as a sum of multiplications as required in (2), we observe the following 1. There are 10 shape monomials s i , thus and 2. There are 9 image monomials d j , thus and D. Weinshall 3. The complexity matrix Q is 10 9, where Q[i; j] is the coe-cient of s i d j in the expression above. For example, from the rst term in the expression above Q[6; We use Gaussian elimination to decompose Q as Many matrices U satisfy these conditions, and we choose a relatively \simple" one: Since the rank of Q is 5, we can rewrite the model-based invariant f(S; D) as follows: where (3), (5) give and (4), (5) give 4. Minimal linear invariant: multiple relation Let S, D and I = ff l (S; l=1 as in Section 3. We now consider the general case where I includes L > 1 relations. We look for a simultaneous decomposition of the L relations, such that they have a minimal number of terms, and the shape terms are identical in all the relations. More specically, we look for a simultaneous decomposition f l (S; r where g k and h l are polynomial functions of the shape S and the image D respectively. Note that k (S), the shape terms, do not depend on the index l - this is what we mean by simultaneous decomposition of the L relations. 4.1. Algorithm We start by writing each algebraic expression f l (S; as a sum of multiplications: f l (S; D) q l where s i and d j are distinct products of element of S and D respectively, l is the nm matrix whose elements are q l ij . From Def. 1, Q l is the complexity- matrix of the relation f l (S; Minimal decomposition of model-based invariants 81 Denition 2. Q, the matrix obtained by concatenating the L matrices Q l from left to right, is the joint complexity-matrix of I. Note that the size of Q is nLm. Note also the asymmetrical role of rows and columns here: the row variables are shape variables, and thus should be the same for all invariants; the column variables are data variables, and thus can (and should) vary for dierent invariants. Theorem 2. The minimal simultaneous linear decomposition f l (S; r k (S) h k (D) has r terms, where r is equal to the rank of the joint complexity-matrix Q. The proof is similar to the proof of theorem 1, with the same restriction: the number of terms is minimal in a limited context, where a term can only be a linear combination of s i 's or d j 's. We can now derive the following algorithm to compute the minimal simultaneous linear decomposition of model-based invariants: 1. Compute the SVD (or similar) decomposition of the joint complexity matrix 2. For each invariant, nd a decomposition Q below we specically use (V l denotes the pseudo-inverse of (U). 3. By construction f l (S; r where 4.2. Example: 7 projective points We use the notations of Section 2 and the deni- tions of Section 3, where: denotes the set of 8 shape variables X 1 , Y 1 , the 3D projective coordinates of the 6th and 7th points. D denotes the set of 9 image variables a 0 , b 0 , these are the image measurements - the projective image coordinates of the points. In this case we have 4 independent model-based invariants (see derivation in Section 2.2); one is given below, the other 3 look similar and are therefore omitted. a a a a a In order to represent D) as a sum of multiplications as in (2), we observe the following: 1. There are 16 shape monomials s i , thus and 2. There are 27 image monomials d j , thus a D. Weinshall 3. The complexity matrix Q 1 is is the coe-cient of s i d j in the expression above. example, contains the coe-cient of a 0 a 1 a 2 X 1 X 2 from the expression above, which happens to be -1. Thus we get the following full description of Q Similarly, we rewrite f 2 (S; D), f 3 (S; D), and f 4 (S; D), to construct Q 2 , Q 3 and Q 4 in a similar way. The joint complexity matrix Q is constructed by concatenating its size is The rank of Q is computed to be 11. Using Gaussian elimination, we compute a decomposition 108 11. Many matrices U satisfy these condi- tions, and we choose the following relatively \sim- ple" one: U is used to obtain the individual decompositions Finally, we rewrite the model-based invariants f l (S; D), l = 1::4. For example, take f 1 (S; D): where and (10), (11), (12) give a 2 a a 2 a Minimal decomposition of model-based invariants 83 a 2 a 5. Adding class constraints Once it has been shown that model-free invariants do not exist for unconstrained objects [1, 10], attention had turned to characterizing the constraints (or classes of objects) which would lead to model-free invariants [10, 12]. The present analysis allows us to ask this question as part of a more general problem: what class constraints on objects reduce the number of terms in the minimal linear decomposition? In this section we determine sucient conditions on class constraints to reduce the number of terms, in particular to reduce it to 2 (implying the existence of model-free invariants). We start from a relation r are polynomial functions of the shape and image measurements respec- tively. Every class constraint of the form 0, where (S) divides some reduces the number of terms in the minimal decomposition by at least 1. Thus: Theorem 3. (class constraints:) To reduce the minimal number of terms from r to p < r, the class constraints should provide at most (r p) independent constraints of the form i where each i (S) divides some modulo the Clearly there is a tradeo between complexity (the number of terms), which is higher for more general (and less constrained) classes, and the density of the database, which is smaller for more general classes (as there are fewer types of such general objects). Example: given 6 points and a perspective From the minimal model-based invariant developed in Section 3.2, and the theorem above, it immediately follows that if any of the parameters of the 6th point, parameters of the 6th point are equal, then 3. Thus if 4 of the 6 points are coplanar, the number of terms in the minimal model-based invariant is 3. If 2 pairs of the 4 parameters are equal then namely, there is a model-free invariant. The geometry of this case is as follows: one point lies on the line of intersection of 2 of the planes, each spanned by triplets of the remaining 5 points. 6. Reconstruction example: lab sequence We use a real sequence of images from the 1991 motion workshop, which includes 16 images of a robotic laboratory obtained by rotating a robot arm 120 (one frame is shown in Fig. 1). like points were tracked. The depth values of the points in the rst frame ranged from 13 to 33 feet; moreover, a wide-lens camera was used, causing distortions at the periphery which were not compensated for. (See a more detailed description in [13] Fig. 4, or [7] Fig. 3.) We compute the shape of the tracked points as follows. We rst choose an arbitrary basis of 5 points; for each additional point we: 1. compute g(S) as dene in (7), using all the available frames to solve an over-determined linear system of equations, where each frame provides the constraint given in (6). 2. compute the homogeneous coordinates of the 6th point [ ~ W ] from g(S) using ~ ~ ~ 3. in order to compare the results with the real 3D shape of the points, we multiply the projective homogeneous coordinates by the actual 84 D. Weinshall 9 101214161820 Fig. 1. One frame from the lab sequence. 3D coordinates of the projective basis points, to obtain the equivalent Euclidean representation The real 3D coordinates of about half the points in the sequence, and the corresponding reconstructed 3D coordinates, are the following: real shape:6 6 4 0:3 1:7 0:3 1:8 5:3 9:9 3:2 4 2:6 4:4 6:3 4:2 1:6 2:8 2:3 1:5 0:6 0:5 1:5 0:5 reconstructed shape:6 6 4 0:3 1:8 0:6 0:9 3:8 8:9 0:8 3:6 1:3 5 6:2 4:4 1:5 0:7 2:4 0:7 0:6 0:3 1:3 0:4 1:3 4:8 2:6 1:8 0:4 0:7 The median relative error, where the relative error is the error at each point divided by the distance of the point from the origin, is 12%. 7. Summary We described an automatic process to simplify model-based invariants by re-parameterizing them in a linear way, and with a minimal number of terms. We demonstrated this process on 2 ex- amples, using model-based invariants of 6 and 7 points under perspective projection. Thus, for ex- ample, we obtained 4 homogeneous linear equations with 11 unknowns using the invariants of 7 points. We can use these invariants to compute the shape of the 7 points with a linear algorithm, using at least 3 frames and least squares optimization (since the data is redundant). Acknowledgements This research was supported by the Israeli Ministry of Science under Grant 032.7568. Vision research at the Hebrew University is supported by the U.S. O-ce of Naval Research under Grant N00014-93-1-1202, R&T Project Code 4424341| 01. --R View variation of point-set and line segment features Duality of reconstruction and positioning from projective views. Space and time bounds on indexing 3-D models from 2-D images On the geometry and algebra of the point and line correspondences between N images. Lines and points in three views - an integrated approach Matching 3-D models to 2-D images Sensitivity of the pose re A computer algorithm for reconstructing a scene from two projections. The fundamental ma- trix: theory Limitations of non model-based recognition schemes Invariants of 6 points from 3 uncalibrated images. Extracting projective structure from single perspective views of 3d point sets. Description and reconstruction from image trajectories of rotational motion. Trilinearity in visual recognition by align- ment The geometry of projective reconstruction I: matching constraints and the joint image. Shape tensors for e-cient and learnable indexing Elimination: An approach to the study of 3D-from-2D Complexity of index- ing: E-cient and learnable large database indexing --TR --CTR Vincenzo Caglioti, Minimal Representations of 3D Models in Terms of Image Parameters under Calibrated and Uncalibrated Perspective, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.26 n.9, p.1234-1238, September 2004
model-based invariants;universal invariants;projective reconstruction
310631
An Experimental Study of Projective Structure From Motion.
AbstractWe describe an essentially algorithm-independent experimental comparison of projective versus Euclidean reconstruction. The Euclidean approach is as accurate as the projective one, even with significant calibration error and for the pure projective structure. Projective optimization has less of a local-minima problem than its Euclidean equivalent. We describe techniques that enhance the convergence of optimization algorithms.
Introduction The projective approach to structure from motion (SFM) was introduced originally to avoid the difficulty of calibrating cameras precisely [1, 2]. Whereas standard Euclidean SFM reconstructs a Euclidean 3D model of the scene assuming a known camera calibration, projective SFM reconstructs the projective structure without prior (linear) calibration. Projective SFM is often thought of as unphysical, but when it is applied to real motion sequences it has a perfectly physical interpretation: it is equivalent to Euclidean SFM except that the linear camera calibration is treated as unknown and potentially arbitrarily different in each image 1 . But is the difficulty of accurate calibration sufficient motivation for projective SFM? The projective approach's assumption of complete ignorance of the calibration is unrealistic-usually some information is available. For instance: 1) the x and y image axes are almost always close to perpendicu- lar; 2) we often have approximate calibration information-this can be useful since errors in some parameters (e.g., the image center) are known to have little effect on depth recovery; and especially 3) we often know that a mo- 1 In the projective framework, the image point position is determined by I = MS, where I is a homogeneous 3-vector representing the image, M is the 3 \Theta 4 camera matrix, and S is a homogeneous 4-vector representing the structure. Projective SFM is equivalent to Euclidean SFM with unknown linear calibration (apart from singular cases) in the sense that we can interpret S as a standard Euclidean structure and M as the product of motion and linear calibration matrices. non-singular M has a unique decomposition into such a product.) tion sequence was taken with a single camera, implying that all images have approximately the same calibration 2 . The projective approach is also unrealistic in that it allows for arbitrary linear calibration errors but neglects the potentially significant nonlinear camera distortions. The consequence of these unrealistic assumptions is a loss in accuracy- for the best reconstruction accuracy all available information must be used, including approximate information. This is true even for the projective structure. If the calibration is partly known or known to be fixed, Euclidean reconstruction of the projective structure using this knowledge is more accurate than projective reconstruction. For non-optimal algorithms, this loss in accuracy can translate effectively into a loss in robustness. Thus the difficulty of precise calibration should not rule out Euclidean techniques. An additional motivation sometimes suggested for the projective frame-work is that it yields new reconstruction algorithms. But projective SFM is formally mathematically equivalent to Euclidean SFM with known calibration if the constraints on the rotation matrix are relaxed. The projective approach models the formation of an image of N 3D points by I = MS; where M is a 3 \Theta 4 camera matrix and S a 4 \Theta N structure matrix. The columns of the structure matrix S give the homogeneous coordinates of the 3D points, and the camera matrix M summarizes the camera rotation, translation, and possibly for focal length variations, which are easy to handle in a purely Euclidean framework [9]. linear calibration parameters for the given image. In standard Euclidean SFM, image formation can be modeled in exactly the same way; only the interpretation of the camera matrix M differs. Now the first 3 columns of the M give the rotation matrix, and the last column holds the translation. Thus the two approaches are equivalent if the Euclidean rotation matrix is allowed to be arbitrary rather than restricted to being orthogonal. Neglecting the rotation matrix constraints was already a standard technique for Euclidean algorithms, for instance, in the "8-point" computation of the essential matrix [6] or Tomasi and Kanade's approach to orthographic SFM [14]. Though the rotation constraints must be restored eventually in the Euclidean approach, there are standard techniques for doing this, e.g., [2] or [14]. Thus any "projective" algorithm translates immediately into a Euclidean one followed by othogonalization of the rotation matrix; the projective framework does not create the possibility of new algorithms. In this paper, we study experimentally whether projective methods are useful in the traditional SFM context: motion sequences obtained with a single camera. Our results are effectively algorithm independent. This is important because current algorithms are far from ideal. Our aim is to focus not on the properties of imperfect algorithms, but rather on an intrinsic comparison of projective vs. Euclidean reconstruction. Unsurprisingly, we find that Euclidean SFM assuming a single camera of unknown calibration recovers the projective structure more accurately than does projective SFM. But Euclidean SFM based on an assumed calibration gives reconstruction accuracies comparable to those of projective SFM, even when there are signficant errors in the assumed calibration and even for the projective structure. Thus inaccurate knowledge of the calibration is not a compelling motivation for projective SFM. We also study the effects of calibration errors on Euclidean estimation. A second purpose of our experiments is to study the optimization approach for SFM-to date the only approach that has been shown to give robust projective reconstruction. We focus particularly on the local-minimum problem, studying how reliably optimization avoids local minima and converges to the true global minimum from general starting conditions. We also describe techniques that improve the reliability and speed of optimization. One of the important results of this paper is that the local-minimum problem appears less severe for "projective" SFM than for Euclidean SFM. We find that optimization converges more stably to the global minimum in the "projective" case than in the Euclidean case. This may be due to the fact that the extra, artificial unknowns introduced in projective SFM give high dimensional "escape routes" from the local valleys of the Euclidean error function. This phenomenon has also been observed in other contexts. For instance, it is known that introducing more hidden variables in neural nets improves generalization [7], i.e., it eliminates false local minima. The result also may also be due to the fact that the Euclidean approach involves nonlinear constraints on the rotation matrices. These complicate the error function and can create additional local minima. The "8-point" algorithm [6] is a good analogy. As a result of relaxing the rotation constraints, this "projective" algorithm in effect is minimizing a quadratic error function with a single minimum: there is no local-minimum problem. (But relaxing the constraints does exact a cost in accuracy.) As we emphasize above by our use of quotes, this result does not imply that the projective framework is more robust than the Euclidean one. Since the projective and Euclidean frameworks are formally equivalent (neglecting the Euclidean rotation constraints), one can also think of "projective" optimization as the first, approximate stage of a Euclidean algorithm. (Such a Euclidean algorithm would recover the motion directly from the recovered camera matrices M assuming known calibration, unlike the standard projective approach which computes the calibrations as well as the motions from the M .) Thus we can equally well restate our result as: neglecting the orthogonality constraints on the rotation matrices increases the robustness of Euclidean optimization. This paper also presents techniques which appear crucial for enhancing the speed and reliability of optimization convergence. We find that it is particularly important to exploit the compactness of projective space, even for Euclidean reconstruction. We also analyze the problem of determining a stable basis set of 5 points for projective reconstruction 3 . Formulation and Issues We consider motion sequences taken with a single, possibly incorrectly calibrated camera moving in a fixed scene, with known correspondences. We focus on the problem of estimating structure, comparing the results for a maximum likelihood estimate (MLE) in the Euclidean and the projective frameworks. As far as possible, we factor out algorithm-dependent effects in computing the MLEs. Of course the MLE is not necessarily the "opti- mal" estimate. But for a severly overconstrained estimation problem like multi-frame SFM, it should give results close to those of other "optimal" estimators. represent the 3D coordinates of the i-th structure point in the reference frame of the first camera position. R h and T h represent the rotation and translation from this frame to the camera frame of the h-th image. In our synthetic experiments, the image points are generated by transforming 3 Our experiments use both this method and Hartley's method of fixing one of the camera matrices. In fact, it is well known in the photogrammetry literature that fixing no parameters can actually improve convergence in optimization. to the frame of the current camera, projecting onto the ideal image plane (characterized by -z \Delta X =1), applying a 5 parameter affine transform in the image plane to represent the effects of the calibration parameters, and then adding noise. be the result of transforming the X i to the camera reference frame for the h-th image. The projection onto the ideal image plane is The shifted image coordinates are given by x h where Here ffif represents the deviation of the focal length from 1, r the discrepancy in scaling between the horizontal and vertical axes, S the shear distortion, and C the shift in the camera center. We take the shear is typically small for real images. The observed image coordinates u are generated by adding noise: u h is a random noise. Euclidean SFM. Compute the structure X i and motion R h ; T h minimizing the least-squares error R h where the subscript g denotes the fixed, ground-truth value. Here we neglect the possibility of calibration error, i.e, A g 0, where 1 2 is a two-dimensional identity matrix. The reconstruction is ambiguous up to a similarity transform X i homogeneous structure coordinates: H T where we take - 4 constant over all points. Let M h be a 3 \Theta 4 camera matrix combining the camera calibration parameters with the motion parameters for the h-th image. Define the 3D homogeneous image coordinates by to an arbitrary scaling. Projective SFM. Compute the camera matrices M h and structure H i min- imizing The reconstruction is ambiguous up to a full projective transform H i where P is a 4 \Theta 4 matrix. It is sometimes stated that the maximum likelihood error function is not well defined for projective reconstruction, since imposing a Euclidean metric in the image plane seems inconsistent with abandoning it for the structure. But, as noted in the introduction, projective SFM has a straightforward Euclidean interpretation, for which (1) is the correct error. Fixed-Camera Reconstruction. Compute the structure X i motion R h , calibration parameters A; C minimizing Here we assume the sequence was taken with a single camera of unknown calibration; the problem is to recover the calibration as well as to reconstruct the scene. 3 Experimental Methods Our goal is an algorithm-independent comparison of projective vs. Euclidean SFM. Since precise ground truth is needed to compare reconstruction ac- curacies, and since we focus on numerical properties, our experiments are primarily synthetic. We use a large number of synthetic sequences for both random and smooth motions. For each sequence, we wish to determine the true MLEs for the projective and Euclidean structures. The only known way to accomplish this is via brute-force minimization using a form of steepest descent. We used the well known Levenberg-Marquardt (LM) algorithm [4]. We use LM partly because it is available as a MATLAB routine and partly because it is a conservative algorithm, likely to converge to a local minimum near the starting estimate- the ground truth, in most of our experiments. Like all such algorithms, LM can converge to incorrect local minima. We start our algorithms at the ground truth to avoid these incorrect minima. For our multi-frame sequences, the overredundant information in the images should constrain the MLE to be near the ground truth; starting the descent from the ground truth should usually locate this nearby global minimum. In many cases, we explicitly checked that the minimum found starting from the ground truth was also obtained starting from other initial guesses. Typically, we find convergence to the same reconstruction near the ground truth from a large domain of initial guesses. There is no guarantee that LM will find the true global minimum. But we are mainly concerned with setting lower bounds on the accuracy of projective reconstruction. Given the stability with which LM converges to a single minimum when started near the ground truth, there is probably no global minimum significantly closer to the ground truth. We conducted several tests to confirm the correctness of our LM algo- rithms. Our algorithms were based on the LM implementation in MATLAB, modified in some versions following Hartley [4]. We checked that algorithms written separately by the two authors gave the same reconstructions. We also checked that the reconstructions generated by the algorithms had the correct invariances. The Euclidean algorithm computes the structure in the reference frame of the initial image. For this image we fixed (where 1 3 is the identity matrix), remove the scale ambiguity) maintained the z (or other homogeneous) coordinate of one of the 3D points at a fixed value during minimization 4 . We computed reconstructions using different base images and checked that the reconstructions were Euclidean similarity transforms of each other; this was true to about 1 part in 10 5;6 . Projective SFM determines the reconstruction up to a projective trans- form. To eliminate this ambiguity, in some of our experiments we fixed the coordinates of 5 3D points at their ground truth values during the minimization 5 . We also used Hartley's method of fixing one of the camera matrices, which removes only part of the ambiguity. These methods were compared and for stable 5-point bases gave identical results. To check projective invariance, we computed reconstructions for a fixed 5-point basis but with its ground truth specified in different image coordinate systems. We found that as required the reconstructions were Euclidean transforms of each other, again to 1 part in 10 5;6 . We also reconstructed using different 5-point bases and confirmed that the different reconstruc- 4 The coordinate chosen as fixed was varied during minimization, see below. 5 We could use the 5-point technique for most of our experiments since the ground truth was known, and it was possible to select a stable 5-point basis. We did mainly use Hartley's method for our stability experiments, since here we are simulating the realistic case where the ground truth is unknown. tions were projectively equivalent 6 (for bases which gave numerically stable minimization). 3.1 Techniques for LM Minimization A number of techniques significantly improved the convergence speed and reliability of our LM algorithms. The improvement in reliability was particularly important for poor starting guesses. Some plausibly useful techniques did not improve our results. Hartley has described a method for improving the speed and numerical stability of the LM algorithm [4]. We implemented this technique, but for our experiments it did not offer significant speed advantages. Though it is crucial for minimizing over large numbers of unknowns, for the relatively few (20-30) feature points used in our experiments its significant overhead prevented any substantial speedup. Since computing the structure given the motion is easy, we explored a two-stage technique where the basic minimization was only over the motion variables 7 . This technique did not converge more quickly than minimizing in all variables simultaneously. 6 They are no longer Euclidean equivalent due to noise. 7 The objective function was computed on-line as a function of the motion variables only by minimizing over the structure variables. This differs from the standard method (e.g., [13]) that alternates structure and motion minimizations. It might be expected to be more stable, since in the alternating method the structure and motion minimizations may act at cross purposes. A simple technique which did give important improvements was to scale the structure and translations so that the translations were of order 1. This sets all 4 homogeneous coordinates of a point to roughly the same scale. For projective SFM, it also ensures that all components of the camera matrices are about the same scale. This is essentially a standard technique for improving numerical conditioning [3, 12]. A second important technique exploits the compactness of projective space by changing the coordinates during minimization. It is impossible to parameterize projective space by one nonsingular set of coordinates. If only one coordinate system is used throughout the minimization (e.g., the Euclidean structure coordinates), then the coordinates may go off to infinity during minimization, preventing convergence to the correct minimum and leading to long computation times. We avoid this problem by changing the coordinate system during mini- mization. In projective reconstruction, for each 3D point and camera matrix, we fixed the largest components of the homogeneous parameterizations during the minimization. This change enhanced the reliability of convergence and produced significant speedups. Note that using the homogeneous structure coordinates and the coordinate- switching strategy is crucial also for Euclidean SFM. With homogenous structure coordinates, we eliminate the usual difficulty that small image changes lead to infinite or negative depths. Again, the coordinate-switching strategy compacts the search space: only a finite region need be searched to determine the correct structure. The techniques described above significantly improved the convergence of LM for both the Euclidean and projective cases. 3.2 Representations of the Projective Structure To compare the projective structure computed by Euclidean and projective methods ' , we need a well-defined comparison metric. Starting from an estimate of the homogeneous coordinates of the 3D points, we compute the projective transform that minimizes the least-squares Euclidean error between the transformed estimate and the Euclidean ground truth. Our measure of goodness for the projective structure is just the minimum value of this error: the projective minimum least-squares error (PMLSE) 8 . It is the smallest possible Euclidean structure error given the recovered projective structure. After transforming, the Euclidean structure coordinates give a redundant but noise-insensitive representation of the projective structure. Apart from intrinsic instabilities 8 , small changes in the image coordinates lead to small changes in the transformed coordinates. We will refer to these transformed Euclidean coordinates as the best Euclidean representation of the pro- 8 If some of the 3D points are very distant, then the reconstructions of these points can have large errors, and it may be more appropriate to use a robust error measure. jective structure. To eliminate the ambiguity under projective transformations during min- imization, we must fix the projective representation 3 . Because the best Euclidean representation is stable, minimizing in it would avoid numerical inac- curacy. But there is no easy way to avoid this representation's redundancy. Thus we use a more computationally convenient 5-point basis for minimiza- tion, fixing the 5 points at their ground truth values. For stability, we look for a 5-point basis that gives a representation of the projective structure that is "close" to the best Euclidean representation. The stability of the best Euclidean representation implies that the deviation of any 3D point from its ground-truth value should be small during the minimization (since minimization starts at the ground truth). The transformation from this representation to that of a 5-point basis is given by transforming the slightly perturbed coordinates of the selected 5 points back to their ground truth values. We can ensure that this transformation is small by selecting the 5 points so that any transformation between these points and slight perturbations of them is small. Thus for a given potential basis set of 5 points, we consider the projective transform taking this set to 5 other points as a function of the 15 coordinates of these other points. We compute the derivatives of the transform with respect to these 15 coordinates evaluated at the original set of 5 points. The sum of the squares of these derivatives is our goodness measure for the basis. When it is small, the basis should inherit the stability of the best Euclidean representation. We calculate the measure as follows. Let the basis set be x a y a z a - 4 where 5. The fourth component - 4 is a constant (set to the average scale of the structure), and the other components correspond to the Euclidean ground truth. The perturbation of this set is a a z 0 a The projective transform P from the basis set to the perturbed set satisfies a a x a y a z a for 5. The 15 constraints on the 15 degrees of freedom of P can be written in the form AP =0, where A is a 15 \Theta 16 matrix, and P is a vector consisting of the elements of P rearranged. It is convenient to choose When the perturbed set equals the original basis set, P is the 4 \Theta 4 unit we denote the vector corresponding to the matrix A as A 0 . Generically, A 0 has just one zero singular value. We may assume this since otherwise the basis set will not be stable. When the perturbed set differs from the original, writing A j A 0 we have 0 is the pseudo-inverse of A 0 . To define ffiP precisely up to scale we require that ffiP \Delta which follows automatically from the use of the pseudo-inverse. For the derivatives with respect to r 0 a a a a One can verify that with the choice of P in (3), the matrix @A=@r 0 is nonvanishing only for its last four columns. Since the only nonzero element from the last 4 in P 0 is P need consider only the last column of . This is given by @A is a column vector with a 1 in the position corresponding to a; i and zeros elsewhere. Then the sum of the norm squared of all derivatives is A \Gamma1T A \Gamma1T The is our goodness measure. It is small when the basis set of 5 points is stable. This goodness measure may be generally useful. We have verified experimentally that, as might be expected, a set of 5 points which is stable by this measure is strongly "generic," in the sense that no subset of 4 points from among the 5 lies close to a plane, and no subset of 3 lies close to a line. The advantage of this measure over a measure based on coplanarity or colinearity is that its value has a well-defined meaning so that thresholds can be meaningfully defined. 4 Experiments In our sequences the number of scene points N p varied from 15 to 30 and the number of images N i from 3 to 10. The 3D points were chosen uniformly in a volume \Gamma15 - x; y - 15; \Gamma30 - z - 30. The initial distance (Z in the Table) of the camera from the center of this volume was 60 in most experiments but was 90 in experiment 5. For one motion scenario, we chose the camera positions randomly and uniformly in a cubic volume centered on the first camera position with side varied from 2 to 8 for different sequences. The camera rotations were also random 9 . For each motion, we chose a vector 9 The rotations should have a small effect on the MLE [8]. The effective FOV was less than our experiments. uniformly with \Gammaw Given this vector, the rotation from the first image was obtained by rotating about the axis w by an angle of jwj radians. The rotations varied up to about 20 ffi . To generate the images, we projected the ground points onto an image plane assuming focal length one. We added Gaussian or uniform image noise with (corresponding to 1 pixel noise assuming a 512 \Theta 512 image). Finally, the images were shifted by an affine transform to simulate calibration error, as described previously. The center offset C was a randomly chosen vector of size :12 (about pixels). The focal length error ffif was \Sigma:1, and the relative scaling factor r for the x and y axes was \Sigma:05 or 0. We also used a smoother and perhaps more realistic motion. We simulated a smooth motion with up to third-order derivatives with respect to the frame index, allowing for accelerations and jerks. The parameters for the motion were chosen from a random distribution such that the motion was confined within a volume specified by \GammaT and the maximum rotation was less than about 20 ffi . The results for the projective errors are shown in figures 1-3. The parameters for these experiments are shown in the Table. These figures display histograms of the ratios of the PMLSE computed by the 3 algorithms (nor- malized to unit area). Recall that the PMLSE measures the goodness of re-construction of the projective structure. The number of different sequences Exp. # frames # points Depth (Z) Trans (T max ) Motion x/y scaling (r) Motion 188 expts ratios Euclidean (solid), Fixed-Camera (dotted) over Projective Random Motion 173 expts ratios Euclidean (solid), Fixed-Camera (dotted) over Projective Random Motion 67 expts ratios Euclidean (solid), Fixed-Camera (dotted) over Projective Figure 1: Experiments 1, 2 and 3: Normalized error ratio histograms. The solid and dotted line denote the ratios of Euclidean and Fixed-Camera vs. projective error respectively. Error here is the projective error. tested for Experiments 1-7 were, respectively, 188, 173, 67, 55, 43, 42, 166. In each experiment we "spot checked" some of the results using different algorithms, different 5 point basis sets, fixing the projective basis via the camera matrix, and starting LM with an initial guess different from the ground truth. In particular, we checked several of the projective reconstructions that gave poor reconstructions. Occasionally we did find discrepancies between reconstructions and eliminated the incorrect reconstructions, which were easy to spot because their errors were large. These incorrect reconstructions were sometimes due to our using less-than-ideal 5 point bases in our earlier experiments. Our use of the compactness technique also helped to eliminate wrong reconstructions. Since the general trend of the data is clear, a few missed local minima cannot significantly change the results. Our convergence results in the next section also indicate this. There is little difference among the 3 estimates of the projective structure. In agreement with our arguments, the fixed-camera estimate is always the best. The crucial point is that the Euclidean estimate is comparable to the projective estimate. It is slightly worse in experiments 1, 2, 3, but slightly better in 4, 5, and 6. In experiment 4, the translation is small, in 5, the distance of the scene from the camera is large (so that the FOV is also small), and in 6 the number of images is small. In all 3 cases, there is less information for determining the reconstruction than in 1, 2, 3. In effect, projective SFM treats parameters that are actually known-the change in calibration from one image to the next-as additional unknowns to be estimated. In reconstruction, these parameters may be tuned away from their known correct values introducing error into the recovery of the true unknowns. This is more likely when there is relatively little information to constrain the reconstruction and may explain the results seen in these 3 experiments. We checked this interpretation by running additional experiments with a reduced noise of oe = :001. Since in this situation the reconstruction is better constrained, we would expect projective reconstruction to do relatively better. This is what we observed. The improvement remains marginal, however. Note also that for experiments 4 and 5 (but not 6) there is zero error in the x/y scaling of the image axes. It is known that this scaling error affects the Euclidean reconstruction more significantly than do errors in the other calibration parameters. This also helps to explain Euclidean SFM's relatively good performance for these experiments. In figures 4, 5, the ratios of the Euclidean reconstruction errors (EMLSE) are shown for the Euclidean and fixed-camera estimates. The EMLSE is the minimum least-squares error between the reconstruction and ground-truth structure under all Euclidean transforms of the reconstruction to the ground truth. It is striking that the Euclidean estimate does significantly worse in estimating the Euclidean structure than does the fixed-camera es- timate. This indicates that calibration error does affect the recovered Euclidean structure 4.1 Convergence Tests We performed two experiments to test the convergence stability of the al- gorithms. For the first experiment, we created 22 sequences with the same Though probably not the depth. Random Motion 55 expts ratios Euclidean (solid), Fixed-Camera (dotted) over Projective Motion 43 expts ratios Euclidean (solid), Fixed-Camera (dotted) over Projective Depth 90 Max translation 4 Figure 2: Experiments 4 and 5 : Normalized error ratio histograms. The solid and dotted line denote the ratios of Euclidean and Fixed-Camera vs. projective error respectively. Error here is the projective error. Motion 42 expts ratios Euclidean (solid), Fixed-Camera (dotted) over Projective Motion 166 expts ratios Euclidean (solid), Fixed-Camera (dotted) over Projective Figure 3: Experiment 6 and 7 : Normalized error ratio histograms. The solid and dotted line denote the ratios of Euclidean and Fixed-Camera vs. projective error respectively. Error here is the projective error. Note that in these experiments, the motion is smooth. parameters as for experiment 1, but with T We started the algorithm from the ground truth plus a perturbation and checked the convergence as a function of the size of the perturbation. For each sequence, only the overall scale of the perturbation was varied. The perturbation was generated in exactly the same manner as were the original structure, translations, and rotations (but the structure perturbation centers on 0). The scales of the perturbations used were 0, .5, 1.0, 1.5, where for a scale Random Motion :188 expts Motion :173 expts Random Motion :67 expts Figure 4: Experiments 1, 2 and 3 : Normalized histograms of ratios of Euclidean vs. Fixed-Camera Euclidean error. factor of 1 the perturbation is about the same size as the original ground truth. A perturbation scaled by 1.5 is large enough that it makes some of the initial depth estimates negative. Each of the 3 algorithms converged to the same minimum for perturbations scaled by 0, 0.5 and 1.0 in all cases, indicating that convergence to the global minimum is quite robust. For perturbations scaled by 1.5, the Euclidean algorithm failed to converge 5 times, while the projective algorithm failed just once. This implies that the Euclidean algorithm is less reliable than the projective algorithm. These experiments were quite time consuming, with each sequence taking on the order of hours of computation time. On average, for the first 3 perturbation scales the projective algorithm required from 2 to 4 times more computation than did the Euclidean algorithm (as measured by the MATLAB flops function). The fixed-camera algorithm averaged about 3/4 of the flops used by the projective algorithm. Random Motion :43 expts Motion :42 expts Smooth Motion :166 expts Figure 5: Experiments 5, 6 and 7 : Normalized histograms of ratios of Euclidean vs. Fixed-Camera Euclidean error. We have observed graphically the evolution of the structure estimates over many trials of these algorithms. The structure estimates do appear to experience significant changes until convergence is nearly attained. It appears that the timings are accurate reflections of the computational cost of the algorithms. A second experiment was run for 50 sequences under the same conditions but with 5. The starting guesses bore no relation to the original ground truth except that they were generated similarly. The parameters used were T and the structure guess was randomly chosen in a cube of side 40 centered at a distance of Z = 50 from the camera. In 19 of the 50 cases, the Euclidean algorithm converged to an incorrect local minimum. Surprisingly, the typical error in recovering the projective structure for these cases was just 2 to 3 times higher than at the correct global minimum. The projective algorithm converged to the correct global minimum in all cases. We have not fully checked the fixed-camera reconstruction, but the residual errors indicate that it too fails to converge in a number of cases. Finally, we ran the algorithms on a real-image sequence using tracked feature points and ground truth provided to us by J. Thomas [10, 5]. One image from this sequence is shown in figure 6. There were tracked feature points over 16 image frames. The sequence was generated by rotating a camera attached to the end ("hand") of a PUMA arm with length approximately 1.8 feet. Because of the small translations and large rotations this is known to be a difficult sequence. Projective SFM when started at the ground truth gave an error of 0.88 in estimating the projective structure, while the Euclidean algorithm gave an error of .95. Our experiments have shown that the difficulty of precise calibration is an inadequate motivation for projective SFM: projective SFM does not give better accuracy than Euclidean SFM when there is calibration error. Thus standard Euclidean reconstruction is a viable and simpler alternative to the projective approach for dealing with approximately calibrated single-camera sequences. Also, our experiments showed clearly that projective optimization could become unreliable without a great deal of care (e.g., in the choice of a 5- point projective basis), and the results for experiments 4, 5, and 6 are partial Figure Sample image from the "PUMA" sequence evidence that projective SFM does worse as the information is reduced. Thus, though the experiments reveal that the MLE differs relatively little when computed in the projective or Euclidean frameworks, non-optimal projective algorithms are likely to be signficantly less accurate and less robust than Euclidean ones, since non-optimal algorithms use just part of the available information or else weight it incorrectly [11]. On the other hand, pure optimization appears more reliable in the projective framework, or with rotation constraints relaxed in the Euclidean frame- work, than in the Euclidean framework enforcing the rotation constraints. The improvement is due to the reduced severity of the local-minimum problem and holds just for optimization. --R "What can be seen in three dimensions with an uncalibrated stereo rig?" "Estimation of Relative Camera Positions for Uncalibrated Cameras," "In Defence of the 8-point Algorithm," "Euclidean Reconstruction from Uncalibrated Views," "Sensitivity of the pose refinement problem to accurate estimation of camera parameters," "A computer algorithm for reconstructing a scene from two projections," "What Size Net Gives Optimal Generalization? Convergence Properties," "A New Structure from Motion Ambiguity," "A Multi-Frame Structure from Motion Algorithm Under Perspective Projection," "Structure from Linear of Planar Motions," "Recovering 3D shape and motion from image streams using nonlinear least squares," "Structure and motion in two dimensions from multiple images: A least squares approach," "Shape and motion from image streams under orthography: A factorization method," --TR --CTR John Oliensis, A New Structure-from-Motion Ambiguity, IEEE Transactions on Pattern Analysis and Machine Intelligence, v.22 n.7, p.685-700, July 2000
structure from motion;multiframe structure from motion;experimental verification;calibration;optimization;local minima;levenberg-marquardt;projective geometry
310690
Improving Service by Informing Customers About Anticipated Delays.
This paper investigates the effect upon performance in a service system, such as a telephone call center, of giving waiting customers state information. In particular, the paper studies two M/M/s/r queueing models with balking and reneging. For simplicity, it is assumed that each customer is willing to wait a fixed time before beginning service. However, customers differ, so the delay tolerances for successive customers are random. In particular, it is assumed that the delay tolerance of each customer is zero with probability &#946;, and is exponentially distributed with mean &#945;-1 conditional on the delay tolerance being positive. Let N be the number of customers found by an arrival. In Model 1, no state information is provided, so that if N &#8805; s, the customer balks with probability &#946;; if the customer enters the system, he reneges after an exponentially distributed time with mean &#945;-1 if he has not begun service by that time. In Model 2, if N - s then the customer is told the system state k and the remaining service times of all customers in the system, so that he balks with probability &#946; exponentially distributed with mean &#945;-1, Sk is the sum of k exponential random variables each with mean (s&#956;)-1, and &#956;-1 is the mean service time. In Model 2, all reneging is replaced by balking. The number of customers in the system for Model 1 is shown to be larger than that for Model 2 in the likelihood-ratio stochastic ordering. Thus, customers are more likely to be blocked in Model 1 and are more likely to be served without waiting in Model 2. Algorithms are also developed for computing important performance measures in these, and more general, birth-and-death models.
Introduction [sec1] In this paper we investigate alternative ways to manage a service system. We have in mind a telephone call center staffed by a group of operators, but there are other possible appli- cations, e.g., internet access. We introduce birth-and-death (BD) stochastic process models that can be used to demonstrate the advantage of: (1) allowing waiting before beginning service and (2) communicating anticipated delays to customers upon arrival (or providing state information to allow customers to predict delays). However, if the service provider decides to inform customers about anticipated delays, then it is important for the service provider to be able to accurately predict the delays. Hence, we also propose methods for the service provider to estimate the delay distribution and its mean, exploiting estimated service-time distributions (which need not be exponential) and the elapsed service times of customers in service. The frame of reference is the classical loss system, in which there are s servers working in parallel and no extra waiting space. Assuming that blocked customers depart without affecting future arrivals, allowing waiting helps to avoid blocking and thus serve more customers. However, in many loss systems with telephone access, blocked customers can easily retry rapidly because of automatic redialers. When customers can easily retry, the system without a provision for waiting tends to behave like the system with a provision for waiting. However, we contend that it is usually better to directly allow for waiting. An advantage of customers retrying is that more customers receive service, while the service provider avoids the cost of maintaining a queue. However, retrying typically imposes costs on both the customers and the service provider. First, the customer must expend time and effort retrying. Second, even unsuccessful attempts often consume resources of the service provider. Typically, some resources are required to process each request for service, whether or not it is successful. Thus, the service provider's processing capacity may be reduced by having to handle many unsuccessful attempts. Moreover, with retrials, the first-come first-served service discipline is lost. The FCFS discipline is often strongly preferred by customers because of its inherent fairness. The random order of service associated with retrials also makes the waiting time before beginning service more variable, which tends to be detrimental. Thus, there are several reasons motivating service providers to directly allow for waiting. Given that the service provider allows for waiting, there are two alternatives. The service provider may either communicate anticipated delays to customers upon arrival or not. We contend that, once the service provider has decided to allow for waiting, it is usually much better to inform customers about anticipated delays, assuming that there is the capability of doing so, which is more and more becoming the case; e.g., see Rappaport [21]. The most convincing argument perhaps come from our feelings about our own experience as a customer. If the service provider does communicate anticipated delays, then the customers are more likely to balk when all servers are busy (leave immediately upon arrival) than renege (leave after waiting for some time). We develop BD models to describe and compare these alternatives. It is common practice to restrict attention to the special case of the M/M/s/r model, which has s servers and r extra waiting spaces. Indeed, it is common to use only the Erlang B (loss) model or the Erlang C (delay) model but none of these alternatives account for balking or reneging. However, it is actually not difficult to account for balking and reneging in a BD model, and it is often very important to do so. By having a BD model that incorporates all the possibilities, it is easy to evaluate the alternatives. The way to calculate the steady-state distribution of a general BD process is quite well known. We go beyond that initial step by showing how to compute the probability that a customer receives service, the probability that a customer reneges, and the distributions and first two moments of the conditional response time given that service is completed and the conditional time to renege given that the customer reneges. These descriptions are helpful because the conditioning can have a big impact. These general BD models also can be used to study complex networks of service facilities. As in Whitt [28], Kelly [18] and Ross [23], the BD model can serve as the fundamental building block for a reduced-load approximation for a network of service facilities. Then the overflows from one facility due to blocking, reneging or balking can become part of the arrival rate to other facilities. The overall performance can be determined by iteratively solving a system of nonlinear equations. The computational method is essentially the same as for the previously studied pure-blocking systems, but now the approach can be used for systems with balking and reneging as well as blocking. We intend to discuss such reduced-load approximations in a subsequent paper. The BD models are intended to help understand system performance. The BD model simplicity makes it possible to describe performance in detail using an elementary algorithm, but the model requires Markov assumptions such as exponential service-time distributions that may well be seriously violated in practice. The analytical BD model nevertheless can provide important insight. However, to actually predict customer delays in system operation, we contend that it should usually be better not to use the BD model. To predict expected delays and the full delay distribution of arriving customers, we suggest exploiting the actual service-time distributions and the elapsed service times of customers in service. We also suggest exploiting other information enabling the service provider to classify customers. For example, there may be a few known and easily identifiable classes of customers, each with its own service-time distribution. We focus on accurately predicting the delay distribution, but not on precisely what should be told to customers. See Hui and Tse [16], Katz, Larson and Larson [17] and Taylor [26] for discussions of that issue. In some settings (with sophisticated customers), full disclosure may be preferable, i.e., communicating the full delay distribution and possibly other state information. Given that delays before beginning service can be predicted reasonably well, it is natural to consider not having the customer retry or wait. Instead, the service provider can call back at a later time. To do so, the service provider records the calling number when the customer first calls and announces the anticipated future time of the return call, e.g., in about 2 minutes or between 10 and 15 minutes. The accurate delay prediction then helps the service provider accurately predict when the return call can be made. We now indicate how the rest of this paper is organized. In Section 2 we present what we regard as the traditional BD model to describe performance when some arrivals balk and waiting customers renege after an exponential time. This model can represent both the loss model with rapid retrials and the delay model for the case in which the service provider allows waiting. With retrials, we do not try to directly represent the retrials as in Chapter 7 of Wolff [31]. Instead, assuming that relatively rapid retries are possible, we consider retrying customers to be waiting customers. However, we assume the FCFS service discipline, so that our analysis in Section 2 does not capture the random order of service associated with retrials. In Section 3 we introduce an alternative BD model to describe the performance when the service provider informs customers about anticipated delays before beginning service or provides state information so that the arriving customers can make this prediction. We relate the state-dependent balking in this setting to the reneging rate in Section 2. The principal change from Section 2 to Section 3 is to replace reneging with balking, but we also allow reneging in Section 3. Thus the model in Section 2 is a special case of the model in Section 3. In Section 4 we make stochastic comparisons between the models in Sections 2 and 3, showing that state-dependent balking instead of reneging (at comparable rates) leads to fewer customers in the system in steady state. In Section 5 we present some numerical examples giving explicit comparisons. We obtain our numerical results by numerically solving for the performance measures in the BD models. These examples show that the performance in the two scenarios is often remarkably similar. The major difference is that, with balking instead of reneging, customers who do not receive service do not waste time waiting. We also use the numerical examples to show the economies of scale (having fewer groups of larger numbers of servers instead of more groups of smaller numbers of servers). In Section 6 we present methods for service providers to use to predict the distribution of a customer's delay before beginning service. We present predictions based on the BD models, but also predictions exploiting estimated (non-exponential) service-time distributions and elapsed service times of customers in service. By the classical lack of memory property of the exponential distribution, an elapsed service time does not affect the prediction when the service-time distribution is exponential, but it can have a great impact when the service-time distribution is far from exponential, as when it is a heavy-tail distribution such as the Pareto distribution. In Sections 7 and 8 we discuss ways to estimate model parameters and validate the BD models. In Section 9 we discuss ways to approximately capture the performance impact of occasional extra long service times. Finally, in Section 10 we briefly discuss other possible deviations from the model assumptions and ways to approximately cope with them. We refer to Boxma and de Waal [4] and Falin [9] for accounts of the literature on queues with reneging and retrials. 2. When Customers Do Not Know the System State [sec2] In this section we review a reasonably well known birth-and-death (BD) process model for the case in which the system state is not communicated to arriving customers; e.g., see Chapter 2 of Gross and Harris [13] and Chapter 4 of Heyman and Sobel [15]. If a server is not immediately available, then the arriving customer balks (leaves immediately) with probability fi and waits with a server is not immediately available and the customer does not balk, then he reneges (abandons later) after an exponential time with mean ff \Gamma1 , if he has not yet begun service. We assume that the system state is not known by customers, so that the parameters ff and cannot depend directly on the number of customers in the system (beyond whether the servers are all busy or not). Once a customer starts service, he stays until service is completed. (It is easy to modify the BD model if this assumption is not reasonable.) Let the arrival process be a Poisson process with rate -. Let there be s servers, a waiting room of size r and the first-come first-served service (FCFS) discipline. (The total system capacity is thus s customers present is blocked (lost). Let the service times be i.i.d. exponential random variables with mean 1=-. Then the birth (arrival) and death (departure) rates are, respectively, and When k ? s, some departures are service completions, while others are abandonments (reneging) and blocked arrivals. The arrival rate - must be the sum of the rates of service completion, blocking, balking and reneging. We do not discuss how to analyze this BD model here because it is a special case of the model introduced in the next section, which we do analyze. 3. When Customers Know the System State In this section we consider the case in which customers learn the system state upon arrival. The customers may also receive updates while they are waiting. The customers might be told the number of customers ahead of them in line at all times (e.g., by displays on a monitor with access through a personal computer) and/or they might receive periodic predictions of their remaining time to wait before beginning service (e.g., by telephone announcements with access through a telephone). Assuming that customers know their preferences, it is natural that customers would respond to this additional information when all servers are busy by replacing reneging after waiting with state-dependent balking; i.e., customers should be able to decide immediately upon arrival whether or not they are willing to join the queue and wait to receive service. Having joined the queue, customers should be much more likely to remain until they begin service. Reneging is even less likely if the customer can see that the remaining time to wait is steadily declining. Hence in this section we consider an alternative BD model to represent state-dependent balking instead of time-dependent reneging. Since there may still be some reneging in this new situation with additional state information (e.g., because customers change their minds or because progress in the line is slower than anticipated), we also include reneging in the model. However, we are especially interested in the comparison between the model in Section 2 with reneging and the new model in this section in which the reneging is replaced entirely by state-dependent balking. We make a stochastic comparison in Section 4. As before, there is a Poisson arrival process with rate - and s servers, each with exponential service times having mean - \Gamma1 . There is a waiting room of size r and the FCFS service discipline. An arrival encountering a full system is blocked. Paralleling Section 2, the customers are assumed to be willing to wait until starting service a random time that is exponentially distributed with mean 1=ff. These times for different customers are assumed to be mutually independent. However, now the customer learns the system state upon arrival and decides whether or not to balk. If the number seen by the arrival (not including the arrival) is less than or equal to s \Gamma 1, then the new arrival enters service immediately. If the number seen by the arrival is s then the arrival may elect to balk (leave immediately) or join the queue. Paralleling Section 2, each customer finding all servers busy balks with probability fi. However, the customer may also elect to balk depending on the system state. We stipulate that the customer joins with the probability that a server becomes free before he would abandon. Let S k be the time required from arrival until a server first becomes available for this customer, as a function of k, assuming that departures occur only by service completions (not considering reneging by customers in queue ahead of the current customer), and let T be the time that this customer would have reneged in Section 2. (We assume that the actual service times are not known.) Then the arrival finding s customers in the system upon arrival (not counting himself) joins with probability has the distribution of the sum of k exponentials each with mean 1=s- and T has an exponential distribution with mean 1=ff, we can exploit Laplace transforms to calculate q k explicitly. In particular, We also indicate several alternatives to (3.1) and (3.2). The first alternative is intended to represent the case in which the service provider communicates the expected delay when there are customers in the system. Then we would replace S k in (3.1) by its mean, i.e., we would use Note that when k is large, S k will tend to be relatively close to ES k by the law of large numbers. Directly, we can see that, if k and s are suitably large, then (3.2) will be close to (3.3), i.e., In general, - The analysis leading to (3.2) and (3.3) suggests that the probability a customer joins the queue (does not balk) when he finds s system should be of the general form -i \Gammak for parameters In practice the balking probability as a function of k needs to be estimated. This blocking probability should depend on the information supplied to the customer. We now define a BD model representing state-dependent balking. Since there may still be some reneging, we include state-dependent reneging as well. The birth (arrival) and death (departure) rates are, respectively, and In (3.6) we have allowed general state-dependent reneging rate for each waiting customer, we will usually consider the special case in which ffi. The model in Section 2 corresponds to that special case with the parameter pair (ff; ffi ) here set equal to (0; ff). We now indicate how to numerically solve for the steady-state probabilities p k . Since the larger probabilities should be near s (assuming that s is reasonably well chosen), it is convenient to solve for the steady-state distribution recursively starting at s. Let x and Then, let and So far the results have been quite standard, but now we go on to compute the probability of completing service and the mean, variance and full distribution of the conditional response time (time to complete service) given that service is completed. We also compute the probability that a customer reneges and the mean, variance and full distribution of the conditional time to renege given that the customer reneges. Since the arrival process is Poisson, the state seen by arrivals is the same as at an arbitrary time by the Poisson-Arrivals-See-Time-Average (PASTA) property; see Section 5.16 of Wolff [31]. Let k be the probability that the k th customer in line abandons in the next departure event (assuming each customer is equally likely to abandon) and let m k be the mean time to the next departure event, in both cases considering only the first s customers in the system; i.e., Then the probability that customer s eventually receives service is for fl k in (3.11). Then the probability that a new arrival eventually completes service, is Let C be the response time. (We let C be 0 when service is not completed.) Then, using properties of the exponential distribution, we obtain and where and Then the first and second moments of the conditional time to complete service given that service is completed are The conditional variance and standard deviation are then and Now let - c(s) j Ee \GammasC be the Laplace transform of C. Paralleling (3.14), we have d where d We can now easily calculate P (X ? t) for any desired t by numerically inverting its Laplace by using the Fourier-series method described in Abate and Whitt [1]. The associated conditional response-time distribution is Let R be the event that an arrival eventually reneges and let A be the time to renege. Then, by essentially the same reasoning, r and r where and The associated conditional moments are for P (R) in (3.24). Finally, the conditional variance and standard deviation are and Now let -a(s) j e \GammasA be the Laplace transform of A. Paralleling (3.25), we have where '- Paralleling numerically inverting its Laplace transform a(s))=s. Then the conditional distribution of the time to renege given reneging is Finally, the probability of blocking is p s+r , so that the probability of balking is 4. Stochastic Comparisons [sec4] The consequences of informing customers about anticipated delays are not entirely clear. It seems that customers should prefer this additional information and that the greatest benefit will stem from improved customer satisfaction. However, the impact on congestion is less clear. First, the rate of customer service and the steady-state number of customers in the system might both increase because the fixed balking rate fi might decrease and the arrival rate - might increase. It thus might be necessary to increase the number of servers s, i.e., better service might mean more business. In this section we make comparisons assuming that the parameters remain unchanged. Intu- itively, it seems that balking upon arrival instead of joining the queue and later reneging should lead to fewer customers in the system, provided that the chance of balking relates appropriately to the chance of reneging, as in the construction in Section 3, in particular, assuming (3.2). We now show that a strong comparison is possible. In particular, we establish likelihood ratio (MLR) ordering. See Chapter 1 of Shaked and Shanthikumar [24] for background on stochastic orderings. Consider two random variables X 1 and X 2 with values in the state space f0; 1, that have probability mass functions (pmf's) that are positive for all states. We say that less than or equal to X 2 in the likelihood ratio (LR) ordering and write We say that stochastically less than or equal to X 2 and write X 1 - st X 2 if The LR order implies stochastic order. Indeed, the LR order is equivalent to stochastic order holding under conditioning for all intervals; i.e., X 1 - lr X 2 if and only if st for all a and b with a ! b; see p. 29 of Shaked and Shanthikumar. We now present a sufficient condition for the steady-state distributions of BD processes to be ordered in the LR ordering. This result is a special case of Theorem 5 of Smith and Whitt [25] (which applies to more general processes). Theorem 4.1 [thm401] Consider two BD processes with common state space f0; rates - (i) k and steady-state random variables N i , 2. If - (2) - (2) for then We now compare the processes in Sections 2 and 3, where the model in Section 3 has no reneging. Theorem 4.2 [thm402] Consider the BD processes introduced in Sections 2 and 3, using (3.2), with common parameters -; ff; fi; s and r and no reneging for the model in Section 3, i.e., with Let the model with reneging in Section 2 be indexed by superscript 1 and the other model by superscript 2. Let - (i) k and N i denote the birth rates, death rates and steady-state number of customers present in model i. Then Proof. By Theorem 4.1, it suffices to establish (4.4). For s - (2) - (2) so that it suffices to show that - (2) - (2) for 1. However, (4.5) holds because, by the binomial theorem, (1 positive integers k. The stochastic comparison we have made between the two modes of operation in Theorem 4.2 assumes that the basic parameter tuple (-; ff; fi; s; r) is the same for both systems. However, if we change the way the system operates, then these parameters may change too, leading to more complex comparisons. We can describe how each system separately responds to changes in the parameters, though. For simplicity, let in Section 3, then the model there depends on the parameter tuple (-; ff; fi; ffi; s; r). Theorem 4.3 [thm403] Consider one of the systems in Section 2 or 3. Let N i be the steady-state number of customers in system i with parameter tuple (- 2. If Proof. It is easy to see that - (1) k and - (1) holds. Hence, we can apply Theorem 4.1. From Theorem 4.3 it is not evident how the long-run balking and reneging rates respond to increases in the parameters ff, fi and ffi . It is intuitively clear that the long-run rates should increase, but if we increase fi, then the steady-state distribution decreases, so that there is less opportunity for balking. Nevertheless, we can establish the desired comparison by exploiting a sample-path comparison. Theorem 4.4 [thm404] Consider one of the systems in Section 2 or 3. (a) If ff increases, then the long-run reneging rate (Section 2) or balking rate (Section increases (b) If fi increases, then the long-run balking rate increases. (c) If ff, fi and ffi increase, then the long-run rate of service completions decreases. Proof. We only consider part (a) for the system in Section 2, because the reasoning is the same in the other cases. As in Whitt [27], it is possible to construct the two systems on the same sample space so that the sample paths are ordered (a coupling). Let the two systems be indexed by i, where ff (1) ! ff (2) . Let N i (t) be the number of customers in system i as a function of time. Let the two systems both start out empty. We can generate all events from a common Poisson process with a constant rate fl j -+s-+ rff. Then we determine the nature of the events according to the birth and death rates. For example, with probability -=fl, the event is an external arrival. If the state is k ! s, then with probability k-=fl, the event is a service completion, while with probability the event is a fictitious event, leading to no state change. Whenever the two sample paths coincide with s customers present for k - 1, let service completions be the same in both systems and let there be reneging in the system with parameter ff (2) , where ff (2) ? ff (1) , whenever there is reneging in the system with parameter ff (1) . However, there may be additional reneging in system 2, making N (2) (t) - N (1) (t). Whenever N (2) (t) - N (1) (t), the service completion rates and are greater for system 1. Hence, let there be a service completion in system 1 whenever there is one in system 2. This allows extra service completions in system 1. Also, let there be a balking event in system 1 whenever there is one in system 2, which allows extra balking events in system 1. With this construction, a gap N (1) (t) \Gamma N (2) (t) can only be created and grow by excess reneging in system 2. This gap may be reduced in several ways, including by subsequent reneging in system 1, but the cumulative number of customers reneging always stays ahead for system 2. Remark. For the model in Section 2, the proof of Theorem 4.4 shows that the long-run service completion and balking rates both decrease when ff increases. When ff and fi both increase, we can deduce that the long-run service completion rate decreases, but not how the long-run reneging and balking rates are affected. 5. Numerical Examples [sec5] We now illustrate how the BD models can be used by considering a few numerical exam- ples. In Theorem 4.2, we established an ordering between the two systems with common parameter tuples (-; ff; fi; s; r). However in numerical examples we have found that in many respects the two systems with common parameter tuples behave very similarly. The main difference is that, for the system in Section 2, some customers who do not eventually receive service spend time waiting before reneging. This wasted customer effort is eliminated by predicting delays, if the prediction leads to the model in Section 3. Throughout this section we use definition (3.2). Example 5.1. Economies of Scale In addition to comparing the two systems with common parameter tuples, our first example illustrates the economies of scale. In particular, we consider both systems (with and without reneging, as in Sections 2 and and 3. In each case, we let choose r to be sufficiently large so that blocking is negligible. With this parameter choice, the system with corresponds to the combination of 10 identical systems with We have resource sharing in the sense of Smith and Whitt [25]. Numerical results for these cases are presented in Table 1. Since there is the expected number of customers waiting. Table 1 shows that the two systems do not differ much, with the difference decreasing as s increases. In all cases, the probability that an arrival is eventually served are very close for the two systems. Table 1 also shows that all measures of performance improve as s increases, thus quantifying the economies of scale. It is interesting to contrast the balking and reneging examples with the pure-loss model, which otherwise has the same parameters. The probability of eventually being served in the associated M/M/s/0 loss model is 0.639, 0.884, 0.961 and 0.9875 for and 3. The difference is substantial for smaller s, but negligible for larger s. For larger s, the balking acts like blocking. When 0:2, the arrival rate drops to 3200 when all servers are busy. In that case, s acts much like an upper barrier. Indeed, in that case, the conditional mean queue length given all servers are busy is only performance measures reneging only balking reneging only balking EN 3.60 3.53 37.3 37.3 E(CjS) 1.115 1.144 1.021 1.022 E(AjR) reneging only balking reneging only balking EN 387.0 387.0 3953. 3953. E(CjS) 1.0015 1.0015 1.0000 1.0000 E(AjR) Table 1. A comparison of the two service schemes as a function of system size, 4. In all cases 0:2. The variable N is the steady-state number of customers in the system, C is the time to complete service and A is the time to abandon. Example 5.2. Heavy Loads The systems in Sections 2 and 3 do not differ when all servers are not busy. Thus, the difference should increase as the load increases. We next illustrate the larger differences that are possible with higher loads. For this example, we let 50. We consider two cases: In the first case, we let in the second case we let With the conventional definition of traffic intensity ae j -=s-, ae = 2:0 and 4.0 in the two cases. Numerical results for these two cases are displayed in Table 2. In Table 2 the differences between the two systems are greater than in Table 1, but still not large. The probability of being eventually served and the mean and standard deviation of the conditional time to be served are very close. The greatest differences are in EN and SD(N ), the mean and standard deviation of the steady-state number of customers in the system. performance measures reneging only balking reneging only balking EN 16.1 14.6 20.0 16.8 E(CjS) 1.44 1.47 1.65 1.68 E(AjR) Table 2. A comparison of the two service schemes in Sections 2 and 3 under heavy loadings. Note that the most serious detrimental effect of the heavy loads is the low proportion of customers served. The delays experienced by those customers served are not especially large. These results show that a focus on the delays experienced by served customers, while ignoring the customers lost to balking or reneging, can seriously overestimate the quality of service provided. Also note that the performance is quite different from the M/M/s/r model without balking or reneging. Then the steady-state number N is close to s which in Table 2 would be 60. The probability of being served is about the same, however. In the setting of Table 2 the blocking is negligible. The high blocking in M/M/s/r is replaced by balking and reneging in these cases. At first glance, it might be thought that in the setting of Section 2 the reneging rate ff might be reasonably well estimated by the reciprocal E(AjR), the expected time to renege given that reneging occurs. However, it can be much less. Note that we consistently have This must occur because the sequence of reneging times is censored. (Many customers are served before they have a chance to renege.) 6. Predicting Future Delays [sec6] In order for the service provider to accurately predict delays before arrivals can begin service, the service provider needs to be able to accurately estimate future delays given the system state. Given the model in Section 3, it is relatively easy to accurately estimate delays. Since there should be negligible reneging, the waiting time before starting service for an arrival finding s customers in the system is the sum of k exponential random variables each with mean 1=s-. Hence, the mean and standard deviation of the steady-state waiting time before starting service, W are and SD(W It is reasonable to normalize by the mean service time, so that waiting times are viewed in relation to mean service times. This is equivalent to setting s and SD(W The formulas in (6.2) show the advantage of large scale. When s is big, either EW and SD(W ) are both small (when k is small) or the ratio SD(W )=EW is small (when k is large). Moreover, when k is not too small, we can apply the central limit theorem to deduce that W is approximately normally distributed with the mean and standard deviation just determined. We have suggested that the model in Section 2 should be replaced by the model in Section 3 with negligible reneging when the service provider predicts delays. However, it is also possible to predict delays when there is significant reneging. In the setting of Section 2, when a customer finds customers in the system, the delay can again be represented as the sum of k exponential random variables, but now they are not identically distributed. The mean and standard deviation become The modification (6.3) can be important if there is some reneging, even though the service provider predicts delays. If we ignore reneging, then the delay predictions will be somewhat pessimistic. However, the accuracy of the delay prediction above depends strongly on the exponential service-time assumption. For other service-time distributions, the remaining service time depends on the elapsed service time. Thus, for non-exponential service-time distributions, we can more accurately predict the delay of a new arrival if we exploit the elapsed service times (ages) of the customers in service. Moreover, it may be possible to classify customers into different types, where each type has a very different service-time distribution. This classification may be done before or after service has begun. Henceforth, assume that the classification has been done before service begins, so that customer before starting service has service-time cdf G i . The actual service-time cdf G i should be easily estimated directly from the observed service times, assuming that there is no reneging after service has begun and that service times in progress are not altered by system state. In practice, this last possibility should be checked. It can be checked by estimating service-time distributions conditional on the number in system when service starts. With significant reneging, the estimation procedures should account for censoring. Let G i (tjx) be the cdf of the conditional remaining service time, conditional on an elapsed service time (age) of x. Clearly, Suppose that the service provider keeps tract of the starting time for each service in process, so that at the time of a new arrival, the ages of the service times of all customers in service are known. If additional prediction is done after service has started (using service time), then G i (tjx i ) could be estimated directly instead of by (6.4). At this point, one approach is to use an infinite-server approximation, as in Duffield and Whitt [8]. Let D(t) be the number of departures by time t. With an infinite-server approximation, we optimistically act as if all customers in the system are in service. This leads to the approximation s Similarly, we can approximate the variance by s assuming that these are independent (non-identically distributed) trials. Then we estimate the mean waiting time before the new arrival can start service as We emphasize that (6.7) is an approximation. The actual waiting time is We cannot actually obtain the mean of W in (6.8) by replacing D(t) in (6.8) by its mean, but this is the candidate approximation proposed by Duffield and Whitt [8]. However, it may be somewhat too optimistic to act as if waiting customers start service im- mediately. Hence, we now introduce a refinement in which waiting customers are allowed to start service in the future. For this purpose, let D s (t) be the number of the current s customers in service that will have departed t time units later. Then, given the s ages x expected value is s To estimate when the waiting customers start service, let Note that, like (6.7), (6.10) is an approximation because it is a first passage time for the mean instead of the first passage time for the process itself. Equation (6.10) is exact in the case of deterministic (possibly different) service times, though. Again let D(t) be the total number of departures by time t. Then we can estimate its mean by s for t j in (6.10). Paralleling (6.6), we estimate the variance of D(t) by s Note that (6.11) and (6.12) do not account for departures from waiting customers after the first k before some of the accounted for departures, but this discrepancy should be relatively small if k is not large compared to s. Given (6.10) and (6.11), we can estimate the full waiting-time distribution (approximately). We start by the observation that D(t), being a sum of independent random variables, should be approximately normally distributed, by virtue of the central limit theorem for non-identically distributed random variables; see p. 262 of Feller [10]. Let N(0; 1) denote a standard (mean 0, variance 1) normal random variable and let \Phi be its cdf. Let where SD is the standard deviation. Since the random waiting time W is defined by (6.8), it is natural to use the approximation choose x ff so that \Phi(x ff is the approximate ff)-percentile of the distribution of W , i.e., From (6.15), we can obtain the complementary cdf P (W ? w) and then compute any desired summary characteristic. For example, the mean is We also suggest using the median, either directly or as an estimate of the mean, which leads to with ED(t) in (6.11) instead of (6.5). If we want to be conservative, then we can include the standard deviation in the mean waiting-time approximation, e.g., by replacing (6.7) with for some constant c, e.g., c = 1. From above, we see that (6.17) is tantamount to using the estimate of the (1 \Gamma ff)-percentile of the distribution for x We calculate (6.7), (6.13) or (6.17) by first calculating (6.9) for a set T of time points t, using (6.4). We then approximate the times t j in (6.10) from among the time points in T considered in (6.9). Then, given the times t j in (6.10), we compute the second terms of (6.11) and (6.12) for all times t in T . We approximate EW in (6.7), (6.13) and (6.17) by again only considering the time points in T . Assuming that s is relatively large, the approximation (6.7) can be justified by the law of large numbers, as in Duffield and Whitt [8]. Example 6.1. Validation of the Delay Prediction We can quickly validate the main approximation above by making comparison to exact results for the BD model. For example, suppose that 1. Let the initial number in the system be 130. By (6.2), the waiting time before a new arrival can begin service has mean 0.31, and standard deviation 0.056. In contrast, the infinite-server approximation for the mean is that value of t for which 130e \Gammat = 99 or which is optimistic, as indicated before. The refined approximation in (6.10) has start times t using (6.11) and (6.7), we get the approximation EW - 0:313. However, the big advantages of the approximation procedure are with non-identical or non-exponential service-time distributions. The approximation in such cases can be validated by simulation. In some applications we may be especially interested in the waiting times of the first few customers in queue. In that case, it is feasible to calculate the exact waiting-time distribution. Let W k be the waiting time of the k th customer in line. Then the complementary cdf of the waiting time of the first customer in queue is which is easily calculated via log s We can further approximate W 1 by an exponential distribution is obtained from (6.19) via for some appropriate t 0 . This approximation is supported by extreme-value limits in the i.i.d. case, see Leadbetter, Lindgren and Rootz'en [19] and Resnick [22]. As a supporting regularity condition, we assume that G i (t) and thus G i (tjx i ) has a positive density on the entire half line. We can then think of the initial departure process as a Poisson process with rate - 1 , so that W k has approximately a gamma distribution with and V arW 2: (6.22) Approximation (6.22) is also natural to use when we are only given the mean remaining service times of all s customers in service, say m Then we can let the rate - 1 in (6.21) be s If we assume that the service-time cdf's G i (tjx i ) are actually exponential with mean m i , then the exact formula (6.19) reduces to (6.23). The delay prediction analysis above is intended for the case of relatively large s and relatively small k, e.g., (number in system 130). For the reverse situation (smaller s and larger k), different methods become more appropriate. Then the customers initially in service tend to play a smaller role. When k - s, it is natural to use a simple modification of (6.1) to take account of the non-identically distributed general cdf's G i with means m i and variances oe 2 s where the s customers in queue are indexed first, followed by the first s customers in service. We obtain (6.24) by approximately W by the sum of the first k times divided by s. In the i.i.d. case, the waiting time is the st arrival time in the superposition of s i.i.d. renewal processes. Asymptotically as k increases, the mean and variance are as in (6.24); e.g., apply Theorem 6 of Glynn and Whitt [11]. Even if the elapsed service times are not available, we can do better than (6.1)-(6.3) for non-exponential distributions. Then, instead of (6.4), we would use the service-time stationary-excess cdf As noted in Duffield and Whitt [8], in the infinite-server model the residual service times, conditional on the number of busy servers, are distributed exactly as (6.25), so there is a theoretical basis for (6.25). The importance of these alternatives to the exponential formulas in (6.1)-(6.3) clearly increases as the service-time distribution differs more from an exponential distribution. The difference is dramatic when the service-time distribution is a long-tail distribution such as the Pareto distribu- tion. Indeed, suppose that Y (a; b) has the Pareto cdf have the conditional cdf G(tjx). Then, by Theorem 8 of [8], Y x (a; b) is distributed the same as Hence the mean residual residual life is approximately proportional to the age. Hence, in this setting the age can greatly help in predicting the residual life. It is significant that the delay prediction method in (6.4)-(6.17) does not depend much on the BD model structure. For example, it can be used for non-Poisson and non-homogeneous arrival processes. The most critical assumption is that service times are independent of the remaining system state. However, experience shows that dependence can occur between service times and system state. Human servers may speed up or slow down under heavier loads. Even computer servers may behave in this way, e.g., service times in database systems tend to increase under higher loads. To investigate this phenomenon, when estimating the service-time cdf, the service-time data can be grouped according to the number in system when service starts. With no system-state influence, this extra variable should not alter the estimation. However, if it does, then the service-time in (6.4)-(6.12) can be made to depend on the state s seen by the arrival whose delay we are trying to predict. It is often significant just to distinguish two cases: when all servers are busy and when they are not. We have focused on the delay before beginning service, but interest may instead be focused on delay until completing service. Assuming that the service time of each customer in queue is independent of his waiting time to begin service, the distribution of the time to complete service is naturally estimated by the convolution of the two estimated component distributions. Similarly, the estimated mean is simply the sum of the component estimated means. 7. Estimating the Balking Parameters [sec7] In this section we consider how to estimate the balking parameters ff and fi in Section 3 and how to validate the model. For background on standard procedures for estimating parameters in BD models, see Basawa and Prakasa Rao [3] and references cited there. For (t) be the number of arrivals finding s customers in the system upon arrival and let J k (t) be the number of these arrivals to join the queue in an operation of the system over a time interval [0; t]. (The number balking is thus A k (t) \Gamma J k (t).) Under the model assumptions, as t !1, the ratio will converge as the sampling period grows, i.e., as so that as Moreover, under the model assumptions, conditional on A k (t), J k (t) has a binomial distribution with parameters Hence, we propose estimating the parameters ff and fi by performing a linear regression with the variables \Gamma log R we find the best linear fit We then estimate ff and fi by - ff and - fi, where so that and By (7.2), these estimators of ff and fi are consistent (converge as t ! 1). The degree to which a linear fit in (7.3) is appropriate also indicates the quality of the model fit. When the fit is not good, we should question whether T has an exponential cdf. More generally, we could directly estimate the probability q A disadvantage of (7.7) for prediction is that it yields r parameters instead of only 2. However, from (7.7) we obtain an estimate of the cdf H at r points, because q More generally, with data, it is natural to consider other two-parameter or three-parameter models for non-balking. For example, instead of (1 \Gamma fi)fl k+1 in (7.1), we might consider . If we do estimate the balking probabilities in state s + k for each k, then it is natural to impose a monotonicity condition, exploiting the condition that the balking probability should be increasing in k. See Barlow, Bartholomew, Bremner and Brunk [2] for appropriate statistical methods. 8. Estimating the Reneging Rate [sec8] In this section we consider how to estimate the reneging rate ff in Section 2 or ffi (assuming Section 3. As noted at the end of Section 5, the average conditional time to abandon E(AjR) for the model in Section 2 is often substantially less than 1=ff, the reciprocal of the reneging rate. As an estimator - ff for ff, we propose that value of ff, with the other elements of the parameter tuple (-; ff; fi; s; r) that yields the observed estimate for the mean E(AjR); i.e., we directly estimate E(AjR) by looking at the sample mean of the reneging times and then we apply the BD model to find that value of ff that yields the estimate. The most important point is not to confuse E(AjR) with 1=ff. Alternatively, we could estimate the long-run reneging rate by its sample mean, and then estimate ff by the value that yields the observed sample average reneging rate. By Theorem 4.4, the long-run reneging rate is always increasing in ff, so that the search is not difficult to perform, e.g., by bisection search. This estimation procedure can also be used when there is reneging even when delays are predicted. When the service provider announces delay predictions to each arrival, it is possible that the reneging behavior depends on the initial state. To confirm the delay predictions and to understand the reneging behavior, it is good to monitor the outcomes starting with each initial state s+k for k - Reneging events well before the anticipated waiting time (k+1)=s- represent an unwillingness to wait for the predicted time. Reneging events after the anticipated waiting time (k+1)=s- represent a failure to accurately predict the delay and associated customer dissatisfaction. 9. Occasional Extra Long Service Times [sec9] In this section we propose some simple methods to describe the impact of occasional extra long service times. The delay prediction methods in Section 6 should already cover this case adequately. Now we are primarily concerned with modifications to the model in Section 3 to produce appropriate approximate modified performance predictions. Our idea is to represent the special service times as server vacations or server interruptions. Since these service times are unusually long, they occur in a longer time scale. Thus, it is natural to represent these service times as special high-priority customers that occasionally require servers. Moreover, since the special service times are unusually long, it should be reasonable to treat the remaining customers by averaging the steady-state distributions associated with the various possible numbers of available servers. Hence, we first model the long service times by an M/G/1 model. The steady-state number of servers occupied with these special customers thus has a Poisson distribution with mean equal to is the arrival rate and - \Gamma1 L is the mean of these special long service times. We are assuming that the total offered load of these special customers, mL , is sufficiently small that the chance that all servers are busy serving only them is negligible. Because of the insensitivity of the M/G/1 model, the service-time distribution beyond the mean plays no role at this point. We can then consider the original model, where the number of servers is random (but fixed for all time) having the value s \Gamma NL , where NL has a Poisson distribution with mean mL . That is, we consider the BD model in Section 3, where the number of servers is s \Gamma k. The arrival rate - and mean service time - \Gamma1 must be appropriately reduced to account for the removal of the especially long service times. For each m, say, we compute the steady-state distributions for the BD model with servers. The performance measures for the models with servers can then be averaged with regard to the Poisson probabilities of k servers being busy serving the long service times, but it may be more revealing to look at the conditional performance measures for fixed k, given those k whose likelihood is considered sufficiently large. Tables and plots of both the probability of k servers being used by the long-service-time customers and the conditional performance measures for the remaining customers given s \Gamma k servers, as a function of k, should provide useful insight. 10. Coping With Other Model Deviations We conclude by briefly discussing other possible deviations from the basic BD model and how they might be coped with. Serious investigations of these procedures represent topics for future research. Time Dependence. Perhaps the most common difficulty is that the arrival process can be nonstationary. In many applications a reasonable model for the arrival process is a nonhomogeneous Poisson process with deterministic arrival-rate function -(t) that varies over time; e.g., see Chapter 6 of Hall [14]. The service-time distribution may be time-dependent as well. One approach to this complication is to apply numerical methods to solve the time-dependent BD process, obtained by working with -(t) and -(t) instead of - and -. A specific algorithm based on a discrete-time approximation is given in Davis, Massey and Whitt [6]. References are also cited there to sources applying the related Runge-Kutta methods to numerically solve the ordinary differential equations. A simple approximation for the time-dependent distribution of the time-dependent BD process is the pointwise stationary approximation (PSA), which is the steady-state distribution of the BD process calculated in terms of the arrival-rate and service-rate functions -(t) and -(t) as a function of time t. If -(t) varies significantly over time, then the PSA is often a far better description than the BD model with the long-run average arrival and service rates; e.g., see Green and Kolesar [12]. The PSA is also asymptotically correct as the arrival and service rates increase which corresponds to the rates changing more slowly; see Whitt [29]. In other words, the steady-state analysis here is directly applicable as a reasonable approximation when the arrival and service rates fluctuate if it is applied over suitable subintervals over which these functions do not change much. The estimated rates are then averages over these subintervals. A complication where time-dependence is recognized is that it becomes necessary to estimate the functions -(t) and -(t) instead of the single parameters - and -. Appropriate data smoothing is thus often required. Non-Exponential Service-Time Distributions. We have considered how to exploit non-exponential service-time distributions to predict delays in Section 6. However, non-exponential service-time distributions also will tend to invalidate the BD model predictions. The congestion is likely to be greater (less) if the service-time distribution is more (less) variable than exponential. The impact of a non-exponential service-time distribution can be at least roughly estimated by examining its impact on the related M/G/s/1 pure-delay model; e.g., see Whitt [30] and references cited there for simple approximations. The impact of a non-exponential service-time distribution should be negligible if the arrival process is Poisson and the probability that all servers are busy is small, because the M/G/s/0 and M/G/1 models have the insensitivity property. However, the steady-state behavior conditional on all servers being busy should be significantly affected by the service-time distribution beyond its mean. In Section 8 we proposed a way to study the impact of a few exceptionally long service times. If the service-time distribution can be regarded as approximately exponential after removing such exceptionally long service times, then the modified BD analysis in Section 8 should be successful. Similarly, if there is an excess of customers with very short service times, then they could be ignored. The resulting lower arrival rate and higher mean service time of the remaining customers may yield more accurate descriptions, assuming a BD model based on the approximate exponential distribution. Non-Poisson Arrival Processes. In many settings, the Poisson arrival process (possibly non- homogeneous) is natural, representing the result of many different customers making independent decisions. However, if the Poisson property is not nearly realistic, then the BD predictions can be far off. Non-Poisson processes arise naturally when the arrival process is itself an overflow process from another group of servers. One way to approximately cope with non-Poisson stationary arrival processes is to substitute time-dependence or state-dependence for the stochastic dependence in the actual arrival process. The use of time-dependence is to reverse the approximation procedure discussed in Massey and Whitt [20]. In our setting with balking and reneging, the time-dependent birth-and-death process may be substantially easier to analyze than the stationary model with a non-Poisson arrival process. Alternatively, we can try to approximately represent stochastic variability by a state-dependent arrival rate. In particular, we could use the Bernoulli-Poisson-Pascal (BPP) model in which the arrival rate - is replaced by the linear function - Choudhury, Leung and Whitt [5]. The less bursty binomial case corresponds to fi ! 0, while the more busty Pascal case corresponds to fi ? 0. All these analytical approximations can be substantiated by computer simulation. Acknowledgment . I thank Avishai Mandelbaum of the Technion for helpful pointers to the literature. --R Numerical Inversion of Laplace Transforms of Probability Distribu- tions Statistical Inference Under Order Restrictions Prakasa Rao Multiserver Queues with Impatient Customers An Inversion Algorithm to Compute Blocking Probabilities in Sensitivity of the Service-Time Distribution in the Nonstationary Erlang Loss Model A Unified Approximate Evaluation of Congestion Functions for Smooth and Peaky Traffic Control and Recovery from Rare Congestion Events in a Large Multi-Server System A Survey of Retrial Queues An Introduction to Probability Theory and its Applications Ordinary CLT and WLLN Versions of L The Pointwise Stationary Approximating for Queues with Nonstationary Arrivals Fundamentals of Queueing Theory Queueing methods for Services and Manufacturing Stochastic Models in Operations Research What to Tell Customers in Waits of Different Lengths: An Integrative Model of Service Evaluation. Prescription for the Waiting-in-Line Blues: Entertain Extremes and Related Properties of Random Sequences and Processes Key Role of Integration in Call Centers Extreme Values Multiservice Loss Models for Broadband Telecommunication Networks New York Resource Sharing for Efficiency in Traffic Systems. Waiting for Service: The Relationship Between Delays and Evaluations of Service. Blocking When Service Is Required from Several Facilities Simultaneously The Pointwise Stationary Approximation for M t Approximations for the GI/G/m queue Stochastic Modelling and the Theory of Queues --TR --CTR Jihong Ou , B. Madhu Rao, Benefits of providing amenities to impatient waiting customers, Computers and Operations Research, v.30 n.14, p.2211-2225, December K.-H. Chang , W.-F. Chen, Admission control policies for two-stage tandem queues with no waiting spaces, Computers and Operations Research, v.30 n.4, p.589-601, April Cory Beard, Preemptive and delay-based mechanisms to provide preference to emergency traffic, Computer Networks and ISDN Systems, v.47 n.6, p.801-824, 22 April 2005 Indranil Bose , Kemal Altinkemer, Design of a web site for guaranteed delay and blocking probability bounds, Decision Support Systems, v.38 n.1, p.131-140, October 2004 Avishai Mandelbaum , Nahum Shimkin, A model for rational abandonments from invisible queues, Queueing Systems: Theory and Applications, v.36 n.1-3, p.141-173, 2000 Amy R. Ward , Peter W. Glynn, A Diffusion Approximation for a GI/GI/1 Queue with Balking or Reneging, Queueing Systems: Theory and Applications, v.50 n.4, p.371-400, August 2005 Amy R. Ward , Peter W. Glynn, A Diffusion Approximation for a Markovian Queue with Reneging, Queueing Systems: Theory and Applications, v.43 n.1-2, p.103-128, January-February Adam Wierman , Mor Harchol-Balter, Classifying scheduling policies with respect to higher moments of conditional response time, ACM SIGMETRICS Performance Evaluation Review, v.33 n.1, June 2005 Yong Tan , Kamran Moinzadeh , Vijay S. Mookerjee, Optimal Processing Policies for an e-Commerce Web Server, INFORMS Journal on Computing, v.17 n.1, p.99-110, Winter 2005 Bernadette Desert , Hans Daduna, Discrete time tandem networks of queues effects of different regulation schemes for simultaneous events, Performance Evaluation, v.47 n.2, p.73-104, February 2002 Oualid Jouini , Yves Dallery, Predicting queueing delays for multiclass call centers, Proceedings of the 1st international conference on Performance evaluation methodolgies and tools, October 11-13, 2006, Pisa, Italy Yong Tan , Vijay S. Mookerjee, Allocating Spending Between Advertising and Information Technology in Electronic Retailing, Management Science, v.51 n.8, p.1236-1249, August 2005
Birth-and-Death Processes;balking;reneging;Telephone Call Centers;abandonments;service systems;Communicating Anticipated Delays;retrials
311278
A feedback based rate control algorithm for multicast transmitted video conferencing.
This paper presents a feedback based rate control algorithm for video conferencing on the Internet. This algorithm adaptively controls the transmission rate of a video stream, which is being multicast to a heterogeneous group of receivers. The fact that the sender is transmitting a single video stream to many receivers introduces a number of issues. These issues include the variable nature of the available network resources and the fact that there is no easy way to determine the availability of these resources. In addition, even if we were able to track closely the changing network conditions, the best transmission rate for the aggregate means a trade off between high and low end receivers. The algorithm presented in this paper, called the Target Bandwidth Rate Control Algorithm, dynamically controls the output rate of the video coder by receiving and processing bandwidth levels from each receiver in the videoconference. The goal of this algorithm is to maximize the aggregate amount of video displayable at the receivers. This algorithm also allows us to limit the worst case loss experienced by the low-end receivers. In addition to considering the available network bandwidth in the feedback information, this algorithm allows for workstation and user requirements to be considered when determining the senders output rate. In order to show the effectiveness of this approach, we first analyze the algorithms performance in a simulation environment. In this set of tests we study the effects of different configurations of receivers in terms of the number of receivers and availability of resources. Additionally, we have implemented this algorithm in the VIC video conferencing system in order to analyze its effectiveness under real network conditions.
Introduction The Internet has evolved from being heavily data oriented, to providing a whole range of services including voice, video telephone and video conferencing. In addition to these different traffic types, the resources in the Internet are very heterogeneous. From the end user's perspective, this heterogeneity includes both the network and workstation resources. In order for applications to co-exist in this type of environment, some type of adaptive control algorithm is needed. In this paper we present a rate control algorithm designed to work with multicast transmission videoconferencing applications. The problem we address consists of a videoconference between a sender, who captures, encodes and transmits the video and one or more heterogeneous receivers. As shown in Figure 1, this heterogeneity includes differences in workstation resources, local connections to the Internet, types of Quality of Service (QoS) guarantees, and the amount of bandwidth available on the different network paths between the sender and the receivers. In this type of multicast environment we have imperfect knowledge of the current state of the network resources. At best, a receiver can tell how much they are currently receiving and if they are experiencing packet loss. In addition, since multicast transmission involves one sender and many receivers, obtaining timely feedback is difficult without negatively impacting the video sender. The problem is more complex since the network is dynamic and will change. Even if an algorithm existed that could know the current state of the network, there would still be a need to determine a transmission rate that trades-off between Figure Workstations under-utilizing the available resources for the high-end users, and high levels of packet loss for the low-end users. Therefore, videoconferencing control algorithms attempt to pick a rate that maximizes the bandwidth usable at the receivers and adapt this rate on the basis of estimates of the current network conditions. Many algorithms for controlling the amount of bandwidth used by a video application have been proposed over the past few years. These approaches may be classified on the basis of who manages the control algorithm, the sender [1, 2, 3, 4, 5, 6] or receiver [7, 8, 9, 10] (see Figure 2). In this paper we are concerned with sender managed feedback control. These types of algorithms rely on measurements from the network or receiver of the current availability of resources. Some of the measurements include packet loss, buffer usage, and packet arrival jitter. In this paper we propose a new feedback control algorithm developed specifically to support the multicast transmission of video over the Internet. The feedback metric is the received bandwidth as determined by the receiver. This algorithm is different from its predecessors because as it adjusts the sender's transmission rate based on receiver's feedback, it attempts to maximize the usable bandwidth based on the correlation between packets lost in the network and those discarded on the receiver's workstation. Motivation The goal of our video conferencing control algorithm is to pick a transmission rate that maximizes the usable bandwidth on the receiver's workstation. Usable bandwidth is the amount of video that the receiver is actually able to display. This quantity is dependent on the transmission rate of the sender, the Video Control Sender Controlled Receiver Controlled Feedback Control Network Information Receiver Information Resource Reservation Load Shedding Multiple Multicast Channels Multiple Groups Multiple Stripes Hierarchical Frame Rate Figure 2: Control Algorithms for Multicasted Video Conferencing network bandwidth available between the sender and the receiver (and therefore the network loss) and the characteristics of the video coder. The reason the displayable bandwidth is not solely dependent on the transmission rate and the packet loss is due to the restrictions of the encoding/decoding process. These restrictions determine the amount of the video and therefore, the number of packets that must be received successfully before the decoding process may be run. The amount of this dependency is called the application level framing (ALF) [11]. This ALF may range from one packet to an entire frame. If this unit is greater than one packet we have a dependency between packets. This dependency will cause the loss of usable bandwidth at the receivers to be greater than the loss in the network. As an example, if the ALF is one video frame and there are 20 packets on average per frame, then the loss of one packet in the network will translate into 19 packets being thrown-away on the workstation. A maximization function is required in order for a control algorithm to compensate for the dependency between packets. This function determines a new transmission rate, which maximizes the usable bandwidth, based on the receivers' feedback and an estimate of the workstation loss. Figure 3 gives and example of this type of function. In order to estimate the workstation loss this function uses the calculated network loss times the current average packets per frame. While a more detailed regression analysis is possible to determine the relationship between network loss and workstation loss, the use of average packets per frame gives a good first approximation. We will show that this approximation works well in practice. Goal: Find the new Transmission Rate T that maximizes the displayable bandwidth at n receivers: )_ _ loss workstatio estimated Where rate feedback if otherwise frame per packets loss network loss workstatio estimated _) _ _ _ _ _ feedback_rate i is the current estimate of the available bandwidth between receiver i and the sender Figure 3: Maximization Function Once the new transmission rate has been calculated, a mechanism to modify the video stream needs to be considered. There are many attributes, which may be adjusted in order to adapt the coder's output rate to meet the new transmission rate. These attributes may be classified as either temporal or spatial [7]. The temporal attributes concern adjusting the rate at which frames are encoded. The spatial attributes relate to the quality of the image transmitted. These quality variables include the number of bits used to represent the color in the image, the number of pixels in the image, the compression algorithm's key frame distribution, and the amount of lossy compression (quantization) applied to the image [12, 13]. Since each of these attributes affect the coder's output rate differently, the feedback control algorithm needs to allow the sender to determine the best setting for each of these attributes based on the calculated transmission rate. As mentioned previously, our algorithm uses feedback from the receivers in order to adjust the output rate of the video coder. In addition to network constraints, our control algorithm allows for the consideration of the available workstation resources and the user's priority of the video application [14] in determining the receivers' feedback rate. If the receiving workstation is unable to provide the necessary resources to process the incoming video stream, some type of implicit or explicit load shedding will take place [14, 15]. While this load shedding will not cause the video display quality to degrade as quickly as network packet loss, it may cause a jerky image display and wastes available workstation resources. The algorithm may also consider the priority of the receiver's application. In a multitasking environment, the user on the receiving end may determine that the video application is of lower importance and may wish to limit the amount of resources committed to receiving and displaying the video stream [14]. While this paper focuses on the impact of network constraints on the control algorithm, our algorithm allows for workstation resource and user priority requirements to be considered when determining the video coder's output rate. The remainder of the paper is organized as follows. In Section 2 we give a brief introduction to the VIC [16] video conferencing system, the MBone [17, 18] and RTP [19,20]. We then discuss an RTP based feedback control algorithm, which has been presented in the literature. In Section 3, we present our Target Bandwidth (TB) control algorithm and give details of how this algorithm was incorporated into VIC. Section 4 discusses the simulation setup used to test the TB algorithm and presents the performance results of the simulations. Section 5 contains a simulation performance analysis of the algorithm. Section 6 presents the VIC performance results. Finally, Section 7 summarizes the paper and identifies future work. 2. Background In this section we examine the VIC application and some software it uses to support video conferencing in the Internet. This software includes the MBone and the Real-Time Transport Protocol (RTP). Following this discussion is an introduction to an RTP based Packet Loss Rate Control algorithm. This algorithm was developed to control video conferencing application on the Internet. We will use this algorithm as a base case as we analyze the performance of our algorithm. In order to see how the TB algorithm performs in a live networking environment, we have modified a version of the VIC application to include our rate control algorithm. VIC is a video conferencing system developed at UCB/LBL. This system, like the earlier video conferencing tools nv and IVS [21], utilizes IP-multicast and the MBone to deliver video streams over the Internet. VIC provides a flexible user interface and supports multiple compression algorithms. It utilizes the Real-Time Transport Protocol in order to transport the video stream and to deliver control messages between the sender and the receivers. Readers interested in a more detailed description of VIC are referred to [16]. To facilitate the use of IP-multicast over the Internet, VIC utilizes the MBone. The MBone is a virtual multicast network, which operates on the Internet. To support the distribution of multicast data, the MBone utilizes MBone servers running a multicast routing daemon called mroute. These routing daemons are geographically distributed and forward multicast packets to the local receivers. From the sender's point of view, the MBone environment looks like a rooted tree with the sender as its root, the mroute daemons as the interior nodes and the receivers as the leaf nodes. We discuss VIC's use of the MBone later as a way to provide scalability in our rate control algorithm. Real-Time Transport Protocol (RTP) VIC utilizes RTP for data and control packet delivery. RTP is under development by the Internet Engineering Task Force, Audio-Video Transport Working Group [22,23]. RTP is being developed for applications requiring real-time services such as video conferencing. It will facilitate the implementation of services such as playout synchronization, active-party identification and media identification. RTP does not provide the underlying end-to-end transport protocol but will work with transport protocols such as UDP. RTP also provides a control protocol called RTCP. An example of how this would work for a video application is shown in Figure 4. While RTCP packets may be used for many purposes, they are of interest to us because they provide the means to transmit feedback information between the receivers and the sender. This feedback is transmitted in an RTCP Receiver Report packet. A Receiver Report packet is a control packet that is transmitted by all receivers participating in the videoconference. A part of the receiver report is a QoS feedback field that may be used to convey information such as packet loss and packet inter-arrival jitter. In the Target Bandwidth algorithm, we propose putting the receivers' feedback rate in this field. Readers interested in a more detailed description of RTP are referred to [23]. Packet Loss (PL) Algorithm An example RTP based rate control algorithm is based on measuring packet loss at the receivers. This packet loss algorithm was initially discussed in [2,4] and was later refined by Schulzrinne et al. in [1]. We present an overview of this algorithm in order to compare its performance against the Target Bandwidth algorithm. The packet loss algorithm uses RTP receiver reports to determine the packet loss being experienced by the receivers. This loss information is used to modify the video coder's output rate. There are four major steps in this control algorithm. (Figure 5 shows an overview of the algorithm. This figure is a modified version of the one found in [1].) The steps are: 1) For each receiver determine the packet loss rate. Classify each receiver as UNLOADED, LOADED or CONGESTED. Determine the corrective action necessary based on the percentage of users in each classification. The options are to increase, decrease or hold constant the coder's output rate. Advantages of this algorithm include its ability to decrease the overall packet loss rate and to follow changes in network bandwidth. In addition, the packet loss information may be calculated without the aid of the video application. Therefore, this approach is fairly independent of the application and only requires application involvement in the final step. On the other hand this algorithm does have some Sender Application UDP IPMulticast Internet Receiver Application UDP IP Receiver Application UDP IP Figure 4: Video Application with RTP limitations. One major limitation is that this algorithm does not take into account and adjust to the dependency between packets. Therefore, the algorithm may over or under transmit depending on the current size of the application level framing. In addition, since this algorithm does not look at the effects of its transmission rate on the low-end receivers it may over-transmit and cause the low-end receivers to be able to display little or none of the video signal. Also, our simulations show this algorithm may oscillate for certain configurations. This oscillation, or continuous fluctuation between transmission rates, is due to the dynamic interaction of some of the algorithm's parameters. Finally, since packet loss and packet size are application and platform dependent it is difficult to make a direct translation between packet loss and the workstations' available resources or the users' priorities of the video application. Therefore, considering this information in the control algorithm would be difficult. 3. Target Bandwidth Algorithm In this section we introduce the Target Bandwidth (TB) Algorithm. The goal of this algorithm is to maximize the bandwidth utilized at the receivers while attempting to limit the maximum loss experienced by any individual receiver. In addition to considering the availability of the network resources this algorithm allows for user and workstation requirements to be considered when generating a receiver's feedback. This algorithm consists of two components. These are the receiver feedback component, which is run on each receiver's machine, and the sender's rate calculation component, which is run on the sending workstation. The receiver component is responsible for generating the feedback that reflects the receiver's Packet Loss Low-pass FilterL c Loss % Calculate new_smoothed_loss_rate: (for each receiver) Receiver Classification: (for each receiver) LOADED CONGESTED UNLOADED Determine Action: Increase Rate Decrease Rate Hold Rate Constant Adjust Rate: Multiplicative Decrease Additive Increase Figure 5:Packet Loss Rate Control Algorithm (modified from [1]) current ability to receive and process the video stream. The sender component is responsible for collecting the receiver's feedback and calculating a transmission rate, which maximizes the displayable bandwidth. By displayable bandwidth, we are referring to the amount of the video stream that is usable by the receivers. This bandwidth will vary from the transmitted bandwidth depending on the amount of packet loss in the network and the dependency between packets. This dependency between packets, refers to the number of packets that must be received before the decoder may proceed. In the smallest case each packet may be independently decoded. In other cases, the entire frame must be successfully received before any decoding may take place. Therefore the loss of one packet will cause the entire frame to be lost and translate into a very large loss in usable bandwidth. Receiver Calculation The focus of the receiver's calculation is the availability of the network resources. This calculation uses a slow startup algorithm similar to TCP to estimate the current available bandwidth. If the receiver is experiencing packet loss, then the receiver's network feedback rate is set to (1+increase_rate) times the currently received bandwidth, where increase_rate is set to a, a small value such as 0.02. If the receiver is not experiencing packet loss, then the receiver's feedback rate is calculated by first doubling the increase_rate (e.g., 0.04, 0.08) and then multiplying (1+increase_rate) times the currently received bandwidth. In order to prevent very large fluctuations in the feedback rate we limit the increase_rate to some predetermined maximum. See Figure 6 for the pseudo code for the network feedback rate calculation. Unlike many feedback algorithms the actual calculation of the available bandwidth is performed on the receiver. This allows us to consider requirements in addition to the current network availability. Examples include the user's priority of the application and workstation conditions. By translating these requirements into a common unit such as bits/sec (bandwidth) we can include the requirements in our receiver's feedback calculation. As an example, if the user designates the video application as a lower priority, we can set the feedback rate to some preconfigured minimum rate. While the actual calculation of these two rates is beyond the scope of this paper, an example of how they may be used is discussed in the VIC implementation section. Sender Calculation The sender's calculation is focused on maximizing the usable bandwidth at the receivers. Since the sender wishes to maximize the aggregate, some receivers will receive less then their maximum rate while others will experience some packet loss. The sender collects the receiver's feedback rates and then determines the new transmission rate, which maximizes the receiver's usable bandwidth. In order to estimate the effects of changes in the transmission rate on the receiver's usable bandwidth, the maximization algorithm takes into account the application level framing and the corresponding dependency between packets. The sender's algorithm is as follows: Collect the receivers' feedback: feedback_rate i Using the estimate of workstation loss find a transmission_rate that maximizes the displayable bandwidth. (See maximization pseudo code in Figure 7) Smooth and filter-out fluctuations in the transmission rate and pass the new rate to the sender's video coder. The sender's algorithm's second step calculates the new transmission rate. This calculation is based on the maximization function presented earlier (Figure 3). As discussed earlier this function calculates the If (packet_loss) { increase_rate else { increase_rate *2 if (increase_rate > MAX_INCREASE) increase_rate Note: This part of the algorithm is run on each receiver and the feedback_rate is transmitted to the sender for use in the calculation of the sender's transmission rate. Figure 6:Receiver's pseudo code For { { if (temp_rate > feedback_rate j ) If (estimated_workstation_loss / temp_rate > b) { break-out-of-inner-loop if (value > max_value) { Figure 7: Sender's maximization pseudo code transmission rate that maximizes the receiver's usable bandwidth by estimating the loss of workstation bandwidth. This estimation is based on the application level framing and the corresponding dependency between packets. One shortcoming of this maximization calculation is that some lower-end receivers may experience unacceptable loss. To prevent this from happening the algorithm has been modified to reject a transmission rate where any receiver's estimated displayable bandwidth is less than b% of the transmitted bandwidth. The final step in the sender's algorithm is to smooth and filter-out large and small short-term (1 to 2 seconds) fluctuations in the transmission rate. The smoothing is done by taking the average of the last h calculated transmission rates. This smoothing prevents large short-term fluctuations from completely dominating the transmission rate. The drawback to this smoothing is it decreases the responsiveness of the algorithm too long-term (tens of seconds or greater) changes in available bandwidth. The second part of this step is to filter out small fluctuations in the transmission rate. This filtering is done by actually only changing the sender's transmission rate if the new calculated rate has increase/decreased a small percentage. Taken together this smoothing and filtering allows the algorithm to remain stable for the majority of the users while short-term bursts (such as a small file transfer) only effect a few receivers. In our simulation and applications runs we have seen that as the network noise levels increase the low-end receivers begin to drag down the transmission rate. To reduce the effects of these variations the smoothing the filtering values may be increased. It is important to realize that by increasing these values we are reducing the responsiveness of the algorithm to change and therefore increasing the packet loss on the low-end receivers. There are four key details that allow this algorithm to perform well in a heterogeneous environment such as the Internet. First, the algorithm works with existing network protocols and technologies. Second, the dynamic transmission rate is based on both changes in the video coder and the receiver's resource availability. Third, since the receivers are responsible for generating their own estimates of the available resources, the algorithm allows for the inclusion of other factors such as workstation availability and user priorities. Fourth, the algorithm uses a calculated packet loss rate to sense the state of the network. In most transmission paradigms, packet loss is not acceptable. In the case of multicasted video, some loss is to be expected unless the transmission rate is set to the minimum of all receivers. Therefore, the algorithm intentionally sets the receiver's target rate to have a minimum of a% packet loss. It then monitors the actual loss rate to determine if there has been a change in resource availability. Implementation In order to incorporate our TB algorithm into VIC, we made several modifications. On the sending side, VIC was modified to receive and process the receivers' control feedback information via RTP Receiver Reports. This information is then used to calculate the new target bandwidth rate, which is then passed to the encoder. The encoder then modifies its quality parameters (i.e., frames per second) to meet this new target rate. On the receiver side, the VIC application was modified to calculate the receiver's feedback rate. On a periodic basis, the receiver component of the algorithm is executed and the receiver's feedback is calculated based on the bandwidth received and the current packet loss status. This feedback is then transmitted back to the sender via the RTP Receiver Reports. In order to allow the TB Algorithm to run more efficiently in a real environment, two modifications were made to the basic algorithm. First, a procedure was needed in order maintain the feedback information from each receiver. This was implemented via a hash table using the receiver's RTP ID as the hash key. In addition, a flag was added to each hash table entry in order to facilitate the removal of any outdated receiver that may have terminated without informing the sender. By maintaining this hash table, we are able to negate the effects of the asynchronous nature of feedback information. The second improvement to VIC is the inclusion of user priority of the application into the receiver feedback calculations. In VIC, the receiver has the ability to leave the video image in a thumbnail size (icon size) or to increase its size. In our implementation of VIC, if the user does not increase the image size, we set the maximum feedback rate to 750kb/s. In this way, users are able to specify the priority of their video application. While more complex uses of the user priority feedback are possible, our VIC implementation provides insight to the usefulness of this information. Algorithm Timing The components of the algorithm on both the sender and receiver are executed periodically. Several factors need to be considered when setting the algorithm's control cycle time. These factors include the overhead on the sender for processing the feedback information and the responsiveness of the algorithm to change. Longer cycle times reduce the overhead of the RTP Receiver Reports on the sending workstation but decrease the responsiveness of the algorithm to changes in network conditions. Since a longer response time only significantly affects a receiver if there is a decrease in the available bandwidth, we are trading off the quality of the video displayed on the low-end receivers versus the overhead of the control algorithm on the sending workstation. We have found that a cycle time of 5 seconds is responsive to changes, while generating less than 10kb/s of traffic for 150 receivers. Scalability As the number of receivers in the videoconference grows, the issue of scalability of the control algorithm needs to be addressed. While the overhead of the receivers' control feedback is minimal and may be adjusted by increasing the duration of the control cycle time, at some point this overhead may become detrimental to the functioning of the sending machine or the network. One approach to reduce this overhead is to perform some type of consolidation of the data prior to it reaching the sending machine. From the sender's point of view, the MBone multicast environment looks like a rooted tree with the sender as its root. We propose using this MBone multicast tree as a reduction tree allowing the interior nodes (mroute daemons) to receive the feedback from the receivers, consolidate it and transmit it back to the root (sender). The consolidation at each interior node will consist of quantizing the incoming feedback into buckets and keeping track of the number of receivers in each bucket. If the number of buckets is kept sufficiently small (< 500) the feedback from an interior node to the root may be done in one packet. This packet would contain the number of receivers in each bucket. In this way, the sender only receives one message from each interior node with a fixed number of buckets regardless of the number of users. Internet Quality of Service Guarantees There has been significant research for providing Quality of Service (QoS) guarantees on the Internet. These QoS guarantees involve providing a user's connection with a guaranteed bandwidth given certain delay and peak rate constraints. One such approach is the Internet Engineering Task Force's Resource Reservation Protocol (RSVP) [24]. RSVP is being developed to provide QoS guarantees to multicast connections in the Internet. For the foreseeable future, Internet applications will need to exist in a mixed RSVP/Non-RSVP environment (see Figure 1). One benefit of the TB algorithm is its ability to support such an environment. For the RSVP users, the receiver's feedback rate may be the RSVP guaranteed rate. receivers would use the standard TB algorithm's calculation for their feedback rate. 4. Simulation We analyze the Algorithm's performance using both a simulation model and the VIC implementation. The simulation model allows us to analyze the performance of the algorithm under many different environmental conditions, which would be nearly impossible to control in a real implementation. This section provides an overview of the simulation model used to generate the performance statistics. The simulation model was implemented using C++ and CSIM [25], an event driven simulation package. This model may be broken up into three main components. These components include the Sender, Receiver, and Rate Control components (see Figure 8). The simulation parameter settings are shown in Figure 9. The functionality of the Sender component is to generate frames that are broken up into packets and placed in the receivers' input queues. The input into the Sender is the coder output rate (bandwidth), which has been determined by the Rate Control component. The Sender determines the frame rate and average frame size, based on the current coder output rate, and generates frames. These frames are broken into packets and passed onto the Receiver component. The second component in the simulation model is the Receiver component. In an actual simulation run, the set of receivers is modeled as an array of the Receiver components. The Receiver component may be divided into two subcomponents. These are the network and workstation subcomponents. The network subcomponent is modeled as a single server with a fixed sized buffer. The inputs into the network are the current network bandwidth and a packet received from the Sender component. The packets are placed into each network's buffer and then processed by holding the network's server for packet_size/network_bandwidth time. Any packets that are received while the buffer is full are discarded. The second subcomponent of the Receiver is the workstation subcomponent. The main functionality of the workstation subcomponent is to collect the packets from the network and determine the necessary information for the rate control algorithm. The workstation subcomponent is also able to provide us with Frame Rate Generator (converts Coder Output Rate to Frame Rate) Create Frames Network Workstation Frame Rate Packets Packets Feedback Rate Control New Rate Algorithm New Coder Output Rate Net_Bandwidth Network Server hold Packsize/Net_Bandwidth Packet Buffer of size N Frame buffer Sender Networks Workstations Figure 8: Simulation Model measurement information regarding frame loss versus packet loss and allows us to test the user priority aspects of the Target Bandwidth rate control algorithm. The final component in the simulation is the Rate Control component. This component is responsible for collecting the control information from the receivers and running the rate control algorithm. We have implemented both the Target Bandwidth and Packet Loss rate control algorithms. The output of the Rate Control component is the coder's output rate, which is used as input into the Sender component. Parameter Value Max_increase 20% Min_increase (a) 2% Max_loss (b) 60% Smoothing Filtering -2% Figure 9: Simulation Parameter Settings 5. Simulation Performance Analysis There are a number of simulation conditions that may be varied in order to understand the performance of the algorithm. In this section, we analyze how the following variations affect the Background network noise levels (short term fluctuations in the network bandwidth) Changes in video coding parameters (dependency between packets) Large, long term network fluctuations and changes Receiver group sizes and different distributions of network resources The first simulation analyzes the effect of short-term network noise. In this simulation, we model short term network noise using a negative exponential distribution. The amount of network noise was modified by varying the noise mean rate from between 1% to 20% of the total network bandwidth. Figure 10-a shows the transmission rate and Figure 10-b shows the average usable bandwidth for simulation runs with noise mean rates of 5%, 10%, 15% and 20% for both the TB and PL algorithms. These graphs show that both algorithms remain fairly stable at noise levels of 5% and 10%, with two exceptions. At simulation time 343 and again at 438 the TB algorithm experiences a period of large adjustment. These are due to a small number of receivers experiencing heavy short-term congestion. This identifies one of the weaknesses of the algorithm. Since the algorithm attempts to adjust quickly to fluctuations and restricts the maximum loss rates of the lower end users, the algorithm may be strongly affected by the loss rates of a few low-end receivers. The alternative is to ignore the losses experienced on the low-end receivers, but as we show later this leads to those receivers experiencing unacceptable loss rates. Figure also shows the effects of noise mean levels of 15% and 20%. At these levels of noise both algorithms tend to become unstable, with the TB algorithm being heavily effected by the low-end receivers. Sender Transmission Rate20000060000010000001400000 Time (sec) Bandwidth Trans PL Trans 5% 10% 15% 20% Average Usable Bandwidth20000060000010000001400000 Time (sec) Bandwidth Usable Bandw PL Usable Bandw 5% 10% 15% 20% Figure In the next set of simulations we examine at the effects of changes in the video coding parameters. Specifically, changes in the dependency between packets. Figure 11-a,b,c,d shows the results of these simulations. In Figure 11-a we see the changes in the transmission rate of the video coder as the dependency between packets moves from an average of 1 packet (e.g., all packets are independent and may be decoded individually) to a dependency of 20 packets. As can be seen in Figure 11-a, the transmission rate for the TB algorithm is higher for small packet dependencies but adjusts to lower rates as the dependency increases. This is due to that fact that as the dependency between packets increases the effects of packet loss on the receiver's increases. Therefore, a higher dependency between frames requires a lower transmission rate in order to accommodate the low-end receivers. Since the PL algorithm does not take packet dependency into account, it does not adjust its transmission rate as the dependency changes. Figure 11-b shows how this adjustment in transmission rate effects the average usable bandwidth at the receivers. As this figure shows, in the smaller dependency case the TB algorithm achieves a much higher usable bandwidth. As the dependency between packets increases both algorithms begin to converge on Sender Transmission Rate3000009000001500000 3 48 93 133 178 218 263 308 348 393 Time (sec) Bandwidth Trans PL Trans ~1 Packet per frame ~5 packets per frame Packets per frame Packets per frame Average Usable Bandwidth3000009000001500000 3 48 93 133 178 218 263 308 348 393 Time (sec) Bandwidth Usable Bandw PL Usable Bandw Lowest 7 Receivers Usable Bandwidth20000060000010000003 48 93 133 178 218 263 308 348 393 Time (sec) Bandwidth Lowest 7 Receivers Usable Bandwidth20000060000010000003 48 93 133 178 218 263 308 348 393 Time (sec) Bandwidth (D) Figure the same average usable bandwidth. If we combine the results from Figure 11-a and Figure 11-b during the periods of high dependency (simulation time between 213 and 408 seconds), we see that the PL algorithm is transmitting at a higher rate but the usable bandwidth is the same as the TB algorithm. The effects of this over-transmission can be seen in Figure 11-c and Figure 11-d. These figures show the usable bandwidth for the lowest 7 receivers. As these figures show, during the last 200 seconds of the simulation the low-end users of the PL algorithm experience a significant amount of loss in usable bandwidth. In some cases 2-3 receivers are receiving none of the video signal for 15 seconds or longer. In contrast, during the majority of this time the receivers (Figure 11-c) are receiving a significant portion of the video signal. Based on many simulation runs over varying distributions we have found that for cases with small packet dependencies the algorithm tends to have a higher transmission rate and higher average usable bandwidth without the negatively effecting the low-end receivers. As the dependency grows the algorithm will tend to transmit at a lower rate than the PL algorithm. While the effects of the higher transmission rate of the PL algorithm on the average usable bandwidth are mixed, (we show later there are receiver distributions where the PL algorithms average usable bandwidth is much higher than the Algorithms) this higher transmission rate has significant negative effects on the low-end receivers. The final set of simulations study the effects that different distributions of receivers' network resources and the number of receivers has on the sender's transmission rate, the receiver's average usable bandwidth and the low-end receiver's usable bandwidth. In our simulations we analyzed runs with receiver sizes of 10, 30, 75 and 150 users. In order to simplify our discussion we have included only data for runs with 75 users. In addition we examine three different distributions of receiver's resources. These receiver bandwidth distributions are show in Figure 13 for receiver size of 75. These figures show the approximate mean rate for the receivers at the start of the simulation. While the mean rate of the receivers' bandwidths varies during the simulation, the overall shape of the distribution remains fairly constant. In order to understand the effects of the different distributions and varying number of receivers we ran our simulation over dynamic network bandwidth conditions. These simulations are meant to look at longer term (tens of seconds to minutes) and larger fluctuations in available network bandwidth. Figure 12 tracks how the average receiver bandwidth varied over time for our final simulation runs. The actual bandwidth amounts, in Figure 12, were intentionally left off since they will vary based on the distribution of the receivers. Figure 14 (a,b,c,d) , Figure 15 (a,b,c,d), Figure 16 (a,b,c,d) show the results of the simulation runs for 75 receivers using the conditions in Figure 12 for the three distributions in Figure 13. Figure 14-a, Figure 15-a, and Figure 16-a show the transmission rates for all three distributions for 75 receivers. These figures show that the PL algorithm is more aggressive in its transmission rate, especially at the higher transmission rates. This is due to the fact that the frame size is greater and therefore the dependency between packets is greater. The packet dependency forces the TB transmission rate lower. Figure 16-a, which displays results for the top-heavy distribution, shows that the PL algorithm is significantly more aggressive. The TB algorithm is constrained in the top-heavy distribution by the loss rates of the lower end receivers. As you can see in all three figures the PL algorithm tends to oscillate. As we will show later this oscillation negatively effects the usable bandwidth, especially on the low-end receivers. Network Bandwidth Fluctuations Timing and Relative Magnitude0.30.93 103 203 303 403 503 603 703 Time (sec) Relative Bandwidth Change Figure 12: Timing and Magnitude of bandwidth changes for the simulations shown in Figure 14, Figure 15, and Figure 16 Figure 14-b, Figure 15-b, and Figure 16-b show the average usable bandwidth on the receiver's. These graphs allow us to see the effects of the transmission rates across the entire 75 receivers. The average usable bandwidth for the PL algorithm in the top heavy and bottom heavy cases (Figure 14-b, Figure 16- b) is higher than the algorithm. This is due to the constraints of the lower-end users on the algorithm. While the average usable bandwidth is higher, we will show the negative effects on the lower-end receivers are significant. Figure 15-b shows that the average usable bandwidth in the normal distribution is comparable between the two algorithms. This is due to the tightness of the distribution of receivers. In the normal distribution the low-end receivers do not dominate the transmission rate for the algorithm. Top Heavy Distribution515 Receiver Bandwidth in Kb/sec of Receivers Bottom Heavy Distribution5386 547 709 871 1033 1195 1357 Receiver Bandwidth in Kb/sec of Receivers Normal Distribution1030386 547 709 871 1033 1195 1357 Receiver Bandwidth in Kb/sec of Receivers Figure 13: Receiver Distributions Sender Transmission Rate100000030000005000000 Time (sec) Bandwidth PL Trans.75.1 Lowest 7 Receivers Usable Bandwidth500000150000025000003500000 Time (sec) Bandwidth Lowest 7 Receivers Usable Bandwidth500000150000025000003500000 Time (sec) Bandwidth (D) Average Usable Bandwidth100000030000005000000 Time (sec) Bandwidth Usable Bandw.75.1 PL Usable Bandw.75.1 Figure 14 (A,B,C,D):Bottom Heavy Distribution, 75 Receivers While the average usable bandwidth graphs show how the algorithm's choice of transmission rate impacts the aggregate, it does not tell the entire story. Figure 14-c,d, Figure 15-c,d, and Figure 16-c,d show the usable bandwidth for the lowest seven receivers. Key points from these figures are: While both algorithms experience large dips in usable bandwidth during large drops in available bandwidth (simulation times 228, 448, 548), on the whole the lower end receivers fair much better under the TB algorithm. This is due to the algorithm restriction on the maximum loss in its transmission rate calculation. 2) For the PL algorithm the lowest receiver's experience considerable oscillation and extended periods of time when no usable bandwidth is being received. This is due to the more aggressive transmission rate that causes the lowest receivers to experience high packet loss rates. For the top-heavy distribution all seven low-end receivers experience periods of over 45 Lowest 7 Receivers Usable Bandwidth500000150000025000003500000 Time (sec) Bandwidth (D) Average Usable Bandwidth50000015000002500000350000045000003 103 203 303 403 503 603 703 Time (sec) Bandwidth Usable Bandw.75.4 PL Usable Bandw.75.4 Sender Transmission Rate50000015000002500000350000045000003 103 203 303 403 503 603 703 Time (sec) Bandwidth PL Trans.75.4 Lowest 7 Receivers Usable Bandwidth500000150000025000003500000 Time (sec) Bandwidth Figure (A,B,C,D):Normal Distribution, 75 Receivers Sender Transmission Rate100000030000005000000 Time (sec) Bandwidth PL Trans.75.2 Average Usable Bandwidth100000030000005000000 Time (sec) Bandwidth Usable Bandw.75.2 PL Usable Bandw.75.2 Lowest 7 Receivers Usable Bandwidth500000150000025000003500000 Time (sec) Bandwidth (D) Lowest 7 Receivers Usable Bandwidth500000150000025000003500000 Time (sec) Bandwidth Figure Receivers seconds when they are able to display none of the video signal. This can be seen starting at simulation times: 368, 518 and 593 in Figure 16-d. While the PL algorithm transmission rate for the normal distribution (Figure 15-d) is only slightly more aggressive than the algorithms, the oscillation in the transmission rate accounts for most of the heavy losses on the low-end receivers. In summary we have found that the TB algorithm adjusts well to fluctuations in network availability and changes in the video coder. In addition we have shown that the algorithm is successful at maximizing the displayable bandwidth at the receivers while limiting the maximum loss at the low-end receivers. One item that must be considered when utilizing this algorithm is the fact that a few low-end receivers may dominate the transmission rate. This is due to their impact on the maximization function. 6. VIC Results In order to analyze the performance of the algorithm's implementation in the VIC system we need to understand how changes in resource availability affect the low-end receivers. Therefore, a small set of users will be sufficient to test the performance of this implementation in varying network conditions. The environment used was MSU's ATM test bed. The configuration for this is shown in Figure 17. This configuration consists of four Sun Ultras connected to two Fore ATM ASX-200 Switches via 155mb/s links. In addition an HP analyzer was connected to the two switches to provide background traffic. This configuration was chosen because it gives us tight control over the available network capacity. In order to monitor the performance of the algorithm in these test environments, we utilized the PGRT Fore ATM Switch Fore ATM Switch Sun Ultra Sun Ultra Sun Ultra Sun Ultra Analyzer Figure Test Bed visualization system [26,27]. This system allowed us to monitor the performance of the VIC application on each of the workstations in real-time. In addition to providing an on-line performance tool, the BRISK system enabled us to extract the performance data for off-line analysis. The focus of these tests was similar to the tests run via simulation. These tests focused on how variations in network resources impact the algorithm's ability to operate effectively. The first test examines the effects of TCP traffic on the TB algorithm. In this test the HP analyzer was set up to consume 154 MB/s of the 155 MB/s link between the two ATM switches. This left a little over 1 MB/s for VIC and the TCP application. In this test we wish to determine how these two sources will interact. Using the same parameters as in the simulation model (Figure 9), the TCP source begins to dominate, see Figure 18. After one minute, the TCP source has begun to consume more bandwidth than the video application. In a separate simulation, not shown, we increased the smoothing parameter to 3 cycle times and the filtering parameter to -6%. These increases had two effects. In some of the runs these increased parameters tripled the time it took for the TCP source to dominate the link to over 3 minutes. In a subset of runs the TCP source was unable to acquire any of the link and timed out. Based on these findings we have come up with three conclusions. In the first test (2 cycle smoothing and filtering of -2%), long term TCP application will begin to dominate the link, while TCP applications of a few tens of seconds will interact well with the application. We tested this last point by FTPing small to medium size files (up to 2MB) over the congested link while VIC was running. While there was some fluctuations in the video transmission VIC versus a TCP Application Calculated Rate2006001000140011.3 51.5 91.6 132 172 212 253 293 333 374 414 Time (sec) Bandwidth W2 Receiver VIC versus a TCP application Usable Bandwidth2006001000140011 52 92 132 172 212 253 293 333 374 414 Time (sec) Bandwidth W2 Receiver Figure 18: VIC with TCP Traffic rate and loss in usable bandwidth, the two sources (FTP and VIC) were able to share the link. In the second test (3 cycle smoothing and filtering of -6%) the video application is fairly greedy. The tradeoff here is who should dominate the link, the long-term TCP application or the video source. This highlights the problem of multicasting video. Either the video application must transmit at the rate of the lowest receiver or there will be periods of congestion and someone will have to be greedy. This leads us to next point. In the current Internet, the routers use a drop-tail queue management mechanism. This type technique allows for some applications to dominate and other applications to starve. Current research into other queue management algorithms, such as RED [28], will help alleviate this problem. In this type of algorithm, no source is able to completely dominate the link. The second test involves the use of two video sources competing over the same link. The VIC application was first started between the workstation pair W1 and W2 and 130 seconds later on the pair W3 and W4. Figure 20 shows the results of this simulation. On this graph the lines for W1 and W3 represent the sender's target bandwidth rate. Lines W2 and W4 represent the receiver's feedback rate. As can be seen in this figure, as the second source is initiated the target bandwidth as determined by sender W1 drops to accommodate this new network demand. Once a state of equilibrium is reached, the two sources maintain a fairly stable target bandwidth rate as seen by lines W1 and W3. 7. Summary This paper presented a feedback based control algorithm for video conferencing on the Internet. This Dual VIC Application Calculated Time (sec) Bandwidth W3 Sender W4 Receiver W2 Receiver Dual VIC Applications Usable Bandwidth2006001000140018 58 99 139 179 219 260 300 340 381 421 462 502 542 Time (sec) Bandwidth W3 Sender W4 Receiver W2 Receiver Figure 20: Multiple VIC applications algorithm, called Target Bandwidth (TB), utilizes RTP control packets to transmit feedback information regarding the availability of the receiver's resources. The algorithm was designed to maximize the usable bandwidth at the receivers while limiting the maximum loss rate at the low-end receivers. In order to do this the algorithm estimates the loss at the workstation based on the receivers' feedback, the calculated network loss and the average packets per frame. From an implementation standpoint this algorithm uses exiting technologies and is of low complexity. In order to show the effectiveness of the TB algorithm, we analyzed it using a simulation model and in the VIC video conferencing application. The simulations allowed us to analyze the algorithms performance under dynamic networking conditions. We studied the effects of background network traffic, long-term fluctuations in network resources, changes in receiver group sizes and differences in the distribution of network resources. The results showed that the TB algorithm is stable under various network conditions and adjusts well to network rate fluctuations. As part of the VIC application tests, we analyzed the performance of the TB algorithm while it interacts with different types of network traffic. Specifically we studied the effects of the algorithm competing with a TCP based application and the interaction between two VIC applications. The TCP test showed that with long-term interaction with a TCP application, someone will have to be greedy. This is an inherent problem with multicasting video in the Internet. Current research into queue management mechanisms will help to alleviate this problem. In the second set of test we where able to show that two video applications sharing the same link reach a state equilibrium and remain fairly stable. Future Research We are extending the TB algorithm in two areas. First, since the TB algorithm's feedback is generated at the receiver, we are examining techniques to detect changes in resource availability at the receiver. If we were better able to identify the occurrence and size of resource changes, we would be able to take advantage of the TB algorithm's feedback mechanism and quickly jump to a new rate. This is in comparison to our current approach, which tends "to feel" for changes and progressively move toward a new rate. Second, one approach to transmit video to a heterogeneous group of receivers is to split the video across multiple transmission channels [7]. In this way the receivers may choose the level of resolution of the video stream that best meets their resource availability. We are studying methods to enable the Target Bandwidth algorithm to support this type of video transmission. --R "Dynamic QoS Control of Multimedia Applications based on RTP" "A Rate Control Mechanism for Packet Video in the Internet" "Packet Video Transport in ATM Networks with Single-bit Feedback" "Scaleable Feedback Control for Multicast Video Distribution in the Internet" "An Adaptive Congestion Control Scheme for Real-Time Packet Video Transport" "An Application Level Video Gateway" "Low-Complexity Video Coding for Receiver-Driven Layered Multicast" "Multipoint Communication by Hierarchically Encoded Data" "On the use of Destination Set Grouping to Improve Fairness in Multicast Video Distribution" "A Reliable Multicast Framework for Light-weight Sessions and Application Level Framing" "A Performance Study of Adaptive Video Coding Algorithms for High Speed Networks" "Experiments with Digital Video Playback" "Collaborative Load Shedding for Media-Based Applications" "Workstation Video Playback Performance with Competitive Process Loads" "VIC: A flexible Framework for Packet Video" "MBone Provides Audio and Video across the Internet" "MBONE: The Multicast Backbone" "Issues in Designing a Transport Protocol for Audio and Video Conferences and other Multiparticipant Real-Time Applications" "RTP: A Transport Protocol for Real-Time Applications" "Videoconferencing on the Internet" "Issues in Designing a Transport Protocol for Audio and Video Conferences and other Multiparticipant Real-Time Applications" "RTP: A Transport Protocol for Real-Time Applications" "RSVP: A New Resource ReSerVation Protocol" Based Process Oriented Simulation Language" "The Application of Software Tools to Complex Systems" "Modeling, Evaluation, and Adaptive Control of an Instrumentation Systems" "Random early Detection Gateways for Congestion Avoidance" --TR --CTR Aleksandar M. Bakic , Matt W. Mutka , Diane T. Rover, An on-line performance visualization technology, SoftwarePractice & Experience, v.33 n.15, p.1447-1469, December C. Bouras , A. Gkamas , A. Karaliotas , K. Stamos, Architecture and Performance Evaluation for Redundant Multicast Transmission Supporting Adaptive QoS, Multimedia Tools and Applications, v.25 n.1, p.85-110, January 2005
video conferencing;video multicasting;rate control;adaptive applications;VIC;RTP
311896
Staggered Consistent Checkpointing.
AbstractA consistent checkpointing algorithm saves a consistent view of a distributed application's state on stable storage. The traditional consistent checkpointing algorithms require different processes to save their state at about the same time. This causes contention for the stable storage, potentially resulting in large overheads. Staggering the checkpoints taken by various processes can reduce checkpoint overhead. This paper presents a simple approach to arbitrarily stagger the checkpoints. Our approach requires that the processes take consistent logical checkpoints, as compared to consistent physical checkpoints enforced by existing algorithms. Experimental results on nCube-2 are presented.
Introduction Applications executed on a large number of processors, either in a distributed environment, or on multicomputers such as nCube, are subject to processor failures. Consistent check-pointing is a commonly used technique to prevent complete loss of computation upon a failure [1, 2, 4, 5, 8, 11, 13, 17]. A consistent checkpointing algorithm saves a consistent view of a distributed application's state on a stable storage (often, a disk is used as a stable storage). The loss of computation upon a failure is bounded by taking consistent checkpoints with adequate frequency. The traditional consistent checkpointing algorithms require different application processes to save their state at about the same time. This causes contention for the stable storage when multiple processors share a stable storage, potentially resulting in significant performance degradation. Clearly, if each processor has access to a separate stable stor- age, such contention will not occur. 1 However, many installations of multicomputers and distributed systems require multiple processors to share a stable storage. Staggering the checkpoints taken by various processes can reduce the overhead of consistent checkpointing by reducing stable storage contention, as observed by Plank [13]. Plank proposed some techniques for staggering the checkpoints [13], however, these techniques result in "limited" staggering in that not all processes' checkpoints can be staggered. Moreover, the previous algorithms do not have much control on which checkpoints are stag- gered. Ideally, one would like to be able to stagger the checkpoints in a manner most appropriate for a given system. In systems where processors are able to make an "in-memory" copy of entire process state, checkpoint staggering is trivial. In this case, the checkpoints can be first taken in- memory, and then written to the stable storage one at a time. This paper considers systems where it is not feasible to make an in-memory copy of entire process state. This situation may occur because, either (i) memory size is small, or (ii) the memory may be shared by processes of multiple applications - making in-memory copy of a process from one application may cause processes from other applications to be swapped out (degrading their performance). This paper presents a simple approach to arbitrarily stagger the checkpoints. Our different stable storages are accessed over the same network, network contention can become a bottleneck. approach requires that the processes take consistent logical checkpoints, as compared to consistent physical checkpoints enforced by existing algorithms for staggering. As elaborated later, a physical checkpoint is a copy of a process' state, and a logical checkpoint is obtained by saving sufficient information (e.g., messages) to recover a process' state. The objective of this paper is to show how checkpoints can be staggered in a controlled manner, independent of the application's communication patterns, and to present different variations of the algorithm. To illustrate that our approach can be of interest in practice, experimental results for one version of the algorithm on nCube-2 multicomputer are presented. The paper is organized as follows. Section 2 discusses the related work. Section 3 discusses the notion of a logical checkpoint. Section 4 presents consistent checkpointing algorithms proposed by Chandy and Lamport [2] and Plank [13]. Section 5 presents the proposed algorithm. Section 6 presents experimental results. Some variations of the proposed scheme are discussed in Section 7. Section 8 summarizes the paper. Related Work Plank [13] was the first to observe that stable storage contention can be a problem for consistent checkpointing, and suggested checkpoint staggering as a solution. The degree of staggering with Plank's algorithm (based on the Chandy-Lamport algorithm [2]) is limited in that checkpoints of many processes are not staggered. In contrast, our algorithm allows arbitrary and controlled staggering of checkpoints. Plank [13] also presents another approach for staggering checkpoints, that is applicable to wormhole routed networks. This algorithm also does not permit arbitrary/controlled staggering. Fowler and Zwaenepoel [6] present an algorithm for determining causal breakpoints (for the purpose of debugging). As a part of the breakpoint algorithm, they establish consistent recovery lines using an algorithm similar to ours. Our approach can be considered to be a modification of the algorithm in [6] to facilitate checkpoint staggering. Because the algorithm in [6] was designed for debugging purposes, various possibilities for checkpoint staggering, and different approaches for establishing checkpoints were not considered. Long et al. [11] discuss an evolutionary checkpointing approach, that is similar to logical checkpointing. Our algorithm staggers the checkpoints, while the scheme in [11] does not allow staggering. [11] also assumes synchronized communication and an upper bound on communication delays; no such assumptions are made in the proposed scheme. Wang et al. [18] introduced the term logical checkpoint. They present an algorithm to determine a recovery line consisting of consistent logical checkpoints, after a failure occurs. This recovery line is used to recover from the failure. Their goal is to determine the "latest" consistent recovery line using the information saved on the stable storage. Message logging and independent checkpointing schemes, such as [8], also, effectively, determine a recovery line consisting of consistent logical checkpoints after a failure occurs. In these schemes, during failure-free operation, each process is allowed to independently take checkpoints and log messages. On the other hand, our scheme coordinates logical checkpoints before a failure occurs. These logical checkpoints are used to recover from a future failure. One consequence of this approach is that our scheme does not log all messages; only those messages which make the logical checkpoints consistent are logged. Staggering the checkpoints taken by various processes tends to increase the elapsed time (sometimes called checkpoint "latency" [15]) while the checkpointing algorithm is in progress. Our previous work [15] shows that a large increase in checkpoint latency is acceptable if it is accompanied by even a small decrease in checkpoint overhead. Therefore, techniques such as staggering are of interest even though they may result in greater check-point latency. 3 A Logical Checkpoint A process is said to be deterministic if its state depends only on its initial state and the messages delivered to it [8, 14]. A deterministic process can take two types of checkpoints: a physical checkpoint or a logical checkpoint. A process is said to have taken a physical checkpoint at some time t 1 , if the process state at time t 1 is available on the stable storage. A process is said to have taken a logical checkpoint at time t 1 , if adequate information is saved on the stable storage to allow the process state at time t 1 to be recovered. A physical checkpoint is trivially a logical checkpoint, however, the converse is not true. Physical checkpoint itself can be taken in two different ways: One possibility is to save the entire process state on the stable storage. The second possibility is to take an incremental checkpoint [12]. (That is, only the difference between the current state and the state at the previous physical checkpoint needs to be saved.) We will return to incremental physical checkpoint logical checkpoint M3 process Figure 1: Physical checkpoint logical checkpoint checkpointing soon again. Now we summarize three approaches for taking a logical checkpoint at time t 1 . Although the three approaches are equivalent, each approach may be more attractive for some applications than the other approaches. Not all approaches will be feasible on all systems. Approach 1: One approach for establishing a logical checkpoint at time t 1 is to take a physical checkpoint at some time t and log (on stable storage) all messages delivered to the process between time t 0 . This approach is essentially identical to that presented by Wang et al. [18]. Figure 1 presents an example wherein process P takes a physical checkpoint at time t 0 . Messages M1, M2 and M3 are delivered to process P by time t 1 . To establish a logical checkpoint of process P at time t 1 , messages M1, M2 and M3 are logged on the stable storage. We summarize this approach as: physical checkpoint logical checkpoint Approach 2: The essential purpose behind saving the messages above is to be able to recreate the state at time t 1 . This may also be achieved by taking a physical checkpoint at time t 0 and taking an incremental checkpoint at time t 1 . The incremental checkpoint is taken by saving (on the stable storage) the changes made to process state between time t 0 . We summarize this approach as: physical checkpoint incremental checkpoint = logical checkpoint As noted earlier, the physical checkpoint itself may be taken using the incremental check-pointing method. Therefore, it is possible to completely eliminate the physical checkpoint. However, it is not necessarily desirable. Figure 2 illustrates this. Assume that physical checkpoint P2 at time t 0 is taken as the incremental change from the state at the previous physical checkpoint P1. Also, the logical checkpoint at time t 1 is taken as the incremental change from the state at time t 0 . The time interval between P1 and P2 is Figure 2: Incremental checkpointing in approach 2 for logical checkpointing much larger than time interval . Therefore, the size of incremental state saved to establish the physical checkpoint P2 is likely to be much larger than that saved to establish the logical checkpoint at t 1 . Our algorithm staggers the physical checkpoints, whereas the logical checkpoints contend for the stable storage. Now consider the situation where physical checkpoint P2 is not taken at all. In this case, the incremental state saved at t 1 will consist of the modifications made to the state, from the time when checkpoint P1 is taken, . Therefore, the size of this incremental state will be at least as large as that saved above to establish P2. As will be apparent later, this would defeat the staggering algorithm by introducing significant stable storage contention when taking the logical checkpoints. Therefore, it will often be desirable to take a physical checkpoint first (possibly an incremental checkpoint), followed by an incremental logical checkpoint. The evolutionary checkpointing scheme by Long et al. [11] also takes incremental checkpoints similar to the above procedure. Approach 3: The above two approaches take a physical checkpoint prior to the desired logical checkpoint, followed by logging of additional information (either messages or incremental state change). The third approach is the converse of the above two approaches. Here, the physical checkpoint is taken at a time t 2 . In addition, enough information is saved to un-do the effect of messages received between time t 1 and t 2 . For each relevant message (whose effect must be undone), an anti-message is saved on the stable storage. The notion of an anti-message here is similar to that used in time warp mechanism [7] or that of UNDO records [3] in database systems. Anti-message M corresponding to a message M can be used to undo the state change caused by message M. Figure 3 illustrate this approach. A logical checkpoint of process P is to be established at time t 1 . Process P delivers messages M4 and M5 between time t 1 and t 2 . A physical checkpoint is taken at time t 2 , and anti-messages corresponding to messages M4 and M5 are logged on the stable storage. The anti-messages are named M4 and M5 , respectively. anti-message message application time process M4* M5* to stable storage state S1 NOTATION Figure 3: Anti-message log logical checkpoint M4* M5* state S1 state S1 process Figure 4: Recovering a logical checkpoint using anti-messages To recover the state, say S1, of process P at time t 1 , the process is initialized to the physical checkpoint taken at time t 2 and then anti-messages M5 and M4 are sent to the process. The order in which the anti-messages are delivered is reverse the order in which the messages were delivered. As shown in Figure 4, the final state of process P is identical to the state (or logical checkpoint) at time t 1 . We summarize this approach as: anti-message log logical checkpoint The anti-messages can possibly be formed by the application itself, or they may consist of a copy of the (old) process state modified by the message (similar to copy-on-write [10]). 4 Chandy-Lamport Algorithm [2] Chandy and Lamport [2] presented an algorithm for taking a consistent checkpoint of a distributed system. Assume that the processes communicate with each other using first- in-first-out unidirectional communication channels; a bidirectional channel can be modeled as two unidirectional channels. For simplicity, we assume that the communication graph is fully connected. 2 The algorithm presented next is essentially identical to 2 Note that Chandy-Lamport algorithm is applicable to any strongly connected graph. Our algorithm can also be generalized to strongly connected graphs. Chandy-Lamport [2, 13] and assumes that a certain process (named P 0 is designated as the checkpoint coordinator. Algorithm: The coordinator process P 0 initiates the consistent checkpointing algorithm by sending marker messages on each channel, incident on, and directed away from P 0 and immediately takes a checkpoint. (This is a physical checkpoint.) A process, say Q, on receiving a marker message along a channel c takes the following steps: if Q has not taken a checkpoint then begin sends a marker on each channel, incident on, and directed away from Q. Q takes a checkpoint. Q records the state of channel c as being empty. else Q records the state of channel c as the sequence of messages received along c, after Q had taken a checkpoint and before Q received the marker along c. 4.1 Plank's Staggering Scheme Plank [13] suggested that the processes should send markers after taking their checkpoints, rather than before taking the checkpoint (unlike the algorithm above). This simple modification introduces some staggering of checkpoints. However, not all checkpoints can be staggered. In our experiments, we use the Chandy-Lamport algorithm that incorporates Plank's modification. In the rest of this paper, this modified algorithm will be referred to as Chandy- Lamport/Plank algorithm, or CL/P for brevity. Observations: Plank [13] observed that his staggering scheme works better than the original "non-staggered" algorithm when (i) degree of synchronization (or communication) amongst the processes is relatively small, and (ii) the message volume is relatively small (message volume is the amount of information communicated by messages). In Figure 5, the horizontal axis indicates degree of synchronization in an application, and the vertical axis indicates the message volume. As shown in the figure, when synchronization is very frequent and/or message volume is large, it is better to avoid staggering checkpoints [13]. Extrapolating Plank's results, it follows that, the region where a given staggering algorithm works best shrinks with the degree of staggering. Greater staggering is beneficial for applications with less synchronization and small message volume. This paper does not alter the above conclusions. Our work provides an user the ability to choose the degree of staggering. Our approach can achieve completely controlled staggering of checkpoints, unlike Plank [13]. no staggering works best more staggering works best large message volume small message volume synchronization frequent synchronization infrequent less staggering works best Figure 5: Checkpoint staggering and performance: Qualitative observations 5 Staggered Consistent Checkpointing The extent of checkpoint staggering using CL/P algorithm is dependent on the application's communication pattern, and also on how the algorithm is implemented (e.g., whether the markers are sent asynchronously or not). On the other hand, the proposed algorithm can stagger the checkpoints in any manner desired. Many variations are possible, depending on which checkpoints are desired to be staggered [16]. As an illustration, we assume that the objective is to stagger all checkpoints, i.e., no two checkpoints should overlap in time. Later, we will illustrate a situation where some overlap in checkpointing is desired. The proposed algorithm (named STAGGER) can be summarized as follows: staggered physical checkpoints consistent logical checkpoints = staggered consistent checkpoints The proposed algorithm coordinates logical checkpoints rather than physical check- points. In this section, we assume that the first approach, described in Section 3, for taking logical checkpoints is being used. Thus, a logical checkpoint is taken by logging all messages delivered to a process since its most recent physical checkpoint. For the purpose of this discussion, assume that the checkpoint coordinator is named , and other processes are named P 1 through P n\Gamma1 . (n is the number of processes.) We now present the proposed algorithm (consisting of two phases), followed by an illustration. Presently, we assume that all processors share a single stable storage; Section 7 considers the situation where multiple stable storages are available. Algorithm STAGGER 1. Physical checkpointing phase: Checkpoint coordinator P 0 takes a physical checkpoint and then sends a take checkpoint message to process P 1 When a process P i receives a take checkpoint message, it takes a physical checkpoint and then sends a take checkpoint message to process P j , where mod n. When process P 0 receives a take checkpoint message from process P initiates the second phase of the algorithm (named consistent logical checkpointing phase). After a process takes the physical checkpoint, it continues execution. Each message delivered to the process, after taking the physical checkpoint (but before the completion of the next phase), is logged in the stable storage. The above procedure ensures that physical checkpoints taken by the processes are staggered because only one process takes a physical checkpoint at any time. The physical checkpoints taken by the processes are not necessarily consistent. 2. Consistent logical checkpointing phase: This phase is very similar to the Chandy- Lamport algorithm. The difference between Chandy-Lamport algorithm and this phase is that when the original Chandy-Lamport algorithm requires a process to take a "checkpoint", our processes take a logical checkpoint (not a physical checkpoint as in the Chandy-Lamport algorithm). A logical checkpoint is taken by ensuring that the messages delivered since the physical checkpoint (taken in the previous phase) are logged on stable storage. The exact algorithm for this phase is provided below: Initiation: The coordinator P 0 initiates this phase on receipt of the take checkpoint message from process P sends marker message on each channel, incident on, and directed away from P 0 . Also, P 0 takes a logical checkpoint by ensuring that all messages delivered to it since its physical checkpoint are logged. (The number of messages logged can be somewhat reduced, as discussed later.) A process, say Q, on receiving a marker message along a channel c takes the following steps: if Q has not taken a logical checkpoint then begin sends a marker on each channel, incident on, and directed away from Q. Q takes a logical checkpoint by ensuring that all messages delivered to it (on any channel) after Q's recent physical checkpoint have been logged. else Q ensures that all messages received on channel c since its recent logical checkpoint are logged. Messages received on channel c after a marker is received on that channel are not logged. Similar to the Chandy-Lamport algorithm, messages sent by a process before its logical checkpoint, but not received before the receiver's logical checkpoint are logged as part of the channel state. Note that a message M that is logged to establish a logical checkpoint may be logged any time from the instant it is received until the time when the logical checkpoint is to be established. In our implementation, due to insufficient memory on nCube-2, such messages were logged immediately on receipt. The above algorithm establishes a consistent recovery line consisting of one logical checkpoint per process. This algorithm reduces the contention for the stable storage by completely staggering the physical checkpoints. However, contention is now introduced in the second phase of the algorithm when the processes log messages. 3 Our scheme will perform well if message volume is relatively small compared to checkpoint sizes. Figure 6 illustrates the algorithm assuming that the system consists of three processes. Process acts as the coordinator and initiates the physical checkpointing phase by taking a physical checkpoint and sending a take checkpoint message to P 1 . Processes P 0 and take staggered checkpoints during the first phase. When process P 0 receives take checkpoint message from process P 2 , it initiates the consistent logical checkpointing phase. Process P 0 3 This contention can potentially be reduced by taking a logical checkpoint before sending markers in the consistent logical checkpointing phase. physical checkpoint logical checkpoint application message take_checkpoint message marker messages NOTATION M6 M3 physical checkpointing phase consistent logical checkpointing phase process process consistent recovery line process Figure An example sends marker messages to P 1 and and then takes a logical checkpoint by logging messages M0 and M2 on the stable storage. When process P 1 receives the marker message from process , it sends markers to P 0 and and then takes a logical checkpoint by logging message M1 on the stable storage. Similarly, process P 2 takes a logical checkpoint by logging message M3 on the stable storage. Messages M4 and M5 are also logged during the second phase (as they represent the channel state). Message M6 is not logged. Proof of correctness: The correctness follows directly from the proof of correctness of the Chandy-Lamport algorithm [2]. Recovery: After a failure, each process rolls back to its recent physical checkpoint and re-executes (using the logged messages) to restore the process state to the logical checkpoint that belongs to the most recent consistent recovery line. Note that, the above STAGGER algorithm was designed assuming that it is desirable to stagger all checkpoints. If some other pattern of staggering is more desirable, the above algorithm can be easily modified to achieve that pattern. Section 7 illustrates this with an example. 6 Performance Evaluation We implemented the proposed algorithm STAGGER and the Chandy-Lamport/Plank (CL/P) algorithm on a nCube-2 multicomputer with a single disk (stable storage). It should be noted that performance of each scheme is closely dependent on underlying hardware, software implementation of the scheme, and nature of the application program. Clearly, no single scheme can perform well for all applications. Our objective here is to demonstrate that the proposed scheme can perform well under certain circumstances. In our implementation of CL/P and STAGGER, the markers sent by process 0 are sent asynchronously using interrupts (or signals) - sufficient care is taken to ensure that the markers appear in first-in-first-out (FIFO) order with respect to other messages even though the markers are sent asynchronously. Markers sent by other processes are sent without using interrupts. If no markers are sent asynchronously, the checkpointing algorithm may not make progress in the cases where synchronization (or communication) is infrequent. As staggering is most beneficial under these circumstances, it is necessary to ensure that the algorithm progresses without any explicit communication by application processes. Therefore, process sends asynchronous markers. We will return to the issue of using asynchronous markers later in Section 7. The first application used for evaluation of STAGGER is a synthetic program, named sync-loop, similar to a program used by Plank [13]. The pseudo-code for the program is presented below using a C-like syntax. sync-loop(iter, size, M) - char state[size]; initialize (state); repeat (iter) times - perform M floating-point multiplications; synchronize with all other processes; Process state size (and checkpoint size) is controlled by the size parameter. For the size chosen for our experiments, checkpoint size for each process of sync-loop is approximately 2.1 Mbyte. Each process repeats a loop in which it performs some computation (the amount of computation being controlled by the M parameter). The loop is repeated iter times. Synchronization is achieved by means of an all-to-all message exchange. By choosing a very large value for M the degree of synchronization in the program is minimized. A small M, on the other hand, implies that processes synchronize very frequently. Figure 7 presents experimental results for STAGGER and CL/P schemes. Synchronization interval in this figure is the time between two consecutive synchronizations of the synchronization interval is approximately equal to the time required to perform the computation (i.e., the M multiplications) in each iteration of the loop. The synchronization interval on the horizontal axis in Figure 7 is determined by dividing by iter the execution time of sync-loop without taking any checkpoints. Checkpoint overhead is obtained as: execution time with S consistent checkpoints \Gamma execution time without any checkpoints For our measurements, (that is, five checkpoints per execution of the program). Each instance of the sync-loop application was executed five times, and checkpoint overhead was averaged over these five executions. Figure 7 presents overhead measurements for experiments on a cube of dimension Curve labeled in the figure is for experiments on N-dimensional cube consisting of 2 N processors. (Labels (a) through (h) in Figure 7 can be used to match the curves with the corresponding legend in top right corner of the figure.) In Figure 7, observe that, for a fixed dimension, as the synchronization interval becomes smaller, the checkpoint overhead grows for both schemes. For very small synchronization intervals, the STAGGER scheme does not perform much better than the Chandy-Lamport/Plank scheme. However, when synchronization interval is large, the proposed scheme achieves significant improvements for d ? 1. For dimension processors), the two schemes achieve essentially identical performance. Observe in Figure 7 that, for a given instance of the application, as the dimension is increased the overhead for STAGGER as well as CL/P increases. However, the increase in the overhead of CL/P is much greater than that of STAGGER. checkpoint overhead (second) synchronization interval (second) sync-loop (a) CL/P d=4 (b) Stagger d=4 (c) CL/P d=3 (a) (b) (c) (d) Stagger d=3 (f) Stagger d=2 (d) Figure 7: Checkpoint overhead for sync-loop. Labels (a) through (h) can be used to match the curves with the corresponding legend in top right corner of the figure. The measurements presented above imply that when the parallel application has a large granularity (thus, requiring infrequent communication or synchronization), the proposed STAGGER algorithm can perform well. As an example of an application with coarse-grain parallelism, Figure 8 presents measurements for a simulation program (SIM). Simulation program SIM evaluates the expected execution time of a task when using rollback recovery. State size for each process in SIM is approximately 34 Kbyte. The simulation program is completely parallelized, and the processes synchronize only at the beginning and at the completion of the simulation. This synchronization pattern represents the best possible scenario for staggered checkpointing. As seen from Figure 8, the checkpoint overhead for STAGGER remains constant independent of the dimension, as synchronization is very infrequent. On the other hand, the overhead for CL/P increases with the dimension.1357 checkpoint overhead (second) dimension d Stagger Figure 8: Measurements for SIM application To be fair, we should note that STAGGER does not always outperform CL/P. As noted in Figure 5, an algorithm that staggers more tends to perform poorly when degree of synchronization and/or message volume is large. To illustrate this, Figure 9(a) presents measurements for a program named FFT-15 that repeatedly evaluates fast Fourier transform of 2 15 data points, and has frequent interaction between processes. Checkpoint size for each process is approximately 1.85 Mbyte. For this application, the overhead of STAGGER is larger than that of CL/P. The performance of STAGGER can be improved by reducing the amount of information logged, using an optimization similar to that in [6]. Unlike in the original STAGGER algorithm, it is not necessary to log a message's data content if it was sent by a process after checkpoint overhead (second) dimension d (a) Using STAGGER algorithm20601001 2 3 4 checkpoint overhead (second) dimension d modified STAGGER (b) Using modified STAGGER algorithm Figure 9: Measurements for FFT-15 application taking its physical checkpoint - for such a message, it is sufficient to log its order information (i.e., send and receive sequence numbers, and sender and receiver identifiers). During recovery, such a message is always reproduced by the sender process. Therefore, logging of order information is sufficient. Figure 9(b) plots overhead of the STAGGER algorithm modified to implement the above optimization. The overhead of the modified algorithm is lower than the original STAGGER algorithm (see Figure 9(a)), however, the overhead is still not much better than CL/P. As the FFT-15 application performs frequent communication, it is hard to achieve overhead better than CL/P. 7 Variations on the Theme (a) Process clustering to exploit multiple stable storages: The algorithm STAGGER presented above assumes that all processes share a single stable storage. However, in some systems, the processes may share multiple stable storages. For instance, number of processes may be 16 and the number of stable storages may be 4. For such systems, we modify the proposed STAGGER algorithm to make use of all stable storages while minimizing contention for each stable storage. To achieve this we partition the processes into clusters, the number of clusters being identical to the number of stable storages. Each cluster is associated with a unique stable storage; processes within a cluster access only the associated stable storage [9]. The algorithm STAGGER, modified to use multiple stable storages, differs from the original STAGGER algorithm only in the first phase (i.e., staggered checkpointing phase). We illustrate the modified staggered checkpointing phase with an example. Consider a system consisting of 6 processes, and 2 stable storages. The processes are now named where i denotes cluster number and j denotes process number within the cluster. As 2 stable storages are available, the processes are divided into 2 clusters containing 3 processes each. Process P i0 in cluster i is identified as the checkpoint coordinator for cluster i, and process P 00 is also identified as the global checkpoint coordinator. Figure 10 depicts the first phase of the modified algorithm. process P00 process P01 process P02 process P10 process P11 process P12 message denotes take_checkpoint consistent logical checkpointing phase (not shown here) staggered physical checkpointing phase Figure 10: Process clustering to utilize multiple stable storages The global checkpoint coordinator P 00 initiates phase 1 of the algorithm (i.e., staggered physical checkpointing phase) by sending take checkpoint messages to the checkpoint coordinators in all other clusters. Process P 00 then takes a physical checkpoint and sends a take checkpoint message to process P 01 When a process P ij (ij 6= 00) receives a take checkpoint message, it takes a physical checkpoint and sends a take checkpoint message to process P km where When the global coordinator P 00 receives one take checkpoint message from a process in each cluster, it initiates the consistent logical checkpointing phase (this phase is identical to the second phase of the original STAGGER algorithm). Essentially, the above procedure guarantees that at most one process accesses each stable storage at any time during the first phase, and that all stable storages are used for saving physical checkpoints. (b) Approach for taking a logical checkpoint: The discussion so far assumed that a logical checkpoint is taken by taking a physical check-point and logging subsequently received messages. The proposed algorithm can be easily modified to allow a process to use any of the three approaches presented earlier (in Section for establishing a logical checkpoint. In fact, different processes may simultaneously use different approaches for establishing a logical checkpoint. (c) Asynchronous Markers: Arrival of an asynchronous marker is informed to the destination process by means of an (or signal). In spite of the asynchronous nature, a marker should appear in its appropriate position on the FIFO channel on which it is sent. We call a marker that is not sent with an interrupt a "synchronous" marker (for the lack of a better terminology). While an asynchronous marker can be processed as soon as it arrives, a synchronous marker may not be processed for a long time - particularly, if the destination process does not need any messages on the corresponding channel. Which markers (if any) are sent asynchronously can affect performance of STAGGER and CL/P algorithms. As noted previously, in our implementation, markers sent by process are asynchronous, other markers are synchronous. Plank [13] does not address the distinction between asynchronous and synchronous markers. One variation that can make CL/P imitate STAGGER, particularly for applications with infrequent synchronization (communication), is as follows: In CL/P algorithm, ensure that the marker sent by process i to process j is asynchronous if and only if (modulo number of processes). Thus, each process will take checkpoint, and the algorithm will make progress, even if the processes are not communicating with each other. Also, as each process sends only one asynchronous marker, the algorithm would tend to reduce contention for the stable storage. With infrequent synchronization (communication), the above rule will tend to stagger checkpoints by different processes (i.e., the algorithm becomes similar to STAGGER). The above variation could also be used to reduce stable storage contention during the consistent logical checkpointing phase of STAGGER algorithm. Summary This paper presents an algorithm for taking consistent logical checkpoints. The proposed algorithm can ensure that physical checkpoints taken by various processes are staggered to minimize contention in accessing the stable storage. Experimental results on nCube-2 suggest that the proposed scheme can improve performance as compared to an existing staggering technique, particularly when processes synchronize infrequently and message sizes are not very large. The paper also suggests a few variations of the proposed scheme, including an approach for staggering checkpoints when multiple stable storages are available. Acknowledgements We thank the referees of the conference version of this paper, and James Plank and Yi-Min Wang, for their comments on an earlier draft of this paper. The FFT program used for experiments was written by Akhilesh Kumar. Vidya Iyer wrote parts of the checkpointing layer used for experiments. This research is supported in part by National Science Foundation grant MIP-9502563 and Texas Advanced Technology Program grant 009741-052-C. --R "The performance of consistent checkpointing in distributed shared memory systems," "Distributed snapshots: Determining global states in distributed systems," An Introduction to Database Systems. "The performance of consistent checkpointing," "Manetho: Transparent rollback-recovery with low overhead, limited rollback, and fast output commit," "Causal distributed breakpoints," "Virtual time," Distributed System Fault Tolerance Using Message Logging and Check- pointing "Evaluation of consistent logical checkpointing." "Low-latency, concurrent checkpointing for parallel programs," "An evolutionary approach to concurrent checkpointing," "Libckpt: Transparent checkpointing under Unix," Efficient Checkpointing on MIMD Architectures. "Optimistic recovery: An asynchronous approach to fault-tolerance in distributed systems," "On checkpoint letency," "On staggered checkpointing," "Lazy checkpoint coordination for bounding rollback propagation," "Progressive retry for software error recovery in distributed systems," --TR --CTR Guohong Cao , Mukesh Singhal, Checkpointing with mutable checkpoints, Theoretical Computer Science, v.290 n.2, p.1127-1148, 2 January Partha Sarathi Mandal , Krishnendu Mukhopadhyaya, Concurrent checkpoint initiation and recovery algorithms on asynchronous ring networks, Journal of Parallel and Distributed Computing, v.64 n.5, p.649-661, May 2004 Partha Sarathi Mandal , Krishnendu Mukhopadhyaya, Self-stabilizing algorithm for checkpointing in a distributed system, Journal of Parallel and Distributed Computing, v.67 n.7, p.816-829, July, 2007 Guohong Cao , Mukesh Singhal, Mutable Checkpoints: A New Checkpointing Approach for Mobile Computing Systems, IEEE Transactions on Parallel and Distributed Systems, v.12 n.2, p.157-172, February 2001
consistent recovery line;stable storage contention;rollback recovery;fault tolerance;staggered checkpoints
312175
Fast Estimation of Diameter and Shortest Paths (Without Matrix Multiplication).
In the recent past, there has been considerable progress in devising algorithms for the all-pairs shortest paths (APSP) problem running in time significantly smaller than the obvious time bound of O(n3). Unfortunately, all the new algorithms are based on fast matrix multiplication algorithms that are notoriously impractical. Our work is motivated by the goal of devising purely combinatorial algorithms that match these improved running times. Our results come close to achieving this goal, in that we present algorithms with a small additive error in the length of the paths obtained. Our algorithms are easy to implement, have the desired property of being combinatorial in nature, and the hidden constants in the running time bound are fairly small.Our main result is an algorithm which solves the APSP problem in unweighted, undirected graphs with an additive error of 2 in time $O(n^{2.5}\sqrt{\log n})$. This algorithm returns actual paths and not just the distances. In addition, we give more efficient algorithms with running time {\footnotesize $O(n^{1.5} \sqrt{k \log n} for the case where we are only required to determine shortest paths between k specified pairs of vertices rather than all pairs of vertices. The starting point for all our results is an $O(m \sqrt{n \log n})$ algorithm for distinguishing between graphs of diameter 2 and 4, and this is later extended to obtaining a ratio 2/3 approximation to the diameter in time $O(m \sqrt{n \log n} n)$. Unlike in the case of APSP, our results for approximate diameter computation can be extended to the case of directed graphs with arbitrary positive real weights on the edges.
Introduction Consider the problem of computing all-pairs shortest paths (APSP) in an unweighted, undirected graph G with n vertices and m edges. The recent work of Alon, Galil, and Margalit [AGM91], Alon, Galil, Margalit, and Naor [AGMN92], and Seidel [Sei92] has led to dramatic progress in devising fast algorithms for this problem. These algorithm are based on formulating the problem in terms of matrices with small integer entries and using fast matrix multiplications. They achieve a time bound of ~ denotes the exponent in the running time of the matrix multiplication algorithm used. The current best matrix multiplication algorithm is due to Coppersmith and Winograd [CW90] and has In contrast, the naive algorithm for APSP performs breadth-first searches from each vertex, and requires time \Theta(nm). Given the fundamental nature of this problem, it is important to consider the desirability of implementing the algorithms in practice. Unfortunately, fast matrix multiplication algorithms are far from being practical and suffer from large hidden constants in the running time bound. Consequently, we adopt the view of treating these results primarily as indicators of the existence of efficient algorithms and consider the question of devising a purely combinatorial algorithm for APSP that runs in time O(n 3\Gammaffl ). The (admittedly vague) term "combinatorial algorithm" is intended to contrast with the more algebraic flavor of algorithms based on fast matrix multiplication. To understand this distinc- Department of Computer Science, Stanford University. Email: donald@cs.stanford.edu. Supported by an NSF Graduate Fellowship and NSF Grant CCR-9357849. y Department of Computer Science, Stanford University. Email: chekuri@cs.stanford.edu. Supported by an OTL grant and NSF Grant CCR-9357849. z Department of Computer Science, Stanford University. Email: rajeev@cs.stanford.edu. Supported by an Alfred P. Sloan Research Fellowship, an IBM Faculty Development Award, an OTL grant, and NSF Young Investigator Award CCR- 9357849, with matching funds from IBM, Schlumberger Founda- tion, Shell Foundation, and Xerox Corporation. 1 The notation ~ O(f(n)) denotes O(f(n) polylog(n)). tion, we believe it is instructive to try and interpret the "algebraic" algorithms in purely graph-theoretic terms even with the use of the simpler matrix multiplication algorithm of Strassen [Str69]. Currently, the best known combinatorial algorithm is due to Feder and Motwani [FM91] that runs in time O(n yielding only a marginal improvement over the naive algorithm. We take a step in the direction of realizing the goals outlined above by presenting an algorithm which solves the APSP problem with an additive error of 2 in time O(n 2:5 log n). This algorithm returns actual paths and not just the distances. Note that the running time is better than ~ when the more practical matrix multiplication algorithm of Strassen [Str69] is used 2:81) in the algorithms described earlier. Further, as explained below, we also give slightly more efficient algorithms (for sparse graphs) for approximating the diameter. Our algorithms are easy to implement, have the desired property of being combinatorial in nature, and the hidden constants in the running time bound are fairly small. While our results are presented only for the case of unweighted, undirected graphs, they can be generalized to the case of undirected graphs with small integer edge weights; the details will be provided in the final version of the paper. A crucial step in the development of our result was the shift of focus to the problem of computing the diameter of a graph. This is the maximum over all pairs of vertices of the shortest path distance between the ver- tices. The diameter can be determined by computing all-pairs shortest path (APSP) distances in the graph, and it appears that this is the only known way to solve the diameter problem. In fact, Fan Chung [Chu87] had earlier posed the question of whether there is an O(n 3\Gammaffl ) algorithm for finding the diameter without resorting to fast matrix multiplication. The situation with regard to combinatorial algorithms for diameter is only marginally better than in the case of APSP. Basch, Khanna, and Motwani [BKM95] presented a combinatorial algorithm that verifies whether a graph has diameter 2 in time O . A slight adaptation of this algorithm yields a boolean matrix multiplication algorithm which runs in the same time bound, thereby allowing us to verify that the diameter of a graph is d, for any constant d, in O time. Consider the problem of devising a fast algorithm for approximating the diameter. It is easy to estimate the diameter within a ratio 1=2 in O(m) time: perform a breadth-first search (BFS) from any vertex v and let d be the depth of the BFS tree obtained; clearly, the diameter of G lies between d and 2d. No better approximation algorithm was known for this problem; in fact, it was not even known how to distinguish between graphs of diameter 2 and 4. Our first result is an O(m log n) algorithm for distinguishing between graphs of diameter 2 and 4, and this is later extended to obtaining a ratio 2=3 approximation to the diameter in time O(m Our work suggests several interesting directions for future work, the most elementary being: Is there a combinatorial algorithm running in time O(n 3\Gammaffl ) for distinguishing between graphs of diameter 2 and 3? It is our belief that the problem of efficiently computing the diameter can be solved given such a decision algorithm, and our work provides some evidence in support of this belief. In fact, it is our view that the bottleneck in obtaining a faster combinatorial APSP algorithm is precisely the problem of distinguishing graphs of diameter 2 and 3. This also raises the question of whether there is some strong equivalence between the diameter and APSP problems, e.g., that their complexity is the same within poly-logarithmic factors. Finally, of course, removing the additive error from our results remains a major open problem. The rest of this paper is organized as follows. We begin by presenting some definitions and useful observations in Section 2. In Section 3, we describe the algorithms for distinguishing between graphs of diameter 2 and 4, and the extension to obtaining a ratio 2=3 approximation to the diameter. Then, in Section 4, we apply the ideas developed in estimating the diameter to obtain the promised algorithm for an additive approximation for APSP. Finally, in Section 5 we present an empirical study of the performance of our algorithm for all-pairs shortest paths. Preliminaries and a Basic Algorithm We present some notation and a result concerning dominating sets in graphs that underlies all our algorithms. All definitions are with respect to some fixed undirected graph G(V; E) with n vertices and m edges. Definition 2.1. The distance d(u; v) between two vertices u and v is the length of the shortest path between them. Definition 2.2. The diameter of a graph G is defined to be max u;v2G d(u; v). We will denote the diameter of the graph G by \Delta. Definition 2.3. The k-neighborhood N k (v) of a vertex v is the set of all vertices other than v that are at distance at most k from v, i.e., The degree of a vertex v is denoted by d Finally, we will use the notation N to denote the set of vertices at distance at most 1 from v. It is important to keep in mind that the set N (v) contains not just the neighbors of v, but also includes v itself. Definition 2.4. For any vertex v 2 V , we denote by b(v) the depth of a BFS tree in G rooted at the vertex v. Throughout this paper, we will working with a parameter s to be chosen later that will serve as the threshold for classifying vertices as being of low degree or high degree. This threshold is implicit in the following definition. Definition 2.5. We define L(V sg and H(V sg. The following is a generalization of the standard notion of a dominating set. Definition 2.6. Given a set A ' V , a set B ' V is a dominating set for A if and only if for each vertex That is, for each vertex in A n B, one of its neighbors is in B. The following theorem underlies all our algorithms. Theorem 2.1. There exists a dominating set for H(V ) of size O(s \Gamma1 n log n) and such a dominating set can be found in O(m Remark 2.1. It is easy to see that choosing a set of \Theta(s \Gamma1 n log n) vertices uniformly at random gives the desired dominating set for H(V ) with high probability. This theorem is in effect a derandomization of the resulting randomized algorithm. Proof. Suppose, to begin with, that H(V then, we are interested in the standard dominating set for the graph G. The problem of computing a minimum dominating set for G can be reformulated as a set cover problem, as follows: for every vertex v create a set This gives an instance of the set cover problem g, where the goal is to find a minimumcardinality collection of sets whose union is V . Given any set cover solution C ' S, the set of vertices corresponding to the subsets in C forms a dominating set for G of the same size as C. This is because each vertex v occurs in one of the sets Sw 2 C, and thus is either Fast Estimation of Diameter and Shortest Paths 3 in the dominating set itself or has a neighbor therein. Similarly, any dominating set for G corresponds to a set cover for S of the same cardinality. The greedy set cover algorithm repeatedly chooses the set that covers the most uncovered elements, and it is known to provide a set cover of size within a factor log n of the optimal fractional solution [Joh74, Lov75]. Since every vertex has degree at least s and therefore the corresponding set S v has cardinality at least s, assigning a weight of 1=s to every set in S gives a fractional set cover of total weight (fractional size) equal to s \Gamma1 n. Thus, the optimal fractional set cover size is O(n=s), and the greedy set cover algorithm must then deliver a solution of size O(s \Gamma1 n log n). This gives a dominating set for G of the same size. If we implement the greedy set cover algorithm by keeping the sets in buckets sorted by the number of uncovered vertices, the algorithm can be shown to run in time O(m). Consider now the case where H(V Construct a graph G adding a set of dummy vertices )g. Every vertex in this new graph has degree s or higher, so by the preceding argument we can construct a dominating set for G 0 of size O(s \Gamma1 (n+s) log (n O(s none of the new vertices in X are connected to the vertices in H(V ), the restriction of this dominating set to V will give a dominating set for H(V ) of size O(s \Gamma1 n log n). Finally, the running time is increased by the addition of the new vertices and edges, but since the total number of edges added is at most ns O(ns), we get the desired time bound. 2 In the rest of this paper, we will denote by D a dominating set for H(V constructed as per this theorem. 3 Estimating the Diameter In this section we will develop an algorithm to find an estimator E such that 2\Delta=3 - E - \Delta. We first present an algorithm for distinguishing between graphs of diameter 2 and 4. It is then shown that this algorithm generalizes to the promised approximation algorithm. 3.1 Distinguishing Diameter 2 from 4 The basic idea behind the algorithm is rooted in the following lemma whose proof is straight-forward. Lemma 3.1. Suppose that G has a pair of vertices a and b with 4. Then, the BFS tree rooted at a vertex v 2 N (a) [ N (b) will have depth at least 3. The algorithm, called Algorithm 2-vs-4, computes BFS trees from a small set of vertices that is guaranteed to contain such a vertex, and so one of these BFS trees will certify that the diameter is more than 2. Algorithm 2-vs-4 1. if L(V (a) choose v 2 L(V ) (b) compute a BFS tree from each of the vertices in N (v) 2. else (a) compute a dominating set D for H(V (b) compute a BFS tree from each of the vertices in D 3. endif 4. if all BFS trees have depth 2 then return 2 return 4. We are assuming here (and in all other algorithms) that the sets L(V ) and D(V ) are provided as a part of the input; otherwise, they can be computed in O(m+ns) time. Theorem 3.1. Algorithm 2-vs-4 distinguishes graphs of diameter 2 and 4, and it has running time O(ms Proof. It is clear that the algorithm outputs 2 for graphs of diameter 2 since in such graphs no BFS tree can have depth exceeding 2. Assume then that G has diameter 4 and fix any pair of vertices that 4. We will show that the algorithm does a BFS from a vertex v 2 N (a) [ N (b) and since, by Lemma 3.1, the depth of the BFS tree rooted at v is at least 3, the algorithm will output 4. We consider the two cases that can arise in the algorithm. Case 1: [L(V If either a or b belong to N (v), then there is nothing to prove. If b(v) ? 2, then again we have nothing to prove. Therefore, the only case that remains is when both a and b are in N 2 (v) (see Figure 1). Since d(a; b) - 4, all paths between a and b have to go through a vertex in N 1 (v) which implies that Further, since we compute a BFS tree from each vertex in N (v), we are guaranteed to have a BFS from a neighbor of a or b, completing the proof. The size of N (v) is at most s, therefore the time to compute the BFS trees is bounded by O(ms). Case 2: [L(V Since D is a dominating set for V , it follows immediately that D " (N (a) [ N (b)) 6= ;, establishing the proof of correctness. From Theorem 2.1, we have 4 Aingworth, Chekuri, Motwani (v) has less than s nodes a Figure 1: Case 1 in Algorithm 2-vs-4. log n) and this implies a bound of O(ms log n) on the cost of computing the BFS trees in this case. 2 Choosing log n, we obtain the following corollary. Corollary 3.1. Graphs of diameter 2 and 4 can be distinguished in O(m log n) time. 3.2 Approximating the Diameter The basic ideas used in Algorithm 2-vs-4 can be generalized to estimate the diameter in general. Fix any two vertices a and b for which \Delta, where \Delta is the diameter of the graph. Suppose we can a find a vertex v in N \Delta=3 (a) [N \Delta=3 (b), then it is clear that b(v) - 2\Delta=3 and we can use b(v) as our estimator. As before, we will find a small set of vertices which is guaranteed to have a vertex in N \Delta=3 (a) [ N \Delta=3 (b). Then, we can compute the BFS tree from each of these vertices and use the maximum of the depths of these trees as our estimator E. The reason for choosing the fraction 1=3 will become apparent in the analysis of the algorithm. In what fol- lows, it will simplify notation to assume that \Delta=3 is an integer; in general though, our analysis needs to be modified to use b\Delta=3c. Also, we assume that \Delta - 3, and it is easy to see that the case \Delta - 2 is easy to handle separately. A key tool in the rest of our algorithms will be the notion of a partial-BFS defined in terms of a parameter k. A k-partial-BFS tree is obtained by performing the usual BFS process up to the point where exactly k vertices (not including the root) have been visited. Lemma 3.2. A k-partial-BFS tree can be computed in time O(k 2 ). Proof. The number of edges examined for each vertex visited is bounded by k since the k-partial-BFS process is terminated when k distinct vertices have been examined. This implies that the total number of edges examined is O(k 2 ), and that dominates the running time. 2 Note that a k-partial-BFS tree contains the k vertices closest to the root, but that this set is not uniquely defined due to ties. Typically, k will be clear from the context and not mentioned explicitly. Definition 3.1. Let PBFS k (v) be the set of vertices visited by a k-partial-BFS from v. Denote by pb(v) the depth of the tree constructed in this fashion. The approximation algorithm for the diameter is as follows. Algorithm Approx-Diameter 1. compute an s-partial-BFS tree from each vertex in V 2. let w be the vertex with the maximum depth 3. compute a BFS tree from each vertex in 4. compute a new graph b G from G by adding all edges of the form (u; v) where u 2 PBFS s (v) 5. compute a dominating set D in b G 6. compute a BFS tree from each vertex in D 7. return estimator E equal to the maximum depth of all BFS trees from Steps 3 and 6. The following lemmas constitute the analysis of this algorithm. Lemma 3.3. The dominating set D found in Step 5 is of size O(s \Gamma1 n log n). Proof. In b G, each vertex v 2 V is adjacent to all vertices in PBFS s (v) with respect to the graph G. for every vertex v, the degree of each vertex in b G is at least s. From Theorem 2.1, it follows that we can find a dominating set of size O(s Lemma 3.4. If jN \Delta=3 (v)j - s for all for each vertex Proof. Consider any particular vertex v 2 V . If v is in D, then there is nothing to prove. Otherwise, since D is a dominating set in b G, there is a vertex u 2 D such that (u; v) is an edge in b G. If (u; v) is in G, then again we are done since u 2 N (v) ae N \Delta=3 (v). The other possibility is that u is not a neighbor of v in G, but then it must be the case that u 2 PBFS s (v). The condition jN \Delta=3 (v)j - s implies that PBFS s (v) ae N \Delta=3 (v), which in turn implies that u 2 N \Delta=3 (v), and hence Fast Estimation of Diameter and Shortest Paths 5 The reader should notice the similarity between the preceding lemma and Case 2 in Theorem 3.1. Lemma 3.4 follows from the more general set cover ideas used in the proof of Theorem 2.1 and as such it holds even if we replace \Delta=3 by some other fraction of \Delta. The more crucial lemma is given below. Lemma 3.5. Let S be the set of vertices v such that then the vertex w found in Step 2 belongs to S. In addition if b(w) ! 2\Delta=3, then for every vertex v, PBFS s (w) " N \Delta=3 (v) 6= ;. Proof. It can be verified that for any vertex u 2 S, conversely, for any vertex v in V n S, \Delta=3. From this we can conclude that if S is nonempty, then the vertex of largest depth belongs to S. Also, for each vertex u 2 S, we must have N \Delta=3 (u) ae PBFS s (u). If b(w) ! 2\Delta=3 then every vertex is within a distance 2\Delta=3 of w. From this and the fact that N \Delta=3 (w) ae PBFS s (w), it follows that The proof of the above lemma makes clear the reason why our estimate is only within 2=3 of the diameter. Essentially, we need to ensure that the \Delta=k neighborhood of w intersects the \Delta=k neighborhood of every other vertex. This can happen only if b(w) is sufficiently small. If it is not small enough, we want b(w) itself to be a good estimator. Balancing these conditions gives us and the ratio 2=3. Theorem 3.2. Algorithm Approx-Diameter gives an estimate E such that 2\Delta=3 - O(ms ms ns 2 ). Choosing log n gives a running time of O(m Proof. The analysis is partitioned into two cases. Let a and b be two vertices such that \Delta. Case 1: [For all vertices v, jN \Delta=3 (v)j - s.] If either a or b is in D, we are done. Otherwise from the proof of Lemma 3.4, the set D has a vertex (b). Since in Step 6 we compute BFS trees from each vertex in D, one of these is v and b(v) is the desired estimator. Case 2: [There exists a vertex v 2 V such that Let w be the vertex in Step 2. If b(w) - 2\Delta=3, b(w) is our estimator and we are done. Otherwise from Lemma 3.5, PBFS s (w) has a vertex v 2 N \Delta=3 (a) [ N \Delta=3 (b). Since in Step 3 we compute BFS trees from each vertex in PBFS s (w), one of these is v and b(v) is the desired estimator. The running time is easy to analyze. Each partial- BFS in Step 1 takes at most O(s 2 thus, the total time spent on Step 1 is O(ns 2 ). Step 2 can be implemented in O(n) time. In Step 3, we compute BFS trees from s vertices, which requires a total of O(ms) time. The time required in Step 4 is dominated by the time required to compute the partial- BFS trees in Step 1. Theorem 2.1 implies that Step 5 requires only O(n 2 (note that the graph b G could have many more edges than m). By Lemma 3.3, Step 6 takes O(ms time. Finally, the cost of Step 7 is dominated by the cost of computing the various BFS trees in Steps 3 and 6. The running time is dominated by the cost of Steps 1, 3, and 6, and adding the bounds for these gives the desired result. 2 Additive Factor Approximations It is possible to determine not only the diameter, but the all-pairs shortest path distances to within an additive error of 2. The basic idea is that a dominating set, since it contains a neighbor of every vertex in the graph, must contain a vertex that is within distance 1 of any shortest path. Since we can only find a small dominating set for vertices in H(V ), we have to treat L(V ) vertices differently, but their low degree allows us to manage with only a partial-BFS, which we can combine with the information we have gleaned from the dominating set. Algorithm Approx-APSP Comment: Define G[L(V )] to be the subgraph of G induced by L(V ). 1. initialize all entries in the distance matrix b d to infinity 2. compute a dominating set D for H(V ) of size 3. compute a BFS tree from each vertex v 2 D, and update b d with the shortest path lengths for v so obtained 4. compute a BFS tree in G[L(V )] for each vertex d with the shortest path lengths for v so obtained 5. for all u; do 6. return b d as the APSP matrix, and its largest entry as the diameter. Figure 2 illustrates the idea behind this algorithm. 6 Aingworth, Chekuri, Motwani The actual shortest path The path computed in step 5 HI LO The BFS for a node in LO (step The BFS for a node in D (Step A graph with HI, LO, D labeled Figure 2: Illustration of Algorithm Approx-APSP. Theorem 4.1. In Algorithm Approx-APSP, for all vertices , the distances returned in b d satisfy 2. Further, the algorithm can be modified to produce paths of length b d rather than merely returning the approximate distances. This algorithm runs in time O(n choosing log n gives a running time of O(n 2:5 log n). Proof. We first show that the algorithm can be easily modified to return actual paths rather than only the distances. To achieve this, in Steps 3 and 4 we can associate with each updated entry in the matrix the path from the BFS tree used for the update. In Step 5, we merely concatenate the two paths from Step 3 the sum of whose lengths determine the minimum value of d. For a vertex u, it is clear that the shortest path distance to any vertex v 2 V that is returned cannot be smaller than the correct values, since they correspond to actual paths. To see that they differ by no more than 2, we need to consider three cases: Case 1: [u 2 D] In this case, the BFS tree from v is computed in Step 3 and so clearly the distances returned are correct. Case 2: By the definition of D, it must be the case that u has a neighbor w in D. Clearly, the distances from u and w to any other vertex cannot differ by more than 1, and the distances from w are always correct as per Case 1. The assignment in Step 6 guarantees 2. Case 3: [u 2 L(V )] Fix any shortest path from u to v. Suppose that the path from u to v is entirely contained in L(V ); then, d(u; v) is set correctly in Step 4. Otherwise, the path must contain a vertex w 2 H(V ). If w is contained in D, then the correct distance is computed as per Case 1. Finally, if w 2 H(V )nD, then D contains a neighbor x of Clearly, in Step 6, one of the possibilities considered will involve a path from u to x and a path from x to v. Since the distances involving x are correctly computed in Step 3, this means that b 2. Finally, we analyze the running time of this algo- rithm. Step 1 requires only O(n 2 ) time, and Theorem 2.1 implies that we can perform Step 2 in the stated time bound. Step 3 requires ms \Gamma1 n log n for computing the BFS trees. Step 4 may compute as many as \Omega\Gamma n) BFS trees, but G[L(V )] only has O(ns) edges and so this requires only O(n 2 s) time. Finally, Step 5 takes all vertex pairs, and compares them against the s vertices in D. This implies the desired time bound. 2 Although the error in this algorithm is 2, it can be improved for the special case of distinguishing diameter 2 from 4 based on the following two observations. Fact 4.1. If u 2 H(V ) is at distance \Delta from some vertex v, then b Proof. Consider w, the vertex that dominates u. If the algorithm were to have set b 5 of the algorithm would imply b d is exact for vertices in D, this is not possible. 2 Fact 4.2. Whenever the algorithm reports for some 2, we can verify this in time O(ns) per vertex. Thus, by performing a verification for each of the vertices that report distance over 2, we can improve Algorithm Approx-APSP so that it always performs as well as the diameter approximation algorithms of the previous section. The first fact also appears to be useful in bringing the diameter error down to 1, but unfortunately, the vertices in L(V ) cannot be handled as easily for larger diameters. 5 Experimental Results To evaluate the usefulness of our algorithm, we ran it on two families of graphs and compared the results against a carefully coded algorithm based on breadth-first searches. The algorithm Approx-APSP was tweaked with the following heuristic improvement to Step 5 that avoids many needless iterations: when a node has a neighbor in D, then we copy the distances of its neighbor (since they can differ by at most 1). This algorithm (called Fast Approx-APSP) occasionally has a higher fraction of incorrect entries, but seems to be the fastest way to solve the all-pairs shortest path problem. Fast Estimation of Diameter and Shortest Paths 7 Approx-APSP Fast Approx-APSP Approx-APSP Fast Approx-APSP speedup speedup accuracy accuracy GB Median 0:59 3:95 0:69 0:53 GB Average 2:44 10:18 0:72 0:47 GB Standard Deviation 0:24 1:73 0:16 0:13 RG Median 0:52 5:30 0:39 0:51 RG Average 0:63 4:75 0:39 0:55 RG Standard Deviation 0:23 1:70 0:14 0:12 Table 1: Summary of Experimental Results The first family of graphs were random graphs from the G n;m model [Bol85], which are graphs chosen uniformly at random from those with n vertices and m edges. In our experiments, we chose random graphs with n ranging from 10 to 1000, and 2m=n 2 ranging from 0:03 to 0:90. On these graphs, Fast Approx-APSP runs about 5 times faster than the BFS implementation, and about half of the distances are off by one. The second family of graphs come from the Stanford GraphBase [Knu93]. We tested all of the connected, undirected graphs from Appendix C in Knuth [Knu93], ignoring edge weights. This is a very heterogeneous family of graphs, including graphs representing highway connections for American cities, athletic schedules, 5- letter English words, and expander graphs, as well as more combinatorial graphs. Thus the results here are quite indicative of practical performance. Although the BFS-based algorithm runs fastest for certain subfamilies of the GraphBase, Fast Approx-APSP outperformed all other algorithms overall. The results are summarized in Table 1. In the table, GB and RG refer to GraphBase and random graphs, re- spectively. The speedup numbers indicate the inverse of the ratio of the execution time of the algorithms to that of the carefully coded BFS algorithm. The accuracy refers to the ratio of the total number of exact entries in the distance matrix to the total number of entries in the matrix. In both of these families, the accuracy of Approx-APSP could be improved by subtracting 1 in Step 5. This did not seem necessary given that the BFS approach performed about as fast as Approx-APSP, and that Fast- Approx APSP performed faster with roughly 50% accuracy. The numbers indicate that for general graphs where an additive factor error is acceptable, Fast Approx-APSP is the algorithm of choice, and for more specific families of graphs, the parameters can be adjusted for even better performance. Acknowledgements We are grateful to Noga Alon for his comments and suggestions, and to Nati Linial for helpful discussions. Thanks also to Michael Goldwasser, David Karger, Sanjeev Khanna, and Eric Torng for their comments. --R On the exponent of the all pairs shortest path problem. for Boolean Matrix Multiplication and for Shortest Paths. On Diameter Verification and Boolean Matrix Multiplication. Random Graphs. Diameters of Graphs: Old Problems and New Results. Matrix multiplication via arithmetic progressions. Clique partitions Approximation algorithms for combinatorial problems. On the ratio of optimal integral and On the all-pairs-shortest-path problem Gaussian elimination is not optimal. --TR --CTR David Eppstein , Joseph Wang, Fast approximation of centrality, Proceedings of the twelfth annual ACM-SIAM symposium on Discrete algorithms, p.228-229, January 07-09, 2001, Washington, D.C., United States Mattias Andersson , Joachim Gudmundsson , Christos Levcopoulos, Approximate distance oracles for graphs with dense clusters, Computational Geometry: Theory and Applications, v.37 n.3, p.142-154, August, 2007 Toms Feder , Rajeev Motwani , Liadan O'Callaghan , Chris Olston , Rina Panigrahy, Computing shortest paths with uncertainty, Journal of Algorithms, v.62 n.1, p.1-18, January, 2007 Alan P. Sprague, O(1) query time algorithm for all pairs shortest distances on permutation graphs, Discrete Applied Mathematics, v.155 n.3, p.365-373, February, 2007 Mikkel Thorup , Uri Zwick, Approximate distance oracles, Proceedings of the thirty-third annual ACM symposium on Theory of computing, p.183-192, July 2001, Hersonissos, Greece Joachim Gudmundsson , Christos Levcopoulos , Giri Narasimhan , Michiel Smid, Approximate distance oracles for geometric graphs, Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms, p.828-837, January 06-08, 2002, San Francisco, California Michael Elkin , Jian Zhang, Efficient algorithms for constructing (1+,, )-spanners in the distributed and streaming models, Proceedings of the twenty-third annual ACM symposium on Principles of distributed computing, July 25-28, 2004, St. John's, Newfoundland, Canada Mikkel Thorup , Uri Zwick, Approximate distance oracles, Journal of the ACM (JACM), v.52 n.1, p.1-24, January 2005 Joan Feigenbaum , Sampath Kannan , Andrew McGregor , Siddharth Suri , Jian Zhang, Graph distances in the streaming model: the value of space, Proceedings of the sixteenth annual ACM-SIAM symposium on Discrete algorithms, January 23-25, 2005, Vancouver, British Columbia Feodor F. Dragan, Estimating all pairs shortest paths in restricted graph families: a unified approach, Journal of Algorithms, v.57 n.1, p.1-21, September 2005 Surender Baswana , Telikepalli Kavitha , Kurt Mehlhorn , Seth Pettie, New constructions of (, )-spanners and purely additive spanners, Proceedings of the sixteenth annual ACM-SIAM symposium on Discrete algorithms, January 23-25, 2005, Vancouver, British Columbia Mikkel Thorup , Uri Zwick, Spanners and emulators with sublinear distance errors, Proceedings of the seventeenth annual ACM-SIAM symposium on Discrete algorithm, p.802-809, January 22-26, 2006, Miami, Florida Surender Baswana , Sandeep Sen, Approximate distance oracles for unweighted graphs in expected O(n2) time, ACM Transactions on Algorithms (TALG), v.2 n.4, p.557-577, October 2006 Timothy M. Chan, All-pairs shortest paths for unweighted undirected graphs in o(mn) time, Proceedings of the seventeenth annual ACM-SIAM symposium on Discrete algorithm, p.514-523, January 22-26, 2006, Miami, Florida Rezaul Alam Chowdhury , Vijaya Ramachandran, External-memory exact and approximate all-pairs shortest-paths in undirected graphs, Proceedings of the sixteenth annual ACM-SIAM symposium on Discrete algorithms, January 23-25, 2005, Vancouver, British Columbia Surender Baswana , Sandeep Sen, A simple and linear time randomized algorithm for computing sparse spanners in weighted graphs, Random Structures & Algorithms, v.30 n.4, p.532-563, July 2007 All pairs shortest paths using bridging sets and rectangular matrix multiplication, Journal of the ACM (JACM), v.49 n.3, p.289-317, May 2002
shortest paths;diameter;matrix multiplication
312209
Buckets, Heaps, Lists, and Monotone Priority Queues.
We introduce the heap-on-top (hot) priority queue data structure that combines the multilevel bucket data structure of Denardo and Fox with a heap. Our data structure has superior operation bounds than either structure taken alone. We use the new data structure to obtain an improved bound for Dijkstra's shortest path algorithm. We also discuss a practical implementation of hot queues. Our experimental results in the context of Dijkstra's algorithm show that this implementation of hot queues performs very well and is more robust than implementations based only on heap or multilevel bucket data structures.
Introduction A priority queue is a data structure that maintains a set of elements and supports operations insert, decrease-key, and extract-min. Priority queues are fundamental data structures with many applications. Typical applications include graph algorithms (e.g. [14]) and event simulation (e.g. [5]). An important subclass of priority queues used in applications such as event simulation and in Dijkstra's shortest path algorithm [13] is the class of monotone pri- This work was done while the author was visiting NEC Research Institute. y Supported by the Department of Defense, with partial support from NSF Award CCR-9357849, with matching funds from IBM, Schlumberger Foundation, Shell Foundation, and Xerox Corporation. queues. Intuitively, a priority queue is monotone if at any time keys of elements on the queue are at least as big as the key of the most recent element extracted from the queue. In this paper we deal with monotone priority queues. Unless mentioned otherwise, we refer to priority queues whose operation time bounds depend only on the number of elements on the queue as heaps. The fastest implementations of heaps are described in [4, 14, 19]. Alternative implementations of priority queues use buckets (e.g. [2, 7, 11, 12]). Operation times for bucket- based implementations depend on the maximum event duration C, defined in Section 2. See [3] for a related data structure. Heaps are particularly efficient when the number of elements on the heap is small. Bucket-based priority queues are particularly efficient when the maximum event duration C is small. Furthermore, some of the work done in bucket-based implementations can be amortized over elements in the buckets, yielding better bounds if the number of elements is large. In this sense, heaps and buckets complement each other. We introduce heap-on-top priority queues (hot queues), which combine the multi-level bucket data structure of Denardo and Fox [11] and a heap. These queues use the heap instead of buckets when buckets would be sparsely occupied. The resulting implementation takes advantage of the best performance features of both data structures. We also give an alternative and more insightful description of the multi-level bucket data structure. (Concurrently and independently, a similar description has been given by Raman [17].) Hot queues are related to radix heaps (RH) 1 of Ahuja et al. [2]. An RH is similar to the multi-level buckets, but uses a heap to find nonempty buckets. To get the best bounds, the heap operation time in an RH should depend on the number of distinct keys on the heap. The most complicated part of [2] is modifying Fibonacci heaps [14] to meet this requirement. In contrast, the hot queue bounds do not require anything special from the heap. We can use Fibonacci heaps with no modifications and achieve the same bounds as RH. Using the heap of Thorup [19], we obtain even better bounds. As a side-effect, we obtain an O(m implementation of Dijk- stra's shortest path algorithm, improving the previous bounds. Since Thorup's bounds depend on the total number of elements on the heap, RH cannot take immediate advantage of this data structure. We believe that data structures are especially interesting if they work well both in theory and in practice. A preliminary version of the hot queue data structure [6] did not perform well in practice. Based on experimental feedback, we modified the data structure to be more practical. We also developed techniques that make hot queues more efficient in practice. We compare the implementation of hot queues to implementations of multi-level buckets and k-ary heaps in the context of Dijkstra's shortest paths algorithm. Our experimental results show that hot queues perform best overall and are more robust than either of the other two data structures. This is especially significant because a multi-level bucket implementation of Dijkstra's algorithm compared favorably with other implementations of the algorithm in a previous study [7] and was shown to be very robust. For many problem classes, the hot queue implementation of Dijkstra's algorithm is the best both in theory and in practice. Due to the page limit, we omit some proofs, details, and experimental data. A full version of the paper appears in [8]. Preliminaries A priority queue is a data structure that maintains a set of elements and supports operations insert, decrease-key, and extract-min. We assume that elements have keys used to compare the elements and denote the key of an element u by ae(u). Unless mentioned otherwise, we assume that the keys are integral. By the value of an element we mean the key of the ele- ment. The insert operation adds a new element to the queue. The decrease-key operation assigns a smaller value to the key of an element already on the queue. bounds depend on C. The extract-min operation removes a minimum element from the queue and returns the element. We denote the number of insert operations in a sequence of priority queue operations by N . To gain intuition about the following definition, think of event simulation applications where keys correspond to processing times. Let u be the latest element extracted from the queue. An event is an insert or a decrease-key operation on the queue. Given an event, let v be the element inserted into the queue or the element whose key was decreased. The event duration is ae(u). We denote the maximum event duration by C. An application is monotone if all event durations are nonnegative. A monotone priority queue is a priority queue for monotone applications. To make these definitions valid for the first insertion, we assume that during initialization, a special element is inserted into the queue and deleted immediately afterwards. Without loss of generality, we assume that the value of this element is zero. (If it is not, we can subtract this value from all element values.) In this paper, by heap we mean a priority queue whose operation time bounds are functions of the number of elements on the queue. We assume that heaps also support the find-min operation, which returns the minimum element on the heap. We call a sequence of operations on a priority queue balanced if the sequence starts and ends with an empty queue. In particular, implementations of Dijkstra's shortest path algorithm produce balanced operation sequences. In this paper we use the RAM model of computation [1]. The only nonobvious result about the model we use appears in [9], where it is attributed to B. Schieber. The result is that given two machine words, we can find, in constant time, the index of the most significant bit in which the two words differ. 3 Multi-Level Buckets In this section we describe the k-level bucket data structure of Denardo and Fox [11]. We give a simpler description of this data structure by treating the element keys as base-\Delta numbers for a certain parameter \Delta. Consider a bucket structure B that contains k levels of buckets, where k is a positive integer. Except for the top level, a level contains an array of \Delta buckets. The top level contains infinitely many buckets. Each top level bucket corresponds to an interval We choose \Delta so that at most \Delta consecutive buckets at the top level can be nonempty; we need to maintain only these buckets. 2 We denote bucket j at level i by B(i; j). A bucket contains a set of elements in a way that allows constant-time additions and deletions, e.g. in a doubly linked list. Given k, we choose \Delta as small as possible subject to two constraints. First, each top level bucket must contain at least (C by the definition of C, keys of elements in B belong to at most level buckets. Second, \Delta must be a power of two so that we can manipulate base-\Delta numbers efficiently using RAM operations on words of bits. With these constraints in mind, we set \Delta to the smallest power of two greater or equal to (C We maintain -, the key of the latest element extracted from the queue. Consider the base-\Delta representation of the keys and an element u in B. By definitions of C and \Delta, - and the k least significant digits of the base-\Delta representation of ae(u) uniquely determine ae(u). If - and ae are the numbers represented by the k least significant digits of - and ae(u), respectively, then otherwise. For we denote by - i the i-th least significant digit of the base-\Delta representation of -. We denote the number obtained by deleting the least significant digits of - by - k . Similarly, for 1 denote the i-th least significant digits of ae(u) by u i and we denote the number obtained by deleting least significant digits of ae(u) by u k . The levels of B are numbered from k (top) to 1 (bottom) and the buckets at each level are numbered from 0 to \Delta \Gamma 1. Let i be the index of the most significant digit in which ae(u) and - differ or 1 if Given - and u with ae(u) -, we say that the position of u with respect to - is (i; u i ). If u is inserted into B, it is inserted into B(i; u i ). For each element in B, we store its position. If an element u is in B(i; j), then all except significant digits of ae(u) are equal to the corresponding digits of - and u The following lemma follows from the fact that keys of all elements on the queue are at least -. Lemma 3.1. For every level i, buckets B(i; are empty. At each level i, we maintain the number of elements at this level. We also maintain the total number of elements in B. The extract-min operation can change the value of -. As a side-effect, positions of some elements in B may change. Suppose that a minimum element is deleted and 2 The simplest way to implement the top level is to "wrap around" modulo \Delta. the value of - changes. Let - 0 be the value of - before the deletion and let - 00 be the value of - after the deletion. By definition, keys of the elements on the queue after the deletion are at least - 00 . Let i be the position of the least significant digit in which - 0 and - 00 differ. If differ only in the last digit), then for any element in B after the deletion its position is the same as before the deletion. If i ? 1, than the elements in bucket B(i; - 00 respect to - 0 are exactly those whose position is different with respect to - 00 . These elements have a longer prefix in common with - 00 than with - 0 and therefore they belong to a lower level with respect to - 00 . The bucket expansion procedure moves these elements to their new positions. The procedure removes the elements from B(i; - 00 puts them into their positions with respect to - 00 . The two key properties of bucket expansions are as follows: ffl After the expansion of B(i; - 00 are in correct positions with respect to - 00 . Every element of B moved by the expansion is moved to a lower level. Now we are ready to describe the multi-level bucket implementation of the priority queue operations. ffl insert To insert an element u, compute its position (i; and insert u into B(i; j). ffl decrease-key Decrease the key of an element u in position (i; as follows. Remove u from B(i; j). Set ae(u) to the new value and insert u as described above. ffl extract-min (We need to find and delete the minimum element, update -, and move elements affected by the change of -.) Find the lowest nonempty level i. Find the first nonempty bucket at level i. delete an element from B(i; j), set ae(u), and return u. (In this case old and new values of - differ in at most the last digit and all element positions remain the same.) examine all elements of B(i; a minimum element u from B(i; j). Set and expand B(i; j). Return u. Next we deal with efficiency issues. Lemma 3.2. Given - and u, we can compute the position of u with respect to - in constant time. Iterating through the levels, we can find the lowest nonempty level in O(k) time. Using binary search, we can find the level in O(log time. We can do even better using the power of the RAM model: Lemma 3.3. If k - log C, then the lowest nonempty level of B can be found in O(1) time. As we will see, the best bounds are achieved for k - log C. A simple way of finding the first nonempty bucket at level i is to go through the buckets. This takes O(\Delta) time. Lemma 3.4. We can find the first nonempty bucket at a level in O(\Delta) time. Remark. One can do better [11]. Divide buckets at every level into groups of size dlog Ce, each group containing consecutive buckets. For each group, maintain a dlog Ce-bit number with bit j equal to 1 if and only if the j-th bucket in the group is not empty. We can find the first nonempty group in O log C time and the first nonempty bucket in the group in O(1) time. This construction gives a log C factor improvement for the bound of Lemma 3.4. By iterating this construction p times, we get an O log p C bound. Although the above observation improves the multi-level bucket operation time bounds for small values of k, the bounds for the optimal value of k do not improve. To simplify the presentation, we use Lemma 3.4, rather than its improved version, in the rest of the paper. Theorem 3.1. Amortized bounds for the multi-level bucket implementation of priority queue operations are as follows: O(k) for insert, O(1) for decrease-key, Proof. The insert operation takes O(1) worst-case time. We assign it an amortized cost of k because we charge moves of elements to a lower level to the insertions of the elements. The decrease-key operation takes O(1) worst case time and we assign it an amortized cost of O(1). For the extract-min operation, we show that its worst-case cost is O(k plus the cost of bucket expansions. The cost of a bucket expansion is proportional to the number of elements in the bucket. This cost can be amortized over the insert operations, because, except for the minimum element, each element examined during a bucket expansion is moved to a lower level. Excluding bucket expansions, the time of the operation is O(1) plus the O(\Delta) for finding the first nonempty bucket. This completes the proof since Note that in any sequence of operations the number of insert operations is at least the number of extract-min operations. In a balanced sequence, the two numbers are equal, and we can modify the above proof to obtain the following result. Theorem 3.2. For a balanced sequence, amortized bounds for the multi-level bucket implementation of priority queue operations are as follows: O(1) for insert, O(1) for decrease-key, O(k+C 1=k ) for extract-min. For the extract-min bound is O(C). For 2, the bound is O( C). The best bound of O log C log log C is obtained for log log C e. Remark. The k-level bucket data structure uses 4 Hot Queues A hot queue uses a heap H and a multi-level bucket structure B. Intuitively, the hot queue data structure works like the multi-level bucket data structure, except we do not expand a bucket containing less than t ele- ments, where t is a parameter set to optimize perform- ance. Elements of the bucket are copied into H and processed using the heap operations. If the number of elements in the bucket exceeds t, the bucket is expanded. In the analysis, we charge scans of buckets at the lower levels to the elements in the bucket during the expansion into these levels and obtain an improved bound. A k-level hot queue uses the k-level bucket structure with an additional special level k + 1, which is needed to account for scanning of buckets at level k. Only two buckets at the top level can be nonempty at any time, 1. Note that if the queue is nonempty, then at least one of the two buckets is nonempty. Thus bucket scans at the special level add a constant amount to the work of processing an element found. We use wrap-around at level k of k. An active bucket is the bucket whose elements are in H. At most one bucket is active at any time, and H is empty if and only if there is no active bucket. We denote the active bucket by B(a; b). We make a bucket active by making H into a heap containing the bucket elements, and inactive by reseting the heap to an empty heap. (Elements of the active bucket are both in the bucket and in H.) To describe the details of hot queues, we need the following definitions. We denote the number of elements in B(i; j) by c(i; j). Given -, \Delta, we say that an element u is in the range of B(i; by replacing each of the least significant digits of - by 0 1). Using RAM operations, we can check if an element is in the range of a bucket in constant time. We maintain the invariant that - is in the range of there is an active bucket. The detailed description of the queue operations is as follows. ffl insert If H is empty or if the element u being inserted is not in the range of the active bucket, we insert u into B as in the multi-level case. Otherwise u belongs to the active bucket B(a; b). t, we insert u into H and B(a; b). If t, we make B(a; b) inactive, add u to B(a; b), and expand the bucket. ffl decrease-key Decrease the key of an element u as follows. If u is in H, decrease the key of u in H. Otherwise, let (i; j) be the position of u in B. Remove u from j). Set ae(u) to the new value and insert u as described above. ffl extract-min If H is not empty, extract and return the minimum element of H. Otherwise, proceed as follows. Find the lowest nonempty level i. Find the first nonempty bucket at level i by examining buckets starting from B(i; - i ). delete an element from B(i; j), set ae(u), and return u. examine all elements of B(i; delete a minimum element u from B(i; j). Set t, expand B(i; j). Otherwise, make B(i; active. Return u. Correctness of the hot queue operations follows from the correctness of the multi-level bucket operations, Lemma 3.1, and the observation that if u is in H and v is in B but not in H, then ae(u) ! ae(v). Lemma 4.1. The cost of finding the first nonempty bucket at a level, amortized over the insert operations, is O(k\Delta=t). Proof. We scan at most one nonempty bucket during a search for the first nonempty bucket. We scan an empty bucket at level i at most once during the period of time while the prefix of - including all except the last digits remains the same. Furthermore, we scan the buckets only when level i is nonempty. This can happen only if a higher-level bucket has been expanded during the period the prefix of - does not change. We charge bucket scans to insertions of these elements into the queue. Over t elements that have been expanded are charged at most k times each, giving the desired bound. Theorem 4.1. Let I(N ), D(N the time bounds for heap insert, decrease-key, find-min, and extract-min opera- tions. Then amortized times for the hot queue operations are as follows: O(k for decrease-key, and O(F (t)+X(t)+ kC 1=k extract-min. Proof. Two key facts are crucial for the analysis. The first fact is that the number of elements on H never exceeds t since each level accounts for at most t elements. The second fact is Lemma 4.1. Given the first fact and Theorem 3.1, the bounds are straightforward. For Fibonacci heaps [14], the amortized time bounds are I(N O(logN ). This gives O(k), O(1), and O(log t amortized bounds for the queue operations insert, decrease-key, and extract-min, respectively. Setting log C and log C), O(1), and O( log C) amortized bounds. Radix heaps achieve the same bounds but are more complicated. For Thorup's heaps [19], the expected amortized time bounds are I(N This gives O(k), O(1), and expected amortized time bounds for the queue operations insert, decrease-key, and extract-min, respectively. Here ffl is any positive constant. Setting 3 C and O(log3 C), O(1), and O(log3 +ffl C) expected amortized time. Similarly to Theorem 3.2, we can get bounds for a balanced sequence of operations. Theorem 4.2. Let I(N ), D(N the time bounds for heap insert, decrease-key, find-min, and extract-min opera- tions, and consider a balanced sequence of the hot queue operations. The amortized bounds for the operations are as follows: O(I(t)) for insert, O(D(t) decrease-key, and O(k extract-min. Using Fibonacci heaps, we get O(1), O(1), and amortized bounds for the queue operations. Consider extract-min, the only operation with nonconstant bound. Setting log C , we get an O(logC) bound. Setting log C we get an O(logC) bound. Setting log C and we get an O( log C) bound. Remark. All bounds are valid only when t - n. For should use a heap. Remark. Consider the 1- and 2-level implementations. Although the time bounds are the same, the two-level implementation has two advantages: It uses less space and its time bounds remain valid for a wider range of values of C. Using Thorup's heaps and setting 3 C and expected amortized time bounds. The above time bounds allow us to get an improved bound on Dijkstra's shortest path algorithm. Suppose we are given a graph with n vertices, m arcs, and integral arc lengths in the range [0; C]. The running time of Dijkstra's algorithm is dominated by a balanced sequence of priority queue operations that includes O(n) insert and extract-min operations and O(m) decrease-key operations (see e.g. [18]). The maximum event duration for this sequence of operations is C. The bounds for the queue operations immediately imply the following result. Theorem 4.3. On a network with N vertices, m arcs, and integral lengths in the range [0; C], the shortest path problem can be solved in O(m expected time. This improves the deterministic bound of O(m log C) of [2]. (The hot queue implementation based on Fibonacci heaps matches this deterministic bound.) 5 Implementation Details Our previous papers [7, 15] describe implementations of multi-level buckets. Our implementation of hot queues augments the multi-level bucket implementation of [15]. See [15] for details of the multi-level bucket implementation. Consider a k-level hot queue. As in the multi-level bucket implementation, we set \Delta to the smallest power of two greater or equal to C 1=k . Based on the analysis of Section 4 and experimental results, we set t, the maximum size of an active bucket, to d C 1=k log C e. The number of elements in an active bucket is often small. We take advantage of this fact by maintaining elements of an active bucket in a sorted list instead of a heap until operations on the list become expensive. At this point we switch to a heap. We use a k-heap with worked best in our tests. (See e.g. [10].) To implement priority queue operations using a sorted list, we use doubly linked list sorted in non-decreasing order. Our implementation is designed for the shortest path application. In this application, the number of decrease-key operations on the elements of the active bucket tends to be very small (in [16], this fact is proven for random graphs). Because of this, elements inserted into the list or moved by the decrease-key operation tend to be close to the beginning of the list. A different implementation may be better for a different application. The insert operation searches for the element's position in the list and puts the element at that position. One can start the search in different places. Our implementation starts the search at the beginning of the list. Starting at the end of the list or at the point of the last insertion may work better in some applications. The extract-min operation removes the first element of the list. The decrease-key operation removes the element from the list, finds its new position, and puts the element in that position. Our implementation starts the search from the beginning of the list. Starting at the previous position of the element, at the end of the list, or at the place of the last insertion may work better in some applications. When a bucket becomes active, we put its elements in a list if the number of elements in the bucket is below 1 and in a heap otherwise. (Our code uses We switch from the list to the heap using the following rule, suggested by Satish Rao (personal communica- Switch if an insert or a decrease-key operation examines more than T ative, which may work better in some applications but performed worse in ours, is to switch when the number of elements in the list exceeds T 1 . 6 Experimental Setup Our experiments were conducted on a Pentium Pro with a 166 MHz processor running Linux 1.3.68. The machine has 64 Meg. of memory and all problem instances fit into main memory. Our code was written in C++ and compiled with the Linux gcc compiler version 2.7.0 using the -O6 optimization option. We made an effort to make our code efficient. In particular, we set the bucket array sizes to be powers of two. This allows us to use word shift operations when computing bucket array indices. The full paper reports on experimental results for five types of graphs. Two of the graph types were chosen to exhibit the properties of the algorithm at two extremes: one where the paths from the start vertex to other vertices tend to be order \Theta(n), and one in which the path lengths are order \Theta(1). The third graph type was random sparse graphs. The fourth type was constructed to have a lot of decrease-key operations in the active bucket. This is meant to test the robustness of our implementations when we violate the assumption (made in Section 5) that there are few decrease-key operations. The fifth type of graphs is meant to be easy or hard for a specific implementation with a specific number of bucket levels. We tested each type of graph on seven implement- ations: k-ary heaps, with k=4; k-level buckets, with k ranging from 1 to 3, and k-level hot queues, with k ranging from 1 to 3. Each of these has parameters to tune, and the results we show are for the best parameter values we tested. Most of the problem families we use are the same as in our previous paper [15]. The next two sections describe the problem families. 6.1 The Graph TypesTwo types of graphs we explored were grids produced using the GRIDGEN generator [7]. These graphs can be characterized by a length x and width y. The graph is formed by constructing x layers, each of which is a path of length y. We order the layers, as well as the vertices within each layer, and we connect each vertex to its corresponding vertex on adjacent layers. All the vertices on the first layer are connected to the source. The first type of graph we used, the long grid, has a constant width - 16 vertices in our tests. We used graphs of different lengths, ranging from 512 to 32; 768 vertices. The arcs had lengths chosen independently and uniformly at random in the range from 1 to C. C varied from 1 to 100; 000; 000. The second type of graph we used was the wide grid type. These graphs have length limited to 16 layers, while the width can vary from 512 to 32; 768 vertices. C was the same as for long grids. The third type of graphs includes random graphs with uniform arc length distribution. A random graph with n vertices has 4n arcs. The fourth type of graphs is the only type that is new compared to [15]. These are based on a cycle of n vertices, numbered 1 to n. In addition, each vertex is connected to d \Gamma 1 distinct vertices. The length of an arc (i; j) is equal to 2k 1:5 , where k is the number of arcs on the cycle path from i to j. The fifth type of graphs includes hard graphs. These are parameterized by the number of vertices, the desired number of levels k, and a maximum arc length C. From C we compute p, the number of buckets in each level assuming the implementation has k levels. The graphs consist of two paths connected to the source. The vertices in each path are at distance p from each other. The distance from the source to path 1 is 0; vertices in this path will occupy the first bucket of bottom level bins. The distance from the source to path 2 is making these vertices occupy the last bucket in each bottom-level bin. In addition, the source is connected to the last vertex on the first path by an arc of length 1, and to the last vertex of the second path by an arc of length C. A summary of our graph types appears in Table 1. 6.2 Problem FamiliesFor each graph type we examined how the relative performance of the implementations changed as we increased various parameters. Each type of modification constitutes a problem family. The families are summarized in Table 2. In general, each family is constructed by varying one parameter while holding the others constant. Different families can vary the same parameter, using different constant values. 7 Experimental Results The 2- and 3-level bucket structures are very robust [7, 15]. In most cases, 2- and 3-level hot queues perform similarly to, although usually slightly better than, the corresponding multi-level bucket structures. One level hot queues are significantly more robust than one level buckets, but not as robust as 2- and 3-level hot queues. Due to the shortage of space, we present experimental results for the hard problems only. These problems separate hot queues from multi-level buckets. In the tables, k denotes the implementation: "h" for heap, "bi" for buckets with i levels, and "hi" for hot queue with i levels. We report running times and counts for operations that give insight into algorithm performance. For the heap implementation, we count the total number of insert and decrease-key operations. For the bucket implementations, we count the number of empty buckets examined (empty operations). For the hot queue implementations, we count the number of empty operations and the number of insert and decrease-key operations on the active bucket. We plot the data in addition to tabulating it. We were unable to run 1-level bucket and hot queue implementations on some problems because of memory limitations. We leave the corresponding table entries blank. Tables 3 and 4 give data for the hard-2 and hard- 3 families, designed to be hard for 2- and 3-level bucket implementations, respectively. With at most two elements on the heap at any time, the heap implementation is the most efficient on the hard problems. For the hot queue implementations, no bucket is expanded and the action is confined to the two special top level buckets. Thus hot queues perform almost as well as heaps. The only exception is h1 for the largest value of C it could handle, where its running time is about 1:5 times greater than for other value of C. We have no explanation for this discrepancy. The hard-2 problems are hard for b1 and b2, and, as expected, these implementations do poorly on this family. Similarly, all bucket implementation do worse than the other implementations on the hard-3 family. Concluding Remarks In theory, the hot queue data structure is better than both the heap and the multi-level bucket data structures. Our experiments show that the resulting implementation is more robust than the heap or the multi-level bucket data structures. The new heap of Raman [17] instead of Thorup's heap improves our time bound: a factor of log ffl C is replaced by p log log C. Hot queues seem more practical than radix heaps. The latter data structure requires more bookkeeping. In addition, the hot queue heap usually contains much fewer elements, and our implementation takes advantage of this fact. The 2-level hot queue data structure seems as robust as the 3-level hot queue and is usually somewhat faster. This data structure should be best in most applications. The 3-level structure may be more robust for large values of C because the value of t is much smaller, reducing the sensitivity to the parameters for active buckets. The 1-level hot queue may be useful in event- simulation applications because it can be viewed as a robust version of the calendar queue data structure. Acknowledgments We would like to thank Bob Tarjan for stimulating discussions and insightful comments, Satish Rao for suggesting an adaptive strategy for switching from lists to heaps, and Harold Stone for useful comments on a draft of this paper. --R The Design and Analysis of Computer Algorithms. Calandar Queues: A Fast O(1) Priority Queue Implementation for the Simulation Event Set Problem. Shortest Paths Algorithms: Theory and Experimental Evaluation. Deterministic Coin Tossing with Applications to Optimal Parallel List Ranking. Introduction to Algorithms. Algorithm 360: Shortest Path Forest with Topological Ordering. A Note on Two Problems in Connexion with Graphs. Fibonacci Heaps and Their Uses in Improved Network Optimization Algorithms. Implementations of Dijkstra's Algorithm Based on Multi-Level Buckets Expected Performance of Dijkstra's Shortest Path Algorithm. Fast Algorithms for Shortest Paths and Sorting. Data Structures and Network Al- gorithms On RAM Priority Queues. --TR --CTR Mikkel Thorup, Integer priority queues with decrease key in constant time and the single source shortest paths problem, Proceedings of the thirty-fifth annual ACM symposium on Theory of computing, June 09-11, 2003, San Diego, CA, USA Stephen Alstrup , Thore Husfeldt , Theis Rauhe , Mikkel Thorup, Black box for constant-time insertion in priority queues (note), ACM Transactions on Algorithms (TALG), v.1 n.1, p.102-106, July 2005 Piet Van Mieghem , Fernando A. Kuipers, Concepts of exact QoS routing algorithms, IEEE/ACM Transactions on Networking (TON), v.12 n.5, p.851-864, October 2004 Klaus Brengel , Andreas Crauser , Paolo Ferragina , Ulrich Meyer, An experimental study of priority queues in external memory, Journal of Experimental Algorithmics (JEA), 5, p.17-es, 2000 Ran Mendelson , Mikkel Thorup , Uri Zwick, Meldable RAM priority queues and minimum directed spanning trees, Proceedings of the fifteenth annual ACM-SIAM symposium on Discrete algorithms, January 11-14, 2004, New Orleans, Louisiana Mikkel Thorup, Integer priority queues with decrease key in constant time and the single source shortest paths problem, Journal of Computer and System Sciences, v.69 n.3, p.330-353, November 2004 Haim Kaplan , Robert E. Tarjan , Kostas Tsioutsiouliklis, Faster kinetic heaps and their use in broadcast scheduling, Proceedings of the twelfth annual ACM-SIAM symposium on Discrete algorithms, p.836-844, January 07-09, 2001, Washington, D.C., United States
priority queues;data structures;shortest paths
312215
Local Labeling and Resource Allocation Using Preprocessing.
This paper studies the power of nonrestricted preprocessing on a communication graph G, in a synchronous, reliable system. In our scenario, arbitrary preprocessing can be performed on G, after which a sequence of labeling problems has to be solved on different subgraphs of G. We suggest a preprocessing that produces an orientation of G. The goal is to exploit this preprocessing for minimizing the radius of the neighborhood around each vertex from which data has to be collected in order to determine a label. We define a set of labeling problems for which this can be done. The time complexity of labeling a subgraph depends on the topology of the graph G and is always less than $\min\{\chi(G), O((\log n)^{2})\}$. On the other hand, we show the existence of a graph for which even unbounded preprocessing does not allow fast solution of a simple labeling problem. Specifically, it is shown that a processor needs to know its $\Omega(\log n / \log \log n)$-neighborhood in order to pick a label.Finally, we derive some results for the resource allocation problem. In particular, we show that $\Omega(\log n / \log \log n)$ communication rounds are needed if resources are to be fully utilized. In this context, we define the compact coloring problem, for which the orientation preprocessing provides fast distributed labeling algorithm. This algorithm suggests efficient solution for the resource allocation problem.
Introduction . The time required to perform certain computations in message-passing systems depends, in many cases, on the locality of information, i.e., the distance to which information should be forwarded. Clearly, within t communication rounds, a processor can get information only from processors located within distance t. The study of problems that are local, i.e., in which the value of a processor depends only on its close-by neighborhood, has attracted much attention, e.g., [13, 16, 12, 18, 11]. This study assumed that processors have no knowledge about the network topology. In many common scenarios, this is not the situation: If the same problem has to be solved many times on different sub-networks of a fixed network G, then it might be worthwhile to conduct some preliminary preprocessing on G. We study labeling problems, in which each processor has to pick a label, subject to some restrictions on the labeling of the whole network. We allow arbitrary pre-processing on G. Afterwards, several instances of the same labeling problem need to be solved on different sub-networks G 0 of G. All processors of G can participate in the algorithm when a particular sub-network G 0 is labeling itself, but only the processors of G 0 have to pick labels. It is assumed that the system is synchronous and operates in rounds; there is no bound on message length, and local computation is unlimited. Furthermore, we assume the system is completely reliable. The preprocessing attempts to increase the locality of the problem, i.e., decrease the radius of preliminary version of this paper appeared in proceedings of the 8th International Workshop on Distributed Algorithms, Terschelling, The Netherlands, September/October 1994, (G. Tel and P. Vitanyi, Eds.), pp. 194-208, Lecture Notes in Computer Science #857, Springer-Verlag. This work was supported by grant No. 92-0233 from the United States-Israel Binational Science Foundation (BSF), Jerusalem, Israel, by the fund for the promotion of research in the Technion, and by Technion VPR funds. 2 Department of Computer Science, The Technion, Haifa 32000, Israel. Part of the work of Hadas Shachnai was done while at IBM T.J. Watson Research Center, Yorktown Heights, NY. Email: hagit@cs.technion.ac.il, hadas@cs.technion.ac.il, and tami@cs.technion.ac.il. the neighborhood a processor v needs to know in order to pick a label. The preprocessing we present produces an orientation that assigns priorities to the processors. Later, when a processor has to compute its label in some subgraph only considers processors with higher priorities. We define a parameter that quantifies the quality of these orientations, denoted by t(G). t(G) depends on the topology of G, and it is always less than minf-(G); O((log n) 2 )g. We define extendible labeling problems, in which a labeled graph can be extended by an independent set of vertices to a larger labeled graph without invalidating the original labels. The maximal independent set problem and the 1)-coloring problem are extendible. We suggest an efficient preprocessing on G which allows to solve these problems within t(G) rounds on any subgraph of G. We also discuss a distributed randomized preprocessing on G that takes O((log n) 2 ) rounds and enables to solve these problems on any subgraph of G within O((log n) 2 ) rounds. This gives a distributed randomized algorithm for compact coloring. Bar-Noy et al. ([6]) have shown that this algorithm provides efficient solutions to the resource allocation problem, for a large class of graphs. We introduce a problem in which processors have to communicate with processors at a non-constant distance, even after unbounded preprocessing. The problem is k- dense coloring, which is a restricted coloring problem. A coloring is k-dense if every vertex with color c ? k should have a neighbor with color c that validating that a coloring is k-dense requires only checking with the neighbors (i.e., processors that are at distance 1). We prove that there exists a network on which processors must know their \Omega\Gammaeir n= log log n)-neighborhood in order to pick a color. That is, for some networks, even unbounded preprocessing does not allow to solve the problem locally. The locality of distributed computations was first studied by Cole and Vishkin, who showed in [9] that a 3-coloring of a ring requires only the knowledge of a O(log n)- neighborhood; this bound was shown to be tight by Linial [12]. The more general problem of computing labels locally was studied by Naor and Stockmeyer [16] in the case where no preprocessing is allowed. They present local algorithms for some labeling problems whose validity can be checked locally, and also show that randomization does not help in making a labeling problem local. In follow-up work, Mayer, Naor and Stockmeyer [15] consider the amount of initial symmetry-breaking needed in order to solve certain labeling problems. Other, less related, works studied coloring and the maximal independent set problem in graphs (e.g., Goldberg, Plotkin and Shannon [11], Szegendy and Vish- wanathan [18], and Panconesi and Srinivasan [17]). Another use of graph-theoretic techniques for local algorithms appears in works on sparse partition [2, 14]. In these works, preprocessing is applied in order to partition a graph into graphs with small diameters. Given such a partition, it is possible to solve the problem locally for each sub-graph and then compose the resulting labels. See also the survey by Linial [13], which describes other works on locality in distributed computation. Preprocessing is very helpful in the context of on-going problems, such as resource allocation [7], where jobs with conflicting resource requirements have to be scheduled efficiently. An instance of the problem is a communication graph G. The vertices represent processors, and there is an edge between a pair of processors if they may compete on a resource. The resource requirements of a processor may vary, and current requirements are represented by a dynamic conflict graph C, where the vertices are processors waiting to execute their jobs, and there is an edge between two processors that currently compete on some resource. (Note that C ' G.) We consider a restricted version of the resource allocation problem: A schedule is k-compact, if for every waiting processor p i , in every k rounds, either p i runs, or there exists some conflicting neighbor of p i which runs. This guarantees that p i is delayed only because one of its conflicting neighbors is running. The lower bound for the k-dense coloring problem implies that there is no preprocessing which enables a distributed k-compact schedule within less than \Omega\Gammaan/ n= log log n) rounds. We present a distributed algorithm which is -compact, where - is a known upper bound on the execution time of a job; the algorithm uses preprocessing that produces a t-orientation. The response time of our algorithm is the degree of p i in C. The resource allocation problem was introduced by Chandy and Misra [7]. In their definition, known as the dining philosophers problem, the resource requirements of the processors are static. We consider the dynamic version of the problem, known as the drinking philosophers problem. Several algorithms for the drinking philosophers problem are known. Without preprocessing, the best algorithm to date [5] achieves log n) response time, where ffi i is the degree of p i in C and ffi is the maximal degree in C. In contrast, by using preprocessing, our algorithm achieves a response time of An algorithm that relies on preprocessing (which colors the communication graph to induce priorities between processors) and achieves a response time of O(ffi 2 -) was presented in [8]. The usage of a preprocessing that induces an orientation of the conflict graph was first considered in [7]; Barbosa and Gafni [4] present theoretical results concerning the maximal concurrency which may be achieved using orientation. Like our algorithms, in these papers, the orientation is used to induce priorities between processors, so as to decrease the waiting time of processors. However, in this work the quality of a graph orientation is measured as the maximal directed length in the graph, which corresponds to the maximal waiting chain for a particular processor. In contrast, our measure for the quality of an orientation is the maximal undirected distance between two processors that are connected by a directed path. This allows us to combine the orientation preprocessing with a local distributed labeling algorithm, such that the resulting waiting time for each processor is bounded by a small constant, although the length of the maximal directed path may equal to the size of the graph. The rest of this paper is organized as follows. In Section 2 we give some basic definitions. In Section 3 we study labeling problems: we derive a lower bound for a labeling problem that holds also for the case, where unbounded preprocessing is allowed; we introduce the t-orientation preprocessing and prove that this preprocessing provides efficient labeling algorithms for certain problems. Section 4 deals with the resource allocation problem: we present the lower bound for k-compact resource allocation, and a distributed algorithm for -compact resource allocation using t-orientation. We conclude in Section 5 with some problems, which are left open by our work. 2. Preliminaries. Model of Computation:. We consider a distributed message-passing system with processors . The network connecting the processors is modeled as a graph where vertices correspond to processors and there is a bidirectional communication link between every pair of adjacent processors. We assume the system is synchronous and operates in rounds. That is, at the beginning of round k + 1, each processor receives all the messages sent to it by its neighbors at the end of round k; after some local computation, the processor may send a message to (some or all of) its neighbors. There is no bound on message length, and local computation is unlimited. Graph Theoretic Notions:. Consider a directed/undirected graph E). For any two vertices v; v) be the undirected distance between v and u in G; note that even if G is directed, the distance is measured on the shortest undirected path in G between v and u. The diameter of the G, diam(G), is max v;u2V d(v; u). Given a vertex v, the r-neighborhood of v, for some integer r - 0, is the subgraph of G induced by all vertices u such that d(v; u) - r. The girth of G, g(G), is the length of the shortest cycle in G. A set of vertices is an independent if no two vertices in V 0 are adjacent. An independent set is maximal if it is not contained in a strictly larger independent set. A c-coloring of G is a partition of V into c independent sets. Equivalently, a c-coloring is a mapping specifying for each vertex its color, such that two adjacent vertices do not have the same color. The chromatic number of G, -(G), indicates the smallest number c, for which G has a c-coloring. Given a graph G, denote by ffi (v) the degree of the vertex v, i.e., the number of vertices adjacent to it; let \Delta be the maximal degree of a vertex in G. If G is directed, then a vertex v is a source in G if it has no incoming edges. Labeling Problems:. A labeling of a graph E) with some alphabet \Sigma is a mapping labeling problem L is a set of labelings. Intuitively, this is the set of labelings that satisfy certain requirements. For example, c-coloring is a labeling problem with and the requirement that for every edge hv; ui, A distributed algorithm solves a labeling problem L if, after performing some rounds of communication, each processor picks a label such that the labeling of the graph is in L. 3. Labeling Problems. 3.1. A Lower Bound. We present a labeling problem and prove that every distributed algorithm for solving this problem requires at least \Omega\Gammaast n= log log n) rounds, even with unbounded preprocessing. The problem is a restricted coloring problem, where adjacent vertices should have different labels, and, in addition, the labels have to be close to each other. Formally: Definition 3.1. A coloring is k-dense, for a fixed k - 1, if every vertex with color c ? k has a neighbor with color c 0 2 Intuitively, in a k-dense coloring of a graph, every vertex with color c ? k has at least one neighbor with a smaller color which is relatively close to c; k captures the maximal gap between the colors. Given a labeling of a graph, every vertex v with color c can validate its label by examining its 1-neighborhood: the label is legal if v has no neighbor with label c and if c ? k then v has a neighbor with color c (This means that k-dense coloring is 1-checkable, in the terminology of [16].) We now present our lower bound result. The proof shows a graph G and a vertex G, such that v must pick different labels in two different subgraphs G 1 and G 2 of G, but v has the same 1 (log n= log log n)-neighborhoods in G 1 and G 2 . The proof uses graphs which have both a large chromatic number and a large girth; the existence of these graphs is guaranteed by the following theorem. Theorem 3.1 (Erd- os [10]). For any n - 1 and graph G with n vertices such that -(G) ? 1(log n) and g(G) ? 1(log n= log '). The following is immediate when taking Corollary 3.2. For any n - 1 and log n), there exists a graph G with n vertices such that -(G) ? 1(log n= log log n) + k and g(G) ?k (log n= log log n). The next lemma shows that the maximal color in a k-dense coloring of a tree is a lower bound on the tree's depth. Lemma 3.3. In every k-dense coloring of a tree T , if there is a vertex v with color c, then there is a vertex at distance at least c Proof. Since the coloring is k-dense, v must have a neighbor v 1 , such that c(v 1 must have a neighbor v 2 , such that c(v 2 2k, and in general, must have a neighbor v i with color at least c \Gamma ik. The path v; be extended to v i as long as i - Therefore, the length of the path is at least c 1. Clearly, this is a simple path. Since T is a tree, there is no other simple path from v to v d c . Therefore, d(v; v d c which proves the lemma. We can now prove the main theorem of this section: Theorem 3.4. For every k ? 1 and n - 1 such that k ! 1log there exists a communication graph G of size n and a subgraph G 0 of G such that every distributed algorithm that finds a k-dense coloring of G 0 requires at least 1 (log n= log log n) rounds. Proof. Assume, by way of contradiction, that there exists an algorithm A which finds a k-dense coloring within R rounds such that R ! 1 (log n= log log n). Clearly, within R rounds a vertex knows only about its R-neighborhood. That is: Proposition 3.5. Let G 1 and G 2 be two subgraphs of G, and let v be a vertex of G. If the R-neighborhood of v in G 1 is identical to the R-neighborhood of v in G 2 then v picks the same label when executing A on G 1 and on G 2 . By Corollary 3.2, there exists a graph G of size n such that -(G) ? kR and g(G) ? 2R. By the assumption, A finds a k-dense coloring of any subgraph G 0 of G within R rounds. In particular, A finds a k-dense coloring of G itself. Since there exists a vertex v with color c ? kR be the R- neighborhood of v in G. Since g(G) ? 2R and G 0 includes only vertices at distance R from v, it follows that G 0 is a tree. Clearly, v has the same R-neighborhood in G and G 0 . Therefore, by Proposition 3.5, v is colored c also in G 0 . Since G 0 is a tree, Lemma 3.3 implies that there is vertex at distance d c v. Hence, R - c 1. On the other hand, since c ? kR+ k, it follows that R ! c A contradiction. Remark: For stating the lower bound in Theorem 3.4 we assume that k ? 1. For the existence of a graph G 1 with n vertices, log log n)+1, and log log n), implies in a similar way, that every distributed algorithm that finds a 1-dense coloring requires at least 1(log n= log log n) rounds. 3.2. Efficient Labeling Using t-Orientation. In this section we define a class of labeling problems, and show a specific preprocessing which allows to solve them efficiently. Let G 0 ' G be a graph that has to be labeled. Clearly, within diam(G 0 )+1 rounds, each processor v 2 G 0 can learn G 0 , and therefore can pick a label. 1 Intuitively, 1 Note that if G 0 is not connected then diam(G labeling problems, such as coloring, it is sufficient for a processor to know its connected component in G 0 in order to pick a label. For these problems, the number of rounds needed in order to label G 0 is diam(G 0 is the connected component with maximal diameter in G 0 . For other labeling problems, such as finding the number of processors in G 0 , the whole graph G 0 should be known. For this kind of (a) Fig. 1. Optimal t-orientations of some graphs. the preprocessing presented in this section orients the edges between neighboring processors, thereby assigning priorities, in such a way that a processor is close to vertices it is oriented to (i.e., with higher priority). We show that for some problems (including coloring and maximal independent set) there exists a labeling algorithm in which a processor's label depends only on the vertices with higher priority. This allows the processor to communicate only with these vertices, which by assumption are relatively close. 3.2.1. t-Orientation of Graphs. We require an acyclic orientation in which every vertex is close to vertices that have a directed path to it. Definition 3.2. A t-orientation of a graph G is an acyclic orientation (that is, without any directed cycles) of G, such that for every two vertices v and u, if there is a directed path from v to u in the directed graph, then d(u; v) - t. The orientation number of a graph G, denoted by t(G), is the smallest t such that G has a t-orientation. Note that for every graph G, topological sorting implies an acyclic orientation, and therefore we have: Proposition 3.6. For every graph G, t(G) - diam(G). However, in most cases we can do much better. For example, any c-coloring of G implies a 1)-orientation by directing each edge (v; u) from v to u if and only if This is a 1)-orientation since all directed paths have length at most c. This implies: Proposition 3.7. For every graph G, For example, the orientation number of a ring is 1 if the ring is of even length, and 2 if the ring is of odd length (using a 2-coloring or 3-coloring, respectively). Figure 1 includes examples of optimal t-orientations for several graphs. Recall, that our definition of t-orientation requires only that the undirected distance between any two vertices u and v that are connected by a directed path is bounded by t. We comment, that Proposition 3.7 holds also for a stronger definition, that requires the directed distance between u and v to be bounded by t. Therefore we expect that the upper bound of -(G), as given in Proposition 3.7, can be tightened. 2 A simple way to construct an optimal t-orientation is by a preprocessing that collects the complete graph topology to some node, and then locally finds the best orientation. (This relies on the fact that local computation power is unbounded.) It requires O(diam(G)) communication rounds. In the following we show, that while a moderate computational effort may not yield an optimal orientation, it allows us problems, diam(G) rounds are needed in order to label G 0 . 2 The possible gap between t(G) and -(G) is well demonstrated in a clique G of n vertices, where to find orientations that are good, in the sense that t is always bounded by a small polylogarithm of n. Theorem 3.8. For every graph G of size n, it is possible to find an O((log n) 2 )- orientation of G by a randomized distributed algorithm within O((log n) 2 ) rounds. Proof. Every graph can be partitioned into O(log n) subgraphs that the diameter of every connected component in these subgraphs is at most O(log n). This is done by the randomized distributed algorithm of Linial and Saks ([14]) within O((log n) 2 ) rounds. At the end of the algorithm, every vertex knows the id, i, of the subgraph V i to which it belongs, and the ids of the vertices that belong to its connected component in V i . This partition can be used to construct an O((log n) 2 )-orientation of G within O(logn) (additional) rounds as follows. Every connected component of every sub-graph is oriented acyclicly (e.g., by centralized topological sorting) within O(log n) rounds. Edges whose endpoints are at different subgraphs are oriented according to the ids of the subgraphs; that is, an edge hv; ui, with oriented Clearly, this orientation is acyclic. Furthermore, assume that there is a directed path from v to u. That path visits the subgraphs defined for G in a strictly increasing order, therefore it visits each subgraph at most once. Since the diameter of every connected component in each subgraph is at most O(log n), we have d(v; 3.2.2. Extendible labeling Problems. We now define a class of labeling problems for which the t-orientation preprocessing is helpful. These are problems for which the labeling can be constructed by extending the part of the graph which is already labeled. Definition 3.3. Let E) be a graph. An extension of G is a graph . Note that V 0 is an independent set in G 0 . Definition 3.4. Let L be a labeling problem. A is an extension labeling algorithm for L if for every graph G with a labeling in L, and every extension to a label for each ffl The labeling of G 0 is in L. ffl For each the label of v depends only on the connected components of G to which v is connected. That is, the labeling of v is independent of the labeling of other vertices in V 0 and of the other components of G. Definition 3.5. A labeling problem is extendible if it has a deterministic extension labeling algorithm. We now argue that some important labeling problems are extendible. Consider the following extension algorithm for a labeling ', denoted by Am : For every only if v has a neighbor Proposition 3.9. Finding a maximal independent set is an extendible labeling problem. Proof. Let E) be a graph which is legally labeled, i.e., every vertex has a label '(v) 2 f0; 1g such that the vertices with independent set of G. Let G be an extension of G. Am is clearly an extension algorithm for the maximal independent set problem. Proposition 3.10. 1)-coloring is an extendible labeling problem. Proof. Let E) be a graph which is legally colored, i.e., every vertex has a label /(v) vertices with form an independent set. Let G be an extension of G. The following is clearly an extension algorithm for this problem: For every v 2 V , define /(v) to be the smallest c 2 1g such that no neighbor u of v has exists because v has ffi (v) neighbors, and therefore at most ffi (v) colors are used by v's neighbors. For each thus G 0 is An extension algorithm that labels a vertex with the smallest color not used by its neighbors is suitable for the k-dense coloring problem. Therefore: Proposition 3.11. For every k - 1, the k-dense coloring problem is extendible. 3.2.3. An Algorithm for Extendible Labeling Problems. Here we show the following theorem: Theorem 3.12. Given a t-orientation of a graph G, for any extendible labeling problem L, there is a distributed algorithm that solves L within t rounds on every subgraph of G. Proof. Let L be an extendible labeling problem, and let A be a deterministic extension algorithm for L. We describe a distributed algorithm that solves L on any subgraph of G within t rounds. Let G be a graph with an acyclic orientation, and let G 0 be a subgraph of G. Note that the t-orientation of G induces an acyclic orientation of G 0 . Consider a partition of G 0 into layers L is the length of the longest directed path in G 0 . For any v 2 G 0 , only if the longest directed path to v in G 0 is of length i. Note that this partition is well defined since G is finite and the orientation is acyclic. 3.13. Each layer forms an independent set. Proof. Let v and u be neighbors in G 0 , such that v ! u. Every directed path to v can be extended to u, and in particular the longest one. Thus, u belongs to a layer higher than v's layer. For every vertex in (v) be the subgraph of G 0 induced by v and all the vertices in G 0 that have a directed path to v. For each v 2 G 0 , we partition G 0 in (v) into the layers L 0 (G 0 in (v)), in in (v)), where k is the length of the longest directed path in G 0 in (v). This partition has the following properties: ffl If u in (v) then every directed path to u in G 0 is in G 0 in (v); that is, in (u) ' G 0 in (v). ffl In particular, if u in (v), then the longest directed path to u is in G 0 in (v); therefore, for every i and v, L in Consequently, if u in (v) then for every i, L in in (v)). The algorithm consists of two stages. In the first stage, information is collected. Specifically, during the first t rounds, every vertex v 2 G 0 distributes to distance t the fact that it belongs to G 0 . All the vertices of G participate in this stage. Since G is t-oriented, each vertex v 2 G 0 knows G 0 in (v) within t rounds. In the second stage of the algorithm, every vertex v 2 G 0 uses A, the extension algorithm, to label G 0 in (v). The labeling is computed in iterations. In the ith iteration, labels in (v)). The code for v 2 G 0 for this stage appears in Figure 2. We denote by A(H;V ) the application of A when the labeled graph H ' G 0 in (v) is extended by an independent set V and all the edges which connect H and V in G 0 . On each iteration of the repeat loop, an additional layer of G 0 in (v) is labeled. Denote by label v (u) the label assigned by v to u 2 G 0 in (v), when v executes A. In particular, label v (v) is the label that v assigns to itself. Already-labeled repeat Execute A(Already-labeled , in (v))) Already-labeled / Already-labeled [L i (G 0 in (v)) until v is labeled. Fig. 2. The labeling algorithm: code for v 2 G 0 The next lemma shows that the labels v assigns to vertices in G 0 in (v) are identical to the labels those vertices assign to themselves. Lemma 3.14. If u in (v), then label u label v (u). Proof. We show, by induction on i - 0, that label u label v (u), for every in (v) " The base case is contains the sources of G 0 . Consider some note that label u (u) is determined in the first iteration, when executes A(;; u). Every v such that u 2 G 0 in (v) assigns a label to u in the first iteration by executing A(;; in (v))). There may be some other vertices in addition to u in L 0 (G 0 in (v)), but since the label of u depends only on its connected component which includes only u, and since A is deterministic, label u label v (u). For the induction step, assume that the claim holds for all vertices in L i note that label u (u) is determined in the jth iteration, when u executes A( in (u)); u). Every v such that u 2 G 0 in (v) assigns label v (u) when it executes A( in (v)); L j (G 0 in (v))). The connected component of u in S in (v)) is S in (u)). By the induction assumption, all the vertices of both S in (u)) and S in (v)) are labeled identically by v and by u. Thus, since A is deterministic, label u label v (u). The entire labeling of G 0 consists of the labels label v (v). By Lemma 3.14, it is identical to the labeling produced by A when applied to G 0 sequentially, layer by layer. Thus, it is in L. By Theorem 3.8, we have: Corollary 3.15. For every graph G of size n, after a randomized preprocessing that takes O((log n) 2 ) rounds, any extendible labeling problem can be solved on every Note that for the preprocessing suggested in the above results we assume that n is known in advance. Proposition 3.11 and Theorem 3.12 imply that for every graph G and a fixed coloring of every G 0 ' G can be found distributively within t rounds, assuming the existence of a t-orientation of G. In particular, by Corollary 3.15, there is a randomized distributed preprocessing that takes O((log n) 2 ) rounds, and enables to find a k-dense coloring of every G rounds. Note that the lower bound for k-dense coloring, from Theorem 3.4, log log n). Since the k-dense coloring problem is extendible, Theorem 3.4 and Theorem 3.12 imply: Corollary 3.16. Let t(n) be the maximal t(G) among graphs of size n. Then \Omega\Gamma135 n= log log n). 4. Resource Allocation. In this section we study the resource allocation prob- lem. This problem, in contrast to labeling problems, has an "on-going" nature and has to be repetitively solved for each instance. However, as will be shown below, we employ techniques and results that were developed for labeling problems. An instance of the resource allocation problem is a communication graph G, where the vertices represent processors, and there is an edge between any pair of processors that may compete on some resource. The resource requirements of a processor may vary. The current requirements are represented formally in a dynamic conflict graph C, where the vertices are processors waiting to execute their jobs, and there is an edge between two processors that compete on some resource. Clearly, C ' G. We denote the degree of processor p i in the conflict graph C by ffi i , and by - be the maximum number of rounds required to complete a job. An algorithm for the resource allocation problem decides when each waiting processor can use the resources and execute its job; it should satisfy to following properties 1. Exclusion: No two conflicting jobs are executed simultaneously. (That is a safety property.) 2. No starvation: The request of any processor is eventually granted. (This is a liveness property.) The response time for a request is the number of rounds that elapse ?from the processor's request to use resources until it executes the job. A good algorithm should minimizes the response time. We consider also the following property, that guarantees better exploitation of the resources, and reduces the average response time: Definition 4.1. An algorithm for the resource allocation is k-compact for every waiting processor p i , if in every k rounds either p i runs or some conflicting neighbor of p i runs. In Section 4.1 we prove that for every k - 1 there is no efficient distributed algorithm which is k-compact, by reduction to the lower bound for k-dense coloring, that was proved earlier. Specifically, we show a lower bound of\Omega\Gamma/3 n= lg lg n) on the response time of any resource allocation algorithm that is k-compact, for any k - 1. Section 4.2 presents the compact coloring problem, which is used later for compact resource allocation. In Section 4.3 we present a distributed -compact algorithm for resource allocation, which uses the t-orientation preprocessing. 4.1. A Lower Bound for k-Compact Resource Allocation. We show that given a conflict graph C and k - 1, any k-compact resource allocation algorithm can be used to label C such that the labeling is a d k e-dense coloring. Together with the lower bound proved in Theorem 3.4 this implies the lower bound for compact resource allocation. Let G be a communication graph and let C be a conflict graph. The one-shot resource allocation problem is to schedule the resources for C in a way that satisfies the safety and liveness conditions. A slow execution for a given set of jobs is an execution where each job uses the resources for exactly - rounds. (This terminology is borrowed from Rhee [19].) For a specific algorithm, consider a slow execution with respect to the one-shot resource allocation problem. That is, the algorithm has to schedule only one "batch" of jobs, each of which needs the resources for the same running time, -. Clearly, this is a special case of the resource allocation problem and any lower bound for this case applies to the general problem. Let t 0 be the first round in which some processor starts executing its job; the no starvation property guarantees the existence of t 0 . Associate with each processor p i a label if and only if p i starts executing its job in the interval Such an interval exists by the no starvation property, and hence the labeling is well defined. 4.1. The labeling - is a (d k coloring of the conflict graph. Proof. By the mutual exclusion property, and since the execution is slow, - is a legal coloring. Assume now that -(p i 2. That is, p i starts executing its job in the interval the algorithm is k-compact, in every k rounds, either starts executing its job, or there exists some conflicting processor p j which executes its job. In the latter case, there is a conflicting processor, p j , which starts executing its job in the interval 1)-). By the definition of -, p j is labeled c 0 , Together with Theorem 3.4, this implies: Theorem 4.2. For every k - 1, there is no k-compact distributed algorithm for the resource allocation problem with response time less than - (log n= log log n). 4.2. Compact Coloring. In this section we introduce the compact coloring problem and its properties. In the next section, we use these properties to show that processors joining the conflict graph C at different times in our algorithm, agree on the same colors for processors in C. Definition 4.2. A coloring is compact if every vertex v with color j has neighbors with all colors Note that every compact coloring is 1-dense. On the other hand, consider a graph that is a line of length 4, whose vertices are colored 4. This is a 1-dense coloring which is not compact. For a given compact coloring, let C i denote the set of vertices colored with i; since the coloring is compact, C i is a maximal independent set in V n Consider the following extension algorithm for a labeling \Psi, denoted by A c : For every define \Psi(v) to be the smallest number c such that no neighbor u of v has Lemma 4.3. Compact coloring is an extendible labeling problem. The next lemma claims that if we remove all the vertices colored 1 by A c ?from a graph G, then we obtain a graph G 0 such that for every vertex v in G 0 , if v was colored c in G then v is colored applying A c to G 0 . Lemma 4.4. Let E) be a graph, and let be the compact coloring of G, produced by A c . Let G be the graph obtained by deleting all the vertices for which be the compact coloring of G 0 produced by A c . Then for every Proof. To prove the lemma, we consider the algorithm A which iteratively executes the MIS extension algorithm, Am , on a given graph G (see Figure 3). Recall, that Am labels a vertex v with 1 if v has no neighbor from a lower layer which is labeled otherwise, v is labeled with 0. A m is useful for studying A c , due to the following claim: 4.5. For every graph G, the labeling \Phi produced by A m is identical to the labeling \Psi produced by A c . Proof. Recall, that given an acyclically oriented graph G, a vertex v is in the ith layer, L i (G), if and only if the longest directed path to v is of length i. The proof is by induction on the layers of G. Repeat Execute Am on G produced by Am For every Until G i is empty Fig. 3. Algorithm A . For the base case, consider a vertex v 2 L 0 (G). Note that L 0 (G) contains the sources of G. Both A c and A m color every source v with 1. For the induction step, assume that the claim holds for all vertices in L j and let v 2 L i (G). Assume that . Consider the neighbors of v from lower layers at the end of iteration k of A m in which v joins MIS k . By A c , v is colored k if and only if v has neighbors from lower layers with all colors no neighbor from lower layers which is colored k. Since every iteration of A produces a maximal independent set, v has neighbors from lower layers in MIS 1 . By the induction hypothesis, this implies that v has neighbors which are colored . By Am , v joins MIS k if and only if v has no neighbor from lower layers in MIS k . Thus, by the induction hypothesis, v has no neighbor from a lower layer which is colored k by A c . Therefore, needed. By Claim 4.5, G. In particular, MIS 1 (G) is the set of vertices with G. By Claim 4.5, the resulting graph is G 0 . Let \Phi 0 be the coloring produced by applying A m to G 0 . Consider the execution of A m on G. By A is removed from G after the first iteration of that execution. Since the resulting graph is G 0 , the remainder of this execution on G is identical to the execution of A m on G 0 . That is, the execution of A m on G 0 is identical to the suffix of the execution on G starting from the second iteration. Hence, v 2 MIS i (G) if and only if v 2 MIS This implies that for every 1. By Claim 4.5, for every By repeatedly removing the set of vertices which are colored 1, we obtain: Corollary 4.6. Let E) be a graph, and let be the compact coloring of G, produced by the extension algorithm A c . For a fixed integer z - 0, be the graph obtained by deleting all the vertices for which \Psi(v) 2 be the compact coloring of G 0 produced by A c . Then for every This corollary is used in our resource allocation algorithm to show that processors joining the conflict graph C at different times, agree on the same colors for processors in C. 4.3. A Distributed -Compact Resource Allocation Algorithm. In this section we describe a -compact distributed algorithm for the resource allocation problem, whose response time is is the orientation number of the communication graph G. We assume that - is known in advance and processors can fix running phases, each consisting of - rounds. In addition, processors submit their requests for resources in entrance phases, each consisting of t(G)+1 rounds. A processor wishing to execute a job waits for the beginning of the next entrance phase and then submits its request. This adds at most t(G)+1 rounds to the response time of every request. The partitions of rounds to entrance phases and running phases are identical with respect to all the processors. Therefore, processors submit requests in batches, with between two successive batches. The algorithm uses a preprocessing which finds an acyclic orientation of G which achieves the orientation number of G; we use to denote that p i is oriented to p j . The orientation and the entrance phases induce an orientation of the dynamic conflict graph C as follows: An edge hp resources in an earlier entrance phase than p j or if p j and p i request resources in the same entrance phase and For each entrance phase, the processors are partitioned into three sets: 1. Idle: Processors that do not need resources, and processors that are currently executing their jobs. 2. Requesting: Processors that request resources in the current entrance phase. 3. Waiting: Processors that requested resources in previous entrance phases and are still waiting for their running phase. The idea of the algorithm is to use the t-orientation in order to merge the requesting processors with the waiting processors, in a manner that does not delay the waiting processors and provides short response time for the new requests. The code for processor appears in Figure 4. As in Section 3.2, we denote by C in (p i ) the subgraph of C such that p j 2 C in (p i ) if and only if there is a directed path Intuitively, the algorithm proceeds as follows. Each requesting processor p i transmits its requests and collects the current state of C in (p i ). Upon having the initial state of C in (p i ), denoted by C 0 in (p i ), the running phase of p i is determined by a compact coloring of C 0 in (p i ). If p i is colored k then p i executes its job in the kth running phase, counting from the first running phase that begins after the end of the current entrance phase. The waiting processors update the conflict graph and transmit it to the requesting processors. At the beginning of each entrance phase the updated state of C in (p i ) is obtained from the previous one by deleting the set of processors that will begin executing their jobs in the next First, we prove that every requesting processor p i learns about processors that may influence its color during its entrance phase. Lemma 4.7. A requesting processor, in (p i ) at most t(G) after the beginning of its entrance phase. Proof. The proof is by induction on the entrance phase. For the base case, consider a processor p i that requests resources in the first entrance phase. Directed paths to p i contain only other processors that request resources in the first entrance phase. Since G was t-oriented, the distance between each processor in C in (p i ) and p i is at most t(G). Therefore, p i knows C in (p i ) after at most t(G) rounds. For the induction step, let p i be a processor that requests resources in the rth entrance phase, r ? 1. Let directed path to p i in C. By the algorithm, no processor that enters with p i is directed to a processor from an earlier entrance phase. Thus, ae can be divided into two parts such that request resources strictly before the rth entrance phase, and Do every entrance phase: If you do not need resources: In the next Transmit to your neighbors all the messages you receive. In order to execute a job: In the next round: Receive from your neighbors the part of C in (p i ) which consists of processors who made requests in previous entrance phases. In the next t(G) rounds: Distribute that part of C in (p i ) and your request Transmit to your neighbors all the messages you receive. Construct C in (p i ) by combining the old part you already know with the parts you received in the last t(G) rounds. Use A c to find a compact coloring of C in (p i ). If you are colored k then execute your job in the kth running phase. For every If p j is colored k then p j executes its job in the kth running phase. If you are waiting: Update C in (p i Remove processors that will start executing their job in the next rounds according to your compact coloring. Remove processors which are not connected to you anymore. Distribute C in (p i ) to your neighbors. In the next t(G) rounds: Transmit to your neighbors all the messages you receive. Fig. 4. The distributed algorithm: code for p i request resources in the rth entrance phase. Two successive entrance phases are separated by rounds. Therefore, by the inductive hypothesis, when p i joins, p k already knows the path the algorithm, p l receives from p k this part of ae in the first round of the rth entrance phase. Since the graph is t-oriented, p i receives messages from all the vertices in rounds and can reconstruct ae. The next lemma states that for every in (p i ), the assignments of a running phase to p j as done by p i and p j are identical. That is, p j is colored k in the compact coloring of C 0 in (p i ) if and only if p j is going to execute its job in the kth running phase, counting from the first running phase that begins after the end of p i 's entrance phase. Lemma 4.8. For every requesting processor p i and for every in (p i ), the running phase assigned to p j by p i is k if and only if p j executes its job in phase k. Proof. The proof is by induction on the entrance phase. For the base case, consider a processor p i that requests resources in the first entrance phase. Since p j is in C 0 in (p i submits requests in the first entrance phase. By Lemma 4.7, in (p i ) within rounds. From Lemma 4.3, the compact coloring problem is extendible. Therefore, by Claim 3.14 (that refers to the Algorithm A c ), assigns color k to itself if and only if p i assigns color k to p j in C 0 in (p i ). Since p i and start counting from the same round, the running phases are counted identically by This implies the lemma. For the induction step, assume that the induction hypothesis holds for all processors that request resources before the rth entrance phase, and let p i be a processor that submits requests at the rth entrance phase. By the algorithm, at the first round of phase r, every waiting processor p l removes from C in (p l ) processors that will start executing their jobs during entrance phase r, according to the compact coloring calculated by p l . C in (p l ) includes only processors that request resources before the rth entrance phase. Thus, by the induction hypothesis, these updates reflect correctly the current state of C in (p l ). This fact, together with Lemma 4.7, implies that p i obtains in (p i ) within rounds. Consider a processor in (p i ). There are two cases: Case 1: p j is a processor that requests resources in entrance phase r. By the definition of C in (p), C 0 in (p j in (p i ), and using Claim 3.14, p j assigns color k to itself if and only if p i assigns color k to p j in C 0 in (p i ). Case 2: p j is a processor that requests resources in entrance phase r 0 . Note that in (p i ) does not include any processors that request resources after p i . Let x be the ratio between the length of one entrance phase and the length of one running phase, that is, denote the number of the first running phase to begin after the rth entrance phase, and let s 0 denote the number of the first running phase to begin after the r 0 th entrance phase That is, s Assume that p j assigns to itself color c 0 at entrance phase r 0 . By the algorithm, p j will execute its job at running phase s In addition, during the r \Gamma r 0 entrance phases between r 0 and r, p j removes from C in (p j ) all the processors that will start executing their jobs during that period. Formally, all the processors colored by p j with are removed from C in (p j ). The induction hypothesis implies that the updated C in (p j ) at the beginning of the rth entrance phase contains only processors which are still waiting. By Corollary 4.6, a compact coloring of the updated C in (p j ) assigns color in (p i ), Claim 3.14 implies that p i assigns color c to p j in C 0 in (p i ). Thus, p i determines that p j executes its job in running phase number that completes the proof. We can now prove the main properties of the algorithm. Lemma 4.9 (Safety). For every two processors p i and p j , if need then p i and p j do not run simultaneously. Proof. If need are neighbors in C. Assume, without loss of generality, that legally different colors in C in (p i ). By Lemma 4.8, the running phase that p i determines for p j is identical to the running phase that p j determines for itself. Therefore, belong to different running phases. Thus, by the algorithm, p i and p j do not run simultaneously. We now show that the schedule becomes -compact at most 2(t(G) after a processor initiates a request for resources. Lemma 4.10. For every waiting processor p i , after the first in every - rounds either p i runs or some conflicting neighbor of p i runs. Proof. By the algorithm, for every waiting processor p i , the coloring of C in (p i ) is compact. Thus, if p i is colored c, it has neighbors with all colors Therefore, there is at least one neighbor of p i which runs in each of the running phases 1. The first running phase in this count of the running phases begins at most 2(t(G) rounds after the request was initiated by p i . Hence, after that round the schedule is -compact. The response time for a processor p i consists of three components: First, p i waits for the beginning of the next entrance phase, which takes at most t(G) Then, during the entrance phase, p i collects C 0 in (p i ). By Lemma 4.7, this takes rounds. Finally, p i waits for its running phase. By the -compact property (Lemma 4.10), p i waits at most ffi i running phases, each taking - rounds. This implies: Theorem 4.11. There exists an algorithm for the resource allocation problem whose response time is Remark: In our algorithm, ffi i captures the number of processors that issued competing resource requests before or simultaneously with p i . That is, a processor is not delayed because of processors that request resources after it. Note, that in general it does not mean that the algorithm guarantees a FIFO ordering. Thus, a processor issued its request later than p i may execute its job earlier (while p i is still waiting). This happens only if p i needs a "popular" resource that was not requested by p j . 4.4. Discussion. As presented, the algorithm assumes that the system is syn- chronous, and that the local computing power at the processors is unlimited. First, we remark that the algorithm can be easily changed to work in asynchronous systems, by employing a simple synchronizer, such as ff [1]. Since our algorithm rely on synchronization only between neighboring processors, synchronizer ff allows to run the algorithm correctly. The details, which are straightforward, are omitted. Second, we remark that the local computation performed in our algorithm is fairly moderate. The most consuming step is the computation of a compact coloring; this is done by repeated application of Am , which in turn, greedily assigns colors to nodes. Furthermore, this computation can be integrated with the collection of information from neighboring nodes. This way, the compact coloring is computed in iterations that overlap the iterations in which information is collected; the local computation at each node reduces to choosing a color, based on the colors of its neighbors. 5. Conclusions and Open Problems. This work addressed the power of unrestricted preprocessing, in particular, the t-orientation preprocessing. Several open questions remain: 1. We derive a lower bound on the number of communication rounds needed for a k-compact resource allocation. Is there a lower bound on the number of communication rounds needed for a resource allocation algorithm that guarantees only the safety and liveness properties? 2. Our lower bound for k-dense coloring depends on k, while our upper bound for this problem is the same for all values of k. Can these bounds be tightened? In particular, is there an algorithm for k-dense coloring whose complexity depends on k? 3. We show that the t-orientation preprocessing helps in some labeling problems. Are there other helpful types of preprocessing? 4. We show that t(G) - O((log n) 2 ) for every graph G of size n, and that there exists a graph G of size n such that t(G) =\Omega\Gamma368 n= log log n). Can the upper bound be reduced to O(logn= log log n)? In particular, is there a distributed algorithm that achieves a better orientation? Is there a non-randomized distributed algorithm that achieves a good orientation? 5. Is it NP-Hard to determine t(G) for a given graph? Acknowledgments :. We would like to thank Roy Meshulam for bringing Erd-os' Theorem to our attention and for pointing out the existence of graphs with \Omega\Gamma/1/ n= log log n). We also thank Amotz Bar-Noy for helpful discussions. An anonymous referee provided many comments that improved the presentation. --R "Complexity of Network Synchronization," "Sparse partitions," "A dining philosophers algorithm with polynomial response time." "Concurrency in heavily loaded neighborhood-constrained sys- tems." "Distributed resource allocation algorithms." "On Chromatic Sums and Distributed Resource Allo- cation." "The drinking philosophers problem." "Efficient fault tolerant algorithms in distributed systems." "Deterministic coin tossing and accelerating cascades: micro and macro techniques for designing parallel algorithms." "Graph theory and probability." "Parallel symmetry-breaking in sparse graphs." "Distributive algorithms-Global solutions from local data." "Decomposing graphs into regions of small diameter." "Local computations on static and dynamic graphs." "What can be computed locally?" "Improved distributed algorithms for coloring and network decomposition problems." "Locality based graph coloring." Efficiency of partial synchrony --TR
orientation;locality;response time;preprocessing;resource allocation;labeling
312218
Space-efficient Routing Tables for Almost All Networks and the Incompressibility Method.
We use the incompressibility method based on Kolmogorov complexity to determine the total number of bits of routing information for almost all network topologies. In most models for routing, for almost all labeled graphs, $\Theta (n^2)$ bits are necessary and sufficient for shortest path routing. By "almost all graphs" we mean the Kolmogorov random graphs which constitute a fraction of 1 - 1/nc of all graphs on n nodes, where c > 0 is an arbitrary fixed constant. There is a model for which the average case lower bound rises to $\Omega(n^2 \log n )$ and another model where the average case upper bound drops to $O(n \log^2 n)$. This clearly exposes the sensitivity of such bounds to the model under consideration. If paths have to be short, but need not be shortest (if the stretch factor may be larger than 1), then much less space is needed on average, even in the more demanding models. Full-information routing requires $\Theta (n^3)$ bits on average. For worst-case static networks we prove an $\Omega(n^2 \log n )$ lower bound for shortest path routing and all stretch factors < 2 in some networks where free relabeling is not allowed.
Introduction . In very large communication networks like the global telephone network or the internet connecting the worlds computers, the message volume being routed creates bottlenecks degrading performance. We analyze a tiny part of this issue by determining the optimal space to represent routing schemes in communication networks for allmost all static network topologies. The results give also the average space cost over all network topologies. A universal routing strategy for static communication networks will, for every network, generate a routing scheme for that particular network. Such a routing scheme comprises a local routing function for every node in this network. The routing function of node u returns for every destination v 6= u an edge incident to u on a path from u to v. This way, a routing scheme describes a path, called a route, between every pair of nodes u; v in the network. The stretch factor of a routing scheme equals the maximum ratio between the length of a route it produces, and the shortest path between the endpoints of that route. It is easy to see that we can do shortest path routing by entering a routing table in each node u which for each destination node v indicates to what adjacent node w a message to v should be routed first. If u has degree d, it requires a table of at most log d bits 1 and the overall number of bits in all local routing tables never exceeds The stretch factor of a routing strategy equals the maximal stretch factor attained A preliminary version of part of this work was presented at the 15th ACM Conf. Principles Distribut. Comput., Philadelphia, PA, USA, May 1996. All authors were partially supported by the European Union through NeuroCOLT ESPRIT Working Group Nr. 8556, and by NWO through NFI Project ALADDIN number NF 62-376. y CWI, Kruislaan 413, 1098 SJ Amsterdam, The Netherlands; Email: buhrman@cwi.nl. z KPN Research, P.O. Box 15000, 9700 CD Groningen, The Netherlands; Email: J.H.Hoepman@research.kpn.com x CWI and University of Amsterdam. Address: CWI, Kruislaan 413, 1098 SJ Amsterdam, The Netherlands; Email: paulv@cwi.nl denotes the binary logarithm. M. BUHRMAN, J. H. HOEPMAN, AND P. M. B. VIT ' ANYI by any of the routing schemes it generates. If the stretch factor of a routing strategy equals 1, it is called a shortest path routing strategy because then it generates for every graph a routing scheme that will route a message between arbitrary u and v over a shortest path between u and v. In a full information shortest path routing scheme, the routing function in u must, for each destination v return all edges incident to u on shortest paths from u to v. These schemes allow alternative, shortest, paths to be taken whenever an outgoing link is down. We consider point to point communication networks on n nodes described by an undirected graph G. The nodes of the graph initially have unique labels taken from a set Edges incident to a node v with degree d(v) are connected to ports , with fixed labels by a so called port assignment . This labeling corresponds to the minimal local knowledge a node needs to route: a) a unique identity to determine whether it is the destination of an incoming message, b) the guarantee that each of its neighbours can be reached over a link connected to exactly one of its ports, and c) that it can distinguish these ports. 1.1. Cost Measures for Routing Tables. The space requirements of a routing scheme is measured as the sum over all nodes of the number of bits needed on each node to encode its routing function. If the nodes are not labeled with minimal set of labels-we have to add to the space requirement, for each node, the number of bits needed to encode its label. Otherwise, the bits needed to represent the routing function could be appended to the original identity yielding a large label that is not charged for but does contain all necessary information to route. The cost of representing a routing function at a particular node depends on the amount of (uncharged) information initially there. Moreover, if we are allowed to relabel the graph and change its port assignment before generating a routing scheme for it, the resulting routing functions may be simpler and easier to encode. On a chain, for example, the routing function is much less complicated if we can relabel the graph and number the nodes in increasing order along the chain. We list these assumptions below, and argue that each of them is reasonable for certain systems. We start with the three options for the amount of information initially available at a node. I Nodes do not initially know the labels of their neighbours, and use ports to distinguish the incident edges. This models the basic system without prior knowledge. IA The assignment of ports to edges is fixed and cannot be altered. This assumption is reasonable for systems running several jobs where the optimal port assignment for routing may actually be bad for those other jobs. IB The assignment of ports to edges is free and can be altered before computing the routing scheme (as long as neighbouring nodes remain neighbours after re-assignment). Port re-assignment is justifiable as a local action that usually can be performed without informing other nodes. II Nodes know the labels of their neighbours, and know over which edge to reach them. This information is for free. Or, to put it another way, an incident edge carries the same label as the node it connects to. This model is concerned only with the additional cost of routing messages beyond the immediate neighbours, and applies to systems where the neighbours are already COMPACT ROUTING TABLES 3 known for various other reasons 2 . Orthogonal to that, the following three options regarding the labels of the nodes are distinguished. ff Nodes cannot be relabeled. For large scale distributed systems relabeling requires global coordination that may be undesirable or simply impossible. Nodes may be relabeled before computing the routing scheme, but the range of the labels must remain This model allows a bad distributions of labels to be avoided. Nodes may be given arbitrary labels before computing the routing scheme, but the number of bits used to store its label is added to the space requirements of a node. Destinations are given using the new, complex, labels 3 . This model allows us to store additional routing information, e.g. topological information, in the label of a node. This sort of network may be appropriate for centrally designed interconnect networks for multiprocessors and communication networks. A common example architecture of this type is the binary n-cube network where the 2 n nodes are labeled with elements of f0; 1g n such that there is an edge between each pair of nodes iff their labels differ in exactly one bit position. In this case one can shortest path route using only the labels by successively traversing edges corresponding to flipping successive bits in the positions where source node and destination node differ. These two orthogonal sets of assumptions IA, IB, or II, and ff, fi, or fl, define the nine different models we will consider in this paper. We remark that the lower bounds for models without relabeling are less surprising and less hard to prove than the bounds for the other models. 1.2. Outline. We determine the optimum space used to represent shortest path routing schemes on almost all labeled graphs, namely the Kolmogorov random graphs with randomness deficiency at most c log n which constitute a fraction of at least of all graphs, for every fixed constant c ? 0. These bounds straightforwardly imply the same bounds for the average case over all graphs provided we choose c - 3. For an overview of the results, refer to Table 1 4 . We prove that for almost all are necessary to represent the routing scheme, if relabeling is not allowed and nodes know their neighbours (II - ff) or nodes do not know their neighbours (IA - IB) 5 . Partially matching this lower bound, we show that O(n 2 ) bits are sufficient to represent the routing scheme, if the port assignment may be changed or if nodes do know their neighbours (IB - II). In 2 We do not consider models that give neighbours for free and, at the same time, allow free port assignment. For, given a labeling of the edges by the nodes they connect to, the actual port assignment doesn't matter at all, and can in fact be used to represent bits of the routing function. Namely, each assignment of ports corresponds to a permutation of the ranks of the neighbours - the neighbours at port i moves to position i. There are d(v)! such permutations. 3 In this model it is assumed that a routing function cannot tell valid from invalid labels, and that a routing function always receives a valid destination label as input. Requiring otherwise makes the problem harder. 4 In this table, arrows indicate that the bound for that particular model follows from the bound found by tracing the arrow. In particular, the average case lower bound for model IA - fi is the same as the IA - fl bound found by tracing !. The reader may have guessed that a ? marks an open question 5 We write A - B to indicate that the results hold under model A or model B. Similarly, we to indicate the result holds only if the conditions of both model A and model B hold simultaneously. If only one of the two 'dimensions' is mentioned, the other may be taken arbitrary (i.e., IA is a shorthand for (IA - ff) - (IA - fi) - (IA - fl)). 4 H. M. BUHRMAN, J. H. HOEPMAN, AND P. M. B. VIT ' ANYI no relabeling permutation free relabeling worst case - lower bounds port assignment free neighbours known (II) (n 2 =9) log n [Thm 4.4] average case - upper bounds port assignment fixed (IA) (n 2 =2) log n [Thm 3.6] / / port assignment free neighbours known (II) 3n 2 [Thm 3.1] / 6n log 2 n [Thm 3.2] average case - lower bounds port assignment fixed port assignment free neighbours known (II) n 2 =2 [Thm 4.1] ? ? Table Size of shortest path routing schemes: overview of results. The results presented in this paper are quoted with exact constants and asymptotically (with the lower order of magnitude terms suppressed). contrast, for almost all graphs, the lower bound rises to asymptotically n 2 =2 log n bits if both relabeling and changing the port assignment are not allowed (IA - ff), and this number of bits is also sufficient for almost all graphs. And, again for almost all graphs, the upper bound drops to O(n log 2 n) bits if nodes know the labels of their neighbours and nodes may be arbitrarily relabeled (II - fl). Full information shortest path routing schemes are shown to require, on almost all graphs, asymptotically n 3 =4 bits to be stored, if relabeling is not allowed (ff), and this number of bits is also shown to be sufficient for almost all graphs. (The obvious upper bound for all graphs is n 3 bits.) For stretch factors larger than 1 we obtain the following results. When nodes know their neighbours (II), for almost all graphs, routing schemes achieving stretch factors s with can be stored using a total of O(n log n) bits 6 . Similarly, for almost all graphs in the same models (II), O(n log log n) bits are sufficient for routing with stretch factor - 2. Finally, for stretch factors - 6 log n on almost all graphs again in the same model (II), the routing scheme occupies only O(n) bits. For worst case static networks we prove, by construction of explicit graphs, a log n) lower bound on the total size of any routing scheme with stretch factor nodes may not be relabeled (ff). The novel incompressibility technique based on Kolmogorov complexity, [9], has already been applied in many areas but not so much in a distributed setting. A methodological contribution of this paper is to show how to apply the incompressibility method to obtain results in distributed computing for almost all objects concerned, rather than for the worst-case object. This hinges on our use of Kolmogorov random graphs in a fixed family of graphs. Our results hold also averaged over all objects concerned. Independent recent work [8, 7] applies Kolmogorov complexity to obtain related worst-case results mentioned in next section. They show for example that for each there exist graphs on n nodes which may not be relabeled (ff), that require in the worst bits to store a full information shortest path routing scheme. We prove for the same model that for almost all graphs full information routing n 3 =4 bits in total is necessary and sufficient (asymptotically). 6 For Kolmogorov random graphs which have diameter 2 by Lemma 2.6 routing schemes with are the only ones possible in this range. COMPACT ROUTING TABLES 5 1.3. Related Work. Previous upper- and lower bounds on the total number of bits necessary and sufficient to store the routing scheme in worst-case static communication networks are due to Peleg and Upfal [10], and Fraigniaud and Gavoille [4]. In [10] it was shown that for any stretch factor s - 1, the total number of bits required to store the routing scheme for some n-node graph is at and that there exist routing schemes for all n-node graphs, with stretch factor using O(k 3 n 1+1=k log n) bits in total. For example, with stretch factor we have method guarantees O(n 2 log n) bits to store the routing scheme. The lower bound is shown in the model where nodes may be arbitrarily relabeled and where nodes know their neighbours (II - fl). Free port-assignment in conjunction with a model where the neighbours are known (II) can, however, not be allowed. Otherwise, each node would gain n log n bits to store the routing function in (see the footnote to model II). Fraigniaud and Gavoille [4] showed that for stretch factors s ! 2 there are routing schemes that require a total of \Omega\Gamma bits to be stored in the worst case if nodes may be relabeled by permutation (fi). This was improved for shortest path routing by Gavoille and P'erenn'es [5] who showed that for each d - n there are shortest path routing schemes that require a total of \Omega\Gamma n 2 log d) bits to be stored in the worst case for some graphs with maximal degree d, if nodes may be relabeled by permutation and the port-assignment may be changed (IB - fi). This last result is clearly optimal for the worst case, both for general networks (d = \Theta(n)) and bounded degree networks n). In [7] it was shown that for each d - 3 there are networks for which any routing scheme with stretch factor ! 2 requires a total of \Omega\Gamma bits. Interval routing on a graph ng is a routing strategy where for each node i, for each incident edge e of i, a (possibly empty) set of pairs of node labels represent disjoint intervals with wrap-around. Each pair indicates the initial edge on a shortest path from i to any node in the interval, and for each node there is such a pair. We are allowed to permute the labels of graph G to optimize the interval setting. [5] shows that there exist graphs for each bounded degree d - 3 such that for each interval routing scheme, each of \Omega\Gamma n) edges are labeled by \Omega\Gamma n) intervals. This shows that interval routing can be worse than straightforward coding of routing tables which can be trivially done in O(n 2 log d) bits total. (This improves [7] showing that there exist graphs such that for each interval routing scheme some incident edge on each of \Omega\Gamma n) nodes is labeled by \Omega\Gamma n) intervals, and for each d - 3 there are graphs of maximal node degree d such that for each interval routing scheme some incident edge on each of \Omega\Gamma n) nodes is labeled by \Omega\Gamma n= log n) intervals.) The paper [3] contains history and background on the compactness (or lack of it) of interval routing using probabilistic proof methods. To the best of our knowledge, one of the authors of that paper, Jan van Leeuwen, was the first to formulate explicitly the question of what exactly is the minimal size of the routing functions, and he recently drew also our attention to this group of problems. 2. Kolmogorov Complexity. The Kolmogorov complexity, [6], of x is the length of the shortest effective description of x. That is, the Kolmogorov complexity C(x) of a finite string x is simply the length of the shortest program, say in FORTRAN (or in Turing machine codes) encoded in binary, which prints x without any input. A similar definition holds conditionally, in the sense that C(xjy) is the length of the shortest binary program which computes x given y as input. It can be shown that the Kolmogorov complexity is absolute in the sense of being independent 6 H. M. BUHRMAN, J. H. HOEPMAN, AND P. M. B. VIT ' ANYI of the programming language, up to a fixed additional constant term which depends on the programming language but not on x. We now fix one canonical programming language once and for all as reference and thereby C(). For the theory and applications, see [9]. Let x; denotes the natural numbers. according to the correspondence (0; ffl); (1; 0); (2; 1), Hence, the length jxj of x is the number of bits in the binary string x. Let T be a standard enumeration of all Turing machines. Let h\Delta; \Deltai be a standard invertible effective bijection from N \Theta N to N . This can be iterated to hh\Delta; \Deltai; \Deltai. Definition 2.1. Let U be an appropriate universal Turing machine such that yi. The Kolmogorov complexity of x given y (for free) is 2.1. Kolmogorov random graphs. One way to express irregularity or randomness of an individual network topology is by a modern notion of randomness like Kolmogorov complexity. A simple counting argument shows that for each y in the condition and each length n there exists at least one x of length n which is incompressible in the sense of C(xjy) - n, 50% of all x's of length n is incompressible but for of all x's is incompressible but for 2 bits (C(xjy) - and in general a fraction of 1 \Gamma 1=2 c of all strings cannot be compressed by more than c bits, [9]. Definition 2.2. Each labeled graph E) on n nodes ng can be coded by a binary string E(G) of length n(n \Gamma 1)=2. We enumerate the n(n \Gamma 1)=2 possible edges (u; v) in a graph on n nodes in standard lexicographical order without repetitions and set the ith bit in the string to 1 if the i-th edge is present and to 0 otherwise. Conversely, each binary string of length n(n \Gamma 1)=2 encodes a graph on n nodes. Hence we can identify each such graph with its corresponding binary string. We define the high complexity graphs in a particular family G of graphs. Definition 2.3. A labeled graph G on n nodes of a family G of graphs has randomness deficiency at most ffi(n) and is called ffi(n)-random in G if it satisfies (1) In this paper we use G is the set of all labeled graphs on n nodes. Then, log precisely the length of the encoding of Definition 2.2. In the sequel we say just 'ffi(n)-random' with G understood. Elementary counting shows that a fraction of at least of all labeled graphs on n nodes in G has that high complexity, [9]. 2.2. Self-Delimiting Binary Strings. We need the notion of self-delimiting binary strings. Definition 2.4. We call x a prefix of y if there is a z such that A ' f0; 1g is prefix-free, if no element in A is the prefix of another element in A. A code if its range is prefix-free. A simple prefix-code we use throughout is obtained by COMPACT ROUTING TABLES 7 reserving one symbol, say 0, as a stop sign and encoding Sometimes we need the shorter prefix-code x We call - x or x 0 a self-delimiting version of the binary string x. We can effectively recover both x and y unambiguously from the binary strings - xy or x 0 y. For example, and 1. The self-delimiting form x allows the concatenated binary sub- descriptions to be parsed and unpacked into the individual items the code encodes a separation delimiter for x, using 2dlog(jxj bits, and so on, [9]. 2.3. Topological Properties of Kolmogorov Random Graphs. High complexity labeled graphs have many specific topological properties which seems to contradict their randomness. However, randomness is not 'lawlessness' but rather enforces strict statistical regularities. For example, to have diameter exactly two. Note that randomly generated graphs have diameter two with high probability. In another paper [2] two of us explored the relation between high probability properties of random graphs and properties of individual Kolmogorov random graphs. For this discussion it is relevant to mention that, in a precisely quantified way, every Kolmogorov random graph individually possesses all simple properties which hold with high probability for randomly generated graphs. Lemma 2.5. The degree d of every node of a ffi(n)-random labeled graph on n nodes satisfies log n)n Proof. Assume that there is a node such that the deviation of its degree d from k. From the lower bound on C(E(G)jn; ffi; G) corresponding to the assumption that G is random in G, we can estimate an upper bound on k, as follows: In a description of E) given n; ffi we can indicate which edges are incident on node i by giving the index of the interconnection pattern (the characteristic sequence of the set V bits where the jth bit is 1 in the ensemble of d (2) possibilities. The last inequality follows from a general estimate of the tail probability of the binomial distribution, with s n the number of successful outcomes in n experiments with probability of success Namely, by Chernoff's bounds, in the form used in [1, 9], To describe G it then suffices to modify the old code of G by prefixing it with 8 H. M. BUHRMAN, J. H. HOEPMAN, AND P. M. B. VIT ' ANYI (i) A description of this discussion in O(1) bits; (ii) the identity of node i in dlog(n (iii) the value of d in dlog(n possibly adding nonsignificant 0's to pad up to this amount; (iv) the index of the interconnection pattern in log m bits (we know n; k and hence log m); followed by (v) the old code for G with the bits in the code denoting the presence or absence of the possible edges that are incident on node i deleted. Clearly, given n we can reconstruct the graph G from the new description. The total description we have achieved is an effective program of log m+ log nk bits. This must be at least the length of the shortest effective binary program, which is C(E(G)jn; ffi; G), satisfying Equation 1. Therefore, log Since we have estimated in Equation 2 that log it follows that k - Lemma 2.6. Every o(n)-random labeled graph on n nodes has diameter 2. Proof. The only graphs with diameter 1 are the complete graphs which can be described in O(1) bits, given n, and hence are not random. It remains to consider E) is an o(n)-random graph with diameter greater than 2. which contradicts Eq. (1) from some n onwards. It remains to consider E) is an o(n)-random graph with diameter greater than 2. Let i; j be a pair of nodes with distance greater than 2. Then we can describe G by modifying the old code for G as follows: (i) A description of this discussion in O(1) bits; (ii) The identities of (iii) The old code E(G) of G with all bits representing presence or absence of an edge (j; each k with (i; We know that all the bits representing such edges must be 0 since the existence of any such edge shows that is a path of length 2 between i and j, contradicting the assumption that i and j have distance ? 2. This way we save at least n=4 bits, since we save bits for as many edges (j; k) as there are edges (i; k), that is, the degree of i, which is n=2 \Sigma o(n) by Lemma 2.5. Since we know the identities of i and j and the nodes adjacent to i (they are in the prefix of code E(G) where no bits have been deleted), we can reconstruct G from this discussion and the new description, given n. Since by Lemma 2.5 the degree of i is at least n=4, the new description of G, given n, requires at most bits, which contradicts Equation 1 for large n. Lemma 2.7. Let c - 0 be a fixed constant and let G is a c log n-random labeled graph. Then from each node i all other nodes are either directly connected to i or are directly connected to one of the least (c nodes directly adjacent to i. COMPACT ROUTING TABLES 9 Proof. Given i, let A be the set of the least (c nodes directly adjacent to i. Assume by way of contradiction that there is a node k of G that is not directly connected to a node in A fig. We can describe G as follows: (i) A description of this discussion in O(1) bits; (ii) A literal description of i in log n bits; (iii) A literal description of the presence or absence of edges between i and the other nodes in (iv) A literal description of k and its incident edges in log n+n bits; (v) The encoding E(G) with the edges incident with nodes i and k deleted, saving at least 2n \Gamma 2 bits. Altogether the resultant description has bits, which contradicts the c log n-randomness of G by Equation 1. In the description we have explicitly added the adjacency pattern of node i, which we deleted later again. This zero-sum swap is necessary to be able to unambiguously identify the adjacency pattern of i in order to reconstruct G. Since we know the identities of i and the nodes adjacent to i (they are the prefix where no bits have been deleted), we can reconstruct G from this discussion and the new description, given n. 3. Upper Bounds. We give methods to route messages over Kolmogorov random graphs with compact routing schemes. Specifically we show that in general (on almost all graphs) one can use shortest path routing schemes occupying at most O(n 2 ) bits. If one can relabel the graph in advance, and if nodes know their neighbours, shortest path routing schemes are shown to occupy only O(n log 2 n) bits. Allowing stretch factors larger than one reduces the space requirements-to O(n) bits for stretch factors of O(log n). Let G be an O(log n)-random labeled graph on n nodes. By Lemma 2.7 we know that from each node u we can shortest path route to each node v through the least O(log n) directly adjacent nodes of u. By Lemma 2.6, G has diameter 2. Once the message reached node v its destination is either node v or a direct neighbor of node v (which is known in node v by assumption). Therefore, routing functions of size O(n log log n) bits per node can be used to do shortest path routing. However, we can do better. Theorem 3.1. Let G be an O(log n)-random labeled graph on n nodes. Assume that the port assignment may be changed or nodes know their neighbours (IB - II). Then, for shortest path routing it suffices to have local routing functions stored in 3n bits per node. Hence the complete routing scheme is represented by 3n 2 bits. Proof. Let G be as in the statement of the theorem. By Lemma 2.7 we know that from each node u we can route via shortest paths to each node v through the O(log n) directly adjacent nodes of u that have the least indexes. By Lemma 2.6, G has diameter 2. Once the message has reached node v its destination is either node v or a direct neighbor of node v (which is known in node v by assumption). Therefore, routing functions of size O(n log log n) can be used to do shortest-path routing. We can do better than this. Let A 0 ' V be the set of nodes in G which are not directly connected to u. Let be the O(log n) least indexed nodes directly adjacent to node u (Lemma 2.7) through which we can shortest path route to all nodes in A 0 . For M. BUHRMAN, J. H. HOEPMAN, AND P. M. B. VIT ' ANYI Let l be the first t such that m t ! n= log log n. Then we claim that v t is connected by an edge in E to at least 1=3 of the nodes not connected by edges in E to nodes Proof. Suppose, by way of contradiction, that there exists a least t - l such that Then we can describe G, given n, as follows. (i) This discussion in O(1) bits; (ii) Nodes u; v t in 2 log n bits, padded with 0's if need be; (iii) The presence or absence of edges incident with nodes u; bits. This gives us the characteristic sequences of A in V , where a characteristic sequence of A in V is a string of jV j bits with, for each , the vth bit equals 1 if v 2 A and the vth bit is 0 otherwise; (iv) A self-delimiting description of the characteristic sequence of A t in A using Chernoff's bound Equation 3, in at most m O(log (v) The description E(G) with all bits corresponding to the presence or absence of edges between v t and the nodes in A more, we delete also all bits corresponding to presence or absence of edges incident with saving a further r bits. This description of G uses at most bits, which contradicts the O(log n)-randomness of G by Equation 1, because n= log log n. Recall that l is the least integer such that m l ! n= log log n. We construct the local routing function F (u) as follows. (i) A table of intermediate routing node entries for all the nodes in A 0 in increasing order. For each node w in l A s we enter in the wth position in the table the unary representation of the least intermediate node v, with (u; v); (v; w) 2 E, followed by a 0. For the nodes that are not in l A s we enter a 0 in their position in the table indicating that an entry for this node can be found in the second table. By Claim 1, the size of this table is bounded by: l (ii) A table with explicitly binary coded intermediate nodes on a shortest path for the ordered set of the remaining destination nodes. Those nodes had a 0 entry in the first table and there are at most m l ! n= log log n of them, namely the nodes in l A s . Each entry consists of the code of length log log n+O(1) for the position in increasing order of a node out of v Hence this second table requires at most 2n bits. The routing algorithm is as follows. The direct neighbors of u are known in node u and are routed without routing table. If we route from start node u to target node w which is not directly adjacent to u, then we do the following. If node w has an entry in the first table then route over the edge coded in unary, otherwise find an entry for node w in the second table. COMPACT ROUTING TABLES 11 Altogether, we have jF (u)j - 6n. Adding another n\Gamma1 in case the port assignment may be chosen arbitrarily, this proves the theorem with 7n instead of 6n. Slightly more precise counting and choosing l such that m l is the first such quantity ! n= log n shows jF (u)j - 3n. If we allow arbitrary labels for the nodes, then shortest path routing schemes of O(n log 2 n) bits suffice on Kolmogorov random graphs, as witnessed by the following theorem. Theorem 3.2. Let c - 0 be a constant and let G be a c log n-random labeled graph on n nodes. Assume that nodes know their neighbours and nodes may be arbitrarily relabeled (II - fl), and we allow the use of labels of (1 log n) log n bits. Then we can shortest path route with local routing functions stored in O(1) bits per node (hence the complete routing scheme is represented by (c bits). Proof. Let c and G be as in the statement of the theorem. By Lemma 2.7 we know that from each node u we can shortest path route to each node w through the first (c +3) log n directly adjacent nodes of u. By lemma 2.6, G has diameter 2. Relabel G such that the label of node u equals u followed by the original labels of the first (c directly adjacent nodes f(u). This new label occupies log n) log n bits. To route from source u to destination v do the following. If v is directly adjacent to u we route to v in 1 step in our model (nodes know their neighbours). If v is not directly adjacent to u, we consider the immediate neighbours f(v) contained in the name of v. By Lemma 2.7 at least one of the neighbours of u must have a label whose original label (stored in the first log n bits of its new label) corresponds to one of the labels in f(v). Node u routes the message to any such neighbour. This routing function can be stored in O(1) bits. relabeling routing using less than O(n 2 ) bits is possible if we allow stretch factors larger than 1. The next three theorems clearly show a trade-off between the stretch factor and the size of the routing scheme. Theorem 3.3. Let c - 0 be a constant and let G be a c log n-random labeled graph on n nodes. Assume that nodes know their neighbours (II). For routing with any stretch factor ? 1 it suffices to have nodes with local routing functions stored in at most dlog(n + 1)e bits per node, and 1+ nodes with local routing functions stored in 3n bits per node (hence the complete routing scheme is represented by less than (3c+20)n log n bits). Moreover, the stretch is at most 1.5. Proof. Let c and G be as in the statement of the theorem. By Lemma 2.7 we know that from each node u we can shortest path route to each node w through the first log n directly adjacent nodes v of u. By Lemma 2.6, G has diameter 2. Consequently, each node in V is directly adjacent to some node in g. Hence, it suffices to select the nodes of B as routing centers and store, in each node shortest path routing function F (w) to all other nodes, occupying 3n bits (the same routing function as constructed in the proof of Theorem 3.1 if the neighbours are known). Nodes route any destination unequal to their own label to some fixed directly adjacent node w 2 B. Then jF (v)j - dlog(n this gives the bit count in the theorem To route from a originating node v to a target node w the following steps are taken. If w is directly adjacent to v we route to w in 1 step in our model. If w is not directly adjacent to v then we first route in 1 step from v to its directly connected node in B, and then via a shortest path to w. Altogether, this takes either 2 or 3 steps whereas the shortest path has length 2. Hence the stretch factor is at most 1:5 12 H. M. BUHRMAN, J. H. HOEPMAN, AND P. M. B. VIT ' ANYI which for graphs of diameter 2 (i.e., all c log n-random graphs by Lemma 2.6) is the only possibility between stretch factors 1 and 2. This proves the theorem. Theorem 3.4. Let c - 0 be a constant and let G be a c log n-random labeled graph on n nodes. Assume that the nodes know their neighbours (II). For routing with stretch factor 2 it suffices to have nodes with local routing functions stored in at most log log n bits per node and 1 node with its local routing function stored in 3n bits (hence the complete routing scheme is represented by n log log n Proof. Let c and G be as in the statement of the theorem. By Lemma 2.6, G has diameter 2. Therefore the following routing scheme has stretch factor 2. Let node 1 store a shortest path routing function. All other nodes only store a shortest path to node 1. To route from a originating node v to a target node w the following steps are taken. If w is an immediate neighbour of v, we route to w in 1 step in our model. If not, we first route the message to node 1 in at most 2 steps, and then from node 1 through a node v to node w in again 2 steps. Because node 1 stores a shortest path routing function, either or w is a direct neighbour of v. Node 1 can store a shortest path routing function in at most 3n bits using the same construction as used in the proof of Theorem 3.1 (if the neighbours are known). The immediate neighbours of 1 either route to 1 or directly to the destination of the message. For these nodes, the routing function occupies O(1) bits. For nodes v at distance 2 of node 1 we use Lemma 2.7, which tells us that we can shortest path route to node 1 through the first (c directly adjacent nodes of v. Hence, to represent this edge takes log log n+log(c+3) bits and hence the local routing function F (v) occupies at most log log n +O(1) bits. Theorem 3.5. Let c - 0 be a constant and let G be a c log n-random labeled graph on n nodes. Assume that nodes know their neighbours (II). For routing with stretch it suffices to have local routing functions stored in O(1) bits per node (hence the complete routing scheme is represented by O(n) bits). Proof. Let c and G be as in the statement of the theorem. From Lemma 2.7 we know that from each node u we can shortest path route to each node v through the first (c directly adjacent nodes of u. By Lemma 2.6, G has diameter 2. So the local routing function - representable in O(1) bits - is to route directly to the target node if it is a directly adjacent node, otherwise to simply traverse the first incident edges of the starting node and look in each of the visited nodes whether the target node is a directly adjacent node. If so, the message is forwarded to that node, otherwise it is returned to the starting node for trying the next node. Hence each message for a destination at distance 2 traverses at most 2(c edges. Strictly speaking we do not use routing tables at all. We use the fact that a message can go back and forth several times to a node. The header of the message can code some extra information as a tag "failed." In this case it is possible to describe an O(1) bit size routing function allowing to extract the header from the destination without knowing about log n, for example by the use of self-delimiting encoding. Theorem 3.6. Let G be an O(log n)-random labeled graph on n nodes. Assume that nodes do not know their neighbors and relabeling and changing the port assignment is not allowed (IA - ff). Then, for shortest path routing it suffices that each local routing function uses (n=2) log n(1 bits (hence the complete routing scheme uses at most (n 2 =2) log n(1 bits to be stored). Proof. At each node we can give the neighbors by the positions of the 1's in a COMPACT ROUTING TABLES 13 binary string of length n \Gamma 1. Since each node has at most n=2 neighbours by Lemma 2.5, a permutation of port-assignments to neighbors can have Kolmogorov complexity at most (n=2) log n(1 + o(1)) [9]. This permutation - describes part of the local routing function by for each direct neighbour determining the port to route messages for that neighbour over. If G is O(log n)-random then we only require O(n) bits additional routing information in each node by Theorem 3.1. Namely, because the assignment of ports (outgoing edges) to direct neighbors is known by permutation - we can use an additional routing table in 3n bits per node to route to the remaining non-neighbor nodes as described in the proof of Theorem 3.1. In total this gives Our last theorem of this section determines the upper bounds for full information shortest path routing schemes on Kolmogorov random graphs. Theorem 3.7. For full-information shortest path routing on o(n)-random labeled graphs on n nodes where relabeling is not allowed (ff), the local routing function occupies at most n 2 =4 bits for every node (hence the complete routing scheme takes at most n 3 =4 bits to be stored). Proof. Since for o(n)-random labeled graphs on n the node degree of every node is 2.5, we can in each source node describe the appropriate outgoing edges (ports) for each destination node by the 1's in a binary string of length o(n). For each source node it suffices to store at most n=2 + o(n) such binary strings corresponding to the non-neighboring destination nodes. In each node we can give the neighbors by the positions of the 1's in a binary string of length n \Gamma 1. Moreover, in each node we can give the permutation of port assignments to neighbors in (n=2) log n(1 bits. This leads to a total of at most (n 2 =4)(1 node and hence to (n 3 =4)(1 bits to store the overall routing scheme. 4. Lower Bounds. The first two theorems of this section together show that are necessary to route on Kolmogorov random graphs in all models we consider, except for the models where nodes know their neighbours and label permutation or relabeling is allowed (II - fi or II - fl). Hence the upper bound in Theorem 3.1 is tight up to order of magnitude. Theorem 4.1. For shortest path routing in o(n)-random labeled graphs where relabeling is not allowed and nodes know their neighbours (II - ff), each local routing function must be stored in at least n=2 \Gamma o(n) bits per node (hence the complete routing scheme requires at least n 2 bits to be stored). Proof. Let G be an o(n)-random graph. Let F (u) be the local routing function of node u of G, and let jF (u)j be the number of bits used to store F (u). Let E(G) be the standard encoding of G in n(n \Gamma 1)=2 bits as in Definition 2.2. We now give another way to describe G using some local routing function F (u). (i) A description of this discussion in O(1) bits; (ii) A description of u in exactly log n bits, padded with 0's if needed; (iii) A description of the presence or absence of edges between u and the other nodes in V in (iv) A self-delimiting description of F (u) in jF (u)j (v) The code E(G) with all bits deleted corresponding to edges (v; w) 2 E for each v and w such that F (u) routes messages to w through the least intermediary node v. This saves at least n=2 \Gamma o(n) bits since there are at least n=2 \Gamma o(n) nodes w such that (u; 2.5, and since the diameter of G is 2 by Lemma 2.6 there is a shortest path (u; v); (v; w) v. Furthermore, we delete all bits corresponding to the presence or absence of edges between u and the other nodes in 14 H. M. BUHRMAN, J. H. HOEPMAN, AND P. M. B. VIT ' ANYI saving another bits. This corresponds to the bits for edges connected to u which we added in one connected block above. In the description we have explicitly added the adjacency pattern of node u which explicitly added the adjacency pattern of node u which we deleted elswewhere. This zero-sum swap is necessary to be able to unambiguously identify the adjacency pattern of u in order to reconstruct G given n, as follows: Reconstruct the bits corresponding to the deleted edges using u and F (u) and subsequently insert them in the appropriate positions of the remnants of E(G). We can do so because these positions can be simply reconstructed in increasing order. In total this new description has which must be at least n(n \Gamma 1)=2 \Gamma o(n) by Equation 1. Hence, jF (u)j - which proves the theorem. Theorem 4.2. Let G be an o(n)-random labeled graph on n nodes. Assume that the neighbours are not known (IA - IB) but relabeling is allowed (fl). Then, for shortest path routing the complete routing scheme requires at least n 2 to be stored. Proof. In the proof of this theorem we need the following combinatorial result. 2. Let k and n be arbitrary natural numbers such that 1 - k - n. Let x i , natural numbers such that x i - 1. If Proof. By induction on k. If clearly dlog ne - Supposing the claim holds for k and arbitrary n and x i , we now prove it for arbitrary x i . Let . Now e By the induction hypothesis the first term on the right-hand side is less than or equal to which proves the claim. Recall that in model fl each router must be able to output its own label. Using the routing scheme we can enumerate the labels of all nodes. If we cannot enumerate the labels of all nodes using less than n 2 =32 bits of information, then the routing scheme requires at least that many bits of information and we are done. So assume we can (this includes models ff and fi where the labels are not charged for, but can be described using log n bits). Let G be an o(n)-random graph. 3. Given the labels of all nodes, we can describe the interconnection pattern of a node u using the local routing function of node u plus an additional COMPACT ROUTING TABLES 15 Proof. Apply the local routing function to each of the labels of the nodes in turn (these are given by assumption). This will return for each edge a list of destinations reached over that edge. To describe the interconnection pattern it remains to encode, for each edge, which of the destinations reached is actually its immediate neighbour. If edge i routes x i destinations, this will cost dlog x i e bits. By Lemma 2.5 the degree of a node in G is at least n=2 \Gamma o(n). Then in total, bits will be sufficient; separations need not be encoded because they can be determined using the knowledge of all x i 's. Using Claim 2 finishes the proof. Now we show that there are n=2 nodes in G whose local routing function requires at least n=8 \Gamma 3 log n bits to describe (which implies the theorem). Assume, by way of contradiction, that there are n=2 nodes in G whose local routing function requires at most n=8 \Gamma 3 log n bits to describe. Then we can describe G as follows: (i) A description of this discussion in O(1) bits, (ii) The enumeration of all labels in at most n 2 =32 (by assumption), (iii) A description of the n=2 nodes in this enumeration in at most n bits, (iv) The interconnection patterns of these n=2 nodes in n=8 \Gamma 3 log n plus n=2+ bits each (by assumption, and using Claim 3). This amounts to n=2(5n=8 \Gamma 3 log n) bits in total, with separations encoded in another n log n bits, (v) The interconnection patterns of the remaining n=2 nodes only among themselves using the standard encoding, in 1=2(n=2) 2 bits. This description altogether uses bits, contradicting the o(n)-randomness of G by Eq. (1). We conclude that on at least n=2 nodes a total of n 2 are used to store the routing scheme. If neither relabeling nor changing the port assignment is allowed, the next theorem implies that for shortest path routing on almost all such 'static' graphs one cannot do better than storing part of the routing tables literally, in (n 2 =2) log n bits. Note that it is known [5] that there are worst-case graphs (even in models where relabeling is allowed) such that n 2 log are required to store the routing scheme, and this matches the trivial upper bound for all graphs exactly. But in our Theorem 4.3 we show that in a certain restricted model for almost all graphs asymptotically (n 2 =2) log n bits are required and by Theorem 3.6 that many bits are also sufficient. Theorem 4.3. Let G be an o(n)-random labeled graph on n nodes. Assume that nodes do not know their neighbors and relabeling and changing the port assignment is not allowed (IA - ff). Then, for shortest path routing each local routing function must be stored in at least (n=2) log bits per node (hence the complete routing scheme requires at least (n 2 =2) log bits to be stored). Proof. If the graph cannot be relabeled and the port-assignment cannot be changed, the adversary can set the port-assignment of each node to correspond to a permutation of the destination nodes. Since each node has at least n=2 \Gamma o(n) neighbours by Lemma 2.5, such a permutation can have Kolmogorov complexity as high as (n=2) log Because the neighbours are not known, the local routing function must for each neighbor node determine the port to route messages for that neighbor node over. Hence the local routing function completely describes the M. BUHRMAN, J. H. HOEPMAN, AND P. M. B. VIT ' ANYI Fig. 1. Graph G k . permutation, given the neighbors, and thus it must occupy at least (n=2) log bits per node. Note that in this model (IA - ff) we can trivially find by the same method a lower bound of n 2 log like the complete graph and this matches exactly the trivial upper bound in the worst case. However, Theorem 4.3 shows that for this model the for almost all labeled graphs asymptotically 50% of this number of bits of total routing information is both necessary and sufficient. Even if stretch factors between 1 and 2 are allowed, the next theorem shows that n) bits are necessary to represent the routing scheme in the worst case. Theorem 4.4. For routing with stretch factor ! 2 in labeled graphs where relabeling is not allowed (ff), there exist graphs on n nodes (almost (n=3)! such graphs) where the local routing function must be stored in at least (n=3) log bits per node at n=3 nodes (hence the complete routing scheme requires at least (n 2 =9) log bits to be stored). Proof. Consider the graph G k with nodes depicted in Figure 1. Each node v i in v is connected to v i+k and to each of the nodes v . Fix a labeling of the nodes v with labels from 2kg. Then any labeling of the nodes with labels from f2k corresponds to a permutation of f2k vice versa. Clearly, for any two nodes v i and v j with the shortest path from v i to v j passes through node v j \Gammak and has length 2, whereas any other path from v i to v j has length at least 4. Hence any routing function on G k with stretch factor ! 2 routes such v j from v i over the edge (v at each of the k nodes v the local routing functions corresponding to any two labelings of the nodes v are different. Hence each representation of a local routing function at the k nodes v i corresponds one-one to a permutation of f2k 3kg. So given such a local routing function we can reconstruct the permutation (by collecting the response of the local routing function for each of the nodes grouping all pairs reached over the same edge). The number of such permutations is k!. A fraction at least 1 \Gamma 1=2 k of such permutations - has Kolmogorov complexity Because - can be reconstructed given any of the k local routing functions, these k local routing functions each must have Kolmogorov complexity k log k \Gamma O(k) too. This proves the theorem for n a multiple of 3. For use G k , dropping v k and v k\Gamma1 . COMPACT ROUTING TABLES 17 Note that the proof only requires that there be no relabeling; apart from that the direct neighbors of a node may be known and ports may be reassigned. By the above calculation there are at least (1 \Gamma 1=2 n=3 )(n=3)! labeled graphs on n nodes for which the theorem holds. Our last theorem shows that for full information shortest path routing schemes on Kolmogorov random graphs one cannot do better than the trivial upper bound. Theorem 4.5. For full-information shortest path routing on o(n)-random labeled graphs on n nodes where relabeling is not allowed (ff), the local routing function occupies at least n 2 bits for every node (hence the complete routing scheme requires at least n 3 bits to be stored). Proof. Let G be a graph on nodes f1; ng satisfying Eq. (1) with Then we know that G satisfies Lemmas 2.5, 2.6. Let F (u) be the local routing function of node u of G, and let jF (u)j be the number of bits used to encode F (u). Let E(G) be the standard encoding of G in n(n \Gamma 1)=2 bits as in Def. 2.2. We now give another way to describe G using some local routing function F (u). (i) A description of this discussion in O(1) bits. (ii) A description of u in log n bits. (If it is less pad the description with 0's.) (iii) A description of the presence or absence of edges between u and the other nodes in V in (iv) A description of F (u) in jF (u)j bits (the logarithmic term to make the description self-delimiting). (v) The code E(G) with all bits deleted corresponding to the presence or absence of edges between each w and v such that v is a neighbour of u and w is not a neighbour of u. Since there are at least n=2 \Gamma o(n) nodes w such that (u; E and at least nodes v such that (u; v) 2 E, by Lemma 2.5, this saves at least (n=2 \Gamma bits. From this description we can reconstruct G, given n, by reconstructing the bits corresponding to the deleted edges from u and F (u) and subsequently inserting them in the appropriate positions to reconstruct E(G). We can do so because F (u) represents a full information routing scheme implying that (v; w) 2 E iff (u; v) is among the edges used to route from u to w. In total this new description has which must be at least n(n \Gamma 1)=2 \Gamma o(n) by Eq. (1). We conclude that jF which proves the theorem. Note that the proof only requires that there be no relabeling; apart from that the direct neighbors of a node may be known and ports may be reassigned. 5. Average Case. What about the average cost, taken over all labeled graphs of n nodes, of representing a routing scheme for graphs over n nodes? The results above concerned precise overwhelmingly large fractions of the set of all labeled graphs. The numerical values of randomness deficiencies and bit costs involved show that these results are actually considerably stronger than the corresponding average case results which are straightforward. Definition 5.1. For each labeled graph G, let TS (G) be the minimal total number of bits used to store a routing scheme of type S (where S indicates shortest path routing, full-information routing, and the like. The average minimal total number of bits to store a routing scheme for S-routing over labeled graphs on n nodes is with the sum taken over all graphs G on nodes f1; ng. (That is, the uniform average over all the labeled graphs on n nodes.) M. BUHRMAN, J. H. HOEPMAN, AND P. M. B. VIT ' ANYI The results on Kolmogorov random graphs above have the following corollaries. The set of (3 log n)-random graphs constitutes a fraction of at least (1 \Gamma 1=n 3 ) of the set of all graphs on n nodes. The trivial upper bound on the minimal total number of bits for all routing functions together is O(n 2 log n) for shortest path routing on all graphs on n nodes (or O(n 3 ) for full-information shortest path routing). Simple computation shows that the average total number of bits to store the routing scheme for graphs of n nodes is (asymptotically and ignoring lower order of magnitude terms as in Table 1. - 3n 2 for shortest path routing in model IB - II (Theorem 3.1); 2. - 6n log 2 n for shortest path routing in model II - fl where the average is taken over the initially labeled graphs on n nodes with labels in f1; ng before they were relabeled with new and longer labels giving routing information (Theo- rem 3.2); 3. - 38n log n for routing with any stretch factor s for in model II (Theorem 3.3); 4. - n log log n for routing with stretch factor 2 in model II (Theorem 3.4); 5. O(n) for routing with stretch factor 6 log n in model II (Theorem 3.5 with shortest path routing in model ff (Theorem 4.1); 7. shortest path routing in model IA and IB (under all relabeling conventions, Theorem 4.2); log n for shortest path routing in model IA - ff (Theorem 3.6 and Theorem 4.3); full information shortest path routing in model ff (Theorem 3.7 and Theorem 4.5). 6. Conclusion. The space requirements for compact routing for almost all labeled graphs on n nodes, and hence for the average case of all graphs on n nodes, is conclusively determined in this paper. We introduce a novel application of the incompressibility method. The next question arising in compact routing is the following. For practical purposes the class of all graphs is too broad in that most graphs have high node degree (around n=2). Such high node degrees are unrealistic in real communication networks for large n. The question arises to extend the current treatment to almost all graphs on n nodes of maximal node degree d where d ranges from O(1) to n. Clearly, for shortest path routing O(n 2 log d) bits suffice, and [5] showed that for each there are shortest path routing schemes that require a total of \Omega\Gamma n 2 log d) bits to be stored in the worst case for some graphs with maximal degree d, where we allow that nodes are relabeled by permutation and the port-assignment may be changed This does not hold for average routing since by our Theorem 3.1 bits suffice for (Trivially, O(n 2 ) bits suffice for routing in every graph with We believe it may be possible to show by an extension of our method that bits (independent of d) are necessary and sufficient for shortest path routing in almost all graphs of maximum node degree d, provided d grows unboundedly with n. Another research direction is to resolve the questions addressed in this paper for Kolmogorov random unlabeled graphs in particular with respect to the free relabeling model (insofar as they do not follow a fortiori from the results presented here). Acknowledgements . We thank Jan van Leeuwen, Evangelos Kranakis and Danny Krizanc for helpful discussions, and the anonymous referees for comments and corrections. COMPACT ROUTING TABLES 19 --R Fast probabilistic algorithms for hamiltonian circuits and match- ings The complexity of interval routing on random graphs Memory requirement for universal routing schemes Three approaches to the quantitative definition of information Lower bounds for compact routing schemes Compact routing and shortest path information A trade-off between space and efficiency for routing tables --TR --CTR Ittai Abraham , Cyril Gavoille , Dahlia Malkhi, On space-stretch trade-offs: lower bounds, Proceedings of the eighteenth annual ACM symposium on Parallelism in algorithms and architectures, July 30-August 02, 2006, Cambridge, Massachusetts, USA Tamar Eilam , Cyril Gavoille , David Peleg, Average stretch analysis of compact routing schemes, Discrete Applied Mathematics, v.155 n.5, p.598-610, March, 2007 Cyril Gavoille, Routing in distributed networks: overview and open problems, ACM SIGACT News, v.32 n.1, March 2001 Cyril Gavoille , David Peleg, Compact and localized distributed data structures, Distributed Computing, v.16 n.2-3, p.111-120, September
kolmogorov complexity;compact routing tables;average-case complexity;incompressibility method;space complexity;random graphs;routing algorithms;computer networks
312404
Pontryagin Maximum Principle for Optimal Control of Variational Inequalities.
In this paper we investigate optimal control problems governed by variational inequalities. We present a method for deriving optimality conditions in the form of Pontryagin's principle. The main tools used are the Ekeland's variational principle combined with penalization and spike variation techniques.
Introduction . The purpose of this paper is to present a method for deriving a Pontryagin type maximum principle as a first order necessary condition of optimal controls for problems governed by variational inequalities. We allow various kinds of constraints to be imposed on the state. To be more precise, we consider the following variational inequality @y @t (1.1a) (1.1c) distributed control, A is a second order elliptic operator and @y @t denotes the derivative of y with respect to t; @'(y) is the subdifferential of the function ' at y. We shall give all the definitions we need in Section 3 and (1.1) will be made precise as well. The control variable u and the state variable y must satisfy constraints of the form (1.2a) where KU is a measurable set-valued mapping from Q with closed values in P(R) (P(R) being the set of all subsets of R), mapping from C(Q) into C(Q), C ae C(Q) is a closed convex subset with finite codimension. The control problem is where the cost functional is defined by Z Z Many authors (as for example Barbu [2], Mignot-Puel [17], Yong [23], Bonnans-Tiba [6], Bonnans-Casas [5] or Bergounioux [3]) have already considered control problems for variational inequalities from the theoretical or numerical point of view. Here we are interested in optimality conditions in the form of Pontryagin's principle. The existence of an optimal solution is assumed a priori. The novelty of this paper is twofold: we obtain the optimality conditions in Pontryagin's form and we think that our hypotheses are not far to be minimal. We essentially ask for the state equation to be well posed and assume differentiability of data with respect to the state. We allow various kinds of constraints to be added on the control u and on the state. However, we restrict the study to the case when ' is the indicator function of the closed convex set K so that the variational inequality (1.1) turns to be the so called obstacle problem. To get Pontryagin's principle, we use a method based on penalization of state constraints, and Ekeland's principle combined with diffuse perturbations [16, 20]. These techniques have been already used by many authors in the case of optimal control of parabolic or elliptic equations [5, 16, 21]. Some of these techniques have been also used for control problem governed by variational inequalities [5, 23, 4]. In these papers, the variational inequality is approximated via the Moreau-Yosida approximation of the maximal monotone operator @'. Here, we use another idea based on the formulation of (1.1) with a slackness variable and the regularity of its solution. In fact, the solution of (1.1) is also a weak solution of: @y @t in\Omega where - is the Lagrange multiplier associated to the variational inequality and is introduced as an additional control variable. Therefore we obtain a problem ( e P) equivalent to (P), with constraints on both the control variable and the state variable as well as coupled state/control constraints. We first give a Pontryagin's principle for ( e P). For this, we adapt the proof given in [21, 24, 7] to problem ( e P). Next we derive optimality conditions for (P) from those for ( e P). 2. Assumptions. Let\Omega be a open, smooth (with a C 2 boundary \Gamma for example) and bounded domain of R n (2 - n). In all the sequel, we suppose that Remark 2.1. We must underline that this choice of p is not optimal. Indeed, we should distinguish the integers p (for the L p -space of the distributed control u) and q (for the L q -space of the initial value y The optimal choice should be u 2 L p (Q) with p ? n+1 and y (\Omega\Gamma with q ? n; each time it is possible, we will mention how the next assumptions could be weakened from this point of view. Anyhow, to make the presentation clearer we simply assume that We suppose in addition that (A1) A is a linear elliptic differential operator defined by a R is a monotone increasing, globally lipschitz C 1 -function. Remark 2.2. The monotonicity assumption on f can be relaxed and replaced by : An appropriate translation shows that we retrieve the case where f is monotonically increasing. So we assume it for the sake of simplicity. On the other hand one could consider a mapping f from R \Theta Rto R depending on both y and u. The method would work in the same way. (In what follows, we denote the real function f and the Nemytski operator associated to by the same symbol f.) identically equal to +1), convex, lower semi-continuous function such that 0 2 dom '. (A5) For every (y; u) is measurable on Q. For almost every (x; t) 2 Q, for every u 2 R, F (x; t; \Delta; u) is C 1 on R. For almost every (x; t) 2 Q, F (x; t; \Delta) and F 0 y (x; t; \Delta) are continuous on R 2 . The following estimate holds is a nondecreasing function from R + to R + . - For every y 2 R, L(\Delta; y) is measurable on \Omega\Gamma For almost every x 2 \Omega\Gamma L(x; \Delta) is C 1 on R. The following estimate holds y (\Omega\Gamma0 j is as in (A5). (A7) \Phi is a C 1 mapping from C(Q) into C(Q), and C is a closed convex subset of C(Q) with finite codimension. We recall that for p 2 N fy 2 L W fy 2 L @y @t 3. Existence and Regularity of Solutions to the Variational Inequality. Let be V and H Hilbert spaces such that V ae H ae V 0 with continuous and dense injections. We denote by (\Delta; \Delta) V the -scalar product, h\Delta; \Deltai the duality product between V and V 0 , and k \Delta k V the V -norm. We consider a linear, continuous V -elliptic operator A from V to V 0 and OE a convex, proper and lower semi-continuous function from V to R[ f+1g. Then we may define the variational inequality @y in the following (variational) sense @t Here @OE(y(t)) denotes the subdifferential of OE at Now, we set 2(\Omega\Gamma0 we let g be a primitive function of f (such that example) and define where ' is given by (A3). Then is the regular part of OE). Therefore (1.1) makes sense in the (3.1) form with A and we may give a first existence and regularity result Theorem 3.1. Set p - 2; let be u 2 L p (Q) and y . Assume that then (1.1) has a unique solution y Proof - We first use a result of Tiba [22], Theorem 4.5 p. 26 that ensures that, if fi is a maximal monotone graph ae R \Theta R, u 2 L p (Q) and y then the following parabolic variational inequality @y on\Omega has a unique solution in W 2;1;p (Q) if the compatibility relation (\Omega\Gamma such that fl(x) 2 fi(y is fulfilled. One can apply this result to which is a maximal monotone graph since f is monotone increasing and ' is convex, lower semicontinuous and proper. It remains to check (3:6) that is (\Omega\Gamma such that fl(x) 2 f(y This is equivalent to 9fl such that As f is globally lipschitz then f(y p(\Omega\Gamma and we get the result We set @t (since f is globally lipschitz and y 2 W 2;1;p (Q)). In addition, -(t) 2 @'(y(t)) almost everywhere in ]0; T [; using the characterization of the subdifferential of a function in Banach spaces this gives In this last relation h ; i denotes the duality product between is the conjugate function of '. For more details one can refer to Barbu and Precupanu [1] or Ekeland-Temam [13]. It follows that the variational inequality (1.1) is equivalent to @y and (3.7). As y (\Omega\Gamma4 and (u; -) 2 L p (Q) \Theta L p (Q), the solution y of equation (3.8) belongs to precisely, we have: Theorem 3.2. (i) If p ? equation (3:8) has a unique weak solution y u- in W (0; p). Moreover, for every " ? 0, y u- is H-older continuous on ["; T \Theta\Omega and belongs to W equation (3:8) has a unique weak solution y u- in W Proof - The existence of a unique weak solution y u- in W (0; equation (3.8), can be proved as in the case of Robin boundary condition (see Raymond-Zidani [20, 21]). The H-older continuity result holds thanks to [9]. The point (ii) can be found in Bergounioux-Tr-oltzsch [4]. 4. Optimal Control of the Obstacle Problem. 4.1. The Obstacle problem. Now we focus on the very case of control of obstacle problem where and ' is the indicator function of K It is clear that 0 2 dom Moreover the compatibility condition (3.5) is fulfilled with that Theorem 3.1 is valid. On the other hand, the (classical) calculus of ' show that relation (3.7) is equivalent to in\Omega and Z\Omega that is, at last Z We may summarize in the following Theorem 4.1. Assume then the following variational vnequality @y @t where ' is the indicator function of K o , has a unique solution y equivalent to @y Z In the sequel we denote 4.2. Pontryagin principle . ?From now we consider the following problem ( e Minimize J(y; u) subject to : @y @t in\Omega (4.6a) ~ C ("Pure" state constraint) (4.6b) (4.6c) Z (4.6d) where ~ fy 2 C(Q) j y - The results of Section 3. yield that problems (P) and ( e are equivalent. In particular, if (-y; - is solution of (P), then there exists - -) is an optimal solution of ( e P) with @-y @t u. Let us mention that we are not interested in existence results (though we will give an example in the last section of this paper ) but in optimality conditions for (-y; - u). Consequently, we study optimality conditions for (-y; - u; - -) to get those for (-y; - u) . Let us define the Hamiltonian functions by: for every (x; t; for every (y; -; q; -) 2 R 4 . Theorem 4.2. [Pontryagin Principle for ( e are fulfilled and if (-y; - -) is a solution of ( e P), then there exist - M(Q) is the space of Radon measures on Q)), such that (- (4.10a) (4.10b) @t y - in Q; (4.10c) (\Omega\Gamma9 for every (ffi; d) satisfying (4.10d) -) a.e. in Q; (4.10e) a.e. in Q; (4.10f) is the restriction of - ']) to Q, and - is the restriction of - to\Omega \Theta fTg, h\Delta; \Deltai Q denotes the duality product between M(Q) and C(Q), A is the adjoint operator of A and 1 Remark 4.1. Let us comment these relations for a while: (- are the multipliers associated to the state constraints; - - corresponds to "y - 0" and an immediate consequence of relation (4.10b) is the following complementarity result: - 0; h- ' is associated to the (general) constraint - is the multiplier associated to the integral constraint " Z q is the classical adjoint state which takes into account the cost functional via -. Condition (4.10a) is a non triviality condition. We must underline that we get (a priori) non qualified optimality conditions. If - - 6= 0, the problem turns to be qualified. Remark 4.2. One may note that if - could happen that - so that - therefore, the optimality system could appear as completely unuseful. However, this is the case where the solution (-y; - u) is solution of a control problem governed by a classical semilinear parabolic equation since we have @-y @t u, and the associated optimality systems are well known for this kind of problems. We refer for instance to [20]. Theorem 4.3. [Pontryagin Principle for (P)] If are fulfilled and if (-y; - u) is a solution of (P), then there exists - q 2 L 1 (0; T ; W 1;1 M(Q) such that (4.10a), (4.10b), (4.10d), and (4.10e) hold. Moreover, we have @t y @-y @t u) in Q; (4.11a) @t (4.11b) Remark 4.3. Relation (4.11b) is a pointwise complementarity condition. Therefore, - q may be viewed as a Lagrange multiplier associated to the pointwise constraint "( @y Let us recall a regularity result for weak solution of parabolic equation with measures as data: Proposition 4.1. Let - be in M b (Q n (\Omega \Theta f0g [ \Sigma)) and let a be in L p (Q) satisfying Consider the equation @t is a bounded Radon measure on Q n (\Omega \Theta f0g [ \Sigma), -Q is the restriction of - to Q, and is the restriction of - to\Omega \Theta fTg. Equation (4.12) admits a unique weak solution . For every (ffi; d) satisfying d ? 2d (\Omega\Gamma4 and we have: d) is independent of a. Moreover, there exists a function q(0) 2 L such that : Z qf @y @t for every y fy denotes the duality product between C b (Q n (\Omega \Theta f0g [ (\Omega \Theta f0g [ \Sigma)). (C b (Q n (\Omega \Theta f0g [ \Sigma)) denotes the space of bounded continuous functions on Qn (\Omega \Theta f0g[ \Sigma), while M b (Qn (\Omega \Theta f0g[ \Sigma)) denotes the space of bounded Radon measures on Q n (\Omega \Theta f0g [ \Sigma), that is, the topological dual of C (\Omega \Theta f0g [ \Sigma)):) Proof - The proof is the same to the one given in [19] for the Neumann boundary conditions (see also [7]). An easy adaptation of this proof yields the previous result. However, for the convenience of the reader we recall that q is the weak solution of (4.12) if and only if q belongs to L 1 (0; T ; W 1;1 and for every ' 2 C 1 (Q) satisfying '(x; on\Omega and on \Sigma, we have Z ae oe As in [7], we can prove that the weak solution q belongs to L (\Omega\Gamma5 for every (ffi; d) satisfying the condition We remark that the set of pairs (ffi; d) satisfying the above condition is nonempty. We remark also that if (ffi; d) satisfies (4:13), if a belongs to L p (Q) and if q belongs to L (\Omega\Gamma84 then aq 2 L 1 (Q). Now, since q 2 L (\Omega\Gamma6 (where (ffi; d) satisfies (4:24)), and since div xt ((\Sigma @t Aq belongs to M b (Q); then we can define the normal trace of the vector field (( in the space W \Gamma1 If we denote by fl normal trace, we can prove (see Theorem 4.2 in [19] that this normal trace belongs to M(@Q) and the restriction of fl to\Omega \Theta fTg is equal to , and if q(0) is the measure on\Omega which satisfies the Green formula of Theorem 3.2, then \Gammaq(0) is the restriction of fl to\Omega \Theta f0g. In fact, it can be proved that q(0) belongs to L 1 (\Omega\Gamma (see Theorem 4.3 in [19]). 4.3. Proof of Theorems 4.2-4.3 . First we assume that Theorem 4.2 is valid. As mentioned before, u) is an optimal solution for (P), then (-y; - u; - -) is a solution for P), where - -y Thanks to Theorem 4.2, there exist (- - q) such that (4.10) holds. Replacing - - by its value in (4.10c) obviously leads to (4.11a). Furthermore, relation (4.10f) implies which gives As - in Q we obtain (4.11b). This concludes the proof of Theorem 4.3. It remains to show that Theorem 4.2 is valid. Note that Pontryagin's principle for control problem with unbounded controls, with pointwise state constraints, and with state/control constraints in integral form have been already studied in [7]. For convenience of the reader, we give the main ideas of the proof. Step 1: Metric space of controls. In the sequel, we shall consider control problems for which the state constraints (4.6b) and the state/control integral constraints (4.6d) are penalized. These problems are constructed in such a way to make -) be an approximate solution. The idea is to apply next the Ekeland variational principle. For this we have to define a metric space of controls, endowed with the so-called Ekeland distance d, to make the mapping (u; -) 7\Gamma! y u- continuous from this metric space into C(Q). Thanks to Theorem 3.2, this continuity condition will be realized if convergence in the metric space of controls implies convergence in since we deal with (generally) unbounded controls, the convergence in (U ad \Theta V ad ; d) does not imply the convergence in L p (Q) \Theta L p (Q) (see [14], p. 227). To overcome this difficulty, as in [24, 20], we define a new metric as following. For U ad (-u; We endow the control space with Ekeland's metric: where L n+1 denotes the Lebesgue measure in R n+1 . Then as in [24, 20], we can prove the following Lemma 4.1. (U ad (-u; d) is a complete metric space for the distance d, and the mapping which associates (y u- ; J(y u- ; u)) with (u; -) is continuous from (U ad (-u; -; k); d) into C(Q) \Theta R. In [7], the authors have used another method to build the metric space of controls. This construction was adapted to the type of constraints they have considered. Step 2: Penalized problems Since C(Q) is separable, there exists a norm j \Delta j C(Q) , which is equivalent to the norm k \Delta k C(Q) such that strictly convex and M(Q), endowed with the dual norm of j \Delta j C(Q) (denoted by j is also strictly convex (see [11], Corollary 2 p. 148, or Corollary 2 p. 167). Let K be a convex subset of C(Q). We define the distance function to K (for the new norm j \Delta j C(Q) ) by Since K is convex, then ffi K is convex and Lipschitz of rank 1, and we have lim sup ae&0; ae for every is the subdifferential of ffi K at (i). Moreover, as K is a closed convex subset of C(Q), it is proved in ([16], Lemma 3.4) that for every i 62 K, and every - 2 @ ffi K (i), strictly convex, then if i 62 K, @ ffi K (i) is a singleton and ffi K is G-ateaux-differentiable at i. Let us notice that when K := fz 2 C(Q) j z - 0g, the distance function to K is given by ffi K Endowing C(Q) \Theta C(Q) with the product norm we have similarly ffi e C is defined by (4.7)). Let us consider the penalized functional: 'Z With such a choice, for every " ? 0 and k ? 0, -) is a " 2 -solution of the penalized problem i.e. since inf(P k;" For every k ? 0, we choose k 2p and we denote by (P k ) the penalized problem (P k;" k ). Thanks to Ekeland's principle ([13] p. 30), for every k - 1, there exists such that (4.15a) (4.15b) for every (u; -) 2 U ad (-u; being the states corresponding respectively to and to (u; -)). In view of the definition of " k , we have lim a.e. on Q. Thus ku k . To exploit the approximate optimality conditions (4.15), we introduce a particular perturbation of Step 3: Diffuse perturbations. For fixed ad , we denote by the pair of functions in U ad (-u; defined by (4.16a) (4.16b) Observe that for every k - 1, belongs to U ad (-u; -; k), and that (u ok to (Q). Applying Theorem 4.1 of [7] (see also [24, 21] for more details), we deduce the existence of measurable sets E k ae with L n+1 (Q), such that if we denote by (u ae k ) the pair of controls defined by ae ae ae ae and if y ae k is the state corresponding to (u ae ae!0ae (4.18a) J(y ae (4.18b) Z Z Z (4.18c) where z k is the weak solution of and Z \Theta F 0 Z\Omega y Setting k ) in (4.15b), it follows that lim sup ae!0 ae Taking (4.18) and the definition of J " k into account, we get h- where 'Z For every k ? 0, we consider the weak solution q k of is the restriction of - k (resp. [\Phi 0 (y k ) ' k ]) to Q, and - k ) is the restriction of - k (resp. [\Phi 0 (y k ) ' k ]) to\Omega \Theta fTg. By using the Green formula of Proposition 4.1 with z k , we obtain Z Z Z\Omega y h- Z With this equality, (4.20) and the definition of \Delta k J , we get Z ds dt Z ds dt for every k ? 0 and every (u defined with respect to (u Step 4. Convergence of sequence (- Observing that - 2 exist (- and a subsequence, still denoted by (- , such that - and ' k * - With the same arguments as in ([21], Section 6.2, Step 4), we prove that (q k ) k , or at least a subsequence of weakly converges to - q in L ffi 0 (0; T ; W 1;d 0(\Omega\Gamma4 for every (ffi; d) such that n 2d 1. Recall that converges to (-u; - -) in L p (Q) \Theta L p (Q). Hence, y k also converges to - y. Passing to the limit when k tends to infinity in (4.22) gives Z Z dx dt; for every (u; -) 2 U ad \Theta V ad . This inequality is equivalent to Z u2Uad Z (4.23a) Z -2Vad Z (4.23b) Now, by using Lebesgue's points argument (see [21, 24]), we obtain (4.10e) and (4.10f). On the other hand, it is clear that - Moreover, from the definitions of - k and ' k , we deduce h- When k tends to infinity, we obtain (4.10b) and a part of (4.10a). It remains to prove that (- is nonzero; for this, we recall that - 2 If (-) 6= 0, then the proof is complete. If not, we can prove that j-j M(Q) First we recall that C has a finite codimension in C(Q) and that fz 2 C(Q) j z - 0g is a subset of C(Q) with a nonempty interior. Then e C is a subset of C(Q) \Theta C(Q) with a finite codimension. Moreover, from (4.24), we deduce that, for every (z 1 C: h- The last right-hand side quantity tends to 0 as k ! +1. With this estimate and using lim k thanks to Lemma 3.6 of [16], we conclude that (- 5. Examples . Let us consider the following optimal control problem where the cost functional is defined by where is convex and lower semicontinuous and there exist c 1 ? R such that (A6 ) the function is measurable in t, g(:; independent of t such that : Conditions on g and / could be weakened. For more details one can refer to Barbu [2] p.317. Now we consider Minimize J(y(y is the solution of where U ad is a nonempty, convex subset of L p (Q), closed for the L 2 (Q)-topology and p is an integer such that Though we are especially interested in optimality conditions for solutions of problem (P) we may give an existence result anyhow. More precisely : Theorem 5.1. For any y (defined by (4.1)), problem (P) has at least one solution u. Moreover the corresponding state belongs to C(Q) " W 2;1;p (Q). Proof - One can find this result in Barbu [2] Proposition 1.1. p.319, when U It is easy to adapt it to the case where U ad is a closed convex subset of L 2 (Q). A priori estimations do not change so that we get the "suitable" convergence in the "suitable" spaces. The only modification concerns the cluster points of the control sequences. As U ad is convex and closed for the L 2 (Q)-topology these points belong to U ad . As U ad ae L p (Q) we can use regularity results of Theorem 4.1. Remark 5.1. The assumption that U ad has to be a convex subset of L p (Q) (for some p ? n) closed for the L 2 (Q)-topology, may be difficult to ensure: for example U ad = L p (Q) is not suitable. However, we give more precise example sets U ad in the sequel. Let us precise a little more the example; we set (with N ? 0), so that with the previous notations we get F (x; t; It is easy to see that both (A5 ) and (A6 ) are fulfilled for such a choice of h; Therefore the following optimal control problem @y @t with y 2(\Omega\Gamma and U ad a nonempty,convex subset of L p (Q) closed for the (Q)-topology has an optimal solution. We always assume of course (A1)-(A2) (one may choose is the laplacian operator); we have already seen that (A3) and (A4) are fulfilled with the special choice of ' and y o . It is also easy to see that (A5) and (A6) are ensured with F and L defined as above. So we may give optimality conditions for Theorem 5.2. Assume (A1) and (A2). Then problem has an optimal solution (-y; - u) 2 [W (Q). Moreover, there exist (- such that the following optimality system holds (- (5.5a) @-y - in Q; (5.5c) Z\Omega (5.5d) @t - in Q; (5.5f) -y @t u. Proof - It is a direct consequence of Theorem 4.2 with and C is the whole space. Considering the Hamiltonian functions and relations (4.10e) and (4.10f) gives (5.5e) and (5.5f) immediately. We end this section with two examples for U ad 5.1. Case where U ad is bounded in L 1 (Q). Let us set ad is of course a convex subset of L p (Q) for any p ? n. Moreover, we get Lemma 5.1. U ad is closed for the L 2 (Q)-topology. Proof - let un 2 U ad converging to u in L 2 (Q). Then un (x; t) converges to u(x; t) almost everywhere in Q so that we get a(x; almost everywhere in Q. So u 2 L 1 (Q). It is clear that u 2 U ad . Therefore, in view of Remark 5.1 we get the following result for y Z\Omega Theorem 5.3. Assume (A1) and (A2). Then problem has an optimal solution (-y; - u) 2 [W there exists (- R \Theta R \Theta M(Q) \Theta (\Omega\Gamma3 such that (5.5a)-(5.5d) and (5.5g) hold with @t - in Q; 5.2. Case where U Qg. When U a.e. in Qg and y thanks to the maximum principle for parabolic equations the constraint automatically fulfilled in equation (4.6b) so that the corresponding multiplier - - is equal to 0 (or at least does not appear.) So the corresponding Pontryagin optimality system consists in equations (5.5a),(5.5c)-(5.5g) where equation (5.5e) is replaced by @t - in Q; This implies in particular that - For this simple example, we can see that the optimality conditions (5.2) are not trivial, because we cannot have 6. Conclusion. The optimality conditions we have obtained are given in a non qualified form. So far it is difficult to compare precisely these results to those already existing, since they are most of time in a qualified form [6, 5, 17] or concern elliptic variational inequalities. Nevertheless we must underline that in this paper, we obtain interesting informations about optimal solutions (at least in simple cases) . Indeed, we have seen in Example 5 that the equation (5.5e) provides a quite precise information on the structure of the multipliers - - for the distributed multiplier for instance and the adjoint state - q: the regular part of this adjoint state belongs to C(Q) while the non-smooth part belongs to L 1 (0; T ; W 1;1 These informations seem new (to compare with those given in Barbu [2], Section 5.1.4 p 331, for example). The method developed in [5, 23] for elliptic variational inequalities, is still true for the parabolic case, but we think that this method does not allow to obtain the condition (4.11b). However, in [23, 5], the authors give a qualification assumption under which they can derive Pontryagin's principle in qualified form. As we can preview now the generic form of the Lagrange multipliers, one can check optimal control problems where the variational inequality is more general than the obstacle type one or occurs on the boundary, with boundary control. --R Analysis and Control of Non Linear Infinite Dimensional Systems Optimal control of abstract elliptic variational inequalities with state constraints Optimization and Nonsmooth Analysis On the local behavior of solutions of degenerate parabolic equations with measurable coefficients Geometry of Banach Spaces- Selected Topics On the Variational Principle Nonlinear Boundary Control of Semilinear Parabolic Problems with Pointwise State Constraints Optimal control of nonsmooth distributed parameter systems Pontryagin Maximum Principle for Semilinear Second Order Elliptic Partial Differential Equations and Variational Inequalities with State Constraints Optimal Control Problem for Semilinear Parabolic Equations: Optimality Conditions and Numerical Approximations --TR --CTR Gengsheng Wang, Pontryagin maximum principle of optimal control governed by fluid dynamic systems with two point boundary state constraint, Nonlinear Analysis: Theory, Methods & Applications, v.51 n.3, p.509-536, November 2002
optimal control;pontryagin principle;variational inequalities
312456
Fast Algorithms for Periodic Spline Wavelets on Sparse Grids.
We consider Boolean sums of univariate interpolation operators which define multivariate jth order blending interpolation operators on sparse grids. Sample spaces are defined as range of the blending operators. Sample and wavelet spaces have significantly lower dimension and good approximation order for certain function spaces. Fast decomposition and reconstruction algorithms for bivariate spline wavelets, based on algorithms for univariate functions, are described. Operation counts for the algorithms are given and it is shown that the complexity depends linearly on the dimension of sample spaces.
Introduction . Wavelet analysis has evolved in the last few years as a powerful method in numerical analysis and signal processing. An important question is the development of efficient algorithms for multivariate wavelet transforms. The classical approach for the construction of bivariate wavelets from given univariate functions by tensor products leads to a fast increasing dimension of space of order O(2 2j ). There- fore, one has to take into account a high complexity of the corresponding algorithms. To avoid this problem the concept of Boolean sums and sparse grids is often used in multivariate approximation and interpolation (see e.g. Delvos and Schempp [5]) as well as in finite element methods (see e.g. Zenger [16]). Applying the Boolean sum method sample spaces of dimension O(j2 j ) are described in [1] and [5]. It is shown there that for functions from bivariate Korobov spaces (see [7]) one obtains only an extra logarithmic factor in the approximation order, while the dimension of the sample spaces is significantly lower. A unified approach to error estimates for Boolean sums and tensor products in Korobov and Sobolev spaces can be found in [10]. The Boolean sum method is applied to wavelet theory by Sprengel in [14], where corresponding sample and wavelet spaces of bivariate periodic functions are consid- ered. A basis for sample spaces is given by fundamental interpolants on sparse grids. It is crucial for this approach, that the underlying univariate wavelets and scaling functions are fundamental interpolants. In [15], a first algorithm for complete decomposition and reconstruction with complexity O(j described by using matrix-vector notations and the fast Fourier transform (FFT). The aim of this paper is to describe faster algorithms by using periodic spline wavelets with minimal support. Therefore, we establish in x2 an approach, where the underlying univariate wavelet and scaling functions need not be fundamental interpolants. We demand only, that for the sample spaces a certain interpolation problem has a unique solution. Basis functions for the bivariate sample spaces are still the fundamental interpolants from [14], for which we establish the two-scale relation in Theorem 2.1. However, for our applications, we mainly use a generating system which consists of the translates of certain tensor products of univariate scaling functions. This approach leads to algorithms, which are different from the algorithms of Sprengel [15] and have some particular advantages. Fachbereich Mathematik, Universit?t Rostock, Universit?tsplatz 1, D-18051 Rostock, Germany, K. BITTNER For our algorithms, we use periodic spline wavelets with minimal support as described by Plonka and Tasche [8]. In x3, we give a short introduction to these wavelets. In x4, we study fast algorithms for univariate periodic spline wavelets, which are based on a method described in [2]. The idea of recursive filters used there yields complexity O(2 j ) in the univariate setting. In x5, we present new algorithms for wavelets on sparse grids, which do not require the complete decomposition of a function until the lowest level as in [15] and therefore improve the algorithms presented there. The main idea is to use the representation of functions from the sample spaces by the generating system mentioned above. In this way, we can apply ideas from the tensor product setting, such that our algorithms make use of the algorithms for the univariate case from x4. Beyond the decomposition and reconstruction algorithm, we give also an interpolation algorithm and an algorithm for the computation of function values on the sparse grid. For all algorithms, we count the floating point operations and compare it with the corresponding numbers of the tensor product algorithms. A numerical example is presented in x6. For this we compare the results of Boolean sum and tensor product algorithms. We describe some special effects of the Boolean sum method and show that for suited functions the Boolean sum method is more efficient than tensor product methods. 2. Sample and Wavelet spaces. Bivariate interpolating scaling functions and wavelets for sparse grids have been investigated for the first time by Sprengel in [14, 15] using Boolean sums of univariate interpolation operators (see [1, 5]). In the following we shortly recall this definitions and establish a more general approach for wavelets on sparse grids. By C(T n ) we denote the space of all continuous, n-variate 2-periodic functions and by L 2 (T n ) the space of square-integrable, n-variate 2-periodic functions with the inner product hf; gi T n := (2-) \Gamman R dx. For a fixed d 2 N, we put d j := d . For each j 2 N 0 , we introduce univariate scaling functions OE j;k as translates of a single function, i.e., In the following, we demand that the scaling functions OE j;k are linear indepentent. Then we define corresponding univariate sample spaces by Further, we demand the existence of a linear interpolation operator L j with the precision set prec ae oe ae [0; 2-) and the image ImL there have to exist coefficients a j;k 2 R such that a j;k OE j;k (t j;l Obviously, the interpolation projectors L j satisfy the embedding relations PERIODIC SPLINE WAVELETS ON SPARSE GRIDS 3 For the bivariate setting, we introduce the projector of j-th order blending interpolation defined by where A \Phi B := A+B \Gamma AB denotes the Boolean sum and A\Omega B the tensor product of projectors (cf. [5]). Then, the interpolation knots form a sparse grid (Figure 2.1) given by prec L r \Theta prec L Fig. 2.1. Sparse grids T Bfor Now we define the bivariate sample spaces as the images of B j , i.e., ImL A generating system of V B j is given by This system consists of the translates of different tensor product functions and therefore it is very useful in applications. But for the unique representation of a a basis is necessary. To construct such a basis of V B j we employ the interpolation properties of B j . For this we consider the univariate fundamental interpolants OE ffi are uniquely determined (cf. (2.2)) by and which form a basis of V j . Analogously, a basis of V B j is given by the bivariate fundamental interpolants for the sparse grid T B 4 K. BITTNER and OE j;s j 0 for 2 Z. These functions are not translates of each other and have a more difficult structure. But it turns out, that for our algorithms, we need not use the functions OE j;k and \Phi j;(k;l) explicitly. However, it should be useful to investigate the functions \Phi j;(k;l) in more detail. Therefore, we will establish and prove a refinement relation for these functions. For this, we consider the following finer splitting of J j K -;r into the disjoint sets K -;r with K For s=r s=r and in particular for (k; l) 2 J j simplifies to Now we establish the refinement equation of the bivariate fundamental interpolants Theorem 2.1. Let (k; l) we have Proof. From the interpolation properties of OE ffi j;k , we conclude (2. PERIODIC SPLINE WAVELETS ON SPARSE GRIDS 5 Let now j, k, l be fixed. We introduce the notations oe 4 oe 5 For we have with (2.4) s=r s=r From (2.7), it follows that OE s;2 s\Gammaj ds ff s;m\Gamma2 s\Gammaj k OE s+1;2m+1 s and OE s;2 s\Gammaj ds ff s;m\Gamma2 s\Gammaj k OE s+1;2m+1 With (2.4), we obtain s=r oe 5 Taking into account (2.8) and (2.5), the assertion (2.6) follows. Now we introduce the univariate wavelet space W j as the orthogonal complement of denotes the orthogonal sum in L 2 (T n ). We choose a wavelet function / j 2 W j , such that 6 K. BITTNER is a basis of W j . The bivariate wavelet spaces are given by In [14], it has been proved that V B . A basis of W B is given in a natural way by f/ By counting the basis functions we obtain In [14], Theorem 2, it is shown that the bivariate wavelet basis (2.9) is stable, if the univariate scaling functions and wavelets form stable bases. 3. Periodic spline wavelets. Now we will consider an example for suitable univariate sample and wavelet spaces. By Sprengel [14, 15], interpolating trigonometric polynomials as described in [11, 12] are used as univariate wavelet and scaling functions. In this case one has OE j;k and the wavelets satisfy an interpolation property, too. This has some advantages in the notation. On the other hand, this approach leads to algorithms with complexity O(j2 j ) such that the algorithms for the bivariate case have complexity O(j To improve the algorithms we propose another approach. Because of the wide applicability and the simple structure of spline interpolation, we will restrict ourselves to spline wavelets in the sequel. Here, we consider periodic spline wavelets with minimal support as described in [8, 9]. We briefly recall some definitions. The k-th Fourier coefficient of f 2 L 2 (T) is given by c k (f) := hf; e ik T Z. Further, we define the discrete Fourier transform of length N by - xn := \Gamma2-i=N is a primitive N -th root of unity. The cardinal B-spline of order m - 1 is defined by with By the convolution property, the Fourier transform of Nm reads as follows Nm (u) :=Z The scaling function OE j (j 2 N 0 ) is defined as 2-periodization of Nm (2 j \Delta), i.e. Nm By the Poisson summation formula, one obtains the Fourier coefficients Nm and c n (OE j;l The two-scale relation is given by OE or in the Fourier transformed d j+1 with the two-scale symbol Using the results of Locher [6] for construction of periodic fundamental interpolants in shift invariant spaces, we obtain the Fourier coefficients of the fundamental j;0 of even spline order with the m-th Euler-Frobenius function \Phi m (z) := z k . In Figure 3.1, we show bivariate basis functions constructed from these splines. For odd spline order, there does not exist a unique spline interpolant on the grid T j . Consequently, we will deal in the following only with splines of even order Fig. 3.1. Bilinear The wavelet / j is given as the 2-periodization of the the cardinal spline wavelet introduced by C. K. Chui and J. Z. Wang [4, 3]. Therefore, we define / by its two-scale relation or in the Fourier transformed form d j+1 with the two-scale symbol Figure 3.2 shows bivariate wavelet functions constructed from the periodized Chui- Wang wavelets. 8 K. BITTNER -0.20.2 Fig. 3.2. Bilinear 4. Fast univariate spline algorithms. Fast algorithms for spline interpola- tion, decomposition, reconstruction and computation of function values based on the FFT are described in [8]. Unfortunately this algorithms have complexity O(j2 j ). Our goal is to apply algorithms of complexity O(2 j ) to achieve the complexity O(j2 j ) in the bivariate case. Because we consider periodic functions we can assume that the coefficients are extended periodically, e.g. a . For the reconstruction it is well known, that in a j+1;k OE a j;k OE j;k the coefficients a j+1;k can be computed by a a with 4m d j real additions and multiplications. In the following we will count one real addition and one real multiplication together as one real operation. To obtain a decomposition algorithm of complexity O(2 j ) we refer to Berger and [2], where an algorithm for fast decomposition based on recursive filters is described. Let - m;- ! 0, the zeros of the Euler-Frobenius polynomial inside the unit circle, which are all real and negative (see [13]). Further, we consider the coefficients r k and s k of the numerators of the decomposition symbols PERIODIC SPLINE WAVELETS ON SPARSE GRIDS 9 With these notations the decomposition algorithm of Berger and Str-omberg, which determines the coefficients a j;k and b j;k in (4.1) from given a j+1;k reads as follows. Algorithm 4.1. spline dec 1. For l=1\Gamma2m r l a j;2k\Gammal ; v (1) l=1\Gamma2m s l a j;2k\Gammal 2. For (a) u (2-) 2m;- u (2- \Gamma1) (b) For (c) u (2-+1) 2m;- u (2-) \Gammas (d) For 3. For Return The number of real operations yields as follows. Let us assume that the values of 2m;- are precomputed. For the first step, we need 4m d j operations. In the second step, for each - we need 2(d operations for (a) as well as for (c) and 2(d operations for (b) and (d) each. Therefore, the second step needs (8m\Gamma8)d j operations at all. Together these are (12m \Gamma 8)d j operations for the decomposition algorithm. Furthermore, we have to consider an interpolation algorithm. For given function values y we want to determine the coefficients a j;k such that a j;k OE j;k (t j;l In [8], the Fourier transformed solution for even spline order - a Because the denominator of the symbol w \Gammanr is similar to the denominator of the decomposition symbols, we can apply again the idea of Berger and Str-omberg, which leads to the following interpolation algorithm. Algorithm 4.2. spline int 1. For 2. For (a) u (2-) (b) For (c) u (2-+1) \Gammas (d) For 3. For Return (a j;k ) k=0 . For this algorithm, we count d j operations in the first step and (4r \Gamma 4)d j operations in the second step. Hence, the absolute number of real operations for this algorithm is (2m \Gamma 3)d j . 5. Algorithms for bivariate spline wavelets on sparse grids. In this section we will describe algorithms for the decomposition of a bivariate function j+1 into a scaling part f j and a wavelet part j as well as for the reconstruction of f j+1 from f j and g j . The main difficulty of the Boolean sum approach is the structure of the basis functions \Phi j;(k;l) . That is why we propose the generating system (2.3) for our algorithms. In this way, we can use the ideas from the tensor product case. Thus, we can establish fast algorithms, which have a simple structure and are based on the univariate algorithms. The algorithms are independent from the underlying univariate wavelets. For simplicity and because we want to give exact operation counts we will restrict ourselves to spline wavelets. 5.1. Interpolation algorithm for sparse grids. To obtain a representation of a function f j as a linear combination of elements from the generating system (2.3) we have to compute coefficients a r;(k;l) with r;k;l a r;(k;l) OE From that the coefficients a r;(k;l) are a solution of the following interpolation problem. For all (-) 2 J j dr a r;(k;l) OE r;k (t j;- )OE j \Gammar;l (t j;- Because we have not a basis the interpolation problem has several solutions a r;(k;l) , which represent all the same function. To obtain one of these solutions we will first describe an interpolation algorithm for sparse grids. With f j;r := L dr a Now we write gr (\Delta;y) PERIODIC SPLINE WAVELETS ON SPARSE GRIDS 11 This means for each l we have to interpolate the values Applying the univariate interpolation algorithm for y, we obtain for and l=0 u j;(k;l) OE j;l (y) with By the univariate reconstruction formula (4.2), we compute coefficients v r;(k;l) , such that Finally, we have a and therefore (a r;(k;l) (v r;(-;l) Hence, the spline interpolation algorithm for sparse grids reads as follows. Algorithm 5.1. bool int 1. For For 2. For For For 3. For For (a r;(k;l) (v r;(-;l) Return (a r;(k;l) ) r;k;l . In this algorithm, we need real operations in the first as well as in the third step and operations in the second step. This are altogether operations. 5.2. Decomposition. Now we want to decompose a given function f into functions f we have to determine coefficients a r;(k;l) and b r;(k;l) such that dr c r;(k;l) OE r;k\Omega OE j+1\Gammar;l dr a r;(k;l) OE for given c r;(k;l) . Applying the univariate decomposition algorithm first with respect to y and then with respect to x we obtain dr ~ j+1;k\Omega OE 0;l dr ~ u r;(k;l) OE \Gamma1;k\Omega / j;l By the univariate reconstruction formula (4.2), we can then compute the values a r;(k;l) such that dr a r;(k;l) OE From this equalities, we derive the bivariate decomposition algorithm, which determines the coefficients a r;(k;l) and b r;(k;l) . Algorithm 5.2. bool dec 1. For For spline dec For 2. For For For spline dec 3. For For a a For Return This algorithm needs real operations for the first, operations for the second step and finally operations for the third step. Therefore, the decomposition algorithm needs operations. 5.3. Reconstruction. Analogously, we can derive a reconstruction algorithm, which determines the coefficients c r;(k;l) from given coefficients a r;(k;l) and b r;(k;l) in (5.1). Algorithm 5.3. bool rec 1. For For For 2. For For For Return 14 K. BITTNER This reconstruction algorithm needs operations in the first step and operations in the second step. Summing up, these are real operations. 5.4. Computation of function values on the sparse grid. Finally, we consider the question how to compute function values of f j . In particular, we have to determine the values for all points of the sparse grid T B j to obtain the coefficients Because of supp OE function values of dr a r;(k;l) OE can be computed for (x; operations by l=- a r;(k;l) OE r;k (x)OE j \Gammar;l (y): To determine the sum f(x; need then In this way, the computation of all coefficients fl k;l , (k; l) 2 J j would require O(j operations. To reduce the complexity further to O(j2 j ) we will use the refinability of OE j . First we introduce index sets I j;r with I j;0 := f2 I j;r := f2 j \Gammar (2k j. By this definition we have I j;r and Now we consider for I j;r the values s=r s=r where ds k=0 a s;(k;l) OE s;k (t s;- ). By the reconstruction formula (4.2) we compute coefficients v -;l , such that b Analogously, we determine the values c - := I j;r . I j;r and - 2 I j;-\Gammar and we can determine the values of f by To obtain the function values OE j (t j;k ) we use the definition (3.2), such that we only need the values Nm (k) of the cardinal B-spline for the function values y on the sparse grid can be computed with the following algorithm. Algorithm 5.4. sparse val 1. For For k=1 a r;(-\Gammak;-) Nm (k) l=1 a r;(- \Gammal) Nm (l) r;(- \Gammal) Nm (l) 2. For For For 3. For s=1 u (1) 4. For Return (y -)2J j . K. BITTNER Now we count the number of real operations for this algorithm. Obviously, the first step needs d 2 (j operations. The number of operations for the second step is given by/ d d Analogously, we obtain d 2 (j operations in the third step. In the fourth step we have only real additions. Because each value w r;(-) is used once we obtain the number of this additions by dr Therefore, we can estimate the number of real operations for this algorithm by In the following table we sum up our operation counts for the Boolean sum algorithms and compare it with the operation numbers for the corresponding tensor product methods. Algorithm Boolean sum Tensor product Interpolation Decomposition (39mj Reconstruction Function values (5m Hence, the reconstruction and decomposition algorithms for spline wavelets on sparse grids have the arithmetical complexity O(j2 j ), while the corresponding algorithms for tensor products have complexity O(2 2j ). Remark 5.5. From the structure of the sparse grids one would expect some problems in the implementation of the algorithm. However, because of the simple structure of the generating system (2.3) this problem does not occur in the Algorithms 5.2 and 5.3 for decomposition and reconstruction. In Algorithm 5.4, the second, third and fourth step show how one can deal with the sparse grids using the index sets I j;r and K -;r without a considerable loss of performance. Analogously, we can handle this problem in step 1 of Algorithm 5.1. Therefore, the number of floating point operations is suited for a comparison of tensor product methods and our Boolean sum algorithms. 6. Numerical examples. Finally, we present the results of numerical tests. The detection of higher order discontinuities is an important property of wavelets. The reason for this is, that the wavelet part of a function is the error of the orthogonal projection, which depends on the smoothness of the function such that the large wavelet coefficients are localized near the discontinuities. Therefore, we consider first the approximation properties of the interpolation projectors. Let f 2 C r;r (T 2 ) with PERIODIC SPLINE WAVELETS ON SPARSE GRIDS 17 In [5], it is shown that for r - m the error of spline blending interpolation on sparse grids is while the error of tensor product interpolation on a regular grid is given by That means, we obtain for Boolean sums only an extra logarithmic factor in approximation error, while the cost for the algorithms is remarkably lower. On the other hand, if it can be shown, that for B j it holds that In this case, the approximation order of the tensor product interpolation operator is For our tests, we choose bivariate spline functions, because this functions have discontinuities in its derivatives at well known lines. Therefore, we interpolate and decompose the tensor product spline N 4\Omega N 4 as well as the box spline B (222) both centered in the point (-) and periodically extended. Both functions are contained in C 2 (T 2 ). On the other hand, N 4\Omega N 4 is contained in C 2;2 (T 2 ), too, whereas B (222) is only contained in C 1;1 (T 2 ) but not in C 2;2 (T 2 ). With these examples, we demonstrate for which kind of functions the Boolean sum method works well. The error estimates given above let expect good results of the Boolean sum algorithm only for the tensor product spline. We choose the underlying spline wavelets of order to rule out effects from the spline structure of our test functions. Furthermore, we set because with this setting the special properties of the Boolean sum approach should appear most visible. We compare the results of our algorithms with the tensor product methods. For tensor products, we decompose the functions from level 9 to level 8. In the Boolean sum case we choose once the decomposition from level 15 to 14. Because of dim(V 15 we have around the same amount of memory in this way. On the other hand, we perform the decomposition from level 11 to 10. The results show that for this level the approximation error for N 4\Omega N 4 is roughly the same as in the tensor product approximation to level 8. Figure 6.1 shows density plots of the absolute values of the wavelet part of the functions. For higher values the shade is darker. As expected the result for the tensor product spline looks better than for the box spline. The pictures for the box spline show, that only discontinuities on lines which are diagonal to the axes are detected. The reason for this is that the function is not smooth here in the sense of C 2;2 (T 2 ). Furthermore, for the Boolean sum approach we have other localization properties, namely for the detection of singularities of derivatives in one direction we have good localization in this variable and bad localization in the other variable. On the other hand, for the detection of singularities in mixed derivatives the localization is equal in both directions. K. BITTNER Fig. 6.1. Density plot of absolute values of the wavelet part for different decompositions. The numbers in the brackets show the plot range (minimum=white; maximum=black). PERIODIC SPLINE WAVELETS ON SPARSE GRIDS 19 Table Number of wavelet coefficients which are greater than " for different decompositions. tens. prod. level 8 Bool. sum level 14 Bool. sum level tens. prod. level 8 Bool. sum level 14 Bool. sum level " total % total % total % total % total % total % In Table 6.1, we see the number of wavelet coefficients with an absolute value greater than some threshold ". Obviously, for the tensor product spline N 4\Omega N 4 the Boolean sum method is more efficient than the tensor product algorithms. For the box spline, the results of the Boolean sum method are similar as in the tensor product case. 100. CPU-Time in s Fig. 6.2. CPU-time (on a Sun SPARCstation 20) of tensor product algorithm (dashed line) and Boolean sum algorithm (continuous line) for These examples show that the concept of Boolean sum seems to be more suitable for function spaces of the type C r;r (T 2 ) whereas the tensor product methods appear K. BITTNER to be better for the spaces of the type C r (T 2 ). Therefore, a possible application for wavelets on sparse grids could be seen in the numerical treatment of PDE's, where the solution is contained in C r;r (T 2 ) but not in C r+1 (T 2 ). For such applications, it should also be useful to investigate a Boolean sum approach for non-periodic wavelets on the square. Finally, we draw in Figure 6.2 a comparison of the time needed for tensor product and Boolean sum algorithms. It shows that the Boolean sum method is remarkably faster than tensor product algorithms with the same quality of results for suited functions. Acknowledgments . The author thanks the referees and the editor for their helpful comments and valuable suggestions to improve the manuscript. The research of K. Bittner was supported by the Deutsche Forschungsgemeinschaft. The author thanks J-urgen Prestin for suggesting the problem and the valuable comments. --R A discrete Fourier transform scheme for Boolean sums of trigonometric operators. An Introduction to Wavelets On compactly supported spline wavelets and a duality principle Boolean methods in interpolation and approximation Interpolation on uniform meshes by translates of one function and related attenuation factors The approximate computation of multiple integrals On the computation of periodic spline wavelets A unified approach to periodic wavelets Interpolatory and orthonormal trigonometric wavelets Multivariate periodic interpolating wavelets Periodic interpolation and wavelets on sparse grids in Notes on Numerical Fluid Mechanics --TR
sparse grids;multivariate periodic interpolation;wavelets;splines;boolean sums
312552
The Incomplete Factorization Multigraph Algorithm.
We present a new family of multigraph algorithms, ILU-MG, based upon an incomplete sparse matrix factorization using a particular ordering and allowing a limited amount of fill-in. While much of the motivation for multigraph comes from multigrid ideas, ILU-MG is distinctly different from algebraic multilevel methods. The graph of the sparse matrix A is recursively coarsened by eliminating vertices using a graph model similar to Gaussian elimination. Incomplete factorizations are obtained by allowing only the fill-in generated by the vertex parents associated with each vertex. Multigraph is numerically compared with algebraic multigrid on some examples arising from discretizations of partial differential equations on unstructured grids.
Introduction . In this paper, we present a new family of multigraph algo- rithms, ILU-MG, based upon an incomplete sparse matrix factorization using a carefully designed ordering and allowing a limited amount of fill-in. While in this paper we focus primarily on systems of linear equations arising from discretizations of partial differential equations, the method can be formally applied to general sparse matri- ces. For any particular problem or class of problems, it seems likely that specialized methods making use of the particular features of that problem will outperform any multigraph algorithm. However, the goal of the ILU-MG algorithm is to provide a general and robust iterative solver for many different systems of linear equations. While this goal may not yet be achieved in this first version, our hope and expectation is that the multigraph algorithm will eventually provide reasonably good rates of convergence for many classes of problems, while requiring only minimal input. Algebraic approaches to multilevel methods have enjoyed a long history, beginning with the algebraic multigrid (AMG) methods of Brandt, McCormick, and Ruge [13, 14] Ruge and St-uben [26] and the black box multigrid method of Dendy [15]. More recent work can be found in [1, 3, 4, 12, 20, 19, 17], as well as many contributions in [2]. Our work grew out of the grid coarsening schemes developed in [10, 11] and the corresponding hierarchical basis iterations, HBMG. While much of our motivation comes from these multigrid ideas, ILU-MG is fundamentally an incomplete sparse matrix factorization. The multigraph method resembles the approach of classical sparse Gaussian elimi- nation. The graph of the stiffness matrix A is recursively coarsened by first eliminating a node with all its adjacent edges and then adding only a partial set of fill-in edges corresponding to the vertex parents of that node. Thus, there is no concept of levels, and more important, no coarse grid on which the problem must be solved exactly. However, the generality of this approach leaves open the possibility of introducing both levels and coarse graphs. We plan to study these alternatives as possible ways to improve the convergence behavior of the basic method. See [9] for some preliminary results in this direction. The size of each subsequent graph is controlled by monitoring the amount of numerical fill-in produced. Since each node is eliminated Department of Mathematics, University of California at San Diego, La Jolla, CA 92093. The work of this author was supported by the National Science Foundation under contract DMS-9706090. y Bell Laboratories, Lucent Technologies, Murray Hill, NJ 07974. based upon graph considerations, no attempt is made to preserve the integrity of the grid. Indeed, this information is not even provided. The rest of this paper is organized as follows. In section 2, we provide a graph theoretic interpretation of the construction of hierarchical bases and its relation to sparse incomplete factorizations. The connection between multigrid and multigraph is described in terms of linear algebra in section 3. In section 4, the implementation of our method is discussed in some detail. In particular, the ordering strategy and the incomplete factorization procedure are described. Finally, in section 5, we compare multigraph with AMG on some examples arising from discretizations of partial differential equations on unstructured grids. 2. Graph theoretical aspects. In this section we discuss the relation between the construction of a hierarchical basis and sparse incomplete LU (ILU) factorization, within the context of graph theory. We first consider standard Gaussian elimination and classical ILU factorization from a graph theoretical point of view, and then develop a graph elimination model for hierarchical basis methods on sequences of nested meshes. These models can be interpreted as special ILU decompositions which generalize to the case of general graphs. We begin with a few standard definitions; the interested reader is referred to Rose [25] or George and Liu [18] for a more complete introduction. Corresponding to a sparse n \Theta n matrix A with symmetric sparsity pattern (i.e., A ij 6= 0 if and only if A ji 6= 0), let G(V; E) be the graph that consists of a set of n ordered vertices set of edges E such that the edge (connecting vertices v i and j. The edges in the graph G correspond to the nonzero off-diagonal entries of A. If A is the stiffness matrix for the space of continuous piecewise linear polynomials represented in the standard nodal basis, the graph G is just the underlying triangulation of the domain (with minor modifications due to Dirichlet boundary conditions). For vertex v i the set of adjacent vertices adj(v i ) is defined by The degree of a vertex deg(v i ) is just the size of the set adj(v i ). A clique C ' V is a set of vertices which are all pairwise connected; that is, v With a proper ordering of the vertices, a clique corresponds to a dense submatrix of A. In graph theoretic terms, a single step of Gaussian elimination transforms G(V; E) to a new graph G 0 1. Eliminate vertex v i and all its incident edges from G. Set g. Denote the resulting set of edges 2. Create a set F of fill-in edges as follows: for each distinct pair v in G, add the edge e jk to F if not already present in E 1 . Set Since the values of matrix entries are not involved, this model cannot take into account the occurrence of so-called accidental zeros. The graph elimination process is illustrated in Figure 1. Note that the set adj(v) in G becomes a clique in G 0 . Within this framework, the classical ILU factorization is one in which no fill-in edges are allowed, i.e., F j ;. This forces the matrix A 0 corresponding to the new graph G 0 to have the same sparsity structure as the corresponding submatrix of A. The graph G 0 would then correspond to the center picture in Figure 1. The concept of vertex parents is first introduced to allow HBMG to be interpreted as a generalized ILU procedure. We will begin with the case of two nested meshes where the fine mesh is a uniform refinement of a coarse mesh, generated by pairwise \Phi \Phi \Phi \Phi \Phi \Phi\Omega \Omega \Omega \Omega \Omega \Omega \Omega \Omega \Phi \Phi \Phi Fig. 1. A fine grid vertex v is eliminated by classical Gaussian elimination. The original mesh is shown on the left. We remove v and its incident edges (middle), and add fill-in edges (right). connecting the midpoints of the coarse grid edges in the usual way [7, 27, 21]. Here we can make the direct sum decomposition c is the set of coarse grid vertices and V f is the set of fine grid vertices (those not in V c ). For each vertex there is a unique pair of vertex parents v c such that v i is the midpoint of the edge connecting v j and v k (v We now view HBMG as an ILU algorithm in which only selected fill-in edges are allowed. In this algorithm, the vertices in the set V f are sequentially eliminated as follows: 1. Eliminate vertex its incident edges from G. Set g. Denote the resulting set of edges 2. Let v the parents of v i . Create a set F of fill-in edges of the form e already present in E 1 . Set In other words, the classical HBMG algorithm adds the subset of fill-in edges from Gaussian elimination in which one of the vertices is a vertex parent. An even more simple possibility is to use just one vertex parent as an elimination strategy. Although this does not correspond to the classical case of HBMG, it has been studied in a different context as a partitioning scheme for general graphs [23, 24]. The elimination algorithm is similar to the case of two parents: 1. Eliminate vertex its incident edges from G. Set g. Denote the resulting set of edges 2. Let v j 2 adj(v i ) denote the parent of v i . Create a set F of fill-in edges of the form e already present in E 1 . Set However, in this case generally fewer fill-in edges are added. When the initial graph G is a finite element triangulation (or a tetrahedral mesh in three space dimensions), the graph G 0 remains a finite element triangulation. This property can be maintained at all steps of the elimination process through a careful selection of parents. Both one and two vertex parent eliminations are illustrated in Figure 2. Another straightforward extension allows for the possibility of more than two vertex parents, either a fixed or variable number. The limiting case, allowing all vertices in adj(v) to be parents of v, will result in classical Gaussian elimination. These extensions can be interpreted, in the multigrid framework, as various multipoint interpolation schemes. In this work, we consider only the one- and two-vertex parent cases. Let the triangulation T f be the graph for the original stiffness matrix A represented in the standard nodal basis. For either one or two parents, after all the \Phi\Omega \Omega \Omega \Omega \Omega \Omega \Omega \Omega \Phi \Phi \Phi \Phi \Phi \Phi\Omega \Omega \Omega \Omega Fig. 2. A fine grid vertex v is eliminated by HBMG ILU elimination. The original mesh is shown on the left. The fill-in pattern using two parents (v 1 and v 2 ) is shown in the middle, while the fill-in pattern using the single parent v 1 is shown on the right. vertices in V f are eliminated, the resulting graph is just the coarse grid triangulation T c . However, the numerical values of the matrix elements are generally different for the two cases. For the special case of a sequence of uniformly refined meshes, the total number of edges in the filled in graph can be estimated. This will serve as a guide to the amount of memory necessary to store the incomplete LU factorization using typical sparse matrix storage schemes, e.g., [16, 18, 8]. The elimination process is illustrated for the case of two parents in Figure 3. A A A A A A A A A A A A A A A A A A A A A A A Fig. 3. HBMG=ILU in the classical case, using two parents. The fine grid vertices are eliminated in the order v 1 , v 2 , v 3 . A total of two fill-in edges are added in the interior of the coarse grid triangle during the elimination. The original graph has approximately 3n edges and 2n triangles. Each quartet of four triangles generates two fill-in edges which are not part of the coarse grid triangulation. Thus the total number of edges not in the coarse grid is approximately 4n. If we repeat recursively for the coarser grids, the geometric sum 4n ae oe 16nis generated. Thus there are approximately 16n=3 edges in the filled in graph. In the case of classical HBMG, the method is implemented as a block iteration, with the fill-in in the off-diagonal blocks not explicitly stored. The number of edges actually stored in the sparse data structure is approximately shown in [7]. In our present study, we consider only point iterations with explicit storage of all edges. The elimination process for the case of one parent is shown in Figure 4. The main difference in the case of one parent is that now only one fill-in edge is associated with each quartet of triangles on the fine grid. Thus we have a total of approximately edges not in the coarse grid and expect approximately 7nae oe A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A Fig. 4. HBMG ILU using one parent. The fine grid vertices are eliminated in the order v 1 v 3 . There are eight generic scenarios for the process, but all result in one fill-in edge in the interior of the coarse grid triangle. total edges, somewhat less than the case of two parents. This is also less than the bound of 6n obtained for general matching strategies on two-dimensional triangulations [23]. In fact, matching strategies when applied to general graphs produce fill-in bounded by O(jE is the number of edges in the original graph. We know of no similar bound for the case of two parents, and have empirically observed very rapid growth in fill-in for some matching strategies which made little effort to control the number of fill-in edges. The multigraph algorithm generalizes the concept of vertex parents to arbitrary graphs. The main problem is to determine reasonable vertex parents for each vertex to be eliminated. Once this is done, the elimination/unrefinement/coarsening is performed on the graph exactly as in the case of nested meshes. 3. The multigraph algorithm. The salient features of the multigraph algorithm and its connection to HBMG can be illustrated by considering the following simple example. Let A be an n \Theta n sparse matrix arising from the discretization of a partial differential equation, assembled using the standard nodal basis. We partition A as (1) where d 6= 0 is the diagonal matrix element for vertex v 1 , r and c are vectors of order is an (n \Gamma 1) \Theta (n \Gamma 1) matrix. The hierarchical basis multigrid method is based on a change of basis, from the nodal basis to a hierarchical basis. In the present context, the first step of this process involves forming the matrix I I (2) The vectors ' and u are sparse with nonzeros determined by the vertex parents of vertex For classical HBMG, v 1 is a vertex associated with the refinement of an edge with endpoints g. In this case, is the usual unit vector (jth column of the identity matrix I Here the restriction and interpolation operators are chosen geometrically, reflecting the fact that One possible generalization is to choose the vectors ' and u based on an incomplete factorization of the matrix A. In particular, let v i and v j be the parents of vertex v 1 and The scalars ' are simply the multipliers of an incomplete LU factoriza- tion. Note that the above equations are well defined, independent of the geometry of the mesh, and they do not require that v 1 results from the refinement of an edge e ij . In a similar manner, for the case of one vertex parent we have The sparsity patterns of the vectors c and c + d' are the same, since the nonzeros in ' are a subset of the nonzeros in c. 1 However, the sparsity patterns of B and generally are not the same. The matrix 'du t typically creates some fill-in in the rows and columns corresponding to the vertex parents. These are precisely the fill-in edges illustrated in Figure 2. Also note that From this identity, we can see that this elimination step can also be viewed as forming a rank one perturbation of the exact Schur complement In its standard formulation, the next step of this hierarchical decomposition is a transformation of the same form applied to the reduced matrix B cu t (not L 1 AU 1 ). The actual change to the hierarchical basis is defined implicitly through this recursion. The final hierarchical bases stiffness matrix A 0 is far less sparse, but generally better conditioned than A, so that standard iterative methods can be effectively applied to linear systems involving A 0 . In the case of classical HBMG, the iterative method is just a standard block symmetric Gauss-Seidel iteration, with the blocks defined in terms of refinement levels in the mesh. See [6, 7] for details. The multigraph method, ILU-MG, replaces this Gauss-Seidel iteration with an incomplete factorization. In particular we set where L is unit lower triangular, D is diagonal, U is unit upper triangular, and E is the so-called error matrix. The sparsity pattern of L+D+U is defined in terms of the elimination algorithm described in section 2. This is precisely the sparsity pattern recursively generated by the hierarchical transformations defined above. By using a standard ILU factorization, we avoid the recursion of HBMG. At the same time, we hope that by allowing this additional fill-in, ILU-MG will inherit the desirable properties of HBMG as a preconditioner. 1 Here we are speaking in generic terms and in particular are not taking into account the possible occurrence of so-called accidental zeros. 4. Implementation. Our multigraph algorithm is divided into four distinct phases, analogous to classical sparse Gaussian elimination algorithms. 1. Ordering: A permutation matrix P is computed to reorder the matrix, PAP t . In addition, vertex parents for each eliminated vertex are defined and determine the fill-in pattern for the second phase. 2. Symbolic factorization: The (incomplete) fill-in is computed using the graph of PAP t and the vertex parents. The output is a static data structure for the incompletely factored sparse matrix. 3. Numerical factorization: The numerical values of the L, D, and U factors are computed using a MILU factorization. 4. Solution: The solution of computed using a conjugate or biconjugate gradient algorithm, preconditioned by the incomplete factorization. This section is divided into two parts. First, we describe the ordering strategy used to compute P and the vertex parents for each vertex. Next, our MILU factorization is discussed. We do not believe that our present algorithms for these two phases are optimal in any sense. However, they are the best ones we have found so far and their performance seems to justify further work in this area. 4.1. Ordering. In the case of classical sparse Gaussian elimination, ordering consists of finding a permutation matrix P such that the reordered matrix PAP t has some desired property in terms of the ensuing factorization. Normally, the permutation matrix P is constructed based solely on the graph of the matrix (e.g., a minimum degree ordering [16, 25, 18]) and not on the values of the matrix elements. In the multigraph algorithm, both the graph and the numerical values of the matrix A are used to construct both the ordering and the vertex parents. To simplify notation, we will describe only how the first vertex is ordered and its parents are selected. The remaining vertices are ordered by the same algorithm applied inductively. Let For fl is given by ae is the number of fill-in edges which must be added if v j 2 adj(v i ) is chosen as the only vertex parent of v i . For the case of one vertex parent, the quality function defined by The tentative vertex parent is the vertex are broken arbitrarily. The quality function q 1 (v i ) represents a compromise between choosing a parent v j which is as strongly connected to v i as possible (measured in terms of the size of the off-diagonal matrix elements), and choosing v j to cause as little fill-in as possible in terms of the factorization. The size of the parameter fl can be used to indirectly control the number of fill-in edges resulting from the ordering. Smaller values for fl result in less fill-in. Experimentally, we determined to be a good choice. The quality function q 2 (v i ) for the case of two vertex parents is developed in a similar fashion. Suppose that v j). Then the qualities s ijk are given by s ijk ae Let g ijk denote the number of fill-in edges required if fv are chosen as parents; then s ijk and set Our two parent algorithm actually offers the possibility to each vertex of having zero, one, or two parents. The choice of parents is based on maximizing the function q 2 (v i ). As in the single parent case, the quality function q 2 (v i ) seeks a compromise between choosing strongly connected parents, and choosing parents which allow low fill-in; experimentally, we determined for the two parent algorithm. We now describe our algorithm for ordering vertices and computing vertex par- ents. We begin by computing the quality q p (v i ) for each vertex in the mesh, using (5) for the case parent algorithm) or (7) for the case parent algorithm). Along with the quality function, tentative parents are assigned to each vertex. In cases where no parents can be assigned, q p (v The vertices are then placed in a heap with the vertex of highest quality at the root. This vertex, say v i , is ordered first, and its tentative parents become its actual parents. We then update the graph and compute the reduced matrix. The quality function and heap position for vertices are updated, as vertices in this set are the only ones potentially affected by the elimination of v i . This process continues inductively until all the vertices are ordered (the usual case), or all remaining vertices have q p (v k (in which case an arbitrary order is assigned to the remaining vertices). We summarize this algorithm below: 1. Initialize by computing q p (v i ) and tentative parents for all vertices in a heap according to q p (v i ). 2. While the heap is not empty and the root vertex has q p (v below. i. Order the vertex v i at the root of the heap; update the heap. The tentative parents of v i become the actual parents. ii. Eliminate v i from the current graph; add fill-in edges as required. Update the partially factored matrix using the MILU decomposition. iii. For update the position of v j in the heap. We note that step ii above essentially requires an incomplete factorization of the matrix A to occur concurrently with the ordering, since the quality function q p is updated based on the current state of the factorization. This makes the ordering algorithm rather expensive, often as expensive as or even more expensive than the actual solution. This is partly because this factorization must use a dynamic data structure, rather than the static sparse matrix data structures which we employ else- where. On the other hand, as in general sparse matrix calculations, in many cases ordering can be done once and then used for several factorizations and solutions. There are several interesting variations of our ordering algorithm which merit some discussion. Both are related to step iii above and provide a means of partitioning the matrix in order to formulate block iterative methods. First, in step iii, we can (artificially) set q p (v parent of v i . This forces v j (and all other vertices chosen as actual parents) to reside near the bottom of the heap. When the heap contains only vertices with q the remaining vertices are called coarse graph vertices and those eliminated are fine graph vertices. This effectively provides a two level blocking in a fashion quite analogous to the classical two level HBMG algorithm. If we (correctly) reinitialize q p (v i ) and compute tentative parents for all vertices remaining in the heap, and then restart the elimination process, we are led to a natural multilevel blocking, which could form the basis of a block incomplete factorization algorithm. Second, in step iii we can artificially set q p (v the fine graph (eliminated) vertices will form an independent set, in that the diagonal block of both the original and factored matrices corresponding to this set of vertices will be diagonal. Reinitializing and restarting the elimination process as above would result in some multicolor-like ordering, which might have some interesting applications for vector or parallel processing. For either of these alternatives, using an enhanced quality function that includes additional information about the blocking strategy (e.g., bias q p to favor producing the largest number of vertices in the fine graph set within the other constraints) seems appropriate. 4.2. Numerical factorization. Our implementation of the MILU factorization is defined as follows. Let and set actually compute an incomplete factorization of the matrix Making such an a priori shift is one simple way to ensure the existence and stability of our factorization. To describe the first step of our factorization procedure, let c=d I I The sparsity pattern of matrix \Gammacr t =d generally will not coincide with the sparsity pattern we choose to allow. Thus we set \Gammacr t =d has the required sparsity pattern and E 1 is the error matrix for the first step. If we (inductively) continue the factorization as B E, we have c=d I I U Then we have The matrix \Gammacr t =d is decomposed as S 1 +E 1 by a procedure similar to classical MILU [22]. Suppose that p ? q and the element c p r q =d is not allowed in the fill-in pattern. Consider the matrix F pq which is zero except for the four elements F pq We then set where the sum is taken over all (p; q) pairs falling outside the allowed fill-in pat- tern. This is a typical MILU approach, although the averaging of diagonal entries appearing in F pq for the nonsymmetric case is a bit unusual. 5. Numerical results. In this section we present a few numerical results for a first version of our multigraph algorithm. We compare both the one parent and two parent versions of multigraph with the well-known algebraic multigrid code AMG of Ruge, St-uben, and Hempel. A suite of six text problems were constructed using the PLTMG package, version 7.8 [5]. For each problem, three nonuniform adaptive grids with were generated. For each test case, both the sparse matrix and the right hand side were saved in a file to serve as input for the iterative solvers. 2 The specific definition of each test problem is described below. Problem Superior. This problem is a simple Poisson equation with homogeneous Dirichlet boundary conditions on a domain in the shape of Lake Superior. This is the classical problem on a fairly complicated domain. The solution, shown in Figure 5, is generally very smooth but has some boundary singularities. Problem Hole. This problem features discontinuous, anisotropic coefficients. The domain consists of three subregions. On the inner region, the problem is . In the middle region, the equation is and in the outer region, the equation is Homogeneous Dirichlet boundary conditions are imposed on the inner (hole) bound- ary, homogeneous Neumann conditions on the outer boundary, and the natural continuity conditions on the internal interfaces. While the solution, shown in Figure 5, is also relatively smooth, singularities exist at the internal interfaces. These files are available upon request. Problem Texas. This is an indefinite Helmholtz equation posed in a region shaped like the state of Texas. Homogeneous Dirichlet boundary conditions are imposed. The length scales of this domain are roughly 16 \Theta 16, so this problem is fairly indefinite, as illustrated in Figure 6. Problem UCSD. This is a simple constant coefficient convection-diffusion equation \Gammar posed on a domain in the shape of the UCSD logo. Homogeneous Dirichlet boundary conditions are imposed. As seen in Figure 6, boundary layers are formed at the bottom of the region and the top of the obstacles. Problems Jcn 0 and Jcn 180. The next two problems are solutions of the current continuity equation taken from semiconductor device modeling. This equation is a convection-diffusion equation of the form \Gammar The domain has seven subregions; in the upper left and large lower region. In the narrow curved band, and is directed radially. Dirichlet boundary conditions are imposed along the bottom boundary and along a short segment on the upper left boundary, respectively. Homogeneous Neumann boundary conditions are specified elsewhere. The solutions, see Figure 7, vary exponentially across the domain which is typical of semiconductor problems. In the first problem, Jcn 0, the convective term is chosen so the device is forward biased. In this case, a sharp internal layer develops along the top interface boundary. In the second problem, Jcn 180, the sign of the convective term is reversed, resulting in two sharp internal layers along both interface boundaries. All problems were run on a SGI R10000 Octane with 256 Mb of memory and compiled with the Fortran f77 -O -64 options. Each run consisted of two phases. The setup phase consisted of performing several initialization steps. For multigraph al- gorithms, this included ordering, symbolic factorization, and numerical factorization. Of these three steps, the sparse ordering is by far the most dominant. The initialization step for AMG consisted of determining the multigrid levels and constructing the interpolation operators as well as the coarse grid matrices. In the second phase, each problem was solved to a relative accuracy in the residual of 10 \Gamma6 starting from an initial guess of zero. The results of this comparison are shown in Table 1 and Table 2. Since there was little variation in the timings for the setup phase, these times (in seconds) are averaged over all problems with the same grid size. Table Average setup time vs. problem size. N AMG One parent Two parents Fig. 5. Lake Superior and Hole problems. Fig. 6. Indefinite and boundary layer problems. Fig. 7. Semiconductor convection-diffusion problems. In Table 2, we present the number of AMG cycles and multigraph solves. The multigraph algorithm is used as a preconditioner for the composite step conjugate gradient (CSCG) procedure for symmetric problems of the composite step biconjugate gradient (CSBCG) procedure for nonsymmetric problems. We count solves rather than iterations, since composite steps cost about twice as much as single steps. Also, solves for nonsymmetric problems are twice as expensive as for symmetric problems, since both A and A t must be preconditioned. The digits columns refer to where r k is the residual at the kth iteration (cycle). To compare these methods, we have chosen the CPU time, measured in seconds, to solve each problem. Table Performance comparison. AMG One parent Two parents Cycles Digits Time Solves Digits Time Solves Digits Time Superior Hole 26 6.3 7.29 Texas UCSD Jcn The timings for the one parent and the two parent versions exhibit a greater than linear growth as a function of problem size. For conventional test problems on uniform 5-point grids, we observe an O(N log N) dependence, which is significantly better than most other ILU methods. In contrast, AMG is observed to be O(N) for this class of problems. However, for all the problems we considered in this study, our algorithm is competitive with AMG. Acknowledgments . The authors wish to thank Steve McCormick for helpful comments and John Ruge for his invaluable assistance in running the AMG code. --R The algebraic multilevel iteration methods - theory and applications Algebraic multilevel preconditioning methods I A class of hybrid algebraic multilevel preconditioning methods PLTMG: A Software Package for Solving Elliptic Partial Differential Equations The hierarchical basis multigrid method General sparse elimination requires no permanent integer storage The hierarchical basis multigrid method and incomplete LU decomposi- tion Towards algebraic multigrid for elliptic problems of second order Black box multigrid Algorithms and data structures for sparse symmetric Gaussian elimination Algebraic analysis of the hierarchical basis preconditioner Computer Solution of Large Sparse Positive Definite Systems Interpolation and related coarsening techniques for the algebraic multigrid method An algebraic hierarchical basis preconditioner Incomplete Decompositions - Theory Analysis of multilevel graph partitioning A graph theoretic study of the numeric solution of sparse positive definite systems On the multi-level splitting of finite element spaces --TR --CTR P. K. Jimack, Domain decomposition preconditioning for parallel PDE software, Engineering computational technology, Civil-Comp press, Edinburgh, UK, 2002 Michele Benzi, Preconditioning techniques for large linear systems: a survey, Journal of Computational Physics, v.182 n.2, p.418-477, November 2002 Randolph E. Bank, Compatible coarsening in the multigraph algorithm, Advances in Engineering Software, v.38 n.5, p.287-294, May, 2007
algebraic multigrid;incomplete LU factorization;hierarchical basis
312991
The Discrete Cosine Transform.
Each discrete cosine transform (DCT) uses $N$ real basis vectors whose components are cosines. In the DCT-4, for example, the $j$th component of $\boldv_k$ is $\cos (j These basis vectors are orthogonal and the transform is extremely useful in image processing. If the vector $\boldx$ gives the intensities along a row of pixels, its cosine series $\sum c_k \boldv_k$ has the coefficients $c_k=(\boldx,\boldv_k)/N$. They are quickly computed from a Fast Fourier Transform. But a direct proof of orthogonality, by calculating inner products, does not reveal how natural these cosine vectors are. We prove orthogonality in a different way. Each DCT basis contains the eigenvectors of a symmetric "second difference" matrix. By varying the boundary conditions we get the established transforms DCT-1 through DCT-4. Other combinations lead to four additional cosine transforms. The type of boundary condition (Dirichlet or Neumann, centered at a meshpoint or a midpoint) determines the applications that are appropriate for each transform. The centering also determines the period: $N-1$ or $N$ in the established transforms, $N-\frac{1}{2}$ or $N+ \frac{1}{2}$ in the other four. The key point is that all these "eigenvectors of cosines" come from simple and familiar matrices.
Introduction Just as the Fourier series is the starting point in transforming and analyzing periodic func- tions, the basic step for vectors is the Discrete Fourier Transform (DFT). It maps the "time domain" to the "frequency domain." A vector with N components is written as a combination of N special basis vectors v k . Those are constructed from powers of the complex number The vectors v k are the columns of the Fourier matrix Those columns are orthog- onal. So the inverse of F is its conjugate transpose, divided by k v k . The discrete Fourier series Fc. The inverse for the (complex) Fourier coefficients. Two points to mention, about orthogonality and speed, before we come to the purpose of this note. For these DFT basis vectors, a direct proof of orthogonality is very efficient: The numerator is zero because w 1. The denominator is nonzero because k 6= '. This proof of (v is short but not very revealing. I want to recommend a different proof, which recognizes the v k as eigenvectors. We could work with any circulant matrix, and we will choose below a symmetric A 0 . Then linear algebra guarantees that its eigenvectors v k are orthogonal. Actually this second proof, verifying that A 0 v brings out a central point of Fourier analysis. The Fourier basis diagonalizes every periodic constant coefficient operator. Each frequency k (or 2-k=N) has its own frequency response - k . The complex exponential vectors v k are important in applied mathematics because they are eigenvectors! The second key point is speed of calculation. The matrices F and F \Gamma1 are full, which normally means N 2 multiplications for the transform and the inverse transform: and y. But the special form F of the Fourier matrix allows a factorization into very sparse and simple matrices. This is the Fast Fourier Transform (FFT). It is easiest when N is a power 2 L . The operation count drops from N 2 to 1 2 NL, which is an enormous saving. But the matrix entries (powers of w) are complex. The purpose of this note is to consider real transforms that involve cosines. Each matrix of cosines yields a Discrete Cosine Transform (DCT). There are four established types, DCT- through DCT-4, which differ in the boundary conditions at the ends of the interval. (This difference is crucial. The DCT-2 and DCT-4 are constantly applied in image processing; they have an FFT implementation and they are truly useful.) All four types of DCT are orthogonal transforms. The usual proof is a direct calculation of inner products of the N basis vectors, using trigonometric identities. We want to prove this orthogonality in the second (indirect) way. The basis vectors of cosines are actually eigenvectors of symmetric second-difference matrices. This proof seems more attractive, and ultimately more useful. It also leads us, by selecting different boundary conditions, to four less familiar cosine transforms. The complete set of eight DCT's was found in 1985 by Wang [10], and we want to derive them in a simple way. We begin now with the DFT. 1. The Periodic Case and the DFT The Fourier transform works perfectly for periodic boundary conditions (and constant coef- ficients). For a second difference matrix, the constant diagonals contain \Gamma1 and 2 and \Gamma1. The diagonals with \Gamma1 loop around to the upper right and lower left corners, by periodicity, to produce a circulant matrix: For this matrix A 0 , and every matrix throughout the paper, we look at three things: 1. The interior rows 2. The boundary rows (rows 0 and 3. The eigenvectors The interior rows will be the same in every matrix! The jth entry of A 0 u is \Gammau which corresponds to \Gammau 00 . This choice of sign makes each matrix positive definite (or at least semidefinite). No eigenvalues are negative. At the first and last rows (j = 0 and difference involves u and uN . It reaches beyond the boundary. Then the periodicity produces the \Gamma1 entries that appear in the corners of A 0 . Note: The numbering throughout this paper goes from 0 to N \Gamma 1, since SIAM is glad to be on very friendly terms with the IEEE. But we still use i for p \Gamma1! No problem anyway, since the DCT is real. We now verify that v is an eigenvector of A 0 . It is periodic because w 1. The jth component of A 0 v is the second difference \Gammaw (j \Gamma1)k A 0 is symmetric and those eigenvalues - are real. The smallest is - corresponding to the eigenvector v In applications it is very useful to have this flat DC vector (direct current in circuit theory, constant gray level in image processing) as one of the basis vectors. Since A 0 is a real symmetric matrix, its orthogonal eigenvectors can also be chosen real. In fact the real and imaginary parts of the v k must be eigenvectors: sin 2k- sin 4k- ':The equal pair of eigenvalues - gives the two eigenvectors c k and s k . The exceptions are 1), and for even N also - Those two eigenvectors have length N , while the other c k and N=2. It is these exceptions that make the real DFT (sines together with cosines) less attractive than the complex form. That factor 2 is familiar from ordinary Fourier series. It will appear in the for the DCT-1 and DCT-2, always with the flat basis vector We expect the cosines alone, without sines, to be complete over a half-period. In Fourier series this changes the interval from [\Gamma-] to [0; -]. Periodicity is gone because cos 0 6= cos -. The differential equation is still \Gammau -u. The boundary condition that produces cosines is u there are two possibilities, Neumann and Dirichlet, at the other Zero slope: u eigenfunctions u k Zero value: eigenfunctions u k The two sets of cosines are orthogonal bases for L 2 [0; -]. The eigenvalues from \Gammau 00 are All our attention now goes to the discrete case. The key point is that every boundary condition has two fundamental approximations. At each boundary, the condition on u can be imposed at a meshpoint or at a midpoint. So each problem has four basic discrete approximations. (More than four, if we open up to further refinements in the boundary conditions - but four are basic.) Often the best choices use the same centering at the two ends - both meshpoint centered or both midpoint centered. In our problem, u at one end and u at the other end yield eight possibilities. Those eight combinations produce eight cosine transforms. Starting from there are also eight sine transforms. Our purpose is to organize this approach to the DCT (and DST), by describing the second difference matrices and identifying their eigenvectors. Each of the eight (or sixteen) matrices has the tridiagonal form \Omega \Omega The boundary conditions decide the eigenvectors, with four possibilities at each end: Dirichlet or Neumann, centered at a meshpoint or a midpoint. The reader may object that symmetry requires off-diagonal \Gamma1's in the first and last rows. The meshpoint Neumann condition produces \Gamma2. So we admit that the eigenvectors in that case need a rescaling at the end (only involving 2) to be orthogonal. The result is a beautifully simple set of basis vectors. We will describe their applications in signal processing. 2. The Discrete Cosine Transform The discrete problem is so natural, and almost inevitable, that it is really astonishing that the DCT was not discovered until 1974 [1]. Perhaps this time delay illustrates an underlying principle. Each continuous problem (differential equation) has many discrete approximations (difference equations). The discrete case has a new level of variety and complexity, often appearing in the boundary conditions. In fact the original paper by Ahmed, Natarajan, and Rao derived the DCT-2 basis as approximations to the eigenvectors of an important matrix, with entries ae jj \Gammakj . This is the covariance matrix for a useful class of signals. The number ae (near 1) measures the correlation between nearest neighbors. The true eigenvectors would give an optimal "Karhunen-Lo'eve basis" for compressing those signals. The simpler DCT vectors are close to optimal (and independent of ae). The four standard types of DCT are now studied directly from their basis vectors (recall that j and k go from 0 to N \Gamma 1). The jth component of the kth basis vector is when j or k is 0 or DCT-2: cos (divide by (divide by DCT-4: cos Those are the orthogonal columns of the four DCT matrices C 1 , C 2 , C 3 , C 4 . The matrix C 3 with top row 1 is the transpose of C 2 . All columns of C 2 , C 3 , C 4 have length N=2. The immediate goal is to prove orthogonality. Proof ! These four bases (including the rescaling by are eigenvectors of symmetric second difference matrices. Thus each basis is orthogonal. We start with matrices A 1 , A 2 , A 3 , A 4 in the form (1), whose eigenvectors are pure (unscaled) cosines. Then symmetrizing these matrices introduces the 2 scaling; the eigenvectors become orthogonal. Three of the matrices were studied in an unpublished manuscript [12] by David Zachmann, who wrote down the explicit eigenvectors. His paper is very useful. He noted earlier references for the eigenvalues; a complete history would be virtually impossible. We have seen that A 0 , the periodic matrix with \Gamma1, 2, \Gamma1 in every row, shares the same cosine and sine eigenvectors as the second derivative. The cosines are picked out by a zero-slope boundary condition in the first row. 3. Boundary Conditions at Meshpoints and Midpoints There are two natural choices for the discrete analogue of u Symmetry around the meshpoint Symmetry around the midpoint The first is called whole-sample symmetry in signal processing, the second is half -sample. Symmetry around 0 extends evenly across the left boundary to extends the signal to Those are the simplest reflections of a discrete vector. We substitute the two options for in the second difference \Gammau 1 that straddles the boundary: Symmetry at meshpoint: u Symmetry at midpoint: u Those are the two possible top rows for the matrix A: At the other boundary there are the same choices in replacing u Substituting in the second difference \Gammau N \Gamma2 gives the two forms for the Neumann condition in the last row of A: meshpoint: \Theta \Theta = \Gamma2 2 and midpoint: \Theta The alternative at the right boundary is the Dirichlet condition The meshpoint condition removes the last term of \Gammau N \Gamma2 . The midpoint condition simple too, but the resulting matrix will be a little surprising. The 2 turns into 3: meshpoint: \Theta Now we have 2 \Theta combinations. Four of them give the standard basis functions of cosines, listed above. Those are the DCT-1 to DCT-4, and they come when the centering is the same at the two boundaries: both meshpoint centered or both midpoint centered. Zachmann [12] makes the important observation that all those boundary conditions give second-order accuracy around their center points. Finite differences are one-sided and less accurate only with respect to the wrong center! We can quickly write down the matrices A 1 to A 4 that have these cosines as eigenvectors. 4. The Standard Cosine Transforms Notice especially that the denominator in the cosines (which is agrees with the distance between "centers." This distance is an integer, measuring from meshpoint to meshpoint or from midpoint to midpoint. We also give the diagonal matrix D that makes and makes the eigenvectors orthogonal: Centers Components cos jk - diag \Gammap Centers Centers Components cos j Centers Recently Sanchez et al [7] provided parametric forms for all matrices that have the DCT bases as their eigenvectors. These are generally full matrices of the form "Toeplitz plus near-Hankel." Particular tridiagonal matrices (not centered differences) were noticed by Kitajima, Rao, Hou, and Jain. We hope that the pattern of second differences with different centerings will bring all eight matrices into a common structure. Perhaps each matrix deserves a quick comment. DCT-1: The similarity transformation D \Gamma1 yields a symmetric matrix. This multiplies the eigenvector matrix for A 1 by D \Gamma1 1 . (Notice that leads to (D x.) The eigenvectors become orthogonal for both odd N and even 1 divides the first and last components by 2: pj ip pj ip pj The first and last eigenvectors have length the others have length DCT-2: These basis vectors cos are the most popular of all, because gives the flat vector first and last components are not exceptional. The boundary condition is a zero derivative centered on a midpoint. Similarly the right end has those outside values are eliminated, the boundary rows of A 2 have the neat 1 and \Gamma1. c 6 Att. >= 310.6215 dB Mirr Att. >= 320.1639 dB Stopband Att. >= 9.9559 dB Cod. Normalized Frequency Magnitude Response Figure 1: The eight DCT-2 vectors and their Fourier transforms (absolute values). I believe that this DCT-2 (often just called the DCT) should be in applied mathematics courses along with the DFT. Figure 1 shows the eight basis vectors (when the right are the Fourier transforms of those vectors. Maybe you can see the first curve especially its second lobe, rising to 13 decibels (which is the top. This is not a big dropoff! Like the closely connected Gibbs phenomenon, it does not improve as N increases. A good lowpass filter can drop by 40 or 50 db. The other seven transforms vanish at zero frequency (no leakage of the direct current DC term). Those seven vectors are orthogonal to (1; This basis was chosen for the JPEG algorithm in image compression. Each 8 \Theta 8 block in the image is transformed by a two-dimensional DCT. We comment below on the undesirable blocking artifacts that appear when the transform coefficients are compressed. DCT-3: The vectors cos j are the discrete analogues of cos(k+ 1 )x. The Neumann condition at the left and Dirichlet condition at the right are centered at meshpoints. For orthogonality we need the 3 that divides the first components by 2. This basis loses to the DCT-4. DCT-4: We had never seen the final entry "3" in the matrix A 4 but MATLAB insisted it was right. Now we realize that a zero boundary condition at a midpoint gives uN - \Gammau N \Gamma1 (the extension is antisymmetric). Then \Gamma1, 2, \Gamma1 becomes \Gamma1, 3. The eigenvectors are even at the left end and odd at the right end. This attractive property leads to 2 and 2 and a symmetric eigenvector matrix C 4 . Its applications to "lapped transforms" are described below. Remember our proof of orthogonality! It is a verification that the cosine vectors are eigenvectors of A 1 , A 2 , A 3 , A 4 . For all the \Gamma1, 2, \Gamma1 rows this needs to be done only once (and it reveals the eigenvalues There is an irreducible minimum of trigonometry when the jth component of the kth vector c k is cos j' in Types 1 and 3, and Types 2 and 4: This is on all interior rows. The angle is for Type 2. It is for A 3 and A 4 . This leaves only the first and last components of k to be verified in each case. Let us do only the fourth case, for the last row \Gamma1, 3 of the symmetric matrix A 4 . A last row of \Gamma1, 1 would subtract the component from the Trigonometry gives those components as sin 1' sin 3' We subtract using sin a \Gamma sin . The difference is \Gamma2 cos sin 1' The last row of A 4 actually ends with 3, so we still have 2 times the last component to include with (2): sin2 This is just - k times the last component of c k . The final row of A 4 c There are also Discrete Sine Transforms DST-1 through DST-4. The entries of the basis vectors s k are sines instead of cosines. These s k are orthogonal because they are eigenvectors of symmetric second difference matrices, with a Dirichlet (instead of Neumann) condition at the left boundary. In writing about the applications to signal processing [9], we presented a third proof of orthogonality-which simultaneously covers the DCT and the DST, and shows their fast connection to the DFT matrix of order 2N . This is achieved by a neat matrix factorization given by Wickerhauser [11]: e \Gamma-i=4N R T F 2N The entries of S 4 are sin(j . The connection matrix R is very sparse, with R =p- with R T and F 2N and R have orthogonal columns, so do C 4 and S 4 . 5. Cosine Transforms with 2 and N + 1There are four more combinations of the discrete boundary conditions. Every combination that produces a symmetric matrix will also produce (from the eigenvectors of that matrix) an orthogonal transform. But you will see 1in the denominators of the cosines, because the distance between centers is no longer an integer. One center is a midpoint and the other is a meshpoint. The transforms DCT-5 to DCT-8, when they are spoken of at all, are called "odd." They are denoted by DCT-IO to DCT-IV O in [5] and [7]. Three of the tridiagonal matrices are quite familiar: Centers Centers Components cos A 6 =6 6 6 6 4 Centers Centers Components cos We could study A 8 by reflection across the left boundary, to produce the pure Toeplitz \Gamma1, 2, (which is my favorite example in teaching). The eigenvectors become discrete sines on a double interval-almost. The length of the double interval is not 2N , because the matrix from reflection has odd order. This leads to the new "period length" 2 in the cosines. Notice that A 5 has the boundary conditions (and eigenvector components) in reverse order from A 6 . The first eigenvectors of A 5 and A 6 are (1; corresponding to This "flat vector" can represent a solid color or a fixed intensity by itself (this is terrific compression). The DCT-5 and DCT-6 have a coding gain that is completely comparable to the DCT-2. So we think through the factors that come from D 2). The symmetrized 2 in the two lower right entries, where A 6 has \Gamma1 and \Gamma2. The last components of the eigenvectors are divided by 2; they are orthogonal but less beau- tiful. We implement the DCT-6 by keeping the matrix C 6 with pure cosine entries, and accounting for the correction factors by diagonal matrices:2N diag 6 diag The cosine vectors have squared length 2N \Gamma1 4 , except the all-ones vector that is adjusted by the first diagonal matrix. The last diagonal matrix corrects the Nth components as D 6 requires. The inverse of C 6 is not quite C T 6 (analysis is not quite the transpose of synthesis, as in an orthogonal transform) but the corrections have trivial cost. For the matrix identity (4) involves cos 1- 2 and cos 3 Malvar has added a further good suggestion: Orthogonalize the last vectors against the all-ones vector. Otherwise the DC component (which is usually largest) leaks into the other components. Thus we subtract from each c 6 (with k ? its projection onto the flat c 6 ~ c 6 The adjusted basis vectors are now the columns of e C 6 , and (5) becomes This replacement in equation (4) also has trivial cost, and that identity becomes e e The coefficients in the cosine series for x are 6 x. Then x is reconstructed from e (possibly after compressing y). You see how we search for a good basis. Transforms 5 to 8 are not used in signal processing. The half-integer periods are a disadvantage, but reflection offers a possible way out. The reflected vectors have an integer "double period" and they overlap. 6. Convolution The most important algebraic identity in signal processing is the convolution rule. A slightly awkward operation in the time domain (convolution, from a Toeplitz matrix or a circulant becomes beautifully simple in the frequency domain (just multiplication). This accounts for the absence of matrices in the leading textbooks on signal processing. The property of time invariance (delay of input simply delays the output) is always the starting point. We can quickly describe the rules for doubly infinite convolution and cyclic convolution. A vector h of filter coefficients is convolved with a vector x of inputs. The output is with no boundary and x in the cyclic (periodic) case: Those are matrix-vector multiplications On the whole line (n 2 Z) the doubly infinite matrix H is Toeplitz; the number h k goes down its kth diagonal. In the periodic case (n 2 ZN ) the matrix is a circulant; the kth diagonal continues with the same h k onto the diagonal. The eigenvectors of these matrices are pure complex exponentials. So when we switch to the frequency domain, the matrices are diagonalized. The eigenvectors are the columns of a Fourier matrix, and F \Gamma1 HF is diagonal. Convolution with h becomes multiplication by the eigenvalues H(!) in the diagonal matrix: ji The infinite case (Discrete Time Fourier Transform) allows all frequencies j!j -. The cyclic case (DFT) allows the N roots of w 1. The multiplications in (7) agree with the convolutions in (6) because e \Gammaikx e . The question is: What convolution rule goes with the DCT? A complete answer was found by Martucci [5]. The finite vectors h and x are symmetrically extended to length 2N or 2N \Gamma 1, by reflection. Those are convolved in the ordinary cyclic way (so the double length DFT appears). Then the output is restricted to the original N components. This symmetric convolution h s x corresponds in the transform domain to multiplication of the cosine series. The awkward point, as the reader already knows, is that a symmetric reflection can match u \Gamma1 with u 0 or u 1 . The centering can be whole sample or half sample at each boundary. The extension of h can be different from the extension of x! This confirms again that discrete problems have an extra degree of complexity beyond continuous problems. (And we resist the temptation to compare combinatorics and linear algebra with calculus.) In the continuous case, we are multiplying two cosine expansions. This corresponds to symmetric convolution of the coefficients in the expansions. 7. The DCT in Image Processing Images are not infinite, and they are not periodic. The image has boundaries, and the left boundary seldom has anything to do with the right boundary. A periodic extension can be expected to have a discontinuity. That means a slow decay of Fourier coefficients and a Gibbs oscillation at the jump - the one place where Fourier has serious trouble! In the image domain this oscillation is seen as "ringing." The natural way to avoid this discontinuity is to reflect the image across the boundary. With cosine transforms, a double length periodic extension becomes continuous. A two-dimensional image may have (512) 2 pixels. The gray level of the pixel at position (i; is given by an integer x(i; (between 0 and 255, thus 8 bits per pixel). That long vector x can be filtered by x h, first a row at a time (j fixed) and then by columns (using the 1D transforms of the rows). This is computationally and algebraically simplest: the 2D Toeplitz and circulant matrices are formed from 1D blocks. Similarly the DCT-2 is applied to rows and then to columns; 2D is the tensor product of 1D with 1D. The JPEG compression algorithm (established by the Joint Photographic Experts Group) divides the image into 8 \Theta 8 blocks of pixels. Each block produces 64 DCT-2 coefficients. Those 64-component vectors from the separate blocks are compressed by the quantization step that puts coefficients into a discrete set of bins. Only the bin numbers are transmitted. The receiver approximates the true cosine coefficient by the value at the middle of the bin (most numbers go into the zero bin). Figures 2-5 show the images that the receiver reconstructs at increasing compression ratios and decreasing bit rates: 1. The original image (1:1 compression, all 8 bits per pixel) 2. Medium compression (8:1, average 1 bit per pixel) 3. High compression (32:1, average 1 4 bit per pixel) 4. Very high compression (128:1, average 1bit per pixel) You see severe blocking of the image as the compression rate increases. In teleconferencing at a very low bit rate, you can scarcely recognize your friends. This JPEG standard for image processing is quick but certainly not great. The newer standards allow for other transforms, with overlapping between blocks. The improvement is greatest for high compression. One personal comment on quantization: This more subtle and statistical form of round-off should have applications elsewhere in numerical analysis. Numbers are not simply rounded to fewer bits, regardless of size. Nor do we sort by size and keep only the largest (this is thresholding, when we want to lose part of the signal - it is the basic idea in denoising). The bit rate is controlled by the choice of bin sizes, and quantization is surprisingly cheap. Vector quantization, which puts vectors into multidimensional bins, is more expensive but in principle more efficient. This technology of coding is highly developed [3] and it must have more applications waiting to be discovered. A major improvement for compression and image coding was Malvar's extension of the ordinary DCT to a lapped transform. Instead of dividing the image into completely separate blocks for compression, his basis vectors overlap two or more blocks. The overlapping has been easiest to develop for the DCT-4, using its even-odd boundary conditions-which the DCT-7 and DCT-8 share. Those conditions help to maintain orthogonality between the tail of one vector and the head of another. The basic construction starts with a symmetric lowpass filter of length 2N . Its coefficients are modulated (shifted in frequency) by the DCT-4: The kth basis vector has jth component p(j) cos . There are N basis vectors of length 2N , overlapping each block with the next block. The 1D transform matrix becomes block bidiagonal instead of block diagonal. It is still an orthogonal matrix [4, 9] provided each j. This is Malvar's Modulated Lapped Transform, which is heavily used by the Sony mini disc and Dolby AC-3. (It is included in the MPEG-4 standard for video.) We naturally wonder if this MLT basis is also the set of eigenvectors for an interesting symmetric matrix. Coifman and Meyer found the analogous construction [2] for continuous wavelets. The success of any transform in image coding depends on a combination of properties- mathematical, computational, and visual. The relation to the human visual system is decided above all by experience. This article was devoted to the mathematical property of orthogonality (which helps the computations). There is no absolute restriction to second difference matrices, or to these very simple boundary conditions. We hope that the eigenvector approach will suggest more new transforms, and that one of them will be fast and visually attractive. Web Links JPEG http://www.jpeg.org/public/jpeglinks.htm compression-faq/top.html (includes source code) Author http://www-math.mit.edu/-gs/ --R IEEE Trans. Remarques sur l'analyse de Fourier Digital Coding of Waveforms Signal Processing with Lapped Transforms Symmetric convolution and the discrete sine and cosine transforms Diagonalizing properties of the discrete cosine transforms The search for a good basis Wavelets and Filter Banks The discrete W-transform Adapted Wavelet Analysis from Theory to Software Eigenvalues and eigenvectors of finite difference matrices --TR --CTR Bozhan Zhechev, Invariant spaces and cosine transforms DCT - 2 and DCT - 6, Proceedings of the 5th international conference on Computer systems and technologies, June 17-18, 2004, Rousse, Bulgaria Bozhan Zhechev, The discrete cosine transform DCT-4 and DCT-8, Proceedings of the 4th international conference conference on Computer systems and technologies: e-Learning, p.260-265, June 19-20, 2003, Rousse, Bulgaria Alexander Olshevsky , Vadim Olshevsky , Jun Wang, A comrade-matrix-based derivation of the eight versions of fast cosine and sine transforms, Contemporary mathematics: theory and applications, American Mathematical Society, Boston, MA, 2001 Angelika Bunse-Gerstner , Valia Guerra-Ones , Humberto Madrid de La Vega, An improved preconditioned LSQR for discrete ill-posed problems, Mathematics and Computers in Simulation, v.73 n.1, p.65-75, 6 November 2006 David J. Gorsich , Marc G. Genton , Gilbert Strang, Eigenstructures of spatial design matrices, Journal of Multivariate Analysis, v.80 n.1, p.138-165, January 2002 David J. Gorsich , Marc G. Genton, On the discretization of nonparametric isotropic covariogram estimators, Statistics and Computing, v.14 n.2, p.99-108, April 2004 Emrah Kilic , Dursun Tasci, Factorizations and representations of the backward second-order linear recurrences, Journal of Computational and Applied Mathematics, v.201 n.1, p.182-197, April, 2007 Ira S. Moskowitz , LiWu Chang , Richard E. Newman, Capacity is the wrong paradigm, Proceedings of the 2002 workshop on New security paradigms, September 23-26, 2002, Virginia Beach, Virginia fast direct method for solving the two-dimensional Helmholtz equation, with Robbins boundary conditions, Contemporary mathematics: theory and applications, American Mathematical Society, Boston, MA, 2001
cosine transform;orthogonality;signal processing
314063
Ranking Strategies for Navigation Based Query Formulation.
Navigating through a hypermedia retrieval system bears the problem of selecting an item from a large number of options available to continue the trajectory. Ranking these options according to some criterion is a method to ease the task of navigation. A number of ranking strategies have already been proposed. This paper presents a formalization of the concept of ranking, and of the aforementioned strategies. Furthermore we propose two strategies allowing a personalized approach to ranking.
Introduction In some ways, the introduction of mass storage devices like CD-ROM has been a mixed blessing. True, we can offer large amounts of information, be it sound, video or text. However, the task of finding the right information has become increasingly difficult. Although indexing the information somewhat reduces the complexity, the user may not have a clear overview of the indices which are resident in the index. Such insights can only be achieved by long-time use of an index. Therefore novice searchers need a large amount of support in order to make full use of the index. At each item in the index space, numerous links to related items can be traveled. This amount of possible roads to travel may cause the user to diverge from the original train of thought unintentionally. In order to keep the user on the right track, it could be necessary to introduce an ordering between the different trajectories which are available. The first approach would be to present the options available in a manner which does not take the previous decisions into account. An example would be that the current user has a strong preference for links which lead to textual information. Then, we could imagine that the supporting system creates a list of options where the links to textual information are mentioned first, or where links to non-textual information are not mentioned. An entirely different approach would be that the previous steps on the trajectory are examined and used to order the different options for continuing the trajectory. So we could have the supporting system create a window which mentions something like "Based on previous decisions we strongly suggest option X for continuing the search." The basis for the ordering is that, should the user select an option which occurs high in the ranking, he or she will move towards an index item which is relevant to the information need. This relevance is derived from the actions which have been performed on the index items which have been presented to the user so far. A number of ranking strategies are discussed. However, these do not take into take into account the current fields of interest which a searcher exhibits during the search session. In order to cater for adaptive ranking methods, we propose two strategies which analyze the searcher's trajectory. The results of this analysis can be used to rank the different trajectories. There are numerous ways in which a query can be constructed interactively. For instance a user may construct an SQL query in this manner. In this paper we will adapt a hypermedia-based approach called Query by Navigation. The network in which this query construction process takes place is introduced in section 2. Within this network the behavior of the searcher is discussed in section 3. In section 4 first an overview is given of various methods of ranking a node's neighbors. Following this, two new methods which take the behaviour of the searcher during the current session into account are introduced in section 5. The effect of one of these two strategies is demonstrated in section 6. Finally, section 7 offers a critical review of the various aspects presented in this paper. based Information Retrieval These days a large portion of information retrieval is based on hypermedia. This section treats our view on this current trend. 2.1 Two-level architecture The tool for disclosing a set of documents is a hypermedia-based information retrieval system. The frame of reference in this paper is a two-level hypermedia architecture [4]. This describes how a hypermedia can be formed by creating two levels, the document level or hyperbase, and the index level or hyperindex. Documents can be found in the document level, which is the hypertext representation of a set of documents O. The content of a document d is described by its characterization -(d). The second level, the hyperindex level, is a hypertext representation of the document characterizations. Formally the hyperindex is a tuple hD; Li. The first component is the set of characterization items or descriptors, the second component is the set of links between descriptors. Each descriptor in the hyperindex is of a certain medium taken from the set \Phi text; sound; video \Psi . Although in many cases a descriptor would be of type text, it is not inconceivable that descriptors of type video occur. The reason for this is that the hyperbase essentially is a hypermedia. So if we have a document which is, say a movie, then this document could be characterized by its title, its cast, its director etcetera. Alternatively we could characterize this movie by sampling a few stills, and hence introduce descriptors of type video. 2.2 Hyper-index construction A main feature of hypertext is the link which connects elements of the hypertext on the basis of some relation between the connected elements. A source for discussion in hypertext research is the nature of this link. One topic is whether links should be unidirectional or bidirectional. We advocate a bidirectional nature of a link. The main reason for this is that in order to allow query by navigation, it should be possible to reach any descriptor irrespective of the starting-point. So the demand is that if there is a link from d to e, then there should also be a link from e to d. Following Frei & Stieger (see [5]), a link is a tuple where the type of the link Hyperbase document descriptor descriptor descriptor Hyperindex beam down beam up Figure 1: Stratified hypermedia architecture the source of the link the destination of the link the activation count of the link the time of creation of the link The time axis \Theta is discrete and totally ordered, see e.g. [12]. So if we have one link - 1 , created at time t, and another link - 2 created at time t 0 , it is possible to decide which of these two links has been created first if t 6= t 0 . The links in the hyperindex can be partitioned into a set of static links and a set of dynamic links. The static links have been derived through characterization. Each user shares these links with other users. Dynamic links are private for each user. Therefore we propose that the static links have all been created at the same time t 0 . Each time a dynamic link is created the time is incremented to the next element. The type of the link determines the relation between source and destination. For instance these two descriptors could be synonyms. Another type for a link could be the inferred type. Such a link between two descriptors means that the link is not due to the characterization process. In stead, it has been created as a consequence of the search actions of a searcher. For more details, see [2]. For a link - the source is written as s(-), the destination as d(-), and the activation count as c(-). Each time a link - is traveled, the activation count - c is incremented by 1. As an additional component we could have the date on which it was created, or the date when it was last activated. Irrespective of a link's type, links are not transitive and irreflexive. In order to reduce the cognitive load on the searcher, we imagine that at most one link exists between any two descriptors. The reason for this is that it may be very confusing for the searcher if descriptors d and e are connected with a link of type T and another link of type T 0 . This would suggest the existence of two different relations between d and e. The distance between two descriptors d and e, dist(d; e) is defined as the minimum number of links which have to be traveled in order to reach e from d. Because not all links are symmetric, it is not unlikely that for most pairs of descriptors dist(d; e) 6= dist(e; d). A conceptual model for the hyperindex is shown in Figure 2. This conceptual model is drawn according to PSM[9]. Circles represent object types, which can play roles (represented by rectangles) in fact types. In this case we have only one object, Descriptors. This object can play two roles, is-source-of and going-to. The relation created by these two roles is called Link. Without going into details, the bidirectional nature of the link is enforced with the equality constraint. This is achieved by allowing only populations of fact type Link such that if his-source-of:x; going-to:yi is a member of the population, then his-source-of:y; going-to:xi is also a member of the population. Because there is no link from any descriptor to itself we need a constraint which excludes reflexive populations of the Link fact type. This is done with a so-called Lisa-D constraint (see e.g. [8]): NO Descriptor is-source-of Link going-to THAT Descriptor Descr Type Link Link-Type is-source-of going-to has-inverse is-inverse-of has-type is-type-of Count Activation Inverse Medium-Type Figure 2: A conceptual model for the hyperindex 3 Query by Navigation As a means of constructing a query for the retrieval system, Query by Navigation is used. With this formalism a user is allowed to meander through a hypertext presentation of an index. Descriptors which are thought to be representative of the Information Need can be marked as such. There is no need for the searcher to navigate the hyperindex with the underlying intention of constructing a query. The sequence of search actions (called a search path) are analyzed and an assumption is made concerning the interests of the searcher. Based on this assumption the search process is supported by trying to guide the searcher to the index entry which is most likely to be the representation of the information need. This section discusses the formalism. Navigation Verbalisation Rephrasing Figure 3: Search process 3.1 The Search Process In Figure 3 we have shown the components of the search process. Starting from an initial query, the search follows up on this by a process of navigation through the hypermedia. After a number of navigation actions, the searcher might ask for a verbalization of the navigation process, after which the original query may be rephrased, etcetera. After a number of iterations, the query is submitted for evaluation. 3.2 Search Paths In order to let the user construct a description of the information need we allow this user to navigate through the hyperindex. The sequence of search decisions taken during this navigation is called a search path. A search path p of k search actions can be written as where the a i 's are search actions. In every focus the user can execute a search action which manipulates a number of options. These options are all the descriptors which either refine or broaden the current focus '. The set of options in a focus ' is defined as Definition 3.1 \PsiAs a different approach we could have as an option also a set of documents which, given the sequence of search actions thus far, could be relevant to the searcher. Following a link to such a document would mean that a beam down is performed. We do not concern ourselves here with the question how these documents are determined relevant. The occurrence of documents among the set of options is merely something which we wish to incorporate in our ranking strategies. 3.3 Search actions In order to describe the behavior of the searcher in the hyperindex we consider four types of actions: 1. mark the focus or one of the options as being relevant to the information need (this style of searching is called berry picking; see e.g. [1]). This is denoted as ?ff. 2. shift the focus to one of the options of the current focus. This is denoted as ! ff. 3. discard an option as not worthy of further pursuit. The denotation for this action is :ff. Each search action has a focus, i.e. the descriptor where that action is performed, and a subject, i.e. the descriptor which is manipulated with the search action. The focus is never part of the set of options, whereas the subject is either the focus or one of the options. An example search path is shown in Figure 4. We see that some descriptors have been marked as relevant, whereas some have been marked as not relevant. Depending on the level of experience of the searcher, some of these designations may contradict each other.531non relevant: relevant: Figure 4: Example search path Definition 3.2 Given a search path we say that descriptor ff has been visited when either one of the following events has occurred on p: Ranking 2. 3. 1. relevant: non relevant: 2. 1. Ranking Figure 5: Search support 1. there is a j such that a j =! ff 2. there is a j such that a 3. there is a j such that a a simplification of a search path we view a sequence of traveled links and a set of marked descriptors. If a sequence of links - has been traveled, the demand is that we only travel links originating from the descriptor we have just reached by the previous transition. After the search process has been terminated the searcher could ask the retrieval system which set of documents satisfies the constructed query. The query which will be submitted for evaluation consists of the marked descriptors: The set of marked descriptors Mark after a sequence of links - has been traveled is a subset of the set of all visited descriptors. As a second reflection of the interest of the searcher we have the set of descriptors which has been rejected. This set is called NMark. Note that due to the fact that contradictions are allowed, Mark and NMark may have a non-empty intersection. Earlier in this section we introduced the notion of distance between descriptors. The distance between a descriptor d and a search path p is defined as the distance between the current focus of p and d. This means that the distance between d and a search path does not change when for instance an option is rejected. The distance can only change when an option is selected as the new focus. When the searcher moves consistently in a certain direction, some descriptors move constantly closer to the search path. If the current focus of search path p is called f , then Definition 3.3 The set towards(p; ! e) is defined as \PsiAt any point on the search path, the searcher may ask for support. If we focus on support in the form of ranking, a search path like the one in Figure 5 might ensue. 3.4 The number of search paths In this section we consider the number of possible search paths in a given hyperindex. If this number of search paths is relatively low, then the danger of a searcher getting lost in hyperspace is small. In contrast, if this number is relatively high then a lot of effort will have to be put into preventing a searcher losing track of the original train of thought. First we consider the situation where in each descriptor it is only allowed to go to one of the options. Clearly problems arise if we are looking for paths of length l, when only paths of length k ! l can be constructed. In this case, the number of search paths of length l starting in descriptor d can be expressed as e2Opt(d) If we wish to look for search paths of length l ? 0, and there are no options to which the focus can be shifted, then no such paths can be constructed. In the case where we look for search paths of length l = 0, then there is only one such path i.e. remaining in d. In order to find all search paths of length l, we consider each descriptor in turn: d2D nsp(d; l) (2) We express the number of search paths which can be constructed in the hyperindex as follows: If no cycles occur in the hyperindex, only search paths of finite length can be constructed. In most cases however the possibility of constructing a cyclic search path exists. This raises the prospect of an infinite number of search paths. If we examine the hyperindex of Figure 6a, formula 3 gives a total of 4 search paths: 3 of length 1 (going from d to e, from d to f , and from e to f) and 1 of length 2 (going from d to e, followed by going from e to f ). There are no search paths of length 3 or more. For the hyperindex of Figure 6b problems arise. the graph of Because this hyperindex has a cycle, in theory search paths of infinite length can be constructed. f e d f e d a b Figure A more complex situation occurs when in each descriptor it is allowed to mark or reject this descriptor or any of its options. The complexity arises because in theory it is allowed to perform an infinite number of mark or reject actions. In order to tackle this problem, if we are in descriptor d and wish to construct a search path of length l, we can do first do k ! l stationary search actions. This is then followed by a transition to one of d's options, and from there we construct a search path of length l transition counts as one search action). First we examine the case where only the current focus may be marked or rejected. There are then three actions which can be performed at any point on the search path. l e2Opt(d) If we can not only reject or affirm the focus, but also the options, we have a choice of rejecting or affirming one of the 1 (the focus and its options) descriptors which can be accessed in the current focus. This makes for a choice of 2(1 actions. l e2Opt(d) Admittedly, among these search paths there are a lot which, although quite legal, are very unlikely to be constructed. For instance, performing a large number of marking operations on the same descriptor will most likely never occur in practice. 4 Ranking of options In this section we describe how the options in a focus can be ranked. With this we mean that each option is assigned a measure, telling the user how important that option is with respect to a certain ranking strategy. Ranking of options is important in order to help the searcher in choosing options. This particularly becomes necessary when the number of options becomes large. In our view, the user should have ultimate control over whether ranking should be performed or not. Also, the strategy which has been used to perform a ranking should be determined by the searcher. Another topic which should be considered is the time it takes to perform a ranking. Under no circumstance should a user have to wait for the ranking to be calculated. 4.1 Basic definitions A ranking of a set of descriptors \Psi is defined as When an option is assigned the number 1 we say that this option has a high rank. An option with a high rank has a high relevance to the information need. On the other hand, when an option is assigned the number k the option has a low rank. Such an option is then said to be less relevant to the information need. Each option is assigned only one rank. However it is possible that a rank is assigned more than once. This could happen when the criterion used for ranking is insufficient to distinguish between a set of options. For instance, both option could be assigned rank 4. This would result in a partial ranking. A ranking is often bijective, i.e. ae describes a permutation of \Delta. We assume that a ranking does not allow gaps, e.g. a ranking which assigns rank 1 and rank 3 but not rank 2 is illegal. Definition 4.1 If ae(\Delta) is the ranking of a set of descriptors, then the rank partition ae [i] is the set of descriptors which are assigned rank i. 2 Because each descriptor is assigned a rank, the union of all rank partitions should result in the set of descriptors which have been ranked. Lemma 4.1 ae Suppose we have for a set of options \Delta two different rankings ae 1 (\Delta) and ae 2 (\Delta). An interesting study would be to determine the similarity between these two rankings. As a basis for this similarity we look at the number of times that the two strategies render the same rank for the same descriptor. For instance, if two strategies both assign rank 2 to option !, then we have reason to believe that some similarity exists between the two rankings. In contrast, when two strategies assign different ranks for all options, then we may conclude that no similarity exists between the rankings. Because a high ranking indicates an option which is important to the searcher, it is necessary to attach more importance to agreement between high rankings than to agreement between low rankings. If we have k ranks, each with a weight w, where w Definition 4.2 The similarity ffi between two rankings ae 1 and ae 2 of a set of descriptors \Delta is given by w iThe similarity between two rankings is minimal (i.e. ffi(ae 1 each option is assigned a different rank by both rankings. A maximal similarity (i.e. occurs when both rankings decide on the same rank for each option. Similarity between rankings has a close resemblance to the concept of Hamming distance (see e.g. [7]). A necessary condition for a maximal similarity is that both rankings have the same cardinality for each rank partition. Lemma 4.2 ffi(ae 1 In order to illustrate the concept of similarity between rankings we next present an example. Example 4.1 Suppose we have a set of options \Psi and three rankings of this set, as summarized by the following table: a b c The similarity between ae 1 and ae 2 is w 2 , since both agree only on the ranking of option b. Because rankings ae 1 and ae 3 both assign the same rankings to b and c their similarity is . Finally, the similarity between ae 2 and ae 3 is w 2 . 2 4.2 Ranking strategies In [13] an overview was given of various possibilities for ranking the options from which a searcher may choose. These are summarized in this section. 4.2.1 Overview of existing ranking strategies Given a set of options, the following strategies may be utilized to achieve a ranking of these options. random: the options are ranked in a random way. For convenience, we adopt the policy that the ranking is a permutation of the options. frequency: based on previous access by other users, each option is assigned a rank. Since it is quite possible that some links have been equally frequented, the ranking is not always a permutation of the options. time stamp: if a link to an option has been created recently, it will be assigned a higher ranking than 'older' ones. Because static links have been created at the same time the ranking is not always a permutation. medium: links leading to non-textual information are assigned a higher ranking. Because it is quite possible that multiple options are of medium m, in most cases ranking according to this strategy will result in a partial order. knowledge gain: rank the options in such a way that choosing a link will maximize a searcher's gain in knowledge. Furthermore, the author reported that in many cases users are not interested in previously visited nodes. This seems to imply that in any ranking, the previously visited node should receive the lowest ranking. An interesting question therefore is the rank which a strategy assigns to the previous focus. These strategies need not be applied during the entire session. It could be that a different strategy is used during different stages of the search process. Moreover, at each stage it should be possible that more than one strategy is used. For instance, if we have n options, the first 4 could be ranked according to strategy S 1 , the next 4 could be ranked according to strategy Also we could choose to partially rank these n options based on strategy S 1 , and within each partition rank the options based on strategy S 2 . Notice that the strategies introduced so far (except for the knowledge gain based ranking) work with a static criterion. Each time the set of options has to be ranked the same set of rules is used. An other drawback is that for instance with a frequency-based approach, the searcher is made part of a faceless group of users who are presumed to all have the same interests. Even though such a collaborative approach has its benefits, we would like to add a personal touch to ranking. Also with the above strategies, previous actions taken by the searcher, which reflect the current interest, are not taken into account. We propose to add a sense of dynamic behavior in ranking. In this paper we introduce two different kinds of ranking: search target: rank the options based on how much they bring the searcher closer to a descriptor which is, unknown to the user, highly important. history based: rank the options based on previously exhibited behavior. 4.2.2 Random ranking Basically this is not a meaningful ranking. It merely gives the user a feeling that the system is doing something as a result of his or her actions. 4.2.3 Frequency-based ranking With this approach, options which have been chosen more often by previous users of the hyperindex receive a high ranking. This approach can be made more detailed by examining all the links which lead to an option, and assign a ranking based on the frequency of all these incoming links. The reason for this is that it gives a clearer view of the importance of an option. In stead of concentrating on how the option can be reached from the current search path, this new definition takes into account the fact that the option could be reached via different paths as well. With our definition of a link, the frequency f(!)of an option ! is given as: c(-) 4.2.4 Time-based ranking When ranking occurs according to the time when a link has been created, we assign rank one to that link which has been created most recently. This is done because such a link can be considered to have a 'novelty' value to the searcher. The older a link is (with the links which have been introduced during characterization as the oldest ones), the less value such a link has to the searcher. Should there be at least one link which has been created after characterization, the properties of the time axis guarantee that there is exactly one link which is assigned ranking 1. Lemma 4.3 If ae has been achieved through time-based ranking, then 9 i?1 [ae [i] 6= ?] ) jae The rank of the previous focus does not receive a low ranking. If we wish to achieve that the previous focus does get the lowest ranking, we could choose to rank according to the last time a descriptor has been visited. 4.2.5 Medium based ranking In most cases, searchers have a clear preference for information of a specific medium. Links to information of a different medium can, in most cases, be assigned a low rank, or left out of the ranking. When ranking is done according to the medium of the option, the previous option is not ranked last automatically. 4.2.6 Knowledge gain-based ranking Knowledge is viewed as a collection of facts and relations between them. The knowledge graph ([13]) is the graphical representation of this collection. In terms of our hyperindex environment, each descriptor d is assigned an intrinsic value V d . Beyond that, each descriptor has a value which reflects the value of its relationship to other nodes (i.e. the options). More precisely, the links to these nodes receive a value. The combination of these two values is the so-called derived value v d . In the context of Query by Navigation, the current knowledge of the searcher can be expressed as the sum of the derived values of all marked descriptors. What then is the rank of an option? Clearly, the rank of an option which leads to a great increase in knowledge is high, whereas an option which only slightly increases the searcher's knowledge is very low. One way to view knowledge is by examining the subset of the documents which have been viewed thus far. Viewing can be indirect (i.e. by marking a descriptor), or direct, i.e. by reading a document. If the current knowledge is K ' O, then the gain of knowledge fl offered by choosing option e is expressed as Definition 4.3 When we use this definition for ranking options, then an option which characterizes a large number of previously unread documents will get a high ranking. On the other hand, since the previous focus is already part of the knowledge this option will have a very low knowledge gain value. Hence the previous focus gets a very low rank. Should we have an option which is a document, then the value fl is at least 0 and at most 1. The current knowledge does not make use of the fact whether a read document has been judged relevant or not relevant. In order to incorporate these relevancy judgements, we present a partition K Definition 4.4 The positive knowledge K + is the set of documents which has been marked as relevant: d2Mark Definition 4.5 The negative knowledge K \Gamma is the set of documents which has been marked as not relevant: d2NMark Definition 4.6 The undecided knowledge K 0 is the set of documents which has not yet been labeled as either relevant or not relevant. 2 An option which shares a large number of documents with the negative knowledge is not a very interesting one. It's rank is therefore very low. However an option which shares no documents with K \Gamma is a very interesting one. So an option which shares a large number of documents with the positive knowledge is hampered by sharing a large number of documents with the negative knowledge. This leads us to the following definition for the total knowledge gain value Definition 4.7 Note that it is quite possible for an option to have a negative knowledge gain. This measure of knowledge gained only looks one step ahead. Since it is not inconceivable that an option e offers no gain in knowledge, but that one of e's options in turn offers a wealth of information, a more advanced measure would look multiple steps ahead. This measure would also take into account the effort needed (viz. the number of steps) to reach a descriptor. This increase in knowledge is based on how large a portion of the hyperindex can be reached from a descriptor. If an option discloses a large part of the hyperindex, hitherto unexplored, then that option will have a high ranking. Options which do not have any neighbors will receive a low rank. When we want to extend definition 4.3 to cater for descriptors which lie beyond an option, we need to define a 'sphere' with radius s. This is the set of descriptors which lie close enough to option e to be of interest to the searcher. Descriptors which lie close to e are favored over descriptors which lie on the edge of the sphere. When a descriptor f close to e shares documents with the negative knowledge, this influences the knowledge gain in a very negative way. If f lies further away from e, say on the edge of the sphere, then any documents shared with the negative knowledge do not cause a very negative influence on the knowledge gain. This effect of distance i on the common positive knowledge is expressed by the coefficient - i ; the effect of distance on the common negative knowledge is expressed by the coefficient - i . Definition 4.8 s f;dist(e;f)=i Personalized ranking The ranking strategies of the previous section have in common that they do not reflect the current interests of the searcher. E.g. the frequency-based ranking works with data gathered during previous trajectories. This section presents strategies which take the current interest of the searcher into account. 5.1 Search target based ranking In principle, each search action has the effect of labeling certain regions of the hyperindex as less likely to be of interest to the searcher. For instance, suppose we have a hyperindex where the subject of 'means of transportation' is subdivided into `motorized' and 'non motorized'. Then when 'motorized' is marked as relevant, it is unlikely the searcher will at some time in the future mark 'bicycle' as relevant. When a sequence of search actions is regarded, then it could be possible to hypothesize on the most likely region in which the searcher is interested. When such a search target can be singled out, then if the searcher continues moving toward this region, the belief in the hypothesis will increase. When the searcher moves away from the region, the belief in the hypothesis will decrease. It could even be possible that the hypothesis has to be restated, viz. a new search target has to be derived. This is the subject of this section, where we introduce the notion of target probabilities. 5.1.1 Basic definitions An interesting way to model the effect of a search path S is by assigning a so-called target probability P (djS) to each descriptor. This probability expresses the probability of a descriptor being relevant to the information need, given the current search path S. The effect of extending a search path with an option e is expressed by Definition 5.1 1where w is the weight which we assign previous decisions. In general, novice searchers are best served with a low weight, whereas more experienced searchers have greater benefit from a high weight. These settings are not strict, they are merely defaults. The searcher has the ultimate control over the actual value of the weight; it can be decreased or increased at will. The continuation probability C(dje) is the probability of reaching d from e and making d a berry. It is mainly determined by the network topology. Every decision causes the target probability of a descriptor to fluctuate. Some decisions will increase the target probability; these deal mainly with moving towards such a descriptor. Other decisions will decrease a descriptor's target probability; an example of such a decision is for instance when the searcher moves away from a descriptor. Suppose we have a descriptor, say f , which has a marked increase in target probability, i.e. P (f jp) has increased very much by the last action on p. For example we might have the case that the searcher has moved into a part of the hyperindex which terminates in a descriptor without branching off in between. Such a hyperindex might be called a hairy hyperindex (see e.g. [10]). In order to compare a descriptor's increase in target probability we look at the relative increase in target probability. For instance, if descriptor d's target probability rises from 0.1 to 0.15, whereas descriptor e's target probability rises from 0.05 to 0.1, then e has the largest relative increase, even though the absolute increase is equal. Definition 5.2 The search target of search path p is that descriptor f which maximizes jp)When we are able to point out a certain descriptor as being the search target, the distance function between descriptors allows us to define a ranking of the options. The rule of thumb for ranking is hence a question of 'which option offers the shortest route to the search target'. That option which is closest to the search target therefore receives the highest rank. Lemma 5.1 For a search path p, the search target is an element of towards(p). A special property of the target probability is that leaving a descriptor results in a lower target probability for that descriptor. Hence the previous focus will definitely not be able to become the search target. Consequently, the previous focus will never be ranked first. An interesting situation arises if there are n descriptors which lay claim to the title of 'search target'. In that case we choose that descriptor which lies closest to the current focus. Another course of action would be to find a descriptor c which serves as a common ancestor of the candidate search targets, and label this descriptor as the search target. When a search path S is constructed twice, first with history w, and then with history w 0 , one would expect that the target probabilities, and hence the radiation coefficients, differ. So, in order to construct the same search path in both cases, the user would have to select different ranked options. E.g. if option e in descriptor d is ranked first if history w is used, it might be ranked second, or third, or anything but first if history w 0 is used. This would lead us to expect that if different weights on history have been used, different rankings result. 5.2 History based ranking In the previous section we mentioned that it is possible to decide whether a search path is consis- tent. The search path p already constructed reflects the interest of the searcher. In order to guide the searcher in a way which would maintain this exhibited behavior, an interesting strategy for ranking is one where descriptors are ranked according to the degree in which they uphold consis- tency. Suppose e is an option of the current focus d. For this option we create an imaginary search path we presuppose that the searcher will choose e and then mark this descriptor as a berry. This path is then analyzed in order to determine its inconsistency. If an inconsistency can be derived, then this option is ranked low. In contrast, when no inconsistency can be derived, then the option gets a high ranking. Each option can be expected to change the previously shown interest, either by narrowing it down or deviating from it. The need exists to assign a measure to each option, expressing how much it disturbs the behavior. In order for a search path to be inconsistent, there have to occur two search actions a i and a j which contradict each other. We distinguish two possibilities for contradictions: 1. action a i marks a descriptor d relevant, while action a j rejects a descriptor e which is similar to d 2. action a i marks a descriptor d relevant, while action a j marks a descriptor e relevant which is dissimilar to d In order to decide whether two descriptors are similar we assume the availability of a similarity function Similarity between descriptors can be decided in a number of ways. One such approach is mentioned in [11]. Furthermore we have two thresholds - s and - d . If the similarity between two descriptors falls below - d we call these descriptors dissimilar, whereas when the similarity exceeds - s we call them similar. Finally, the conflicting search actions have to occur within a window h. This window can be used to support users with different levels of experience. Novice users may select a small window value, whereas expert searchers may select a large window value. Definition 5.3 If a search path is rendered inconsistent due to two conflicting search actions a i and a j , then the level of inconsistency ' of this search path is given by Suppose a searcher has constructed a search path At this focus, information on all countries in Western Europe is available, e.g. France, Belgium. If the searcher asks for a ranking of these countries, since low countries has been rejected countries like for instance Belgium receive a low ranking. 2 5.2.1 Selecting a low-ranked link An important question which has to be asked is what happens if the user chooses to disregard the suggested ranking and instead selects a low-ranked link. If the user then marks the destination of this link as relevant, the result would be an inconsistent path. One reason for a searcher to abandon a certain thread of interest is that as a consequence of the information encountered, a different information need is formed. For instance, if a searcher has shown an interest in subject A, an interest for subject B can be triggered because certain of the information dealing with subject A also deals with subject B. After subject B has been sufficiently explored, the searcher might return to the original train of thought, subject A. 6 Test results In this section we return to the concept of ranking based on a search target, and test this strategy for a certain hyperindex. First we introduce a technique to compare two target distributions. 6.1 Basic definitions Suppose we have constructed two search paths p and q. These search paths give rise to a target distribution P (djp) and P (djq), respectively. Both p and q consist of n focus shift actions. An interesting measure with which to compare the target distributions is the entropy (see e.g. [6]) E(P ), defined as d2D For an evenly distributed target probability the entropy will be relatively high. In contrast, for a target distribution with distinguished peaks, i.e. descriptors with a markedly high target probability, the entropy will remain rather low. Example 6.1 Suppose we have four descriptors, a, b, c and d. Then the following table shows some example target probabilities and the associated entropy: a b c d E(P )444411111.83999Looking at the target probabilities we see that the probability concentrates in descriptor a, whereas the other descriptors' probability decreases. As a consequence the entropy decreases.For all examples which will follow in this section, we will present graphs which show the entropy of two search paths. 6.2 Random ranking vs. search target based ranking In this section we compare choosing an option at random with choosing an option based on how close this option is to the search target. If options are ranked random and we choose the first option, the expectation is that in such case the target probability will show no tendency to concentrate in a select set of descriptors. This would result in a 'flat' distribution and hence a high entropy. Secondly, we construct a search path by selecting the option with the highest radiation coefficient. The expectation is that in this case the target probability will become markedly high for a specific set of descriptors. The graph of Figure 7 shows that the entropy for the search target2.93.13.33.53.7 entropy step ranked random Figure 7: Entropy for random vs. search target ranking based ranked path decreases constantly. The search target where options are ranked random shows an increase in entropy after an initial decrease in entropy. first last Figure 8: The effect of rank selection 6.3 Selecting a low-ranked option An interesting test would be to compare the entropies of the distribution which would arise if the following two strategies for selecting a rank are used: 1. select the option with the highest rank 2. select the option with the lowest rank Selecting the highest ranked descriptor would bring the searcher closer to the search target, whereas selecting the lowest ranked descriptor would result in moving away from the search target. Although there is nothing wrong in selecting a low-ranked descriptor every now and then, doing this persistently would prevent the target distribution from becoming markedly high for a specific descriptor. The graph of Figure 8 shows the resulting entropy for a search path constructed by selecting the first ranked option (solid line) and the entropy for the search path constructed by selecting the last ranked option. As can be seen, selecting the first rank leads to a lower entropy, i.e. a descriptor with a markedly higher target probability ensues. 6.4 The influence of history Finally we show the effect of varying the weight which we assign the previous decisions. In this case we follow the policy of always selecting the highest ranked descriptor. When the previous decisions become more important, we would expect that moving in a certain direction would inhibit the target probability from concentrating in a certain set. Consequently, the entropy would decrease less quickly. From the graph in Figure 9 we see that doubling the weight on previous decisions causes the entropy to decrease less rapidly. Conclusions In this paper we have given a formalization of the concept of ranking. With this formalization, a number of existing ranking strategies have been formalized. Furthermore we have presented two strategies for ranking. Both take into account the behavior of the searcher exhibited during the Figure 9: Entropy decrease for different weights current search session. The 'static' ranking strategies mentioned, e.g. medium-based ranking are attractive ones because they are very simple to implement and do not demand a prohibitively amount of computations. Although the concept of personalized ranking is an attractive one, it carries the penalty of time-consuming calculations. For instance, finding a search target and maintaining target probabilities demands a large number of calculations. In fact, it could be argued that all the work put into computing a search target in order to rank options is akin to swatting a fly with a sledgehammer. Once a search target is known, the searcher could be brought there directly. Another approach is that, if the search target remains constant over a sufficient enough amount of search actions, the search target could be introduced as an additional option. It should then receive the highest ranking. The level of experience of a searcher again determines the time over which the search target should remain constant. With new searchers the window should be large, whereas experienced searchers will benefit from a small window. --R The design of browsing and berrypicking techniques for the on-line search inter- face Augmenting a characterization network with semantical information. Personalized Search Support for Networked Document Retrieval Using Link Inference. Stratified Information Disclosure: A Synthesis between Information Retrieval and Hypermedia. The use of semantic links in hypertext information retrieval. Entropy and Information Theory. Coding and information theory. ter Hofstede ter Hofstede and Hairy Search Trees. A Similarity Measure for Conceptual Graphs. A General Theory for the Evolution of Application Models. Helping the user to select a link. --TR Coding and information theory (2nd ed.) Entropy and information theory Information filtering and information retrieval Helping the user to select a link Design and evaluation of algorithms for image retrieval by spatial similarity The use of semantic links in hypertext information retrieval Augmenting a characterization network with semantic information Genetic Algorithms in Search, Optimization and Machine Learning Information Retrieval A General Theory for Evolving Application Models Personalized Search Support for Networked Document Retrieval Using Link Inference --CTR Michael Huggett , Joel Lanir, Static reformulation: a user study of static hypertext for query-based reformulation, Proceedings of the 2007 conference on Digital libraries, June 18-23, 2007, Vancouver, BC, Canada John E. Leide , Andrew Large , Jamshid Beheshti , Martin Brooks , Charles Cole, Visualization schemes for domain novices exploring a topic space: the navigation classification scheme, Information Processing and Management: an International Journal, v.39 n.6, p.923-940, November
hypermedia;search support;query formulation;information retrieval
314517
A decision-theoretic approach to database selection in networked IR.
In networked IR, a client submits a query to a broker, which is in contact with a large number of databases. In order to yield a maximum number of documents at minimum cost, the broker has to make estimates about the retrieval cost of each database, and then decide for each database whether or not to use it for the current query, and if, how many documents to retrieve from it. For this purpose, we develop a general decision-theoretic model and discuss different cost structures. Besides cost for retrieving relevant versus nonrelevant documents, we consider the following parameters for each database: expected retrieval quality, expected number of relevant documents in the database and cost factors for query processing and document delivery. For computing the overall optimum, a divide-and-conquer algorithm is given. If there are several brokers knowing different databases, a preselection of brokers can only be performed heuristically, but the computation of the optimum can be done similarily to the single-broker case. In addition, we derive a formula which estimates the number of relevant documents in a database based on dictionary information.
Introduction Networked information retrieval (NIR) is a new research area challenged by the rapid growth of the Internet and the widespread use of IR servers like e.g. WAIS or systems supporting the Z39.50 protocol (see e.g. [Kahle et al. 93]). Besides classical applications like bibliographies, more recently digital libraries have become accessible through the internet. The ultimate goal of NIR is to develop systems letting a user access all resources available on the network, but in a way that gives him the impression of a single large IR database. Roughly speaking, there are two major tasks that have to be performed in NIR, namely resource discovery and collection fusion. Given a user query, the former deals with the problem of selecting those databases which should be used for answering the query, whereas the latter deals with the database-specific transformations of the original query and the merging of the results. In this paper, we address the resource discovery issue, which consists of two subtasks, namely database detection and database selection. Database detection can be performed relatively easily, either by exploiting the name conventions used in the domain name service of the internet (e.g. names of ftp servers should start with 'ftp.', names of Web servers with `www.') or by establishing central registries (e.g. the directory-of-servers for WAIS systems). For database selection, there is the problem of precisely formulating the goal that should be reached by performing this task. Some approaches (see section only consider the retrieval quality of the overall NIR task (i.e. resource discovery plus collection fusion). This way, however, the underlying assumptions do not become clear, and it is also difficult to figure out which parts of such a system are doing well and where it fails. For resource discovery alone, no appropriate evaluation measures have been described so far. Author's address: University of Dortmund, Informatik VI, 44221 Dortmund, Germany. Email: fuhr@ls6.informatik.uni-dortmund.de. voice: +49 231 755 2045. fax: +49 231 755 2045. In this paper, we develop a model which defines a decision-theoretic criterion for optimum database selection. This model considers relevance as well as other important factors present in networked IR (e.g. costs for query processing and document delivery). We start from the Probability Ranking Principle (PRP, see [Robertson 77]), where it can be shown that optimum retrieval performance is achieved when documents are ranked according to decreasing probability of relevance. Here performance can be measured either in terms of precision and recall (which, in turn, refer to relevance), or by means of a decision-theoretic model which attributes different costs to the retrieval of relevant and nonrelevant documents. In the following section, we describe the basic model for optimumdatabase selection, thus deriving an optimum selection rule. Then we discuss the consequences of this model for different application situations. In section 4, we present an algorithm for computing the optimum selection for a specific query and a number of databases given. Then we briefly discuss the situation where we have a hierarchic network strucure. Section 6 discusses related work, and the final section presents the conclusions and gives an outlook on further work. Optimum database selection Our model extends the two assumptions underlying the PRP by an additional one for considering the costs of retrieval in different databases: 1. Relevance judgements are based on a binary relevance scale. 2. The relevance judgement for a document is independent of that for any other document. 3. The costs for retrieving a set of documents from a database are independent of those for other queries or other databases. The first assumption also can be generalized to multi-valued scales, (see [Bookstein 83] for the model and [Fuhr 89] for an application of this model), but here we want to avoid burdening our presentation with features that are not essential. The second assumption not only excludes effects due to similarity or other kinds of dependence between documents, we also ignore the effect of duplicates (i.e. retrieval of the same document from different databases). The third assumption (which we have added to those from the PRP) restricts the nature of the cost factors such that we can regard costs for specific databases and queries in isolation; thus, our model is not applicable if e.g. a database provider offers discount rates for retrieval from multiple databases from the same provider or for a set of queries In the following, we assume a basic setting as follows: A broker has access to a set of IR databases to which it may send a query. In response, each database produces a ranked list of documents, and the broker may request any number of documents from this list. Each database has its own performance curve in terms of recall and precision, and there are database-specific costs for the retrieval of documents. Given a specific query, we now want to retrieve a maximum number of relevant documents at minimum cost, i.e. one of the two parameters is specified by the user, and the broker aims at optimizing the other one. More specifically, in order to select the databases to be used for processing a query, for each database D i the broker estimates a function C R giving the specific costs for retrieving n relevant documents from this database. Based on this information, a global function C R (n) can be derived which specifies the minimum costs for retrieving n relevant documents from all databases combined. As usual in decision-theoretic models, costs may stand for money as well as for computing time, response time or the time a user spends for doing her job. On a coarse-grained level, we may assume that there is a cost function C s retrieving k documents from database D i . However, in most cases the cost can be split up in fixed costs C 0 processing a query and a factor C d for each document delivered from the query result. With sign(:) denoting the signum function, we have In order to consider relevance, we assume that we know the following parameters for each database ffl the expected recall-precision curve P i (R) (for the specific query) and ffl the expected number of relevant documents R i in the database. Then we estimate the expected number of documents s i to be selected in order to retrieve r i relevant documents from database D i via the relationship r i =s As in traditional IR, we also assume user costs (or benefits) C R and C N for a user viewing a relevant document or a nonrelevant document, respectively. Combining equations 1 and 2, we can estimate the cost for retrieving r i relevant documents from database Given the database-specific cost functions, we can estimate the overall minimum costs C R (n) for retrieving n relevant documents. For that, let us assume that we have l databases and the numbers r i of relevant documents to be retrieved from the different databases are represented as a vector Now we can formulate the optimum selection rule: For a given number n of relevant documents to be retrieved, determine ~r such that the expected overall cost C R (n) is minimum, i.e. ~r l This selection rule is independent of the type of the database-specific cost function. Thus, it holds also for alternatives to the function (3) - as long as the cost function C R does not depend on other queries or other databases. 3 Interpretation of results Now we want to discuss the consequences of the cost functions 3 and 4. For that, we will ignore the fact that C R (n) is a discrete function and assume it to be continuous. Then we can make some observations that hold for the optimum solution. First, we can make a general statement about those databases D i that contribute to the query result, i.e. r i ? 0. By using Lagrange multipliers, we find out that is equal for all these databases. Roughly speaking, this means that the costs for the last relevant document retrieved from each of the databases involved are equal. If we asssume the typical situation with a cost function like eqn (3) and a monotonously decreasing recall-precision curve, then we can conclude that the cost differential is monotonously increasing. In order to make further observations, we have to distinguish certain cases depending on the structure of the cost factors: meaning database documents retrieved from D i documents retrieved (selected) from D i relevant documents in D i expected recall-precision function for D i costs for selecting n documents from D i fixed costs for query processing in D i costs for retrieving a document from D i expected costs for retrieving n relevant documents from D i user costs for viewing a relevant document user costs for viewing a nonrelevant document expected global costs for n relevant documents R recall precision query d document indexing weight of term t j in document dm of indexing weights for term t j in database search term weight of term t j of database D i (# documents) Table 1: Notations used throughout this paper 1. C 0 Assuming that we only have to pay per document delivered, but not for processing the query, we get C R databases. Sample functions are depicted in figure 1. Since a specific number of total relevant documents implies an equal slope @C R for all curves, all databases for which there is a point with this slope on the curve will contribute to the optimum solution. In figure 1, the points corresponding to two solutions a and b are marked, showing that for the first solution, only two of the databases are involved. The set of databases involved grows as the total number of relevant documents increases; a database contributing to a small number always will stay involved for larger numbers, too. This feature is important for incremental retrieval where a user specifies neither the cost nor the number of relevant documents in advance. If, in addition, we have equal costs per document C d i for all databases, then we can also make statements about recall and precision. In this case, the databases involved operate at the same precision level. Figure 2 shows the points for four different solutions e.g. for b, only databases 1 and 4 reach this precision level. 2. C 0 l]. If there are databases with nonzero query processing costs, then the set of databases that actually contribute to the solution will depend on the total number n of relevant documents. Here databases involved for small values of n may not contribute to the optimum solution as n grows (see the example in table 2). With regard to incremental retrieval, we have a conflict here: Given that the user first requested n 1 documents and then another documents, the minimum costs for this stepwise procedure may be higher than for retrieving relevant documents at once. a a Figure 1: Sample cost functions for C 0 solutions a, b Towards application With the derivation of the overall cost function C R i (n) in eqn (4), we have defined a rule for optimum database selection. So each method for database selection should aim at approximating this optimum. In most applications, it will be difficult to estimate the parameters occurring in C R This situation is similar to (or even worse than) the difficulties with the PRP, where the estimation of the probability of relevance of a document also poses problems. However, with our model in mind, we can start with crude approximations of the parameters, apply it and then check how far our estimates deviate from the real parameters - thus telling us where we should spend effort for improving our methods. In the following, we describe a general procedure for applying our model, and we also describe an algorithm for computing the optimum C R i (n). In principle, the following steps have to be performed: 1. For each database D i , estimate the number of relevant documents R i . 2. For each database D i , determine (or assume) a recall-precision function P i (R). 3. Compute the database-specific cost functions C R 4. Derive the global cost function C R (n) as combination of databases such that, for each value of n, the costs are minimum. For the first step, the appendix describes a method for estimating R i in the case of probabilistic systems and linear retrieval functions; it follows that the estimation procedure treats databases like metadocuments, where the formula for estimating R i has the same structure as the retrival function for ordinary documents. So (at least in this special case) this step can be performed rather efficiently, even for a large number of databases. The second step - estimating the recall-precision (RP) curves of the databases - poses more difficulties: little is known about the behaviour of query-specific RP curves. Results from the TREC conference [Harman 95] indicate that there is a great variation in these curves, so further research will be required for achieving good estimates of this parameter. For the time being, heuristic methods will have to be applied instead. For example, a simple assumption would be a linear function, with thus leading to the approximation has to be chosen. In the absence of any query-specific knowledge, one might assume that the RP function is rR R R R Pa c d Figure 2: Sample recall-precision curves with optimum solutions equal for all queries. However, in some cases additional information may be available. In practical applications with a set of heterogeneous databases, very often a query contains a condition which cannot be evaluated by the IR system running a specific database; then already P (0) will be very low (see [Fuhr 96]). It also may be feasible to assume functions that are typical for certain kinds of systems, e.g. Boolean vs. probabilistic systems. In the third step, we use R i and P i (R) from the previous steps plus the cost factors C 0 for deriving the database-specific cost functions C R Given these parameters, we now describe a divide-and-conquer algorithm for computing the overall optimum cost function C R (n). Our algorithm is based on the following assumptions: 1. For each database, the costs per additional relevant document are monotonously increasing (i.e. for all i and all k ? 0, C R 2. We do not consider fractions of (expected) relevant documents for individual databases. The first assumption is essential for reducing the computational complexity of the algorithm. Without this assumption, it is shown in [Goevert 97] that our optimizing problem is equivalent to the knapsack problem, and thus it is NP-complete. The second assumption keeps the algorithm simple; below, we also discuss alternatives. The algorithm is shown in figure 3. Here the procedure costrel gives us the database-specific costs retrieving n relevant documents from D i . The overall optimum cost function is computed in procedure ocf. Given a list S of databases and a maximum number n of relevant documents to be retrieved, this procedure returns a data structure giving the vectors r and the costs C R n. The crucial point in this procedure is the merge step of the divide-and-conquer strategy: when we merge two cost functions C1 and C2, for each number of relevant documents, we test whether a single function or the combination of both C1 and C2 is cheapest. Here we exploit the fact that the cost differentials are monotonously increasing and that in case both arguments contribute to the optimum solution, the cost differentials must be equal. Since we have discrete cost functions, we consider the discrete cost differences d1 and d2 instead of the differentials and assume that at each point, the differentials lie between the corresponding two subsequent differences. An example for the application of this algorithm is shown in table 2. For retrieving n relevant documents from l databases, this algorithm takes O(n \Delta l \Delta log l) time. TYPE listofdb: LIST OF database; fcost function as array with #relevant docs as indexg fcost function contains costs and list of document requestsg numdocs: integer fdocument request contains database id and # docsg fgives costs and number of docs to be retrieved for getting r relevant docs from database db, yields infinity cost if r exceeds total number of relevant docsg fcomputes optimum cost function for list of databases Sg BEGIN C[0].cost := 0; C[0].gdl := empty(); fcompute elements of cost functiong costrel(db,i,C[i].cost, gd.numdocs); C[i].gdl := insert(empty(),gd); OD divide and conquerg divide: split(S,S1,S2); conquer: C1 := ocf(S1,n); C2 := ocf(S2,n); merge: fmerge cost functionsg point of equal cost differenceg C2[j2+1].cost-C2[j2].cost FI; C1[i].cost AND c12 ! C2[i].cost THEN C[i].cost := c12; C[i].gdl := concat(C1[j1].gdl,C2[j2].gdl) C1[i].cost ! C2[i].cost THEN C[i] := C1[i] END. Figure 3: Algorithm for computing optimum cost function As mentioned above, we have not considered that a database also may yield fractions of (expected) relevant documents, which also could contribute to the requested sum of relevant documents (e.g. our algorithm only yields an approximation of the optimum solution. An algorithm for computing the optimum should not restrict to integer values for the number of relevant documents r i from each database. The correct restriction would be to assume integer values for the number of documents selected, from which the corresponding fractions of relevant documents are derived. However, this approach affects the complexity of the merge step (which is now n), where all possible intermediate points between i and would have to be computed. In the worst case where we would have to retrieve (almost) all documents of a database D i in order to find the last relevant one, there would be an intermediate point for each document in the database. Since different databases may yield different intermediate points, we would have to compute up to points. Thus, the the corresponding algorithm would take O(N \Delta l \Delta log l) in the worst case. The corresponding algorithm is described in [Goevert 97], along with a modified version which restricts the number of intermediate points between i and to a given constant c by dropping additional points. Thus, the algorithm presented here corresponds to the correct optimum is computed with cost gdl cost gdl cost gdl 7 22 h(14; 1)i 26 h(43; 2)i 21 h(6; 1); (13; 2)i Table 2: Example for computing optimum costs of two databases 5 Multiple brokers So far, we have assumed that there is a single broker which knows all databases in question. For an information system that aims at covering all information sources that can be reached via a network, this assumption is not realistic. For this reason, we now consider the case of multiple brokers, where each broker knows some databases and/or some other brokers. A reasonable extension of our decision-theoretic approach would be the development of a procedure allowing a broker to decide whether or not to contact another broker for processing a specific query. There are two possibilities for representing metaknowledge about another broker B in broker A: 1. Treat B like a database. Thus, a typical broker would represent a large database. In the general case, this poses obvious difficulties for cost estimation, since a broker stands for a number of databases with different costs, modelling broker costs can only be an approximation of the real costs. Especially when several databases have to be used for processing a query, the approximation may be totally wrong. However, even if we have no query processing costs or equal costs per document for all databases of broker B, then we still cannot make a proper estimate of the costs that would be caused by sending the query to broker B. The reason is that in applying equation (3) for estimating these costs, the sum (where r i denotes the number of relevant documents retrieved from database D i ) cannot be expressed as function of the sums 2. Use more detailed metaknowledge about B. If B keeps the sum of probabilistic weights (i.e. the weights v j from appendix A) for each query condition and each database, then the knowledge about all databases of B can be modelled as a distribution over the v j s. Assuming a normal distribution, this distribution can be represented as a pair of mean and variance. Let A possess this knowledge about B. Given this information for all conditions of a (linear) query, the distribution of the numbers of relevant documents w.r.t. the whole query again is a normal distribution. Thus, A could estimate the probability that a specific database known by B has at least r relevant documents. Knowing the total number of databases managed by B, A can also estimate the probability that there is at least one such database with more than R documents. However, what we actually need is the expected cost E(C R (n)) for retrieving n relevant documents via B. Comparing these estimates with the corresponding figures of A's databases would yield the optimum solution. Even if we had the same simplified cost assumptions as above, we would have to sum up the probabilities for all possible cases, which is not practical in most cases. From these considerations, it follows that our approach cannot be used for deciding whether or not to contact another broker for processing the current query. So we would have to use other (heuristic) criteria for this decision. For this purpose, we could use the number of relevant documents that can be accessed via broker B. This figure can be estimated by both methods mentioned above, where the latter also gives us the variance; thus, we could decide to access B only in case its number of relevant documents exceeds a specific threshold with a certain probability. Now assume that we have such a decision procedure that determines which brokers to access and which not. How can we achieve an optimum selection of databases in this case? The clue to the solution of this problem lies in the divide-and-conquer algorithm described in section 4. Let us assume that different brokers access disjoint sets of databases. Then we can perform the divide step according to the broker structure. Thus, if broker A contacts brokers B and C, then both B and C first determine their local optimum cost functions C R (n) and send them back to A. For A, these two functions (we could also add additional overhead costs for invoking another broker) are treated in the same way as those of its local databases in order to arrive at a global optimum. Thus, for a specific number of relevant documents, A determines how many documents to be requested from B and C, which, in turn, split up these requests for their local databases. Of course, the whole procedure can be invoked recursively in case B or C also contact other brokers, and so on. In order to apply this procedure for the case where databases may be "served" by more than one broker, we have to devise a communication structure that considers each database at most once. This is most important for determining the optimum cost function, but also plays a role in estimating the number of relevant documents accessible via a certain broker. First, let us assume that two brokers which know each other also synchronize their metaknowledge about databases. That is, if they have "overlapping" metaknowledge referring to the same databases or other brokers, then each of them passes only information about the nonoverlapping sources to the other. However, this local strategy is not able to avoid any overlapping of a pair of brokers, since both may be linked indirectly to the same knowledge source. For the task of determining the optimum cost function, this problem can be solved dynamically in the following way: When a broker B sends its local optimum function back to the requesting broker A, it appends the identifications of the databases involved in the optimum solution. Thus, A will be able to detect duplicate databases, and request a revised cost function without these specific databases. In addition, B also could store this information in order to be considered for future requests from A (assuming that A always calls the same set of brokers, and that brokers never drop a database). Finally, metaknowledge propagation also raises the issue of maximum propagation distance. If for any pair of related brokers (A; B), A has metaknowledge about everything B knows, then any broker will have metaknowledge about all sources that can be reached directly or indirectly. On the other hand, this means that knowledge about a new database is propagated to all brokers in the world! One possible strategy for overcoming this situation might be that a broker does not pass on metaknowledge that it has about other brokers. 6 Related work The Gloss system described in [Gravano et al. 94] and [Gravano & Garcia-Molina 95] is similar to our approach in that it also focuses on the task of database selection. However, Gloss is based on the vector space model and thus does not refer to the concept of relevance, which is explicitly justified in [Gravano & Garcia-Molina 95]: "To see a problem with this rank, consider a database db that contains, say, three relevant documents for some query q. Unfortunately, it turns out that the search engine at db does not include any of these documents in the answer to q. So the user will not benefit from these three relevant documents." Obviously, the authors of Gloss are unaware of probabilistic IR models. Thus, they come up with a heuristic solution: They define several measures of goodness, one of which is the sum of RSVs of all documents in a database w.r.t. the current query. Actually, this parameter is equivalent to the estimated number of relevant documents as derived in the appendix of this paper. The experiments performed with Gloss confirm the general applicability of this strategy; however, the evaluation was restricted in that only the distribution of RSVs was considered, and no attempt was made to consider relevance in terms of retrieval quality. Since Gloss ranks databases only according to values of this goodness measure, this corresponds to the most simple case in our model, where the cost parameters as well as the recall-precision curves are the same for all databases. The approach presented in [Callan et al. 95] covers both problems of database selection and collection fusion. With respect to the first task, a collection ranking formula is developed; this formula is similar to document retrieval based on tf \Delta idf weighting, where collections are treated like documents. In order to evaluate the quality of this ranking, it is compared with the ideal ranking (based on the actual number of relevant documents) by summing up the mean squared error between the ideal rank number and the actual rank number (assigned by the algorithm) of each collection. However, considering the ranks only ignores the differences in the number of relevant documents; e.g. two subsequent ranks may differ by a single relevant document or by a magnitude in these numbers. In contrast, using the cost measures described in this paper, a more objective and realistic evaluation of database selection is possible. Both approaches mentioned before as well as the estimation formula given in the appendix of this paper are based on a term-wise weighting of collections. A query-based strategy is described in [Voorhees et al. 95]. Here relevance feedback information from a set of training queries is used in order to rank collections for a new query. The Harvest system ([Bowman et al. 94]) is a distributed search system for data on the internet. A 'gatherer' collects information about the local data and passes it to a broker. Thus, the Harvest broker contains indexes of documents, whereas the brokers considered here only store indexes of databases (i.e. the dictionaries), which is much less data. Harvest brokers may be organized in hierarchies. However, Harvest leaves the broker specification open, in order to allow for different designs. In the system design of the University of Michigan Digital Libary project ([Atkins et al. 96]), there is a 'mediator' which, among other tasks, also has to perform database selection. The metadata describing a source contains information about content and prices as well as about the funtionality and the interface of the search engine managing the source. So far, no description of the selection algorithm used has been published. There are also some approaches (e.g. [Danzig et al. 92]) which tackle the problem of database selection from the opposite side: By assuming that the overall system may decide in which database a new document should be placed, the goal is to maximize the differences in content between the databases involved. Thus, the task of database selection becomes easier. However, these approaches are more in the spirit of distributed database systems where data placement is related to efficiency issues. 7 Conclusions and outlook Database selection is a major problem in networked information retrieval. In contrast to other, more heuristic approaches, we have developed a theoretical model which yields an optimum solution in a decision-theoretic sense. In order to apply this model, the cost factors for query processing and document delivery, the expected recall-precision curve and the expected number of relevant documents must be known for each database. The estimation of the latter two parameters is crucial for a successful application of our model. We have started experimental investigations of these issues. As the major benefit of the work presented here, we view our model as a framework for all approaches dealing with database selection. Since our model comprises all relevant parameters, it helps in making the task of database selection more transparent. This is important in analyzing experimental results, e.g. determining whether the estimation of the number of relevant documents or of the recall-precision curve failed. As we have shown, most work done so far works with simplified assumptions with respect to the parameters involved in our model. Thus, we may distinguish different classes of tasks, ranging from rather simplified approaches to the most general task where all parameters have to be considered. The approach described here is currently being implemented as part of the information brokering system developed within the German digital library project MeDoc (see [Boles et al. 96]). MeDoc aims at the development of a virtual digital library (for computer science) involving fulltext as well as bibliographic databases. The brokering system has to provide access to a range of heterogeneous systems, e.g. WAIS, NCSTRL and Z39.50-based systems. A first prototype of the system has been released recently. The grand challenge that we are facing currently is the availability of numerous databases already established on the Internet, where we have no possibility to change the placement of documents, neither the indexing nor the retrieval method used in a system, and the task is to perform efficient and effective retrieval while giving the user the impression of a single large, virtual database. --R Toward Inquiry-Based Education Through Interacting Software Agents MeDoc Information Broker - Harnessing the Information in Literature and Full Text Databases http://SunSite. Outline of a General Probabilistic Retrieval Model. Harvest: A Scalable Searching Distributed Collections with Interference Networks. Distributed Indexing of Autonomous Internet Services. Optimum Polynomial Retrieval Functions Based on the Probability Ranking Principle. Extending Probabilistic Datalog. Database Selection in Networked Information Retrieval Systems. Generalizing GIOSS to Vector-Space Databases and Broker Hierarchies The Effectiveness of GlOSS for the Text Database Discovery Problem. Overview of the Second Text Retrieval Conference (TREC-2) Interfaces for Distributed Systems of Information Servers. The Probability Ranking Principle in IR. Evaluation of an Inference Network-Based Retrieval Model Learning Collection Fusion Strategies. On Modeling Information Retrieval with Probabilistic Inference. The expected number of relevant documents in D can be approximated by E(reljq --TR Optimum polynomial retrieval functions based on the probability ranking principle Evaluation of an inference network-based retrieval model Interfaces for distributed systems of information servers The effectiveness of GIOSS for the text database discovery problem On modeling information retrieval with probabilistic inference Overview of the second text retrieval conference (TREC-2) Searching distributed collections with inference networks Learning collection fusion strategies The Harvest information discovery and access system Object-oriented and database concepts for the design of networked information retrieval systems A probabilistic model for distributed information retrieval Students access books and journals through MeDoc Effective retrieval with distributed collections Evaluating database selection techniques Toward Inquiry-Based Education Through Interacting Software Agents Generalizing GlOSS to Vector-Space Databases and Broker Hierarchies Provider Selection - Design and Implementation of the Medoc Broker --CTR Jamie Callan , Fabio Crestani , Henrik Nottelmann , Pietro Pala , Xiao Mang Shou, Resource selection and data fusion in multimedia distributed digital libraries, Proceedings of the 26th annual international ACM SIGIR conference on Research and development in informaion retrieval, July 28-August 01, 2003, Toronto, Canada Leif Azzopardi , Mark Baillie , Fabio Crestani, Adaptive query-based sampling for distributed IR, Proceedings of the 29th annual international ACM SIGIR conference on Research and development in information retrieval, August 06-11, 2006, Seattle, Washington, USA Luo Si , Jamie Callan, Using sampled data and regression to merge search engine results, Proceedings of the 25th annual international ACM SIGIR conference on Research and development in information retrieval, August 11-15, 2002, Tampere, Finland James C. French , Allison L. Powell, Metrics for evaluating database selection techniques, World Wide Web, v.3 n.3, p.153-163, 2000 Henrik Nottelmann , Norbert Fuhr, Evaluating different methods of estimating retrieval quality for resource selection, Proceedings of the 26th annual international ACM SIGIR conference on Research and development in informaion retrieval, July 28-August 01, 2003, Toronto, Canada Kartik Hosanagar, A utility theoretic approach to determining optimal wait times in distributed information retrieval, Proceedings of the 28th annual international ACM SIGIR conference on Research and development in information retrieval, August 15-19, 2005, Salvador, Brazil Shengli Wu , Fabio Crestani, Distributed information retrieval: a multi-objective resource selection approach, International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, v.11 n.Supplement, p.83-99, September Unified utility maximization framework for resource selection, Proceedings of the thirteenth ACM international conference on Information and knowledge management, November 08-13, 2004, Washington, D.C., USA Fabio Crestani , Shengli Wu, Testing the cluster hypothesis in distributed information retrieval, Information Processing and Management: an International Journal, v.42 n.5, p.1137-1150, September 2006 Jared Cope , Nick Craswell , David Hawking, Automated discovery of search interfaces on the web, Proceedings of the fourteenth Australasian database conference, p.181-189, February 01, 2003, Adelaide, Australia Sally McClean, Result merging methods in distributed information retrieval with overlapping databases, Information Retrieval, v.10 n.3, p.297-319, June 2007 Christoph Baumgarten, Retrieving Information from a Distributed Heterogeneous Document Collection, Information Retrieval, v.3 n.3, p.253-271, October 2000 Modeling search engine effectiveness for federated search, Proceedings of the 28th annual international ACM SIGIR conference on Research and development in information retrieval, August 15-19, 2005, Salvador, Brazil Rinat Khoussainov , Nicholas Kushmerick, Specialisation dynamics in federated web search, Proceedings of the 6th annual ACM international workshop on Web information and data management, November 12-13, 2004, Washington DC, USA Panagiotis G. Ipeirotis , Luis Gravano, When one sample is not improving text database selection using shrinkage, Proceedings of the 2004 ACM SIGMOD international conference on Management of data, June 13-18, 2004, Paris, France semisupervised learning method to merge search engine results, ACM Transactions on Information Systems (TOIS), v.21 n.4, p.457-491, October Nick Craswell , Peter Bailey , David Hawking, Server selection on the World Wide Web, Proceedings of the fifth ACM conference on Digital libraries, p.37-46, June 02-07, 2000, San Antonio, Texas, United States Allison L. Powell , James C. French , Jamie Callan , Margaret Connell , Charles L. Viles, The impact of database selection on distributed searching, Proceedings of the 23rd annual international ACM SIGIR conference on Research and development in information retrieval, p.232-239, July 24-28, 2000, Athens, Greece James Caverlee , Ling Liu , Joonsoo Bae, Distributed query sampling: a quality-conscious approach, Proceedings of the 29th annual international ACM SIGIR conference on Research and development in information retrieval, August 06-11, 2006, Seattle, Washington, USA Clement Yu , King-Lup Liu , Weiyi Meng , Zonghuan Wu , Naphtali Rishe, A Methodology to Retrieve Text Documents from Multiple Databases, IEEE Transactions on Knowledge and Data Engineering, v.14 n.6, p.1347-1361, November 2002 James C. French , A. C. Chapin , Worthy N. Martin, Multiple viewpoints as an approach to digital library interfaces, Journal of the American Society for Information Science and Technology, v.55 n.10, p.911-922, August 2004 Matthias Bender , Sebastian Michel , Peter Triantafillou , Gerhard Weikum , Christian Zimmer, Improving collection selection with overlap awareness in P2P search engines, Proceedings of the 28th annual international ACM SIGIR conference on Research and development in information retrieval, August 15-19, 2005, Salvador, Brazil James C. French , Allison L. Powell , Jamie Callan , Charles L. Viles , Travis Emmitt , Kevin J. Prey , Yun Mou, Comparing the performance of database selection algorithms, Proceedings of the 22nd annual international ACM SIGIR conference on Research and development in information retrieval, p.238-245, August 15-19, 1999, Berkeley, California, United States Panagiotis G. Ipeirotis , Luis Gravano, Distributed search over the hidden web: hierarchical database sampling and selection, Proceedings of the 28th international conference on Very Large Data Bases, p.394-405, August 20-23, 2002, Hong Kong, China Josiane Xavier Parreira , Sebastian Michel , Matthias Bender, Size doesn't always matter: exploiting pageRank for query routing in distributed IR, Proceedings of the international workshop on Information retrieval in peer-to-peer networks, November 11-11, 2006, Arlington, Virginia, USA Fang Liu , Clement Yu , Weiyi Meng, Personalized Web Search For Improving Retrieval Effectiveness, IEEE Transactions on Knowledge and Data Engineering, v.16 n.1, p.28-40, January 2004 James C. French , Allison L. Powell , Fredric Gey , Natalia Perelman, Exploiting a controlled vocabulary to improve collection selection and retrieval effectiveness, Proceedings of the tenth international conference on Information and knowledge management, October 05-10, 2001, Atlanta, Georgia, USA Jamie Callan , Margaret Connell, Query-based sampling of text databases, ACM Transactions on Information Systems (TOIS), v.19 n.2, p.97-130, April 2001 Henrik Nottelmann , Gudrun Fischer, Search and browse services for heterogeneous collections with the peer-to-peer network Pepper, Information Processing and Management: an International Journal, v.43 n.3, p.624-642, May, 2007 Jack G. Conrad , Xi S. Guo , Peter Jackson , Monem Meziou, Database selection using actual physical and acquired logical collection resources in a massive domain-specific operational environment, Proceedings of the 28th international conference on Very Large Data Bases, p.71-82, August 20-23, 2002, Hong Kong, China James C. French , Allison L. Powell , Fredric Gey , Natalia Perelman, Exploiting Manual Indexing to Improve Collection Selection and Retrieval Effectiveness, Information Retrieval, v.5 n.4, p.323-351, October 2002 M. Elena Renda , Umberto Straccia, Automatic structured query transformation over distributed digital libraries, Proceedings of the 2006 ACM symposium on Applied computing, April 23-27, 2006, Dijon, France Henri Avancini , Leonardo Candela , Umberto Straccia, Recommenders in a personalized, collaborative digital library environment, Journal of Intelligent Information Systems, v.28 n.3, p.253-283, June 2007 Milad Shokouhi , Justin Zobel , Saied Tahaghoghi , Falk Scholer, Using query logs to establish vocabularies in distributed information retrieval, Information Processing and Management: an International Journal, v.43 n.1, p.169-180, January 2007 Allison L. Powell , James C. French, Comparing the performance of collection selection algorithms, ACM Transactions on Information Systems (TOIS), v.21 n.4, p.412-456, October Sebastian Michel , Matthias Bender , Nikos Ntarmos , Peter Triantafillou , Gerhard Weikum , Christian Zimmer, Discovering and exploiting keyword and attribute-value co-occurrences to improve P2P routing indices, Proceedings of the 15th ACM international conference on Information and knowledge management, November 06-11, 2006, Arlington, Virginia, USA Josiane Xavier Parreira , Sebastian Michel , Gerhard Weikum, p2pDating: Real life inspired semantic overlay networks for Web search, Information Processing and Management: an International Journal, v.43 n.3, p.643-664, May, 2007 Yannis Tzitzikas , Nicolas Spyratos , Panos Constantopoulos, Mediators over taxonomy-based information sources, The VLDB Journal The International Journal on Very Large Data Bases, v.14 n.1, p.112-136, March 2005 Thomas Eiter , Michael Fink , Hans Tompits, A knowledge-based approach for selecting information sources, Theory and Practice of Logic Programming, v.7 n.3, p.249-300, May 2007 Robert M. Losee , Lewis Church Jr., Information Retrieval with Distributed Databases: Analytic Models of Performance, IEEE Transactions on Parallel and Distributed Systems, v.15 n.1, p.18-27, January 2004
resource discovery;probabilistic retrieval;probability ranking principle;networked retrieval
314522
Interface and data architecture for query preview in networked information systems.
There are numerous problems associated with formulating queries on networked information systems. These include increased data volume and complexity, accompanied by slow network access. This article proposes a new approach to a network query user interfaces that consists of two phases: query preview and query refinement. This new approach is based on the concepts of dynamic queries and query previews, which guides users in rapidly and dynamically eliminating undesired records, reducing the data volume to a manageable size, and refining queries locally before submission over a network. Examples of two applications are given: a Restaurant Finder and a prototype for NASA's Earth Observing Systems Data Information Systems (EOSDIS). Data architecture is discussed, and user feedback is presented.
INTRODUCTION The exploration of networked information resources becomes increasingly difficult as the volume of data grows. We identified at least the following problems of information retrieval in networked environments: . Data Volume: The amount of data available is rapidly increasing. For example, some sensor data in NASA's Earth Observing Systems is growing at the rate of gigabytes per day. Organizing and indexing the volume of new records is difficult. Since many users seek specific records, a rapid way to focus on information of interest is needed. . Data Diversity: Data come in a variety of forms, such as text, image, audio, movies, or combinations of these. Some formats are application specific, making it difficult for search and retrieval tools to identify and categorize them. . Slow Network Access: Slow network access is a well-known problem of information retrieval in networked environments. When network traffic is high, data transmission rates deteriorate. Therefore, user task completion is accelerated if the number of network are reduced. In this paper, we present a user interface to support efficient query formulation for networked information systems using dynamic queries and query previews. Dynamic queries are an extension of graphical query interfaces based on aggregation/generalization hierarchies [1][2]. Dynamic query user interfaces apply the principles of direct manipulation and imply: . Visual representation of the query . Visual representation of the results . Rapid, incremental, and reversible control of the query . Selection by pointing, not typing . Immediate and continuous feedback Dynamic queries involve the interactive control by users of visual query parameters that generate rapid, animated, and visual displays of database search results. As users adjust sliders or buttons, results are updated rapidly (within 100 msec). The enthusiasm users have for query previews emanates from the sense of control they gain over the query. Empirical results have shown that dynamic queries are effective for novice and expert users to find trends and spot exceptions [3,4,5]. Early implementations of dynamic queries used relatively small files of a few thousand records. They required the data to be stored in memory to guarantee rapid update of the display. We developed algorithms and data structures that allow larger files to be handled (up to 100,000 records) [6] but slow network performance and limited local memory are obstacles when trying to use dynamic queries for large distributed databases. Query previews offer a solution to this problem. We describe a simple example of query previews, the Restaurant Finder, to illustrate the basic principles. Then the two-phase query formulation process and a system architecture are presented. A dynamic query user interface prototype for NASA's EOSDIS (Earth Observing Systems - Data Information Systems) is used to show how this approach has been applied. Evaluations from expert reviews and a controlled experiment are reported. Finally, related work and conclusions are presented. 2. QUERY PREVIEWS Traditionally, there are two strategies for information seekers to obtain data from large information systems [7]. Analytical strategies depend on careful planning, recall of query terms, iterative query formulation, and examination of results. Browsing strategies depend on user recognition of relevant information, and therefore they are heuristic and opportunistic. Analytical strategies require users to have a good knowledge of the application domain, and be skillful in reasoning. Browsing strategies require less knowledge, but can be difficult when the volume of data is large. Keyword-oriented or form-based interfaces are widely used for formulating queries on networked information systems. They often generate zero-hit queries, or query results that contain a large number of results which users must browse. Users can limit how many results a query returns (e.g. 20) to limit the duration of the search but it is impossible to estimate how much data was not returned, and how representative of the entire search space the results are. Users also often fail to find data if appropriate keywords cannot be guessed. Query previews combine browsing and querying. Summary data (such as the number of records for each attribute value) guide users to narrow the scope of their queries. The summary data, which varies with the database and application, provides an overview of the database from several perspectives. It is generally orders of magnitude smaller than the database itself, and can be downloaded quickly to drive a dynamic query interface locally on the user's machine. Therefore, query previews support a dynamic query user interface where the visual display of the summary is updated in real time in response to users' selections. Users can rapidly reduce the number of records to a manageable size. Query previews empower users to perform more complex searches by using visual strategies and have many advantages: . reduce zero-hit queries . reduce network activity and browsing effort by preventing the retrieval of undesired records . represent statistical information of the database visually to aid comprehension and exploration . support dynamic queries, which aids users to discover database patterns and exceptions . suitable to novice, intermittent, or frequent users 3. A SIMPLE EXAMPLE OF QUERY PREVIEW: THE RESTAURANT FINDER The Restaurant Finder (Figure 1a and 1b) illustrates the concept of visual interaction with summary data, the essence of dynamic query previews. The Restaurant Finder is designed to help users identify restaurants that match certain criteria. Users first specify criteria of the restaurants they want, such as type of food or price range. This reduces the number of selected restaurants to a more manageable size (Figure 1b). The request is then submitted to the network, which retrieves more data on the selected restaurants. Users can then continue to refine their queries with additional, more specific, criteria. Figure 1a: Restaurant Finder. Users can choose an area on the map and make choices with buttons and sliders. Figure 1b: Restaurant Finder. The user has now selected 2 cuisine types, a price range, and a geographical area, reducing the number of restaurant to review to 95 as shown on the result bar which is updated continuously as users adjust their queries. Consider a database of 50,000 restaurants in the mid-Atlantic region. The Restaurant Finder's user interface provides sliders and buttons for selecting desired cuisine, range of cost, range of hours, geographic regions, rating, and accepted charge cards. As selections are made, the result bar shown at the bottom of the screen changes length proportionally to the number of selected restaurants that satisfy the users' selection (possibly thousands of restaurants). Zero-hit queries are eliminated: users can quickly see if there are any Chinese restaurants open after midnight and they will rapidly realize that there are no cheap French restaurants in the DC area. Database distributions are visible: users may discover that there are more Chinese restaurants than Italian restaurants, but more Italian restaurants are open after midnight. In the query preview, only summary data is downloaded from the network, allowing real time interaction and eliminating network delays until a useful subset of the data has been identified. Then more details will be downloaded from the network about this subset (e.g. geographical location indicated on a zoom-able local map, data for parking availability, number of seats, or handicapped access) to allow users to refine their query. Finally users can click on individual restaurants and review menus and directions to make the final selection. 4. MAIN EXAMPLE AND PROTOTYPE: THE CASE OF EOSDIS We use the NASA's Earth Observing System Data Information System (EOSDIS) to illustrate our two-phase query preview approach. EOSDIS SCIENCE Diverse users (scientists, teachers, students etc.) can retrieve earth science data from hundreds of thousands of datasets. Datasets, named collections of data with authoritative metadata, contain pictures, measurements, or processed data, from nine data centers around the country. Standard EOSDIS metadata includes spatial coverage, time coverage, type of data, sensor type, campaign name, level of processing etc. Classic form fill-in interfaces for EOSDIS (Figure 2) permit searches of the already large holdings but zero-hit queries are a problem and it is difficult to estimate how much data is available on a given topic and what to do to increase or reduce the result set. Figure 2: Classic form fill-in interfaces for EOSDIS (Figure 2) permit searches of the already large holdings but zero-hit queries are a problem and it is difficult to estimate how much data is available on a given topic. PROTOTYPES An early version of our two phase approach was implemented in Visual Basic [8]. Then a more complete prototype was implemented in Tcl/Tk (also available in video [9]) and more recently a working Java implementation was prepared on the World-Wide Web (WWW) [10]. The interface consists of two phases: query preview and query refinement. EOSDIS QUERY PREVIEW In the query preview (Figure 3), users select rough ranges for three attributes: geographical location (a world map with 12 regions is shown at the top of the screen), parameters (a menu list of parameters such as vegetation, land classification or precipitation), and temporal coverage (in the lower right). The spatial coverage of datasets is generalized into continents and oceans. The temporal coverage is defined by discrete years. The number of datasets for each parameter, region, and year is shown on preview bars. The length of the preview bars is proportional to the number of the datasets containing data corresponding to the attribute value. At a glance users can see that the datasets seem to cover all areas of the globe, but there is more data on North America than South America. Users can also see that parameters and years are covered relatively uniformly in this hypothetical EOSDIS dataset collection. The result preview bar, at the bottom of the interface, displays the total number of datasets. Only rough queries are possible since the spatial coverage of datasets are generalized into continents and oceans and the temporal coverage is defined by discrete years. A query is formulated by selecting attribute values. As each value is selected, the preview bars in the other attribute groups adjust to reflect the number of datasets available. For example, users might be interested only in datasets that contain data for North America, which are selected by clicking on the North America checkbox (left of the map) or by clicking on the image of North America on the map. All the preview bars changes in a fraction of a second (see Figure 3b) to reflect the distribution of datasets for North America only. The result preview bar at the bottom changes size to indicate the number of datasets for North America (660 in this example). Users continue to define a query by selecting from other attribute value groups. In this example, users pick the two largest attribute values for North America, "Vegetation" and "Land Classification" (see Figure 3b and c). The preview bars in the spatial and year attribute value groups adjust to reflect the new query. The OR operation is used within attribute value groups, the AND operation between attribute value groups [1]. Those AND/OR operations are made visible by the behavior of the bars which become smaller when an attribute value is specified for the first time (e.g. picking the first year) while becoming longer when additional values are added for a given attribute (e.g. when more years are added). This conjunction of disjunctions design handles many queries conveniently and allows rapid exploration that reduces the need for some more complex boolean queries [1][11]. Users further reduce the number of selected datasets by choosing specific years, in the example 1986, 1987, and 1988, three years which have data as shown on the preview bar (Figure 3d). These selections change the number of datasets in the other attribute value groups, and the preview bars are updated. When the "Submit" button is pressed the rough query is submitted to the EOSDIS search engine and the metadata of the datasets that satisfy the query is downloaded for the query refinement phase. In the example the query preview phase narrowed the search to 66 datasets. Figure 3a: The query preview screen displays summary data on preview bars. Users learn about the holdings of the collection and can make selections over a few parameters (here geographic, environmental parameter and year). Figure 3b: The query preview screen displays summary data on preview bars. Users learn about the holdings of the collection and can make selections over a few parameters (geographic, environmental parameter and year). Here the user has selected North America and all preview bars are updated (using a logarithmic scale). Figure 3c: Vegetation and Land Classification are now selected. The preview bars shows which years have data. Figure 3d: Three years (1986, 1987, and 1988) have been selected. The result bar shows that an estimated 66 datasets will satisfy this query (the scale is logarithmic). The query can now be submitted. EOSDIS QUERY REFINEMENT The query refinement interface supports dynamic queries over the metadata, i.e. over all the attributes of the datasets. These include: the detailed spatial extent and temporal interval, parameters measured in the dataset, the sensor used to generate the dataset, the platform on which the sensor resides, the project with which the platform is associated, the data archive center where the data is stored, and data processing level which indicates raw sensor data (level 0) to highly processed data (level 4). A temporal overview of the datasets is given in the top left (Figure 4a). Each dataset is now individually represented by a selectable line. Controls are provided to select values for the common attributes: the data archive center, project, platform, sensor, and data processing level. Beside those common attributes additional attributes can be included in the metadata but since the number of attributes may be large, menu access needs to be provided for those less common attributes. At the bottom of the screen a table lists all the datasets and gives exact values for the attributes. In the refinement phase of the query, users can select precise values for the attributes. The already zoomed to the area selected in the query preview, should be zoom-able to allow precise selection. The time line of the overview, already narrowed to the years selected in the query preview, can be re-scaled to specify narrower periods of interest. Figure 4a: In the query refinement users can browse all the information about individual datasets. The result set can be narrowed again by making more precise selections on more attributes. In this second dynamic query interface the result of the query is immediately visualized on the overview. As attribute values are selected the number of lines on the overview changes to reflect the query in a few milliseconds since there is no access to the network. All controls are tightly coupled to: . Describe selected datasets. When users click on a dataset of the timeline overview, the corresponding attribute values are highlighted on all controls: e.g. the sensor is highlighted, the spatial coverage shown on the map, the row of the dataset table is highlighted and scrolled to the front if needed (Figure 4b) . Indicate valid values. Once some attribute values have been selected, controls can reflect the now invalid values by graying them out (e.g. selecting a platform will most likely eliminate some of the sensors which will become grayed out). This can be achieved by analyzing the metadata of the datasets. In Figure 4c the number of datasets was reduced by selecting the processing levels 2 and 3, two archive centers, and three projects. More details about a dataset such as descriptive information and sample data can be retrieved on demand from the network before the decision to download a full dataset is made. The Java implementation also illustrates the benefit of the World-Wide Web by allowing interface objects to act as links to relevant WWW information sources. For example, each platform name is linked to a NASA page describing that platform. 5. SYSTEM ARCHITECTURE The architecture supporting the two-phase query formulation consists of three layers: interface, local storage, and network (Figure 5). At the interface layer, users formulate and refine queries as described above. The query preview and query refinement interfaces provide a visual representation of the preview statistics, selected datasets, and query parameters. The local storage layer maintains the data used to drive the dynamic query interfaces of the interface layer. This data consists of a volume preview table (summary data that indicates the number of datasets for each attribute value and intersections) for the query preview, and dataset metadata for the query refinement. When users initiate a query preview session, the volume preview table is downloaded from the network databases. The network layer is where the network activities take place. These network activities include updating the volume preview tables, providing the metadata for datasets selected from a query preview, retrieving the details of a dataset selected in the query refinement. Figure 4b: Partial screen showing highlighted parameter values corresponding to a dataset selected on the timeline overview. Figure 4c: Here the query has been refined by selecting 2 archive centers, 3 projects and 2 processing levels. More filtering could be done by zooming on the timeline or on the map. The timeline overview and the dataset table reflect the remaining datasets. Details and samples images can be downloaded from the network (window on the right) before the long process of ordering the large datasets. Figure 5: Architecture of two-phase dynamic query approach for networked information systems. Volume Preview table The size and dimensionality of the volume preview table is a function of the number of preview attributes and the number of discrete preview values for each attribute. Consider a Restaurant Finder with three preview attributes: cuisine type, rating, and accepted credit cards. Imagine five types of cuisine, four ratings, and two acceptable credit cards. In the simplifying case where each restaurant's attribute can only take a single value the volume preview table would be a five-by-four-by-two table, with a total of 40 combinations. But in our example of the Restaurant Finder, allowable credit cards may be grouped. The cells of the volume preview table must be independent so there must be cells for each possible combination of credit cards. Two credit cards create four possible combinations (including neither being acceptable), so the volume preview table has five-by-four-by-four or 80 combinations. Each cell in the table (i.e. each attribute value combination) holds an integer representing the number of restaurants in the database for that particular combination. In Figure 6 corresponding to the "three-star rated" restaurants, the cell for 3- star Indian restaurant that accept Visa and MasterCard hold the value 98. Such tables are used to update widgets in the query preview interface. French Mexican American Indian Italian Visa Figure A slice of the volume preview table for an example Restaurant Finder. This 2D table results from specifying one of three preview attributes. In this case, the third attribute, rating, has been specified. This table is used to update preview bars in the query preview interface. preview attributes, yield an N-dimensional volume preview table. The total size of the table is many orders of magnitude smaller than the size of the database, or the size of the datasets' metadata. Furthermore, the volume preview table does not change size as the database grows. Even if the database has billions of records, the size of the volume preview table allows it to be loaded into local high-speed storage to support dynamic queries in the query preview phase. Controlling the size of the table Nevertheless, the number of attributes and the number of the possible values needs to be carefully chosen if the objects being searched (e.g. restaurants or datasets) can take any combinations of values for their attributes. In the simple case of the Restaurant Finder, each restaurant could have a combination of credit cards. The interface widget only had 2 buttons for credit cards but the volume preview table needed 4 rows to represent the combinations. In the case of EOSDIS a given dataset can contain measurements of several parameters, covering several areas over several years. In the worst case (i.e. if all combinations are possible) the size of the preview table could become periods) which would lead to megabytes of data, much too large to load over the network and use in the preview. A first solution is to ignore in some way the possible combinations and count twice the datasets that have 2 parameters, once in each cell for each parameter it contains. This will result in correct individual preview bars (e.g. the preview bar for 1990 really gives the total number of datasets that have any data for that year) but inflate total result preview bar since some datasets are counted multiple times. This might be acceptable if combinations are a small proportion of the data, which is likely to be common because of the high granularity of the selections in the query preview. A second more accurate solution to the problem is to analyze the number of combinations, either by looking at the type of attribute (e.g. year combinations are typically year ranges, reducing the number of combinations to 55 instead of 1024 for 10 values), or the distribution of the data itself (e.g. EOSDIS parameters are grouped into only a limited number of compatible combinations). The first solution has the advantage of keeping the size of the volume preview very small (e.g. 12x12x10 integers for our EOSDIS prototype, i.e. much smaller than the world map graphic), the second gives a more accurate preview but requires more time and space. In our prototype we chose to simply duplicate datasets because we did not have access to large amounts of real EOSDIS metadata. The attributes were arbitrarily selected. However, it is not difficult to replace the set of attributes used in the prototype. To summarize, volume preview tables can become large if combinations are to be previewed accurately or if large numbers of previewing attributes or attribute values are chosen. But the query preview technique can always be tailored by reducing the number of attributes or attribute values in the query preview. The size of the preview table can also be adapted to users' work environment (network speed, workstation type) or preferences. Updating the volume preview table Since the data of the networked information system changes regularly, volume preview tables have to be updated. Our approach depends on the data providers being willing and able to produce and publish volume preview tables on a regular basis (weekly, daily or hourly depending on the application), or on third party businesses running series of queries to build the tables. Since the preview is only meant to enter rough queries it may be acceptable to use slightly out of date volume preview tables. The query preview needs to make clear that the preview bar sizes are an approximation of the real volume and give the "age" of the information used. When the rough query is submitted, the (up-to-date) databases are queried and will return up-to-date data for the query refinement. At this point the number of datasets returned might be slightly different than predicted by the query preview. This might be a problem when the query preview predicts zero hits while a new dataset that would answer the query has just been added to EOSDIS. This risk has to be evaluated and adequate scheduling of the updates enforced. The Cubetree implementation of datacubes [12] seems a promising data structure as it has efficient query update. Limiting the download of metadata Most users and data center staff will want to limit preview requests to those whose result set is small. The submit button can be disabled when the result set size is above a recommended level (75 in our prototype). 6. LIMITATIONS OF THE CURRENT EOSDIS PROTOTYPE The present implementation of the query refinement interface has several limitations. The implementation of the query refinement overview will not scale up well when more than 100 datasets are returned from the query preview. The timeline of intervals will get too tall and occupy too much screen space if intervals are not allowed to overlap. Better methods of handling large numbers of intervals are needed. Possible directions include: zooming, optimizing the line packing to make use of screen space, or using line thickness to indicate overlaps. The quantitative and qualitative overview of the large number of datasets is needed to monitor their filtering but the ability to select individual lines is important when numbers have decreased enough to require browsing of individual datasets. In our EOSDIS prototype the zooming and panning of the overview has no filtering effect but we have implemented other examples which demonstrate the benefit of the technique (e.g. for the Library of Congress historical special collections browsing [13]). Similarly the filtering by geographical location has not been developed yet in the query refinement. Zooming and selecting rectangular areas is easy but more sophisticated selection mechanisms used in geographical information systems are probably necessary. The query preview allows users to specify the most common boolean queries (OR within attributes and AND between attributes). This is appropriate since the query preview is only meant to be a rough query, but more precise control over the boolean combinations need to be provided in the query refinement. Our current prototype does not offer such capability. Menu options can be provided to change the "behavior" of widgets, or graphical tools can be provided to allow boolean combination of the widgets [11]. 7. EVALUATION AND USER FEEDBACK Expert user review The prototype dynamic query preview interface was presented to subjects as part of a Prototyping Workshop organized by Hughes Applied Information Systems (HAIS) in Landover, MD [14]. A dozen NASA earth scientists who use EOSDIS to extract data for their research participated in the evaluation and reviewed several querying interfaces during the day. The hands-on review of our prototype lasted about an hour and a half. Groups were formed with two or three evaluators and an observer / note-taker in each group. They received no training but were given 5 directions or starting points to explore the prototype. For example, one direction was to "Examine the relationship between the map at the top and the data shown on the bottom half of the window. Try selecting a geographic region and various attributes. How are the data displayed." Evaluators were encouraged to "think aloud" during the session and their comments and suggestions were recorded. The 12 professionals reacted positively to the new concepts in the query preview and query refinement interfaces. They agreed that the visual feedback provided in the query preview interface allows users to understand the distribution of datasets. A group of evaluators recommended that it would be an effective tool for subjects who did not know what data was available. Others remarked that some users would not even need to go to the refinement phase as they would realize immediately that no data was available for them. The query preview interface was said to "allow users to select data, see relationships among data, and explore available resources". Subjects said that they appreciated the time interval overview concept, liked to be able to select or deselect and see the changes in the overview. Subjects felt that the prototype "led the user", and was "an intuitive way to search data." Some users suggested that the map regions and selectable attributes be customizable so users could interact with information in which they are interested (different specialties may require different query preview attributes). At the time of the test the prototype was set to perform an AND operation within an attribute. This meant that clicking on 1991 just after a click on 1990 would result in all the bars being shorter (since it had restricted to the datasets which had data about 1990 AND 1991). After some confusion, all groups of evaluators were able to figure out that an AND was being performed by seeing the bars grow or shrink. But it was clear that they had expected the interface to perform an OR within attribute (i.e. retrieving all datasets having data from 1990 or 1991). This was an important change made to the prototype following the evaluation. This anecdote confirms that the visual feedback helped users understand the operations performed by the sytem. After the evaluation, subjects were given a questionnaire and rated the interface positively. For a complete list of subject comments and questionnaire results, see [14]. Controlled Experiment Twelve computer science students searched a database of films with a form fill-in interface. They were given only ten minutes of training in the use of the interfaces. The experimental treatments in this counterbalanced within-subjects design were presence or absence of a query preview [5]. The tasks simulated a complex browsing situation such as: "Find a PG-13 musical which was produced between 1991 and 1995, if no such film is available, find a war film from the same years with the same rating, if not, try a musical or a war film from 1970- 91, and as the last possibility, try a comedy from 1970-95." The query preview treatment showed whether or not there were any films satisfying the requirements, allowing subjects to rapidly explore alternatives. In the experiment, there were no lengthy network delays, so the time differences would be much larger if there were delays. Subjects using the query preview took an average of only 36.2 seconds while others took 57.5 seconds (p < 0.05) for tasks in which the query preview attributes were partially relevant. Stronger results, 24.4 seconds vs. 51.2 seconds (p < 0.05), were obtained when the tasks closely matched the query preview attributes. This dramatic doubling of speed for query previews is a strong indication of its benefits, which will be even greater in the case of network delays. For tasks in which there was no match with the query preview attributes, there was only a 10% slowdown in performance. Subjective satisfaction was statistically significantly higher for the query preview users, who rated the query preview interfaces higher on five questions: helpful? faster? enlightening? enjoyable? use it again? Subjects also made useful suggested improvements such as rapid ways to reset the query preview. 8. AND DISCUSSION The two examples we described illustrate a query formulation process for networked information system consisting of two phases: query preview and query refinement. Query Preview In the query preview phase, users form a rough query by selecting rough values over a small number of attributes. The scope of the query is large, but the resolution is limited (see Figure 7). Summary data is maintained for each of the query preview attributes and intersections. The total number of items selected by the user's query is visualized on a result preview bar (at the bottom of the screen for both the EOSDIS and restaurant finder examples). Preview sizes can also be rendered on maps or charts, as illustrated in the EOSDIS prototype. These renderings must change within a fraction of a second in response to user input. Selecting appropriate attribute values or categories rapidly reduces the data volume to a manageable size. Zero-hit queries are eliminated since users can spot them without issuing a query. Once users are satisfied with the formulated query, it is submitted over the network to the database. More details about individual records are then retrieved to refine the query. Query preview Query refinement Number of records Very large Manageable (each one is selectable for details-on- demand) Number of attributes for selection Few More or all of the attributes Selection of attribute values Rough ranges or metavalues More precise or exact values Figure 7: A comparison table of the two phases of the query formulation process. Query refinement In the query refinement phase, users construct detailed queries over all database attributes, which are applied only to those records selected in the query preview. The scope of the query is smaller, but the resolution is finer. The interface provides access to all database attributes and their full range of values. A characteristic of the query refinement phase is the rendering of each record in a graphical overview. The overview is closely related to the widgets used to refine a query, and reflects the query. By selecting appropriate values of relevant attributes, users continue to reduce the data volume and explore the correlation among the attributes through the visual feedback. Complete details can then be obtained at any time by accessing the database across the network for individual records. 9. RELATED WORK An early proposal for volume previews in a database search is described in [15]. The "Dining out in Carlton" example was provided to illustrate a search technique (for a specific restaurant) based on the volume preview of the number of the available restaurants. However, query previews were not exploited to support dynamic queries and querying in networked information systems. Retrieval by reformulation is a method that supports incremental query formation by building on query results [16]. Each time a user specifies a query, the system responds with query reformulation cues that give users an indication of how the repository is structured and what terms are used to index objects. Users can then incrementally improve a query by critiquing the results of previous queries. Rabbit [16] and Helgon [17] are examples of retrieval systems based on the retrieval by reformulation paradigm, which is also the basis of the two-phase query formulation approach. Harvest [18] was designed and implemented to solve problems common to Internet users. It provides an integrated set of customizable tools for gathering information from diverse repositories, building topic-specific indexes, and searching. Harvest could be used to maintain and update the metadata servers where users can extract information and store it locally in order support dynamic queries in both the query preview and query refinement phases. However, Harvest, just like other WWW browsers, still applies the traditional querying technique based on keywords. In order to express a complex query, a more visual query interface may be effective. Marmotta is a form-based tool used within WWW-clients to query networked databases [19]. The ease of use of form-based interfaces is preserved (users need not know the structure of the database). Within Marmotta, icons are used to present the domain of interest and the retrieval requests in a structured form-based interface. Icons are used in Marmotta to formulate a query. The system then translates the query into a syntactically correct format that can be handled by an HTTP server. In order to cope with the increasing data volume, for example in libraries containing millions of documents, it is common to formulate queries on a library catalog. A prototype interface using a ranked output information retrieval system (INQUERY) for a library catalog containing about 300,000 documents has been implemented [20]. The interface supports a visualization scheme that illustrates how the query results are related to the query words. Visualizing the results of the query keeps users more informed on how the system computed the ranking of documents. Another technique, Tilebars, visualizes term distribution information in each document to supplement result lists in full text retrieval systems [21]. Butterfly was developed for simultaneously exploring multiple DIALOG bibliographic databases across the Internet using 3D interactive animation techniques [22]. The key technique used by Butterfly is to create a virtual environment that grows under user control as asynchronous query processes link bibliographic records to form citation graphs. Asynchronous query processes reduce the overhead associated with accessing networked databases, and automatically formulated link-generating queries reduce the number of queries that must be formulated by users. The Butterfly system provides a visually appealing display. However, it was not designed to support the formulation of complex queries. 10. CONCLUSIONS In this paper, the concepts of query previews and refinement are presented, and two prototypes are described. The evaluation results from a NASA Prototyping Workshop and a controlled experiment confirm the benefits of the query previews. We suggest strategies to control the size of the volume preview table. An operational query preview system has been implemented for NASA's Global Master Change Directory [23]. Consensus has been rapidly reached on attributes and values selection, and performance is satisfactory. Our experience confirmed the importance of metadata accuracy and completeness. The query preview interfaces make visible any problems or holes in the metadata that are not noticeable with classic form fill-in interfaces. This could be seen as a problem but we think that it will have a long term beneficial effect on the quality of the metadata as data providers will be compelled to produce more complete metadata. Our experience with the Global Master Change Directory demonstrates that the concepts are feasible in a large operational system, such as the EOSDIS directory environment. ACKNOWLEDGMENTS This work is supported in part by NASA (NAG 52895 and NAGW 2777) and by the NSF grants NSF EEC 94-02384 and NSF IRI 96-15534. We thank Teresa Cronnell for her graphic design of the Restaurant Finder prototype. --R A graphical query interface based on aggregation/generalization hierarchies Dynamic queries for visual information seeking Visual information seeking: Tight coupling of dynamic query filters with starfield displays The dynamic HomeFinder: Evaluating dynamic queries in a real-estate information exploration system Evaluation of query previews: User preference and performance Incremental data structures and algorithms for dynamic query interfaces Information Seeking in Electronic Environments. Query previews in networked information systems Query previews in networked information systems: a case study with NASA environment data Query Previews in Networked Information Systems: the case of EOSDIS A graphical filter/flow representation of boolean queries: a prototype implementation and evaluation Cubetree: organization of and bulk incremental updates on data cube Bringing treasures to the surface: the case of the Library of Congress Digital Library Program Prototype Workshop 2 (PW2) Results Report. Helping both the novice and advanced user in menu-driven information retrieval systems What makes RABBIT run? Fischer and Nieper-Lemke The Harvest information discovery and access system Progressive HTTP-based querying of remote databases within the Marmotta iconic VQS Tilebars: Visualization of term distribution information in full text information access An organic user interface for searching citation Links The End of Zero-Hit Queries: Query Previews for NASA's Global Change Master Directory --TR What makes RABBIT run? Helgon: extending the retrieval by reformulation paradigm The dynamic HomeFinder Dynamic queries for information exploration A graphical filter/flow representation of Boolean queries: a prototype implementation and evaluation A graphical query interface based on aggregation/generalization hierarchies Information seeking in electronic environments TileBars An organic user interface for searching citation links Incremental data structures and algorithms for dynamic query interfaces Query previews for networked information systems Cubetree Bringing treasures to the surface Dynamic Queries for Visual Information Seeking Query Previews in Networked Information Systems Refining Query Previews Techniques for Data with Multivalued Attributes Progressive HTTP-based querying of remote databases within the Marmotta iconic VQS --CTR Lin Fu , Dion Hoe-Lian Goh , Schubert Shou-Boon Foo, CQE: a collaborative querying environment, Proceedings of the 5th ACM/IEEE-CS joint conference on Digital libraries, June 07-11, 2005, Denver, CO, USA Jennifer English , Marti Hearst , Rashmi Sinha , Kirsten Swearingen , Ka-Ping Yee, Hierarchical faceted metadata in site search interfaces, CHI '02 extended abstracts on Human factors in computing systems, April 20-25, 2002, Minneapolis, Minnesota, USA Mark Sifer, A visual interface technique for exploring OLAP data with coordinated dimension hierarchies, Proceedings of the twelfth international conference on Information and knowledge management, November 03-08, 2003, New Orleans, LA, USA Gary Marchionini , Carol Hert , Liz Liddy , Ben Shneiderman, Extending understanding of federal statistics in tables, Proceedings on the 2000 conference on Universal Usability, p.132-138, November 16-17, 2000, Arlington, Virginia, United States Gary Marchionini , Carol Hert , Liz Liddy , Ben Shneiderman, Extending understanding of federal statistics in tables, Proceedings of the 2000 annual national conference on Digital government research, p.1-7, May 15-17, 2000 Ame Elliott, Flamenco image browser: using metadata to improve image search during architectural design, CHI '01 extended abstracts on Human factors in computing systems, March 31-April 05, 2001, Seattle, Washington Junliang Zhang , Gary Marchionini, Evaluation and evolution of a browse and search interface: relation browser, Proceedings of the 2005 national conference on Digital government research, May 15-18, 2005, Atlanta, Georgia Jon Olav Hauglid , Roger Midtstraum, SESAM: searching supported by analysis of metadata, Proceedings of the 2002 ACM symposium on Applied computing, March 11-14, 2002, Madrid, Spain Marti Hearst , Ame Elliott , Jennifer English , Rashmi Sinha , Kirsten Swearingen , Ka-Ping Yee, Finding the flow in web site search, Communications of the ACM, v.45 n.9, September 2002 Egemen Tanin , Ben Shneiderman , Hairuo Xie, Browsing large online data tables using generalized query previews, Information Systems, v.32 n.3, p.402-423, May, 2007 Paolo Buono , Maria Francesca Costabile , Gerald Jaeschke , Matthias Hemmje, Analysing data trough visualizations in a web-based trade fair system, Proceedings of the 14th international conference on Software engineering and knowledge engineering, July 15-19, 2002, Ischia, Italy CS AKTive Space, or How We Learned to Stop Worrying and Love the Semantic Web, IEEE Intelligent Systems, v.19 n.3, p.41-47, May 2004 Ka-Ping Yee , Kirsten Swearingen , Kevin Li , Marti Hearst, Faceted metadata for image search and browsing, Proceedings of the SIGCHI conference on Human factors in computing systems, April 05-10, 2003, Ft. Lauderdale, Florida, USA Edward Cutrell , Daniel Robbins , Susan Dumais , Raman Sarin, Fast, flexible filtering with phlat, Proceedings of the SIGCHI conference on Human Factors in computing systems, April 22-27, 2006, Montral, Qubec, Canada m. c. schraefel , Nigel R. Shadbolt , Nicholas Gibbins , Stephen Harris , Hugh Glaser, CS AKTive space: representing computer science in the semantic web, Proceedings of the 13th international conference on World Wide Web, May 17-20, 2004, New York, NY, USA Heikki Topi , Wendy Lucas, Searching the web: operator assistance required, Information Processing and Management: an International Journal, v.41 n.2, p.383-403, March 2005
graphical user interface;direct manipulation;science data;dynamic query;query preview;EOSDIS;query refinement
316184
type signatures for legacy Fortran subroutines.
We are currently developing a methodological framework for reverse engineering Fortran77 programs used by Electricit&eacute; de France, in which the first step is the construction of an algebraic specification which faithfully represents the Fortran code. To construct this specification, we must decide on a coherent set of "profiles" (type signatures) for the specifications of the Fortran sub-programs. We propose an analysis of the dynamic aliases between formal and actual sub-program arguments in order to derive these profiles. In many examples of real Fortran code this analysis does not give satisfactory results if arrays are treated as indivisible. Instead, we must take into account which fragment of the array may really be accessed by the sub-program. We have therefore implemented our analysis as an extension of the PIPS code parallelisation tool, which provides us with a precise analysis of inter-procedural array data-flow.
Introduction Much of the software currently in use at Electricit'e de France (EDF), though giving entirely satisfactory results, was written 15 or 20 years ago. The replacement of these existing systems by new software re-developed from scratch can be expensive, risky and time-consuming. As a response to this problem, we are developing a methodological framework for reverse engineering Fortran77 source code using formal methods [10], in which algebraic specifications of the code at different levels of abstraction are created and compared. We propose to start with an analysis of the source code and the creation of the specification at the lowest level of ab- straction. We believe that this step can only be partially automated so this first specification must be sufficiently close to the source code to inspire complete confidence that it specifies it exactly. In particular, each sub-program in the code must be specified as a function. However, the specifi- This work was financed by Electricit'e de France through the Contrat d"etude R32/1K2924/ER292, No. OT: R32L02 To appear in the ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE'99), Toulouse, France, Sep. 1999. cation must not be so low-level as to prevent it being structured and presented so that it is easier to understand than the code itself and so can aid a maintenance engineer in understanding the code and in locating the implementation of particular aspects. The algebraic specification of a function is called an op- eration. Each operation has a profile declaring the sort of each argument and of the result, i.e. the profile specifies the type signature of the function. In order to construct an algebraic specification of the Fortran code, we must decide on the profiles of the operations which specify the Fortran sub-programs. This is the task which we address in this article. Several characteristics of the Fortran77 language complicate this task. The declaration of a Fortran sub-program does not tell us which of the declared parameters, nor which of the global variables (i.e. variables in a COMMON block) declared as visible, are really defined or used. 1 Fortran's call-by-address semantics means that passing a single array element to a sub-program can enable it to access the rest of the array from this element onwards. If the passed element is not the first in the array, only a part of the array can be passed to the sub-program. This situation does arise in For- tran77 programs, which make extensive use of arrays, which are the only built-in data-structure, 2 to simulate other data- structures. Fortran77 has few built-in types and does not support user-defined types and, as type-corrrectness is not enforced at compilation, a program may not even respect the declared types. This means that if we base the profiles used in our specification on the declared sub-program parameters and their types, not only do we risk not identifying the true parameters and the true types, but also we are restricted, as in Fortran, to a small set of types. Above all, in the case of sub-programs which are not library routines but belong to a particular application program, we lose the information which can be gleaned from the analysis of the variables actually used to instantiate the formal parameters. Indeed, the result of Fortran's impoverished type system is that a programmer typically constructs sub-programs with parameters of a certain declared type (INTEGER, say), but really only designed to be instantiated by a subset of the program variables of this type, e.g. only the variables numbering lines in an electrical network and not those number- 1 defined and used are used here in the static analysis sense, meaning respectively assignment of a new value to the variable and reading the value of a variable. In the rest of this paper, we assume familiarity with the notions of static analysis: if not, see chapter 10 of [1] 2 Apart from chains of characters in some versions. ing nodes, for example. When the reverse engineer reads the code for the first time, it may not be clear what the parameter represents, particularly since Fortran variable names are limited to six characters. In this situation, we would like to be able to "track" the values which this parameter may take so as to find which other sub-programs they may be passed to (via variables of different names) and build up an understanding, not necessarily of which values are involved, but of what they rep- resent. In other words, using "type variables" (arbitrary names) because we don't know ``what'' the types are, we would like to start by finding a consistent set of type signatures for the sub-programs, which are finer-grained than those based on the declared types. These type signatures are just the profiles of the operations specifying the sub- programs. The specification sorts are names for the types we detect in this way, and which we hope correspond more closely than the declared types to the programmer's conceptual view of the code. Below, we propose a static analysis of the Fortran code in order to automatically obtain a precise definition of the variables which are really defined or used by each sub-program, and thus to group these variables into sets corresponding to sorts. For each set of Fortran variables created, we define a sort which contains at least all possible values of all these variables. We can then define the profiles of the operations specifying the sub-programs. In the following section, we discuss our approach further, comparing it to conventional type inference, explaining the hypotheses it is based on and our treatment of array regions using the PIPS tool. In Section 3 we give a detailed description of the analysis we propose. Section 4 describes the current implementation and Section 5 discusses a possible extension. Related work is compared to ours in Section 6, and this is followed by the conclusion. Further discussion of our approach 2.1 Why not conventional type inference? We want our analysis to distinguish not only integer line- numbers from integer node-numbers, but also the integer arrays used to store linked lists of line numbers from the integer arrays used to store the number of the node connected to one end of each line. Indeed, arrays can vary in the sort of the value stored and the sort of the index, but the values of the elements may also be constrained so that, taken together, they realise a data structure such as a linked list. Moreover, given an array which (in order to simulate dynamic memory allocation) is effectively referenced as though composed of several contiguous sub-arrays, each storing different information, we want to be able to distinguish its different parts. We propose to make these distinctions not by describing exactly how each array fragment is accessed but by putting into the same sort only those array fragments which are accessed in the same way by the same sub-programs. used mostly for functional languages and usually performed on a program already partially typed by means of type declarations. A set of basic types and type-constructors is pre-defined and type variables are assigned to untyped terms. Type inference rules are then used to unify type terms and find consistent types for all the function declarations and function applications in the program. These include those involving primitive operations such as assignment, tests for equality and arithmetic operations. The arithmetic operations are usually given pre-defined non-polymorphic type signatures but functions whose type signature is not known are considered to be polymorphic by default and in particular can take other functions as arguments. treatment of arrays is proposed, so classic polymorphic type inference is certainly incapable of giving different types to different array fragments. Moreover, because of the wide use of arithmetic opera- tions, classic polymorphic type inference seems to be incapable of making the distinctions between different integers or different (whole) integer arrays described above. Indeed, in order to avoid a result very close to the declared Fortran types, arithmetic operations and any other "utility" operations on integers and integer arrays must be considered as polymorphic. On the other hand, sub-sort polymorphism seems sufficient to describe the Fortran programs we have analysed so far. We have found no examples of sub-programs which take other sub-programs as arguments, 3 nor of parametric polymorphism (such as sub-programs which operate on lists regardless of the type of the elements of the list). Compared to conventional type inference, we have no basic types and propose to ignore type declarations. We only type formal parameters (as defined below) of Fortran sub-programs and only use the equivalent of one of the rules from conventional type inference: the one for function ap- plication. Instead of explaining our inference in terms of unification of type terms using this rule, we prefer to describe it as the inference of a relation between parameters of the same type. This enables us to explain how different occurrences of what appears to be the same parameter do not always have the same type. 2.2 Our treatment of polymorphism In contrast to conventional type inference, we propose an analysis which is restricted to analysis of sub-program calls and to the synthesised declarations of these sub-programs. We do not propose to analyse calls to built-in Fortran arithmetic operations, nor tests of equality or assignments. The analysis of calls to sub-programs which are specific to the management of electrical networks should enable us to make the distinctions between different integer variables or integer array variables described in Section 2.1. However, "utility" sub-programs may be used to carry out operations on arbitrary integers or arrays. Each operation only has one profile but, to take such sub-programs into account, we could consider the sorts of line-numbers and node-numbers as sub-sorts of the sort of all integers and the different sorts of integer arrays distinguished above as sub-sorts of the sort of all integer arrays. We would then allow implicit coercion between sub-sort and super-sort as necessary. However, this would mean making our analysis (and its results) much more complicated in order to give consistent profiles to the routines which are not going to contribute the most to our understanding of the what the variables represent. What is more, it is often the calls to "utility" sub-programs which violate the declared types because they do not in fact embody a sub-sort relation but just a programming "trick" which we have no desire to include in our specification. In fact, we prefer to limit our analysis to the much less complex case of profiles defined over a "flat" set of sorts, with 3 In any case, we would not be able to specify such sub-programs in our first-order algebraic specification language. no attempt to take a possible sub-sort relation into account and no implicit coercion. The algebraic specification will certainly contain sub-sort relations, but we leave that part of it to the reverse engineer. We therefore propose to try to recognize the "utility" sub-programs which may be present in the code to be analysed and to "eliminate" them from the code before the analysis is carried out. 4 The choice of sub-programs to eliminate is of course subjective and determines the granularity of the sorts which will subsequently be detected. However, in our experience, the utility sub-programs can be easily determined by studying the call-graph of the program, which contains far more calls to these sub-programs than to the other, more specialised ones. 2.3 Re-use of variables Our analysis relies on the hypothesis that successive values of a Fortran variable have the same sort. Re-use of variables to save memory is not uncommon in old Fortran code and if successive values are of a completely different nature then we will get bad results. One solution, which we do not have space to discuss further here, is to modify the inference rules (and heuristic) proposed below so as to no longer consider as identical two occurrences of the same region if its value may have been modified between the two. The disadvantage of this solution is obviously that we may unnecessarily give different sorts to successive values of variables which in reality do always keep the same sort, and so artificially split a lot of variable sets. 2.4 Our treatment of arrays We would like to detect the array fragments which are subjected to a particular treatment by the sub-program being analysed. This arises when a loop in the sub-program traverses the array fragment, even if not every element in the fragment is accessed. It is these array fragments which are used to realise data structures but within the fragment different array elements may be used to represent different things. So instead of giving a sort to each individual array element which may be accessed, or to the whole array (in the case of loops which don't traverse the whole array), we would like to give a sort to the traversed fragment. The PIPS tool performs a static analysis of Fortran code in which sets of accessed elements are described as convex array regions [4]. 2.5 Array regions in PIPS PIPS is a tool for the automatic parallelisation of Fortran77 programs developed by the Ecole des Mines de Paris [6]. The parallelisation depends on a precise analysis, which can be carried out interactively, of intra- and inter-procedural array data flow. PIPS characterises the variables which are really accessed by each block of code and then recursively propagates this information. A PIPS array region defines linear limits on the upper and lower values of the index of accessed elements for each dimension of the array. It thus describes the indices of the possibly accessed elements as a convex polyhedron parameterised by scalar program variables. 4 The elimination of calls to certain sub-programs must be done with care if it is not to invalidate the results of automatic analysis, but this problem is already present in the analysis of programs which may include chains of calls involving thousands of sub-programs unless we can find some way to eliminate those which don't really interest us. The PIPS region is not necessarily an exact description of the set of elements really accessed: ffl Obtained by static analysis, it suffers from the limitation of all static analysis, i.e. the inability to eliminate all impossible execution paths. ffl The operations used to propagate and combine regions for each block of code cannot always give an exact result: a non-convex result may be approximated by a convex polyhedron and non-linear (as a function of scalar variables) limits may be over-approximated. PIPS EXACT regions exactly describe the set of elements accessed either ffl in all possible execution paths ffl or in a particular execution path for which PIPS can express the condition as a linear function of scalar program variables. Other regions may include elements not actually accessed and are called MAY. PIPS IN regions describe upwardly exposed uses and OUT regions describe definitions of values which may be used on exit from the code block before being re-defined. PIPS combines all IN or OUT regions of the same array for each code block into one SUMMARY IN or OUT region, respectively. We will now describe our analysis, using the concept of array regions. 3 The analysis we propose 3.1 The central rule The detection of sets of variables corresponding to a sort is based on the following simple rule, expressed intuitively: all actual parameters instantiating the same formal parameter of the same sub-program P are specified with the same sort as that of the formal parameter in the profile of the operation specifying Let us describe how we interpret and apply this rule. 3.2 The example We use as an example the formal parameters called IPCO or IPCE of certain sub-programs in one of the real programs we have analysed. The call-graph of just these sub-programs, annotated with extracts of the Fortran sub-program declarations and calls, is shown in Figure 1. 3.3 Formal parameter regions Borrowing the PIPS terminology, we will call access in in mode of a variable by a sub-program any may or must use which may be executed before any definitions of the same variable by the same sub-program. We call access in out mode any definition by the sub-program which may subsequently be used outside the sub-program before being over-written. We define the true output parameters of a sub-program to be ffl all scalar variables which may be accessed in out mode Figure 1: Annotated call-graph for the sub-programs in our example SUB. BESTI1 SUB. PREFIX(.,NA1,.) SUB. PRXPLO(IPCO, IPCE, ICCO, ICCE, .,NRLO, NRLE, .) SUB. PRCHEN(.,IPCO,ICCO,NRLE) SUB. CAMAT(.,NA1,.) SUB. CACONT(.,NA1,NRLO, NRLE, .) SUB. CASDEG(.,IPCO, ICCO, NRLE) Figure 2: Formal parameter regions for our example ffl all array elements which may be accessed in out mode by an instruction which is not in a loop, or which is in a loop but uses an array index value which doesn't vary in successive loop iterations ffl all array fragments which are true output parameters of a sub-program called in an instruction not in a loop, or in a loop in which the array fragment doesn't vary in successive loop iterations, and ffl all array fragments which may be traversed in out mode by a loop, i.e. for each access of an array element or fragment in a loop and which varies with successive loop iterations, the convex envelope of all the elements of the array which may be referenced in out mode. In the case of nested loops, we take the fragment traversed by the outermost loop. The true input parameters have a similar definition, except that each array fragment which is a true output parameter but in which every element may not be defined by the sub-program, and which is not already a true input param- eter, is added to the true input parameters. We define in-exact, out-exact, in-approx and out-approx regions respectively as being the results of the PIPS analysis modified so as ffl not to calculate SUMMARY regions, but one separate region for each array access in the code block, but nonetheless integrating the regions of individual loop iterations of the same access into one region for the whole loop and ffl to distinguish between regions with exact limits (which we will call exact) and regions for which the limits have been over-approximated (which we will call approx). Extending the notion of array region to scalar variables (regions with 0 dimensions), we define the regions of the output parameters to be all the out-exact and out-approx regions for the sub-program and the regions of the input parameters to be all the in-exact and in-approx regions, after the addition, if necessary, of a copy of any may or non-convex out regions to the in regions. In the case of several identical exact parameter regions, we only keep one because each is an exact description of the same true parameter. However, in the case of several identical approx regions we keep all the copies because the same approx region may describe two different array fragments and so two different true parameters. Indeed, some parameter regions may describe fragments which are in reality empty, but which the static analysis cannot identify as such, i.e. true parameters which do not really exist. The true parameters include (fragments of) variables which are not declared as parameters of the sub-program but just in a COMMON block: we will call these global parameters Our analysis is based on the instantiation of formal parameters by actual parameters but the global parameters are not instantiated. These variables may be named differently in different sub-programs but this is an instance of static aliasing (like the use of EQUIVALENCE statements). A global variable accessed in a sub-program but not declared as an argument may not even have a name (i.e. be declared) in the caller. Note that this is not to say that we do not use global variables in our analysis: a global parameter may be used as an actual parameter in a call to another sub-program. Moreover, after our analysis has been carried out any variable which is a static alias of an analysed variable (and thus has the same sort) can easily be detected and added to the same variable set. The true formal parameters are the true parameters less the global parameters and the formal parameter regions are defined accordingly. The formal parameter regions for our example are shown in Figure 2. Each region is enclosed by ! and ? and contains the name of the sub-program, the name of the array and, in brackets, the values of the indices of the different dimensions represented by PHI1, comes the mode (in or out), then the precision of the limits (exact or approx). Fi- nally, between braces, there is the list of constraints on the index values. The in-approx regions of BESTI1, PREFIX and PRXPLO only exist if PRCHEN may read values of IPCO and IPCE which have not previously been written by PRXPLO. PIPS is unable to determine if this is the case. 3.4 Actual parameter regions Given a sub-program, P 2, with one true formal parameter described by the region f , and a call-site of P2 in sub-program P 1, the actual parameter region for this call-site is the translation of f into the namespace (set of all declared parameters, variables of declared COMMON blocks and local of P 1, as carried out by PIPS. In the case of arrays, the array which the formal parameter belongs to and that of the actual parameter, may be declared differently (different dimensions or even Fortran types). As a consequence, a region which is exact when expressed in terms of the indices of the formal array may be approx when it is expressed in terms of the indices of the actual array [3]. A region is parameterised by the store (values of the variables) at the start of the block of code for which it is calculated. However, the values of some variables which parameterise regions may change during the execution of the sub-program. We can only compare regions which are parameterised by the same store. We therefore define the actual parameter region at the entry-point as the actual parameter region for a call to sub-program P2 from P1 (which is expressed in terms of the store at the call-site) re-expressed by PIPS in terms of the store at the entry-point of P 1. If the call-site is in a loop and the actual parameter varies in the different iterations of the loop then it is not the actual parameter for an arbitrary iteration of the loop that is described by a region parameterised by the store at the entry-point. In this case, PIPS calculates a new region for the loop which contains all the actual parameter regions for the different iterations and it is this region which is re-expressed in terms of the store at the entry-point of the caller. So, except for exactregions parameterised only by variables which do not change value during the execution of the loop, actual parameter regions for calls in loops cannot be re-expressed in terms of the entry-point of the caller. Also, PIPS is sometimes unable to re-express exact regions in terms of the store at the entry-point and so has to approximate them by approx regions. 3.5 Instantiations and the dynamic alias relation Let us call instantiations all pairs !formal parameter region, actual parameter region at the entry-point? and define a binary relation on regions instantiated by which links all pairs of regions in an instantiation. Two variables are generally said to be dynamic aliases if they share the same address in memory by virtue of a call to a sub-program. This means that dynamic aliases are just different possible names for the "same" variable. We define another binary relation on regions, dynamic alias, which links regions simultaneously having the same address-space in memory if a particular path in the call-graph is followed. The dynamic alias relation includes instantiated by. Moreover, if there is an instantiation ! r1; r2 ? for a call- site, in sub-program P 2, of sub-program P3 and if P2 is called by P1 then r2 may also be the formal parameter region in an instantiation for the call of P2 by P 1. The dynamic alias relation is in fact the transitive closure of instantiated by, i.e.: 5 instantiated by(f; a) ) dynamic alias(f; a) dynamic alias(r1; r2) - dynamic alias(r2; r3) Neither instantiated by nor dynamic alias are symmetrical Let us call alias list a list containing the greatest possible number of regions such that each element (except the first) instantiates the one before it and each element (except the last) is instantiated by the one after it. At the point in the execution of the program when the first element in the list is instantiated, i.e. when the sub-program which is deepest in the call-graph is called, all the elements in an alias list simultaneously share the same space in memory and it is then a list of different names for the "same" variable. The alias lists for our example are shown in Figure 3. If the last actual parameter region in a list is not also a formal parameter region (i.e. is neither in nor out for the caller), then it is shown in this figure with no mode. The calls to PRCHEN are in a loop and the actual parameter regions cannot be expressed in terms of the store at the entry-point of PRXPLO, so there are two alias lists of only one element. In fact, it is the regions of PRCHEN which give rise to the approx regions of PRXPLO. 3.6 The same sort relation We now consider how we can group variables into a set for each sort. We define a binary and symmetric relation same sort between regions. This relation includes the dynamic alias relation because two regions in the dynamic alias relation are two possible names for the "same" variable and (as we do not consider the possibility of implicit coercions) must therefore be put into the same set. Any pair of elements from the same alias list is thus in the same sort relation. If a sub-program with formal parameter region f is called from two call-sites then each of these call-sites will result in a different alias list (identical up to f and different there- after), but f will belong to both these alias lists. However, from our initial rule from Section 3.1, we can say that the elements of both alias lists have the same sort. In other words, same sort is transitive "in the direction of dynamic alias": same 5 In this and the following first-order logic formulae, we suppose universal quantification of all variables. In our example, this rule gives the same sort to the elements of the two alias lists starting with a region of CASDEG: IPCO. Moreover, if the same actual parameter, precisely described by an exact region, instantiates two different formal parameters then the actual parameter region will belong to two alias lists which start differently but are identical from this region onwards. The parameter described by this region shares the same space in memory as the variables from both alias lists, but at successive or alternative execution points. We suppose that the value stored at this address always has the same sort, and infer that the elements of both alias lists all have the same sort. In the case of exact regions, same sort is thus transitive "in both directions": exact(a)-same In our example, this rule gives the same sort to the elements of each pair of alias lists ending in the same exact region of BESTI1:NA1. In fact, we can make the same inference as above irrespective of the mode of the regions concerned, so let us make same sort reflexive for exact regions irrespective of and same sort is an equivalence relation for exact regions However, if the same approx region instantiates different formal parameter regions, then we cannot be sure that the array fragment described by the approx region is the same in each case, so we cannot make the same inference as for exact regions. same sort is not transitive in this case because although each parameter only has one sort, an approx region can have two different sorts because it can describe two different parameters. We now create sets containing the greatest possible number of regions in which each region is the same sort as all the other elements of the set. For exact regions, the sets are the equivalence classes of same sort. Each set of regions represents a sort. The sub-program profiles are constructed by giving each set a name and then for each sub-program finding which set each formal parameter region belongs to. In the case of several identical approx formal parameter re- gions, each instance of the region should belong to a different set. The sorts for our example are shown in Figure 4. 3.7 Overlapping regions What inference can we make about the sorts of two regions which overlap to some extent? The situation is resumed in the table shown in Figure 5, which shows all possible ways in which two regions can overlap. In the case of inclusion of one region in another approx region we cannot make any inference because there may not really be inclusion of the array fragments described. The same is true of partial overlap if one region is approx. However, in the case of inclusion of one region in another exact one, we know that there really is inclusion of the parameters. In this case, the most obvious explanation for proper inclusion is that the smaller region belongs to a sub-sort of the larger one. However, taking sub-sort relations into account in general would significantly complicate Figure 3: Alias lists for our example Figure 4: Sorts for our example with "conservative" treatment of approx regions Figure 5: Relation between the sorts inferred in the case of overlapping regions overlap relation * exact * exact approx * exact exact * approx approx * approx other anomaly - Figure Sorts for our example using the heuristic for approx regions our analysis, and its results. We could decide to incorporate the sub-sort into the super-sort in this case, and give both regions the same sort. However, in the only example of this case that we have seen in the programs we have analysed (and that is not due to a "utility" routine, see Section 2.2), the "super-sort" exists only for purely operational purposes, to save a few lines of code. We prefer therefore to leave the reverse engineer to analyse such cases. In the case of an approx region having exactly the same limits as an exact region, we can suppose that the sort of the approx region is the same as or a sub-sort of the sort of the exact region and proceed as above. Below, we propose an alternative approach for cases such as this. We cannot explain partial overlap of two exact regions, and can only alert the reverse engineer to an apparent anomaly. 4 The current implementation A first implementation of our analysis has been realised as a new PIPS phase and run on three real legacy Fortran programs of 1000, 3500 and 25500 lines of code, respectively. The aim of this first tentative implementation was to enable us to quickly validate our ideas on real code and so we based it on the already-calculated PIPS regions. In these trials, we obtained nearly one sort for every two "regions" (including scalars). In the analysed programs, the number of different call-sites for any sub-program that is not a utility routine is small, but this implementation of our analysis nonetheless fails to recognize that many pairs of regions describe the same array fragments. This is because 1. this is a very approximate implementation of the algorithm described above, because the modifications of the PIPS analysis described in Section 3.3 have not been carried out and 2. these programs give many approx regions and our analysis is extremely conservative in never concluding that an approx region describes the same array fragment as another region. However, the results provided by this implementation enabled us to refine our analysis. 5 A less conservative analysis Treating each approx region as different from all other regions for the same array, and with its own sort, gives a result which is very conservative. If the code contains many approx regions, the result is an explosion in the number of apparently different sorts. In the programs we have analysed, many array accesses are made with index values which depend on the value of another array element or are recursively calculated by the loop containing the access. Putting limits on the array fragment in these cases requires a knowledge of the limits of the values of another array and/or inductive reasoning. PIPS can only describe such array accesses by approx regions. One approach is to look for heuristics to suggest when two regions describe the same true parameter, even though they are not both exact. We can then make the inferences that follow while signalling the need for the reverse engineer to check by hand the hypothesis on which they are based. For example, it seems reasonable to suppose that the same array fragment may sometimes be described by an exact region for one access point and an approx region for another. A heuristic which works well for the codes we have analysed is the following: if an exact region and an approx region of the same array have the same lower limit, which is not the lower limit of the array, and the upper limit of the approx region is greater than or equal to that of the exact region, then we suppose that the two regions describe the same array fragment This heuristic has to be applied with some care: ffl if there are two different candidate exact regions for the same approx region then the heuristic cannot be applied; ffl in and out regions are calculated by taking the difference of other regions, but if the calculation of one approx parameter region, r1, uses another approx parameter region, r2, then the heuristic must be applied to r2 first; ffl after deciding where to apply it first, the implications of the heuristic must be propagated back as far as possible and then the in and out regions recalculated. The results of applying this heuristic to our example are shown in Figure 6. Note that the the in-approx regions of BESTI1, PREFIX and PRXPLO have been eliminated. The reverse engineer must check by hand whether (or under what pre-conditions on input variables) the value of PRCHEN:N1 is bounded by 1 and PRXPLO:NS in the calls from PRXPL0 and thus whether the loop of PRXPL0 traverses the first NS elements of IPCO and IPCE. 6 Comparison with other work Related work includes: ffl work on alias analysis: although this mostly addresses programs written in C in which array accesses are not a notable feature but it is rather the analysis of pointers which poses a problem, the work of [12] and [9] can be compared to ours; type inference in the Lackwit system [8]. The aim of the work described in both [12] and [9] is flow-insensitive pointer alias analysis for C programs. [12] consider not only (as we do) different names in different sub-programs for the same memory location or pointer, but also all the different "names" (access paths) which can be obtained in C using pointers, dereferencing and structure field accesses. They define a relation between two "names" which may, because of an assignment of a value to a pointer or a sub-program call involving pointers, refer to the same memory location at some point in the execution. From the transitive, reflexive and symmetric closure of this relation, they then generate an equivalence relation on the "names", which enables them to partition the code studied and decide for each independent code fragment whether to apply a flow-sensitive pointer alias analysis. uses type inference in a non-standard type system as an efficient way to realise flow-insensitive pointer alias analysis for C programs. In his type system, a "type" represents a set of variable locations: the locations which may all be pointed to by the same pointer. Each "type" has a "compo- nent" representing the locations which may be pointed to by the variables of that "type". All pointers to the same location do not have the same "type" but do have the same type "component". The type system thus represents a graph, the storage shape graph, and "type" equality is not the standard structural equality (same components) but is the same as would be obtained by tagging the types. [8] apply to C programs an ML-style ([7]) type inference, but in which the types are tagged. The aim is to detect variables having the same "representation" (i.e. they then have the same "type"). Type inference rules give the same "type" to two variables if one is assigned the value of the other or if one instantiates the other in a sub-program call. However, as in ML, a formal parameter may be polymorphic and so have several "types". We exploit the similarity between alias analysis and type inference, not to use non-standard-type inference for alias analysis, but to use alias analysis to determine non-polymorphic "types" for formal sub-program parameters in order to construct an algebraic specification. Our analysis is specifically adapted to Fortran and based on array regions. 7 Conclusion The motivation for the work described in this paper is the reverse engineering of legacy Fortran77 code. In order to construct an algebraic specification of the Fortran code, we need to determine a consistent set of type signatures for the sub- programs, and we cannot rely on the Fortran declarations. We analyse the actual parameters used in sub-program calls to determine a finer-grained type for each formal parameter of each sub-program, based on the operations used to read or write the values it may take. In the case of formal parameters which are array values, we cannot assume that the whole array has the same type. We therefore use static analysis to characterise as an array "region" each array fragment which may really be traversed by the sub-program. We then determine the type of this region. The traversed fragment cannot always be precisely characterised and represented so we must take into account that some regions are over-approximations. We adopt a conservative response to approximate regions which results in many types being detected. To decide which of these types can be merged, we can use a heuristic which can be checked by the user. A first, approximate, version of our analysis has been implemented as an extension to the PIPS tool, which offers precise inter-procedural analysis of array data flow. Acknowledgements I would like to thank J'er-ome Ryckbosch of EDF for giving me a real-life problem to work on and the PIPS team at the Ecole des Mines, in particular B'eatrice Creusillet, Fran-cois Irigoin, Fabien Coelho, Corinne Ancourt and Pierre Jouvelot, for all their help. Thanks also to my supervisor, Michel Bidoit, for his patient re-reading of this article. --R Array Region Analyses and Applica- tions Interprocedural array region analyses. Efficiently computing single static assignment form and the control dependence graph. Semantical interprocedural parallelisation: An overview of the PIPS project. A theory of type polymorphism in pro- gramming A program understanding tool based in type inference. An experiment in reverse engineering using algebraic specifications. Algebraic specification. Program decomposition for pointer aliasing: A step towards practical analyses. --TR Compilers: principles, techniques, and tools Semantical interprocedural parallelization Algebraic specification Efficiently computing static single assignment form and the control dependence graph Points-to analysis in almost linear time Program decomposition for pointer aliasing Interprocedural Array Region Analyses --CTR Arie van Deursen , Leon Moonen, Documenting software systems using types, Science of Computer Programming, v.60 n.2, p.205-220, April 2006
array region;dynamic alias;fortran;reverse engineering;alias analysis
316259
Multicategory Classification by Support Vector Machines.
We examine the problem of how to discriminate between objects of three or more classes. Specifically, we investigate how two-class discrimination methods can be extended to the multiclass case. We show how the linear programming (LP) approaches based on the work of Mangasarian and quadratic programming (QP) approaches based on Vapniks Support Vector Machine (SVM) can be combined to yield two new approaches to the multiclass problem. In LP multiclass discrimination, a single linear program is used to construct a piecewise-linear classification function. In our proposed multiclass SVM method, a single quadratic program is used to construct a piecewise-nonlinear classification function. Each piece of this function can take the form of a polynomial, a radial basis function, or even a neural network. For the k > 2-class problems, the SVM method as originally proposed required the construction of a two-class SVM to separate each class from the remaining classes. Similarily, k two-class linear programs can be used for the multiclass problem. We performed an empirical study of the original LP method, the proposed k LP method, the proposed single QP method and the original k QP methods. We discuss the advantages and disadvantages of each approach.
Introduction We investigate the problem of discriminating large real-world datasets with more than two classes. Given examples of points known to come from k > classes, we construct a function to discriminate between the classes. The goal is to select a function that will e#ciently and correctly classify future points. This classification technique can be used for data mining or pattern recognition. For example, the United States Postal Service is interested in an e#cient yet accurate method of classifying zipcodes. Actual handwritten digits from zipcodes collected by the United States Postal Service are used in our study. Each digit is represented by a 16 by 16 pixel grayscale map, resulting in 256 attributes for each sample number. Given the enormous quantities of mail the Postal Service sorts each day, the accuracy and e#ciency in evaluation are extremely important. In this paper, we combine two independent but related research directions developed for solving the two-class linear discrimination problem. The first is the linear programming (LP) methods stemming from the Multisurface Method of Mangasarian [12, 13]. This method and it's later extension the Robust Linear Programming (RLP) approach [6] have been used in a highly successfully breast cancer diagnosis system [26]. The second direction is the quadratic programming (QP) methods based on Vapnik's Statistical Learning Theory [24, 25]. Statistical Learning Theory addresses mathematically the problem of how to best construct functions that generalize well on future points. The problem of constructing the best linear two-class discriminant can be posed as a convex quadratic program with linear constraints. The resulting linear discriminant is known as a Support Vector Machine (SVM) because it is a function of a subset of the training data known as support vectors. Specific implementations such as the Generalized Optimal Plane (GOP) method has proven to perform very well in practice [8]. Throughout this paper we will refer to the two di#erent approaches as RLP and SVM. The primary focus of this paper is how the the two research directions have di#ered in their approach to solving problems with k > 2 classes. The original SVM method for multiclass problems was to find k separate two-class discriminants [23]. Each discriminant is constructed by separating a single class from all the others. This process requires the solution of k quadratic programs. When applying all k classifiers to the original multicategory dataset, multiply classified points or unclassified points may occur. This ambiguity has been avoided by choosing the class of a point corresponding to the classification function that is maximized at that point. The LP approach has been to directly construct k classification functions such that for each point the corresponding class function is maximized [5, 6]. The Multicategory Discrimination Method [5, 6] constructs a piecewise-linear discriminate for the k- class problem using a single linear program. We will call this method M-RLP since it is a direction extension of the RLP approach. We will show how these two di#erent approaches can be combined two yield two new methods: k-RLP, and M-SVM. In Section 2, we will provide background on the existing RLP and SVM methods. While the k-class cases are quite di#erent, the two-class linear discrimination methods for SVM and RLP are almost identical. They di#er only in the regularization term used in the objective. We use the regularized form of RLP proposed in [3] which is equivalent to SVM except that a di#erent norm is used for the regularization term. For two-class linear discrimination, RLP generalizes equally well and is more computationally e#cient than SVM. RLP exploits the fact that state-of-the-art LP codes are far more e#cient and reliable than QP codes. The primary appeal of SVM is that they can be simply and elegantly applied to nonlinear discrimination. With only minor changes, SVM methods can construct a wide class of two-class nonlinear discriminants by solving a single QP [24]. The basic idea is that the points are mapped nonlinearly to a higher dimensional space. Then the dual SVM problem is used to construct a linear discriminant in the higher dimensional space that is nonlinear in the original attribute space. By using kernel functions in the dual SVM problem, SVM can e#ciently and e#ectively construct many types of nonlinear discriminant functions including polynomial, radial basis function machine, and neural net- works. The successful polynomial-time nonlinear methods based on LP use a multi-step approaches. The methods of Roy et al [20, 19, 18] use clustering in conjuction with LP to generate neural networks in polynomial time. Another approach is to recursively construct piecewise-linear discriminants using a series of LP's [13, 2, 15]. These approaches could also be used with SVM but we limit discussion to nonlinear discriminants constructed using the SVM kernel-type approaches. After the introduction to the existing multiclass methods, M-RLP and k- SVM, we will show how same idea used in the M-RLP, can be adapted to construct multiclass SVM using a single quadratic program. We adapt a problem formulation similar to the two-class case. In the two-class case, initially the problem is to construct a linear discriminant. The data points are then transformed to a higher dimensional feature space. A linear discriminant is constructed in the higher dimension space. This results in a nonlinear classification function in the original feature space. In Section 3, for the k > 2 class case, we begin by constructing a piecewise-linear discriminant function. A regularization term is added to avoid overfitting. This method is then extended to piecewise- nonlinear classification functions in Section 4. The variables are mapped to a higher dimensional space. Then a piecewise-linear discriminant function is constructed in the new space. This results in a piecewise-nonlinear discriminant in the original space. In Section 5, we extend the method to piecewise inseparable datasets. We call the final approach the Multicategory Support Vector Machine (M-SVM). Depending on the choice of transformation, the pieces may be polynomials, radial basis functions, neural networks, etc. We concentrate our research on the polynomial classifier and leave the computational investigation other classification functions as future work. Figure 1 shows a piecewise-second- degree polynomial separating three classes in two dimensions. M-SVM requires the solution of a very large quadratic program. When transforming the data points into a higher dimension feature space, the number Figure 1: Piecewise-polynomial separation of three classes in two dimensions of variables will grow exponentially. For example, a second degree polynomial classifier in two dimensions requires the original variables x 1 and x 2 as well as the variables x 2 2 , and x 1 x 2 . In the primal problem, the problem size will explode as the degree of the polynomial increases. The dual problem, however, remains tractable. The number of dual variables is k - 1 times the number of points regardless of what transformation is selected. In the dual problem, the transformation appears as an inner product in the high dimensional space. Inexpensive techniques exist for computing these inner products. Each dual variable corresponds to a point in the original feature space. A point with a corresponding positive dual variable is referred to as a support vector. The goal is to maintain a high accuracy while using a small number of support vectors. Minimizing the number of support vectors is important for generalization and also for reducing the computational time required to evaluate new examples. Section 6 contains computational results comparing the two LP approaches k- RLP and M-RLP; and the the two QP approaches k-SVM and M-SVM. The methods were compared in terms of generalization (testing set accuracy), number of support vectors, and computational time. The following notation will be used throughout this paper. Mathematically we can abstract the problem as follows: Given the elements of the sets, A i , 1, . , k, in the n-dimensional real space R n , construct a a discriminant function is determined which separates these points into distinct regions. Each region should contains points belonging to all or almost all of the same class. Let A j be a set of points in the n-dimensional real space R n with cardinality m j . Let A j be an m j -n matrix whose rows are the points in A j . The i th point in A j and the i th row of A j are both denoted A j . Let e denote a vector of ones of the appropriate dimension. The scalar 0 and a vector of zeros are both represented by 0. Thus, for x # R n , x > 0 implies that x i > 0 for Similarly, n. The set of minimizers of f(x) on the set S is denoted by arg min x#S f(x). For a vector x in R n , x+ will denote the vector in R n with components (x+ n. The step function x # will denote the vector in [0, 1] n with components n. For the vector x in R n and the matrix A in R n-m , the transpose of x and A are denoted x T and A T respectively. The dot product of two vectors x and y will be denoted x T y and Background This section contains a brief overview of the RLP and SVM methods for clas- sification. First we will discuss the two-class problem using a linear classifier. Then SVM for two classes will be defined. Then RLP will be reviewed. Finally, the piecewise-linear function used for multicategory classification in M-RLP will be reviewed. 2.1 Two Class Linear Discrimination Commonly, the method of discrimination for two classes of points involves determining a linear function that consists of a linear combination of the attributes of the given sets. In the simplest case, a linear function can be used to separate two sets as shown in Figure 2. This function is the separating plane x T PSfrag replacements Figure 2: Two linearly separable sets and a separating plane where w is the normal to the plane and # is the distance from the origin. Let A 1 and A 2 be two sets of points in the n-dimensional real space R n with cardinality m 1 and m 2 respectively. Let A 1 be an m 1 - n matrix whose rows are the points in A 1 . Let A 2 be an m 2 - n matrix whose rows are the points in A 2 . Let x # R n be a point to be classified as follows: The two sets of points, A 1 and A 2 , are linearly separable if where e is a vector of ones of the appropriate dimension. If the two classes are linear separable, there are infinitely many planes that separate the two classes. The goal is two choose the plane that will generalize best on future points. Both Mangasarian [12] and Vapnik and Chervonenkis [25] concluded that the best plane in the separable case is the one that minimizes the distance of the closest vector in each class to the separating plane. For the separable case the formulations of Mangasarian's Multi-surface Method of Pattern Recognition [13] and those of Vapnik's Optimal Hyperplane [24, 25] are very similar [3]. We will concentrate on the Optimal Hyperplane problem since it the basis of SVM, and it is validated theoretically by Statistical Learning Theory [24]. According to Statistical Learning Theory, the Optimal Hyperplane can construct linear PSfrag replacements Class A 1 Class A 2 Figure 3: Two supporting planes and the resulting optimal separating plane discriminants in very high dimensional spaces without overfitting. The reader should consult [24] for full details of Statistical Learning Theory not covered in this paper. The problem in the canonical form of Vapnik [24] becomes to determine two parallel planes and the margin or distance between the two planes is maximized. The margin of seperation between the two supporting planes is 2 #w# . An example of such a plane is shown in Figure 3. The problem of finding the maximum margin becomes[24]: min In general it is not always possible for a single linear function to completely separate two given sets of points. Thus, it is important to find the linear function that discriminates best between the two sets according to some error minimization criterion. Bennett and Mangasarian [4] minimize the average magnitude of the misclassification errors in the construction of their following robust linear programming problem (RLP). min subject to y z -A 2 w are the misclassification costs. To avoid the null solution are the cardinalities of A 1 and A 2 respectively. The RLP method is very e#ective in practice. The functions generated by RLP generalize well on many real-world problems. Additionally, the computational time is reasonably small because its solution involves only a single linear program. Note however that the RLP method no longer includes any notion of maximizing the margin. Statistical Learning Theory indicates that the maximizing the margin is essential for good generalization. The SVM approach [8, 23] is a multiobjective quadratic program which minimizes the absolute misclassification errors, and maximizing the separation margin by minimizing #w# 2 . min fixed constant. Note that Problem 6 is equivalent to RLP with the addition of a regularization term # A linear programming version of (6) can be constructed by replacing the norm used to minimize the weights w [3]. Recall that the SVM objective minimizes the square of the 2-norm of w, #w# The 1-norm of w, |w|, can be used instead. The absolute value function can be removed by introducing the variable s and the constraints -s # w # s. The SVM objective is then modified by substituting e T s for w T w. At optimality, k. The resulting LP is: min w,#,y,z,s We will refer to this problem as RLP since yields the original RLP method. As in the SVM method, the RLP method minimizes both the average distance of the misclassified points from the relaxed supporting planes and the maximum classification error. The main advantage of the RLP method over the SVM problem is that RLP is a linear program solvable using very robust algorithms such as the Simplex Method [17]. SVM requires the solution of quadratic program that is typically much more computationally costly for the same size problem. In [3], the RLP method was found to generalize as well as the linear SVM but with much less computational cost. It is more e#cient computationally to solve the dual RLP and SVM prob- lems. The dual RLP problem is min u,v #e In this paper we use # but # 1 and # 2 may be any positive weights for the misclassification costs. The dual SVM problem and its extension to nonlinear discriminants is given in the next section. 2.2 Nonlinear Classifiers Using Support Vector Machines The primary advantage of the SVM (6) over RLP (7) is that in its dual form it can be used to construct nonlinear discriminants. using polynomial separators, radial basis functions, neural networks, etc. The basic idea is to map the original problems to a higher dimensional space and then to construct a linear discriminant in a higher dimensional space that corresponds to a linear discriminant in the original space. So for example, to construct a quadratic discriminant for a two dimensional problems, the input attributes [x 1 , x 2 are mapped into and a linear discriminant function is constructed in the new five-dimensional space. Two examples of possible polynomial classifiers are given in Figure 4. The dual SVM is applied to the mapped points. The regularization term in the primal objective helps avoid overfitting the higher dimensional space. The dual SVM provides a practical computational approach through the use of generalized inner products or kernels. Figure 4: Two examples of second degree polynomial separations of two sets The dual SVM is as follows: as follows: min To formulate the nonlinear case it is convenient to rewrite the problem in summation notation. Let A be the set of all points A 1 and A 2 . Define 2 to be the total number of points. Let # be such that for x i # A t To construct the nonlinear classification function, the original data points x are transformed to the higher dimension feature space by the function #(x) : n. The dot product of the original vectors x T replaced by the dot product of the transformed vectors (#(x i The first term of the objective function can then be written as the sum: Using this notation and simplifying the problem becomes: min s.t. In the support vector machine (SVM), Vapnik replaces the inner product with the inner product in the Hilbert space K(x, x i ). This symmetric function K(x, x i ) must satisfy Theorem 5.3 in [23]. This theorem ensures is an inner product in some feature space. The choice of K(x, x i ) determines the type of classifier that is constructed. Possible choices include polynomial classifiers as in Figure 4 (K(x, x d is the degree of the polynomial), radial basis function machines (K # (|x-x i where |x - x i | is the distance between two vectors and # is the width parame- ter), and two-layer neural networks (K(x, x sigmoid function) [23]. Variants of SVM (10) have proven to be quite successful in paractice [21, 22, 7]. Note that the number of variables in Program (10) remains constant as increases in dimensionality. Additionally, the objective function remains quadratic and thus the complexity of the problem does not increase. In fact, the size of the problem is dependent on the number of nonzero dual variables . The points x i corresponding to these variables are called the support vectors. According to Statistical Learning Theory, the best solution for a given misclassification error uses the minimum number of support vectors. The final classification function with the generalized kernel function K(x, x i is: support vectors PSfrag replacements A 3 Figure 5: Piecewise-linear separation of sets A 1 , A 2 , and A 3 by the convex piecewise-linear function f(x). 2.3 Multicategory Discrimination In multicategory classification a piecewise-linear separator is used to discriminate points. We will examine two methods for accomplishing this. The first used in SVM [24] is two construct a discriminate function to separate one class from the remaining k - 1 classes. This is process is repeated k times. In the separable case, the linear discriminant for each class must satisfy the following set of inequalities. Find (w To classify a new point x, compute f i one i then clearly the point belongs to Class A i . If more than one f i (x) > 0 or then the class is ambiguous. Thus the general rule is that the class of a point x is determined from (w i , # i finding i such that is maximized. Figure 5 shows a piecewise-linear function R that separates three sets. Note either SVM (10) or RLP can be used to construct the k two-class discriminants. For clarity, we will call this method used with SVM (10), k- SVM. We will denote this method used with RLP (8), k-SVM. The advantage of k-SVM is that it can used for piecewise-nonlinear discriminants which k-RLP is limited to piecewise-linear discriminants. For both k-SVM and k-RLP to attain perfect training set accuracy, following inequalities must be satisfied: This inequality can be used as a definition of piecewise-linear separability. Definition 2.1 (Piecewise-linear Separability) The sets of points A i , 1, . , k, represented by the matrices A i are piecewise- linearly separable if there exist w i Equivalent to Definition 2.1, finding the piecewise-linear separator involves solving the equation A i w i e, can be rewritten as 0 # -A i (w i e, Figure 6 shows an example of a piecewise-linear separator for three classes in two dimensions. The linear separating functions are represented by the quantities PSfrag replacements A 3 Figure Three classes separated by a piecewise-linear function. (w i 1, . , k. The M-RLP method 1 proposed and investigated in [5, 6] can be used to find (w min In M-RLP (15), if the optimal objective value is zero, then the dataset is piecewise-linearly separable. If the dataset is not piecewise- linearly separable, the positive values of the variables y ij l are proportional to the 1 The method was originally called Multicategory Discrimination magnitude of the misclassified points from the plane x T (w i This program (15) is a generalization of the two-class RLP linear program (5) to the multicategory case. Like the original RLP (5) M-RLP does not include any terms for maximizing the margin and it does not directly permit the use of generalized inner products or kernels to allow extension to the nonlinear case. So in the next section we will show how M-RLP and SVM can be combined by including margin maximization and generalized inner products into M-RLP. 3 Formulation of M-SVM: Piecewise-linear Separable Case We now propose to construct piecewise-linear and piecewise-nonlinear SVM using a single quadratic program. Analogous to the two class case we start by formulating the "optimal" piecewise-linear separator for the separable case. Assume that the k sets of points are piecewise-linearly separable, i.e., there exist The class of a point x is determined from (w i , # i finding i such that is maximized. For this piecewise-linearly separable problem, infinitely many (w i , exist that satisfy (16). Intuitively, the "optimal" (w i , # i ) provides the largest margin of classification. So in an approach analogous to the two class support vector machine (SVM) approach, we add regularization terms. The dashed lines in Figure 7 represent the margins for each piece (w i of the piecewise-linear separating function. The margin of separation between the classes i and j, i.e. the distance between and is 2 # . So, we would like to minimize # w i # for all Also, we will add the regularization term 1k to the objective. For the piecewise-linearly separable problem we get the following: min s.t. A i (w i To simplify the notation for formulation of the piecewise-linear SVM, we rewrite this in matrix notation. See Appendix A for complete matrix definitions for general k. For the three class problem the following matrices are Let PSfrag replacements (w 1 A 3 (w 1 (w 2 (w 1 (w 1 Figure 7: Piecewise-linear separator with margins for three classes. where I # R n-n is the identity matrix. Let where A i is a vector of ones. Using this notation for fixed k > 2 the program becomes: min , . , w k T The dual of this problem can be written as: A T u To eliminate the variables w and # from this problem we will first show that the matrix C) is nonsingular. Proposition 3.1 (Nonsingularity of C)) The inverse of matrix (I+ C) for k > 2 is I nk+1 I n - 1 I nk+1 I n . 1 I nk+1 I n - 1 I nk+1 I n where I n indicates the n - n identity matrix. Proof. To show that C) is nonsingular for some k > 2, we will calculate its inverse. The matrix - C as defined in Appendix A has size (n (i - 1)- kn). Recall that n indicates the dimension of the feature space. -In . -In -In -In (k - 1)I n has size kn - kn. Therefore I kn kIn -In -In -In . -In -In -In kIn Through simple calculations it can be shown that the inverse of this matrix is I nk+1 I n - 1 I nk+1 I n . 1 I nk+1 I n - 1 I nk+1 I n Using Proposition 3.1 the following relationship results: A T . (22) It follows from Problem (20) and equation (22) that A T A T u. (23) Using this relationship, we eliminate w from the dual problem. Additionally, # is removed because - After some simplification the new dual problem becomes: A T u To construct the multicategory support vector machine, it is convenient to this problem in summation notation. Let the dual vector , , . , u 1k T , , , . , u k(k-1) T . The resulting dual problem for piecewise-linear datasets is: l li l l l # 0 for is the number of points in class i. Recall, for the piecewise-linear classification function, the class of a point x is determined by finding is maximized. From equation (23), A T u. Solving for w i in summation notation we get: Therefore, 4 Formulation of M-SVM: Piecewise-nonlinearly Separable Case Just like in the two-class case, M-SVM can be generalized to the piecewise- nonlinear functions. To construct the separating functions, f i (x), in a higher dimension feature space, the original data points x are transformed by some 8]. The function f i (x) is now related to the sum of dot products of vectors in this higher dimension feature space: According to [23], any symmetric function K(x, x Theorem [9] can replace the dot product (#(x) - #(x i )). Mercer's Theorem guarantees that any eigenvalue # j in the expansion K(x, x is positive. This is a su#cient condition for a function K(x, x i ) to define a dot product in the higher dimension feature space. Therefore we let K(x, x Returning to dual Problem (25), the objective function contains the sum of dot products A j T of two points in the original feature space. To transform the points A j p to a higher dimension feature space we replace these dot products by The resulting M-SVM for piecewise-linearly separable datasets is: l li , A l l l l # 0 for The points A i l corresponding to nonzero dual variables u ij l are referred to as support vectors. It is possible for A i l to correspond with more Figure 8: Piecewise-polynomial separation of three classes in two dimensions. Support vectors are indicated with circles. than one nonzero variable l In Figure 8, support vectors are represented by a circle around the point. Some points have double circles which indicate that two dual variables u ij l > 0, By the complementarity within the KKT conditions [14], l l (w i Consequently the support vectors are located "closest" to the separating func- tion. In fact, the remainder of the points, those that are not support vectors, are not necessary in the construction of the separating function. The resulting nonlinear classification problem for a point x is to find such that the classification function support vectors support vectors is maximized. 5 Formulation of M-SVM: Piecewise Inseparable Case The proceeding sections provided a formulation for the piecewise-linearly and piecewise-nonlinear separable cases. To construct a classification function for a piecewise- linearly inseparable dataset, we must first choose an error minimization crite- rion. The technique used in the preceeding sections of formulating the M-SVM for piecewise-linearly separable datasets can be combined with the 1-norm error criterion used in Problem (15) of Bennett and Mangasarian [6]. The result is the M-SVM for piecewise-linearly inseparable problems. Using the same matrix notation as in Section 3, we add the terms 1 to the objective of Problem (15). The resulting primal problem is as follows: min w,#,y 13 , . , y T Solving for the dual, substituting A T u, and simplifying produces the following problem: A T u As shown in Proposition 5.1, Problem (30) maximizes a concave quadratic objective over a bounded polyhedral set. Thus there exists a locally optimal solution that is globally optimal. Proposition 5.1 (Concavity of objective) The function u T e- 1 A T u is concave. Proof. The matrix - A T is always positive semi-definite and symmetric. Thus the Hessian matrix (= - 1 A T ) is negative semi-definite. Therefore, the objective is a concave function. Problem (30) is identical to Problem (24) in the piecewise-linearly separable case except the dual variables are now bounded by 1-# # . Therefore, transforming the data points A i l will proceed identically as in Section 4. Using the function to denote the dot product in some feature space, the final M-SVM results: l li , A l l # 1-# # for As in Sections 3 and 4, the class of a point x is determined by finding the maximum function support vectors support vectors To determine the threshold values # i , we solve the primal problem with w fixed, where - Aw is transformed to the higher dimension feature space. This problem is as follows: min #,y l s.t. r l , A l r li r r l , A l r r l # 0, The right side of the constraints are constant. Thus Problem (33) is a linear program and is easily solved. 6 Computational Experiments In this section, we present computational results comparing M-SVM (32), M- RLP (15), k-SVM using SVM (10), and k-RLP using RLP (8). Several experiments on real-world datasets are reported. A description of each of the datasets follows this paragraph. Each of these methods was implemented using the MINOS 5.4 [17] solver. The quadratic programming problems for M- SVM and k-SVM were solved using the nonlinear solver implemented in Minos 5.4. This solver uses a reduced-gradient algorithm in conjunction with a quasi-Newton method. In M-SVM, k-SVM and M-RLP, the selected values for # are given. Better solutions may result with di#erent choices of #. Addition- ally, it is not necessary for the same value of # to be used for both methods. The kernel function for the piecewise-nonlinear M-SVM and k-SVM methods is , where d is the degree of the desired polynomial. Wine Recognition Data The Wine dataset [1] uses the chemical analysis of wine to determine the cultivar. There are 178 points with 13 features. This is a three class dataset distributed as follows: 59 points in class 1, 71 points in class 2, and 48 points in class 3. This dataset is available via anonymous file transfer protocol (ftp) from the UCI Repository of Machine Learning Databases and Domain Theories [16] at ftp://ftp.ics.uci.edu/pub/machine-learning-databases. Glass Identification Database The Glass dataset [11] is used to identify the origin of a sample of glass through chemical analysis. This dataset is comprised of six classes of 214 points with 9 features. The distribution of points by class is as follows: 70 float processed building windows, 17 float processed vehicle windows, 76 non-float processed building windows, 13 containers, 9 tableware, and 29 headlamps. This dataset is available via anonymous file transfer protocol (ftp) from the UCI Repository of Machine Learning Databases and Domain Theories [16] at ftp://ftp.ics.uci.edu/pub/machine-learning-databases. US Postal Service Database The USPS Database [10] contains zipcode samples from actual mail. This database is comprised of separate training and testing sets. There are 7291 samples in the training set and 2007 samples in the testing set. Each sample belongs to one of ten classes: the integers 0 through 9. The samples are represented by 256 features. Two experiments were performed. In the first, the datasets were normalized between -1 and 1. 10-fold cross validation was used to estimate generalization on future data. The second experiment was conducted on two subsets of the United States Postal Service (USPS) data. This data contains handwriting samples of the integers 0 through 9. The objective of this dataset is to quickly and e#ectively interpret zipcodes. This data has separate training and testing sets, each of which consist of the 10 integer classes. We compiled two individual training subsets from the USPS training data. The first subset contains 1756 examples each belonging to the classes 3, 5, and 8. We call this set USPS-1 training data. The second subset contains 1961 examples each belonging to the classes 4, 6, and 7. We call this set USPS-2 training data. Similarly two subsets are created from the testing data. In all of these datasets, the data values are scaled by 1. Testing set accuracies are reported for all four methods. The total numbers of unique support vectors in the resulting classification functions for the M-SVM and k-SVM methods are given. Table contains results for M-RLP, k-RLP, M-SVM, and k-SVM on the Wine and Glass datasets. As anticipated, adding the regularization term to M-SVM 97.19 97.19 97.75 96.63 96.63 Glass M-RLP 64.95 - k-SVM 43.46 55.61 64.95 70.56 72.43 Table 1: Percent testing set accuracies and (total number of support vectors) for M-SVM and k-SVM.05 for k-RLP, M-SVM, and k-SVM. the degree one problem in M-SVM produced better testing generalization than M-RLP on the Wine dataset. The Wine dataset is piecewise-linearly separable. Therefore, the M-RLP method has infinitely many optimal solutions. How- ever, the testing accuracy for M-SVM with degree one on the Glass data was much lower than the M-RLP accuracy. This may indicate that the choice of # is too large. However, as the degree increases the accuracy of the M-SVM method improves and exceeds the M-RLP results. The k-SVM method generalized surprisingly well. The testing accuracies reported for k-SVM on the Wine dataset are higher than those of M-SVM. The linear k-RLP method performed just as well as the quadratic k-SVM program on the Wine dataset and better than the M-SVM and M-RLP methods. On the Glass data, as the degree in- creases, both methods, M-SVM and k-SVM, improve dramatically in testing accuracy. Using higher degree polynomials the M-SVM and k-SVM methods surpass the accuracies of M-RLP and k-RLP. This demonstrates the potential for polynomial and piecewise-polynomial classification functions over linear and piecewise-linear functions. Table contains results for the four methods on the USPS data subsets. Similar observations as above can be made. Both of these datasets are piecewise- linearly separable. The solution that m-RLP has found for each of these datasets tests significantly lower than the other methods. The k-SVM method generalizes slightly better than M-SVM. The k-RLP method reports similar accuracies as the k-SVM method. Additionally, it is solving linear programs rather than quadratic programs, so the computational training time is significantly smaller than the other methods. Changing the parameter # may further improve gener- alization. The M-SVM method consistently finds classification functions using fewer support vectors than those of k-SVM. With fewer support vectors, a sam- M-SVM 91.26 91.87 92.28 92.07 92.28 k-SVM 91.67 92.28 92.89 92.68 92.48 M-SVM 94.58 94.97 95.36 94.97 94.00 k-SVM 96.13 96.52 96.13 95.16 94.58 Table 2: Percent testing set accuracies and (total number of support vectors) for M-SVM and SVM.05 for k-SVM and Degree Table 3: Total computational training time (in seconds) for M-RLP,k-RLP, M-SVM, and k-SVM on USPS-1. ple can be classified more quickly since the dot-product of the sample with each support vector must be computed. Thus the M-SVM would be a good method to choose when classification time is critical. CPU times for training all four methods on the USPS-1 dataset are reported in Table 3. The times for all the datasets are not listed because the programs were run using a batch system on clusters of machines so the timing was not reliable. However, the trends were clear. The k-RLP method is significantly faster than the other methods. In the M-SVM and k-SVM methods, as the degree increased the computational time would decrease and then after a certain degree is reached it would increase. The degree of the polynomial for which it starts to increase varies by dataset. Surprisingly, for the USPS datasets the k-SVM method was faster than the M-RLP method. This was not the case for the Wine and Glass datasets. The M-RLP method had faster training times than k-SVM for these datasets. The times reported are for IBM RS6000 model 590 workstations with 128 MB RAM. Conclusions We have examined four methods for the solution of multicategory discrimination problems based on the LP methods of Mangasarian and the QP methods for SVM of Vapnik. The two-class methods, RLP and SVM are di#er only in the norm of the regularization term. In the past two di#erent approaches had been used for the k > 2 class case. The method we called k-SVM, constructed k two-class discriminants using k quadratic programs. The resulting classifier was a piecewise-linear or piecewise nonlinear discriminant function depending on what kernel function was used in the SVM. The original multicategory RLP for k classes, constructed a piecewise-linear discriminant using a single linear program. We proposed two new hybrid approaches. Like the k-SVM method, k- RLP uses LP to construct k two-class discriminants. We also formulated a new approach, M-SVM. We began the formulation by adding regularization terms to M-RLP. Then like k-SVM with piecewise-nonlinear discriminants, the nonlinear pieces are found by mapping the original data points into a higher dimension feature space. This transformation appeared in the dual problem as an inner product of two points in the higher dimension space. A generalized inner product was used to make the problem tractable. The new M-SVM method requires the solution of a single quadratic program. We performed a computational study of the four methods on four datasets. In general we found that the k- SVM and k-RLP generalized. However, M-SVM used fewer support vectors - a counter-intuitive result since for the two-class class Statistical Learning Theory predicts that fewer support vector should result in better generalization. The theoretic justification of the better generalization of k-SVM and k-RLP and M- SVM and M-RLP is an open question. The k-RLP method provided accurate and e#cient results on the piecewise-linear separable datasets. The k-SVM also tested surprisingly well but requires the solution of k quadratic programs. Thus providing solutions with smaller classification time. On the piecewise- linearly inseparable dataset, the polynomial and piecewise-polynomial classifiers provided an improvement over the M-RLP and k-RLP methods. On the other datasets, the k-RLP method found solutions that generalized best or nearly best in less computational time. A Matrix Representations for Multicategory Support Vector Machines This appendix contains the definitions of the matrices used for the general k-class SVM formulation (18): min Let I -I I . 0 . 0 . 0 0 . 0 I . 0 . 0 . 0 . 0 where I # R n-n is the identity matrix. The matrix - C has n . 0 . 0 . 0 0 . . 0 . 0 . - . 0 . 0 . 0 . 0 where A i . The matrix - A has . 0 . 0 . 0 0 . . 0 . 0 . - . 0 . 0 . 0 . 0 is a vector of ones. The matrix - --R Comparison of classifiers in high dimensional settings. Decision tree construction via linear programming. Geometry in learning. Neural network training via linear programming. Multicategory discrimination via linear programming. Serial and parallel multicategory discrimination. Support vector networks. Methods of Mathematical Physics. Rule induction in forensic science. Linear and nonlinear separation of patterns by linear programming. Nonlinear Programming. Mathematical programming in machine learning. UCI repository of machine learning databases. MINOS 5.4 user's guide. An algorithm to generate radial basis function (RBF)-like nets for classification problems A polynomial time algorithm for the construction and training of a class of multilayer perceptrons. Pattern classification using linear program- ming Incorporating invariances in support vector machines. Comparing support vector machines with gaussian kernels to radial basis function classifiers. The Nature of Statistical Learning Theory. The Nature of Statistical Learning Theory. Theory of Pattern Recognition. Multisurface method of pattern separation for medical diagnosis applied to breast cytology. --TR A polynomial time algorithm for the construction and training of a class of multilayer perceptrons An algorithm to generate radial basis function (RBF)-like nets for classification problems The nature of statistical learning theory Networks Feature minimization within decision trees Feature Selection via Concave Minimization and Support Vector Machines Incorporating Invariances in Support Vector Learning Machines Comparison of View-Based Object Recognition Algorithms Using Realistic 3D Models Comparing Support Vector Machines with Gaussian Kernels to Radial Basis Function Classifiers --CTR Tie-Yan Liu , Yiming Yang , Hao Wan , Hua-Jun Zeng , Zheng Chen , Wei-Ying Ma, Support vector machines classification with a very large-scale taxonomy, ACM SIGKDD Explorations Newsletter, v.7 n.1, p.36-43, June 2005 Koby Crammer , Yoram Singer, On the algorithmic implementation of multiclass kernel-based vector machines, The Journal of Machine Learning Research, 2, 3/1/2002 Rong Jin , Jian Zhang, Multi-Class Learning by Smoothed Boosting, Machine Learning, v.67 n.3, p.207-227, June 2007 Glenn M. Fung , O. L. Mangasarian, Multicategory Proximal Support Vector Machine Classifiers, Machine Learning, v.59 n.1-2, p.77-97, May 2005 Ryan Rifkin , Aldebaro Klautau, In Defense of One-Vs-All Classification, The Journal of Machine Learning Research, 5, p.101-141, 12/1/2004 Yiguang Liu , Zhisheng You , Liping Cao, A novel and quick SVM-based multi-class classifier, Pattern Recognition, v.39 n.11, p.2258-2264, November, 2006 Ping Zhong , Masao Fukushima, Second-order cone programming formulations for robust multiclass classification, Neural Computation, v.19 n.1, p.258-282, January 2007 Andreas Albrecht , Chak-Kuen Wong, Approximation of Boolean Functions by Local Search, Computational Optimization and Applications, v.27 n.1, p.53-82, January 2004 Isabelle Guyon , Jason Weston , Stephen Barnhill , Vladimir Vapnik, Gene Selection for Cancer Classification using Support Vector Machines, Machine Learning, v.46 n.1-3, p.389-422, 2002 Fabien Lauer , Ching Y. Suen , Grard Bloch, A trainable feature extractor for handwritten digit recognition, Pattern Recognition, v.40 n.6, p.1816-1824, June, 2007
support vector machines;data mining;classification;linear programming;machine learning
316278
Stabilized Sequential Quadratic Programming.
Recently, Wright proposed a stabilized sequential quadratic programming algorithm for inequality constrained optimization. Assuming the Mangasarian-Fromovitz constraint qualification and the existence of a strictly positive multiplier (but possibly dependent constraint gradients), he proved a local quadratic convergence result. In this paper, we establish quadratic convergence in cases where both strict complementarity and the Mangasarian-Fromovitz constraint qualification do not hold. The constraints on the stabilization parameter are relaxed, and linear convergence is demonstrated when the parameter is kept fixed. We show that the analysis of this method can be carried out using recent results for the stability of variational problems.
Introduction . Let us consider the following inequality constrained optimization problem: minimize f(z) subject to c(z) - 0; z 2 R n ; (1) where f is real-valued and c : R n the Lagrangian L is defined by denote the current approximation to a local minimizer z and an associated multiplier - for (1). In the sequential quadratic programming (SQP) algorithm, the new approximation z k+1 to z is given by z \Deltaz where \Deltaz is a local minimizer of the following quadratic problem: z subject to c(z k There are various ways to specify the new multiplier. Often - k+1 is a multiplier associated with the constraint in the quadratic problem (2). The typical convergence theorem for (2) (for example, see Robinson's paper [16]) states that for (z a neighborhood of a solution/multiplier pair (z ; - ) associated with (1), the iteration is quadratically convergent when the following conditions hold: (R1) The gradients of the active constraints are linearly independent. (R2) The multipliers associated with the active constraints are strictly positive. There exists a scalar ff ? 0 such that z L(z ; - )w - ffkwk 2 (3) for each w satisfying rc i (z When the constraint gradients are linearly dependent, quadratic convergence in the SQP algorithm is lost in even the simplest cases. For example, consider the problem subject to z 2 - 0: (4) The unique solution is z can be any nonnegative number. If the multiplier approximation - k is held fixed at - 0 and if z 0 ? 0, then for 0 - 1, the iteration reduces to z iteration reduces to z In either case, the convergence is linear. Wright's stabilized sequential quadratic programming algorithm [19] is obtained by applying Rockafellar's augmented Lagrangian [18] to the quadratic program (2). is the penalty parameter at iteration k, then (z local minimax for the problem min z z Wright shows that this method is locally quadratically convergent if the following conditions hold: (W1) The Mangasarian-Fromovitz [15] constraint qualification (MFCQ) holds. In the context of the inequality constrained problem (1), this means that there exists y such that c(z ) +rc(z )y ! 0. There exists a multiplier vector whose components associated with the active constraints are strictly positive. For some fixed ff ? 0, the coercivity condition (3) holds for all choices of - satisfying the the following first-order conditions: r z L(z ; - (W4) The parameter ae k tends to zero proportional to the error in (z Notice that (W1) is weaker than (R1) since there may exist y such that c(z even when the constraint gradients are linearly dependent. On the other hand, the MFCQ does not hold for the example (4), or in cases where an equality constraint is written as a pair of inequalities. Let us consider the stabilized iteration (5) for the example (4) with z 0 near z There are two cases to consider, depending on the choice of - sufficiently large (for example, - z 2 )), then at the solution of (5), the maximizing - is positive and the successive iterates are given by z Hence, if ae (the error at step k), then we have z which implies local quadratic convergence to the solution z The second case corresponds to the situation where the maximizing - in (5) van- ishes. For this to happen, we must have - z 2 k ), and the new iterate is z Again, if ae and we have z In each of these cases, the convergence to the solution z locally quadratic. Also notice in this example that choosing ae k much smaller than the error at step can slow the convergence. In particular, if ae and the max is changed to sup in (5), then the scheme (5) reduces to the usual SQP iteration (2) for which the convergence in the example (4) is linear. On the other hand, we still obtain fast convergence even when ae k is much larger than the error at step k. For example, if convergence. Likewise, the initial inequality in (8) implies that - z 2 which combines with (9) to give z k+1 - z 3 In either case, when ae k ? 0 is fixed, we obtain cubic convergence near the solution z Hence, from an implementational viewpoint, a large ae k is safer than a small one. In this example, quadratic convergence is preserved with the stabilized SQP scheme even though strict complementarity and the MFCQ are violated. In fact, strict complementarity is violated, we have convergence in one step. In this paper, we show in general that Wright's stabilized scheme is locally, quadratically convergent even though both the MFCQ and strict complementarity are violated. In contrast to Wright's assumption (W3) that the second-order condition holds for all multipliers, we give in this paper a local analysis where a second-order condition is required to hold only at a given solution/multiplier pair (z ; - ). When strict complementarity is violated, our second-order condition is slightly stronger than the usual second-order condition in that we assume z L(z for all w satisfying rc i (z strengthened form of the second-order sufficient condition first appears in Robinson's study [17] of Lipschitz stability of optimization problems. Dontchev and Rockafellar show that this condition along with linear independence of the active constraint gradients are necessary and sufficient for Lipschitz stability of the solution and multipliers under canonical perturbations of the problem constraints and cost function. The strong second-order sufficient condition is stable in the sense that it holds when r 2 z L(z ; - ) and rc i (z ) are replaced by nearby matrices, while the usual second-order condition is unstable under problem perturbations. The usual second-order sufficient condition imposes on w in (10) the additional constraint rc i (z )w - 0 for every i such that c i (z must hold for all w in the set where If the usual second-order condition holds for some pair (z ; - ), then we can perturb the constraint c(z) - 0 to c(z) otherwise. For this perturbed problem, (z ; - ) again satisfies the first order conditions, however, the active constraints for the perturbed problem are precisely the constraints in the unperturbed problem with positive multipliers. Therefore, even though the usual second-order sufficient condition holds at (z ; - ), small perturbations in the constraints can yield a problem whose stationary point does not satisfy this condition. Our analysis of (5) is based on the application of tools from stability analysis. That is, we introduce parameters in the iteration map and we study how the map depends on the parameters using a stability result established in [4, Lemma 2.1]. Once we understand how the iteration map depends on the parameters, we can write down a convergence theorem. Other applications of stability theory to the convergence of algorithms and to the analysis of discretizations appear in [3], [4], [5], [6], and [11]. Our analysis of (5) also leads to a new expression for the error in each iterate. In particular, we show that linear convergence is achieved when ae k is fixed, but small. This paper is a revised version of the report [12]. Another approach for dealing with degeneracy in nonlinear programming is developed by Fischer in [9]. In his approach, the original quadratic program (2) is retained, however, the multiplier estimate is gotten by solving a separate quadratic program. Fischer obtains quadratic convergence assuming the MFCQ, the second-order sufficient optimality condition, a constant rank condition for the active constraint gradients in a neighborhood of z , and a condition concerning the representation of the cost function gradient in terms of the constraint gradients. Although these assumptions seem more stringent than those used in our analysis of Wright's method, there are no parameters like ae k in Fischer's method that must be specified in each iteration. 2. Convergence theory. Let z denote a local minimizer for (1) and let - be an associated multiplier satisfying the first-order conditions (6). To state our assumptions, we partition c and - into (g; h) and (-) where the components of h correspond to components of c associated with strictly positive components - of - , while the components of g are the remaining components of c for which the associated components - of - could be zero. Let M denote the set of all multipliers associated with a local minimizer z for (1): Letting B ffi (z) denote the ball with center z and radius ffi, our main result is the Theorem 1. Suppose that f and c are twice Lipschitz continuously differentiable in a neighborhood of a local minimizer z of (1), that - is an associated multiplier in M with - ? 0, and that z L(z for each w such that rh(z choice of the constant oe 0 sufficiently large, there exist constants oe 1 , ffi, and - fi with the property that oe 0 ffi - oe 1 and for each starting guess (z where each z k+1 is a strict local minimizer in the stabilized problem (5), - k+1 is the unique maximizer in (5) associated with z = z k+1 , and ae k is any scalar that satisfies the condition Moreover, the following estimate holds: - k+1 are the closest elements of M to - k and - k+1 respectively. By Theorem 1, letting ae k go to zero proportional to the total error leads to local quadratic convergence. Techniques for estimating the error in the current iterate can be found in [13] and [19]. Since Theorem 1 is a local convergence result, we assume (without loss of generality), that c(z constraint is inactive at z , we simply discard this constraint and apply Theorem 1 to the reduced problem, obtaining a neighborhood where the iterations converge and holds. When this constraint is included in c, it can be shown that for (z near (z ; - ), the associated component of the maximizing multiplier in (5) vanishes. Hence, the iterates obtained either with or without this inactive constraint included in c are identical. Although an equality constraint does not appear explicitly in (1), we can include the equality constraint writing it as a pair of inequalities: e(z) - 0 and One of these constraint functions should be included in g and the other in h. There are an infinite number of multipliers associated with this pair of constraint functions with linearly dependent gradients, and it can always be arranged so that the associated component in - is strictly positive. Throughout this paper, k \Delta k denotes the Euclidean norm and fi denotes a generic positive constant that has different values in different equations, and which can be bounded in terms of the derivatives through second order of f and c in a neighborhood of (z ; - ) and in terms of fixed constants like ff in (11). In order to prove Theorem 1, we recast (5) in the form of a perturbed variational inequality. Let T be the function defined by r z L(z; -) +r 2 z where ae and are regarded parameters. Since we later impose a constraint on ae in terms of p, as in (12), we do not make ae an explicit argument of T . We study properties of solutions to the following inclusion relative to the parameters: Find (z; -) such that where N is the usual normal cone: If - 0, then y 2 N(-) if and only if y - 0 and y T analyzing how the solutions to (15) depend on p, we will establish Theorem 1. If (z local solution to (5), then for a solution to (15), and in this case, (15) represents the first-order optimality conditions associated with (5). More explicitly, (15) implies that z Conditions (17) and (18) are equivalent to saying that - k+1 achieves the maximum in (5) corresponding to z = z k+1 . By the standard rules for differentiating under a maximization (see [2]), the derivative of the extremand in (5) with respect to z is obtained by computing the partial derivative with respect to z and evaluating the resulting expression at that - where the extremand is maximized. Hence, (16) is equivalent to saying the derivative of the extremand with respect to z vanishes at Observe that when is an arbitrary element of M, then -) is a solution to (15). In this section, we apply the following stability result, describing how the solution to (15) changes as p changes, to obtain Theorem 1. The proof of this stability result is given in the next section. Lemma 1. Under the hypotheses of Theorem 1, for any choice of the constant oe 0 sufficiently large and for any oe 1 ? 0, there exist constants fi and ffi such that oe 0 and for each for each ae satisfying (15) has a unique solution (z; Moreover, for every p 1 and satisfying (19) for are the associated solutions to (15), then we have There are three parts to the proof of Theorem 1. Initially, we show that the estimate (13) holds for each (z a solution to associated with Next, we show that for (z sufficiently close to (z ; - ), we can construct a sequence (z contained in a fixed ball centered at (z is the unique solution in N (ae k ) to Finally, we show that for this unique solution (z (15), z k+1 is a local minimizer of (5). Part 1. Error estimate. Let oe 1 ? 0 be any fixed scalar (independent of and let oe 0 and ffi be chosen in accordance with Lemma 1. By Lemma 1, there exists a with the property that for each unique solution (z; ae is any scalar that satisfies the condition We apply Lemma 1 taking If - k is near - , then - - k is near - since k- Suppose that close enough to p that and (ae). Note that (19) holds for Assuming that ae is chosen so that (19) holds for it follows from (20) that where z Expanding E k in a Taylor series around z gives where fi is a generic positive constant. The second inequality (25) is obtained using the relation ab - (a Combining (22), (23), and (25) establishes the estimate for z k+1 in Theorem 1. Dividing (24) by ae gives Utilizing the lower bound ae - oe 0 kz k \Gamma z k, it follows that Hence, dividing (22) by ae and referring to (26), we deduce that By the triangle inequality, we have and combining this with (27) gives This shows that - k+1 is near - when (z We now show that In order to establish this, we exploit the Lipschitz continuity of r z L, the bound (22), and our observation that - k+1 is near - to obtain Expanding r z L(z in a Taylor series around z k and substituting from (16) gives kr z L(z z z z By the triangle inequality, we have Squaring this gives If it can be shown that then by squaring, we have Combining (31) with (32) and (34) gives kr z L(z and combining this with (30) yields which completes the proof of (29). To prove (33), we focus on the individual components of - the relation for each i. There are three cases to consider: . For these components, (35) is a triviality. complementary slackness (18), we have Expanding c(z k ) in a Taylor expansion around z k+1 , utilizing (32), and taking absolute values yields Dividing (36) by ae and utilizing (37) and (26) gives (35). we have Dividing this by ae and again utilizing (37) and (26) gives (35). This completes the proof of both (33) and (29). Consider the following system of linear equations and inequalities in -: r z L(z ; This system is feasible since any - 2 M is a solution. By (29) and a result of Hoffman [14], the closest solution - - k+1 of (38) to - k+1 satisfies That is, Hoffman's result states that if a linear system of inequalities is feasible, then the distance from any given point to the set of feasible points is bounded by a constant times the norm of the constraint violation at the given point. By (29), the norm of the constraint violation is at most fi - E k at - k+1 , from which it follows that the distance from - k+1 to the closest solution of (38) is bounded by a constant times - c(z solution of (38) is contained in M and it is the closest element of M to - k+1 . Relations (25) and (39) combine to complete the proof of (13). Part 2. Containment. Collecting results, we have shown that if is sufficiently close to p has a unique solution (z N (ae) where ae is any scalar satisfying (21), where z k+1 and - k+1 satisfy (13), and where - k+1 also satisfies (28). As oe 1 or ffi in Lemma 1 decreases, the constant fi in (20) can be kept fixed since the set of ae and p that satisfies the constraints of the lemma becomes smaller. That is, if (20) holds for one set of ae and p values, then it holds for all subsets. Let - fi be the constant appearing in (13) that we estimated in Part 1 using Lemma 1. Given any positive ffl ! 1, let us choose oe 1 and ffi of Lemma 1 small enough that for all From the analysis of Part 1, both (13) and (28), there exists, for all a unique solution (z to (15), and we have and where fi 0 denotes the specific constant fi appearing in (28). We now show in an inductive fashion that for (z sufficiently close to (z ; - ), there exists a sequence (z is the unique solution to (15) in N (ae k ) corresponding to and to ae k satisfying (40). In particular, let r 0 be chosen small enough that Starting from any (z 0 (z ; - ), we proceed by induction and suppose that are all contained in B r 1 exists a unique solution (z follows that for By (42) and (43), we have Combining (43) and (44) yields Hence, (z (z ; - ) and the induction is complete. Part 3. Local minimizer. Finally, we show that z k+1 is a local minimizer for (5). Since - that by taking r 0 sufficiently small, k. By complementary slackness (18), we have As noted after (18), if (z; solution of (15), then - achieves the maximum in (5) for z = z k+1 . Since the maximizing - in (5) is a continuous function of z (see [3, Lemma 4]), we conclude that for z near z k+1 , the maximizing -) has - ? 0; hence, by complementary slackness and for z near z k+1 , the maximizing - is given by After making this substitution in (5), the cost function of the minimax problem can be decomposed into the sum of a convex function of z: and a strongly convex part z The first part is convex since the extremand is a linear function of z and the max of a sum is less than or equal to the sum of the maxs. The second part is strongly convex since the Hessian matrix z ae k is positive definite for ae k and r 0 sufficiently small by Lemma 3 in the Appendix. Hence, the cost function of (5) is a strongly convex function of z in a neighborhood of z k+1 , and since the derivative vanishes at z k+1 by (16), z k+1 is a local minimum. This completes the proof of Theorem 1. 3. Stability for the linearized system. The proof of Lemma 1 is based on the following result, which is a variation of Lemma 2.1 in [4]. Lemma 2. Let X be a subset of R n and let k \Delta k ae denote the norm on X. Given In other words, W is the intersection of the closure of X and the ball with center w and radius - . Suppose that F maps W to the subsets of R m , and T where P is a set. Let p be an m \Theta n matrix, and let - , j, ffl, and fl denote any positive numbers for which fflfl ! 1, - and the following properties hold: For some set N oe fT (w; the following problem has a unique solution for each / Find x 2 X such that Lx And if x(/) denotes the solution corresponding to /, we have for each Then for each p 2 P , there exists a unique w 2 W such that T (w; p) 2 F (w). Moreover, for every denotes the w associated with p i , then we have Proof. Fix denote the solution to (45) corresponding to . Observe that for each w a contraction on W with contraction constant ffl. From the assumption T (w Given w 2 W , we have since itself. By the Banach contraction mapping principle, there exists a unique w 2 W such that is equivalent to T (w; p) 2 F (w) for w 2 W and we conclude that for each there is a unique w 2 W such that (w). For denote the associated solutions to T (w; p) 2 F (w). We have Rearranging this inequality, the proof is complete. Proof of Lemma 1. In order to apply Lemma 2 to T defined in (14), we identify w or x with the pair (z; -), we identify p with the triple (z; choose and The set P , chosen later, is a neighborhood of (z In presenting the linearization L of Lemma 2, we partition both the constraint function c and the multiplier - into their components (g; h) and (-) respectively. The linearization L of T (\Delta; p ) around w is given by z -C A =B @ where z L(z In order to apply Lemma 2 to the function T in (14), we need to establish the Lipschitz property (46). This leads us to consider the problem: Find x 2 X such that L(x) +/ 2 F (x). Since L has three components, we partition the linearized problem takes the form: Find (z; -) 2 X such that where in the last equation (50), we exploit the fact that - ? 0 for all (z; -) 2 X. In order to analyze the linearization (48)-(50), we introduce the following auxiliary problem: min z z By (11) and Lemma 3 in the Appendix, the matrix positive definite with smallest eigenvalue at least ff=2 for ae sufficiently small, where ff appears in (11). Hence, the extremand in (51) is strongly convex in z and strongly concave in -. By [8, Prop. 2.2, p. 173], the max and the min can be interchanged. For fixed -, the min in (51) is attained by the solution z of the following linear equation: Q+ae After substituting this z in (51), we obtain an equivalent strongly concave maximization problem in the variable - and the parameters ', r, and s appear linearly in the cost function. Since strongly concave maximization problems are Lipschitz continuous functions of linear parameters in the cost (for example, see [3, Lemma 4]), the maximizing - is a Lipschitz continuous function of the parameter /, and by (52), the minimizing z is also a Lipschitz continuous function of /. Since (48)-(50) are the first-order conditions for a solution of (51), and since the first-order conditions are necessary and sufficient for optimality in this convex/concave setting, we conclude that (48)-(50) have a unique solution (z(/); -(/)) depending Lipschitz continuously on the parameters ', r, and s. We now apply [10, Theorem 2.1] in order to determine more precisely how the Lipschitz constant of (z(/); -(/)) depends on ae. Defining the set where -(/)), it follows from [10, Theorem 2.1], that if fl 1 and fl 2 satisfy constants work for all / 1 and / 2 . After substituting for - in (52), using the relation (Az(/) we see that z = z(/) satisfies Q+ae where C and t are gotten by augmenting B and s by the rows of A and the components of r associated with i 2 c(/). Let UR denote an orthogonal decomposition of C where R is right triangular 1 with linearly independent rows and U has orthonormal columns. After substituting in (54), we obtain the equivalent system R \GammaaeI !/ z \Gamma' The second equation t)=ae in this system is the definition of - and the first equation in this system is (54). Since the coefficient matrix is nonsingular for ae sufficiently small (see [1, Lemma 1.27]), both z(/) and -(/) are Lipschitz continuous functions of /, where the Lipschitz constant is independent of ae for ae sufficiently small: Let V have orthonormal columns chosen so that the matrix ( U The vector -(/) satisfies (50) and the components - 0 (/) of -(/) associated with satisfy an analogous relation in (53). Hence, we have Multiplying by ( U ae U Multiplying again by ( U Since -(/) is a Lipschitz continuous function of /, it follows from (56) that - 0 (/) and -(/)) are Lipschitz continuous functions of /, while the remaining components That is, in the rectangular matrix of -(/) vanish. Therefore, when c(/ give us the estimates and fi is independent of ae for ae sufficiently small. By [10, Theorem 2.1], this estimate is valid for arbitrary choices of the parameters. Given a fixed positive scalar oe 1 , we assume that ae is always - oe 1 . Hence, after multiplying (58) by ae and adding to (57), we conclude that for some constant fl independent of ae, where For the choice (48)-(50) have the solution z Defining the parameter it follows from (59) that for all for all Combining this with (59), we conclude that (45) has a unique solution and (46) holds for all Given an arbitrary scalar oe 1 ? 0, and positive scalars oe 0 and ffi, chosen shortly, we define choosing oe 0 sufficiently large and ffi sufficiently small, we will satisfy the condition fflfl ! 1 of Lemma 2, and by choosing ffi smaller if necessary, the remaining conditions of Lemma 2 will be satisfied. have r z L(z; - z Expanding in a Taylor series around p gives for all p 2 P . Since the right side of (62) is bounded by fi ffi, the constant j in (P1) can be made arbitrarily small by taking ffi small. ffl be any positive number small enough that fflfl ! 1 where fl appears in (59). Observe that z z L(z By the assumed Lipschitz continuity of the derivatives, and by (61), we have, for all p 2 P and for any choice of w 1 and w 2 , Choose oe 0 large enough and ffi small enough that the factor multiplying kw in (63) is - ffl. This establishes (P2) and fflfl ! 1. Choosing ae, the set W of Lemma 2 is By (62) and (63), we have for all w 2 W and since smaller if necessary so that where \Delta is defined in (60). Hence, by (64), we have for all w 2 W and for all w 2 W and This completes the proof of (P3) since we already showed that (45) has a unique solution satisfying (46) for all Finally, let us consider the condition of Lemma 2, where Pg. Recalling that and utilizing (62), we see that (65) is satisfied if for each (z; - here the factor fl=(1 \Gamma fflfl ) of (65) is absorbed into fi. Assuming is small enough that fik- rearrange (66) to obtain the equivalent relation By the definition of P , ae - oe (67) will be satisfied. Choosing ffi small enough that (68) is satisfied, it follows that (67) holds, which implies in turn (65). Since all the assumptions of Lemma 2 are satisfied, almost directly. The neighborhood N (ae) of Lemma 1 coincides with W of Lemma 2, while the ball B ffi of Lemma 1 is the same ball appearing in the definition of P in (61). The constant fi of Lemma 1 is the expression fl=(1 \Gamma fl ffl) of (47). Appendix . A matrix bound. Lemma 3. Given matrices Q and B where Q is symmetric, suppose that Then given any ffi ? 0, there exists oe ? 0 and neighborhoods B of B and Q of Q such that ae for all v 2 R n , Proof. If w lies in the null space of B , then by (69). There exists a scalar - ? 0 such that kB uk -kuk for all u in the row space of B . Hence, for u in the row space of B , we have An arbitrary vector in v 2 R n has the orthogonal decomposition is in the row space of B and w is in the null space of B . Since B that ae Utilizing the inequality ab - ffla with Inserting this in (70), we have ae Let us choose oe small enough that oe for all v and for all oe. Since the expression B=oe is a continuous function of B and Q, there exists neighborhoods Q of Q and B of B such that for all v and for all oe, we have Taking 2ffl, the proof is complete. --R New York Generalized gradients and applications Lipschitzian stability in nonlinear control and optimization Lipschitzian stability for state constrained nonlinear optimal control The Euler Approximation in State Constrained Optimal Control Characterizations of strong regularity for variational inequalities over polyhedral convex sets Convex Analysis and Variational Problems Modified Wilson method for nonlinear programs with nonunique multipliers Lipschitz continuity for constrained processes Approximations to the multiplier method Convergence of Wright's Stabilized SQP Algorithm Stability in the presence of degeneracy and error estimation On approximate solutions of systems of linear inequalities The Fritz-John necessary optimality conditions in the presence of equality and inequality constraints Perturbed Kuhn-Tucker points and rates of convergence for a class of nonlinear-programming algorithms Strongly regular generalized equations The multiplier method of Hestenes and Powell applied to convex programming Superlinear convergence of a stabilized SQP method to a degenerate solution --TR Lipschitzian stability in nonlinear control and optimization Lipschitzian Stability for State Constrained Nonlinear Optimal Control Superlinear Convergence of a Stabilized SQP Method to a Degenerate Solution Convex analysis and variational problems Characterizations of Strong Regularity for Variational Inequalities over Polyhedral Convex Sets --CTR Hiroshi Yamashita , Hiroshi Yabe, Quadratic Convergence of a Primal-Dual Interior Point Method for Degenerate Nonlinear Optimization Problems, Computational Optimization and Applications, v.31 n.2, p.123-143, June 2005 D. Goldfarb , R. Polyak , K. Scheinberg , I. Yuzefovich, A Modified Barrier-Augmented Lagrangian Method for Constrained Minimization, Computational Optimization and Applications, v.14 n.1, p.55-74, July 1999 Jin-Bao Jian, A Superlinearly Convergent Implicit Smooth SQP Algorithm for Mathematical Programs with Nonlinear Complementarity Constraints, Computational Optimization and Applications, v.31 n.3, p.335-361, July 2005 Andreas Fischer , Houyuan Jiang, Merit Functions for Complementarity and Related Problems: A Survey, Computational Optimization and Applications, v.17 n.2-3, p.159-182, December 2000
superlinear convergence;error estimation;stabilized SQP;sequential quadratic programming;degenerate optimization;quadratic convergence
316283
Service Combinators for Web Computing.
AbstractThe World Wide Web is rich in content and services, but access to these resources must be obtained mostly through manual browsers. We would like to be able to write programs that reproduce human browsing behavior, including reactions to slow transmission-rates and failures on many simultaneous links. We thus introduce a concurrent model that directly incorporates the notions of failure and rate of communication, and then describe programming constructs based on this model.
Introduction The World-Wide Web [1] is a uniform, highly interconnected collection of computational resources, and as such it can be considered as forming a single global computer. But, what kind of computer is the Web, exactly? And what kind of languages are required for programming such a computer? Before approaching the second question, we must answer the first. In other words, what is the Web's model of computation? 1.1 Some Kind of Computer We can quickly scan a checklist of possibilities. Is the Web a Von Neumann computer? Of course not: there is no stored program architecture, and no single instruction counter. Is the Web a collection of Von Neumann computers? Down below yes, but each computer is protected against outside access: its Von Neumann characteristics are not exploitable. Is the Web a file system? No, because there is no universally available "write" instruction (for obvious good reasons). Is the Web a distributed database? In many ways yes: it certainly contains a huge amount of information. But, on the one hand the Web lacks all the essential properties of distributed databases, such as precise data schemas, uniform query languages, distributed coherence, consistent replication, Current Affiliation: Microsoft Research, Cambridge UK. crash recovery, etc. On the other hand, the web is more than a database, because answers to queries can be computed by non-trivial algorithms. Is the web a distributed object system? Now we are getting closer. Unfortunately the web lacks some of the fundamental properties of traditional (in-memory, or local- area) object systems. The first problem that comes to mind is the lack of referential integrity: a pointer (URL 1 ) on the web does not always denote the same value as it did in a previous access. Even when a pointer denotes the same value, it does not always provide the same quality of access as it did in a previous access. Moreover, these pointers are subject to intermittent failures of various duration; while this is unpleasant, these failures are tolerated and do not negate the usefulness of the web. Most importantly, though, the web does not work according to the Remote Procedure Call (RPC) semantics that is at the basis of distributed object systems. For example, if we could somehow replace HTTP 2 requests with RPC requests, we would drastically change the flavor of web interactions. This is because the web communication model relies on streaming data. A request results in a stream of data that is displayed interactively, as it is downloaded. It is not that case that a request blocks until it produces a complete result (as in RPC). At a more abstract level, here are the main peculiarities of a web computer, with respect to more familiar computational models. Three new classes of phenomena become observable: ffl Wide-area distribution. Communication with distant locations involves a noticeable delay, and behavior may be location-dependent. This is much more dramatic than the distribution observable on a multiprocessor or a local-area network. It is not possible to build abstractions that hide this underlying real- ity, if only because the speed of light is a physical limit. ffl Lack of referential integrity. A URL is a kind of network pointer, but it does not always point to the same entity, and occasionally it does not point at all. This is quite different from a pointer in a programming language. ffl Quality of service. A URL is a "pointer with a bandwidth". The bandwidth of connections varies widely with time and route, and may influence algorithmic behavior. A web programmer will need to take these new observables into account. This calls for new programming models, and eventually new languages. Therefore, there are no good names for describing the computational aspects of the web. We might as well name such a computer a "Berners-Lee computer", after the inventor of HTTP. The model of computation of the web is implicit in the HTTP protocol and in the web's hardware and software infrastructure, but the implications 2 The HyperText Transfer Protocol is the web's communication protocol [3, 9, 12]. of the interaction of the protocol and the infrastructure are not easy to grasp. The protocol is actually quite simple, but the infrastructure is likely to slow down, speed up, crash, stop, hang, and revive unpredictably. When the web is seen as a computer, e.g., for the purpose of programming it, it is a very unusual computer. 1.2 Some Kind of Algorithmic Behavior What kind of activities can one carry out on such a strange computer? Here is an example of a typical behavior a user might exhibit. Hal carries out a preliminary search for some document, and discovers that the document (say, a big postscript file) is available at four servers: in Japan, Australia, North America, and Europe. Hal does not want to start a parallel four-way download at first: it would be antisocial and, in any case, it might saturate his total incoming bandwidth. Hal first tries the North American server, but the server is overloaded and slow in downloading the data. So, he opens another browser window and contacts the European server. This server is much faster, initially, but suddenly the transfer rate drops to almost zero. Will the North American server catch up with it in the end? While he waits to find out, Hal remembers that it is night in Japan and Australia, so the servers should be unloaded and the intercontinental link should not be too starts two more downloads. Japan immediately fails, but Australia starts crawling along. Now Hal notices that the European download has been totally idle for a few minutes so he kills it, and waits to see who wins out between Australia and North America. What is described above is an instance of an "algorithmic" behavior that is used frequently for retrieving data. The decisions that determine the flow of the algorithm are based on the observable semantic properties of the web: load, bandwidth, and even local time. The question is: what language could one use to comfortably program such an algorithm? An important criterion is that the language should be computationally complete with respect to the observable properties of the web: Every algorithmic behavior should be scriptable. That is, if a user sitting in front of (say) a browser carries out a set of observations, decisions, and actions that are algorithmically describable, then it should be possible to write a program that emulates the same observation, decisions, and actions. 1.3 Some Kind of Run-Time System The web is one vast run-time system that, if we squint a bit, has many of the features of more conventional run-time systems. There are atomic data structures (images, sounds, video), and compound data structures (HTML 3 documents, forms, tables, multipart data), as described by various 3 HyperText Markup Language [2, 9] Internet standards. There are pointers (URLs) into a universal address space. There are tree and graph structures (XML 4 and MIME 5 multipart/related format) that can be used to transmit complex data. There are standardized type systems for data layout (XML DTD's and MIME media types). There are subroutine calls and parameter passing conventions (HTTP and CGI 6 ). There are plenty of available processors (web servers) that can be seen as distributed objects that protect and dispense encapsulated data (e.g., local databases). Finally, there are some nice visual debuggers (web browsers). What programming language features could correspond to this run-time system? What could a "Web language" look like? Let's try to imagine it. A "value" in a web language would be a pair of a MIME media type and an appropriate content. (For example, the media type may be image/jpeg and the content would be a jpeg-encoded image). These values could be stored in variables, passed to procedures, etc. Note that the contents of such values may be in the process of being fetched, so values are naturally concurrently evaluated. Other kinds of values would include gateways and scripts (see below). The syntax of a programming language usually begins with the description of the "literals": the entities directly denoting a value, e.g., a numeral or a string. A "media literal" would be a pair of a media type and a URL indicating the corresponding content. Such a literal would be evaluated to a value by fetching the URL content (and verifying that it corresponds to the claimed media type). A "gateway literal" would be a pair of a Gateway Type and a URL indicating a gateway (e.g., a CGI gateway). The gateway type indicates the parameter passing conventions expected by the gateway (e.g., GET, POST, or ISINDEX) and the media types for the requests and replies. A gateway literal evaluates to a gateway value, which just sits there waiting to be activated. A gateway value can be activated by giving it its required parameters. The syntax for such an activation would look like a normal procedure call: g(a is a literal, variable, or expression that produces a gateway value, and the arguments are (normally) media values. The effect of this call is to package the arguments according to the conventions of the gateway, ship them through the appropriate HTTP connection, get the result, and convert it back to a value. The final value may be rendered according to its type. As an example, g might be a constant URL that refers to the Altavista search engine, in which case the arguments would include a phrase for the search engine to look up. The result would most likely be of type text/html, which could be either displayed or processed further. We now have primitive data structures (media literals) and primitive control structures (gateway calls). With this much we can already write "scripts". These scripts could be stored on the web as Internet Media, so that a script can refer to another 4 Extensible Markup Language [11] 5 Multi-purpose Internet Mail Extension [5, 9] 6 Common Gateway Interface [9] one through a URL. The syntax for script calls would be the same as above. Scripts would have to be closed (i.e. no free variables, except for URLs), for security and network transparency. This is arguably a web language. The scripts are for the web (not for a particular operating system or file system) and in the web (not stored in a particular address space or file). Such a language uses the web as its run-time system. 1.4 Other Issues Two major issues remain to be addressed. The first issue is output parsing. Because of the prominence of browsers and browser-ready content on the web, the result of a query is almost always returned as an entity of type text/html (a page), even when its only purpose is to present, say, a single datum of type image/jpeg. The output has to be parsed to extract the information out of the HTML. Although the structure of HTML pages is relatively well defined, the parsing process is delicate, error-prone, and can be foiled by cosmetic changes in the pages. In order to make web programming possible on a large scale, one needs some uniform way of describing the protocol of a gateway and, by extension, of a script. This problem is in the process of being solved by the XML standards for data description, and by sophisticated pattern-matching languages for web pages [10]. We will not discuss this topic any further in this paper. The second issue is the design of control structures able to survive the flaky connectivity of the web. This is the topic of the rest of the paper. Suppose we want to write a program that accesses and manipulates data on the web. An obvious starting point is an HTTP library, embedded in some programming lan- guage, that gives us the ability to issue HTTP calls. Each HTTP call can fail with fairly high probability; therefore, error-handling code must be written using the error-handling primitives of the language. If we want to write code that reacts concurrently to network conditions and network failures in interesting ways, then the error-handling code ends up dominating the information-processing code. The error-handling and concurrency primitives of common languages are not very convenient when the exceptional code exceeds the normal code. An alternative is to try to use high-level primitives that incorporate error handling and concurrency, and that are optimized for web programming. In this section we introduce such primitives. A service is an HTTP information provider wrapped in error-detection and handling code. A service combinator is an operator for composing services, both in terms of their information output and of their error output, and possibly involving concurrency. The error recovery policy and concurrency are thus modularly embedded inside each service. The idea of handling failures with combinators comes, in a sequential context, from LCF tactics [6]. Perhaps not surprisingly, our combinators have some similarities to those found in concurrent, real-time languages for programming "reactive systems", such as Esterel [4]. One major difference is that our combinator language includes the concept of the "rate of progress". We have also tried to concentrate only on those features that allow the easy expression of common web browsing algorithms, so our language is very small and simple. Our language does not appear to allow every possible algorithmic behavior to be expressed: to achieve that goal, we suggest that it would probably be necessary to start with a language like Esterel, and explicitly include the concept of "rate of progress" in programs. Our combinators could then be provided as a library to allow easy expression of many common web browsing algorithms. 2.1 Services AWeb server is an unreliable provider of data: any request for a service has a relatively high probability of failing or of being unacceptably slow. Different servers, though, may provide the same or similar services. Therefore it should be possible to combine unreliable services to obtain more reliable "virtual services". A service, when invoked, may never initiate a response. If it initiates a response, it may never complete it. If it completes a response, it may respond "service denied", or produce a real answer in the form of a stream of data. In the period of time between a request and the end of a response, the main datum of interest is the "transmission rate", counted as bytes per second averaged over an interval. It is interesting to notice that the basic communication protocol of the Internet does not provide direct data about the transmission rate: this must be estimated from the outside. We might also be interested in what percentage of the total service has been completed. Unfortunately, many web servers have historically not provided information on the length of the document they are sending, so we were forced to omit this aspect from our language. 2.2 Service Combinators We now describe the syntax and informal semantics of the service combinators in our language. The combinators were chosen to allow common manual web-browsing techniques to be reproduced with simple programs. The syntax for our language is given below in BNF-like notation. We use curly brackets f g for grouping, square brackets [ ] for zero or one occurrences, postfix * for zero or more occurrences, postfix + for one or more occurrences, infix j for disjunction, and simple juxtaposition for concatenation. We use '-' to indicate an occurrence of - in the language itself. For lexical items, [c indicates a character in the range Services limit(Real index(String gateway G (String; fId=Stringg ) Gateway types G ::= get j post Lexical items String StringChar ::= any single legal character other than ' '' " or one of the pairs of characters "' ``'' "" Real ::= [~] Digit The basic model for the semantics of services is as follows: a service may be invoked at any time, and may be invoked multiple times. An invocation will either succeed and return a result after some time, or fail after some time, or continue forever. At each point in time it has a rate which is a real number indicating how fast it is progressing. Basic Service The service url(String) fetches the resource associated with the URL indicated by the string. The result returned is the content fetched. The service fails if the fetch fails, and the rate of the service while it is running is the rate at which the data for the resource is being received, measured in kilobytes per second. Gateways gateway get (String; gateway post (String; Each of these services is similar to the service url(String), except that the URL String should be associated with a CGI gateway having the corresponding type (index, get or post). The arguments are passed to the gateway according to the protocol for this gateway type. Sequential Execution The "?" combinator allows a secondary service to be consulted in the case that the primary service fails for some reason. Thus, the service acts like the service that if S 1 fails then it acts like the service S 2 . Concurrent Execution The "-" combinator allows two services to be executed concurrently. The service starts both services S 1 and S 2 at the same time, and returns the result of whichever succeeds first. If both S 1 and S 2 fail, then the combined service also fails. The rate of the combined service is always the maximum of the rates of S 1 and S 2 . Time Limit timeout(t; S) The timeout combinator allows a time limit to be placed on a service. The service timeout(t; S) acts like S except that it fails after t seconds if S has not completed within that time. Rate Limit limit(t; This combinator provides a way to force a service to fail if the rate ever drops below a certain limit r. A start-up time of t seconds is allowed, since generally it takes some time before a service begins receiving any data. In our original design, this start-up time was applied to the whole service S. We later realized that this design leads to an unfortunate interaction with some of the other combinators. This is demonstrated by the example: limit(t; )). The problem here is that if S 1 fails after the first t seconds, then S 2 is initiated but is not allowed any start-up time, so quite likely the whole service fails. This motivates the following semantics. The service limit(t; acts like the service S, except that each physical connection is considered to have failed if the rate ever drops below r Kbytes/sec after the first t seconds of the connection. Physical connections are created by invocations of url, index and gateway combinators. In general, a rate limit can be described as a function f from time to rate, and a combinator limit(f; S) could be used; the current combinator could then be defined via a step function. The more general combinator is supported by our semantics, but we decided to adopt the current, simpler, definition. We have found this semantics for rate to be useful in many situations, but admittedly it may seem surprising to some users, and appear to have some strange interactions with other combinators. In fact, these interactions are quite simple: the limit combinator distributes through all combinators other than physical connections. Repetition repeat(S) The repeat combinator provides a way to repeatedly invoke a service until it suc- ceeds. The service repeat(S) acts like S, except that if S fails, repeat(S) starts again. Unlike many traditional language constructs, the repeat combinator does not include a condition for terminating the loop. Instead, the loop can be terminated in other ways, e.g., timeout(t; repeat(S)). Non-termination stall The stall combinator never completes or fails and always has a rate of zero. The following examples show how this can be useful. This program waits 10 seconds before starting S. timeout(10, stall)) This program repeatedly tries to fetch the URL, but waits 10 seconds between attempts Failure fail The fail combinator fails immediately. It is hard to construct examples in our small language where this is useful, though we include it anyway for completeness, and because we expect it to be useful when the language is extended to include conditionals and other more traditional programming language constructs. 2.3 Examples We now show some simple examples to illustrate the expressiveness of the service com- binators. It is our intention that our service combinators be included as a fragment of a larger language, so for these examples (and in our implementation) we include some extensions. We use "let" to make top-level bindings, and we use "fun(x) body" and "function(argument)" for function abstraction and application. It is not completely clear how to define the semantics for these extensions in terms of the service model used above. If we are going to be very web-oriented, then perhaps functions should be implemented as gateways, and bound variables should actually refer to dynamically allocated URLs. Regardless, for the simple examples which follow, the meaning should be clear, since all function declarations could be expanded out. The actual implementation allows more flexible use of functions than this, but we will not elaborate here, since we are not yet sure of exactly what status functions should have in our language. We would also like to point out that by embedding our language in a host language, as we have done with Java (see Section 4), we need only make use of the abstraction mechanisms provided by the host language. Example 1 This program simply attempts to fetch the named URL. Example 2 gateway get("http://www.altavista.digital.com/cgi-bin/query", pg="q" what="web" q="java") This program looks up the word "java" on the AltaVista search engine. Example 3 This program attempts to fetch the POPL'97 conference page from one of two alternate sites. Both sites are attempted concurrently, and the result is that from whichever site successfully completes first. Example 4 This program attempts to fetch the WWW7 conference page from Australia. If the fetch fails or the rate ever drops below 1 Kbytes/sec, then it starts again. If the page is not successfully fetched within 20 seconds, then a site known to be easily reachable is used to retrieve a failure message. Example 5 gateway get("http://www.altavista.digital.com/cgi-bin/query", pg="q" what="web" q=x) gateway get("http://www.HotBot.com/search.html", . MT=x . ) This program defines two functions for looking up search strings on AltaVista and HotBot, and a single function which tries both concurrently, returning whichever succeeds first. It then uses this function to lookup the word "java", to see which engine performs this task the fastest. There are a large number of other constant parameters required by the HotBot gateway, which we have omitted above. Example 6 gateway post("http://www.dbc.com/cgi-bin/htx.exe/squote", source="dbcc" TICKER=ticker format="decimals" index("http://www.grayfire.com/cgi-bin/get-price", ticker) This program defines two functions for looking up stock quotes based on two different gateways. It then defines a very reliable function which makes repeated attempts in the case of failure, alternating between the gateways. It then uses this function to lookup the quote for Compaq Computer. We now give a formal semantics for the service combinators. 3.1 The Meaning Function The basic idea of the semantics is to define the status of a service at a particular time u, given the starting time t. Possible values for this status are hrate; ri, hdone; ci, and hfaili, where r is the rate of a service in progress, and c is the content returned by a successful service. The particular value of r is not used in the semantics, but we have retained it here since the application which initiates a service might want to make use of this parameter, e.g. to display it to the user. It might also be of use when considering extending the language with new combinators. The limit combinator does not immediately fit into this framework. We handle it by introducing an additional parameter in the semantics that is a function from a time interval to a rate. This function takes as argument the duration since a connection was started and indicates the minimum rate that satisfies all applicable rate limits. Thus our semantics is based on a meaning function M with four arguments: a service, a start time, a status time, and a rate limit function. The meaning function implicitly depends on the state of the web at any time. Instead of building a mathematical model of the whole web, we assume that a url query returns an arbitrary but fixed result that, in reality, depends on the state of the web at the time of the query. A complication arises from the fact that web queries started at the same time with the same parameters may not return the same value. For example, two identical url queries could reach a server at different times and fetch different versions of a page; moreover, two identical gateway queries may return pages that contain different hit counters. For simplicity, to make M deterministic, we assume the existence of an "in- stantaneous caching proxy" that caches, for an instant, the result of any query initiated at that instant. That is, we assume that url(String) j while we do not assume that timeout(t; stall) ? The meaning function is defined compositionally on the first argument as follows: (i.e. the time at which S 1 fails) and and and and and hfaili otherwise and h(v 0 and (with hdone; ci if a connection fetching the URL String at time t succeeds before time u with content c. hfaili if there exists u 0 s.t. u connection fetching the URL String at time t fails at time or has rate r 0 at time u 0 , with r ri otherwise, if a connection fetching the URL String at time t has rate r at time u The semantics for gateway is essentially the same as for url, except that the parameters are passed when opening the connection. A basic property of this semantics, which can be proven by structural induction, is that if M(S; t; u; then for all 3.2 Algebraic Properties Our semantics can be used to prove algebraic properties of the combinators. In turn, these properties could be used to transform and optimize web queries, although we have not really investigated these possibilities. We define: Simple properties can be easily derived, for example: fail fail stall An interesting observation is that our semantics equates the services repeat(fail) and stall. However, it is still useful to include stall in the language, since the obvious implementation will be inefficient for the service repeat(fail). Conversely, we could consider eliminating fail in favor of timeout(0, stall). A range of other equations can be derived, each by an easy but tedious case analysis: timeout(t; limit(u, limit(t; limit(t; limit(t; limit(t; limit(t; limit(t; Other "intuitive" properties can be checked against the semantics, and sometimes we may discover they are not satisfied. For example, S - S 0 - S, because the operator asymmetrically picks one result if two results are obtained at exactly the same time. Implementation We have implemented an interpreter for the language of service combinators, including top-level definitions and functions as used in the examples. This implementation is written in Java [7]. The implementation also provides an easy interface for programming with service combinators directly from Java. This essentially provides an embedding [8] of our language in Java. Services are defined by the abstract class Service, declared as follows: public abstract class Service - public Content getContent(FuncTime tf); public float getRate(); public void stop(); - To invoke a service, the getContent method is passed a function of time which determines the minimum rate for physical connections, exactly as in the formal se- mantics. At the top-level, the function ZeroThreshold is normally used, indicating no minimum rate. This method returns the content when the service completes, or returns null when the service fails. During the invocation of the service, the current rate of the service can be found using a concurrent call to the getRate method, which might be used to display a rate to the user. Also, the current invocation can be aborted by calling the stop method. The various service combinators are provided as Java classes, whose constructors take sub-services as arguments. For example, the following Java code corresponds to example 3: new Par( new Media("http://www.cs.umd.edu/~pugh/popl97/"), new Media ("http://www.diku.dk/popl97/")) In some sense the implementation is only an approximation to the formal semantics because the semantics ignores interpretation overhead. However, it is quite a close ap- proximation, since interpretation overhead is very small for most programs compared to the time for data to be transmitted. The rate of a basic service is defined to be the average over the previous two seconds, as calculated by samples done five times a second. This appears to give good results in practice, though admittedly it is somewhat ad hoc. The implementation uses the Sun Java classes to fetch URLs. A small modification was made to them so that failures are correctly detected, since they normally catch failures and instead return an error page. Concurrency is implemented using Java threads, which required a surprisingly large amount of work. Functions are implemented essentially by manipulating the abstract syntax prior to the actual initiation of a service. A programmer could of course write their own subclasses of service, which could call arbitrary Java code. 5 Conclusions and Future Directions We have shown that a simple language allows easy expression of common strategies for handling failure and slow communication when fetching content on the web. We have defined such a language based on service combinators, implemented it, and given a formal semantics for it. Our intention was that our language will be extended to a more powerful web- scripting language. Such a language would include some common language features such as functions and conditionals. It should also include additional features for web-programming beyond our service combinators, for example special constructs for manipulating HTML content, possibly linked to a browser. Another direction is to allow scripts themselves to be stored on the web, and in our implementation we have experimented with this. It should also be possible to write scripts which provide content on the web, and perhaps even export a function as a CGI gateway. A full web-scripting language might even allow a thread of execution to migrate via the web. A language with all these features would certainly be very powerful and useful. Partially inspired by our work, Kistler and Marais have designed a language called "WebL" [10] which includes some of these features, in particular constructs for manipulating HTML, as well as our service combinators. This language has been released to the public, and is becoming relatively popular. In this paper we have concentrated only on one particular aspect which is unique to the web, namely its unreliable nature. By first considering the fundamental properties of the web we have built a small language whose computation model is tailored for web programming. We hope that this language and model will serve as a firm foundation for larger web scripting languages. Elements of our language design and formal semantics should also be useful to designers of other domain specific languages in domains which include real-time concerns or where failures are common. 6 Acknowledgements Luca Cardelli would like to thank David Jefferson and a group of people at Digital Palo Alto who met to discuss web-related issues. Those discussions provided the initial stimulus for this work. Rowan Davies would like to thank Digital SRC, including all its staff, for providing the opportunity to work in a exceptionally stimulating and pleasant environment during the summer of 1996. Mart ' in Abadi, Paul McJones, and Benjamin Pierce reviewed early drafts. --R "The World-Wide Web" Hypertext Markup Language - 2.0 Hypertext Transfer Protocol - HTTP/1.0 "The Esterel Synchronous Programming Lan- guage: Design, Semantics, Implementation " Edinburgh LCF. The Java Language Specification. "Modular Domain Specific Languages and Tools" Internet Engineering Task Force. "WebL - a programming language for the web" World Wide web Consortium. World Wide web Consortium. --TR --CTR Marjan Mernik , Uro Novak , Enis Avdiauevi , Viljem umer, Design and implementation of simple object description language, Proceedings of the 2001 ACM symposium on Applied computing, p.590-595, March 2001, Las Vegas, Nevada, United States Christian Queinnec, The influence of browsers on evaluators or, continuations to program web servers, ACM SIGPLAN Notices, v.35 n.9, p.23-33, Sept. 2000 Monika Solanki , Antonio Cau , Hussein Zedan, ASDL: a wide spectrum language for designing web services, Proceedings of the 15th international conference on World Wide Web, May 23-26, 2006, Edinburgh, Scotland Daniela Florescu , Andreas Grnhagen , Donald Kossmann, XL: an XML programming language for Web service specification and composition, Computer Networks: The International Journal of Computer and Telecommunications Networking, v.42 n.5, p.641-660, 05 August Daniela Florescu , Andreas Grnhagen , Donald Kossmann, XL: an XML programming language for web service specification and composition, Proceedings of the 11th international conference on World Wide Web, May 07-11, 2002, Honolulu, Hawaii, USA J. C. M. Baeten , H. M. A. van Beek , S. Mauw, Specifying internet applications with DiCons, Proceedings of the 2001 ACM symposium on Applied computing, p.576-584, March 2001, Las Vegas, Nevada, United States Reiner Kraft, Designing a distributed access control processor for network services on the Web, Proceedings of the 2002 ACM workshop on XML security, November 22-22, 2002, Fairfax, VA Westley Weimer , George C. Necula, Finding and preventing run-time error handling mistakes, ACM SIGPLAN Notices, v.39 n.10, October 2004 R. Braumandl , M. Keidl , A. Kemper , D. Kossmann , A. Kreutz , S. Seltzsam , K. Stocker, ObjectGlobe: Ubiquitous query processing on the Internet, The VLDB Journal The International Journal on Very Large Data Bases, v.10 n.1, p.48-71, August 2001 Carlos Varela , Gul Agha, Programming dynamically reconfigurable open systems with SALSA, ACM SIGPLAN Notices, v.36 n.12, December 2001 Nick Benton , Luca Cardelli , Cdric Fournet, Modern concurrency abstractions for C#, ACM Transactions on Programming Languages and Systems (TOPLAS), v.26 n.5, p.769-804, September 2004 Marjan Mernik , Jan Heering , Anthony M. Sloane, When and how to develop domain-specific languages, ACM Computing Surveys (CSUR), v.37 n.4, p.316-344, December 2005
World Wide Web;programming languages;wide area computation
316287
A Domain-Specific Language for Regular Sets of Strings and Trees.
AbstractWe propose a new high-level programming notation, called FIDO, that we have designed to concisely express regular sets of strings or trees. In particular, it can be viewed as a domain-specific language for the expression of finite-state automata on large alphabets (of sometimes astronomical size). FIDO is based on a combination of mathematical logic and programming language concepts. This combination shares no similarities with usual logic programming languages. FIDO compiles into finite-state string or tree automata, so there is no concept of run-time.It has already been applied to a variety of problems of considerable complexity and practical interest. In the present paper, we motivate the need for a language like FIDO, and discuss our design and its implementation. Also, we briefly discuss design criteria for domain-specific languages that we have learned from the work with FIDO. We show how recursive data types, unification, implicit coercions, and subtyping can be merged with a variation of predicate logic, called the Monadic Second-order Logic (M2L) on trees. FIDO is translated first into pure M2L via suitable encodings, and finally into finite-state automata through the MONA tool.
Introduction Finite-state problems are everywhere, embedded in many layers of software systems, but are often difficult to extract and solve computationally. This basic observation is the motivation for the work presented in this paper. Recent research by us and our colleagues has exploited the Monadic Second-Order Logic (M2L) on finite strings and trees to solve interesting and challenging problems. In each case, the results are obtained by identifying an inherent regularity in the problem domain, thus reducing the problem to questions of regular string or tree languages. Successful applications today include verification of concurrent systems [9, 8], hardware verification [2], software engineering [10], and pointer verification [7]. Work in progress involves a graphical user interface for regular expressions extended with M2L and document logics for the WWW. The r-ole of M2L in this approach is to provide an extraordinarily succinct notation for complicated regular sets. Our applications have demonstrated that this notation in essence can be used to describe properties, where finite state automata, regular ex- pressions, and grammars would be tend to be cum- bersome, voluminous, or removed from the user's intuition. This is hardly surprising, since M2L is a variation on predicate logic and thus natural to use. Also, it is known to be non-elementarily more succinct than the other notations mentioned above. Thus, some formulas in M2L describe regular sets for which the size of a corresponding DFA compared to the size of the formula is not bounded by any finite stack of exponentials. The flip side of this impressive succinctness is that M2L correspondingly has a non-elementary lower bound on its decision procedure. Surprisingly, the MONA implementation of M2L [5] can handle non-trivial formulas, some as large as 500,000 charac- ters. This is due in part to the application of BDD techniques [4], specialized algorithms on finite-state automata [3], and careful tuning of the implementation [11]. Also, it turns out that the intermediate automata generated, even those resulting from sub-set constructions, are usually not big compared to the automata representing the properties reasoned about. The successful applications of M2L and MONA reside in a common, productive niche: they require the specification of regular sets that are too complicated to describe by other means, but not so complicated as to be infeasible for our tools. While the basic M2L formalism is simple and quite intuitive, early experience quickly indicated that this formalism in practice suffers from its primitive domain of discourse: bit-labeled strings and trees. In fact, M2L specifications are uncomfortably similar to assembly code programs in their focus on explicit manipulations of bit patterns. For M2L interpreted on trees, the situation is even worse, since the theory of two or more successors is far less familiar and intuitive than the linear sublogic. Similarly to the early experiences with machine lan- guages, we found that M2L "programmers" spent most of their time debugging cumbersome encodings Our contributions In this paper, we propose a domain-specific programming formalism FIDO that combines mathematical logic and recursive data types in what we believe are new ways. We suggest the following four kinds of values: finite domains, recursive data values (labeled by finite domains), positions in recursive data values, and subsets of such positions. We show that many common programming language concepts (like sub- typing, coercions, and unification) make sense when the underlying semantics is based on assigning an automaton (and not a store transformer) to expressions This semantic property allows us to view the compilation process as calculations on values that are deterministic, finite-state automata, just as an expression evaluator calculates on numbers to arrive at a result. That is, automata are the primitive objects that are subjected to operations reflecting the semantics of the language. This view is quite different from the method behind most state-machine formalisms used in verification (such as the Promela language [6]): a language resembling a general purpose language expresses a single finite-state machine, whose state space and transition system is constructed piecemeal from calculations that explore the state space. Our view, however, is similar to some uses of regular expressions for text matching, except that most implemented algorithms avoid the construction of deterministic automata. FIDO is implemented and provides, along with supporting tools, an optimizing compiler into M2L for- mulas. It has been used for several real-life applications and is also the source of the biggest formulas yet handled by MONA. In this article, we motivate and explain FIDO. In particular, we discuss the type system and compilation techniques. We also give several examples (some taken from articles already published, where we have used FIDO without explaining its origin or design). Some technical considerations concerning the relationship between our data structures for tree automaton representation [3] and the compilation process will be explained elsewhere. 2 M2L and MONA Basic M2L has a very simple syntax and seman- tics. Formulas are interpreted on a binary tree (or a string) labeled with bit patterns determining the values of free variables. First-order terms (t) denote positions in the tree and include first-order variables (p) and successors (t:0 and t:1). Second-order terms (T ) denote sets of positions (i.e. monadic predi- cates) and include second-order variables (P ), the empty set (;), unions (T 1 ). The basic predicates are set membership ), and set inclusion T 1 ). The logic permits the usual connectives (-, :) and first and second-order quantifiers ). By convention, a leaf is a position p for which p:1. The sublogic for strings uses only the 0-successor. The MONA tool accepts such formulas in a suitable ASCII syntax and produces a minimum DFA that accepts all trees satisfying the given formula. Thus, satisfiability of a formula is equivalent to non- emptyness of the derived automaton, and validity is equivalent to totality. The values of free variables in the formula are encoded in the alphabet of the automaton. Thus, a formula with yields an alphabet \Sigma of size 2 32 . In the internal representation of these automata, the transition function is shared, multi-terminal \Sigma-BDD. With these BDD techniques, the MONA tool has processed formulas with hundreds of thousands of characters in a few minutes. 3 The Motivation A small example will motivate the need for a high-level notation. Assume that we wish to use MONA to prove the following (not too hard) theorem: for every string in (a+b) c, any a is eventually followed by c. To state this theorem in M2L, we must first choose an encoding of the labels a, b, and c. For this purpose we introduce two free second-order variables . The labels can be encoded according to the following (arbitrary) schema: a position p has label a if , that is, a corresponds to the bit pattern 00. Similarly, we can assign to b the bit pattern 01 and to c the pattern 10. The property "a is eventually followed by c" becomes the formula: The regular expression (a+b) c can in a similar way be encoded as the formula: and the theorem above is then formally stated as the implication OE ) /. The MONA tool will readily verify that this formula is an M2L tautology, thus proving our theorem. A reason for M2L specifications being much more voluminous than promised should now be apparent: there is a significant overhead in encodings. More- over, there are no automatic checks of the consistent use of bit patterns. Support for such encodings is usually supplied by a type system. For M2L on strings, regular sets immediately suggest themselves as notions of types. It is quite common for M2L formulas to be of the implicational form OE ) /, where OE is a formula restricting the strings to a coarse regular set and / provides the more intricate restrictions. Thus, a high-level version of the above formula could look like: string x: (a+b) c; The keywords string and pos are intended to declare free variables of these two kinds. This formula can be read as: "for all positions p in the string x, if p has label a, then there exists a position q, also in x, such that p is before q and q has label c". The main formula is almost the same as the MONA version, but the proper use of labels is now supported by the compiler and can be verified by a type checker. For M2L interpreted on trees, however, there is no intuitive analogue to regular expressions. But from programming languages we know an intuitive and successful formalism for specifying coarse regular sets of trees: recursive data types. Thus, we adopt a well-known and trusted programming concept into our high-level notation. Using this idea, we may prove our theorem as follows: string x: T; Arbitrary recursive data types may of course be expressed directly as formulas, but the translation is voluminous and best performed automatically. The translation also solves the problem that the Mona decision procedure works on formulas whose domain of discourse is only binary trees, whereas values of recursive data types are trees with a varying number of branches. (The solution is rather technical, since it involves bending the recursive data type value into the shape of a binary branching tree.) Note that not all regular tree sets can be captured by recursive data types. Consider binary trees, in which nodes are colored red, green, or blue. The subset of trees in which at most one node is colored blue is not a recursive data type; however, it is easily captured by the following FIDO specification: tree x: RGB; Certainly, more advanced and complicated notions of data types could similarly be adopted [1]. How- ever, the FIDO philosophy is to rely heavily on standard programming language concepts to describe complex structures and operations. The ambition is that these idioms should be merged seamlessly with logical concepts that describe complex properties of such structures. In general, we allow finite domains (from which the name FIDO derives) to be the values of nodes. Finite domains are constructed conjunctively and disjunctively from enumerated and scalar types. Thus the alphabets of tree automata reading such recursive data types easily become very large. 4 The Design While this paper is not intended as a proper language report, we will explain the more interesting or unusual concepts that the FIDO notation provides Domains and Data Types Finite domains are constructed from simple scalar lists, freely combined with a product operator (&) and a union operator (j). When the union of two finite domains is formed, it is required that they are disjoint. Thus, if we define the domains: then a value of the domain State may be written as State:[a,b,2]. From the more complicated definitions we obtain values as: E:[a1,[a2,b3,[a2,b1]]]. In for- mulas, finite domain values may be unified using a syntax such as State:[pc?,a,r?], where ps and r are unification variables. The recursive data types are quite ordinary, except that the constructors are generalized from single names to finite domains. The finite domains could of course be encoded as (non-recursive) data types. We have chosen to have a separate concept for several reasons. First, the distinction between trees and their labels seems intuitive for many applications. Second, we can allow more operations on finite domains that on trees; for example, the introduction of unification or concatenation on trees would yield an undecidable formal- ism. Third, in the translation into automata, finite domains are encoded in BDDs whereas trees are encoded in the state space; often, it is necessary for the programmer to control this choice. An example is: which is a linear data type of sequences of state values terminated by a node labeled done. A non-linear example is: denoting some binary trees. The notation [1.10] abbreviates the corresponding 10 scalars. Variables There are four kinds of variables in FIDO. We introduce them by examples. A domain variable s that ranges over states may be declared as dom S: State; Tree variables (recursive data type variables) x and y may be declared as: tree x,y: Tree; Each variable defines its own space of positions. Thus, a position in x cannot be used to denote a node in y. To declare a position variable that may denote positions in either x or y, we write: pos p: x, A value of this variable points to a node in either x or y, but in any case, the node pointed to is either red or black. Similarly, a set variable S containing positions in the union of x's and y's position spaces may be declared as: set S: x, Quantification All variables can be quantified over. For example, the formula "there is a computation that contains a loop" may involve quantification over both strings (trees), finite domains, and positions: 9string x: Comp. 9dom s: State. 9pos p,q: x.(p!q - p=s - q=s) Types A type may have one of four different kinds: pos, set, dom, and tree. The pos kind corresponds to first-order terms, i.e. positions in trees; the set kind similarly encompasses second-order terms; the dom kind is new compared to M2L and describes values of finite domains; finally, the tree kind is a further extension that captures entire trees as values. Within each kind, a type is further refined by a set of tree names and a set of data type names. For example, the type (pos,fx,yg,fR,S,Tg) denotes positions of nodes in either the tree x or y that are roots of subtrees of one of the data types R, S, or T. These refined types prove to be very convenient in restricting free variables in the model and in expressing relativized quantifications. Furthermore, this type structure proves crucial for optimizations in the implementation. The type rules impose restrictions on all operators in the language. Generally, the rules boil down to trivial statements about finite sets. For example, if the terms s i have types (set,X i has type (set,X 1 Also, if the term has type (pos,X,D), then the term p.n has type T.n is the data type reached from T along an n-successor. Some formulas can be decided purely on the basis of the type system. For example, if p has type and s has type (set,X s ,D s ), then the ;. Such static decisions are exploited by the FIDO compiler. Notational Conveniences A formal notation has a tendency to become a quagmire of details. In the design of FIDO, we have attacked this problem in three different ways. First, it is often convenient implicitly to coerce values between different kinds. This we have expressed through a simple subtype structure. Two types are related by the sub-type in the following finite order: @ @ @ tree set dom pos posset root read The order relations have been decorated with coercions functions: posset computes the set of positions in a tree, root finds the root positions of a tree, and read computes the label of a position. This subtype structure is exploited to automatically insert coer- cions. Note that our subtype structure clearly is semantically coherent, so that coercions are unique [12]. If we added the coercion: singleton: pos ! set, then semantic coherence would fail. Second, we allow implicit casts between finite do- mains. For example, in the definitions: we will allow values of the domains Fruit and Root to be used directly as values of the domain Veg- etable, even though they strictly speaking should be expressed as e.g. cast(Fruit:apple,Vegetable). Third, we allow sensible defaults whenever possible. Thus, if a name can unambiguously be determined to have a specific meaning, then all formal qualifiers may be dismissed. For example, if the name orange is only used as a scalar in the domain Fruit, then the constant Fruit:orange may be written simply as orange. As a specific example of these techniques, consider the previous theorem: We have already used a number of syntactic conveniences here. From the above specification, the compiler inserts the necessary coercions to reconstruct the more explicit code: 9pos q:x,T.(p!q - read(q)=T:c)) which is somewhat harder to read. In a real-life 12-page formula, more than 400 such pedantic corrections are automatically performed. Decompilers Any compiler writer must also consider the need for decompilers. In the case of FIDO and MONA, specifications are translated into a more primitive logic. This is fine, if we only want to decide valid- ity. However, MONA also has the ability to generate counter-examples for invalid formulas. But a MONA counter-example will make little sense for a FIDO programmer, since it will have a completely different structure and be riddled with bit patterns. Consequently, the FIDO system provides a decompiler that lifts such counter-examples into the high-level syntax. Another use of MONA, illustrated in the following section, is to generate specific automata. For this application, FIDO provides a different decompiler that expresses an automaton as a particular kind of attribute grammar at the level of recursive data types. 5 Examples We now provide a few examples illustrating the benefits of the FIDO notation. We include applications that aim to synthesize automata as well as some that aim to verify properties. For each case we present a toy example in some detail and sketch a large, previously published application of a similar nature. Synthesis The following example considers (a fragment of) the HTML syntax. Not all syntactically correct HTML- specifications should be allowed. For example, a document should never contain an anchor within another anchor (to not confuse the reader). Such a constraint could be incorporated into the context-free syntax, but it would essentially double the number of non-terminals. However, we can easily capture HTML parse trees as values of a recursive data type. On these trees we can then express as a logical formula the restriction that we wish to impose: anchor(u: URL, a: HTML) j paragraph j rule j list(l: LIST); follows: The transition HTML j anchor: [0,0] 7! 1 means that if the node is an anchor and each of its two subtrees synthesizes the attribute value 0, then it should synthesize the attribute value 1. These simple ideas have been exploited in a collaboration with the Ericsson telecommunications company to formalize the constraints of design architectures [10]. Verification Two specifications, of say distributed systems, can be compared by means of the implication or bi- implication connective. Consider a simple-minded mutual exclusion protocol for two processes with a shared memory: Turn: Integer range 1.2 := task body Proc1 is begin loop b: loop exit when d: Turn := 2 task body Proc2 is begin loop b: loop exit when c: Critical-Section-2; d: Turn := loop The FIDO specification models all valid interleaved computations and simply asks whether the safety property holds: string ff: Computation; let dom pc: PC; dom r: Turn.( [a,pc?,r?] 7! [b,pc?,r?] j Valid(string x: Computation): formula; 8pos p: x.( if p.next6=done then let dom s,t: State. (p=s?; p.next=t?; Trans(s,t)) Mutex(string x: Computation): formula; 8pos p: x.(p6=[c,c,?]) The formula trans(s,t) . end denotes the binary relation on State domain values that hold for the pairs of values that can simultaneously match one of the listed cases. The corresponding raw MONA formula looks like: (p q in G0) & (q notin POS-p in S1) !=? s1-p c)) & (POS-p in S2)) & (POS-p in S3)) & ((POS-p in S4) !=? s0-r)) & ((((((POS41 in S0) !=? s0-pc) POS-p in S3)) & ((POS-p in S4) !=? s0-r)) & ((((((POS41 in OS-p in S0) !=? s0-pc) & ((POS-p in S1) !=? s1-pc)) & (POS-p in POS41 in S0) !=? s0-pc) & (s1-t !=? s1-pc)) & (POS41 in S2) in ~(POS-p in S3))) & (POS-p in S4)) & ((((((POS41 in S0) !=? POS41 in S3)) & (POS41 in S4)))) - (((((((POS-p in S0) !=? (~(POS-p in in (~(POS41 in S3))) & ((POS41 in S4) !=? s0-r)))) - ((((((POS -p in S0) & (POS-p in S1)) & ((POS-p in S2) !=? s0-pc)) & ( (POS-p in S3) !=? s1-pc)) & ((POS-p in S4) !=? s0-r)) & ((( POS-p in S0)) & s1-s) & ((POS-p in S2) !=? s0-pc)) & ((POS- in in (~ (POS41 in S1))) & ((POS41 in S2) !=? s0-pc)) & ((POS41 in POS41 in S1)) & ((POS41 in S2) !=? s0-pc)) & ((POS41 in S3) (~(POS41 in S1))) & ((POS41 in S2) !=? s0-pc)) & ((POS41 in in Since the simplistic mutual exclusion protocol is clearly correct, this formula is a tautology. How- ever, if we mistakenly tried to verify that Proc2 could never enter the critical region: Mutex(string x: Computation): formula; 8pos p: x.(p6=[?,c,?]) then FIDO would generate the counterexample: Computation:[b,a,1]( Computation:[b,b,1]( Computation:[c,b,1]( Computation:[d,b,1]( Computation:[a,b,2]( Computation:[a,c,2]( Computation:done))))))); which exactly describes such a computation. For more realistic examples, internal events can be projected away by means of the existential quanti- fier. In [8], a detailed account is given of an application of the FIDO language to a verification problem posed by Broy and Lamport in 1994. The distributed systems are described in an interval logic, which is easily defined in FIDO. The evolution of a system over a finite segment of time is modeled as a recursive, linear data type with a constructor that define the current event. Thus position variables instants. The thousands of events possible in the distributed systems that are compared are described by the types: type The property to be verified requires 12 pages of FIDO specification which translates into an M2L formula of size 500,000 characters. An entirely different use of FIDO allows us to verify many properties of PASCAL programs that use pointers [7]. By encoding a store as a string and using FIDO formulas to describe the effects of program statements, we can automatically verify some desirable properties. An example is the following pro- gram, which performs an in-situ reversal of a linked list with colored elements: program case tag: Color of var x,y,p: List; begin while x!?nil do p:=x-.next; x:=p end. With our system, we can automatically verify that the resulting structure is still a linked list conforming to the type List. We can also verify that no pointer errors have occurred, such as dangling references or unclaimed memory cells. However, we cannot verify that the resulting list contains the same colors in reversed order. Still, our partial verification will clearly serve as a finely masked filter for many common programming errors. The PASCAL tool adds another level of compila- tion, from (simple) PASCAL programs to FIDO specifications to M2L formulas and finally to finite-state automata accepting encodings of the initial stores that are counterexamples. The above program pages of FIDO specification which expands into a 60,000 character M2L formula. The resulting automaton is of course tiny since there are no counterexamples, but the largest intermediate result has 74 states and 297 BDD-nodes. A direct translation into MONA would essentially add all the complexities of the FIDO compiler to the implementation of the PASCAL tool. 6 The Implementation We have implemented parsing, symbol analysis, and type checking in entirely standard ways. What is non-standard is that every subterm is compiled into a tree automaton through an intermediate representation as an M2L formula. Thus resource allocation becomes a question of managing bit pattern encodings of domain values, which are expressed in M2L formulas. We have strived to achieve a parsimonious strategy, since every bit squandered may potentially double the MONA execution time. As a concrete example, consider the type: Its encoding in MONA requires seven bits in all. Two type bits T0 and are used to distinguish between the types Tree and Enum and special null nodes in a tree; a single group bit G0 is used to distinguish between the red-black and the leaf variants; and four scalar bits S0, S1, S2, and S3 are used to distinguish between the values of each final domain, the largest of which is [0.10]. As an example, the formula: macro TYPE-Tree(var1 (p in T0) & (p notin T1); expresses that the type Tree is encoded by the bit pattern 10. The null nodes are required to encode an arbitrary fan-out in a binary tree. For example, the tree: 'i 'i 'i 'i 'i 'i @ @ @ is represented as: 'i 'i 'i 'i 'i 'i 'i 'i 'i @ @ @ @ @ @ where the null nodes have double lines. A well-formed value of the type Tree is described by the MONA predicate TREE Tree. It imposes the proper relationship between types and values of nodes and their descendants. A technical problem is that this predicate is most naturally described through recursion which is not available in M2L. This is solved by phrasing the requirements through a universal quantification that imposes sufficient, local well-formedness properties: macro TREE-Tree(var1 (all1 q: (p!=q) =? The NULL and WF predicates describe the relationship between a single node and its immediate descendants macro NULL(var1 (p notin T0) & (p notin T1) & (p notin G0) & (p notin (p notin S2) & (p notin S3); macro TYPE-Enum(var1 (p notin T0) & (p in T1); macro GROUP-Tree-red-black(var1 (p notin G0); macro GROUP-Tree-leaf(var1 (p in G0); macro GROUP-Tree(var1 macro SCALAR-Enum(var1 (p notin macro SCALAR-Tree-red-black(var1 macro SCALAR-Tree(var1 macro SUCC-Enum(var1 macro SUCC-Tree-red-black(var1 macro SUCC-Tree-leaf(var1 macro WF-Enum(var1 macro WF-Tree(var1 (p notin S0) & SUCC-Tree-leaf(p) are encoded in a simple inductive man- ner. For illustration, consider the tiny formula p2s, where the arguments are general terms. The term p of kind pos generates a tuple ! p is a first-order variable constrained by the formula OE. Similarly, the term s of kind set generates a tuple ! s; / ?, where s is now a second-order variable. The term p2s then generates the formula how existential quantification corresponds to discharging of registers. It is a fairly straightforward task to provide similar templates for all the FIDO constructs, thereby providing a compositional semantics and a recipe for a systematic translation. As a concrete example, consider the formula: tree x: Tree; x.left.right.left=red which describes the regular set of trees in which a specific node exists and is colored red. It is encoded as the following MONA formula: macro DOT-right(var1 p,var1 macro DOT-left(var1 p,var1 assume ex1 p: root(p) & TREE-Tree(p); ex0 t0-1,t1-1,g0-1,s0-1: ex0 t0-2,t1-2,g0-2,s0-2: (t1-1!=?(POS6 in T1)) & (t0-1!=?(POS6 in T0)) & (g0-1!=?(POS6 in G0)) & (s0-1!=?(POS6 in S0)) & The analogy to run-time is the computation by MONA of a finite-state automaton from the generated formula. This is always guaranteed to ter- minate, but may be prohibitively expensive. Thus, the FIDO compiler does extensive optimizations at many levels, in most cases relying heavily on the type structure. FIDO formulas are symbolically reduced to detect simple tautologies and to eliminate unnecessary variables and quantifiers. A careful strategy is employed to allocate short bit patterns for finite domains, which includes a global analysis of concrete uses. We have also discovered that the FIDO type structure contains a wealth of information that is not currently being exploited by the MONA implemen- tation. An ongoing development effort will enrich the notion of tree automata to accommodate positional information that can be derived from FIDO specifications. This may in some case yield an exponential speed-up at the MONA level. 7 FIDO as a DSL In our opinion, FIDO is a compelling example of a domain-specific language. It is focused on a clearly defined and narrow domain: formulas in monadic second-order logic or, equivalently, automata on large alphabets. It offers solutions to a classical software problem: drowning in a swamp of low-level en- codings. It advocates a simple design principle: go by analogy to standard programming language con- cepts. It uses a well-known and trusted technol- ogy: all the phases of a standard compiler, including optimizations at all levels. It provides unique benefits that cannot be matched by a library in a standard programming language: notational con- veniences, type checking, and global optimizations. And during its development, we discovered new insights about the domain: new notions of tree automata and algorithms. --R A specification language based on WS2S. Hardware verification using monadic second-order logic Algorithms for guided tree automata. Monadic second-order logic in practice The model checker spin. Automatic verification of pointer programs using monadic second-order logic A case study in automated verification based on trace abstractions. Automated logical verification based on trace ab- straction Formal design constraints. BDD algorithms and cache misses. Three approaches to type struc- ture --TR --CTR Anders Mller , Michael I. Schwartzbach, The pointer assertion logic engine, ACM SIGPLAN Notices, v.36 n.5, p.221-231, May 2001 Marjan Mernik , Jan Heering , Anthony M. Sloane, When and how to develop domain-specific languages, ACM Computing Surveys (CSUR), v.37 n.4, p.316-344, December 2005
trees;regular sets;strings;logic;domain-specific languages
316355
An Interior-Point Algorithm for Nonconvex Nonlinear Programming.
The paper describes an interior-point algorithm for nonconvex nonlinear programming which is a direct extension of interior-point methods for linear and quadratic programming. Major modifications include a merit function and an altered search direction to ensure that a descent direction for the merit function is obtained. Preliminary numerical testing indicates that the method is robust. Further, numerical comparisons with MINOS and LANCELOT show that the method is efficient, and has the promise of greatly reducing solution times on at least some classes of models.
INTRODUCTION In this paper, we describe modifications that we used to convert the quadratic programming (QP) solver LOQO into a general nonconvex nonlinear programming solver (of the same name). As a code for quadratic programming, LOQO implements an interior-point method. The complete details of the QP implementation can be found in [25]. In view of the dramatic success of modern interior-point methods for linear and quadratic program- ming, our guiding philosophy was to modify the QP interior-point method in LOQO as little as possible to make a robust and efficient general nonconvex nonlinear optimizer. For notational simplicity, we begin by considering the following nonlinear programming problem: subject to h i (x) # 0, (1) where x is a vector of dimension n and f (x) and the h i (x) are assumed to be twice continuously differentiable. This is a simplification of the general nonlinear programming problem, which can include equality constraints and bounds on the variables. In fact, the method developed in this paper and its implementation in LOQO handles all of these cases efficiently, and the exact way in which this is accomplished is discussed in detail later. For 1991 Mathematics Subject Classification. Primary 90C30, Secondary 49M37, 65K05. Key words and phrases. Nonlinear programming, interior-point methods, nonconvex optimization. Research of the first author supported by NSF grant CCR-9403789 and by ONR grant N00014-98-1-0036. Research of the second author supported by AFOSR grant F49620-95-1-0110. the present, we consider this version of the problem, as it greatly simplifies the terminol- ogy, and the extension to the more general case is quite straightforward. The interior-point approach taken in this paper is described as follows. First, add slack variables w i to each of the constraints (1), reformulating the problem as subject to h(x) -w= 0, (2) where h(x) and w represent the vectors with elements respectively. We then eliminate the inequality constraints in (2) by placing them in a barrier term, resulting in the problem subject to h(x) - where the objective function is the classical Fiacco-McCormick [8] logarithmic barrier function. The Lagrangian for this problem is y, and the first-order conditions for a minimum are #w where W is the diagonal matrix with elements is the vector of all ones, and #h(x) is the Jacobian matrix of the vector h(x). We now modify (5) by multiplying the second equation by W , producing the standard primal-dual system where again Y is the diagonal matrix with elements y i . Note that the second equation implies that y is nonnegative, which is consistent with the fact that y is the vector of Lagrange multipliers associated with what were originally inequality constraints. The basis of the numerical algorithm for finding a solution to the primal-dual system (6) is Newton's method, which is well known to be very efficient for linear and convex quadratic programming. In order to simplify notation and at the same time highlight connections with linear and quadratic programming, we introduce the following definitions: and AN INTERIOR-POINT ALGORITHM FOR NONCONVEX NONLINEAR PROGRAMMING 3 The Newton system for (6) is then #x #w #y 3 5 . The system (7) is not symmetric, but is easily symmetrized by multiplyingthe first equation by -1 and the second equation by -W -1 , yielding #x #w #y -# where y, Note that # measures primal infeasibility. By analogy with linear programming, we refer to # as dual infeasibility. Also, note that # , and # depend on x , y, and w even though we don't show this dependence explicitly. It is (8), or a small modification of it, that LOQO solves at each iteration to find the search directions #x , #w, #y. Since the second equation can be used to eliminate #w without producing any off-diagonal fill-in in the remaining system, one normally does this elimination first. Hence, #w is given by and the resulting reduced KKT system is given by -H (x, y) A T (x) #y . The algorithm then proceeds iteratively from an initial point x (0) , w (0) , y (0) through a sequence of points determined from the search directions described above: For linear programming different steplengths, # (k) d , are used with the primal and dual directions, whereas for nonlinear programming a common steplength is employed. 1.1. Formulas for search directions. While LOQO solves the reduced KKT system (12), it is nonetheless useful for subsequent analysis to give explicit formulas for #x and #w. Let y, denote the dual normal matrix. In the following theorem, we drop the explicit indication of the dependence of A, N , and # f on x , y, and w. Theorem 1. If N is nonsingular, then (8) has a unique solution. In particular, 4 ROBERT J. VANDERBEI AND DAVID F. SHANNO Remark. The formulas for #x and #w involve three terms each. In both cases, the first term can be viewed as an optimality direction, the second term as a centrality direction, and the third term as a feasibility direction. Proof. Solving the second block of equations in (12) for #y and eliminating #y from the first block of equations yields a system involving only #x whose solution is Using this formula, we can then solve for #y and finally for #w. The resulting formula for #w is: From the definitions of # and # , it follows that Finally, we use this formula to eliminate # and # from (16) and (17). The formulas (14) and (15) for #x and #w then follow easily. 1.2. Critical features. The critical features of the algorithm are the choices of # (k) at each iteration and the modification of the system (8) in order to find a local minimizer of (1). For linear and convex quadratic programming, modification of the linear system is never required except possibly to deal with problems of numerical accuracy, and the step length at each iteration is determined by a simple ratio test. (See, for example, Lustig, Marsten and Shanno [18] and Vanderbei [25].) For convex nonlinear programming, again the linear system need not be modified, but the method for choosing # (k) at each iteration becomes more complex, as it is well known that for general convex nonlinear problems, with a poor initial estimate Newton's method may diverge. In order to achieve convergence to a solution to the system (6), El Bakry et al. [7] introduced the merit function and showed that for a proper choice of -, there exists a sequence of step lengths {# (k) such that # 0 decreases monotonically and the iterates converge to a point at which # provided the Jacobian of the system (6) remains nonsingular. Shanno and Simantiraki [21] tested a variant of this algorithm on the Hock and Schittkowski set of test problems [16] and found that while the algorithm was often efficient, it also often converged to local maxima or saddle points, all of which satisfy the first-order necessary conditions. Further, the Jacobian of the system (6) sometimes becomes singular, causing the algorithm to fail. Thus it became apparent that a better merit function, and a way of ensuring a nonsingular Jacobian, would be necessary for a successful general algorithm. Our approach to this is discussed in detail in the next section. 1.3. Related work. It has recently come to our attention that Lasdon et al. [12] have also been studying this basic algorithm. While their algorithm differs from ours in many particulars, the general approach is similar. For related work on primal-dual interior-point methods see [10], [2], [13], [5]. An alternative barrier approach to inequality-constrained problems is discussed in [1]. AN INTERIOR-POINT ALGORITHM FOR NONCONVEX NONLINEAR PROGRAMMING 5 2. ALGORITHM MODIFICATIONS FOR CONVEX OPTIMIZATION As mentioned in the previous section, the search directions given by (8) together with a steplength selected simply to ensure that the vectors w and y remain component-wise non-negative yield an efficient and robust algorithm for convex quadratic programming. How- ever, for nonquadratic convex optimization problems, further reduction in the steplength may be necessary to guarantee convergence, as is trivially illustrated by the unconstrained minimization of the univariate function f using an initial estimate x (0) with |x (0) | > 1. Merit functions are used to guide one in deciding how much to shorten the steplength. In this section we describe the specific merit function that we have implemented 2.1. The merit function. Merit functions for equality constrained nonlinear programming have been the subject of a great deal of research over the past twenty-odd years. The idea of a merit function is to ensure that joint progress is made both toward a local minimizer and toward feasibility. This progress is achieved by shortening the steplength along the search directions defined by (8) as necessary so that sufficient reduction in the merit function is made. One possible merit function is This merit function is exact, which means that there exists a # 0 such that, for all # 0 , a minimizer of (19) is guaranteed to be feasible and, under general conditions, a local minimizer of the original problem. While exactness is a useful property, the nondifferentiability of # 1 -norms can cause difficulties with numerical algorithms. The merit function defined by is the penalty function for equality constrained nonlinear programming studied by Fiacco and McCormick [8]. It is differentiable everywhere. However, it has the theoretical disadvantage of requiring # to tend to infinity to ensure convergence to a feasible point, which again is hoped to be a local minimizer of the original problem. In spite of this apparent disadvantage, in practice we have had no such difficulty, and hence have chosen to use it. The l 2 merit function (20) when applied to problems of the form (3) is #,- log(w (recall that #(x, h(x)). The following theorem shows, among other things, that for large enough #'s the search directions defined by (8) are descent directions for #,- whenever the problem is strictly convex. Theorem 2. Suppose that the dual normal matrix N is positive definite. Then, the search directions have the following properties: #w b T #x #w (2) There exists # min # 0 such that, for every # min , #w#,- #x #w In both cases, equality holds if and only if (x, w) satisfies (6) for some y. 6 ROBERT J. VANDERBEI AND DAVID F. SHANNO Proof. It is easy to see that From the expressions for #x and #w given in Theorem 1, we then get #w b T #x #w Assuming that and that N is positive definite, we see that #w b T #x #w which completes the proof of the first property. For the second property, first note that the merit function is the barrier function plus a constant times a measure of infeasibility: #,- We now address the infeasibility term. It is easy to check that #w #(x, w)# 2 I # . From this explicit expression for the gradient of the infeasibility term, it follows that #x #w Combining the inner products using the barrier function and the infeasibility term, we get #w#,- #x #w . Suppose that (x, w) is not feasible (#= 0). For (#x, #w) to fail to be a descent direction for the merit function, it is necessary that -e When this is the case, setting ensures that (#x, #w) is a descent direction for #,- for every # min . AN INTERIOR-POINT ALGORITHM FOR NONCONVEX NONLINEAR PROGRAMMING 7 Now suppose that (x, w) is feasible (i.e., 0). In this case, the barrier function's inner product and the merit function's inner product agree. Furthermore, either (#x, #w) is a descent direction for both or In the latter case, we use the positive definiteness of N to conclude that Introducing a dual variable e, we see that this last equation together with the assumed feasibility comprise precisely the first-order optimality conditions (5) for the barrier problem. In LOQO, # is initialized to 0 and is unchanged as long as (#x, #w) is a descent direction for #,- . When (#x, #w) fails as a search direction, then # is calculated from using This algorithm has proved quite satisfactory in practice, as # is changed very few times during the calculations on problems we have tried so far, and on many problems remains 0. While this may seem surprising, recall that the search direction is the Newton direction to try to find a feasible first-order point, and generally moves jointly toward a minimizer and a feasible point. To ensure that we will not simply approach an infeasible optimum very slowly, if the step along the search vector becomes very small, # is increased by a factor of 10. The current version of the code starts the next iteration from the new point with the increased value of # . In future work, we will test the efficiency gained by simply using the new # with the old search directions. Thus at each step an # max is chosen by the standard ratio test to ensure that nonnegative variables remain nonnegative. In the context of the discussion of this section, this means that, for must remain strictly positive so Then the interval [0, # max ] is searched by successive halving, using merit-function evaluations only, for a value of # that produces a reduction in the merit function satisfying an Armijo condition. We conclude this section with two comments. First, the above discussion assumed that N is positive definite. Subsequent sections will demonstrate how the algorithm can be modified to relax this assumption. Second, the method listed here is admittedly ad hoc. A convergence proof for a method of this kind will certainly require a more carefully developed algorithm in terms of selection of the parameter # . Yet in preliminary testing this method works surprisingly well, while attempts at more rigorous algorithms were less successful. Thus it can be viewed similarly to the recent method of Fletcher and Leyffer [9], which essentially accepts any point that improves either optimality or infeasibility. While much remains for further study, our experience to date is that Newton's method should be hindered as little as possible. 3. ALGORITHM MODIFICATIONS FOR NONCONVEX OPTIMIZATION Using the merit function described in the previous section to guide the selection of a steplength (together with the stabilization technique of the next section) yields an efficient and robust algorithm for convex optimization. For nonconvex optimization problems, there is another important issue to consider, namely, that the matrix N(x, y, 8 ROBERT J. VANDERBEI AND DAVID F. SHANNO A T (x)W may fail to be positive semidefinite. In this section, we discuss the impact of indefiniteness and describe the algorithmic changes that we made to address this issue. 3.1. The search direction. In Theorem 2 we showed that the search directions (#x, #w) have desirable descent properties for both the barrier function and the merit function provided that N is positive definite. When N is indefinite, the algorithm might still converge to something, but it might not be a local minimum for the problem one wishes to solve. Consider, for example, the problem of minimizing the concave function 4x(1 - x) subject to the bound constraint 0 # x # 1. The algorithm presented so far when applied to this problem and initialized with 0.4 # x (0) # 0.6 has the very undesirable property of converging to the global maximum at 0.5. These results suggest replacing H (x, y) in the definition of the search directions with a diagonal perturbation thereof: If # is chosen so that N is positive definite, then Theorem 2 applies and ensures descent properties for the barrier and merit functions. Of course, the following question naturally arises: what is the impact of such a perturbation on other important properties such as reduction in primal and dual infeasibility? The following theorem addresses this question. Henceforth, we assume that the search directions are computed using - H instead of H . Theorem 3. Let y). Then y. Proof. We begin with - #: where the last equality follows from the third block of equations in (8). For - # , the analysis is similar but one must use the first block of equations in (8) with - y AN INTERIOR-POINT ALGORITHM FOR NONCONVEX NONLINEAR PROGRAMMING 9 Finally, the analysis of w T y follows closely the analogous development for linear pro- gramming. It starts as follows: Then, we rewrite the linear term in t as follows: y. Substituting (24) into (23) we get the desired result. As for linear programming, - is usually chosen so that 0 < # < 1 and therefore w T y decreases provided that the step length is short enough. However, if # > 0, Theorem 3 shows that dual infeasibility may fail to decrease even with arbitrarily small steps. This seems a small price to pay for the other desirable properties and, even though we don't have a proof of convergence for the perturbed method, empirical evidence suggests that # is zero most of the time (using the rules given shortly) and that the dual infeasibility does eventually decrease to zero once the iterates are in a neighborhood of the optimal solution (where N should be positive definite). In our nonlinear LOQO, we pick # > 0 whenever necessary to keep N positive defi- nite. By doing this, we guarantee that the algorithm, if convergent, converges to a local minimum. The value of # is computed as follows. We first do an L DL T factorization of a symmetric permutation of the reduced KKT matrix in (12). The permutation is computed at the beginning based solely on structure/fill-in considerations; see [25] for details. If H (x, y) is positive definite, then the reduced KKT matrix is quasidefinite as defined in [24] and hence, as shown in [24], the factorization is guaranteed to exist. Furthermore, it has the property that every diagonal element of D associated with an original diagonal element of must be positive and every element associated with an original diagonal element of -WY -1 must be negative. Hence, after factoring, we scan the diagonal elements of D looking for elements of the wrong sign and noting the one with largest magnitude. Let # 0 denote the largest magnitude. If all of the diagonal elements have the correct sign, then must be positive definite and no perturbation is required. Otherwise, we do an initial perturbation with . For the trivial case of a 1 - 1 matrix, such a perturbation is guaranteed to produce a positive definite matrix. However, for larger matrices, there is no such guarantee. Therefore, we factor the perturbed matrix and check as before. If the perturbation proves to be insufficient, we keep doubling it until a perturbation is found that gives a positive definite matrix. If, on the other hand, the initial perturbation is sufficiently large, then we do successive halving until we find a perturbation that is too small. Finally, we double once. It is not clear whether this halving process is necessary. We plan to investigate this issue in the future. The method described here is very simple, and can undoubtedly be improved, but it has in general worked very well in practice. Note that as w and y are always positive, only H (x, y) ever needs to be modified. 4. BOUNDS AND RANGES As noted in the introduction, the general nonlinear programming problem may have equality constraints as well as inequality constraints. Furthermore, simple bounds on the variables, while they may be considered as inequality constraints, are generally handled separately for efficiency. All of these cases were treated specifically in the quadratic solver LOQO and are described in [25]. Our nonlinear modification continues to accept all such formulations. We describe the algorithmic issues only briefly here. A more general form of inequality constraint is a range constraint of the form This is easily converted to a system of constraints Equality constraints are treated by simply declaring them to be range constraints with r Note that this does not increase the number of nonlinear constraints, but does add a linear constraint and an extra variable. In [23], Vanderbei shows how to reduce the resulting KKT system to one identical in size and character to (12), but with modifications to the diagonal of matrix W -1 Y . Bounds on the variables are handled similarly. The algorithm assumes that each variable x j has (possibly infinite) upper and lower bounds: where -#< u j #. As in interior-point methods for linear programming, the finite inequalities are converted to equalities by adding slack variables, and the resulting system of equations is again reduced to one of the exact form and size of (12) with the only change being the addition of a diagonal matrix to the H (x, y) block of the reduced KKT matrix. One should note that, in contrast to the lower-bound shift employed by others, we treat lower bounds exactly the same way that we treat upper bounds; such a symmetric treatment of upper and lower bounds was first suggested by Gill, et al., in [14]. The only addition to the discussion of this section is that all nonnegative variables added through either range or bound constraints must be included in the logarithmic barrier term in the merit function and any extra linear equalities are included in the penalty term. Thus the final form of the reduced KKT system solved is #y , is an n - n nonnegative diagonal matrix, Em is an positive diagonal matrix and # 1 and # 2 are appropriately modified right-hand sides; see [25] for explicit expressions. If every variable has either a finite upper bound or a finite lower bound, i.e. if there are no free variables, then E n too is a positive diagonal matrix. AN INTERIOR-POINT ALGORITHM FOR NONCONVEX NONLINEAR PROGRAMMING 11 4.1. Free variables and stabilization. A diagonal element of the nonnegative matrix E n introduced in the previous section is positive if the corresponding variable has a finite upper or lower bound and it is zero if the variable is a free variable. Therefore as things stand, for linear programming problems having free variables, the reduced KKT matrix is not quasidefinite. To get a quasidefinite matrix even for this case, we write each free variable x j as a difference of two nonnegative variables: Such a splitting of free variables is a common trick but the next step is usually to eliminate them from the problem. We do not do this. Instead, we retain each free x j and add the constraint shown above. We then do the algebra to reduce the system again to the usual reduced KKT system. The result is exactly the same as before except that now E n is strictly positive in every component, even those associated with free variables. This improves the conditioning of the reduced KKT system and thereby helps stabilize the accuracy of the factorization. Of course, the new nonnegative variables, t j and g j , must be incorporated in the logarithmic barrier term in the merit function and the linear equations in the penalty term. This implicit handling of free variables ensures that the matrix in (25) is quasidefinite whenever the problem is a convex optimization problem (in particular, whenever it is a linear programming problem). Furthermore, by adding something positive to H (x, y) we increase the likelihood that the system is quasidefinite even when the problem is nonconvex and hence we greatly reduce the number of times that we need to add diagonal perturbations to H (x, y). In fact, on the Hock and Schittkowski test set on which we report in Section 6 LOQO took a total of 2174 Newton iterations with 3298 matrix factorizations for an average of 1.52 factorizations per iteration. As previously stated, our search algorithm for # is very simplistic and could lead to significantly more factorizations than a more sophisticated version. However, these results seem to verify that the addition of the positive diagonal matrix E n and the semidefinite matrix A T (x)W greatly reduces the number of perturbations required. For full details of the computation of E n and the modification of the right-hand side, as well as full details from the previous section, the reader is referred to [23] and [25]. 5. IMPLEMENTATION DETAILS This section provides implementation details for the nonlinear version of LOQO that we have coded and tested. In particular, we deal with some specific algorithmic choices. In the next section we give the results of computational testing, with comparison to MINOS [20] and LANCELOT [6] on a test set that includes all of the well-known Hock and Schittkowski problems [16] as well as several other large-scale real-world problems. 5.1. Choice of the barrier parameter -. So far, we have not specified any particular choice for the barrier parameter -. Most theoretical analyses of interior-point algorithms choose - as In [7], El Bakry et al. show that for this choice of -, their algorithm converges to a zero of the merit function (18). Computational experience has shown that the algorithm performs best when the complementary products w i y i approach zero at a uniform rate. We measure the distance from uniformity by computing Clearly, only if w i y i is a constant over all values of i. When far from uniformity, a larger - promotes uniformity for the next iteration. Consequently, we use the following heuristic for our choice of -, which has proven very effective in practice: denotes the steplength parameter, which by default is 0.95, and # is a settable scale factor, which defaults to 0.1. 5.2. The initial point. Nonlinear programming traditionally requires that a starting point be given as part of the problem data, and comparative numerical testing is done using these traditional starting points. For an interior-point code, more is required, however, as both slack variables and split variables are added to the problem. Thus even with initial values for the x j 's, initial values for the w i 's, y i 's etc. must be determined by the program. For slack variables, for instance the w i 's, given an x (0) we can compute h i There are two difficulties with (26). First, if x (0) is not feasible, (26) gives an initial negative value to some of the w i 's, which is not allowed for interior-point methods. Second, even if x (0) is feasible, it may lie on the boundary of the feasible region or so close to it that some of the initial w i 's are very close to zero and progress is hindered. Much as in interior-point methods for linear programming, it is necessary to specify a # > 0 so that all initial values of variables constrained to be nonnegative are at least as large as # . Hence w i is initially set as follows: An analogous method can be used to set the slacks on the range constraints used to handle equality constraints, and also the slack variables that transform simple bounds into equalities. The latter brings up another interesting point. Some of the standard test problems have simple bounds on the variables and give an initial point that violates these bounds. Such an initial point seems unrealistic and can be computationally dangerous, as sometimes bounds on variables are used to ensure that the function value can actually be calculated, such as enforcing appears somewhere in the calculations. In view of this, we have added an option to the code that can force bounds to be honored. In this case, any initial point that lies outside the bounds is altered to lie inside the bounds and is set exactly # from the bound if there is only one bound and, if there are both upper and lower bounds, is set to a 90%-10% mixture of the two bounds with the higher value placed on the nearer bound. Finally, the split parts associated with a free variable x are set so that the difference is equal to x j and the smaller of the two is equal to # . The remaining point of interest is the choice of # . For linear programming, has proved computationally efficient. For the nonlinear problems we have tested to date, however, proved by far the best choice. A good problem-dependent choice for # remains a topic for further study. AN INTERIOR-POINT ALGORITHM FOR NONCONVEX NONLINEAR PROGRAMMING 13 5.3. Other issues. Issues such as stopping rules and matrix reordering heuristics are handled in exactly the same manner as documented in [23]. 6. COMPUTATIONAL RESULTS The LOQO implementation described in this paper, in addition to its ability to read industry-standard MPS files for expressing linear and quadratic programming problems, is interfaced with two of the most popular mathematical programming languages, AMPL [11] and GAMS [4]. Currently, only AMPL can provide a solver with second-order information, i.e. Hessians, and therefore all of our testing was performed using AMPL together with LOQO. Many other solvers are also interfaced with AMPL, including MINOS [20] and LANCELOT [6]. For the tests described here, we used LOQO version 3.10 (19971027), MINOS version 5.4 (19940910), and LANCELOT version 20/03/1997. Both MINOS and LANCELOT were run using default options although we did have to increase the number of superbasics and the maximum number of major/minor iterations on some of the larger problems. All tests were performed on an R4600 SGI workstation with 160 MBytes of real mem- Kbytes of data cache, and a 133 MHz clock. There are three components to the stopping rule for LOQO: (i) primal feasibility, (ii) dual feasibility, and (iii) lack of duality gap. The default rule declares a solution primal/dual feasible if the relative infeasibility is less than 1.0e - 6 and declares the problem optimal if, in addition, there are 8 or more digits of agreement between the primal and dual objective function values. 6.1. Hock and Schittkowski suite. Table 1 shows the solution times in seconds for the Hock and Schittkowski set of test problems [16]. Table 2 shows how many interior-point iterations LOQO used to solve each problem. Each solver was run with default parameters. Since LOQO is still under development some of the defaults might change in the future. Therefore, we list here those parameters that might change and give the current default settings (for nonlinear problems): . mufactor, called above, is set to 0.1. . bndpush, called above, is set to 100. . honor bnds, a boolean flag indicating whether bounds on variables are to be enforced throughout the iteration process as opposed to only at optimality, is set to 1 (i.e., true). All of the problems in the Hock and Schittkowski set are very small. For linear pro- gramming, the simplex method is usually more efficient than interior-point methods on small problems. One would expect the same for nonlinear programming. As expected, MINOS, which is simplex-based, was faster on a majority of the problems. Nonetheless, we were pleasantly surprised to see how well LOQO did compared with MINOS. Since all of the times are small, direct time comparisons have limited value and so we have summarized in Table 3 how many times each solver came in first, second, and third place. Finally, we computed the total time for LOQO and MINOS on problems that both codes solved to optimality. The total time for LOQO was 21.9 seconds whereas for MINOS it was 28.1 seconds. It should be noted here that MINOS uses only first derivatives. It is possible that a true Newton variant of MINOS might improve speed. However, our experience to date is that for small dense problems coded in AMPL the cost of evaluating second derivatives is significant and may well offset any other improved algorithmic efficiency. It is our understanding that the default LANCELOT uses exact second derivatives. 14 ROBERT J. VANDERBEI AND DAVID F. SHANNO Time in Seconds Time in Seconds Time in Seconds Name Minos Lancelot Loqo Name Minos Lancelot Loqo Name Minos Lancelot Loqo 1. Solution times on Hock-Schittkowski problems. Legend: (1) could not find a feasible solution, (2) erf() not available, (3) step got too small, (4) too many iterations, (5) could not code model in AMPL, (6) unbounded or badly scaled, (7) core dump. In order to interpret the results of Table 1, we note first that hs067 was not run with any algorithm. This problem contains an internal fixed-point calculation which is difficult to code in AMPL. LOQO failed to converge for only one case of the remaining test set, hs013. This is a classic problem where the optimal point does not satisfy the KKT condi- tions. As LOQO currently only looks for KKT points, it was unable to solve this problem. Identifying optima that do not satisfy the KKT conditions as well as correctly determining unboundedness and infeasibility remain topics for further study. Another point of interest is the relatively high iteration count and solution time for LOQO on hs027. These can be dramatically reduced by increasing # early in the iteration sequence, but all methods we have tried to date that significantly help with hs027 hurt enough other problems so as to be less efficient overall. Thus an optimal means of choosing # , which one hopes would be part of a provably globally convergent algorithm, also remains for further study. AN INTERIOR-POINT ALGORITHM FOR NONCONVEX NONLINEAR PROGRAMMING 15 Name Iters Name Iters Name Iters Name Iters Name Iters 2. Iteration counts on Hock-Schittkowski problems. Solver 1st 2nd 3rd LOQO 44 3. Rankings Nonconvex problems often have alternative optima, which is certainly the case with some problems in the Hock and Schittkowski test set. In our experiments, LOQO found alternative optima that were worse than the reported optima on 8 problems (hs002, hs016, and better on 7 problems (hs047, hs088, hs089, While finding optima that are worse is generally to be ex- pected, finding optima that are better is quite a surprise because those reported by Hock and Schittkowski represent the best optima known from years of experimentation with the test set. For the suboptimal problems the desired optimal solution could generally be obtained by altering # , thereby changing the initial solution. In addition to the default value for # , we tried two other values. For on two problems and is noticeably less efficient on others. For it fails on seven problems and is again noticeably less efficient on others. Name markowitz2 201 1200 201200 200 4m43s 1m56s 13m35s polygon2 195 42 766 880 0.7s *60m0s 1m1s sawpath 198 5 784 25 2s 5s *8s structure4 720 1536 5724 20356 2m40s *43m6.89s * trafequil2 628 1194 5512 76 5.1s 5.3s 2m39s 4. Preliminary computational results for several application ar- eas. An asterisk indicates that the solution obtained was either infeasible or suboptimal. The double asterisk indicates not enough memory to solve the problem. We also did a run in which we did not force variables to remain within their bounds; i.e., honor bnds=0. On this run, three problems in addition to hs013 failed to converge. We did not find this very surprising for interior-point methods, where we feel that bounds should be honored from the beginning. As a final note, the iteration counts in Table 2 represent the total number of times first and second partial derivatives were computed. A few extra function evaluations were used in reducing the merit function, but as the time taken to calculate them is very small compared to other components of the algorithm, we chose to report execution times rather than function counts. 6.2. Large-scale real-world problems. We are assembling a collection of real-world problems encoded in AMPL. The collection is available from the first author's web site [22]. Table 4 gives a brief summary of problem statistics and computational results for some of the larger problems that we have encountered. Most of these problems are quite difficult. As the table shows, LOQO can be a very efficient and robust code on large difficult problems when compared to the other solvers. We made naive attempts to set parameters to appropriate non-default values in all codes. Clearly, we were better able to adjust parameters in LOQO than in the other codes. Note that we set the time limit for each run at one hour. Our inability to run LANCELOT due to memory limitations on structure4, is the result of not knowing how to adjust the memory estimates made by AMPL when invoking LANCELOT. As these problems have not been previously part of any standard test set, we give here a brief description of some of the interesting ones. Non-default LOQO parameters, when used, are noted below with the problem descriptions. 6.2.1. Antenna Array Synthesis (antenna). An important problem in electrical engineering is to determine how to combine the signals from an array of antennas so as to reinforce the signal from a desired direction and suppress the signal from undesired ones. There are various formulations of this problem, some of which fall under convex optimization. The details of one such formulation are given in [17]. To solve this problem with LOQO, we set parameters as follows: sigfig=5, bndpush=2, convex, inftol=1.0e-1. 6.2.2. Electrons on a Sphere (fekete2). Given n electrons placed on a conducting sphere, the problem is to find a distribution of these electrons that minimizes the total Coulomb AN INTERIOR-POINT ALGORITHM FOR NONCONVEX NONLINEAR PROGRAMMING 17 potential. This problem is nonconvex and has a large number of local minima. Problem was solved with 6.2.3. optimization (markowitz2). The Markowitz model in portfolio optimization seeks the portfolio of investments that optimizes a linear combination of expected return and expected risk. Risk is modeled as the variance of the return. Problem markowitz2 is a separable convex quadratic formulation of the problem with linear constraints. Expected reward and risk are computed using historical data. 6.2.4. Minimal Surfaces (minsurf). Given a domain in R 2 and boundary data, the minimal surface problem is to find an interpolation of the boundary data into the interior of the domain so that the surface so generated has minimal surface area. It is a convex optimization problem. 6.2.5. Largest Small Polygon (polygon2). Given n, the problem is to find the n-sided polygon of maximal area whose diameter does not exceed 1. This problem sounds trivial, but Graham showed in [15] that the optimal hexagon is not the regular hexagon. To solve polygon2 with LOQO, we set parameters as follows: convex. 6.2.6. Saw Path Tracking (sawpath). Given a list of points describing the center line of a wood piece, the problem is to fit the best polynomial that minimizes the sum of the squares of errors subject to three sets of side constraints: (1) the polynomial must go through the first point, (2) the polynomial must have a specified initial slope, and (3) the radius of curvature must never exceed a given value. This problem comes from F. Grondin of 6.2.7. Structural Optimization (structure4). In structural optimization, the problem is to decide how to build a structure to minimize weight or compliance, subject to the constraint that the structure can support one or more possible loadings. There are various models, some of which are convex while others are not. Also, some of these models are for pin-jointed truss-like structures while others are based on finite-element models. Problem structure4 is to find an optimal bracket design obtained using a convex finite-element model. The corresponding truss-like model is described in [3]. 6.2.8. Traffic Equilibrium (trafequil2). The problem is to find flows through a network that minimize a nonlinear function, called the Beckman objective. 6.3. Mittelmann's quadratic programming set. As a service to the Operations Research community, Hans Mittelmann has done extensive testing of optimization software. We summarize here some of his results [19]. He used an AMPL model to generate a number of random, feasible, quadratic programming problems. These problems are determined by specifying values for five parameters, n, m, p, s, and pf; see [19] for their definitions. He used two versions of the random model generator; one that generates convex problems and one that does not. The results for the convex problems are shown in Table 5 and for the nonconvex problems the results are shown in Table 6. The first table shows how efficient interior-point methods are compared to other methods on convex quadratic programming problems. Regarding the second table in which problems were nonconvex, inevitably the different algorithms found different optima. We were also encouraged by the fact that LOQO successfully solved six of the nine problems efficiently. However, LOQO did fail on three of the problems. The reason is that the algorithm eventually took small steps and therefore failed to make sufficient progress before the iteration limit was reached. No merit reductions to the steplength were incurred and 100 20 200 1.1 34 28 4 .3 293 98 14 500 100 1000 .1 .1 4304 811 85 1000 200 500 .02 .1 5247 1434 147 5. Mittelmann's results for convex quadratic programming. Numbers shown under the solvers are solution times in seconds. For LOQO, the following parameter settings were used: bndpush=100 honor bnds=0 pred corr=1 mufactor=0. (These are the LP defaults. In the next release of LOQO, these values will be the defaults for QPs too.) .3 37 * 19 500 100 1000 .1 .1 542 * 172 500 200 1000 .1 .1 462 1389 * 1000 200 2000 .02 .1 7106 * 1311 6. Mittelmann's results for nonconvex quadratic programming. Numbers shown under the solvers are solution times in seconds. An asterisk indicates that the solution obtained was either infeasible or sub- optimal. For LOQO, the following parameter settings were used: bnd- push=100 honor bnds=0 pred corr=1 mufactor=0. so the short steps must have arisen from some variables being very close to their bounds. Future research will address identifying and remedying this phenomenon. 7. CONCLUSIONS The aim of our work has been to take an existing interior-point code for quadratic programming, namely LOQO, and modify it as little as possible to develop an efficient code for nonconvex nonlinear programming. We found that essentially only two changes were needed: (1) A merit function to ensure proper steplength control. (2) Diagonal pertubation to the Hessian matrix to ensure that the search directions are descent directions when the problem is not convex. AN INTERIOR-POINT ALGORITHM FOR NONCONVEX NONLINEAR PROGRAMMING 19 As noted throughout the paper, the algorithm documented herein represents our first attempt at an interior-point code for nonconvex nonlinear programming problems. We believe that significant improvements can and will be made over time. However, we personally were both gratified and somewhat surprised at how robust and how efficient this initial code has proved to be. 8. ACKNOWLEDGEMENTS We'd like to thank David Gay for doing much of the hard work by providing the automatic differentiation algorithms in AMPL to compute gradients and Hessians. 9. The second author of this paper has known Olvi Mangasarian for approximately thirty years. I believe we first met at the first of the four Madison conferences on mathematical programming held in May, 1970. All four conferences, organized first by Olvi, Ben Rosen and Klaus Ritter and later by Olvi, Bob Meyer and Steve Robinson, in my opinion contributed greatly to the development of mathematical programming during a period of considerable excitement and great progress. The excitement was perhaps greater than Olvi might have wished at the first conference, where tear gas pervaded the campus, the National Guard was omnipresent, and we had to move the sessions off campus to avoid the antiwar protests. Since these early days, Olvi and I have remained close friends, meeting regularly at conferences, where our wives have shared many happy days visiting the art museums while we attended sessions (and often wished we were with our wives). I have been around long enough to have taught from Olvi's book when it was new, and have followed all of his seminal work from the theorems of the alternative through the work of his student Shi Ping Han on SQP to his work on proximal point algorithms, complementarity, and most recently on detecting breast cancer, to name just a few of his accomplishments. Through all of this he has been a great friend, congenial host, and valued companion. The first author is young, and new to nonlinear programming. This is a wonderful way for him to make the acquaintance of one of the icons of our field. --R A globally convergent Lagrangian barrier algorithm for optimization with general inequality constraints and simple bounds. A primal-dual algorithm for minimizing a non-convexfunction subject to bound and linear equality constraints Optimization methods for truss geometry and topology design. GAMS: A User's Guide. An interior point algorithm for large scale nonlinear programming. LANCELOT: a Fortran Package for Large-Scale Nonlinear Optimization (Release On the formulation and theory of the Newton interior-point method for nonlinear programming Nonlinear Programming: Sequential Unconstrainted Minimization Tech- niques Nonlinear programming without a penalty function. AMPL: A Modeling Language for Mathematical Programming. Computational experience with a safeguarded barrier algorithm for sparse nonlinear programming. A primal-dual interior method for nonconvex nonlinear pro- gramming Solving reduced KKT systems in barrier methods for linear and quadratic programming. The largest small hexagon. Test examples for nonlinear programmingcodes. Antenna array pattern synthesis via convex optimization. Interior point methods for linear programming: computational state of the art. Benchmarks for optimization software. MINOS 5.4 user's guide. LOQO: An interior point code for quadratic programming. Symmetric quasi-definite matrices Linear Programming: Foundations and Extensions. --TR On the formulation and theory of the Newton interior-point method for nonlinear programming An interior point potential reduction method for constrained equations A globally convergent Lagrangian barrier algorithm for optimization with general inequality constraints and simple bounds Lancelot Test Examples for Nonlinear Programming Codes --CTR Alicia Troncoso Lora, Advances in optimization and prediction techniques: Real-world applications: Thesis, AI Communications, v.19 n.3, p.295-297, August 2006 V. Adetola , M. Guay, Brief paper: Parameter convergence in adaptive extremum-seeking control, Automatica (Journal of IFAC), v.43 n.1, p.105-110, January, 2007 Hande Y. Benson , Robert J. Vanderbei , David F. Shanno, Interior-Point Methods for Nonconvex Nonlinear Programming: Filter Methods and Merit Functions, Computational Optimization and Applications, v.23 n.2, p.257-272, November 2002 Sasan Bakhtiari , Andr L. Tits, A Simple Primal-Dual Feasible Interior-Point Method for Nonlinear Programming with Monotone Descent, Computational Optimization and Applications, v.25 n.1-3, p.17-38 Wei-Peng Chen , Lui Sha, An energy-aware data-centric generic utility based approach in wireless sensor networks, Proceedings of the third international symposium on Information processing in sensor networks, April 26-27, 2004, Berkeley, California, USA Hande Y. Benson , Arun Sen , David F. Shanno , Robert J. Vanderbei, Interior-Point Algorithms, Penalty Methods and Equilibrium Problems, Computational Optimization and Applications, v.34 n.2, p.155-182, June 2006 Igor Griva, Numerical Experiments with an Interior-Exterior Point Method for Nonlinear Programming, Computational Optimization and Applications, v.29 n.2, p.173-195, November 2004 Richard H. Byrd , Jorge Nocedal , Richard A. Waltz, Feasible Interior Methods Using Slacks for Nonlinear Optimization, Computational Optimization and Applications, v.26 n.1, p.35-61, October M. D'Apuzzo , M. Marino, Parallel computational issues of an interior point method for solving large bound-constrained quadratic programming problems, Parallel Computing, v.29 n.4, p.467-483, 01 April Hande Y. Benson , David F. Shanno, An exact primal---dual penalty method approach to warmstarting interior-point methods for linear programming, Computational Optimization and Applications, v.38 n.3, p.371-399, December 2007 Helmut Maurer , Hans D. Mittelmann, Optimization Techniques for Solving Elliptic Control Problems with Control and State Constraints: Part 1. Boundary Control, Computational Optimization and Applications, v.16 n.1, p.29-55, April 2000 Hans D. Mittelmann, Verification of Second-Order Sufficient Optimality Conditions for Semilinear Elliptic and Parabolic Control Problems, Computational Optimization and Applications, v.20 n.1, p.93-110, October 2001 L. N. Vicente, Local Convergence of the Affine-Scaling Interior-Point Algorithm for Nonlinear Programming, Computational Optimization and Applications, v.17 n.1, p.23-35, Oct. 2000 Silvia Bonettini , Valeria Ruggiero, Some iterative methods for the solution of a symmetric indefinite KKT system, Computational Optimization and Applications, v.38 n.1, p.3-25, September 2007 Stefania Bellavia , Benedetta Morini, Global convergence enhancement of classical linesearch interior point methods for MCPs, Journal of Computational and Applied Mathematics, v.151 n.1, p.171-199, 1 February P.-A. Absil , Andr L. Tits, Newton-KKT interior-point methods for indefinite quadratic programming, Computational Optimization and Applications, v.36 n.1, p.5-41, January 2007 Helmut Maurer , Hans D. Mittelmann, Optimization Techniques for Solving Elliptic Control Problems with Control and State Constraints. Part 2: Distributed Control, Computational Optimization and Applications, v.18 n.2, p.141-160, Feb. 1, 2001 Roman A. Polyak, Nonlinear Rescaling as Interior Quadratic Prox Method in Convex Optimization, Computational Optimization and Applications, v.35 n.3, p.347-373, November 2006 Nicholas I. M. Gould , Dominique Orban , Philippe L. Toint, GALAHAD, a library of thread-safe Fortran 90 packages for large-scale nonlinear optimization, ACM Transactions on Mathematical Software (TOMS), v.29 n.4, p.353-372, December Francisco Facchinei , Giampaolo Liuzzi , Stefano Lucidi, A Truncated Newton Method for the Solution of Large-Scale Inequality Constrained Minimization Problems, Computational Optimization and Applications, v.25 n.1-3, p.85-122 Silvia Bonettini , Emanuele Galligani , Valeria Ruggiero, Inner solvers for interior point methods for large scale nonlinear programming, Computational Optimization and Applications, v.37 n.1, p.1-34, May 2007 A. Migdalas , G. Toraldo , V. Kumar, Nonlinear optimization and parallel computing, Parallel Computing, v.29 n.4, p.375-391, 01 April
nonconvex optimization;nonlinear programming;interior-point methods