Directed and Undirected Connections
A directed edge describes a permitted move in one direction. An undirected edge relates its endpoints in both directions.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace two arrows
A follows B and B follows C. That gives a route from A to C through B when following the arrows. It says nothing about a route from C to A. Binary relations naturally preserve the order of those pairs.
Encode reciprocity explicitly
An undirected friendship edge can appear in both endpoints' neighbor lists. For a directed follow graph, reciprocal following needs two separate edges. Reversing a relation can provide the followers list without changing the original meaning.[1]
Read one arrow as one permission to move
A network with directed edges A to B and B to C lets A reach C in two steps. C has no outgoing edge and cannot reach A. Replacing each edge by an undirected connection adds a route in the reverse direction. See reachable vertices.
Directed from A: A → B → C
Directed from C: stop at C
Undirected from C: C – B – A
Verify the conversion with a reverse-only query
A matrix stores a directed edge at row source and column destination. An undirected representation commonly mirrors it. Test queries for the forward edge, reverse edge and a disconnected pair. Choose the direction from source data, such as the direction a prerequisite must come before a task.