گراف وحيدي پور. تعاريف مجموعه اي غير تهي از راس مجموعه اي از زوج راسها كه بوسيله يال بهمديگر متصل هستند. a b d e.

Slides:



Advertisements
Similar presentations
CSE 211 Discrete Mathematics
Advertisements

Graphs CSCI 2720 Spring 2005.
Graphs COP Graphs  Train Lines Gainesville OcalaDeltona Daytona Melbourne Lakeland Tampa Orlando.
Review Binary Search Trees Operations on Binary Search Tree
1 Slides based on those of Kenneth H. Rosen Slides by Sylvia Sorkin, Community College of Baltimore County - Essex Campus Graphs.
Graph Theory.
1 An Introduction to Graph Theory Chapter Definitions and Examples Undirected graph Directed graph isolated vertex adjacent loop multiple edges.
CS 206 Introduction to Computer Science II 03 / 27 / 2009 Instructor: Michael Eckmann.
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 excerpts Graphs (breadth-first-search)
 Graph Graph  Types of Graphs Types of Graphs  Data Structures to Store Graphs Data Structures to Store Graphs  Graph Definitions Graph Definitions.
Decision Maths Graphs Wiltshire Graphs A graph is just a diagram made up of “dots” and “lines”. These are all graphs. The dots are called “nodes” or.
1 Representing Graphs. 2 Adjacency Matrix Suppose we have a graph G with n nodes. The adjacency matrix is the n x n matrix A=[a ij ] with: a ij = 1 if.
1 Intro. to Graph Theory BIO/CS 471 – Algorithms for bioinformatics Graph Theoretic Concepts and Algorithms for Bioinformatics.
Representing Graphs Wade Trappe. Lecture Overview Introduction Some Terminology –Paths Adjacency Matrix.
CTIS 154 Discrete Mathematics II1 8.2 Paths and Cycles Kadir A. Peker.
Chapter 9: Graphs Basic Concepts
Chapter 4 Graphs.
KNURE, Software department, Ph , N.V. Bilous Faculty of computer sciences Software department, KNURE Discrete.
GRAPHS Education is what remains after one has forgotten what one has learned in school. Albert Einstein Albert Einstein Smitha N Pai.
GRAPH Learning Outcomes Students should be able to:
GRAPH THEORY.  A graph is a collection of vertices and edges.  An edge is a connection between two vertices (or nodes).  One can draw a graph by marking.
Nattee Niparnan. Graph  A pair G = (V,E)  V = set of vertices (node)  E = set of edges (pairs of vertices)  V = (1,2,3,4,5,6,7)  E = ((1,2),(2,3),(3,5),(1,4),(4,
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 Graphs.
Graphs. What is a graph? A data structure that consists of a set of nodes (vertices) and a set of edges that relate the nodes to each other The set of.
An Introduction to Graph Theory Chapter 11. Chapter 11 An Introduction to Graph Theory 11.1 Definitions and Examples Undirected graph Directed graph isolated.
 What is a graph? What is a graph?  Directed vs. undirected graphs Directed vs. undirected graphs  Trees vs graphs Trees vs graphs  Terminology: Degree.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
1 CS104 : Discrete Structures Chapter V Graph Theory.
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.
مرتضي صاحب الزماني 1 Basic Graph Algorithms. مرتضي صاحب الزماني 2 Graph Data Structures Adjacency Matrix [©Bazargan]
Basic Notions on Graphs. The House-and-Utilities Problem.
CISC 235: Topic 9 Introduction to Graphs. CISC 235 Topic 92 Outline Graph Definition Terminology Representations Traversals.
Introduction to Graph Theory
An Introduction to Graph Theory
Graphs. Graphs Similar to the graphs you’ve known since the 5 th grade: line graphs, bar graphs, etc., but more general. Those mathematical graphs are.
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.
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
Graphs Basic properties.
Introduction to Graph Theory
Graph Theory. undirected graph node: a, b, c, d, e, f edge: (a, b), (a, c), (b, c), (b, e), (c, d), (c, f), (d, e), (d, f), (e, f) subgraph.
1 فصل دوم تبديلات. 2 فصل دوم سرفصل مطالب مقدمه ضرب بردارها دستگاه ‌ هاي مختصات دوران ‌ ها مختصات همگن دوران ‌ ها و انتقال ‌ ها تبديلات تركيبي همگن تبديل.
Graphs and Paths : Chapter 15 Saurav Karmakar
Chapter 05 Introduction to Graph And Search Algorithms.
Graph Representations And Traversals. Graphs Graph : – Set of Vertices (Nodes) – Set of Edges connecting vertices (u, v) : edge connecting Origin: u Destination:
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University Graphs Original Slides by Rada Mihalcea.
GRAPH ALGORITHM. Graph A pair G = (V,E) – V = set of vertices (node) – E = set of edges (pairs of vertices) V = (1,2,3,4,5,6,7) E = ( (1,2),(2,3),(3,5),(1,4),(4,5),(6,7)
Graph Theory Def: A graph is a set of vertices and edges G={V,E} Ex. V = {a,b,c,d,e} E = {ab,bd,ad,ed,ce,cd} Note: above is a purely mathematical definition.
Chap 7 Graph Def 1: Simple graph G=(V,E) V : nonempty set of vertices E : set of unordered pairs of distinct elements of V called edges Def 2: Multigraph.
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
Nattee Niparnan. Graph  A pair G = (V,E)  V = set of vertices (node)  E = set of edges (pairs of vertices)  V = (1,2,3,4,5,6,7)  E = ((1,2),(2,3),(3,5),(1,4),(4,
Subject Four Graphs Data Structures. What is a graph? A data structure that consists of a set of nodes (vertices) and a set of edges that relate the nodes.
Fundamental Graph Theory (Lecture 1) Lectured by Hung-Lin Fu 傅 恆 霖 Department of Applied Mathematics National Chiao Tung University.
1 فصل سوم سينماتيك مستقيم. 2 محتواي فصل   تعريف مجموعه فازي   تابع عضويت   نمايش مجموعه هاي فازي   برش آلفا   متغيرهاي زباني   ساخت مجموعه.
Basic Concepts Graphs For more notes and topics visit:
Matrix Representation of Graph
Can you draw this picture without lifting up your pen/pencil?
نمايش اعداد در کامپيوتر چهار عمل اصلي
Graphs, Trees and Algorithms 1
Chapter 9: Graphs Basic Concepts
What is a Graph? a b c d e V= {a,b,c,d,e} E= {(a,b),(a,c),(a,d),
Walks, Paths, and Circuits
Graph Theory By Amy C. and John M..
ساختمان داده ها گرافها.
Graph Theory in Circuit-1
Decision Maths Graphs.
Representing Graphs Wade Trappe.
Graphs G = (V, E) V are the vertices; E are the edges.
GRAPHS G=<V,E> Adjacent vertices Undirected graph
Graph Vocabulary.
Chapter 9: Graphs Basic Concepts
Presentation transcript:

گراف وحيدي پور

تعاريف مجموعه اي غير تهي از راس مجموعه اي از زوج راسها كه بوسيله يال بهمديگر متصل هستند. a b d e

انواع گراف گراف بدون جهت Undirected graph گراف جهت دار Directed graph گراف چند ياليMulti-graph گراف كاملComplete Graph گراف ساده Simple graph Undirected graph Directed graph isolated vertex adjacent loop G=(V,E)

تعاريف path: no vertex can be repeated a-b-c-d-e trail: no edge can be repeat a-b-c-d-e-b-d walk: no restriction a-b-d-a-b-c closed if x=y closed trail: circuit (a-b-c-d-b-e-d-a, one draw without lifting pen) closed path: cycle (a-b-c-d-a) length: number of edges in this (path,trail,walk) a b d e

a b c d e a b c d e b c d e a c d زير گراف

ADT گراف Object: A non-empty set of vertices and a set of undirected edges where each edge is pair of vertices. Graph(); // create an empty graph Insert-vertex(); Delete-vertex(); Insert-edge(); Delete-edge(); IsEmpty();

نمايش گراف ماتريس همجواري Adjacency Matrix ماتريس اتصال Incidence Matrix ليستهاي مجاورتي آرايه ليستهاي مجاورتي چند گانه...

ماتريس اتصال Incidence matrix –Label rows with vertices –Label columns with edges –1 if an edge is incident to a vertex, 0 otherwise efghj v11000 w10101 x00011 y01110

ماتريس همجواري  There is an N x N matrix, where |V| = N, the Adjacenct Matrix (NxN) A = [a ij ]  For undirected graph  For directed graph  This makes it easier to find subgraphs, and to reverse graphs if needed.

ماتريس همجواري - مثال Example: Undirected Graph G (V, E) vuw v011 u101 w110 u vw

بستار انتقالي حاصلضرب متوالي ماتريس همجواري

لستهاي مجاورتي Each node (vertex) has a list of which nodes (vertex) it is adjacent Example: undirectd graph G (V, E) u vw nodeAdjacency List uv, w vw, u wu, v

استفاده از آرايه گراف در آرايه اي بنام Node ذخيره مي شود. N نود گراف در ابتداي آرايه قرار مي گيرند شماره نودهاي متصل به نود iام در خانه هاي Node[Node(i)] تا Node[Node(i+1)] قرار دارد. اين آرايه چند خانه دارد؟

ليستهاي چند گانه مجاورتي

پيمايش گراف هدف ديدن تمامي نود هاست استفاده از ساختمان داده استك يا صف پيمايش يا جستجوي عمقي Depth-First-Search (DFS) پيمايش يا جستجوي سطحي Breadth-First-Search (BFS)

سوالات به كمك پيمايشها روشي بيابيد كه متصل بودن گراف را تشخيص دهد. گراف دو بخشي: چگونه دو بخشي بودن گراف را تشخيص دهيم.