scholarly journals Dynaplex: analyzing program complexity using dynamically inferred recurrence relations

2021 ◽  
Vol 5 (OOPSLA) ◽  
pp. 1-23
Author(s):  
Didier Ishimwe ◽  
KimHao Nguyen ◽  
ThanhVu Nguyen

Being able to detect program runtime complexity is useful in many tasks (e.g., checking expected performance and identifying potential security vulnerabilities). In this work, we introduce a new dynamic approach for inferring the asymptotic complexity bounds of recursive programs. From program execution traces, we learn recurrence relations and solve them using pattern matching to obtain closed-form solutions representing the complexity bounds of the program. This approach allows us to efficiently infer simple recurrence relations that represent nontrivial, potentially nonlinear polynomial and non-polynomial, complexity bounds. We present Dynaplex, a tool that implements these ideas to automatically generate recurrence relations from execution traces. Our preliminary results on popular and challenging recursive programs show that Dynaplex can learn precise relations capturing worst-case complexity bounds (e.g., O ( n log n ) for mergesort, O (2 n ) for Tower of Hanoi and O ( n 1.58 ) for Karatsuba’s multiplication algorithm).

2019 ◽  
Vol 41 (4) ◽  
pp. 1-52
Author(s):  
Krishnendu Chatterjee ◽  
Hongfei Fu ◽  
Amir Kafshdar Goharshady

Author(s):  
Adrijan Božinovski ◽  
George Tanev ◽  
Biljana Stojčevska ◽  
Veno Pačovski ◽  
Nevena Ackovska

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.


Filomat ◽  
2020 ◽  
Vol 34 (5) ◽  
pp. 1471-1486
Author(s):  
S. Fathi-Hafshejani ◽  
Reza Peyghami

In this paper, a primal-dual interior point algorithm for solving linear optimization problems based on a new kernel function with a trigonometric barrier term which is not only used for determining the search directions but also for measuring the distance between the given iterate and the ?-center for the algorithm is proposed. Using some simple analysis tools and prove that our algorithm based on the new proposed trigonometric kernel function meets O (?n log n log n/?) and O (?n log n/?) as the worst case complexity bounds for large and small-update methods. Finally, some numerical results of performing our algorithm are presented.


2015 ◽  
Vol 7 (1) ◽  
Author(s):  
Audy Audy

Data sorting is a technique that widely used as a part of a bigger process. Therefore, data sorting should not be the problem of program complexity. This paper gives the reader a comparison between two sorting algorithms, which are comparison based and non-comparison based, in time and space performance. The data type that used in this paper is an integer data type. Testing is carried out by using two types of data’s condition, which are the worst-case condition in each algorithm, and two amounts of data, which represent the maximum and minimum amount data.


Author(s):  
Yurii Nesterov

AbstractIn this paper we develop new tensor methods for unconstrained convex optimization, which solve at each iteration an auxiliary problem of minimizing convex multivariate polynomial. We analyze the simplest scheme, based on minimization of a regularized local model of the objective function, and its accelerated version obtained in the framework of estimating sequences. Their rates of convergence are compared with the worst-case lower complexity bounds for corresponding problem classes. Finally, for the third-order methods, we suggest an efficient technique for solving the auxiliary problem, which is based on the recently developed relative smoothness condition (Bauschke et al. in Math Oper Res 42:330–348, 2017; Lu et al. in SIOPT 28(1):333–354, 2018). With this elaboration, the third-order methods become implementable and very fast. The rate of convergence in terms of the function value for the accelerated third-order scheme reaches the level $$O\left( {1 \over k^4}\right) $$O1k4, where k is the number of iterations. This is very close to the lower bound of the order $$O\left( {1 \over k^5}\right) $$O1k5, which is also justified in this paper. At the same time, in many important cases the computational cost of one iteration of this method remains on the level typical for the second-order methods.


2020 ◽  
Vol 24 (23) ◽  
pp. 17609-17620 ◽  
Author(s):  
Yurii Nesterov

AbstractIn this paper, we suggest a new technique for soft clustering of multidimensional data. It is based on a new convex voting model, where each voter chooses a party with certain probability depending on the divergence between his/her preferences and the position of the party. The parties can react on the results of polls by changing their positions. We prove that under some natural assumptions this system has a unique fixed point, providing a unique solution for soft clustering. The solution of our model can be found either by imitation of the sequential elections, or by direct minimization of a convex potential function. In both cases, the methods converge linearly to the solution. We provide our methods with worst-case complexity bounds. To the best of our knowledge, these are the first polynomial-time complexity results in this field.


Sign in / Sign up

Export Citation Format

Share Document