
384 Data Structures Using C
The function delEdge () needs to modified for directed graphs so that it does not make the adja-
cency matrix as symmetric. The modified function is given below:
/* The modified function for deletion of edges of directed graphs */
void delEdge (char adjMat[7][7], char v1, char v2, int numV)
{ int i, j, k;
j = 0;
for (i = 1; i <= numV; i++)
{
if (adjMat[i][j] == v1)
{
for (k = 1; k <= numV; k++)
{
if (adjMat [i][k] == v2)
{
adjMat[i][k] = ‘0’;break;
}
}
}
}
}
8.4.3 Traversal of a Graph
Travelling a graph means that one visits the vertices of a graph at least once. The purpose of the travel
depends upon ...