V 1

Preview:

DESCRIPTION

V 1. V 2. No edges between vertices in V 1 or V 2 This is a bipartite graph but not a complete bipartite graph ( so it is NOT K 6, 4 ). b. a. c. g. f. e. d. {a, b, d }, {c, e, f, g} K 3, 4. How many vertices and edges in K m, n ?. If a is in V1, then, b, d, e must be in V2 (why?) - PowerPoint PPT Presentation

Citation preview

V1 V2

No edges between vertices in V1 or V2

This is a bipartite graph but not a complete bipartite graph ( so it is NOT K6, 4 ).

e

f

g

a bc

d{a, b, d }, {c, e, f, g}

K3, 4

How many vertices and edges in Km, n?

If a is in V1, then, b, d, e must be in V2 (why?)

Then, c is in V1 and there is no inconsistency.

So we can rearrange the graph as follows:

Theorem: A simple graph is bipartite if and only if it is possible to assign one of two different colors to each vertex of the graph so that no two adjacent vertices are assigned the same color.

a

f

e

b

c

d

Is a bipartite graph?

aa

f

e

b

c

d

a

f

e

d

c

b

Is a bipartite graph?

a

f

e

d

c

b

a

f

e

d

c

b

Not a bipartite graph

Application: Job AssignmentsSuppose that there are m employees in a group and j different jobs that need to be done, where m ≤ j.

Each employee is trained to do one or more these jobs.

Use a bipartite graph to model employee capabilities.

Testing Implementation Architecture Requirements

John Mary Helen Brad

Matching

A subset of edges such that no two edges are incident with the same vertex.

A matching

Not a matching

Maximal matching is a matching with the largest number of edges.

Maximal matchingNot a maximal matching

Testing Implementation Architecture Requirements

John Mary Helen Brad

Job assignment:

To assign jobs to employees so that the largest number of employees are assigned jobs, we seek a maximum matching in the graph that model employee capabilities.

9.3 Representing Graphs

Vertex Adjacent Vertices------------------------------------------------u1 u2, u5u2 u1, u3, u4u3 u2, u4u4 u2, u3, u5u5 u1, u2, u4

Adjacency list

Adjacency Matrix

Order the vertices in some way

V1, V2, …., Vn , the adjacency matrix is an n-by-n matrix

Vertices

Edges

Recommended