Time complexity analysis of a simple code: using graph plotting and pattern based approach

Thumbnail Image

Date

2024-11

Journal Title

Journal ISSN

Volume Title

Publisher

BRAC University

Abstract

Computation is a core topic in computer science. We code in Java, python, c++ or any other programming language for the backend and frontend of computers. To accomplish a task, a software system applies a collection of interconnected algorithms[ 6]. Most of the time, we measure the run time of a program using only our visual calculations. Our research shows that this visualization could be represented graphically and compute time complexity using a pattern based approach. Our research can find an infinite loop in some cases. Calculation can be represented in a complexity graph and analyze the time complexity. This study will help to precalculate before program execution, save running time, reduce computation, and create a new viewpoint in coding. The immediate goal is to visualize complexity in a programming language and is this possible to detect infinite loops from code. Another challenge for programmers often arises is to determine and detect infinite loops. Moreover, we can also calculate the complexity of recursive calls. However, in this challenging segment, there are two things that need to be addressed, i.e, space and time complexity. This is dependent on depth, number of calls and many other factors.

Description

Cataloged from PDF version of thesis.
Includes bibliographical references (pages 33-34).
This thesis is submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Science, 2024.

Keywords

Computation, Control statement, Control variable, Time complexity, Infinite loops, Function variable, Complexity measuring tool

Citation

Endorsement

Review

Supplemented By

Referenced By