Search
Graphs
Untitled (the Wolfram Language for Students - Personal Use Only : www.wolfram.com)

Graph algorithms

There is sophisticated built-in support for graphs and graph algorithms

There are lots of built-in graphs obtainable using GraphData, e.g.

Graphs_1.png

Graphs_2.png

Graphs_3.png

Graphs_4.gif

Graphs_5.png

Graphs_6.gif

Let’s perform a depth-first search on this tree

We start with the root node (33) in our case, and visit each node in the graph by first visiting all the children of a given node before visiting any of its siblings

Graphs_7.png

We will need to find the neighbors of a given node:

Graphs_8.png

Graphs_9.png

We also don’t want to visit our parent, so we will use Cases and Except to skip items

Graphs_10.png

Graphs_11.png

Graphs_12.png

Graphs_13.png

Graphs_14.gif

Graphs_15.png

Graphs_16.png

Graphs_17.png

Graphs_18.png

Graphs_19.png

Graphs_20.png

Graphs_21.png

Graphs_22.png

Graphs_23.png

Graphs_24.png

Graphs_25.png

Graphs_26.png

Graphs_27.png

Graphs_28.png

Graphs_29.png

Graphs_30.png

Graphs_31.png

Graphs_32.png

Graphs_33.png

Graphs_34.png

Graphs_35.png

Graphs_36.png

Graphs_37.png

Graphs_38.png

Graphs_39.png

Graphs_40.png

Graphs_41.png

Graphs_42.png

Graphs_43.png

Graphs_44.png

Graphs_45.png

Graphs_46.png

Graphs_47.png

Graphs_48.png

Graphs_49.png

Graphs_50.png

Graphs_51.png

Graphs_52.png

Graphs_53.png

Graphs_54.png

Graphs_55.png

Graphs_56.png

Graphs_57.png

Graphs_58.png

Graphs_59.png

Graphs_60.png

Graphs_61.png

Graphs_62.png

Graphs_63.png

Graphs_64.png

Graphs_65.png

Graphs_66.png

Graphs_67.png

Graphs_68.png

Graphs_69.png

Graphs_70.png

Graphs_71.png

Graphs_72.png

Graphs_73.png

Graphs_74.png

Graphs_75.png

Graphs_76.png

Graphs_77.png

Graphs_78.png

Graphs_79.png

Graphs_80.png

Graphs_81.png

Graphs_82.png

Graphs_83.png

Graphs_84.png

Graphs_85.png

Graphs_86.png

Graphs_87.png

Graphs_88.png

Graphs_89.png

Graphs_90.png

Graphs_91.png

Graphs_92.png

Graphs_93.png

Graphs_94.png

Graphs_95.png

Graphs_96.png

Graphs_97.png

Graphs_98.png

Graphs_99.png

Graphs_100.png

Graphs_101.png

Graphs_102.png

Graphs_103.png

Graphs_104.png

Graphs_105.png

Graphs_106.png

Graphs_107.png

Graphs_108.png

Graphs_109.png

Graphs_110.png

Graphs_111.png

Graphs_112.png

Graphs_113.png

Graphs_114.png

Graphs_115.png

Graphs_116.png

Graphs_117.png

Graphs_118.png

Graphs_119.png

Graphs_120.gif

Graphs_121.png

Graphs_122.png

Graphs_123.png

Graphs_124.gif

Graphs_125.png

Graphs_126.png

Graphs_127.png

Graphs_128.gif