How to approach Dynamic graph related problems
-
I asked this http://stackoverflow.com/questions/10326446/how-to-approach-dynamic-graph-related-problems at generic stackoverflow and I was directed here. It will be great if some one can explain how to approach partial or fully dynamic graph problems in general. For example: Find Shortest Path between two vertices $(u,v)$ in a undirected weighted graph for $n$ instances, when an edge is removed at each instance. Find number of connected components in an undirected graph for n instances when an edge is remove at each instance, etc. I recently encountered this genre of problems in a programming contest. I searched through the web and I found lot of research papers concerning with dynamic graphs [1,2]. I read couple of them and and I couldnt find anything straight forward (clustering, sparsification etc). Sorry for being vague. I really appreciate if some can provide pointers to understand these concepts better. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.43.8372 by D. Eppstein , Z. Galil , G. F. Italiano (1999) http://www.lix.polytechnique.fr/~liberti/sppsurvey.pdf by G. Nannicini, L. Liberti (2008)
-
Answer:
It's hard to give you concrete techniques because "dynamic" could mean a wide variety of things, and the algorithms/results depend on your model. Below is an overview of the concerns. http://dl.acm.org/citation.cfm?id=1969879 is a paper that gives an overview of some different concerns and models (related to what Peter cited in another answer). For dynamic problems in general, the key issues are: do you want an exact solution in all cases, or is approximation allowed? do you know anything about what changes will occur (e.g. a probability distribution), or are they all equally likely? how does the algorithm learn about the changes? A typical dynamic model is something like the following: Given a graph, you want to compute some property. You are allowed to compute a solution for the initial graph. You are then told one modification: edge $(e,f)$ is deleted. Compute the property on the new graph using limited resources. Repeat 2 for $n$ times. And here are 3 possible modifications: You aren't allowed to compute the complete solution at the beginning because of information / time / space limitations (one example of which is http://en.wikipedia.org/wiki/Online_algorithm) In step 2, the algorithm is not "told" the modification, but has to find the modification in the graph by querying a data structure or something. A distributed model (like Peter discusses in another answer), where the information is discovered locally and the computation/changes are made locally. Dynamic models are typically interesting because of resource (e.g. time/space) limitations. In step 2, if I was allowed to compute a complete answer (like I did in step 1) then the problem is easy, since it's just a repeated static graph problem. We're more interested in the smallest amount of resources necessary to compute the change.
Prakash at Computer Science Visit the source
Other answers
Dynamic graph models have been studied intensively in distributed computing. For distributed algorithms, the computation is structured into rounds and the topology of graphs (=network) might undergo some changes from round to round, which are under control of an adversary. Moreover, every node of the graph runs an algorithm which can send a message to its (current!) neighbors. (This message is the input of the neighbors' algorithm in the next round.) What makes things interesting, is that a node does not "see" the entire graph but only its local neighborhood. Problems that are considered in these settings are for example information spreading where every node in the graph initially holds a token and eventually you want that every node has seen every token. The goal is to design algorithms that achieve this in the smallest number of rounds, using the least number of messages. See [2] for a recent survey. For the non-distributed setting, you might want to look at [1], which is an extension of the paper that you've mentioned. [1] Aris Anagnostopoulos, Ravi Kumar, Mohammad Mahdian, Eli Upfal, Fabio Vandin: http://doi.acm.org/10.1145/2090236.2090249. ITCS 2012: 149-160 [2] Fabian Kuhn, Rotem Oshman: http://doi.acm.org/10.1145/1959045.1959064. SIGACT News 42(1): 82-96 (2011)
Peter
Building on @Peter answers (it is a very long comment, so I just included as an answer hopping that someone will benefit from it). I would suggest the following reference: Arnaud Casteigts, Paola Flocchini, Walter Quattrociocchi, Nicola Santoro: Time-varying graphs and dynamic networks. IJPEDS 27(5): 387-408 (2012) The survey includes a theoretical classification of dynamic networks in distributed settings. For instance, you may find graphs in which the appearance of edges follows a periodic pattern. Or, edges show up at least once in a period $\Delta$. Or, edges that do not follow any periodic patter but they will show up at some point of the algorithm execution. -- and there are about 9 classes in total. What is really important of this classification is that there are inclusion relationships between the different classes. So if you solve a problem in a certain class, you would solve it in every other class it is included in. The same authors presented broadcasting algorithms on some of the mentioned graphs. They gave different performance metrics related to time (i.e. different definition of shortest time). In broadcasting, the idea is that each node build a view of the network in the time domain. This is done by repeatedly listening to neighbors, and sending information to neighbors. If assuming periodicity, then a node can tell what is the shortest time-path to another node. It uses this information in routing. More details can be found in: Arnaud Casteigts, Paola Flocchini, Bernard Mans, Nicola Santoro: Deterministic Computations in Time-Varying Graphs: Broadcasting under Unstructured Mobility. IFIP TCS 2010: 111-124 One of the interesting concepts in dynamic graphs is the concept of journey, which has an analogy to path in static graphs. There is a journey between two nodes $u$ and $v$ if there is a set of edges $\{(u,x_1), (x_1, x _2), ...., (x _k, v)\}$ that will appear in an increasing intervals of time. Note that journey are not symmetric. The existence of a journey between $u$ and $v$ does not necessarily mean that there is a journey between $v$ and $u$. I attended a lecture by the previous authors. From my understanding, they claim that we are far from being able to deal with dynamic graph algorithms (following the definitions they follow). That we are still in the case of simple classes. In fact, they claim that most of the mobile computing algorithms just assume that their algorithms are too fast to be executed while the network is in transition ! (which i believe I heard a lot) -- Or simply, assume periodicity of edges appearance (see delay tolerant networks etc)
AJed
Related Q & A:
- How To Use the Graph API to Upload Photos to a user’s profile?Best solution by Stack Overflow
- How to create dynamic function in javascript?Best solution by Stack Overflow
- How to create dynamic animations?Best solution by Yahoo! Answers
- How to make dynamic delete button work?Best solution by Stack Overflow
- How to create a graph using python?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.