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...

• Notes
• 39

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

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

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) Î ࠵? }
Last Class: Powers of a Relation ࠵? ࠵? = { ࠵?, ࠵? ∣ ࠵? ∈ ࠵?} “the equality relation on ࠵? ࠵? ࠵?.࠵? = ࠵? ࠵? ∘ ࠵? for ࠵? ≥ ࠵?

Subscribe to view the full document.

Last Class: Directed Graphs G = (V, E) V – vertices E – edges, ordered pairs of vertices
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

Subscribe to view the full document.

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

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).
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.

Subscribe to view the full document.

• Spring '16

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

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