Algorithms
CPSC 4115
Section 01
Syllabus
Calendar
Graphs Exercises
Graph Traversals
For each graph, list the vertices in the order that the respective search will visit them (starting with vertex A):
Breadth-first search
Depth-first search
Graph 1:
Digraph 1:
Graph 2:
For Graph 1 and Digraph 1 (above), list the vertices in the order that the respective search will visit them (starting with vertex
H
):
Breadth-first search
Depth-first search
Write pseudo code for each of the searches below:
Breadth-first search
Depth-first search
Algorithm Efficiency
What are the following Big Os?
Search
Adjacency List
Adjacency Matrix
Breadth-first
Depth-first
Topological Sorting
Assume that you are getting ready for a date. Given the list of activities below, determine an ordering to accomplish all of the tasks:
Possible graph
Activity
Buy flowers
Dinner
Dress & groom
Make dinner reservations
Pick-up date
Select activity
Given the following digraph, produce a topological order:
Describe three algorithms to determine a topological order:
For each of the above algorithms, what is the Θ:
Θ( )
Θ( )
Θ( )
Last Modified: