News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Data Structures for PHP Devs Graphs
August 01, 2013 @ 09:52:34

PHPMaster.com has posted the fourth article in their "Data Structures for PHP Devs" series today, this time with a focus on graphs. He introduces some of the basic concepts behind them and covers two common problems that can be solved by them.

n one of my previous articles I introduced you to the tree data structure. Now I'd like to explore a related structure - the graph. Graphs have a number of real-world applications, such as network optimization, traffic routing, and social network analysis. Google's PageRank, Facebook's Graph Search, and Amazon's and NetFlix's recommendations are some examples of graph-driven applications. In this article I'll explore two common problems in which graphs are used - the Least Number of Hops and Shortest-Path problems.

He explains graphs mathematically, describing them as a set of relationships between nodes and the "lines" that connect them. There's other things involved including directions and weight, but there's not too much detail on those. Instead he gets right into the problems. First is the "Least Number of Hops" and second the "Find the Shortest Path", each with some explanation and sample code of their implementation.

0 comments voice your opinion now!
data structure graph tutorial least hops shortest path

Link: http://phpmaster.com/data-structures-4

blog comments powered by Disqus

Similar Posts

PHPMaster.com: The Single Responsibility Principle

Felix Geisendorfer's Blog: Setting up Xdebug on Mac OS X (or Win32 / Linux)

Lorenzo Ferrara: Testing Apigility Code-Connected REST APIs

DZone.com: Sencha Touch 2 Models - Loading And Saving Model Data Using a Proxy, PHP Example

.Net Magazine: Create an SVG data visualization with PHP


Community Events





Don't see your event here?
Let us know!


voicesoftheelephpant symfony library podcast version opinion conference list artisanfiles composer language security interview series release tool introduction laravel community framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework