jessLryan / FPTSubgraphCounting

0 stars 0 forks source link

allow unlabelled subgraph counting #1

Open jessLryan opened 7 months ago

jessLryan commented 7 months ago

Allow users to request unlabelled subgraph counting via an optional(?) additional input

Unlabelled subgraph counting can be achieved by dividing the current count value by the result of running the brute force algorithm on the input pattern graph with the pattern graph as both graph inputs to the brute force method (this would then count the number of isomorphisms of the pattern graph)

Vinay00018 commented 1 week ago

Hey I need an help, I cant able to understand this issue/overall project I am a beginner to this open source ,can you explain this issue

jessLryan commented 1 week ago

Hello, Just to say, thanks for your interest in the project! :-) I will respond with more details over the weekend on what needs to be done for this issue

jessLryan commented 1 week ago

Hi @Vinay00018 What needs to be done is to

  1. Give the user running the program an option to say whether they want to count labelled or unlabelled copies of the subgraph H in the host graph G. This could be done by asking the user first whether they want to count labelled copies, and then asking them for the input files. See https://www.w3schools.com/java/java_user_input.asp

  2. Add another boolean parameter 'labelled' (the user's answer to the first question) to the runAlgorithm method of the AlgorithmRunner class, and then

    • if 'labelled' is true, then nothing changes
    • if labelled is false, we run the LabelledSubgraphCountingAlgorithm (as usual) for the input graphs H and G to get an integer A, and then run the BruteForceLabelledSubgraphCountingAlgorithm (actually this class could benefit from a method which takes two graphs as input, I can do this part as it's not really part of the ticket) with H as both inputs to get an integer B, and your result (the number of unlabelled copies of H in G) is equal to the result of dividing A by B

I'm not sure I've explained this super well, so if it's still unclear and you'd still like to work on it, drop me an email and I'd be happy to schedule a brief call :)