- Research Article
10
- 10.1016/j.dam.2022.03.005
A faster FPTAS for knapsack problem with cardinality constraint
- Apr 04, 2022
- Discrete Applied Mathematics
- Wenxin Li + 2 more +2
A faster FPTAS for knapsack problem with cardinality constraint
In this paper, we study the problem of efficiently finding gene clusters formalized by nested common intervals between two genomes represented either as permutations or as sequences. Considering permutations, we give several algorithms whose running time depends on the size of the actual output rather than the output in the worst case. Indeed, we first provide a straightforward O(n 3) time algorithm for finding all nested common intervals. We reduce this complexity by providing an O(n 2) time algorithm computing an irredundant output. Finally, we show, by providing a third algorithm, that finding only the maximal nested common intervals can be done in linear time. Considering sequences, we provide solutions (modifications of previously defined algorithms and a new algorithm) for different variants of the problem, depending on the treatment one wants to apply to duplicated genes.KeywordsGene ClusterLinear TimeTime AlgorithmIdentity PermutationConsecutive IntegerThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
A faster FPTAS for knapsack problem with cardinality constraint
A faster FPTAS for knapsack problem with cardinality constraint
Correction to "A linear-time algorithm for triangulating a simple polygon"
In "A linear-time algorithm for triangulating a simple polygon" [Proceedings of the Eighteenth Annual ACM Symposium on Theory of Computing (1986), 380-388. 486], the analysis showing that the authors' triangulation algorithm runs in linear time is incorrect, and indeed the algorithm does not run in linear time in the worst case. So far they have been unable to obtain a linear-time algorithm for the triangulation problem. They have been able to obtain an O(n loglogn)-time algorithm, however. The details are described in "An O(n loglogn)-Time Algorithm for Triangulating a Simple Polygon," SIAM Journal on Computing 17, 1 (February, 1988), to appear.
Read moreValidation of Minimal Worst-Case Time Complexity by Stirling’s, Ramanujan’s, and Mortici’s Approximation
We have a lot of sorting algorithms in practice in this modern informatica world. Most of them are operating in quadratic time, some have managed to get them down to logarithmic time combined with linear, but there is no sorting algorithm that is efficient enough to sort data in linear time alone. In this paper, we will try to devise some mathematical support to the failure of minimalizing the sorting algorithms in linear time by comparing three well-known approximations of ! with detailed mathematical proofs associated with it. Further, this paper deals with detailed mathematical analysis to support the fact the minimum time complexity that can be attained by a sorting algorithm is of order O( ) without taking into account any extrapolated system advancement or computer architecture modification. There are various sorting algorithms like Merge sort, Heap sort, Interpolation sort, etc. which attains this minimum possible time complexity (worst case). But if we consider some biased cases then better time complexity can be obtained. If the elements of the array are in arithmetic progression, then interpolation search takes lesser time and there are many such biased cases where a particular algorithm gives better output but this paper deals with the general case i.e., no conditions are imposed on the elements of the array.
Read moreAn optimal algorithm for area minimization of slicing floorplans
The traditional algorithm of L. Stockmeyer (1983) for area minimization of slicing floorplans has time (and space) complexity O(n/sup 2/) in the worst case, or O(n log n) for balanced slicing. For more than a decade, it is considered the best possible. In this paper, we present a new algorithm of worst-case time (and space) complexity O(n log n), where n is the total number of realizations for the basic blocks, regardless whether the slicing is balanced or not. We also prove /spl Omega/(n log n) is the lower bound and the time complexity of any area minimization algorithm. Therefore, the new algorithm not only finds the optimal realization, but also has an optimal running time.
Read moreAlgorithms for two-agent unbounded serial-batch scheduling with makespan and maximum lateness objectives
<abstract><p>We study the problem of non-preemptively scheduling jobs from two agents on an unbounded serial-batch machine. Agents $ A $ and $ B $ have $ n_A $ and $ n_B $ jobs. The machine can process any number of jobs sequentially as a batch, and the processing time of the batch is equal to the total processing time of the jobs in it. Each batch requires a setup time before it is processed. Compatibility means that the jobs from different agents can be processed in a common batch; Otherwise, the jobs from different agents are incompatible. Both the compatible and incompatible models are considered, under both the batch availability and item availability assumptions. Batch availability means that any job in a batch is not available until all the jobs in this batch are completed. Item availability means that a job in a batch becomes available immediately after it is completed processing. The completion time of a job is defined to be the moment when it is available. The goal is to minimize the makespan of agent $ A $ and the maximum lateness of agent $ B $ simultaneously. For the compatible model with batch availability, an $ O(n_A+n_B^2\log n_B) $-time algorithm is presented which improves the existing $ O(n_A+n_B^4\log n_B) $-time algorithm. A slight modification of the algorithm solves the incompatible model with batch availability in $ O(n_A+n_B^2\log n_B) $ time, which has the same time complexity as the existing algorithm. For the compatible model with item availability, the analysis shows that it is easy and admits an $ O(n_A+n_B\log n_B) $-time algorithm. For the incompatible model with item availability, an $ O(n_A+n_B\log n_B) $-time algorithm is also obtained which improves the existing $ O(n_A+n_B^2) $-time algorithm. The algorithms can generate all Pareto optimal points and find a corresponding Pareto optimal schedule for each Pareto optimal point.</p></abstract>
Read moreA Polynomial Time Constant Approximation For Minimizing Total Weighted Flow-time
We consider the classic scheduling problem of minimizing the total weighted flow-time on a single machine (min-WPFT), when preemption is allowed. In this problem, we are given a set of $n$ jobs, each job having a release time $r_j$, a processing time $p_j$, and a weight $w_j$. The flow-time of a job is defined as the amount of time the job spends in the system before it completes; that is, $F_j = C_j - r_j$, where $C_j$ is the completion time of job. The objective is to minimize the total weighted flow-time of jobs. This NP-hard problem has been studied quite extensively for decades. In a recent breakthrough, Batra, Garg, and Kumar presented a {\em pseudo-polynomial} time algorithm that has an $O(1)$ approximation ratio. The design of a truly polynomial time algorithm, however, remained an open problem. In this paper, we show a transformation from pseudo-polynomial time algorithms to polynomial time algorithms in the context of min-WPFT. Our result combined with the result of Batra, Garg, and Kumar settles the long standing conjecture that there is a polynomial time algorithm with $O(1)$-approximation for min-WPFT.
Read more3SUM in Preprocessed Universes: Faster and Simpler
We revisit the 3SUM problem in the \emph{preprocessed universes} setting. We present an algorithm that, given three sets $A$, $B$, $C$ of $n$ integers, preprocesses them in quadratic time, so that given any subsets $A' \subseteq A$, $B' \subseteq B$, $C' \subseteq C$, it can decide if there exist $a \in A'$, $b \in B'$, $c \in C'$ with $a+b=c$ in time $O(n^{1.5} \log n)$. In contrast to both the first subquadratic $\tilde{O}(n^{13/7})$-time algorithm by Chan and Lewenstein (STOC 2015) and the current fastest $\tilde{O}(n^{11/6})$-time algorithm by Chan, Vassilevska Williams, and Xu (STOC 2023), which are based on the Balog--Szemerédi--Gowers theorem from additive combinatorics, our algorithm uses only standard 3SUM-related techniques, namely FFT and linear hashing modulo a prime. It is therefore not only faster but also simpler. Just as the two previous algorithms, ours not only decides if there is a single 3SUM solution but it actually determines for each $c \in C'$ if there is a solution containing it. We also modify the algorithm to still work in the scenario where the set $C$ is unknown at the time of preprocessing. Finally, even though the simplest version of our algorithm is randomized, we show how to make it deterministic losing only polylogarithmic factors in the running time. 12 pages. This is the TheoretiCS journal version (invited article from SOSA 2025)
Read moreFast Nonadaptive Deterministic Algorithm for Conflict Resolution in a Dynamic Multiple-Access Channel
A classical problem in addressing a decentralized multiple-access channel is resolving conflicts when a set of stations attempt to transmit at the same time on a shared communication channel. In a static scenario, i.e., when all stations are activated simultaneously, Komlós and Greenberg [IEEE Trans. Inform. Theory, 31 (1985), pp. 302--306] in their seminal work showed that it is possible to resolve the conflict among $k$ stations from an ensemble of $n$, with a nonadaptive deterministic algorithm in time $O(k + k \log(n/k))$ in the worst case. In this paper we show that in a dynamic scenario, when the stations can join the channel at arbitrary rounds, there is a nonadaptive deterministic algorithm guaranteeing a successful transmission for each station in only a slightly bigger time: $O(k\log n\log\log n)$ in the worst case. This almost matches the $\Omega(k\log n/\log k)$ lower bound by Greenberg and Winograd [J. ACM, 32 (1985), pp. 589--596] that holds even in much stronger settings: for adaptive algorithms, in the static scenario, and with additional channel feedback--collision detection. In terms of channel utilization, our result implies throughput, understood as the average number of successful transmissions per time unit, $\Omega(1/(\log n\log\log n))$ on the dynamic deterministic channel.
Read moreAn improved algorithm on unbounded parallel-batching scheduling to minimize maximum cost and makespan
This paper studies the bicriteria problem of scheduling n jobs on a parallel-batching machine to minimize maximum cost and makespan simultaneously. A parallel-batching machine is a machine that can handle up to b jobs in a batch. The jobs in a batch start and complete respectively at the same time and the processing time of a batch is equal to the largest processing time of jobs in the batch. We consider the unbounded case. For the above bicriteria scheduling problem, we present an O(n3)-time algorithm, which improved the best known O(n4)-time algorithm, and the time complexity is the same as the special case in which maximum cost is maximum lateness. Meanwhile, our algorithm can also solve the single-criterion unbounded parallel-batching scheduling problem to minimize maximum cost in O(n3) time, which improved the best known O(n4)-time algorithm.
Read moreWhen Recursion is Better than Iteration: A Linear-Time Algorithm for Acyclicity with Few Error Vertices
Planarity, bipartiteness and (directed) acyclicity are basic graph properties with classic linear time recognition algorithms. However, the problems of testing whether a given (di)graph has k vertices whose deletion makes it planar, bipartite or a directed acyclic graph (DAG) are all fundamental NP-complete problems when k is part of the input. As a result, a significant amount of research has been devoted to understanding whether, for every fixed k, these problems admit a polynomial time algorithm (where the exponent in the polynomial is independent of k) and in particular, whether they admit linear time algorithms. While we now know that for any fixed k, we can test in linear time whether a graph is k vertices away from being planar [FOCS 2009, SODA 2014] or bipartite [SODA 2014, SICOMP 2016], the best known algorithms in the case of directed acyclicity are the algorithm of Garey and Tarjan [IPL 78] which runs in time O(nk–1m) and the algorithm of Chen, Liu, Lu, O'Sullivan and Razgon [JACM 2008] which runs in time O(k!4kk4nm). In other words, it has remained open whether it is possible to recognize in linear time, a graph which is 2 vertices away from being acyclic! In this paper, we settle this question by giving an algorithm that decides whether a given graph is k vertices away from being acyclic, in time O(k!4kk5(n + m)). That is, for every fixed k, our algorithm runs in time O(m + n), thus mirroring the case for planarity and bipartiteness. Our algorithm is designed via a general methodology that shaves off a factor of n from some algorithms that use the powerful technique of iterative compression. The two main features of our methodology are: (i) This is the first generic technique for designing linear time algorithms for directed cut-problems and (ii) it can be used in combination with future improvements in algorithms for the compression version of other well-studied cut-problems such as Multicut and Directed Subset Feedback Vertex Set.
Read moreAn optimal time algorithm for finding a maximum weight independent set in a tree
The maximum weight independent set problem for a general graph is NP-hard. But for some special classes of graphs, polynomial time algorithms do exist for solving it. Based on the divide-and-conquer strategy, Pawagi has presented anO(|V|log|V|) time algorithm for solving this problem on a tree. In this paper, we propose anO(|V|) time algorithm to improve Pawagi's result. The proposed algorithm is based on the dynamic programming strategy and is time optimal within a constant factor.
Read moreA Special Case of Rational Identity Testing and the Brešar-Klep Theorem.
We explore a special case of rational identity testing and algorithmic versions of two theorems on noncommutative polynomials, namely, Amitsur's theorem [S.A Amitsur, 1966] and the Bresar-Klep theorem [Bresar and Klep, 2008] when the input polynomial is given by an algebraic branching program (ABP). Let f be a degree-d n-variate noncommutative polynomial in the free ring Q over rationals. 1) We consider the following special case of rational identity testing: Given a noncommutative ABP as white-box, whose edge labels are linear forms or inverses of linear forms, we show a deterministic polynomial-time algorithm to decide if the rational function computed by it is equivalent to zero in the free skew field Q . Given black-box access to the ABP, we give a deterministic quasi-polynomial time algorithm for this problem. 2) Amitsur's theorem implies that if a noncommutative polynomial f is nonzero on k x k matrices then, in fact, f(M_1,M_2,...,M_n) is invertible for some matrix tuple (M_1,M_2,...,M_n) in (M_k(ℚ))^n. While a randomized polynomial time algorithm to find such (M_1,M_2,...,M_n) given black-box access to f is simple, we obtain a deterministic s^{O(log d)} time algorithm for the problem with black-box access to f, where s is the minimum ABP size for f and d is the degree of f. 3) The Bresar-Klep Theorem states that the span of the range of any noncommutative polynomial f on k x k matrices over Q is one of the following: zero, scalar multiples of I_k, trace-zero matrices in M_k(Q), or all of M_k(Q). We obtain a deterministic polynomial-time algorithm to decide which case occurs, given white-box access to an ABP for f. We also give a deterministic s^{O(log d)} time algorithm given black-box access to an ABP of size s for f. Our algorithms work when k >= d. Our techniques are based on some automata theory combined with known techniques for noncommutative ABP identity testing [Ran Raz and Amir Shpilka, 2005; Michael A. Forbes and Amir Shpilka, 2013].
Read moreOn Computing the Fréchet Distance Between Surfaces.
We describe two (1+epsilon)-approximation algorithms for computing the Frechet distance between two homeomorphic piecewise linear surfaces R and S of genus zero and total complexity n, with Frechet distance delta. (1) A 2^{O((n + ( (Area(R)+Area(S))/(epsilon.delta)^2 )^2 )} time algorithm if R and S are composed of fat triangles (triangles with angles larger than a constant). (2) An O(D/(epsilon.delta)^2) n + 2^{O(D^4/(epsilon^4.delta^2))} time algorithm if R and S are polyhedral terrains over [0,1]^2 with slope at most D. Although, the Frechet distance between curves has been studied extensively, very little is known for surfaces. Our results are the first algorithms (both for surfaces and terrains) that are guaranteed to terminate in finite time. Our latter result, in particular, implies a linear time algorithm for terrains of constant maximum slope and constant Frechet distance.
Read moreTime Complexity Analysis of the Binary Tree Roll Algorithm
This paper presents the time complexity analysis of the Binary Tree Roll algorithm. The time complexity is analyzed theoretically and the results are then confirmed empirically. The theoretical analysis consists of finding recurrence relations for the time complexity, and solving them using various methods. The empirical analysis consists of exhaustively testing all trees with given numbers of nodes and counting the minimum and maximum steps necessary to complete the roll algorithm. The time complexity is shown, both theoretically and empirically, to be linear in the best case and quadratic in the worst case, whereas its average case is shown to be dominantly linear for trees with a relatively small number of nodes and dominantly quadratic otherwise.
Read moreHow to Achieve an Equivalent Simple Permutation in Linear Time
The problem of Sorting signed permutations by reversals is a well studied problem in computational biology. The first polynomial time algorithm was presented by Hannenhalli and Pevzner in 1995 [5]. The algorithm was improved several times, and nowadays the most efficient algorithm has a subquadratic running time [9,8]. Simple permutations played an important role in the development of these algorithms. Although the latest result of Tannier et al. [8] does not require simple permutations the preliminary version of their algorithm [9] as well as the first polynomial time algorithm of Hannenhalli and Pevzner [5] use the structure of simple permutations. However, the latter algorithms require a precomputation that transforms a permutation into an equivalent simple permutation. To the best of our knowledge, all published algorithms for this transformation have at least a quadratic running time. For further investigations on genome rearrangement problems, the existence of a fast algorithm for the transformation could be crucial. In this paper, we present a linear time algorithm for the transformation.
Read more