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 Predicates and Properties > EmptyGraphQ >
Mathematica > Visualization and Graphics > Graphs & Networks > Graph Predicates and Properties > EmptyGraphQ >

EmptyGraphQ

EmptyGraphQ[g]
yields True if g is an empty graph and False otherwise.
  • A graph is considered empty if it has no edges.
Test whether a graph is empty:
Non-empty graphs:
Test whether a graph is empty:
In[1]:=
Click for copyable input
Out[1]=
 
Non-empty graphs:
In[1]:=
Click for copyable input
Out[1]=
Test undirected and directed graphs:
EmptyGraphQ gives False for expressions that are not edgeless graphs:
Test large graphs:
The number of edges of an empty graph is zero:
The vertex degree for an empty graph is all zeros:
The empty graphs are undirected graphs:
The complement of a complete graph is an empty graph:
The intersection of two graphs with dfferent names is an empty graph:
The intersection of any graph and its complement is an empty graph:
The adjacency matrix for an empty graph has all zero entries:
New in 8
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF