Download presentation
Presentation is loading. Please wait.
1
Topological Sorting
2
Notes: The final exam will be on Wednesday, May 5th All grades (excluding the grades for the Final Exam) will be published on Friday, April 30 You can request revisions of these grades until the day before the final exam Starting on May 5th you can only request revisions for the final exam (once the results are posted) I’ll have office hours on Monday 3rd and Tuesday 4th from10:30AM-11:30AM
3
Reminder: Digraph, DAG A digraph is a graph in which the edges have directions What does it means for representations with: Adjacency matrix? Adjacency lists? A DAG is a digraph that has no cycles Examples
4
Problem For getting a degree in Magika Arcana, young apprentices must take 5 courses: elementals, conjuration, necromancy, alchemy and summoning. Apprentices can take one course per semester, and courses have the following pre-requisites: elementals and alchemy have no prerequisites conjuration requires elementals and alchemy Summoning requires conjuration Necromancy requires summoning and conjuration Assuming that apprentices can only take one course per semester, in what order should they take the courses?
5
Other Related Problems
Scheduling Planning Configuration
6
Solution # 1: Using DFS
7
Solution # 2: Using The Source
8
Homework (Optional) 5.3: 1 (for left digraph only), 2.b, 3.a, 5 (for right digraph only), 6, 10 (no pseudocode)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.