Time Complexity Analysis of the Binary Tree Roll Algorithm

Authors

  • Adrijan Božinovski School of Computer Science and Information Technology, University American College Skopje
  • George Tanev School of Computer Science and Information Technology, University American College Skopje
  • Biljana Stojčevska School of Computer Science and Information Technology, University American College Skopje
  • Veno Pačovski School of Computer Science and Information Technology, University American College Skopje
  • Nevena Ackovska Faculty of Computer Science and Engineering, University “Sv. Kiril i Metodij”, Skopje

DOI:

https://doi.org/10.7251/JIT1602053B

Abstract

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.

Published

2017-01-04

Issue

Section

Чланци