Compsci201_Recitation13

advertisement
Recitation 13
Professor Peck
April 18, 2014
Graph APTs
• Complete the form: http://goo.gl/vHUa4O
• the last character is an oh
Circuits
• Discuss a solution to the Circuits APT in terms
of a high-level description of using DFS to
keep track of the weight of the path being
followed in the DFS. Since the graph is acyclic
you don't need a visited set.
Circuits
Questions 1-3
• Consider a modified DFS method as shown
below:
Galaxy Trip
Questions 4-7
Galaxy Trip
Questions 8-10
• To find the size of a connected component (the
number of machines that depend on each other
starting from a specific machine), you can do a
DFS or BFS.
Galaxy Trip
Questions 11-12
• This code finds all possible values that can be
created by adding together elements of sizes.
Make sure you understand how this code
works by summing elements
of sizes together.
Submit
• Submit whatever you have finished BEFORE
you leave today!
• Please complete the following feedback form
for your Recitation TAs
• http://goo.gl/5HzEH0 (the last char is a zero)
• Complete the form for EACH TA
• Happy Last Recitation!
• Have a great weekend!
Download