1 / 17

CSCI 115

CSCI 115. Chapter 8 Topics in Graph Theory. CSCI 115. §8 .1 Graphs. §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)

levia
Download Presentation

CSCI 115

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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: v1, v2, …, vk and E: e1, e2, …, ek–1 s.t.: • γ(ei) = {vi, vi+1} i • ei ej  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+) • Un: The discrete graph on n vertices • The graph with n vertices and no edges • Kn: The complete graph on n vertices • The graph with n vertices, and an edge between every pair of vertices • Ln: The linear graph on n vertices • The graph with n vertices and edges {vi, vi+1}  i  {1, 2, …, n – 1}

  9. §8.1 – Graphs • Subgraphs • If G = (V, E, γ) and E1 E, V1 V s.t. V1 contains (at least) all of the end points of edges in E1, then H = (V1, E1, γ) is a subgraph of G • If G = (V, E, γ) and e  E, then Ge 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 GR 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 = {s0, s1, …, sn} is a set with n elements • A finite set I • xI,  fx:SS. • Let F = {fx | 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 • si is a state  si  S • I is the input set •  x  I, fx describes the effect the input x has on the state of the machine • State transition function • If the machine is in state si and the input x occurs, the next state is fx(si) • 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 RM as follows: • RM is a relation on S • si RMsjiff  x  I s.t. fx(si) = sj • Edges in the digraph of RM are labeled with all inputs that create that state transition • We will not be covering Moore Machines, Machine Congruences, or Quotient Machines

More Related