Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 115 Chapter 8 Topics in Graph Theory. CSCI 115 §8.1 Graphs.

Similar presentations


Presentation on theme: "CSCI 115 Chapter 8 Topics in Graph Theory. CSCI 115 §8.1 Graphs."— Presentation transcript:

1 CSCI 115 Chapter 8 Topics in Graph Theory

2 CSCI 115 §8.1 Graphs

3 §8.1 – Graphs Graph –A graph G consists of a finite set of vertices V, a finite set of edges E, and a function γ that assigns a subset of vertices {v, w} to each edge (v may equal w) –If e is an edge, and γ(e) = {v, w} we say e is the edge between v & w, and that v & w are the endpoints of e

4 §8.1 – Graphs Terminology –Degree of a vertex Number of edges having that vertex as an endpoint –Loop Edge from a vertex to itself Contributes 2 to the degree of a vertex –Isolated vertex Vertex with degree 0 –Adjacent vertices Vertices that share an edge

5 §8.1 – Graphs Path –A path  in a graph G consists of a pair of sequences (V , E  ), V  : v 1, v 2, …, v k and E  : e 1, e 2, …, e k–1 s.t.: 1.γ(e i ) = {v i, v i+1 }  i 2.e i  e j  i, j

6 §8.1 – Graphs More terminology –Circuit Path that begins and ends at the same vertex –Simple path No vertex appears more than once (except possibly the first and last) –Simple circuit Simple path where first and last vertices are equal

7 §8.1 – Graphs Special types of graphs –Connected graph  path from every vertex to every other (different) vertex –Disconnected graph There are at least 2 vertices which do not have a path between them components –Regular Graph All vertices have the same degree

8 §8.1 – Graphs Special families of graphs (n  Z + ) –U n : The discrete graph on n vertices The graph with n vertices and no edges –K n : The complete graph on n vertices The graph with n vertices, and an edge between every pair of vertices –L n : The linear graph on n vertices The graph with n vertices and edges {v i, v i+1 }  i  {1, 2, …, n – 1}

9 §8.1 – Graphs Subgraphs –If G = (V, E, γ) and E 1  E, V 1  V s.t. V 1 contains (at least) all of the end points of edges in E 1, then H = (V 1, E 1, γ) is a subgraph of G –If G = (V, E, γ) and e  E, then G e is the subgraph found by deleting e from G and keeping all vertices

10 §8.1 – Graphs Quotient graphs –If G = (V, E, γ) and R is an equivalence relation on V, then G R is the quotient graph found by merging all vertices within the same equivalence classes.

11 CSCI 115 Chapter 10 Languages and Finite State Machines

12 CSCI 115 §10.3 Finite State Machines

13 §10.3 – Finite State Machines Machine –A machine is a system that accepts input, produces output, and has memory to keep track of previous inputs (which many be manipulated) State –A state is the complete internal condition of the machine (i.e. the memory) Affects reaction to subsequent I/O

14 §10.3 – Finite State Machines Finite State Machine (FSM) –A machine that has a finite number of states –Example: computer

15 §10.3 – Finite State Machines Assume we have the following: –S = {s 0, s 1, …, s n } is a set with n elements –A finite set I –  x  I,  f x :S  S. Let F = {f x | x  I} Then (S, I, F) is a finite state machine

16 §10.3 – Finite State Machines Given (S, I, F) is a FSM, we have the following: –S is the state set –s i is a state  s i  S –I is the input set –  x  I, f x describes the effect the input x has on the state of the machine State transition function –If the machine is in state s i and the input x occurs, the next state is f x (s i ) –State transition table – matrix showing the effects of the various inputs on the various states

17 §10.3 – Finite State Machines Relation arising from finite state machines –If M is the FSM (S, I, F) then define R M as follows: R M is a relation on S s i R M s j iff  x  I s.t. f x (s i ) = s j –Edges in the digraph of R M are labeled with all inputs that create that state transition –We will not be covering Moore Machines, Machine Congruences, or Quotient Machines


Download ppt "CSCI 115 Chapter 8 Topics in Graph Theory. CSCI 115 §8.1 Graphs."

Similar presentations


Ads by Google