#include<stdio.h> #include<conio.h> void main() { int i,j,r,count4,count,total,n; int m,a[55][55]; int flag=0; printf(" Enter the no of vertices "); scanf ("%d",&m); printf(" Enter the no of edges "); scanf ("%d",&n); printf ("enter the incident \n"); for (i=0;i<m;i++) { for(j=0;j<n;j++) { scanf("%d",&a[i][j]); } } for (i=0;i<m;++i) { for(j=i+1;j<n;++j) { for(r=0; r<n; ++r) { if(a[r][i] != a[r][j]) { break; } } if(r == n) { printf("col %d is same as col %d\n", i+1, j+1); flag=1; } } if (flag==1) printf (" \n parlle edge found "); else printf(" \n no prall edge found "); getch(); }
Thursday, 24 April 2014
Wap to check whether a Graph contains parallel edges or not using Incident matrix.
Subscribe to:
Post Comments (Atom)
No comments:
Write comments