VF2 Isomorphism query, Python
up vote
-1
down vote
favorite
I am utilising the VF2 algorithm to map and compare 2 graphs with a differing structure but the same number of nodes and edges Because of this the algorithm won't compare my 2 graphs on the basis that some nodes don't have the exact same number of edges. Is there any way to change the source code of VF2 to allow it to ignore instances of nodes that have differing numbers of edges?
Example: I have two graphs in a noun:verb:noun format with nouns representing nodes and verbs representing edges between nodes. Both graphs have the same number of nodes and edges but with differing structure. I want to use VF2 to map these two graphs with differing graph structures but the same number of items. Right now VF2 terminates and doesn't print anything when it cannot extend the mapping of two nodes. I want it to print out the incomplete mapping of the two graphs at that stage.
python graph networkx isomorphism
add a comment |
up vote
-1
down vote
favorite
I am utilising the VF2 algorithm to map and compare 2 graphs with a differing structure but the same number of nodes and edges Because of this the algorithm won't compare my 2 graphs on the basis that some nodes don't have the exact same number of edges. Is there any way to change the source code of VF2 to allow it to ignore instances of nodes that have differing numbers of edges?
Example: I have two graphs in a noun:verb:noun format with nouns representing nodes and verbs representing edges between nodes. Both graphs have the same number of nodes and edges but with differing structure. I want to use VF2 to map these two graphs with differing graph structures but the same number of items. Right now VF2 terminates and doesn't print anything when it cannot extend the mapping of two nodes. I want it to print out the incomplete mapping of the two graphs at that stage.
python graph networkx isomorphism
What do you mean by "same structure" if the nodes don't have the same number of edges? For the algorithm you want to have, could you give an example of what a sample input would be and what you expect the output to be?
– Joel
Nov 21 at 21:42
Hi Joel. So the input is two graphs with the same number of nodes but a different number of edges connecting those nodes. What I want is an algorithm that doesn't terminate when when trying to map nodes with a different number of edges when comparing both graphs to each other and will instead ignore them and continue mapping the other nodes.
– Lukas Clarke
Nov 21 at 21:58
This is still unclear. Can you edit the question and give explicitly two input graphs and then state what the output should be? On the basis of what you've described, it sounds to me like you're trying to use an algorithm which is supposed to determine if two graphs are isomorphic. The graphs are not isomorphic, but you want it to do something different than just say that they aren't. I'm struggling to understand what your output should be.
– Joel
Nov 22 at 0:52
Updated the question
– Lukas Clarke
Nov 22 at 11:44
I'm still not sure what the output is you want. Can you give two small explicit graphs (as in tell us the nodes and their edges) and say exactly what the output should be? Since my understanding of VF2 is that it is supposed to find an isomorphism between two graphs, and from what you've described, your graphs are not isomorphic, it doesn't feel to me like it's what you want to be using.
– Joel
Nov 22 at 23:39
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I am utilising the VF2 algorithm to map and compare 2 graphs with a differing structure but the same number of nodes and edges Because of this the algorithm won't compare my 2 graphs on the basis that some nodes don't have the exact same number of edges. Is there any way to change the source code of VF2 to allow it to ignore instances of nodes that have differing numbers of edges?
Example: I have two graphs in a noun:verb:noun format with nouns representing nodes and verbs representing edges between nodes. Both graphs have the same number of nodes and edges but with differing structure. I want to use VF2 to map these two graphs with differing graph structures but the same number of items. Right now VF2 terminates and doesn't print anything when it cannot extend the mapping of two nodes. I want it to print out the incomplete mapping of the two graphs at that stage.
python graph networkx isomorphism
I am utilising the VF2 algorithm to map and compare 2 graphs with a differing structure but the same number of nodes and edges Because of this the algorithm won't compare my 2 graphs on the basis that some nodes don't have the exact same number of edges. Is there any way to change the source code of VF2 to allow it to ignore instances of nodes that have differing numbers of edges?
Example: I have two graphs in a noun:verb:noun format with nouns representing nodes and verbs representing edges between nodes. Both graphs have the same number of nodes and edges but with differing structure. I want to use VF2 to map these two graphs with differing graph structures but the same number of items. Right now VF2 terminates and doesn't print anything when it cannot extend the mapping of two nodes. I want it to print out the incomplete mapping of the two graphs at that stage.
python graph networkx isomorphism
python graph networkx isomorphism
edited Nov 22 at 11:44
asked Nov 21 at 20:52
Lukas Clarke
112
112
What do you mean by "same structure" if the nodes don't have the same number of edges? For the algorithm you want to have, could you give an example of what a sample input would be and what you expect the output to be?
– Joel
Nov 21 at 21:42
Hi Joel. So the input is two graphs with the same number of nodes but a different number of edges connecting those nodes. What I want is an algorithm that doesn't terminate when when trying to map nodes with a different number of edges when comparing both graphs to each other and will instead ignore them and continue mapping the other nodes.
– Lukas Clarke
Nov 21 at 21:58
This is still unclear. Can you edit the question and give explicitly two input graphs and then state what the output should be? On the basis of what you've described, it sounds to me like you're trying to use an algorithm which is supposed to determine if two graphs are isomorphic. The graphs are not isomorphic, but you want it to do something different than just say that they aren't. I'm struggling to understand what your output should be.
– Joel
Nov 22 at 0:52
Updated the question
– Lukas Clarke
Nov 22 at 11:44
I'm still not sure what the output is you want. Can you give two small explicit graphs (as in tell us the nodes and their edges) and say exactly what the output should be? Since my understanding of VF2 is that it is supposed to find an isomorphism between two graphs, and from what you've described, your graphs are not isomorphic, it doesn't feel to me like it's what you want to be using.
– Joel
Nov 22 at 23:39
add a comment |
What do you mean by "same structure" if the nodes don't have the same number of edges? For the algorithm you want to have, could you give an example of what a sample input would be and what you expect the output to be?
– Joel
Nov 21 at 21:42
Hi Joel. So the input is two graphs with the same number of nodes but a different number of edges connecting those nodes. What I want is an algorithm that doesn't terminate when when trying to map nodes with a different number of edges when comparing both graphs to each other and will instead ignore them and continue mapping the other nodes.
– Lukas Clarke
Nov 21 at 21:58
This is still unclear. Can you edit the question and give explicitly two input graphs and then state what the output should be? On the basis of what you've described, it sounds to me like you're trying to use an algorithm which is supposed to determine if two graphs are isomorphic. The graphs are not isomorphic, but you want it to do something different than just say that they aren't. I'm struggling to understand what your output should be.
– Joel
Nov 22 at 0:52
Updated the question
– Lukas Clarke
Nov 22 at 11:44
I'm still not sure what the output is you want. Can you give two small explicit graphs (as in tell us the nodes and their edges) and say exactly what the output should be? Since my understanding of VF2 is that it is supposed to find an isomorphism between two graphs, and from what you've described, your graphs are not isomorphic, it doesn't feel to me like it's what you want to be using.
– Joel
Nov 22 at 23:39
What do you mean by "same structure" if the nodes don't have the same number of edges? For the algorithm you want to have, could you give an example of what a sample input would be and what you expect the output to be?
– Joel
Nov 21 at 21:42
What do you mean by "same structure" if the nodes don't have the same number of edges? For the algorithm you want to have, could you give an example of what a sample input would be and what you expect the output to be?
– Joel
Nov 21 at 21:42
Hi Joel. So the input is two graphs with the same number of nodes but a different number of edges connecting those nodes. What I want is an algorithm that doesn't terminate when when trying to map nodes with a different number of edges when comparing both graphs to each other and will instead ignore them and continue mapping the other nodes.
– Lukas Clarke
Nov 21 at 21:58
Hi Joel. So the input is two graphs with the same number of nodes but a different number of edges connecting those nodes. What I want is an algorithm that doesn't terminate when when trying to map nodes with a different number of edges when comparing both graphs to each other and will instead ignore them and continue mapping the other nodes.
– Lukas Clarke
Nov 21 at 21:58
This is still unclear. Can you edit the question and give explicitly two input graphs and then state what the output should be? On the basis of what you've described, it sounds to me like you're trying to use an algorithm which is supposed to determine if two graphs are isomorphic. The graphs are not isomorphic, but you want it to do something different than just say that they aren't. I'm struggling to understand what your output should be.
– Joel
Nov 22 at 0:52
This is still unclear. Can you edit the question and give explicitly two input graphs and then state what the output should be? On the basis of what you've described, it sounds to me like you're trying to use an algorithm which is supposed to determine if two graphs are isomorphic. The graphs are not isomorphic, but you want it to do something different than just say that they aren't. I'm struggling to understand what your output should be.
– Joel
Nov 22 at 0:52
Updated the question
– Lukas Clarke
Nov 22 at 11:44
Updated the question
– Lukas Clarke
Nov 22 at 11:44
I'm still not sure what the output is you want. Can you give two small explicit graphs (as in tell us the nodes and their edges) and say exactly what the output should be? Since my understanding of VF2 is that it is supposed to find an isomorphism between two graphs, and from what you've described, your graphs are not isomorphic, it doesn't feel to me like it's what you want to be using.
– Joel
Nov 22 at 23:39
I'm still not sure what the output is you want. Can you give two small explicit graphs (as in tell us the nodes and their edges) and say exactly what the output should be? Since my understanding of VF2 is that it is supposed to find an isomorphism between two graphs, and from what you've described, your graphs are not isomorphic, it doesn't feel to me like it's what you want to be using.
– Joel
Nov 22 at 23:39
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53420304%2fvf2-isomorphism-query-python%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What do you mean by "same structure" if the nodes don't have the same number of edges? For the algorithm you want to have, could you give an example of what a sample input would be and what you expect the output to be?
– Joel
Nov 21 at 21:42
Hi Joel. So the input is two graphs with the same number of nodes but a different number of edges connecting those nodes. What I want is an algorithm that doesn't terminate when when trying to map nodes with a different number of edges when comparing both graphs to each other and will instead ignore them and continue mapping the other nodes.
– Lukas Clarke
Nov 21 at 21:58
This is still unclear. Can you edit the question and give explicitly two input graphs and then state what the output should be? On the basis of what you've described, it sounds to me like you're trying to use an algorithm which is supposed to determine if two graphs are isomorphic. The graphs are not isomorphic, but you want it to do something different than just say that they aren't. I'm struggling to understand what your output should be.
– Joel
Nov 22 at 0:52
Updated the question
– Lukas Clarke
Nov 22 at 11:44
I'm still not sure what the output is you want. Can you give two small explicit graphs (as in tell us the nodes and their edges) and say exactly what the output should be? Since my understanding of VF2 is that it is supposed to find an isomorphism between two graphs, and from what you've described, your graphs are not isomorphic, it doesn't feel to me like it's what you want to be using.
– Joel
Nov 22 at 23:39