How to Draw a Sequence Diagram
|
|
|
- Donna Patterson
- 9 years ago
- Views:
Transcription
1 How to Draw a Sequence Diagram Timo Poranen, Erkki Mäkinen, and Jyrki Nummenmaa Department of Computer and Information Sciences Kanslerinrinne 1 FIN University of Tampere Finland {tp,em,jyrki}@cs.uta.fi Abstract. In this paper, we consider the aesthetic criteria and constraints related to the layouts of UML sequence diagrams. We consider the applicability of the traditional graph drawing aesthetics in drawing sequence diagrams. Because of the special nature of sequence diagrams, many of these aesthetics are not applicable. Based on our view on how these diagrams are read or viewed, we propose some new aesthetics. We also take into account the presence of usually adopted conventions and constraints. The basic choice in producing a drawing for a sequence diagram is the linear order of the participating objects. Based on this finding and the identified aesthetics criteria, we formulate some related computational problems. 1 Introduction The Unified Modeling Language (UML) [21] is currently the standard notation for modeling software-intensive systems. In UML, sequence diagrams are typically used to describe system dynamics. Sequence diagrams depict system dynamics by showing the participating objects (classes, components, etc.) in the interaction and the sequence of messages exchanged. A sequence diagram has two dimensions: the vertical dimension represents time and the horizontal dimension represents the objects participating in the interaction. Time flows from top to bottom. Objects (or classifier roles, more generally) are shown as vertical lines (called lifelines) and messages as horizontal arrows extending from a sender object to a receiver object. Spacing is irrelevant, that is, only the order of messages matters, not the distance between them. The diagrams produced by analysts are typically not very large. Based upon our experiments, they may contain something like 5-15 lifelines and up to 30 messages. If they tend to get larger, they are usually decomposed hierarchically. However, reverse engineering methods produce diagrams for which these figures Work funded by the Tampere Graduate School in Information Science and Engineering (TISE) and supported by the Academy of Finland (Project 51528). Work supported by the Academy of Finland (Project 35025).
2 92 Timo Poranen, Erkki Mäkinen, and Jyrki Nummenmaa are not necessarily true at all. They may be much larger both in terms of the number of lifelines and the number of messages. The relative ordering of objects on the horizontal dimension has no semantic significance in standard UML, but as Rumbaugh et al. [21], p. 424 say: it is helpful to arrange them to minimize the distance that the message arrows must cover. This paper is devoted to a study of what constitutes a good drawing for a sequence diagram and what are the related computational problems. We also discuss the applicability of some computational methods for solving this problem. We will also discuss the quality of drawings based on (1) the basic nature of sequence diagrams, (2) some usually adopted optional constraints, and (3) aesthetic criteria to be defined in the sequel. The rest of this paper is organized as follows. In Section 2 we give a brief introduction on sequence diagrams and their use in visualizing the behaviour of software systems. In the next section we introduce constraints for sequence diagram layouts and in Section 4 we study aesthetic criteria for these layouts. The fifth section studies the methods to obtain layouts that satisfy a given set of aesthetic criteria and constraints. Also the computational complexity related to fulfilling these criteria and constrains are considered. The sixth section gives some final conclusions. 2 Sequence Diagrams Sequence diagrams describe how objects, or groups of objects, interact within a system [21]. Interacting objects can, for example, be classes, program components or real world instances such a customer who is buying a train ticket in the station. Figure 1 shows a sample sequence diagram modeling the action of buying a train ticket. Throughout this paper, we assume that there is no self-referring messages and all message arrows are parallel to x-axis, that is, we do not consider such message arrows that have nonzero duration. Rumbaugh et al. [21] draw arrows having nonzero duration diagonally downward so that the receiving time is later than the sending time. Also, we assume that all lifelines describing participants are visible all the time. These restrictions are made to simplify some mathematical formalizations in Section 5. 3 Constraints Constraints are used to provide semantic information about the meaning of the drawing in order to better reflect the features of the underlying model. These types of instructions usually cannot be automatically deduced by a diagram layout algorithm. The drawing constraints of sequence diagrams can be divided into two classes: those that are general for all layouts and those defined using the input.
3 How to Draw a Sequence Diagram 93 customer ticket seller database printer ask ticket check available seats ok confirm ok book a seat print ticket Fig. 1. An interaction between a customer, ticket seller, database and printer.
4 94 Timo Poranen, Erkki Mäkinen, and Jyrki Nummenmaa 3.1 General Constraints General constraints are commonly used graphical standards for all layouts. It is possible to find three important constraints of this class. Table 1. General constraints for sequence diagrams. General constraint Description GC1 Horizontal distance: Uniform horizontal distances between participants GC2 Vertical distance: Uniform vertical distances between message arrows GC3 Starting object: The object that starts communication is drawn to the left The first one describes the properties of message arrows. The vertical dimension of the layout represents time and the vertical distances between messages submitted at different times are uniform. That is, when an object submits messages within different time periods, the vertical distances between corresponding message arrows do not depend on this time information. The second constraint states that the horizontal distances between subsequent lifelines are uniform. The last one indicates that the object that starts communication is drawn as the leftmost participant. These general constraints are listed in Table 1. Of course, there might be exceptions for these principles. We give examples for each of these principles where breaking the corresponding general constraint is justified. If we want to write a longer description for submitted messages, the horizontal distance between some participants should be increased. When exact running time is important, exact starting times for messages should be read from the vertical position of message arrows. Therefore, the time axis should be metric. So far, we have not seen any cases where the last standard is not adopted, but it is not hard to imagine a case where starting object has a visually informative position, say, in the center of the drawing. 3.2 Input Dependent Constraints The constraints in the previous section did not depend on the input. Input dependent constrains that are commonly used in traditional graph drawing [5, 13, 25] are listed in Table 2. Next we discuss the possibility to apply these traditional drawing constraints to the layouts of sequence diagrams. The first constraint in Table 2 describes a need to place a given set of vertices to the center of the drawing. This need is justified since the center of a drawing is usually the most important and prominent place where vertices can be placed. But this argumentation does not hold for sequence diagram layouts. We think that the most important place to draw a participant in a sequence diagram is the leftmost lifeline or, sometimes, the rightmost lifeline. The second constraint tries to keep a set of vertices in a drawing close together. This holds also for sequence diagrams: there might be a set of lifelines that belong closely together.
5 How to Draw a Sequence Diagram 95 Table 2. Constraints in traditional graph drawing. Constraint Description Center: Place a given subset of vertices close to the center of the drawing Cluster: Place a given subset of vertices close together Left-right (top-bottom): Draw a given subset of vertices from left to right (from top to bottom) Shape: Draw a given subset of vertices with a predefined shape External: Place a given subset of vertices on the outer boundary of the drawing Many graph drawing algorithms use different kinds of hierarchical approaches (see, for example [23]) to produce readable layouts. The basic principle behind all hierarchical graph drawing algorithms is that of dividing the set of vertices into layers and then draw these layers from left to right (from top to bottom). When we want to draw a given subset of vertices from left to right (from top to bottom) the way of assigning the vertices to different layers makes it possible to achieve this constraint. This approach is also suitable for sequence diagrams. It is natural that a set of participants needs to be drawn in a predefined order from left to right in the sequence diagram layout. The shape constraint draws a given subset of vertices with a predefined shape. For sequence diagrams, this constraint is useful, but we prefer saying that a set of vertices will be drawn with a predefined order (permutation), than with a predefined shape. For planar graphs, the set of external vertices plays an important role in the drawing. In the layouts of sequence diagrams, the outermost (the leftmost and the rightmost) participants play for the role of external vertices. As discussed above, especially the leftmost position is of utmost importance in these layouts. All these five constraints share the property that they cannot be automatically deduced by a diagram layout algorithm. Hence, the user needs to give them as additional input. The same holds for the sequence diagrams. The layout algorithms cannot recognize which are important vertices and which are not. Since the center constraint is not useful for sequence diagrams, and there is a need to place important participants in the left end of the drawing, we introduce a new constraint to replace the constraints Center and External: Fixed place constraint allows to place a given lifeline on a given position in the layout. Constraints for the sequence diagrams are collected in Table 3. Next, we give an example of using constraints in sequence diagram layouts. Suppose that the participating objects can be divided into three sets depending on their role: there are controller, model or view objects in corresponding system (that is, the MVC architecture [9] is used). After this division, corresponding sets of objects could be drawn from left to right in such an order that the set of model objects are drawn first, view objects are drawn next and the set of controller
6 96 Timo Poranen, Erkki Mäkinen, and Jyrki Nummenmaa Table 3. Constraints for sequence diagrams. Constrain Description C1 Cluster: Place a given subset of lifelines close together C2 Left-right: Draw a given subset of lifelines from left to right C3 Order: Draw a given subset of lifelines with a predefined order C4 Fixed place: Place a given lifeline on a given position objects are drawn last in the right. In this example we used Cluster (C1) and Left-right (C2) constraints. 4 Aesthetic Criteria An aesthetic criterion is a general graphical property of the layout that we would like to have. A well chosen aesthetic criterion improves the readability of the given layout. Commonly used aesthetic criteria for traditional graph drawing (see, for example, [3, 5, 20, 23]) are listed in Table 4. Table 4. Commonly used aesthetic criteria for traditional graph drawing. Aesthetic Description Total edge length: Minimize the total edge length Crossings: Minimize the total number of edge crossings Maximum edge length: Minimize the maximum edge length Uniform edge length: Minimize the variance of the edge lengths Symmetry: Maximize the symmetry in the drawing Area: Minimize the area of the drawing Total bends: Minimize the number of bends in the drawing Maximum bends: Minimize the maximum number of bends on the edges Uniform bends: Minimize the variance of the number of bends on the edges Angular resolution: Maximize the smallest angle between edges incident to same vertex Aspect ratio: Minimize the ratio of the smallest rectangle covering the drawing Balance: Distribute the vertices uniformly over the drawing area The first two aesthetics of the traditional graph drawing coincide when they are used in sequence diagram layouts. This property is easy to see by noticing that each message arrow whose length is, say l, increments the total number of crossings by l 1 (although here the edges cross with the lifelines). In addition to the total arrow length, also other aesthetic criteria can be applied when laying out sequence diagrams. Since it is especially difficult to follow
7 How to Draw a Sequence Diagram 97 long arrows, a natural aesthetic rule is to limit the maximal length of the arrows, or at least to decrease the number of the longer arrows. The corresponding criterion for traditional graph drawing is to minimize the maximum edge length. The minimization of the variance of the edge length is not as obvious as the earlier criteria. In fact, this criterion often contradicts with the minimization of the total edge length. It might be impossible to shorten some of the edges. Then, minimizing the variance of the edge lengths would mean that the other edges should be made longer. Displaying as much as possible symmetries in traditional graph drawing is perhaps the most important aesthetic criteria to achieve. For two-dimensional graph drawing, symmetry is defined by using Euclidean symmetries, that is, rotations and reflections [14]. If a sequence diagram has some symmetries, it would help to understand the structure of the diagram and the structure of the system behind corresponding participants. Therefore, we do not reject the symmetry criterion, but we leave it an open problem as to how to define symmetry in the context of sequence diagrams. There are no bends of the edges in the sequence diagrams. Therefore all aesthetics where bends are considered are useless for our purposes. The same reasoning holds for angular resolutions, since there are no angles between message arrows. Also there is no way to modify the width and the height of the sequence diagrams, so the aspect ratio and balance criteria can be rejected. In addition to these criteria, we introduce three new aesthetic criteria for sequence diagrams: sliding, the number of long edges and the subset separation. A natural way to view sequence diagrams is to start the viewing from the top left corner, where the leftmost participant starts the communication and then follow message arrows while sliding the diagram downward. Suppose that the diagram contains so many lifelines of participants, that the monitor screen is not able to show all lifelines at once. If there are no message arrows that have their start and endpoint outside the screen, we have no problems, but if this is not true, it is very hard to view the diagram and guess which participants are interacting. In a way we would like to slide a fixed-size window over the sequence diagram in such a way that the window always covers all the arrows between all lifelines at all visible x-coordinates. We call this the sliding property. See Figure 2 where the sequence diagram has a good slidability. Next new criterion is the number of long edges. Although it might be impossible to avoid a single long edge, it is obviously advantageous to have as few long edges as possible. This is done when obeying the minimization of the number of long edges. Recall that this criterion often contradicts the traditional criterion of minimizing the variance of the edge lengths. For this property, the minimum length of a long edge must be given. The last new criterion, the subset separation, plays an important role in visualizing a system having such subsets of participants, that do not communicate together, or do communicate very little. Suppose that there are two distinct sets of participants, and one participant, a filter, who receives and forwards all
8 98 Timo Poranen, Erkki Mäkinen, and Jyrki Nummenmaa messages from those two sets. Now all communication between those two sets of participants goes first to the filter participant which forwards messages to a participant in the second set. It is natural to place this filter participant in the middle of the diagram and then place other two sets of participants to the left and to the right side. The goal of the subset separation property is to find out distinct subsets of participants that have as little as possible communication. Then these sets are drawn together to a cluster (C1) and these clusters are ordered from left to right (C2) to minimize the number of over going message arrows. Aesthetic criteria for the sequence diagrams are collected in the Table 5. Table 5. Aesthetic criteria for sequence diagrams. Aesthetic Description A1 Crossings: Minimize the total number of edge crossings A2 Maximum edge length: Minimize the maximum edge length A3 Uniform edge length: Minimize the variance of the edge lengths A4 Symmetry: Maximize the symmetry in the diagram A5 Number of Long edges: Minimize the number of the long edges A6 Sliding: Maximize the slidability of the diagram A7 Subset separation: Maximize the distinct subsets of participants User preferences of the layout aesthetics of some classes of UML diagrams are studied by Purchase et al. [19]. 5 Criteria Formalization In this section we formalize the following aesthetic criteria: crossings (A1), maximum edge length (A2), sliding (A5) and subset separation (A7). The remaining aesthetics are also discussed, but their exact formalization is not considered here. For the basic graph-theoretical concepts used in this section, we refer to [24]. The most obvious goal is to minimize the total length of message arrows (A1). Minimizing the total arrow length can be interpreted as a graph problem in the following way: replace each participant (lifeline) with a node, and insert an (undirected) edge with capacity k between nodes u and v, if there are k messages between the participants corresponding to nodes u and v (the direction of the arrows is irrelevant here). As an example, consider the sequence diagram and corresponding weighted graph in Figure 3. The total weighted edge length sum in the diagram of Figure 3 is 18. For example, the order D-A-C-B-E of the nodes gives total length 13. Minimizing the total arrow length in a sequence diagram coincides with arranging the nodes of a weighted undirected graph on a line. Next, we formally define the graph problem in question. Consider an undirected graph G = (V, E) with n = V nodes and with positive edge capacities c(e). A (linear) layout ϑ of G is a bijection ϑ : V
9 How to Draw a Sequence Diagram 99 {1, 2,..., n}. The optimal linear arrangement problem (also known as the minimum linear arrangement, or the edge sum problem) calls for the layout that minimizes the weighted sum of the edge lengths, that is, the sum (u,v) E c(u, v) ϑ(u) ϑ(v). The optimal linear arrangement problem (OPT) is NP-complete, even with constant edge capacities [11] and for bipartite graphs [8]. It is unknown if OPT is solvable for weighted trees, but if the given graph is a rooted weighted tree, then the optimal layout can be constructed in O(n log n) time [1]. OPT is solvable for unweighted and undirected trees in O(n log 3/ log 2 ) time [4]; an O(n 2.2 ) algorithm is presented by Shiloach [22]. A collection of theoretical results for OPT and other arrangement problems is given by Díaz et al. [6]. A recent survey of the complexity and approximability results of OPT with constant edge capacities can be found in [18]. OPT has PTAS (polynomial-time approximation scheme [10]) for dense graphs [2], and there exists an O(log n log log n) approximation algorithm for arbitrary graphs [7]. However, when considering sequence diagrams, the asymptotic complexity results are of little value, since a typical instance contains only 5-15 nodes. Since it is especially difficult to follow long arrows, the aesthetic criterion A2 limits the maximal length of the arrows. The corresponding graph problem is the bandwidth problem. In the bandwidth problem the task is to find a layout that minimizes the maximal edge length, that is, max { ϑ(u) ϑ(v) }, (u,v) E is minimized over all layouts. This problem does not use the edge capacities. Also the bandwidth problem is NP-complete [17]; there is even no APX for it [27] (that is, the problem does not allow polynomial-time approximation algorithms with a constant approximation ratio) and the bandwidth problem for trees with maximum degree 3 is NP-complete [10]. Table 6. Computational complexity of the aesthetics for sequence diagrams. Aesthetic Problem Graph class Complexity class Ref. A1 OPT general graphs NP-complete [11] bipartite graphs NP-complete [8] unweighted trees P [4, 22] rooted weighted trees P [1] weighted trees Unknown A2 Bandwidth general graphs NP-complete [17] trees (deg 3) NP-complete [10]
10 100 Timo Poranen, Erkki Mäkinen, and Jyrki Nummenmaa Decreasing the bandwidth decreases the maximal arrow length, but it might increase the total weighted arrow length sum. As for the sliding property (A5), in practice we want to find a reasonable-sized window and such a layout that slidability takes place. The vertical dimension and the horizontal dimension obviously have a close connection. Given the vertical dimension for the window, we want to find such a horizontal dimension for the window and such a layout, that we get slidability. Suppose that for a given vertical dimension, we have found the minimum horizontal dimension such that a layout with slidability exists. Then, increasing the vertical dimension either keeps this minimum horizontal dimension the same or increases it. Obviously, the horizontal dimension can not be smaller than the length of the longest arrow in the chosen layout. The computational complexity of these slidability problems is not known. To divide the vertices of a graph into distinct subsets by using some criteria, is in general very hard problem. One way to characterize the separability (A7) of a graph is to find out its cut vertices. Deleting a cut vertex of the graph divides its into two or more connected components. Determining all cut vertices of a graph can be done in linear time [26]. These connected components can be drawn from left to right. If the corresponding graph is k-connected (to make the graph disconnected, at least k vertices have to be deleted), then the problem is to find a set of k vertices, whose removal makes the graph disconnected. These k vertices are drawn in the middle of the layout, and remaining connected components are drawn from left to right. It is obvious that determining the vertex separation property is useful only for small values of k. Determining whether a given graph can be drawn symmetrically is an NPcomplete problem [15]. For positive results, there are polynomial time algorithms for trees [16] and series-parallel digraphs [12] to determine maximum number of symmetries. Unfortunately, it is not clear how symmetry should be defined in the context of sequence diagrams. Although the resource requirements for different aesthetics are often exponential, for diagrams with less than nine lifelines all possible layouts can be searched exhaustive in short time. 6 Conclusions and Open Problems In this paper we have studied the aesthetic criteria and constraints of the layouts of UML sequence diagrams. We represented general and input dependent constraints and defined aesthetic criteria for the sequence diagrams. A part of the constraints were also formally defined. There are several obvious subjects for future work. The status and the usability of the symmetry criterion is not clear and also other criteria should be defined more specifically. In the future we will study heuristic algorithms for the basic aesthetics and for some of their combinations. Our future aim is to improve the quality of sequence diagrams layouts used in practical software engineering tools.
11 How to Draw a Sequence Diagram 101 References 1. D. Adolphson and T.C. Hu. Optimal linear ordering. SIAM Journal on Applied Mathematics, 25(3): , S. Arora, A.M. Frieze, and H. Kaplan. A new rounding procedure for the assignment problem with applications to dense graph arrangements. In 37th Annual Symposium of Foundations of Computer Science, pages 21 30, C. Batini, L. Furlani, and E. Nardelli. What is a good diagram? In 4th International Conference on the Entity Relationship Approach, pages , F.R.K. Chung. On optimal linear arrangements of trees. Computers and Mathematics with Applications, 10(1):43 60, G. Di Battista, P. Eades, R. Tamassia, and I.G. Tollis. Graph Drawing. Prentice Hall, J. Díaz, J. Petit, and M. Serna. A survey of graph layout problems. ACM Computing Surveys, 34(3): , G. Even, J. Naor, S. Rao, and B. Schieber. Divide-and-conquer approximation algorithms via spreading metrics. In 36th Annual Symposium of Foundations of Computer Science, pages 62 71, S. Even and Y. Shiloach. NP-completeness of several arrangements problems. Technical report TR-43, The Technion, Haifa, E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Orientated Software. Addison-Wesley, M.R. Garey, R.L. Graham, D.S. Johnson, and D.E. Knuth. Complexity results for bandwidth minimization. SIAM Journal on Applied Mathematics, 34(3): , M.R. Garey and D.S. Johnson. Computers and Intractability. A Guide to the Theory of NP-Completeness. W.H.Freeman, S. Hong, P. Eades, A. Quigley, and S. Lee. Drawing algorithms for series parallel digraphs in two and three dimensions. Lecture Notes in Computer Science, 1547: , C. Kosak, J. Marks, and S. Shieber. Automating the layout of network diagrams with specified visual organization. IEEE Transactions on Systems, Man, and Cybernetics, 24(2): , R.J. Lipton, S.C. North, and J.S. Sandberg. A method for drawing graphs. In 1st Annual ACM Symposium on Computational Geometry, pages , J. Manning. Computational complexity of geometric symmetry detection in graphs. Lecture Notes in Computer Science, 507:1 7, J. Manning and M.J. Atallah. Fast detection and display of symmetry in trees. Congressus Numerantium, 64: , C. Papadimitriou. The NP-completeness of the bandwidth minimization problem. Computing, 16: , J. Petit. Layout Problems. PhD thesis, Universitat Politècnica de Catalunya, H.C. Purchase, J-A. Allder, and D. Carrington. Graph layout aesthetics in UML diagrams: user preferences. Journal of Graph Algorithms and Applications, 6(3): , H.C. Purchase, R.F. Cohen, and M. James. Validating graph drawing aesthetics. Lecture Notes in Computer Science, 1027: , J. Rumbaugh, I. Jacobson, and G. Booch. The Unified Modeling Language Reference Manual. Addison-Wesley, 1999.
12 102 Timo Poranen, Erkki Mäkinen, and Jyrki Nummenmaa 22. Y. Shiloach. A minimum linear arrangement algorithm for undirected trees. SIAM Journal on Computing, 8(1):15 32, K. Sugiyama, S. Tagawa, and M. Toda. Methods for visual understanding of hierarchical systems. IEEE Transactions on Systems, Man, and Cybernetics, 11(2): , M.N.S. Swamy and K. Thulasiraman. Graphs, Networks and Algorithms. John Wiley and Sons, R. Tamassia, G. Di Battista, and C. Batini. Automatic graph drawing and readability of diagrams. IEEE Transactions on Systems, Man, and Cybernetics, 18(1):61 79, R.E. Tarjan. Depth first search and linear graph algorithms. SIAM Journal on Computing, 1(2): , W. Unger. The complexity of the approximation of the bandwidth problem. In 39th Annual Symposium of Foundations of Computer Science, pages 82 91, 1998.
13 How to Draw a Sequence Diagram 103 A B C D E F G H I J Fig. 2. An example of viewing large sequence diagram with the sliding property.
14 104 Timo Poranen, Erkki Mäkinen, and Jyrki Nummenmaa A B C D E
Computational Geometry. Lecture 1: Introduction and Convex Hulls
Lecture 1: Introduction and convex hulls 1 Geometry: points, lines,... Plane (two-dimensional), R 2 Space (three-dimensional), R 3 Space (higher-dimensional), R d A point in the plane, 3-dimensional space,
Current Standard: Mathematical Concepts and Applications Shape, Space, and Measurement- Primary
Shape, Space, and Measurement- Primary A student shall apply concepts of shape, space, and measurement to solve problems involving two- and three-dimensional shapes by demonstrating an understanding of:
Visual Analysis Tool for Bipartite Networks
Visual Analysis Tool for Bipartite Networks Kazuo Misue Department of Computer Science, University of Tsukuba, 1-1-1 Tennoudai, Tsukuba, 305-8573 Japan [email protected] Abstract. To find hidden features
! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.
Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three
Solving Geometric Problems with the Rotating Calipers *
Solving Geometric Problems with the Rotating Calipers * Godfried Toussaint School of Computer Science McGill University Montreal, Quebec, Canada ABSTRACT Shamos [1] recently showed that the diameter of
Graph/Network Visualization
Graph/Network Visualization Data model: graph structures (relations, knowledge) and networks. Applications: Telecommunication systems, Internet and WWW, Retailers distribution networks knowledge representation
Applied Algorithm Design Lecture 5
Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design
Glencoe. correlated to SOUTH CAROLINA MATH CURRICULUM STANDARDS GRADE 6 3-3, 5-8 8-4, 8-7 1-6, 4-9
Glencoe correlated to SOUTH CAROLINA MATH CURRICULUM STANDARDS GRADE 6 STANDARDS 6-8 Number and Operations (NO) Standard I. Understand numbers, ways of representing numbers, relationships among numbers,
Information Visualization of Attributed Relational Data
Information Visualization of Attributed Relational Data Mao Lin Huang Department of Computer Systems Faculty of Information Technology University of Technology, Sydney PO Box 123 Broadway, NSW 2007 Australia
Solving Simultaneous Equations and Matrices
Solving Simultaneous Equations and Matrices The following represents a systematic investigation for the steps used to solve two simultaneous linear equations in two unknowns. The motivation for considering
Copyright 2011 Casa Software Ltd. www.casaxps.com. Centre of Mass
Centre of Mass A central theme in mathematical modelling is that of reducing complex problems to simpler, and hopefully, equivalent problems for which mathematical analysis is possible. The concept of
VISUALIZING HIERARCHICAL DATA. Graham Wills SPSS Inc., http://willsfamily.org/gwills
VISUALIZING HIERARCHICAL DATA Graham Wills SPSS Inc., http://willsfamily.org/gwills SYNONYMS Hierarchical Graph Layout, Visualizing Trees, Tree Drawing, Information Visualization on Hierarchies; Hierarchical
CMPSCI611: Approximating MAX-CUT Lecture 20
CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to
Information Visualization on the Base of Hierarchical Graph Models
Information Visualization on the Base of Hierarchical Graph Models V.N. KASYANOV Laboratory for Program Construction and Optimization Institute of Informatics Systems Lavrentiev pr. 6, Novosibirsk, 630090
! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.
Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of
Competitive Analysis of On line Randomized Call Control in Cellular Networks
Competitive Analysis of On line Randomized Call Control in Cellular Networks Ioannis Caragiannis Christos Kaklamanis Evi Papaioannou Abstract In this paper we address an important communication issue arising
Pro/ENGINEER Wildfire 4.0 Basic Design
Introduction Datum features are non-solid features used during the construction of other features. The most common datum features include planes, axes, coordinate systems, and curves. Datum features do
Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li
Computer Algorithms NP-Complete Problems NP-completeness The quest for efficient algorithms is about finding clever ways to bypass the process of exhaustive search, using clues from the input in order
Algebra 1 2008. Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard
Academic Content Standards Grade Eight and Grade Nine Ohio Algebra 1 2008 Grade Eight STANDARDS Number, Number Sense and Operations Standard Number and Number Systems 1. Use scientific notation to express
Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling
Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one
Linear Programming. Solving LP Models Using MS Excel, 18
SUPPLEMENT TO CHAPTER SIX Linear Programming SUPPLEMENT OUTLINE Introduction, 2 Linear Programming Models, 2 Model Formulation, 4 Graphical Linear Programming, 5 Outline of Graphical Procedure, 5 Plotting
Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs
Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs Yong Zhang 1.2, Francis Y.L. Chin 2, and Hing-Fung Ting 2 1 College of Mathematics and Computer Science, Hebei University,
Discrete Applied Mathematics. The firefighter problem with more than one firefighter on trees
Discrete Applied Mathematics 161 (2013) 899 908 Contents lists available at SciVerse ScienceDirect Discrete Applied Mathematics journal homepage: www.elsevier.com/locate/dam The firefighter problem with
THE PROBLEM WORMS (1) WORMS (2) THE PROBLEM OF WORM PROPAGATION/PREVENTION THE MINIMUM VERTEX COVER PROBLEM
1 THE PROBLEM OF WORM PROPAGATION/PREVENTION I.E. THE MINIMUM VERTEX COVER PROBLEM Prof. Tiziana Calamoneri Network Algorithms A.y. 2014/15 2 THE PROBLEM WORMS (1)! A computer worm is a standalone malware
Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.
Chapter 1 Vocabulary identity - A statement that equates two equivalent expressions. verbal model- A word equation that represents a real-life problem. algebraic expression - An expression with variables.
Sequence Diagrams. Massimo Felici. Massimo Felici Sequence Diagrams c 2004 2011
Sequence Diagrams Massimo Felici What are Sequence Diagrams? Sequence Diagrams are interaction diagrams that detail how operations are carried out Interaction diagrams model important runtime interactions
A Note on Maximum Independent Sets in Rectangle Intersection Graphs
A Note on Maximum Independent Sets in Rectangle Intersection Graphs Timothy M. Chan School of Computer Science University of Waterloo Waterloo, Ontario N2L 3G1, Canada [email protected] September 12,
Approximation Algorithms
Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms
On the k-path cover problem for cacti
On the k-path cover problem for cacti Zemin Jin and Xueliang Li Center for Combinatorics and LPMC Nankai University Tianjin 300071, P.R. China [email protected], [email protected] Abstract In this paper we
TU e. Advanced Algorithms: experimentation project. The problem: load balancing with bounded look-ahead. Input: integer m 2: number of machines
The problem: load balancing with bounded look-ahead Input: integer m 2: number of machines integer k 0: the look-ahead numbers t 1,..., t n : the job sizes Problem: assign jobs to machines machine to which
MATHEMATICAL ENGINEERING TECHNICAL REPORTS. The Best-fit Heuristic for the Rectangular Strip Packing Problem: An Efficient Implementation
MATHEMATICAL ENGINEERING TECHNICAL REPORTS The Best-fit Heuristic for the Rectangular Strip Packing Problem: An Efficient Implementation Shinji IMAHORI, Mutsunori YAGIURA METR 2007 53 September 2007 DEPARTMENT
MA107 Precalculus Algebra Exam 2 Review Solutions
MA107 Precalculus Algebra Exam 2 Review Solutions February 24, 2008 1. The following demand equation models the number of units sold, x, of a product as a function of price, p. x = 4p + 200 a. Please write
Pre-Algebra 2008. Academic Content Standards Grade Eight Ohio. Number, Number Sense and Operations Standard. Number and Number Systems
Academic Content Standards Grade Eight Ohio Pre-Algebra 2008 STANDARDS Number, Number Sense and Operations Standard Number and Number Systems 1. Use scientific notation to express large numbers and small
Tutorial: 2D Pipe Junction Using Hexa Meshing
Tutorial: 2D Pipe Junction Using Hexa Meshing Introduction In this tutorial, you will generate a mesh for a two-dimensional pipe junction, composed of two inlets and one outlet. After generating an initial
Johannes Sametinger. C. Doppler Laboratory for Software Engineering Johannes Kepler University of Linz A-4040 Linz, Austria
OBJECT-ORIENTED DOCUMENTATION C. Doppler Laboratory for Software Engineering Johannes Kepler University of Linz A-4040 Linz, Austria Abstract Object-oriented programming improves the reusability of software
Analysis of Algorithms, I
Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadth-first search (BFS) 4 Applications
How To Develop Software
Software Engineering Prof. N.L. Sarda Computer Science & Engineering Indian Institute of Technology, Bombay Lecture-4 Overview of Phases (Part - II) We studied the problem definition phase, with which
ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite
ALGEBRA Pupils should be taught to: Generate and describe sequences As outcomes, Year 7 pupils should, for example: Use, read and write, spelling correctly: sequence, term, nth term, consecutive, rule,
Triangulation by Ear Clipping
Triangulation by Ear Clipping David Eberly Geometric Tools, LLC http://www.geometrictools.com/ Copyright c 1998-2016. All Rights Reserved. Created: November 18, 2002 Last Modified: August 16, 2015 Contents
Load Balancing. Load Balancing 1 / 24
Load Balancing Backtracking, branch & bound and alpha-beta pruning: how to assign work to idle processes without much communication? Additionally for alpha-beta pruning: implementing the young-brothers-wait
SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH
31 Kragujevac J. Math. 25 (2003) 31 49. SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH Kinkar Ch. Das Department of Mathematics, Indian Institute of Technology, Kharagpur 721302, W.B.,
Chapter 1. Creating Sketches in. the Sketch Mode-I. Evaluation chapter. Logon to www.cadcim.com for more details. Learning Objectives
Chapter 1 Creating Sketches in Learning Objectives the Sketch Mode-I After completing this chapter you will be able to: Use various tools to create a geometry. Dimension a sketch. Apply constraints to
COMMON CORE STATE STANDARDS FOR MATHEMATICS 3-5 DOMAIN PROGRESSIONS
COMMON CORE STATE STANDARDS FOR MATHEMATICS 3-5 DOMAIN PROGRESSIONS Compiled by Dewey Gottlieb, Hawaii Department of Education June 2010 Operations and Algebraic Thinking Represent and solve problems involving
Visualization of State Transition Graphs
Visualization of State Transition Graphs Frank van Ham, Huub van de Wetering, Jarke J. van Wijk Eindhoven University of Technology Dept. of Mathematics and Computer Science P.O.Box 513, 5600 MB Eindhoven,
CIS 700: algorithms for Big Data
CIS 700: algorithms for Big Data Lecture 6: Graph Sketching Slides at http://grigory.us/big-data-class.html Grigory Yaroslavtsev http://grigory.us Sketching Graphs? We know how to sketch vectors: v Mv
Outline 2.1 Graph Isomorphism 2.2 Automorphisms and Symmetry 2.3 Subgraphs, part 1
GRAPH THEORY LECTURE STRUCTURE AND REPRESENTATION PART A Abstract. Chapter focuses on the question of when two graphs are to be regarded as the same, on symmetries, and on subgraphs.. discusses the concept
CSC2420 Spring 2015: Lecture 3
CSC2420 Spring 2015: Lecture 3 Allan Borodin January 22, 2015 1 / 1 Announcements and todays agenda Assignment 1 due next Thursday. I may add one or two additional questions today or tomorrow. Todays agenda
Voronoi Treemaps in D3
Voronoi Treemaps in D3 Peter Henry University of Washington [email protected] Paul Vines University of Washington [email protected] ABSTRACT Voronoi treemaps are an alternative to traditional rectangular
On the Relationship between Classes P and NP
Journal of Computer Science 8 (7): 1036-1040, 2012 ISSN 1549-3636 2012 Science Publications On the Relationship between Classes P and NP Anatoly D. Plotnikov Department of Computer Systems and Networks,
Improvements of Space-Optimized Tree for Visualizing and Manipulating Very Large Hierarchies
Improvements of Space-Optimized Tree for Visualizing and Manipulating Very Large Hierarchies Quang Vinh Nguyen and Mao Lin Huang Faculty of Information Technology University of Technology, Sydney, Australia
2. Spin Chemistry and the Vector Model
2. Spin Chemistry and the Vector Model The story of magnetic resonance spectroscopy and intersystem crossing is essentially a choreography of the twisting motion which causes reorientation or rephasing
Grade 5 Math Content 1
Grade 5 Math Content 1 Number and Operations: Whole Numbers Multiplication and Division In Grade 5, students consolidate their understanding of the computational strategies they use for multiplication.
Social Media Mining. Graph Essentials
Graph Essentials Graph Basics Measures Graph and Essentials Metrics 2 2 Nodes and Edges A network is a graph nodes, actors, or vertices (plural of vertex) Connections, edges or ties Edge Node Measures
Introduction to Logic in Computer Science: Autumn 2006
Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding
1. Write the number of the left-hand item next to the item on the right that corresponds to it.
1. Write the number of the left-hand item next to the item on the right that corresponds to it. 1. Stanford prison experiment 2. Friendster 3. neuron 4. router 5. tipping 6. small worlds 7. job-hunting
Finding and counting given length cycles
Finding and counting given length cycles Noga Alon Raphael Yuster Uri Zwick Abstract We present an assortment of methods for finding and counting simple cycles of a given length in directed and undirected
Unit 7 Quadratic Relations of the Form y = ax 2 + bx + c
Unit 7 Quadratic Relations of the Form y = ax 2 + bx + c Lesson Outline BIG PICTURE Students will: manipulate algebraic expressions, as needed to understand quadratic relations; identify characteristics
Matthias F.M. Stallmann Department of Computer Science North Carolina State University Raleigh, NC 27695-8206
Matthias F.M. Stallmann Department of Computer Science North Carolina State University Raleigh, NC 27695-8206 August, 1990 UNIFORM PLANAR EMBEDDING IS NP-COMPLETE* MATTHIAS F.M. STALLMANN Key Words. planar
Making 3D Threads in Feature Based Solid Modelers
Making 3D Threads in Feature Based Solid Modelers THREAD BASICS Making true geometric threads in feature-based solid modelers is a fairly straightforward process and can be handled using several different
Managerial Economics Prof. Trupti Mishra S.J.M. School of Management Indian Institute of Technology, Bombay. Lecture - 13 Consumer Behaviour (Contd )
(Refer Slide Time: 00:28) Managerial Economics Prof. Trupti Mishra S.J.M. School of Management Indian Institute of Technology, Bombay Lecture - 13 Consumer Behaviour (Contd ) We will continue our discussion
6.4 Normal Distribution
Contents 6.4 Normal Distribution....................... 381 6.4.1 Characteristics of the Normal Distribution....... 381 6.4.2 The Standardized Normal Distribution......... 385 6.4.3 Meaning of Areas under
Aspect Oriented Strategy to model the Examination Management Systems
Aspect Oriented Strategy to model the Examination Management Systems P.Durga 1, S.Jeevitha 2, A.Poomalai 3, Prof.M.Sowmiya 4 and Prof.S.Balamurugan 5 Department of IT, Kalaignar Karunanidhi Institute of
Graph Theory Problems and Solutions
raph Theory Problems and Solutions Tom Davis [email protected] http://www.geometer.org/mathcircles November, 005 Problems. Prove that the sum of the degrees of the vertices of any finite graph is
BPS Math Year at a Glance (Adapted from A Story Of Units Curriculum Maps in Mathematics K-5) 1
Grade 4 Key Areas of Focus for Grades 3-5: Multiplication and division of whole numbers and fractions-concepts, skills and problem solving Expected Fluency: Add and subtract within 1,000,000 Module M1:
SolidWorks Implementation Guides. Sketching Concepts
SolidWorks Implementation Guides Sketching Concepts Sketching in SolidWorks is the basis for creating features. Features are the basis for creating parts, which can be put together into assemblies. Sketch
Network Metrics, Planar Graphs, and Software Tools. Based on materials by Lala Adamic, UMichigan
Network Metrics, Planar Graphs, and Software Tools Based on materials by Lala Adamic, UMichigan Network Metrics: Bowtie Model of the Web n The Web is a directed graph: n webpages link to other webpages
The Goldberg Rao Algorithm for the Maximum Flow Problem
The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }
SIMS 255 Foundations of Software Design. Complexity and NP-completeness
SIMS 255 Foundations of Software Design Complexity and NP-completeness Matt Welsh November 29, 2001 [email protected] 1 Outline Complexity of algorithms Space and time complexity ``Big O'' notation Complexity
Anamorphic imaging with three mirrors: a survey
Anamorphic imaging with three mirrors: a survey Joseph M. Howard Optics Branch (Code 551), NASA Goddard Space Flight Center, Greenbelt, MD 20771 Ph: 301-286-0690 Fax: 301-286-0204 [email protected]
Dynamic Programming. Lecture 11. 11.1 Overview. 11.2 Introduction
Lecture 11 Dynamic Programming 11.1 Overview Dynamic Programming is a powerful technique that allows one to solve many different types of problems in time O(n 2 ) or O(n 3 ) for which a naive approach
8.1 Min Degree Spanning Tree
CS880: Approximations Algorithms Scribe: Siddharth Barman Lecturer: Shuchi Chawla Topic: Min Degree Spanning Tree Date: 02/15/07 In this lecture we give a local search based algorithm for the Min Degree
Subgraph Patterns: Network Motifs and Graphlets. Pedro Ribeiro
Subgraph Patterns: Network Motifs and Graphlets Pedro Ribeiro Analyzing Complex Networks We have been talking about extracting information from networks Some possible tasks: General Patterns Ex: scale-free,
Random graphs with a given degree sequence
Sourav Chatterjee (NYU) Persi Diaconis (Stanford) Allan Sly (Microsoft) Let G be an undirected simple graph on n vertices. Let d 1,..., d n be the degrees of the vertices of G arranged in descending order.
Fairness in Routing and Load Balancing
Fairness in Routing and Load Balancing Jon Kleinberg Yuval Rabani Éva Tardos Abstract We consider the issue of network routing subject to explicit fairness conditions. The optimization of fairness criteria
Understand the Sketcher workbench of CATIA V5.
Chapter 1 Drawing Sketches in Learning Objectives the Sketcher Workbench-I After completing this chapter you will be able to: Understand the Sketcher workbench of CATIA V5. Start a new file in the Part
Shortest Inspection-Path. Queries in Simple Polygons
Shortest Inspection-Path Queries in Simple Polygons Christian Knauer, Günter Rote B 05-05 April 2005 Shortest Inspection-Path Queries in Simple Polygons Christian Knauer, Günter Rote Institut für Informatik,
Prentice Hall Algebra 2 2011 Correlated to: Colorado P-12 Academic Standards for High School Mathematics, Adopted 12/2009
Content Area: Mathematics Grade Level Expectations: High School Standard: Number Sense, Properties, and Operations Understand the structure and properties of our number system. At their most basic level
The Graphical Method: An Example
The Graphical Method: An Example Consider the following linear program: Maximize 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2 0, where, for ease of reference,
The Aesthetics of Graph Visualization
Computational Aesthetics in Graphics, Visualization, and Imaging (2007), pp. 1 8 D. W. Cunningham, G. Meyer, L. Neumann (Editors) The Aesthetics of Graph Visualization Chris Bennett, Jody Ryall, Leo Spalteholz
The Load-Distance Balancing Problem
The Load-Distance Balancing Problem Edward Bortnikov Samir Khuller Yishay Mansour Joseph (Seffi) Naor Yahoo! Research, Matam Park, Haifa 31905 (Israel) Department of Computer Science, University of Maryland,
Numeracy and mathematics Experiences and outcomes
Numeracy and mathematics Experiences and outcomes My learning in mathematics enables me to: develop a secure understanding of the concepts, principles and processes of mathematics and apply these in different
Approximating the Minimum Chain Completion problem
Approximating the Minimum Chain Completion problem Tomás Feder Heikki Mannila Evimaria Terzi Abstract A bipartite graph G = (U, V, E) is a chain graph [9] if there is a bijection π : {1,..., U } U such
Lecture 7: NP-Complete Problems
IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit
Cloud Computing is NP-Complete
Working Paper, February 2, 20 Joe Weinman Permalink: http://www.joeweinman.com/resources/joe_weinman_cloud_computing_is_np-complete.pdf Abstract Cloud computing is a rapidly emerging paradigm for computing,
MECHANICAL PRINCIPLES HNC/D MOMENTS OF AREA. Define and calculate 1st. moments of areas. Define and calculate 2nd moments of areas.
MECHANICAL PRINCIPLES HNC/D MOMENTS OF AREA The concepts of first and second moments of area fundamental to several areas of engineering including solid mechanics and fluid mechanics. Students who are
OPRE 6201 : 2. Simplex Method
OPRE 6201 : 2. Simplex Method 1 The Graphical Method: An Example Consider the following linear program: Max 4x 1 +3x 2 Subject to: 2x 1 +3x 2 6 (1) 3x 1 +2x 2 3 (2) 2x 2 5 (3) 2x 1 +x 2 4 (4) x 1, x 2
Introduction to the TI-Nspire CX
Introduction to the TI-Nspire CX Activity Overview: In this activity, you will become familiar with the layout of the TI-Nspire CX. Step 1: Locate the Touchpad. The Touchpad is used to navigate the cursor
Lecture 16 : Relations and Functions DRAFT
CS/Math 240: Introduction to Discrete Mathematics 3/29/2011 Lecture 16 : Relations and Functions Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT In Lecture 3, we described a correspondence
Case studies: Outline. Requirement Engineering. Case Study: Automated Banking System. UML and Case Studies ITNP090 - Object Oriented Software Design
I. Automated Banking System Case studies: Outline Requirements Engineering: OO and incremental software development 1. case study: withdraw money a. use cases b. identifying class/object (class diagram)
Excel -- Creating Charts
Excel -- Creating Charts The saying goes, A picture is worth a thousand words, and so true. Professional looking charts give visual enhancement to your statistics, fiscal reports or presentation. Excel
Sketcher. Preface What's New? Getting Started Basic Tasks Customizing Workbench Description Glossary Index
Sketcher Preface What's New? Getting Started Basic Tasks Customizing Workbench Description Glossary Index Dassault Systèmes 1994-99. All rights reserved. Preface CATIA Version 5 Sketcher application makes
Guide To Creating Academic Posters Using Microsoft PowerPoint 2010
Guide To Creating Academic Posters Using Microsoft PowerPoint 2010 INFORMATION SERVICES Version 3.0 July 2011 Table of Contents Section 1 - Introduction... 1 Section 2 - Initial Preparation... 2 2.1 Overall
Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design
Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design Hongsik Choi and Hyeong-Ah Choi Department of Electrical Engineering and Computer Science George Washington University Washington,
ARTIFICIAL INTELLIGENCE METHODS IN EARLY MANUFACTURING TIME ESTIMATION
1 ARTIFICIAL INTELLIGENCE METHODS IN EARLY MANUFACTURING TIME ESTIMATION B. Mikó PhD, Z-Form Tool Manufacturing and Application Ltd H-1082. Budapest, Asztalos S. u 4. Tel: (1) 477 1016, e-mail: [email protected]
