80 likes | 180 Views
12.3 Directed Graphs. A finite graph is a set of points, called nodes , connected by a set of lines, called edges . We can represent the graph in an adjacency matrix . If the nodes are connected, you place a 1 in the matrix. Ex:. TO: n 1 n 2 n 3 n 4. n 2. n 1. n 3. FROM:. n 4.
E N D
A finitegraph is a set of points, called nodes, connected by a set of lines, called edges. We can represent the graph in an adjacencymatrix. If the nodes are connected, you place a 1 in the matrix. Ex: • TO: • n1n2n3n4 • n2 • n1 • n3 FROM: • n4 A finite graph may need to include info about direction. We get a directedgraph. *Flights work this way. From Long Beach to Orlando on Jet Blue
Ex 1) Create the adjacency matrix. • TO: • C N S Chicago New York FROM: St. Louis What options do you have if you are making 2 flights? You would have the same matrix, but there would be two of them.
If we continued this, it would be a lot of multiplying. We can use our graphing calculators to speed things up! 2ndx–1 is MATRIX EDIT choose 1: [A] enter dimensions 3 × 3 Now enter each element. When done, go 2nd MODE to QUIT Calculate [A]2 MATRIX NAMES 1: [A] matches!
Ex 2) Suppose the nodes in the diagram represent people and the directed edges mean the first person knows the second person’s phone number. a) Interpret the diagram in a matrix. Betty Charles Al • 2nd person: • A B C D E F David Fred 1st person: Ellen
Ex 2) cont… In how many ways can a message get from Betty to Ellen in 3 or fewer calls? (*Use your calculator!) • A B C D E F • A B C D E F • A B C D E F No ways 2 ways 1 way so 3 different ways
Ex 2) cont… c) Is it possible to get a message from Fred to Charles? If yes, what is the minimum number of calls? • A B C D E F • A B C D E F 1 call No way 2 calls 1 way Yes, 2 calls minimum
Homework #1203 Pg 616 #1–5, 7, 9, 11, 15, 17–20, 22–32