Showing posts with label Unit 5 - Data Structures. Show all posts
Showing posts with label Unit 5 - Data Structures. Show all posts

Tuesday, November 18, 2014

Unit 5 - Data Structures

1.Explain the various representation of graph with example in detail? 

. Adjacency matrix
• Figure
• Explanation
• Table
. Adjacency list
• Figure
• Explanation
• Table

2. Define topological sort? Explain with an example? 
. Definition
. Explanation
. Example
. Table
. Coding

3. Explain Dijkstra's algorithm with an example? 
. Explanation
. Example
. Graph
. Table
. Coding

4.Explain Prim's algorithm with an example? 
. Explanation
. Example
. Graph
. Table
. Coding

5. Explain Krushal's algorithm with an example? 
. Explanation
. Example
. Graph
. Table
. Coding 

Monday, November 17, 2014

Unit 5 - Data Structures

1.What is a simple path? 

A path in a diagram in which the edges are distinct is called a simple path. It is also called as edge simple.

2. What is a cycle or a circuit? 
A path which originates and ends in the same node is called a cycle or circuit.

3. What is an acyclic graph? 
A simple diagram which does not have any cycles is called an acyclic graph.

4. What is meant by strongly connected in a graph? 
An undirected graph is connected, if there is a path from every vertex to every other vertex. A directed graph with this property is called strongly connected.

5. When is a graph said to be weakly connected? 
When a directed graph is not strongly connected but the underlying graph is connected, then the graph is said to be weakly connected.

Sunday, November 16, 2014

Unit 5 - Data Structures


1.Define Graph? 

A graph G consist of a nonempty set V which is a set of nodes of the graph, a set E which is the set of edges of the graph, and a mapping from the set for edge E to a set of pairs of elements of V. It can also be represented as G=(V, E).

2. Define adjacent nodes? 
Any two nodes which are connected by an edge in a graph are called adjacent nodes. For example, if and edge xÎE is associated with a pair of nodes (u,v) where u, v . V, then we say that the edge x connects the nodes u and v.

3. What is a directed graph? 
A graph in which every edge is directed is called a directed graph.

4. What is a undirected graph? 
A graph in which every edge is undirected is called a directed graph.

5. What is a loop? 
An edge of a graph which connects to itself is called a loop or sling.