Week 13 notes

Comp 163-002, Spring 2020, MWF, 12:35-1:25, no fixed abode

Week 13 starts Wednesday, April 15.

The primary goal of this course is to become familiar with some of the basic mathematical ideas used in programming.


Homework 9:

Levin p 255: #10abc, #13: Find all spanning trees only.

Levin p 265 #1

Levin p 274 #3

Levin p 280 #3


Levin p 248: Prop 4.2.1: A graph is a tree if and only iff all paths are unique

Proposition 4.2.3: If a tree has at least two vertices, it has at least two vertices of degree 1.

Proof: induction on the length of the longest possible path.

Proposition 4.2.4: In a tree, e = v-1. (Remember that trees are connected.)

Rooted trees

A tree is rooted if one vertex is picked out, called the root. This gives us a reference point by which to reach every other vertex. The depth of a vertex is the distance (number of edges) along the path from that node to the root, or vice-versa.

parent/child relationships

Drawing rooted trees by level: Do this for example 4.2.5, with f as root, and also with e.

Depth-first search vs breadth-first search

Spanning Trees

Very important in computer networks!

Friday

Planar graphs

Concept of faces in a graph

Euler's Formula for Planar Graphs, p 259 (also works for polyhedra, which are, as graphs, planar; see p 262)

Theorem 4.3.1: K5 is not planar.

Theorem 4.3.2: K3,3 is not planar.

Planar graphs can be drawn on the surface of a sphere, and vice-versa.