100 likes | 748 Views
Dijkstra's algorithm. For a given source vertex (node) in the graph, the algorithm finds the path with lowest cost (i.e. the shortest path) between that vertex and every other vertex.
E N D
Dijkstra's algorithm For a given source vertex (node) in the graph, the algorithm finds the path with lowest cost (i.e. the shortest path) betweenthat vertex and every other vertex. The shortest path first is widely used in networkrouting protocols, most notably IS-IS and OSPF (Open Shortest Path First). A link-state routing protocol is one of the two main classes of routing protocols used in packet switching networks for computer communications, the other major class being the distance-vector routing protocol. Examples of link-state routing protocols include OSPF and IS-IS.
Routing in 802.16 Mesh Networks The IEEE 802.16 WiMax standard provides amechanism for creating multi-hop mesh network, which canbe deployed as a high speed wide area wireless network. Thenetwork topology is a tree rooted at the base station and theproblem is to determine the routing and link scheduling for thetree, either jointly or separately. The utilization of WiMax meshnetwork can only increase if we efficiently design the multi hoprouting and scheduling. For effective scheduling first we have todesign the routing policy on top of which scheduling takes place.The goal of this paper is to present some routing algorithmsproposed by various authors for IEEE 802.16 mesh networks.In this paper we discuss the routing algorithm for throughputmaximization, for providing QoS (Quality of Service), forminimizing interference, etc. in detail. IEEE 802.16 Broadband Wireless Access Working Group Algorithms for Routing and Centralized Scheduling to Provide QoS in IEEE 802.16 Mesh Networks
Create a function that has as input A and the s,d the source and destination for whom you will calculate the shortest paths. This function will return the array D with the shortest paths. [n,cA] = size(A); % the final weight array D = zeros(length(s),length(t)); for i=1:length(s) j = s(i); % init array with inf values for each step Di = Inf*ones(n,1); Di(j) = 0; % help variable for checking the column process isLab = logical(zeros(length(t),1)); nLab = 0; UnLab = 1:n; isUnLab = logical(ones(n,1)); % while n is less than and there is still a non checked value while nLab < n & ~all(isLab) % check for each segment in the column Dj = Di(j); [Dj,jj] = min(Di(isUnLab)); j = UnLab(jj); UnLab(jj) = []; isUnLab(j) = 0; nLab = nLab + 1; % counter % takes the values for 1:n without the current segment i.e. 2 [jA,kA,Aj] = find(A(:,j)); Aj(isnan(Aj)) = 0; %add the weight in the path if isempty(Aj), Dk = Inf; else Dk = Dj + Aj; End % holds the shorts distances for each segment in the column Di(jA) = min(Di(jA),Dk); end D(i,:) = Di(t)'; end A= [0 1 inf 4 inf inf; 1 0 3 inf 1 inf; inf 3 0 inf 1 2; 4 inf inf 0 1 inf; inf 1 1 1 0 4; inf inf 2 inf 4 0;];