Finding the shortest path in a network is not always the fewest nodes that need to be travelled through to a given destination. This is only applicable to an unweighted graph. For a weighted graph, the shortest path between two nodes is the least total of weight that exists between these nodes. The weights attributed to the edges of these graphs are numerical in nature and positive figures. Negative weights will prevent the determination of a minimal path. A weighted graph is viewed as a labeled graph due to the numbers assigned to each edge.
In mathematics, a weight is used to express a set of multiplicative constants allocated in front of terms in an edge of a tree. For example, the weight of a graph at a point [n] is the maximum number of edges in a given branch [n]. The weights of a graph are computed and analysed in light of the problem investigated. Weighted graphs are believed to be present in different graph scenarios such as shortest path, centrality and travelling salesman problems.
The weight of a graph assigns value to either the node or the relationship between nodes. These values determine the shortest path or most central node in a given network. The nature or type of weight is more relevant in the type of network. For example, a weight type flow may be more applicable to traffic in a computer network, fluids in a water pipe, currents in an electrical circuit or demand movements. We will look into the flow network as it pertains to weight in the subsequent section.Continue reading