Graph theory Flashcards
(47 cards)
What is the fundamental characteristic of non-linear structures?
Their data doesn’t follow an obvious numerical order.
What is a tree defined by?
A root node that may connect to other nodes, stemming from one specific place.
What is a binary search tree?
A tree that can only ever have two links to two nodes at any given time.
How do trees differ from graphs in terms of node connections?
Trees can only flow in one direction and have one-way connections.
What is a key characteristic of graphs compared to trees?
Graphs do not have a concept of a ‘root’ node.
What is a singleton graph?
A graph with just one node.
What are the two types of graphs commonly recognized?
- Directed graphs
- Undirected graphs
What do edges in a graph represent?
Connections between nodes.
What are the two types of edges in graphs?
- Directed edges
- Undirected edges
What defines a directed edge?
It allows travel in only one specific direction between two nodes.
How do undirected edges differ from directed edges?
Undirected edges allow travel in both directions.
What is the mathematical representation of a graph?
G = (V, E)
What do V and E represent in the context of a graph?
- V: set of vertices
- E: set of edges
Why is the set of vertices unordered in a graph?
There is no hierarchy of nodes in a graph.
What form do edge objects take in an undirected graph?
They are unordered pairs.
True or False: A tree can have loops or cyclical links.
False
id ==
the identity function
What is the domain of f: A -> B?
D(f) = A
What is the image of f: A -> B?
I(f) = B
What does f|A mean?
the function f restricted to set A (subset of domain D(f))
Suppose functions f and g where the image of g is in the domain of f. What is the concatenation f o g?
(fog)(x) = f(g(x))
When is the union of a function f and g defined?
if f and g agree where their domains overlap, thus mathematically:
if for all x in the intersection of D(f) and D(g), it holds that f(x) = g(x).
How do we denote the set of all sequences over an alphabet SIGMA?
SIGMA*
How do we denote the empty sequence?
epsilon