Hello everyone, I'm a newbie to this forum, actually, I'm pretty new to all this programming stuffs. I have a little homework problem and I need you helps so .. here it is:
The adjacency matrix for the graph is stored in an array named adjMatrix. The vertices are numbered from 0 to n-1. If an edge exists between vertex i and vertex j by calling edge(i,j). If it returns zero, no edge exists. If it returns something greater than zero then an undirected edge exists between i and j with the weight of the edge equal to the value returned. I need a pseudocode to figure out a way to calculate the degree of each vertex (how many edges are touch it). Then figure out if each degree is even or odd, and count how many even degree vertices and how many odd degree vertices there are. By the way, this is a weighted, undirected graph.
Can anyone give me some advice on how to get this started ?? Thanks alot