DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.

Slides:



Advertisements
Similar presentations
Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Connectivity Lecture _13.
Advertisements

Graphs CSCI 2720 Spring 2005.
Simple Graph Warmup. Cycles in Simple Graphs A cycle in a simple graph is a sequence of vertices v 0, …, v n for some n>0, where v 0, ….v n-1 are distinct,
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
CS 206 Introduction to Computer Science II 03 / 27 / 2009 Instructor: Michael Eckmann.
Data Structures Chapter 12 Graphs Andreas Savva. 2 Definition A graph consists of a set of vertices together with a set of edges. If e = (v,w) is an edge.
 Graph Graph  Types of Graphs Types of Graphs  Data Structures to Store Graphs Data Structures to Store Graphs  Graph Definitions Graph Definitions.
CS 206 Introduction to Computer Science II 11 / 11 / Veterans Day Instructor: Michael Eckmann.
Introduction to Graphs
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Wednesday, 9/26/01 Graph Basics.
Introduction to Graphs What is a Graph? Some Example applications of Graphs. Graph Terminologies. Representation of Graphs. –Adjacency Matrix. –Adjacency.
CS 206 Introduction to Computer Science II 11 / 03 / 2008 Instructor: Michael Eckmann.
Applications of Depth-First Search
Copyright © Zeph Grunschlag, Paths and Connectivity Zeph Grunschlag.
1 Section 8.4 Connectivity. 2 Paths In an undirected graph, a path of length n from u to v, where n is a positive integer, is a sequence of edges e 1,
Chapter 4 Graphs.
Lecture 11 CSE 331 Sep 25, Homeworks Please hand in your HW 2 now HW 3 and graded HW 1 at the end of class.
GRAPH Learning Outcomes Students should be able to:
Using Java MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE Lecture 6 Introduction to classes and objects.
1 Chapter 9 Graph Algorithms Real-life graph problems Algorithms for some graph problems Choice of data structures for graph problems.
Graph Theoretic Concepts. What is a graph? A set of vertices (or nodes) linked by edges Mathematically, we often write G = (V,E)  V: set of vertices,
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Graphs.  Definition A simple graph G= (V, E) consists of vertices, V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements.
COSC 2007 Data Structures II Chapter 14 Graphs I.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Graphs A graphs is an abstract representation of a set of objects, called vertices or nodes, where some pairs of the objects are connected by links, called.
Basic properties Continuation
DATA STRUCTURES AND ALGORITHMS Lecture Notes 10 Prepared by İnanç TAHRALI.
Graphs Upon completion you will be able to:
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Graphs. Contents Terminology Graphs as ADTs Applications of Graphs.
Graphs Chapter 28 © 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank Carrano.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE.
Graphs Definition: a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected.
Graphs. Graph Definitions A graph G is denoted by G = (V, E) where  V is the set of vertices or nodes of the graph  E is the set of edges or arcs connecting.
Graph Concepts Illustrated Using The Leda Library Amanuel Lemma CS252 Algorithms.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Leda Demos By: Kelley Louie Credits: definitions from Algorithms Lectures and Discrete Mathematics with Algorithms by Albertson and Hutchinson graphics.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 10.
CSC 252 Pallavi Moorthy Homework 5. 1.) Vertices, edges From cd../../handout/demo/graph_alg/gw_shortest_path.
Presented By: Mahmoud Rafeek Alfarra
Introduction to Graphs
Basic Concepts Graphs For more notes and topics visit:
Presented By: Mahmoud Rafeek Alfarra
Agenda Lecture Content: Introduction to Graph Path and Cycle
Introduction to Graphs
Introduction To Programming Information Technology , 1’st Semester
CS223 Advanced Data Structures and Algorithms
Presented By: Mahmoud Rafeek Alfarra
Chapter 9: Graphs Basic Concepts
Introduction To Programming Information Technology , 1’st Semester
Introduction To Programming Information Technology , 1’st Semester
Presented By: Mahmoud Rafeek Alfarra
Graph Theory By Amy C. and John M..
10.1 Graphs and Graph Models
Presented By: Mahmoud Rafeek Alfarra
Introduction To Programming Information Technology , 1’st Semester
Graphs G = (V, E) V are the vertices; E are the edges.
GRAPHS G=<V,E> Adjacent vertices Undirected graph
Paths and Connectivity
Paths and Connectivity
Chapter 9: Graphs Basic Concepts
Presented By: Mahmoud Rafeek Alfarra
Chapter 14 Graphs © 2011 Pearson Addison-Wesley. All rights reserved.
Introduction to Graphs
Introduction to Graphs
Presentation transcript:

DATA STRUCTURE Presented By: Mahmoud Rafeek Alfarra Using C# MINISTRY OF EDUCATION & HIGHER EDUCATION COLLEGE OF SCIENCE AND TECHNOLOGY KHANYOUNIS- PALESTINE Information Technology, 3’rd Semester Lecture 18: An Overview of Graph

Outline  Definition of Graph Data Structure  Concept of Vertices and edges  What is Hash tables?  Emank X Mezank !!

What is Graph?  A graph consists of a set of vertices and a set of edges.  Think of a map of your Country. Each town is connected with other towns via some type of road. 3 Presented & Prepared by: Mahmoud R. Alfarra

Vertex and edge !!!  Each town is a vertex and a road that connects two towns is an edge.  Edges are specified as a pair, (v1, v2), where v1 and v2 are two vertices in the graph.  A vertex can also have a weight, sometimes also called a cost. 4 Presented & Prepared by: Mahmoud R. Alfarra

Directed graph 5 Presented & Prepared by: Mahmoud R. Alfarra ordered digraph  A graph whose pairs are ordered is called a directed graph, or just a digraph.

Unordered graph 6 Presented & Prepared by: Mahmoud R. Alfarra  If a graph is not ordered, it is called an unordered graph, or just a graph.

Path & length 7 Presented & Prepared by: Mahmoud R. Alfarra  A path is a sequence of vertices in a graph such that all vertices are connected by edges.  The length of a path is the number of edges from the first vertex in the path to the last vertex.  A path can also consist of a vertex to itself, which is called a loop.  Loops have a length of 0.

A cycle Path 8 Presented & Prepared by: Mahmoud R. Alfarra  A cycle is a path of at least 1 in a directed graph so that the beginning vertex is also the ending vertex.  In a directed graph, the edges can be the same edge, but in an undirected graph, the edges must be distinct.

Connected graph  An undirected graph is considered connected if there is a path from every vertex to every other vertex.  In a directed graph, this condition is called strongly connected.  A directed graph that is not strongly connected, but is considered connected, is called weakly connected.  If a graph has a edge between every set of vertices, it is said to be a complete graph.

Emank X Mezank !! قال النبي صلى الله عليه وسلم: قولوا لا إله إلا الله تُفلحـوا

Next Lecture Graphs