10.09.2013 Views

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

1. Advanced Data Structure using C++

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LECTURE NOTES OF ADVANCED DATA STRUCTURE (MT-CSE 110)<br />

A sequence of vertices a1, ... ,an where (ai,ai+1)∈E(G) is called a walk. We say<br />

that the walk connects a1 and an.<br />

If the walk does not intersect itself we call the walk a path. Note that if there is<br />

a walk from a1 to an then there is also a path from a1 to an.<br />

A closed path a1, ... ,an, a1 is called a cycle (circuit).<br />

The length of a path is the number of edges it contains.<br />

The distance between two vertices is the length of the shortest path between<br />

them.<br />

A graph G is connected if there is a path between any pair of vertices.<br />

The diameter of a graph is the longest distance between any pair of vertices.<br />

A graph T is a tree if it is connected and has no cycles.<br />

If G is a graph, and G' is another graph with V(G) ⊇ V(G') and E(G) ⊇ E(G') we<br />

call G' a subgraph of G.<br />

If G' is a subgraph of G and V(G') = V(G) we call G' a spanning subgraph of G. If G'<br />

is a tree, it is called a spanning tree of G.<br />

A matching in a graph G is a set of edges such that no two share a vertex.<br />

A matching in a graph G is a perfect matching if every vertex of the graph<br />

belongs to an edge in the matching.<br />

A graph G is Hamiltonian if it has a path (cycle) that contains all vertices.<br />

A graph G is Eulerian if it has a walk (closed walk) that contains each edge<br />

exactly once.<br />

Prepared By :­<br />

Er. Harvinder Singh<br />

Assist Prof., CSE, H.C.T.M (Kaithal) Page ‐ 74 ‐

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!