Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Graphs & Networks > Graph Operations and Modifications > BooleanGraph >
Mathematica > Visualization and Graphics > Graphs & Networks > Graph Operations and Modifications > BooleanGraph >
Mathematica > Mathematics and Algorithms > Graphs & Networks > Constructing Graphs > Graph Operations and Modifications > BooleanGraph >

BooleanGraph

BooleanGraph
gives the Boolean graph defined by the Boolean function bfunc on the graphs , ..., .
  • The Boolean graph has a vertex list given by the union of vertex lists.
  • An edge is in the resulting graph if bfunc[EdgeQ[g1, uDirectedEdgev], ..., EdgeQ[gn, uDirectedEdgev]] is True.
  • An edge is in the resulting graph if bfunc[EdgeQ[gi, uUndirectedEdgev], ..., EdgeQ[gn, uUndirectedEdgev]] is True.
The Boolean combination of two graphs:
The Boolean combination of two graphs:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
BooleanGraph works with undirected graphs:
Directed graphs:
BooleanGraph works with as many graphs as the Boolean function:
Define the symmetric graph difference Xor:
Convert the Boolean expression Xor to disjunctive normal form:
Implement it by related functions:
Compare to the result by using Xor directly:
Define the graph Nand:
Convert the Boolean expression Nand to disjunctive normal form:
Implement it by related functions:
Compare to the result by using Nand directly:
Define the graph Nor:
Convert the Boolean expression Nor to disjunctive normal form:
Implement it by related functions:
Compare to the result by using Nor directly:
Compute the Boolean graph for all Boolean functions of two variables:
Use BooleanFunction to enumerate all Boolean functions of two variables:
Compute the Boolean graph using these functions:
GraphUnion corresponds to Or:
GraphIntersection corresponds to And:
BooleanGraph does not necessarily produce simple graphs:
Use SimpleGraph if only a simple graph is needed:
New in 8
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF