# Highlighting a graph with non-trivial vertex definitions

When defining a graph whose vertices are sets e.g. the Kneser graph, how does Mathematica interpret the vertices?

I am having trouble highlighting vertices when I define vertices with sets, but for some reason highlighting edges creates no problem:

HighlightGraph[Graph[{{1, 2} <-> {3, 4}}], {{1, 2} <-> {3, 4}}]


This creates an edge with the edge highlighted, as expected. However

HighlightGraph[Graph[{{1, 2} <-> {3, 4}}], {1,2}]


does not highlight the vertex corresponding to {1,2}.

I originally had a colleague help write a program to construct the general Kneser graph. However, when using FindIndependentVertexSet, it lists the correct vertices (sets), but when using HighlightGraph, it doesn't highlight anything; using FindHamiltonianCycle, I can highlight the cycle though.

• Welcome to Mathematica.SE! I suggest the following: 0) Browse the common pitfalls question 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Nov 16, 2015 at 21:02

g = Graph[{{1, 2} <-> {3, 4}}];

• Unfortunately, this method, which works for me a few hours ago (on my local Mathematica 10.2 install), fails now. It return \$Failed. Jun 11, 2017 at 4:06