Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Graph Theory: Understanding Graphs, Minimum Spanning Trees, and Graph Coloring, Exercises of Discrete Mathematics

An introduction to graph theory, explaining the concept of graphs as an ordered pair of vertices and edges, variations such as directed and weighted graphs, and applications like minimum spanning trees and graph coloring. The document also includes Kruskal's algorithm for finding minimum spanning trees and an explanation of graph coloring and its application in lecture scheduling.

Typology: Exercises

2019/2020

Uploaded on 09/22/2020

ankit-singh-37
ankit-singh-37 🇮🇳

2 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Modelling using
network graph
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Graph Theory: Understanding Graphs, Minimum Spanning Trees, and Graph Coloring and more Exercises Discrete Mathematics in PDF only on Docsity!

Modelling using

network graph

2

What is a Graph?

 (^) Graph G = (V,E) ( simple, Undirected)

 (^) Set V of vertices ( nodes ): A non-empty finite set

 (^) Set E of edges: EV (^2) , 2-element subsets of V.

 (^) Elements of E are unordered pairs {v,w} where v,w 

V.

 (^) So a graph is an ordered pair of two sets V and E, such

that EV^2.

 (^) Variations: Directed graph, ( EVV)

 (^) Weighted graph

 (^) W: ER, c: V R

4

Undirected

Graphs — Weighted graphs

Vertices (aka nodes)

Edges

Weights

5

Directed Graph (digraph)

Vertices (aka nodes)

Edges

Input: A weighted connnected graph.

Idea: Maintain an acyclic subgraph H, enlarging it by edges with low

weight to form a spanning tree. Consider edges in non-decreasing order of

weight, breaking ties arbitrarily.

Initialization: Set E(H) = ∅

Iteration: If the next cheapest edge joins two components of H, then

include it; otherwise, discard it. Terminate when H is connected.

Output : A minimum spanning tree H of G.

Kruskal’s Algorithm to find MST

INITIAL ITERATION

FINAL ITERATION

10

MST Applications

Electrical

wiring

of a house

using

minimum

amount of

wires

(cables)

power outlet

or light

11

MST Applications

13

Graph

Representation

14

Minimum

Spanning

Tree

for

electrical

eiring

Each subject is marked as a node and there

is a edge between all those subjects(nodes)

which clash with each other.

The coloring of the graph obtained above

give us time-tabeling as each color

represents a time slot.

Application of graph coloring in lecture scheduling

Dijkstra’s shortest path algorithm

Given a graph and a source vertex in the graph, find shortest

paths from source to all vertices in the given graph.This problem

is called shortest path problem

Assumption: All edge weights are non-negative.

Working:

Maintain a set S of vertices whose final shortest-path weights from

the source s have already been determined.

Repeatedly select the vertex u ϵ V−S with the minimum

shortest-path estimate.

Add u to S, and relaxes all edges leaving u.

19

Computer Network

Problem :

 How to find a path from the source router to

destination router so that the message takes

least time?

Solution -Shortest path problem

20

Automation of mechanical drilling

 (^) A drilling head drills several, say n, holes in a plate ( Spare

parts of automobiles0.

 The drilling head moves from one point to another and drills

holes.

 (^) How to minimize the head movement time so that

productivity increases?

 (^) Model: G=(V,E), V= the n holes. E= ij, for every hole i to

every hole j. W(ij)=actual distance travel by the drilling head.

 Solution: TSP- find an ordering of vertices, a tour, having

minimum cost.