13,285 research outputs found

    Towards an R Package for the Shortest Path Problem with Forbidden Paths

    Get PDF
    The shortest path problem with forbidden paths (SPPFP) is a variant of the original shortest path problem. Given a directed graph = (, ), there is also a related set of known forbidden sub-paths in . The problem is to find the shortest paths from a source to a destination node, with no paths in the solution contain forbidden sub-path. SPPFP has been addressed in the academic literature, and different solutions have been proposed [1,2,3]. This problem has several lines of application in research, such as time windows networks, logistics, and more [4]. R is a free- software environment for statistical computing and graphics, and its potential depends on the packages contributed to the project by the community; however no R packages includes the SPPFP.Sociedad Argentina de Informática e Investigación Operativ

    Towards an R Package for the Shortest Path Problem with Forbidden Paths

    Get PDF
    The shortest path problem with forbidden paths (SPPFP) is a variant of the original shortest path problem. Given a directed graph = (, ), there is also a related set of known forbidden sub-paths in . The problem is to find the shortest paths from a source to a destination node, with no paths in the solution contain forbidden sub-path. SPPFP has been addressed in the academic literature, and different solutions have been proposed [1,2,3]. This problem has several lines of application in research, such as time windows networks, logistics, and more [4]. R is a free- software environment for statistical computing and graphics, and its potential depends on the packages contributed to the project by the community; however no R packages includes the SPPFP.Sociedad Argentina de Informática e Investigación Operativ

    Constrained Shortest Paths in Terrains and Graphs

    Get PDF
    Finding a shortest path is one of the most well-studied optimization problems. In this thesis we focus on shortest paths in geometric and graph theoretic settings subject to different feasibility constraints that arise in practical applications of such paths. One of the most fundamental problems in computational geometry is finding shortest paths in terrains, which has many applications in robotics, computer graphics and Geographic Information Systems (GISs). There are many variants of the problem in which the feasibility of a path is determined by some geometric property of the terrain. One such variant is the shortest descending path (SDP) problem, where the feasible paths are those that always go downhill. We need to compute an SDP, for example, for laying a canal of minimum length from the source of water at the top of a mountain to fields for irrigation purpose, and for skiing down a mountain along a shortest route. The complexity of finding SDPs is open. We give a full characterization of the bend angles of an SDP, showing that they follow a generalized form of Snell's law of refraction of light. We also reduce the SDP problem to the problem of finding an SDP through a given sequence of faces, by adapting the sequence tree approach of Chen and Han for our problem. Our results have two implications. First, we isolate the difficult aspect of SDPs. The difficulty is not in deciding which face sequence to use, but in finding the SDP through a given face sequence. Secondly, our results help us identify some classes of terrains for which the SDP problem is solvable in polynomial time. We give algorithms for two such classes. The difficulty of finding an exact SDP motivates the study of approximation algorithms for the problem. We devise two approximation algorithms for SDPs in general terrains---these are the first two algorithms to handle the SDP problem in such terrains. The algorithms are robust and easy-to-implement. We also give two approximation algorithms for the case when a face sequence is given. The first one solves the problem by formulating it as a convex optimization problem. The second one uses binary search together with our characterization of the bend angles of an SDP to locate an approximate path. We introduce a generalization of the SDP problem, called the shortest gently descending path (SGDP) problem, where a path descends but not too steeply. The additional constraint to disallow a very steep descent makes the paths more realistic in practice. For example, a vehicle cannot follow a too steep descent---this is why a mountain road has hairpin bends. We give two easy-to-implement approximation algorithms for SGDPs, both using the Steiner point approach. Between a pair of points there can be many SGDPs with different number of bends. In practice an SGDP with fewer bends or smaller total turn-angle is preferred. We show using a reduction from 3-SAT that finding an SGDP with a limited number of bends or a limited total turn-angle is hard. The hardness result applies to a generalization of the SGDP problem called the shortest anisotropic path problem, which is a well-studied computational geometry problem with many practical applications (e.g., robot motion planning), yet of unknown complexity. Besides geometric shortest paths, we also study a variant of the shortest path problem in graphs: given a weighted graph G and vertices s and t, and given a set X of forbidden paths in G, find a shortest s-t path P such that no path in X is a subpath of P. Path P is allowed to repeat vertices and edges. We call each path in X an exception, and our desired path a shortest exception avoiding path. We formulate a new version of the problem where the algorithm has no a priori knowledge of X, and finds out about an exception x in X only when a path containing x fails. This situation arises in computing shortest paths in optical networks. We give an easy-to-implement algorithm that finds a shortest exception avoiding path in time polynomial in |G| and |X|. The algorithm handles a forbidden path using vertex replication, i.e., replicating vertices and judiciously deleting edges so as to remove the forbidden path but keep all of its subpaths. The main challenge is that vertex replication can result in an exponential number of copies of any forbidden path that overlaps the current one. The algorithm couples vertex replication with the "growth" of a shortest path tree in such a way that the extra copies of forbidden paths produced during vertex replication are immaterial

    Non-crossing shortest paths in planar graphs with applications to max flow, and path graphs

    Get PDF
    This thesis is concerned with non-crossing shortest paths in planar graphs with applications to st-max flow vitality and path graphs. In the first part we deal with non-crossing shortest paths in a plane graph G, i.e., a planar graph with a fixed planar embedding, whose extremal vertices lie on the same face of G. The first two results are the computation of the lengths of the non-crossing shortest paths knowing their union, and the computation of the union in the unweighted case. Both results require linear time and we use them to describe an efficient algorithm able to give an additive guaranteed approximation of edge and vertex vitalities with respect to the st-max flow in undirected planar graphs, that is the max flow decrease when the edge/vertex is removed from the graph. Indeed, it is well-known that the st-max flow in an undirected planar graph can be reduced to a problem of non-crossing shortest paths in the dual graph. We conclude this part by showing that the union of non-crossing shortest paths in a plane graph can be covered with four forests so that each path is contained in at least one forest. In the second part of the thesis we deal with path graphs and directed path graphs, where a (directed) path graph is the intersection graph of paths in a (directed) tree. We introduce a new characterization of path graphs that simplifies the existing ones in the literature. This characterization leads to a new list of local forbidden subgraphs of path graphs and to a new algorithm able to recognize path graphs and directed path graphs. This algorithm is more intuitive than the existing ones and does not require sophisticated data structures

    Shortest Paths Avoiding Forbidden Subpaths

    Get PDF
    In this paper we study a variant of the shortest path problem in graphs: given a weighted graph G and vertices s and t, and given a set X of forbidden paths in G, find a shortest s-t path P such that no path in X is a subpath of P. Path P is allowed to repeat vertices and edges. We call each path in X an exception, and our desired path a shortest exception-avoiding path. We formulate a new version of the problem where the algorithm has no a priori knowledge of X, and finds out about an exception x in X only when a path containing x fails. This situation arises in computing shortest paths in optical networks. We give an algorithm that finds a shortest exception avoiding path in time polynomial in |G| and |X|. The main idea is to run Dijkstra's algorithm incrementally after replicating vertices when an exception is discovered.Comment: 12 pages, 2 figures. Fixed a few typos, rephrased a few sentences, and used the STACS styl

    Constructing strings avoiding forbidden substrings

    Get PDF
    We consider the problem of constructing strings over an alphabet Σ that start with a given prefix u, end with a given suffix v, and avoid occurrences of a given set of forbidden substrings. In the decision version of the problem, given a set Sk of forbidden substrings, each of length k, over Σ, we are asked to decide whether there exists a string x over Σ such that u is a prefix of x, v is a suffix of x, and no s ϵ Sk occurs in x. Our first result is an O(|u| + |v| + k|Sk|)-time algorithm to decide this problem. In the more general optimization version of the problem, given a set S of forbidden arbitrary-length substrings over Σ, we are asked to construct a shortest string x over S such that u is a prefix of x, v is a suffix of x, and no s ϵ S occurs in x. Our second result is an O(|u| + |v| + ||S|| · |Σ|)-time algorithm to solve this problem, where ||S|| denotes the total length of the elements of S. Interestingly, our results can be directly applied to solve the reachability and shortest path problems in complete de Bruijn graphs in the presence of forbidden edges or of forbidden paths. Our algorithms are motivated by data privacy, and in particular, by the data sanitization process. In the context of strings, sanitization consists in hiding forbidden substrings from a given string by introducing the least amount of spurious information. We consider the following problem. Given a string w of length n over Σ, an integer k, and a set Sk of forbidden substrings, each of length k, over Σ, construct a shortest string y over Σ such that no s ϵ Sk occurs in y and the sequence of all other length-k fragments occurring in w is a subsequence of the sequence of the length-k fragments occurring in y. Our third result is an O(nk|Sk| · |Σ|)-time algorithm to solve this problem

    The List Coloring Reconfiguration Problem for Bounded Pathwidth Graphs

    Full text link
    We study the problem of transforming one list (vertex) coloring of a graph into another list coloring by changing only one vertex color assignment at a time, while at all times maintaining a list coloring, given a list of allowed colors for each vertex. This problem is known to be PSPACE-complete for bipartite planar graphs. In this paper, we first show that the problem remains PSPACE-complete even for bipartite series-parallel graphs, which form a proper subclass of bipartite planar graphs. We note that our reduction indeed shows the PSPACE-completeness for graphs with pathwidth two, and it can be extended for threshold graphs. In contrast, we give a polynomial-time algorithm to solve the problem for graphs with pathwidth one. Thus, this paper gives precise analyses of the problem with respect to pathwidth
    corecore