Group Abstract Group Abstract

Message Boards Message Boards

0
|
7K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Get right result with FindIndependentVertexSet[g,{n}] ?

Posted 6 years ago

Hi? I konw the function FindIndependentVertexSet[g, {n}l] which finds an independent vertex set with exactly n vertices. We konw 4- Path graph, every single vertex is its 1- indepent vertex set . but we use the function FindIndependentVertexSet[g, {1}l],it returns empty set {}. It may return {{1},{2},{3},{4}}. The following text give out all of the original code proceedings. it is strange?How to solve it.

path4 = Graph[{{1, 2}, {2, 3}, {3, 4}}, VertexLabels -> All]
FindIndependentVertexSet[path4, {1}, All]
IndependentVertexSetQ[path,{1}]
Attachment

Attachments:
POSTED BY: Licheng Zhang
2 Replies
Posted 6 years ago

Thank you very much for your help? Before you introduce your IGraph function, If I want to get k- IndependentVertexSets, I can only find all the vertices subset of order k and using function IndependentVertexSetQ. It is not convient convenient.

POSTED BY: Licheng Zhang
POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard