0

I have an AND/OR dependency graph where nodes are web services and there is an arc between two services S1-->S2 if some output of S1 are similar to some input of S2 The weight of the arc is a function of many parameters (example: execution time) I need to calculate the shortest path between every pair of nodes in this And/Or graph

what is the best algorithm to do that? Floyd could not work in this case because there is a relation and/or between services For example: suppose a service A have the input x and y

x is provided by service B and C

y is provided by service D

so in my graph I will have the relation :

(B or C)and D --> A

Codor
  • 17,447
  • 9
  • 29
  • 56
  • Floyd-Warshall will definitely work if you first construct the graph where the vertices are all the possible AND/OR combinations of services, and not a graph of the services themselves. Is the problem that this graph is too big ? – A.N. Mar 31 '17 at 10:15
  • I try to think abount adding some dummy vertices in my graph that represent the predecessor of an And node and update the weight depending on this modification but it seem to me a complicated task. do you have any proposal – hajar elmaghraoui Mar 31 '17 at 10:57
  • I explain the idea I have with an example. If i have in my graph [(B and C) or E] --> A i create a dummy node D that will replace B and C, so the relation is [D or E]-->A do you have any proposal – hajar elmaghraoui Mar 31 '17 at 11:05
  • What I'm suggesting is that you also do that for [D or E], that becomes F and you have an edge F -> A. When you have created all the dummy vertices you can apply the Floyd-Warshall algorithm. At least if I understood your question correctly (and of that I'm not sure). – A.N. Mar 31 '17 at 17:37
  • And what about Dijkstra, does it work for an AND/OR graph.? – hajar elmaghraoui Apr 07 '17 at 08:48
  • Someone suggested to me to construct the tree of all possible paths from node to another node in order to have all paths. and then apply the search algorithm. what do you think? – hajar elmaghraoui Apr 08 '17 at 10:00

0 Answers0