itec33 Flashcards
is a pictorial representation of a set of objects where some pairs of objects are connected by links.
graph
The interconnected objects are represented by points
vertices
links that connected the vertices
edges
Each node of the graph is represented as ___
vertex
represents a path between two vertices or a line between two vertices
edge
Two node or vertices are adjacent if they are connected to each other through an edge.
adjacency
represents a sequence of edges between the two vertices.
path
basic primary operations of a graph
add vertex
add edge
display vertex
algorithm traverses a graph in a depthward motion and uses a stack to remember to get the next vertex to start a search, when a dead end occurs in any iteration.
depth first traversal (dfs)
algorithm traverses a graph in a breadthward motion and uses a queue to remember to get the next vertex to start a search, when a dead end occurs in any iteration.
breadth first traversal (bfs)
represents the nodes connected by edges.
tree
can be defined recursively as a collection of nodes (starting at a root node), where each node is a data structure consisting of
a value, together with a list of references to nodes (the “children”), with the constraints that
no reference is duplicated, and none points to the root.
tree data structure
refers to the sequence of nodes along the edges of a tree.
path
The node at the top of the tree
root
Any node except the root node has one edge upward to a node called parent.
parent