1. Trang chủ
  2. » Giáo án - Bài giảng

Graphs1.ppt

72 240 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 72
Dung lượng 0,97 MB

Nội dung

COMP 2210 Course Notes Slide 1 Auburn University Computer Science and Software Engineering Course Notes Set: Graphs 1 COMP 2210 Dr. Hendrix Computer Science and Software Engineering Auburn University COMP 2210 Course Notes Slide 2 Auburn University Computer Science and Software Engineering Acknowledgements Portions of these notes were adapted from those developed by Carrano and Savitch and Sartaj Sahni to accompany their texts. COMP 2210 Course Notes Slide 3 Auburn University Computer Science and Software Engineering Some Examples and Terminology • Vertices or nodes are connected by edges • A graph is a collection of distinct vertices and distinct edges – Edges can be directed or undirected – When it has directed edges it is called a digraph • A subgraph is a portion of a graph that itself is a graph COMP 2210 Course Notes Slide 4 Auburn University Computer Science and Software Engineering Road Maps A portion of a road map. Nodes Nodes Edges Edges COMP 2210 Course Notes Slide 5 Auburn University Computer Science and Software Engineering Road Maps A directed graph representing a portion of a city's street map. COMP 2210 Course Notes Slide 6 Auburn University Computer Science and Software Engineering Paths • A sequence of edges that connect two vertices in a graph • In a directed graph the direction of the edges must be considered – Called a directed path • A cycle is a path that begins and ends at same vertex – Simple path does not pass through any vertex more than once • A graph with no cycles is acyclic COMP 2210 Course Notes Slide 7 Auburn University Computer Science and Software Engineering Weights • A weighted graph has values on its edges – Weights or costs • A path in a weighted graph also has weight or cost – The sum of the edge weights • Examples of weights – Miles between nodes on a map – Driving time between nodes – Taxi cost between node locations COMP 2210 Course Notes Slide 8 Auburn University Computer Science and Software Engineering Weights A weighted graph. COMP 2210 Course Notes Slide 9 Auburn University Computer Science and Software Engineering Connected Graphs • A connected graph – Has a path between every pair of distinct vertices • A complete graph – Has an edge between every pair of distinct vertices • A disconnected graph – Not connected • A component – A connected subgraph COMP 2210 Course Notes Slide 10 Auburn University Computer Science and Software Engineering Connected Graphs Undirected graphs

Ngày đăng: 16/07/2014, 01:00

Xem thêm

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN