Graph

From Jonathan Gardner's Tech Wiki
Jump to: navigation, search

Introduction

A Graph is a group of nodes connected one to another.

Directed graphs are graphs where the nodes point to each other in one direction only. If A points to B, then B doesn't point to A. (Or at the very least, it has to be specific about it.)

Acyclic graphs are graphs where you can't go back to where you started from. Obviously, acyclic graphs must be directed, otherwise, you can go A to B back to A and find a simple cycle. Acyclic graphs are better known as Trees.

Wonderful Things you can Do With Graphs

Graphs can represent many things.

If they represent physical coordinates on a surface such as the earth, and the nodes connect only if you can travel from one point to another, then you can quickly find how to go from one place to another.

If they represent possible solutions to a problem, and you know how one solution can be morphed into another solution with simple changes, then you begin searching for the best solution or a good solution with a similar algorithm.

In short, graphs are explored. Working with graphs with an indefinite number of points or with nodes that connect to each other in unique and special ways makes the problems all the more fun to deal with.