File Exchange

image thumbnail

Breath First Search

version 1.0 (1.82 KB) by

Breath First Search algorithm to find shortest paths in a network

1 Download


View License

This implementation of BFS algorithm follows the description in the book "Network: an Introduction - Newman"

- A: the adjacency matrix of the network
- s: starting node
- t: destination node

- shortest_paths: all shortest paths from s to t
- distance: vector containing distances from s to all other nodes

Comments and Ratings (1)

Error using bfs ( in line 14 )

MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today