The new Graph objects are atomic in Mathematica 8. Thus, like strings or images they do not have internal structure that can be manipulated in the normal fashion. What is particularly unusual is that the new objects have a FullForm that looks like it can be manipulated symbolically. But appearances can be deceiving -- not only is that representation inaccessible to pattern-matching, but it is not even a valid graph specification if you feed it back to Mathematica using copy-and-paste.
I found a couple of hacks that can be used to manipulate graph structure. The first tries to use the "official" channels to extract the properties of graphs:
adjustedGraph[g_, newOptions___] :=
Graph[
VertexList@g,
EdgeList@g,
newOptions,
Sequence@@Table[p -> PropertyValue[g, p], {p, PropertyList[g]}]
]
You can use this function like this:
g = GridGraph[{4, 4}, GraphStyle -> "DiagramBlack", ImageSize -> Tiny]
adjustedGraph[g, GraphStyle -> "BasicGold"]
This function uses VertexList, EdgeList and PropertyValue to extract the graph properties. Unfortunately, some options are not recoverable by this means. For example, the Graphics option ImageSize will be lost using this method.
An even more heinous hack exploits the pseudo-symbolic representation of FullForm:
adjustedGraph2[g_, newOptions___] :=
"Hold@" ~~ ToString[g, InputForm] //
ToExpression //
#[[1, 3]] & //
Graph[VertexList@g, EdgeList@g, newOptions, Sequence @@ #] &
Despite its evil nature, this second function performs more satisfactorily as it appears to retain most graph options. I say "most", because I have not yet experimented with more esoteric options like wrappers, shape functions and graph properties assigned after the fact. There are no guarantees that this method will work unchanged as Wolfram changes the representation of graph objects (or even that it works for all possible graph definitions now).
There ought to be a way to achieve this without hacks. I still hold out hope that there is some function lurking out there that will give the complete symbolic representation of a graph object.
As for the symbol conflicts that arise after loading the Combinatorica package, you can still access the original symbols by explicitly specifying the package name, e.g. System`CompleteGraph. If you prefer to have the system symbols take precedence over the Combinatorica symbols, you could evaluate the following expression to change the package search order:
$ContextPath =
$ContextPath /.
{x___, c : "Combinatorica`", y___, s:"System`", z___} :> {x, y, s, c, z}
I note that Wolfram is effectively deprecating the Combinatorica package by issuing a scary warning message when you load the package.