New in Wolfram
Mathematica
8: Graph & Network Modeling
◄
previous
|
next
►
Application Areas
Boolean Operations
The state-of-the-art Boolean computation in
Mathematica
8 makes possible arbitrary Boolean operations over graphs.
In[1]:=
X
Grid[Partition[Drop[Table[BooleanGraph[BooleanFunction[i, 2], \!\(\* GraphicsBox[ NamespaceBox["NetworkGraphics", DynamicModuleBox[{Typeset`graph = HoldComplete[ Graph[{1, 2, 3, 4, 5}, {Null, SparseArray[ Automatic, {5, 5}, 0, { 1, {{0, 4, 8, 12, 16, 20}, {{2}, {3}, {4}, {5}, {1}, { 3}, {4}, {5}, {1}, {2}, {4}, {5}, {1}, {2}, {3}, { 5}, {1}, {2}, {3}, {4}}}, Pattern}]}, { FrameTicks -> None, VertexCoordinates -> {{0.9510565162951535, 0.30901699437494745`}, { 0.5877852522924732, -0.8090169943749473}, \ {-0.587785252292473, -0.8090169943749475}, {-0.9510565162951536, 0.30901699437494723`}, {-2.4492935982947064`*^-16, 1.}}}]], Typeset`boxes = GraphicsGroupBox[{{ Directive[ Hue[0.6, 0.2, 0.8], EdgeForm[ Directive[ GrayLevel[0], Opacity[0.7]]]], TagBox[ DiskBox[{0.9510565162951535, 0.30901699437494745`}, 0.021812234931106983`], "DynamicName", BoxID -> "VertexID$1"], TagBox[ DiskBox[{0.5877852522924732, -0.8090169943749473}, 0.021812234931106983`], "DynamicName", BoxID -> "VertexID$2"], TagBox[ DiskBox[{-0.587785252292473, -0.8090169943749475}, 0.021812234931106983`], "DynamicName", BoxID -> "VertexID$3"], TagBox[ DiskBox[{-0.9510565162951536, 0.30901699437494723`}, 0.021812234931106983`], "DynamicName", BoxID -> "VertexID$4"], TagBox[ DiskBox[{-2.4492935982947064`*^-16, 1.}, 0.021812234931106983`], "DynamicName", BoxID -> "VertexID$5"]}, { Directive[ Opacity[0.7], Hue[0.6, 0.7, 0.5]], LineBox[{{ DynamicLocation["VertexID$1", Automatic, Center], DynamicLocation["VertexID$2", Automatic, Center]}, { DynamicLocation["VertexID$1", Automatic, Center], DynamicLocation["VertexID$3", Automatic, Center]}, { DynamicLocation["VertexID$1", Automatic, Center], DynamicLocation["VertexID$4", Automatic, Center]}, { DynamicLocation["VertexID$1", Automatic, Center], DynamicLocation["VertexID$5", Automatic, Center]}, { DynamicLocation["VertexID$2", Automatic, Center], DynamicLocation["VertexID$3", Automatic, Center]}, { DynamicLocation["VertexID$2", Automatic, Center], DynamicLocation["VertexID$4", Automatic, Center]}, { DynamicLocation["VertexID$2", Automatic, Center], DynamicLocation["VertexID$5", Automatic, Center]}, { DynamicLocation["VertexID$3", Automatic, Center], DynamicLocation["VertexID$4", Automatic, Center]}, { DynamicLocation["VertexID$3", Automatic, Center], DynamicLocation["VertexID$5", Automatic, Center]}, { DynamicLocation["VertexID$4", Automatic, Center], DynamicLocation["VertexID$5", Automatic, Center]}}]}}]}, DynamicBox[GraphComputation`NetworkGraphicsBox[ 1, Typeset`graph, Typeset`boxes], { CachedValue :> Typeset`boxes, SingleEvaluation -> True, SynchronousUpdating -> False, TrackedSymbols :> {}}, ImageSizeCache->{{0.42661182897877303`, 88.57338817102124}, {-44.64458817102121, 39.41421356237309}}]]], DefaultBaseStyle->{ "NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]}, FrameTicks->None]\), \!\(\* GraphicsBox[ NamespaceBox["NetworkGraphics", DynamicModuleBox[{Typeset`graph = HoldComplete[ Graph[{1, 2, 3}, {Null, SparseArray[ Automatic, {3, 3}, 0, { 1, {{0, 2, 4, 6}, {{2}, {3}, {1}, {3}, {1}, {2}}}, Pattern}]}, { FrameTicks -> None, VertexCoordinates -> {{ 0.8660254037844387, -0.4999999999999998}, \ {-0.8660254037844385, -0.5000000000000004}, \ {-2.4492935982947064`*^-16, 1.}}}]], Typeset`boxes = GraphicsGroupBox[{{ Directive[ Hue[0.6, 0.2, 0.8], EdgeForm[ Directive[ GrayLevel[0], Opacity[0.7]]]], TagBox[ DiskBox[{0.8660254037844387, -0.4999999999999998}, 0.020399597244776385`], "DynamicName", BoxID -> "VertexID$1"], TagBox[ DiskBox[{-0.8660254037844385, -0.5000000000000004}, 0.020399597244776385`], "DynamicName", BoxID -> "VertexID$2"], TagBox[ DiskBox[{-2.4492935982947064`*^-16, 1.}, 0.020399597244776385`], "DynamicName", BoxID -> "VertexID$3"]}, { Directive[ Opacity[0.7], Hue[0.6, 0.7, 0.5]], LineBox[{{ DynamicLocation["VertexID$1", Automatic, Center], DynamicLocation["VertexID$2", Automatic, Center]}, { DynamicLocation["VertexID$1", Automatic, Center], DynamicLocation["VertexID$3", Automatic, Center]}, { DynamicLocation["VertexID$2", Automatic, Center], DynamicLocation["VertexID$3", Automatic, Center]}}]}}]}, DynamicBox[GraphComputation`NetworkGraphicsBox[ 1, Typeset`graph, Typeset`boxes], { CachedValue :> Typeset`boxes, SingleEvaluation -> True, SynchronousUpdating -> False, TrackedSymbols :> {}}, ImageSizeCache->{{0.7800000000000016, 88.22}, {-41.2912, 34.965439323312935`}}]]], DefaultBaseStyle->{ "NetworkGraphics", FrontEnd`GraphicsHighlightColor -> Hue[0.8, 1., 0.6]}, FrameTicks->None]\), ImageSize -> 120], {i, 0, 15}], 4], 4], Frame -> All, FrameStyle -> LightGray]
Out[1]=