Discrete Structures
Lecture Notes, 3 Dec 2010
Last Update: 3 December 2010
Note:
or
material is highlighted
|
Note: A username and password may be required to access certain
documents.
Please
contact
Bill Rapaport.
Index to all lecture notes
…Previous lecture
§8.2 (pp. 541–542) and §9.1: Graphs,
including Digraph Representation of Binary Relations
- Graphs:
- Defs:
- A vertex (or: a node) ≈def a geometric point
- An edge (or: an arc) ≈def a line connecting 2
vertices.
- Let V be a non-∅ set (of vertices).
Let E be a set of edges.
Then:
- G is a graph =def G = (V,E)
- i.e., a graph is an ordered pair consisting of
a set of
vertices and a set of edges
- ∴ a graph is just a certain kind of set
(in fact, a
binary
relation!)
- Let G=(V,E) be a graph.
Let v1,v2 ∈ V.
Let e ∈ E.
Then:
v1,v2 are e's endpoints
and e connects v1 and v2
e ≈ {v1,v2}
- Notes:
- It would be wrong to say "e={v1,v2}",
because, ∀v1,v2 ∈ V,
there can be ≥0 e ∈ E;
i.e., there can be more than one edge connecting any pair of vertices
-
More precisely:
V can be any set whatsoever.
E is typically a "bag" or "multiset"
(a set with duplicates)
of (unordered) pairs of members of V
- For more info on multisets, see:
- E.g.)
- V = {c | c is a computer on the Internet}
E = {e | e connects 2 computers on the Internet}
- i.e.)
the Internet with all the computers on it is
a graph
(or: it can be modeled as, or modeled by, a graph)
- Defs:
Let G=(V,E) be a graph.
Then:
- G is a di(rected) graph =def E ⊆ V×V
- i.e.) E is a (multi-)set of ordered pairs of
vertices
- e = (v1,v2) ∈ E
(e isdef a directed edge
e's initial vertex =def v1
e's terminal vertex =def v2)
-
e isdef a loop =def e = (v,v) ∈ E
- E.g.)
- Binary relations can be represented by (or "as") digraphs:
- Let R be a binary relation on set A
Let D be a digraph s.t. V = A ∧ E = R.
Then D represents R in the sense that
∃ 1–1
correspondence between D and R
- i.e.) (∀ proposition PR about R)
(∃ proposition PD about D)[PR ↔ PD]
- E.g.)
- Let R = {(1,1), (1,2), (1,3), (2,1), (2,2), (3,3)}
be a relation on
{1,2,3,4}.
- Represent each element of {1,2,3,4} as a vertex.
- Represent each ordered pair of R as a directed edge.
- Then the following graph is a representation of R:
- So is:
- So is:
- Digraph representations of the properties of binary relations:
- R is reflexive:
- ∀aR(a,a) ↔
(∀v∈V)(∃e)[e is a loop at v]
- i.e., every vertex has a loop
- R is symmetric:
- (∀a,b)[R(a,b) → R(b,a)] ↔
(∀v1 ≠ v2)(∀e=(v1,v2))∃e′[e′=(v2,v1)]
- i.e., every edge has an inverse edge
- R is anti-symmetric:
- (∀a,b)[(R(a,b) ∧ R(b,a)) → a=b]
↔
(∀v1,v2)[ (∃e1,e2)[e1=(v1,v2)
∧
e2=(v2,v1)]
- i.e., the only inverse "pairs" are loops
- R is transitive:
- (∀a,b,c)[(R(a,b) ∧ R(b,c)) → R(a,c)]
↔
(∀v1,v2,v3)[((∃e1=(v1,v2))
∧
(∃e2=(v2,v3)))
→
- i.e., every sequence of 2 edges has a shortcut
Next lecture…
Text copyright © 2010 by William J. Rapaport
(rapaport@buffalo.edu)
Cartoon links and screen-captures appear here for your enjoyment.
They are not meant to infringe on any copyrights held by the creators.
For more information on any cartoon, click on it, or contact me.
http://www.cse.buffalo.edu/~rapaport/191/F10/lecturenotes-20101203.html-20101203