95,204 research outputs found

    Worst-Case Efficient Sorting with QuickMergesort

    Full text link
    The two most prominent solutions for the sorting problem are Quicksort and Mergesort. While Quicksort is very fast on average, Mergesort additionally gives worst-case guarantees, but needs extra space for a linear number of elements. Worst-case efficient in-place sorting, however, remains a challenge: the standard solution, Heapsort, suffers from a bad cache behavior and is also not overly fast for in-cache instances. In this work we present median-of-medians QuickMergesort (MoMQuickMergesort), a new variant of QuickMergesort, which combines Quicksort with Mergesort allowing the latter to be implemented in place. Our new variant applies the median-of-medians algorithm for selecting pivots in order to circumvent the quadratic worst case. Indeed, we show that it uses at most nlogn+1.6nn \log n + 1.6n comparisons for nn large enough. We experimentally confirm the theoretical estimates and show that the new algorithm outperforms Heapsort by far and is only around 10% slower than Introsort (std::sort implementation of stdlibc++), which has a rather poor guarantee for the worst case. We also simulate the worst case, which is only around 10% slower than the average case. In particular, the new algorithm is a natural candidate to replace Heapsort as a worst-case stopper in Introsort

    Merger Policy and Tax Competition

    Get PDF
    In many situations governments have sector-specific tax and regulation policies at their disposal to influence the market outcome after a national or an international merger has taken place. In this paper we study the implications for merger policy when countries non-cooperatively deploy production-based taxes. We find that whether national or international mergers are more likely to be enacted in the presence of nationally optimal tax policies depends crucially on the ownership structure of firms. When all firms are owned domestically in the pre-merger situation, non-cooperative tax policies are more efficient in the national merger case and smaller synergy effects are needed for this type of merger to be proposed and cleared. These results are reversed when there is a high degree of foreign firm ownership prior to the merger

    The impact of cluster mergers on arc statistics

    Full text link
    We study the impact of merger events on the strong lensing properties of galaxy clusters. Previous lensing simulations were not able to resolve dynamical time scales of cluster lenses, which arise on time scales which are of order a Gyr. In this case study, we first describe qualitatively with an analytic model how some of the lensing properties of clusters are expected to change during merging events. We then analyse a numerically simulated lens model for the variation in its efficiency for producing both tangential and radial arcs while a massive substructure falls onto the main cluster body. We find that: (1) during the merger, the shape of the critical lines and caustics changes substantially; (2) the lensing cross sections for long and thin arcs can grow by one order of magnitude and reach their maxima when the extent of the critical curves is largest; (3) the cross section for radial arcs also grows, but the cluster can efficiently produce this kind of arcs only while the merging substructure crosses the main cluster centre; (4) while the arc cross sections pass through their maxima as the merger proceeds, the cluster's X-ray emission increases by a factor of 5\sim5. Thus, we conclude that accounting for these dynamical processes is very important for arc statistics studies. In particular, they may provide a possible explanation for the arc statistics problem.Comment: 16 pages, submitted to MNRAS, revised version after referee' Comments. Gzipped file including full resolution images can be downloaded at http://dipastro.pd.astro.it/~cosmo/massimo/high-res-images.tar.g
    corecore