Improved Deterministic Algorithms for Decremental Transitive Closure and Strongly Connected Components

Author(s):  
Jakub Łącki
2004 ◽  
Vol 11 (12) ◽  
Author(s):  
Olivier Danvy ◽  
Ulrik P. Schultz

Lambda-lifting is a program transformation that is used in compilers, partial evaluators, and program transformers. In this article, we show how to reduce its complexity from cubic time to quadratic time, and we present a flow-sensitive lambda-lifter that also works in quadratic time. <br /> <br />Lambda-lifting transforms a block-structured program into a set of recursive equations, one for each local function in the source program. Each equation carries extra parameters to account for the free variables of the corresponding local function <em>and of all its callees</em>. It is the search for these extra parameters that yields the cubic factor in the traditional formulation of lambda-lifting, which is due to Johnsson. This search is carried out by computing a transitive closure. <br /> <br />To reduce the complexity of lambda-lifting, we partition the call graph of the source program into strongly connected components, based on the simple observation that <em>all functions in each component need the same extra parameters and thus a transitive closure is not needed</em>. We therefore simplify the search for extra parameters by treating each strongly connected component instead of each function as a unit, thereby reducing the time complexity of lambda-lifting from O(n^3) to O(n^2), where n is the size of the program. <br /> <br />Since a lambda-lifter can output programs of size O(n^2), our algorithm is asympotically optimal.


2003 ◽  
Vol 10 (26) ◽  
Author(s):  
Olivier Danvy ◽  
Ulrik P. Schultz

Lambda-lifting is a program transformation used in compilers and in partial evaluators and that operates in cubic time. In this article, we show how to reduce this complexity to quadratic time, and we present a flow-sensitive lambda-lifter that also works in quadratic time.<br /> <br />Lambda-lifting transforms a block-structured program into a set of recursive equations, one for each local function in the source program. Each equation carries extra parameters to account for the free variables of the corresponding local function <em>and of all its callees</em>. It is the search for these extra parameters that yields the cubic factor in the traditional formulation of lambda-lifting, which is due to Johnsson. This search is carried out by a transitive closure.<br /> <br />Instead, we partition the call graph of the source program into strongly connected components, based on the simple observation that <em>all functions in each component need the same extra parameters and thus a transitive closure is not needed</em>. We therefore simplify the search for extra parameters by treating each strongly connected component instead of each function as a unit, thereby reducing the time complexity of lambda-lifting from O(n^3 log n) to O(n^2 log n), where n is the size of the program.<br /> <br />Since a lambda-lifter can output programs of size O(n^2), we believe that our algorithm is close to optimal.


2002 ◽  
Vol 9 (30) ◽  
Author(s):  
Olivier Danvy ◽  
Ulrik P. Schultz

Lambda-lifting is a program transformation used in compilers and in partial evaluators and that operates in cubic time. In this article, we show how to reduce this complexity to quadratic time.<br /> <br /> Lambda-lifting transforms a block-structured program into a set of recursive equations, one for each local function in the source program. Each equation carries extra parameters to account for the free variables of the corresponding local function and of all its callees. It is the search for these extra parameters that yields the cubic factor in the traditional formulation of lambda-lifting, which is due to Johnsson. This search is carried out by a transitive closure.<br /> <br />Instead, we partition the call graph of the source program into strongly connected components, based on the simple observation that all functions in each component need the same extra parameters and thus a transitive closure is not needed. We therefore simplify the search for extra parameters by treating each strongly connected component instead of each function as a unit, thereby reducing the time complexity of lambda-lifting from O(n^3 log n) to O(n^2 log n), where n is the size of the program. <br /><br />Since a lambda-filter can output programs of size O(n^2), we believe that our algorithm is close to optimal.<br /><br />Superseded by (BRICS-RS-03-26 and) BRICS-RS-04-12.


2021 ◽  
Vol 1 ◽  
pp. 122-133
Author(s):  
Alexey V. Oletsky ◽  
◽  
Mikhail F. Makhno ◽  
◽  

A problem of automated assessing of students’ study projects is regarded. A heuristic algorithm based on fuzzy estimating of projects and on pairwise comparisons among them is proposed. For improving adequacy and naturalness of grades, an approach based on introducing a parameter named relaxation parameter was suggested in the paper. This enables to reduce the spread between maximum and minimum values of projects in comparison with the one in the standard scale suggested by T. Saati. Reasonable values of this parameter were selected experimentally. For estimating the best alternative, a center of mass of a fuzzy max-min composition should be calculated. An estimation algorithm for a case of non-transitive preferences based on getting strongly connected components and on pairwise comparisons between them is also suggested. In this case, relaxation parameters should be chosen separately for each subtask. So the combined technique of evaluating alternatives proposed in the paper depends of the following parameters: relaxation parameters for pairwise comparisons matrices within each strongly connected components; relaxation parameter for pairwise comparisons matrices among strongly connected components; membership function for describing the best alternative.


Sign in / Sign up

Export Citation Format

Share Document