4 research outputs found

    Finding the largest triangle in a graph in expected quadratic time

    Get PDF
    Finding the largest triangle in an n-nodes edge-weighted graph belongs to a set of problems all equivalent under subcubic reductions. Namely, a truly subcubic algorithm for any one of them would imply that they are all subcubic. A recent strong conjecture states that none of them can be solved in less than \u398(n3) time, but this negative result does not rule out the possibility of algorithms with average, rather than worst-case, subcubic running time. Indeed, in this work we describe the first truly-subcubic average complexity procedure for this problem for graphs whose edge lengths are uniformly distributed in [0,1]. Our procedure finds the largest triangle in average quadratic time, which is the best possible complexity of any algorithm for this problem. We also give empirical evidence that the quadratic average complexity holds for many other random distributions of the edge lengths. A notable exception is when the lengths are distances between random points in Euclidean space, for which the algorithm takes average cubic time

    NEW IDEAS TO SPEED-UP FLOYD-WARSHALL SHORTEST PATHS ALGORITHM

    Get PDF
    Floyd and Warshall’s algorithm for the all-pairs shortest path problem is a Θ(n3) procedure which revisits n times all the cells of an n×n distance matrix. At each pass, all the cells are checked but only some of them get updated. In this paper, we report some preliminary results on a new version of the algorithm, designed to avoid checking cells which will not be updated, in order to reduce the overall time. Our procedure uses heaps to quickly identify which cells can be good candidates for an update. The new version improves over Floyd-Warshall’s original for those input graphs in which the number of cells updated over all passes is substantially smaller than the number of checks. However, our procedure is worse than the original if the ratio between cell checks and updates is not large enough. To obtain an improvement independently of the particular instance type, we propose a hybrid combination of the two approaches, which starts with the original Floyd and Warshall version and then switches to the new one after some iterations. Preliminary experiments show the effectiveness of this strateg

    Algorithmic strategies for a fast exploration of the TSP 4 -OPT neighborhood

    Get PDF
    We describe an effective algorithm for exploring the 4 -OPT neighborhood for the Traveling Salesman Problem. 4 -OPT moves change a tour into another by replacing four of its edges. The best move can be found by a Θ (n4) algorithm by complete enumeration, but a Θ (n3) dynamic programming algorithm exists in the literature. Furthermore a Θ (n2) algorithm also exists for a particular subset of symmetric 4 -OPT moves. In this work we describe a new procedure which behaves, on average, slightly worse than a quadratic algorithm over all moves (estimated at O(n2.5)) and like a quadratic algorithm on the symmetric moves. Computational results are reported which show the effectiveness of our strategy compared to other algorithms for finding the best 4 -OPT move, and discuss the strength of the 4 -OPT neighborhood compared to 2- and 3 -OPT

    Finding the Best 3-{OPT} Move in Subcubic Time

    Get PDF
    Given a Traveling Salesman Problem solution, the best 3-OPT move requires us to remove three edges and replace them with three new ones so as to shorten the tour as much as possible. No worst-case algorithm better than the \u398(n3 ) enumeration of all triples is likely to exist for this problem, but algorithms with average case O(n3 12\u25b ) are not ruled out. In this paper we describe a strategy for 3-OPT optimization which can find the best move by looking only at a fraction of all possible moves. We extend our approach also to some other types of cubic moves, such as some special 6-OPT and 5-OPT moves. Empirical evidence shows that our algorithm runs in average subcubic time (upper bounded by O(n2.5 )) on a wide class of random graphs as well as Traveling Salesman Problem Library (TSPLIB) instances
    corecore