lecture21-dfas.pdf - CSE 311 Foundations of Computing Lecture 21 Directed Graphs Finite State Machines Last Class Relations Composition Let A and B be

lecture21-dfas.pdf - CSE 311 Foundations of Computing...

This preview shows page 1 - 10 out of 39 pages.

CSE 311: Foundations of Computing Lecture 21: Directed Graphs & Finite State Machines
Image of page 1

Subscribe to view the full document.

Last Class: Relations & Composition Let A and B be sets, A binary relation from A to B is a subset of A ´ B Let A be a set, A binary relation on A is a subset of A ´ A The composition of relation ࠵? and ࠵? , ࠵? ∘ ࠵? is the relation defined by: ࠵? ∘ ࠵? = { (a, c) | $ b such that (a,b) Î ࠵? and (b,c) Î ࠵? }
Image of page 2
Last Class: Powers of a Relation ࠵? ࠵? = { ࠵?, ࠵? ∣ ࠵? ∈ ࠵?} “the equality relation on ࠵? ࠵? ࠵?.࠵? = ࠵? ࠵? ∘ ࠵? for ࠵? ≥ ࠵?
Image of page 3

Subscribe to view the full document.

Last Class: Directed Graphs G = (V, E) V – vertices E – edges, ordered pairs of vertices
Image of page 4
Last Class: Representation of Relations Directed Graph Representation (Digraph) {(a, b), (a, a), (b, a), (c, a), (c, d), (c, e) (d, e) } d e b c a
Image of page 5

Subscribe to view the full document.

Last Class: Relational Composition using Digraphs If ࠵? = ࠵?, ࠵? , ࠵?, ࠵? , ࠵?, ࠵? and ࠵? = { ࠵?, ࠵? , ࠵?, ࠵? , ࠵?, ࠵? } Compute ࠵? ∘ ࠵? 1 3 2 1 3 2
Image of page 6
Relational Composition using Digraphs If ࠵? = ࠵?, ࠵? , ࠵?, ࠵? , ࠵?, ࠵? and ࠵? = { ࠵?, ࠵? , ࠵?, ࠵? , ࠵?, ࠵? } Compute ࠵? ∘ ࠵? 1 3 2 1 3 2 ࠵?, ࠵? ∈ ࠵? 6 iff ∃࠵? ( ࠵?, ࠵? ∈ ࠵? ⋀ (࠵?, ࠵?) ∈ ࠵?) iff ∃࠵? such that a, b, c is a path
Image of page 7

Subscribe to view the full document.

Paths in Relations and Graphs Let ࠵? be a relation on a set ࠵? . There is a path of length ࠵? from a to b in the digraph for ࠵? if and only if ( a,b ) Î ࠵? ࠵? Defn: The length of a path in a graph is the number of edges in it (counting repetitions if edge used > once).
Image of page 8
Connectivity In Graphs Let ࠵? be a relation on a set ࠵? . The connectivity relation ࠵? consists of the pairs ( ࠵? , ࠵? ) such that there is a path from ࠵? to ࠵? in ࠵? . Note: Rosen text uses the wrong definition of this quantity. What the text defines (ignoring k=0) is usually called R + Defn: Two vertices in a graph are connected iff there is a path between them.
Image of page 9

Subscribe to view the full document.

Image of page 10
  • Spring '16

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes