Graphs, Lecture Notes - Computer Science, Study notes of Discrete Structures and Graph Theory

Prof. Zeph Grunschlag, Computer Science, Graphs, isomorphism, Adjacency matrices, Graphs Basics, Types of Graphs, Bitrate, Trees, adjacency, incidence, Columbia, Lecture Notes

Typology: Study notes

2010/2011

Uploaded on 11/05/2011

yorket
yorket 🇺🇸

4.4

(38)

276 documents

1 / 93

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Graphs
Zeph Grunschlag
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d

Partial preview of the text

Download Graphs, Lecture Notes - Computer Science and more Study notes Discrete Structures and Graph Theory in PDF only on Docsity!

Graphs

Zeph Grunschlag

Agenda – Graphs

Graph basics and definitions  Vertices/nodes, edges, adjacency, incidence  Degree, in-degree, out-degree  Degree, in-degree, out-degree  Subgraphs, unions, isomorphism  Adjacency matrices Types of Graphs  Trees  Undirected graphs  Simple graphs, Multigraphs, Pseudographs  Digraphs, Directed multigraph  Bipartite  Complete graphs, cycles, wheels, cubes, complete bipartite

Graphs – Intuitive Notion

A graph is a bunch of vertices (or nodes) represented by circles which are connected by edges, represented by line segments. Mathematically, graphs are binary-relations on their vertex set (except for multigraphs). In Data Structures one often starts with trees and generalizes to graphs. In this course, opposite approach: We start with graphs and restrict to get trees.

Trees

A very important type of graph in CS is

called a tree:

Real

Tree

Trees

A very important type of graph in CS is

called a tree:

Real

Tree transformation

Trees

A very important type of graph in CS is

called a tree:

Real Abstract

Tree transformation Tree

Simple Graphs

Vertices are labeled to associate with particular computers

Each edge can be viewed as the set of its two endpoints

1 2

3 4

{1,2}

{3,4}

{1,3} {2,3} {2,4}

{1,4}

Simple Graphs

DEF: A simple graph G = (V,E )

consists of a non-empty set V of

vertices (or nodes ) and a set E

(possibly empty) of edges where each

edge is a subset of V with cardinality 2

(an unordered pair).

Q: For a set V with n elements, how

many possible edges there?

Simple Graphs

A: The number of subsets in the set of

possible edges. There are n · (n -1) / 2

possible edges, therefore the number of

graphs on V is 2^ n(n -1)/

Multigraphs

If computers are connected via internet instead of directly, there may be several routes to choose from for each connection. Depending on traffic, one route could be better than another. Makes sense to allow multiple edges, but still no self-loops:

Multigraphs

DEF: A multigraph G = (V,E,f ) consists

of a non-empty set V of vertices (or

nodes ), a set E (possibly empty) of

edges and a function f with domain E

and codomain the set of pairs in V.

Pseudographs

If self-loops are allowed we get a pseudograph:

Now edges may be associated with a single vertex, when the edge is a loop

e 1  {1,2}, e 2  {1,2}, e 3  {1,3},

e 4  {2,3}, e 5  {2}, e 6  {2}, e 7  {4}

1 2

3 4

e 1

e 3

e 2

e 4 e^5

e 6

e 7

Undirected Graphs

Terminology

Vertices are adjacent if they are the

endpoints of the same edge.

Q: Which vertices are adjacent to 1? How about adjacent to 2, 3, and 4?

1 2

3 4

e 1

e 3

e 2

e 4 e 5

e 6

Undirected Graphs

Terminology

A: 1 is adjacent to 2 and 3

2 is adjacent to 1 and 3 3 is adjacent to 1 and 2 4 is not adjacent to any vertex

1 2

3 4

e 1

e 3

e 2

e 4 e 5

e 6