Skip to content

Commit a2ac435

Browse files
committed
Updated lecture 12B material.
Also fixed a broken link in 12A.
1 parent 2696871 commit a2ac435

File tree

3 files changed

+19
-27
lines changed

3 files changed

+19
-27
lines changed

files/Lec18_Maps.pdf

343 KB
Binary file not shown.

notes/week12/class12A.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Today we will be working on understanding and exploring the Depth-first algorith
66
<iframe src="../../Lec17_StateSpace.pdf" width="100%" height="600px" frameBorder="0"> </iframe>
77
</div>
88

9-
[Download the Slides from today](https://github.com/ubc-cs/cpsc203/raw/main/files/Lec18_StateSpaces.pdf)
9+
[Download the Slides from today](https://github.com/ubc-cs/cpsc203/raw/main/files/Lec17_StateSpaces.pdf)
1010

1111
## Topics for today's lecture
1212

notes/week12/class12B.md

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,33 @@
11
# Class Meeting 12B
22

3-
Today we will be try to find the shortest path through some graphs.
3+
Today we will finish off our discussion of depth first search to solve Sudoku puzzles. Then we will talk about shortest path search using Dijkstra's algorithm and priority queues.
44

55
<div>
66
<iframe src="../../Lec18_Maps.pdf" width="100%" height="600px" frameBorder="0"> </iframe>
77
</div>
88

99
[Download the Slides from today](https://github.com/ubc-cs/cpsc203/raw/main/files/Lec18_Maps.pdf)
1010

11-
## Important links for today:
11+
## Topics for today's lecture
1212

13-
- [Solving Dijkstra's Algorithm](https://algo-dijkstra.vercel.app/index.html)
14-
- [Dijkstra's Algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm)
15-
- [Graphical explanation of Dijkstra's algorithm](https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-greedy-algo-7/)
16-
- [Another graphical explanation of Dijkstra's algorithm](https://www.freecodecamp.org/news/dijkstras-shortest-path-algorithm-visual-introduction/)
13+
- TBA
1714

18-
<!--
19-
## Optional links for today
20-
-->
15+
## Links for today
16+
17+
- [Dijkstra's Algorithm](https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm).
18+
- [Graphical explanation of Dijkstra's algorithm](https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-greedy-algo-7/).
19+
- [Another graphical explanation of Dijkstra's algorithm](https://www.freecodecamp.org/news/dijkstras-shortest-path-algorithm-visual-introduction/).
20+
- [Build your own grid and run Dijkstra's algorithm](https://algo-dijkstra.vercel.app/index.html)
21+
- Python's [`heapq` module](https://docs.python.org/3/library/heapq.html) provides an implementation of a priority queue.
22+
- There is also the `PriorityQueue` in the [`queue` module](https://docs.python.org/3/library/queue.html), but that is unnecessarily fancy for our simple Dijkstra's algorithm. (It allows multiple threads to access the queue at once, which is necessary for parallel programming but not for our single threaded serial program.)
23+
- [Tutorial implementing Dijkstra's algorithm using `heapq`](https://www.datacamp.com/tutorial/dijkstra-algorithm-in-python). Because there is no way to remove or update an entry in `heapq`, we may end up removing a node from the queue multiple times; however, that is okay since the first removal will represent the minimum distance / shortest path so subsequent removals can be ignored.
24+
- Mapping
25+
- [Video Intro to Geographic Information Systems (GIS) and Python mapping modules](https://www.youtube.com/watch?v=wsSEKm-rU6U).
26+
- [OpenStreetMap (OSM)](https://www.openstreetmap.org/) and [an explanation of OSM](https://en.wikipedia.org/wiki/OpenStreetMap).
27+
- Python package [OSMnx](https://osmnx.readthedocs.io/en/stable/) for accessing OSM data.
28+
- [Lots of OSMnx examples](https://github.com/gboeing/osmnx-examples/tree/master/notebooks).
29+
- [An OSMnx Tutorial](https://gist.github.com/psychemedia/b49c49da365666ba9199d2e27d002d07).
2130

2231
## Logistics
2332

2433
There is no repo to clone today!
25-
<!--
26-
1. Clone the Class Activity Repository
27-
28-
You will first need to "accept" the GitHub Classroom assignment to get a copy of the starter code.
29-
30-
You can do that by [clicking here](https://classroom.github.com/a/ZEaSSumI).
31-
32-
Then, clone the `classActivity1XY` repository by running the following line in your Terminal:
33-
34-
```
35-
git clone <your_clone_url>
36-
```
37-
-->
38-
39-
## Acknowledgements
40-
41-
Slides for {{ COURSE_CODE }} were developed and created by [Dr. Cinda Heeren](https://www.cs.ubc.ca/people/cinda-heeren). The current iteration of the course resulted in minor adaptations and updates, but by in large, full credit of these slides belongs to Dr. Cinda Heeren.

0 commit comments

Comments
 (0)