Computer Science for Engineers

Similar documents
Computer Science for Engineers

Computer Science for Engineers

Computer Science for Engineers

Computer Science for Engineers

Software Engineering

Lecture 7: Software Processes. Refresher: Software Always Evolves

CS487 Midterm Exam Summer 2005

Requirements and Design Overview

UNIT-I Introduction of Object Oriented Modeling

CS2353 OBJECT ORIENTED ANALYSIS AND DESIGN UNIT- I

Managing Change and Complexity

Information systems modelling UML and service description languages

Systems Analysis and Design in a Changing World, Fourth Edition

Getting a Quick Start with RUP

Reducing the costs of rework. Coping with change. Software prototyping. Ways to Cope with change. Benefits of prototyping

Lecture 2: Software Engineering (a review)

Software Processes. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 4 Slide 1

Introduction. Chapter 1. What Is Visual Modeling? The Triangle for Success. The Role of Notation. History of the UML. The Role of Process

Object-Oriented Software Engineering Practical Software Development using UML and Java

Chapter 1: Principles of Programming and Software Engineering

BDSA Introduction to OOAD. Jakob E. Bardram

System Analysis and Design

VO Software Engineering

Software Process. Software Process

Improving System Usability Through the Automation of User's Routine Intentions: an Image Edition Tool Case Study

Object Oriented System Development

From Analysis to Design. LTOOD/OOAD Verified Software Systems

Basics : the Requirements Engineering Process

Software Verification and Validation (VIMMD052) Introduction. Istvan Majzik Budapest University of Technology and Economics

Software Design And Modeling BE 2015 (w. e. f Academic Year )

Review of Basic Software Design Concepts. Fethi Rabhi SENG 2021

A PROPOSAL FOR MODELING THE CONTROL SYSTEM FOR THE SPANISH LIGHT SOURCE IN UML

Object-Oriented Design

Introduction to Software Engineering

SRI VENKATESWARA COLLEGE OF ENGINERRING AND TECHNOLOGY THIRUPACHUR,THIRUVALLUR UNIT I OOAD PART A

Review Software Engineering October, 7, Adrian Iftene

This tutorial also elaborates on other related methodologies like Agile, RAD and Prototyping.

Object Oriented Programming

Change Management Process on Database Level within RUP Framework

SOFTWARE ENGINEERING

Chapter 1: Programming Principles

SOFTWARE ENGINEERING

Session 8: UML The Unified Modeling (or the Unstructured Muddling) language?

Object-Oriented Analysis and Design

defined. defined. defined. defined. defined. defined. defined. defined. defined.

The Unified Modeling Language User Guide

Topic 01. Software Engineering, Web Engineering, agile methodologies.

Building the User Interface: The Case for Continuous Development in an Iterative Project Environment

Pattern-Based Architectural Design Process Model

Incremental development A.Y. 2018/2019

Objectives. Connecting with Computer Science 2

CPSC 2380 Data Structures and Algorithms

Software Design, Modelling and Analysis in UML

Outline of Unified Process

Object Design II: Design Patterns

The requirements engineering process

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 5: Modelling with Classes

SE310 Analysis and Design of Software Systems

CSC Advanced Object Oriented Programming, Spring Overview

Tonight s Agenda. CSC340: Requirements Engineering. Course Objectives. Requirements Engineering. Software Engineering. What is Software Engineering?

Design Patterns. Gunnar Gotshalks A4-1

Process of Interaction Design and Design Languages

CIS 771: Software Specifications

Lecture 8 Requirements Engineering

Software Life Cycle. Main issues: Discussion of different life cycle models Maintenance or evolution

02291: System Integration

Lecture 02: Semantical Model

Software Development Methodologies

From Closed to Open to Transparent Software Development. Development

3 Product Management Anti-Patterns by Thomas Schranz

L02.1 Introduction... 2

The Process of Software Architecting

Week 9 Implementation

COLLEGE OF THE DESERT

Modeling Requirements

CISC 322 Software Architecture

CHAPTER 1. Topic: UML Overview. CHAPTER 1: Topic 1. Topic: UML Overview

Domain Engineering And Variability In The Reuse-Driven Software Engineering Business.

Introduction - SENG 330. Object-Oriented Analysis and Design

Announcements. How to build a UML model. Rational Unified Process. How RUP builds a model. UI design. Architect

Level: M.Ed. Credit Hour: 3 (2+1) Semester: Second Teaching Hour: 80(32+48)

Evaluating OO-CASE tools: OO research meets practice

DOWNLOAD OR READ : UML AND C A PRACTICAL GUIDE TO OBJECT ORIENTED DEVELOPMENT PDF EBOOK EPUB MOBI

OBJECT ORIENTED SYSTEM DEVELOPMENT Software Development Dynamic System Development Information system solution Steps in System Development Analysis

Overview of Today s Lecture. Analytical Evaluation / Usability Testing. ex: find a book at Amazon.ca via search

OO Project Management

Slides for courses based on the textbook

Configuration Management for Component-based Systems

Activities Common to Software Projects. Software Life Cycle. Activities Common to Software Projects. Activities Common to Software Projects

Formal Specification of Software Systems

administrivia today UML start design patterns Tuesday, September 28, 2010

Introduction to Software Engineering (ESE : Einführung in SE)

Exercise Unit 2: Modeling Paradigms - RT-UML. UML: The Unified Modeling Language. Statecharts. RT-UML in AnyLogic

INTERACTION ARCHITECTURAL MODELING. Lecture 9 Interaction Architectureal Modeling

Introduction to Software Engineering. ECSE-321 Unit 9 Architectural Design Approaches

A Unified Process for Software and Documentation Development

Software Engineering with Objects and Components Open Issues and Course Summary

Model-based Transition from Requirements to High-level Software Design

Index. : (colon), 80 <<>> (guillemets), 34, 56

Index. brief description section (Use Case Specification documents), 138 Browser window (Rational Rose), 257 Business Rules document, 212

Transcription:

Computer Science for Engineers Lecture 7 Object Orientation part 5 Preview Prof. Dr. Dr.-Ing. Jivka Ovtcharova Dipl. Wi.-Ing. Dan Gutu 11 th of December 2009

Example for an activity diagram (1) Task: determine the age of the youngest person in a line. Solution description: Algorithm: 1: Go to the first person. 2: Ask for its age. 3: Memorize its age. 4: As long as not all persons were questioned, repeat steps 4.1-4.3: 4.1: Go to next person. 4.2: Ask for its age. 4.3: If its age is smaller than the memorized age, memorize this age. 5 The youngest person is memorized age years old. Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 2

Example for an activity diagram (2) Solution with UML (Activity diagram): Start Go to first person Input: Ask for age Memorize age [all persons questioned== true] Output: youngest person is memorized age years old [all persons questioned == false] Go to next person Input: ask for its age [requested age >= memorized age] [requested age < memorized age] Memorize new age Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 3

Outline Lecture Content 1. Preface 2. Basics 3. Object orientation 3.1. Introduction and basic concepts 3.1.1. Introduction 3.1.2. Objects and classes 3.1.3. Attributes of object orientation 3.2. Object-oriented modelling with UML 3.2.1. Intro 3.3.2. Use Case models 3.2.3. Static models 3.2.4. Dynamic models 3.2.5. Summary 3.3. Methods of the OO Analysis and Design 3.3.1. Introduction 3.3.2. Example: Modeling a M&S System Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 4

Why Software-Engineering? 3.3. Methods of OO Analysis and Design 3.3.1 Introduction Ariane 5: Failure of its first flight on 4th of June1996: Rocket blows itself up 36 sec after start Source of failure: software Parts of the software were taken from Ariane 4 Ariane 5 can accelerate faster: variable overflow Steering system breaks down, status message to navigation system Navigation system interprets this as flight data Because of serious deviation from course the rocket blows itself up [Source: Wikipedia] Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 5

What is Software Engineering? The area of computer science that deals with the methods and tools for an engineering-type design and implementation of software Software engineering is performed today almost exclusively with help of special software tools (so called CASE-Tools) 3.3. Methods of OO Analysis and Design 3.3.1 Introduction Special methods of software engineering are dependent on the basic principles of program development, such as structured or object oriented programming The process of software engineering contains all of the phases, from problem specification up to the final use of the program or program systems Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 6

Software Engineering Emerged from the software crisis (NATO conference 1968) - Software costs > hardware - Lack of transparency in the software development process 3.3. Methods of OO Analysis and Design 3.3.1 Introduction - Engineering view on the software development process High quota of failed software projects (CHAOS study) - Study on success/failure of software projects - Only about 17% of all software projects are successful regarding Costs Timeframe Requirements Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 7

Software Engineering - Model 1 Water fall model Requirements analysis Validation 3.3. Methods of OO Analysis and Design 3.3.1 Introduction Software development Validation Implementation Validation Integration and tests Validation Usage and maintenance Validation Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 8

Software Engineering - Model 2 V- Model - Military software development Requirements definition Use case scenarios Commissioning 3.3. Methods of OO Analysis and Design 3.3.1 Introduction Test cases Preliminary design Test cases Detailed design Module implementation Test cases Integration test Module test System test Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 9

Software Engineering - Model 3 Prototype Model Requirements analysis 3.3. Methods of OO Analysis and Design 3.3.1 Introduction Software development Implementation Integration and tests Usage and maintenance Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 10

Software Engineering - Model 4 Spiral model Determine objectives Solution variants Boundary conditions Evaluate solution alternatives Overcome riscs 3.3. Methods of OO Analysis and Design 3.3.1 Introduction Next phase planning Development plan Integration and test plan Requirements Implementation Prototype creation Development and verification [Beister 08] Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 11

Rational Unified Process (RUP) Rational Unified Process (RUP) is an object oriented process model for software development. It is also a commercial product of the Rational Software company - which since 2002 has been a part of IBM. RUP uses Unified Modeling Language (UML) as the notation language The life-cycle of RUP is divided into 4 principle phases: 3.3. Methods of OO Analysis and Design 3.3.1 Introduction - Inception (conceptualization: determine project extent) - Elaboration (Design: develop convertible architecture) - Construction (Implementation: fill the architectural skeleton with functionality) - Transition (Product transfer: transfer application to the user environment) Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 12

Rational Unified Process: Dynamic Structure 3.3. Methods of OO Analysis and Design 3.3.1 Introduction Distribution of tasks in small steps (Iterations) Source: IBM - Rational Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 13

Phases of the Rational Unified Process: Inception and Elaboration Inception (Conceptualization) - Specification of the vision for the end product - Specification of the essential transactions - Definition of the project extent - Project costs and risks 3.3. Methods of OO Analysis and Design 3.3.1 Introduction - Finish: Life Cycle Objective Milestone Elaboration (Design) - Specification of product characteristics - Design of architecture - Design of the necessary activities and resources - Finish: Life Cycle Architecture Milestone Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 14

Phases of the Rational Unified Process: Construction and Transition Construction (Implementation) - Generation of the product - Development of the architecture - Result: manufactured product 3.3. Methods of OO Analysis and Design 3.3.1 Introduction - Finish: Initial Operational Capability Milestone Transition (Product transfer) - Release of the product to the user - Test of the quality level - Delivery, Training, Customer Support, Maintenance - Finish: Release Milestone Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 15

Phases of the Rational Unified Process The results of the phases are the so called Milestones: - Lifecycle objectives milestone: Vision including a rudimentary use case model, (essential functionalities), tentative architecture, identification of important risks, design of the engineering phase 3.3. Methods of OO Analysis and Design 3.3.1 Introduction - Lifecycle architecture milestone: Architecture prototype, detailed use case model, design of the construction phase - Initial operational capability milestone: Design models and Beta- Release of the Software - Product release milestone: Release in production quality Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 16

Disciplines of RUP: Static Structure The disciplines (interchangeably used with working steps) orient themselves to special roles within the developing team, and are administered by certain people or groups In detail, these disciplines are: - Central work steps Business Modeling 3.3. Methods of OO Analysis and Design 3.3.1 Introduction Requirements Analysis & Design Implementation Test Deployment - Supported work steps Configuration & Change Management Project Management Environment Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 17

Source: IBM - Rational Rational Unified Process Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 18 3.3. Methods of OO Analysis and Design 3.3.1 Introduction

Business Modelling Define the core problem: - Which functions should the system offer? - How should the operating surface behave? 3.3. Methods of OO Analysis and Design 3.3.1 Introduction - How efficient, safe, must the system be? Define the relevant environment: - type, number of users - available hardware, previous software Estimate feasibility - Technical, personal capacity - Costs (and uses) Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 19

Requirements Purpose of the system Desired functions Correct / false input, corresponding reactions Configuration of the operating surface Efficiency - goals 3.3. Methods of OO Analysis and Design 3.3.1 Introduction Document requirements Protection / Safety aspects Standards to use Time plan, expenditure estimate, risk estimate (approx.) Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 20

Analysis and Design Rough system structure - Analyze the components - Define teamwork 3.3. Methods of OO Analysis and Design 3.3.1 Introduction - Test design vs. requirements Describing the components - Purpose and role of a component - Service offered from one component Relationships between components - Which components can use the other ones - Forming of design decisions Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 21

Implementation and tests Implement the components - Choose data structures - Choose algorithms 3.3. Methods of OO Analysis and Design 3.3.1 Introduction - Formulate in the programming language Document the components - How do the components accomplish their tasks? - Establish implementation alternatives Test components (vs. design) - Arrange the test environment, gather test data - Perform a run through of the test - Verification Test externally programmed components Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 22

Deployment Application - Install the system for the customer - accommodate - Inspection by the customer - Transfer of the system 3.3. Methods of OO Analysis and Design 3.3.1 Introduction - Train the User Maintenance - Correct errors - Modify: functionalities adapt/ better Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 23

Application of UML in RUP - Disciplines Diagram type Diagram Disciplines Use case Use case diagram Business modeling Requirements Static model Class diagram Analysis & Design Instance diagram Implementation 3.3. Methods of OO Analysis and Design 3.3.1 Introduction Dynamic model Collaboration diagrams Analysis & Design Sequence diagrams Requirements Analysis & Design Implementation State diagrams Requirements Analysis & Design Activity diagrams Requirements Analysis & Design Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 24

Recommended Literature [Prie00] [Booc99] [Otte05] M. Priestley: Practical Object-oriented Design with UML, MacGraw-Hill, 2000 I. Jacobson, G. Booch, J. Rumbaugh: The Unified Software Development Process, Addison-Wesley, 1999 Prof. Dr.-Ing. Martin Otter: Vorlesung Objektorientierte Modellierung mechatronischer Systeme, DLR, 2005 Web: http://www.eat.ei.tum.de/lehre/otter-vorlesungen.html [HiKa99] M. Hitz, G. Kappel: UML@Work, dpunkt.verlag, 1999 [HrRu02] Hruschka,P., Rupp, C.: Agile Softwareentwicklung für embedded Real- Time Systeme, Hanser Verlag, 2002 [GHJV01] Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Entwurfsmuster Elemente wiederverwendbarer objektorientierter Software, Addison- Wesley Verlag, 2001 Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 25

Computer Science for Engineers Lecture 7 Data structures part 1 Preview Prof. Dr. Dr.-Ing. Jivka Ovtcharova Dipl. Wi.-Ing. Dan Gutu 11 th of December 2009

Outline Lecture Content 1. Preface 2. Basics 3. Object orientation 4. Data Structures 4.1. Introduction 4.2. Graphs 4.3. Use of Graphs 4.4. Trees 4.5. Use of Trees 4.6. Linked Lists 4.7. Queues and Stacks 5. Algorithms Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 27

Definition of the Term According to definition 1.1 from lecture 1, computer science is the science that concerns itself with the structure, effectiveness, construction principles, and applications of information processing systems as well as their usage. In order to complete these tasks, computer science developed a formalism, which allows verified characteristics and exceptions to structures, effectiveness, and principles. 4. Data Structues 4.1 Introduction This formalism and the possibility for their verification are prerequisites for a systematic data processing, which can be automatized through a computer. Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 28

Data Structures - Examples A data structure in computer science is a specific form to manage data and link the structures with one another, so that it s possible to access the data and especially manipulate it in an applicable manner. Data structures are always linked with certain operations to allow these manipulations. Application examples are - Data pool systems - Networks 4. Data Structues 4.1 Introduction - Lists of assembly parts - Telephone book - Pictures Source: GWDG Source: irc.rz.uni-karlsruhe.de Source: www.witaf.at Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 29

Data Structures The different types of data structures are applicable for different specific tasks according to their characteristics, linked operations, and implementation. Decision criteria are, for example - Amount of data to be managed - Data fluctuation - Necessary access possibilities - Run time behavior of the data access 4. Data Structues 4.1 Introduction - Alterability of the data structure Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 30

Outline Lecture Content 1. Preface 2. Basics 3. Object orientation 4. Data Structures 4.1. Introduction 4.2. Graphs 4.3. Use of Graphs 4.4. Trees 4.5. Use of Trees 4.6. Linked Lists 4.7. Queues and Stacks 5. Algorithms Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 31

Graph (1) A graph is a formation of vertices that are connected through edges. 4. Data Structures 4.2 Graphs vertex edge Graphs are visually described through images and through mathematical structures. This general definition allows the description of complex associations and characteristics Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 32

Graph (2) Definition 3.1: G = (V,E) is a graph if and only if 1. V is heap (vertices) 2. E { {v 1,v 2 } v 1,v 2 V } (edges) example G 1 : e 1 e 2 v 1 v 2 v 3 V = {v 1,v 2,v 3 } E = { {v 1,v 2 }, {v 2,v 3 }} 4. Data Structures 4.2 Graphs Nomenclature In the graph G 2 = ({v 1 },{v 1 }) the edge e1 = {v 1 } is a loop. G 2 : e 1 v 1 Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 33

Subgraph Definition 3.2: Let G = (V,E) and G = (V,E ). G is a subgraph of G if and only if E E and V V ( G G ) example G 3 : v 1 e 1 e 4 e 2 v 4 G 3 : v 1 e 1 e 5 v 2 4. Data Structures 4.2 Graphs e 3 v 2 v 3 V = {v 1,v 2,v 3,v 4 } E = { {v 1,v 2 }, {v 1,v 3 }, {v 1,v 4 }, {v 3,v 4 }, {v 2 } } e 3 V = {v 1,v 2 } E = { {v 1,v 2 }, {v 2 } } Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 34

Path Definition 3.3: A path π in G is a sequence of π = (v 0,v 1,,v n ) with 0 i < n : {v i, v i+1 } E Example G 4 : π = (v 1,v 4,v 3 ) e 2 e 3 v 3 e 1 v 1 v 2 v 4 e 4 e 5 4. Data Structures 4.2 Graphs Nomenclature n = π = Length of π Start(π) = v 0 End(π) = v n The total of all paths π in G is Path(G) Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 35

Circle Definition 3.4: The path π in G is a circle if and only if Start(π) = End(π) example G 4 : v 3 e 2 e 3 e 1 v 1 v 2 v 4 e 4 4. Data Structures 4.2 Graphs Nomenclature e 5 π = (v 2,v 4,v 3,v 2 ) is a circle π = (v 1,v 4,v 2 ) is NOT a circle A path π is a simple edge circle, when each edge on the path π is contained only once in the path Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 36

Branching factor Definition 3.5: example the branching factor d for a graph G and a vertex v is the number of edges connected with the vertex v. d(g,v) = #(v V {v,v } E) The branching factor d for a graph G gives the maximal branching factor for all vertices. d(g) = Max( d(g,v) ) v V G 5 : v 1 d(g 5,v 3 ) = 2 4. Data Structures 4.2 Graphs v 2 v 3 d(g 5,v 4 ) = 1 d(g 5 ) = 5 v 4 Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 37

Edge Quantifier A graph G was previously described by the amounts E and V and can also be described through the input of a weight function g. Let G = (V, E) and g : V x V R be the weight function. therefore: g(v 1, v 2 ) = {v 1, v 2 } E g(v 1, v 2 ) : weight of the edge {v 1, v 2 } E That means that an edge is an element of the graph when the weight is smaller than. example 4. Data Structures 4.2 Graphs G 6 : v 1 v 2 v 3 2 5 g(v 1, v 2 ) = 2 g(v 2, v 3 ) = g(v 1, v 3 ) = 5 Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 38

Directed Graphs Definition 3.6: A directed graph G is a pair G = (V,R) with 1. V is a heap (vertices) 2. R V x V (directed edges) (The order of the vertices in an edge gives the direction) example G 6 : v 4 v 2 v 1 4. Data Structures 4.2 Graphs V = {v 1,v 2,v 3,v 4 } R = { {v 2,v 1 }, {v 3,v 1 }, {v 1,v 4 }, {v 3,v 4 }, {v 2, v 2 } } v 3 Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 39

Example of a Graph (1) KVV bus and street car map 4. Data Structures 4.2 Graphs Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 40

Example of a Graph (2) How do I get from the main train station to the university (path)? Start(π) = Hauptbahnhof End(π) = Kronenplatz / KIT Campus Süd path π = {Hauptbahnhof, Poststraße, Augartenstraße, Kongresszentrum, Ettlinger Tor, Marktplatz, Kronenplatz / KIT Campus Süd} How much time do I need for this path (edge quantifier)? G π = (V,E) KVV (G π is the subgraph of the line graph) 4. Data Structures 4.2 Graphs weight(g π ) = Σ g(e) = 12 G π : H e E (Sum of all edge weights) 2 1 2 3 3 1 P A K E M U Prof. Dr. Dr.-Ing. Jivka Ovtcharova CSE-Lecture Ch. 3 and 4 - WS 09/10 - Slide 41