ITEC 30 Flashcards
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
inks that connect the vertices .
Edges
Each node of the graph is represented as a vertex.
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
Adds a vertex to the graph.
Add Vertex
Adds an edge between the two vertices of the graph.
Add Edge
Displays a vertex of the graph.
Display Vertex
traverses a graph in a depth ward motion and uses a stack to remember to get the next vertex to start a search
DEPTH-FIRST TRAVERSAL
traverses a graph in a breadthward motion and uses a queue to remember to get the next vertex to start a search
Breadth First Traversal
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
tree data structure
raverses a tree in an in-order manner.
Inorder Traversal
Traverses a tree in a post-order manner.
Postorder Traversal
Path refers to the sequence of nodes along the edges of a tree.
Path
The node at the top of the tree is called root. There is only one root per tree and one path from the root node to any node.
Root
Any node except the root node has one edge upward to a node called parent.
Parent