Showing posts with label GRAPH. Show all posts
Showing posts with label GRAPH. Show all posts

INTRODUCTION TO GRAPH

Defination of Graph:

It consist of different points called nodes or vertex which are connected to each other lines called edges.

¤ graph is a set of nodes and vertexes.

¤ graph is denoted by G={ V, E}
where V denotes set of vertexes and E denotes set of edges.

¤ graph is non linear data structure where linked list , array , stack and queue are linear data structure.


¤ graph is widely used for different purposes i.e it has lot of applications.

¤ graph is used when there is a relation ship between pair of data items or elements.

¤Types:
2 types of graph=>

1) directed graph
2) undirected graph

explanation:

¤ directed graph: graph in which each edge assign a direction.
eg=>

¤ undirected graph: graph in which there is no direction assign to each edge.
eg=>

¤Basic definations related to graph.

A) degree of vertex: number of edges incident on that vertex.

Types of degree:

INTRODUCTION ABOUT DATA STSUCTURE

//DEFINATION:

=>DATA STRUCTURE:- is a collection of data elements organised in a specific manner and accessing functions are defined to store and retrieve individual data elements. 

*sometimes data structures are also called data types.

=>ANOTHER DEFINATION:-the mathematical or logical model of particular organization of data is called data structure.

=>DIFFERENT TYPES OF DATA STRUCTURES:

1) Array