1. Boris, Ben, Bob, Bess, Beth and Bill are waiting in a
doctor’s surgery. Looking around the room, each of them
sees that they know some of the other people in the room.
Ben knows five of the other people sitting in the room,
Bob knows four of the others,
Beth and Bill both know three of the others,
Bess knows two of the others and
Boris only knows one of the other people.
Who knows who in the waiting room?
3. Adjacency Matrix or List
• Matrix is fast and direct
• Quick for adding and deleting edges
• Not so good for adding and deleting
vertices
• Can be very ‘sparse’ and therefore
inefficient
4. Paths and Path problems
• From one vertex to another along edges
• Explorer’s problem
• Path that travels each edge once and returns
to starting point
• Traveller’s problem
• Path that visits each vertex only once before
returning to starting point.
5. Closed paths and cycles
• Closed Path or circuit:
Path that ends at the starting vertex
• Cycle
circuit for which each intermediate
vertex is different
• Tree
Undirected connected graph with no
cycles
6. Closed paths and cycles
• Closed Path or circuit:
Path that ends at the starting vertex
• Cycle
circuit for which each intermediate
vertex is different
• Tree
Undirected connected graph with no
cycles