# Operações em grafos

Todas as operações comuns e muito mais estão incorporados ao Mathematica 8.
 In[1]:= Xstyle = {VertexStyle -> Directive[Hue[.6, .3, 1], EdgeForm[Hue[.6, .8, .7]]], VertexSize -> 0.2, EdgeStyle -> Hue[.6, .8, .5], ImageSize -> {100, 100}};
 In[2]:= Xname = {"Graph Union", "Graph Disjoint Union", "Graph Difference", "Graph Intersection"};
 In[3]:= Xinfo = { {g = CycleGraph[4, style], Style["\[Union]", 20], h = StarGraph[4, style], Style["\[LongEqual]", 20], HighlightGraph[ GraphUnion[g, h, GraphLayout -> "CircularEmbedding"], g, style]}, {g = CycleGraph[3, style], Style["\[UnionPlus]", 20], h = CycleGraph[3, style], Style["\[LongEqual]", 20], HighlightGraph[GraphDisjointUnion[g, h], g, style]}, {g = PetersenGraph[5, 2, style], Style["-", 20], h = CompleteGraph[5, style], Style["\[LongEqual]", 20], HighlightGraph[g, GraphDifference[g, h], style]}, {g = PetersenGraph[5, 2, style], Style["\[Intersection]", 20], h = CompleteGraph[5, style], Style["\[LongEqual]", 20], HighlightGraph[g, GraphIntersection[g, h], style]} };
 In[4]:= XShowPlotSamples[name_, info_] := Framed[Column[{Style[name, 14, Bold, FontFamily -> "Verdana"], Grid[{info}, Spacings -> {1, 0}]}, Alignment -> Center], RoundingRadius -> 9, FrameStyle -> None, Background -> GrayLevel@0.90];