Saturday 15 May 2010

binary tree - implementation of algorithms and data structures -


I have applied several algorithms and data structures successfully. However, I'm not sure how I will implement a graph algorithm, Because I have to represent a graph, I am trying to apply algorithms and data structures with the introduction of Algorithm by Coren et. al. However, many algorithms take a graph as an input or they take a tree structure in the form of input, which you can not provide as text only. I do not know how DejaXtra, Belman-Ford, Floyd-Warshal, Cruscle etc. can be implemented. Can I represent a graph in the form of matrix, even if it is weighted or guided graph? Because I think I can use multi-dimensional arrays for the matrix I think 0 or 1 can indicate whether there is an edge or not, but I'm not really sure that any graph using the matrix Will represent how. And about a binary tree, if an algorithm takes in the form of an input?

Thanks in advance.

This is a very open question, depending on the type of operation you want to answer. is.

One way to represent simple graph is N x N Array, where each element represents the side. Obviously you only need one triangle and can either ignore the second half or Can make information look easier to duplicate.

For a large number of shorts with sports graphs, you have two links in the form of nodes so that it can be on two lists. The head of the list of associated edges together on each top will be prominent.

No comments:

Post a Comment