Review: A State-of-the-Art of Time Complexity (Non-Recursive and Recursive Fibonacci Algorithm)

Solving strategies in the computation the time complexity of an algorithm is very essentials. Some existing methods have inoptimal in the explanations of solutions, because it takes a long step and for the final result is not exact, or only limited utilize in solving by the approach. Actually there have been several studies that develop the final model equation Fibonacci time complexity of recursive algorithms, but the steps are still needed a complex operation. In this research has been done several major studies related to recursive algorithms Fibonacci analysis, which involves the general formula series, begin with determining the next term directly with the equation and find the sum of series also with an equation too. The method used in this study utilizing decomposition technique with backward substitution based on a single side outlining. The final results show of the single side outlining was found that this technique is able to produce exact solutions, efficient, easy to operate and more understand steps.


Introduction
The time complexity of an algorithm can be solved with the approach that is usually performed by analysis of the syntax of an algorithm that begins with created a initial function use the symbol sigma with a specified lower bound and upper bound value (for non-recursive), or does not use the symbol sigma (for recursive). And from the initial functions that contain symbol sigma will be simplified into a function that can be directly calculated result of its complexity without must go through an iterative process or another similar mode of operation like that. The way of that it can be a solution to create formula as a model equation for the time complexity of any algorithm.
Some techniques that are typically used to solve the initial function is a Backward Substitution, Master Theorem, and other. Backward Substitution is outlining iteratively until get and can identifying the patterns of result including into the specific series. Backward Substitution is more priority to outlining any side that exist from initial equation or initial functions (as in outlining equation (20) with both side). Each side is outlining or elaboration iteratively again until meet the best case conditions, that it involve needs a long time and difficult to solve too. In fact, for each side of elaboration operations, these function appeared mostly side by side identical form of decomposition p-ISSN: 2540-9433; e-ISSN: 2540-9824 operation on one or several levels from previous steps or the next steps analysis, so it's actually can be simplified.
It can be seen that the decomposition of the initial function at the solving measured of time complexity to the algorithm Fibonacci is entered in the form of recursive analysis. In a previous study, Binet is a scientist math has successfully proved one of number theory very unique (number theory), the theory for solving the order of the Fibonacci sequence (Fibonacci series) directly with an equation non-recursive, and also Lucas (1870-1871) who proposed the theory of numbers associated with the series called Lucas sequence [10][11] [8] such as those mentioned in the equation (1). As a consequence, the series is easy to calculate and understood by other researchers widely. But for measured time complexity of Fibonacci numbers are still rare that connects the pseudo code that is used from the many call recursive functions and input size of it's after elaborated or described by the theory of Binet, and most previous studies as in [9] is not mentioned and explained clearly and detail.
Odendahl (2016) has made measured time complexity of Fibonacci algorithms, but using the approach, namely by equating or change the value of side of the fewer steps (input size is smaller) with a side of the steps more or deeper (input size is larger) [9]. As a consequence the value of the final result of time complexity are inexact, or merely restrict the actual solution and can be ensured not optimal, that is equal to O(2 n ). The first problem is how to resolve the Fibonacci time complexity of the algorithm using the proposed method to produce the exact solution. But, until now the existing methods are still difficult to understand how it can be solve because the explanations are not simple. The second problem that arises is when using decompose using more than one side, two side or all sides, it will result in inefficient in terms of speed to get the value of the same solution. Therefore, in this research, the proposed technique, parsing one side and the other side with identical shape, will be equated and need not be described more depth. In this case, this step is a special treatment that really should be done to create a strategy to reach a solution through an approach of the analysis the pattern of results itself. Thus, the end result of completion the time complexity can be faster and also proved to be more simple in the steps of the solution.

Fibonacci Number
Fibonacci numbers are a sequence which has a unique form that was discovered by Leonardo of Pisa in Fig. 1, a mathematician from Italia. One of the things that underlie him, it was when he began to be interested in learning the concept of the number of Arabs who are easier to use for any calculations and more practical, than the Roman numerals from their own nation. He has contributed and been instrumental in introducing the Arabic numerals to the Westerner [1]. And this can be imagined how difficult the west in doing any calculations, previously while being ignorant of Arabic numerals. In addition, the Fibonacci number patterns are also known in some form that exists in nature, and when identified, it has been known, here there are, the value of the unique scale called the golden ratio ( = 1 + −1 = (1 + √5 )/2 ≈ 1.618), it is a key digits, which is able to generate Fibonacci sequence that is very interesting to learn more deeply [2]  A non-recursive and recursive method in java programming that can be used to compute the n-th term of Fibonacci sequence can be seen in Table 1 [7], and also displayed in the source code of the form of equation Binet's closed-form formula [5]. From the results, it is displaying the Fibonacci sequence that has a little different from its initial value, ie there that starts at 0 and there are starts at 1. The more interesting is finding Fibonacci numbers in the shape of the earth, such as the research that was conducted by Akhtaruzzaman and Amir (2011) which states that part of the position of the Earth, that has a value of the golden ratio, which exists in Mecca [4]. The shape of the Fibonacci sequence could be constructed clearly by initializing the initial two values, 0 and 1 as the first and second term. Each the n-th term have the basic rules, namely U n = U n-1 + U n-2 . However, in many previous types of research, U n have been using an equation directly without any conditions recursively in equation [5].
By using the concept of geometric series, then obtained the summation sequence of Fibonacci numbers to the n-th (S n ) with completion as below:

Time Complexity Analysis Non-Recursive and Recursive Case
Time Complexity Analysis was used to calculate the time of computing an algorithm based on the number of iteration in the basic operation. So, researcher it can choose the better, which algorithm that should be used among other things based on the value of the time complexity according to the input size of data. Before discussed in more detail, related to the complexity of recursive algorithms, here will be described and presented other examples related to the completion of the algorithm non-recursive very easy to understand together, as a fundamental illustration of how the analysis works, the algorithm is Sequential Search, and Unique Element [6]. There are three kinds of time complexity of the non-recursive algorithm, namely Best Case, Worst Case and Average Case.
Because the definition of the base case is the value of K is found in the first element in the array A, then the equation (3) at the upper bound of the index i can be equated to the value of lower bound, namely (n-1) = 0.
And to make it easier in solving equation (4), because it is seen that in the sigma, there are no indexes that are being run in sigma, so it can be modified lower and upper values, by giving the same treatment, such as lower and upper bound respectively their added by value +1.
Result of Best Case in equation (5) will be used a basis for calculating the Best Case of Unique Element algorithm, which is known the procedure as follows Unique Element: Definition of Worst Case on Sequential Search is the value of K is found in the last element in the array A. In ( ) = ∑ 1 −1 =0 all iteration should be run from beginning to end, and it can be modified lower bound and upper bound because in the sigma, no index i is being run. At the beginning of the index value, if starting from i = 0 is considered less prevalent, and should be be modified into i = (0 + 1) so that i starting from a value of 1, this is used to easier in calculation. If the lower bound is changed, the upper bound should also be given the same treatment to be changed too, from (n -1) to (n -1 + 1) or can be simply written in a simple form become n.
Step by step to solving Worst Case in equation (7) will be used as the basis for calculating the Worst Case of Unique Element algorithm as follows: Because of the equation (8), it is known that in C(n) there are indices i are being run in sigma, then there should be no modification of the lower and upper bounds. The solution is described by the elaboration until at specific depths, and then identified a pattern, including what the series? and then made simplification process. Thus, in equation (8) has been not contain sigma.
In equation (9), if this analyzed more deeply, the description forms the pattern of arithmetic series with a first term is (n-1), the last term is 1, the number of terms is (n-2 + 1) = (n-1), the reason added by value 1 because the lower bound value starting from zero, and the different for each − −1 is equal same value, namely -1. Thus, simplified form of equation (9) above, became as below [14]: Based on Table 1, steps to resolve the equation (7) can also be used as a guide for a solution for the calculation of Non-Recursive Fibonacci algorithm.
c. Average Case The concept of the Average Case is K found in the middle element of the array A, which can be found in the 2nd element or on one element before the last element. Another explanation, if a value K is found in elements exclude from the first element and the last element, it can be said that the condition includes the Average Case. In the perspective of a simple analysis, ideally, these average conditions exist in the position of an element in the midst Array. But on different case or instances, for example the value in its array is different and K that searched that too is different, then this can be ascertained that the value of K is found not always in the mid of element, or more precisely the solution position will always be random, especially when each value of K is changed. Therefore, the calculation of the complexity of the specific time for the average case condition, consider the value of the weight in the form of probability value, that every found of the value of K at a specific position, for example at the position iteration i-th and i will be multiplied by the value of the probability of a K value when found at the time, namely with number of occurrences is only once, so the p-ISSN: 2540-9433; e-ISSN: 2540-9824 number of events is 1, and the value of this (1) then be divided by the number of all the iteration are possible from the search process, for this matter the value can be taken from the value of Worst case in equation (7) of the Sequential Search algorithm ( ( ) = ). The first step that should do is to ascertain whether the value of a lower bound for each index has been started from the value of 1. This is because the index value as the value multiplier that have meaning as many operation of iteration that has been (or already) run, so if starting from 0, then it is like no operations of iteration, although it will be multiplied with any big value of probability then the result must equal with zero and not contributes anything towards the calculation of average case, even though the initial value 0, It states the index for the first iteration. Forms formula of time complexity ( ) = ∑ 1 −1 =0 based on equation (7) will be changed to ( ) = as a guide for resolving the time complexity for average case. Here are detailed descriptions of the calculation Average Case for Sequential Search algorithm.
In equation (13), why counter = i, because for identifying the number of iteration, so it can be continue to increase value in sequentially up to the value of the magnitude time complexity of the worst case, that if it displayed would generate output like 1, 2, 3, 4, 5, 6, .............., ( ).
Step by step to solving Average Case in equation (13) will be used as a guide for calculating the Average Case of Unique Element algorithms, with a viewpoint, whether the same element may be discovered at the position, exclude from the Best Case and Worst Case, and for details of the solution can be viewed as below: 1. Change the lower bound if it not starting from 1, index value should be changed starting from 1, for example, the time complexity in equation (8) can changed into, Because in the equation (14), lower bound at the first sigma notation, value i = 0, changed into i = (0 + 1), so upper bound at the first sigma notation must be changed from (n-2) become ((n-2)+1). And automatically, it will have an effect also in the second sigma, it mean if the value of i in the first sigma added by value 1, and because lower bound in the second sigma, valued j = (i + 1), which states that the value of the index of j depends on the value of i, so the upper bound in the second sigma should also be added value 1, in order not to change the number of operation of in the iteration, from an early form of the both sigma, before be done the change. 2. In the same way from the equation (14), it will be attempted to be used in the average case solution from Unique Element algorithm.

Compute Time Complexity
and so on, because of the outlining of the both sides more complex, then selected the outlining of only with a single side that more simple but still the end result is the same. It can be seen that equation (27) produced from the outlining of the both sides is the have same result as the equation (21) that produced from the outlining of a single side. And Pascal triangle pattern is formed from the outlining by the both sides, to support these results, can also be found in previous research [12][13].

Conclusion
From the final result it can be concluded that the time complexity of Fibonacci recursive algorithm is less than 2 n . The value of C(n) can also be obtained in exact form without p-ISSN: 2540-9433; e-ISSN: 2540-9824 any approximation. Thus, the exact result from the outlining with a single side can be said to be more precise than the approximation method. This approximation method replaces the lower bound C(n-2) from the formula C(n) = C(n-1) + C(n-2) +1 with the upper bound C(n-1) to become C(n) = 2C(n-1) +1). It is intended to simplify the outlining in its calculations, but it ignores the optimal results that would be obtained. The suggestion for future research is to develop Fibonacci algorithm in m stages, namely C(n) = C(n-1) + C(n-2) + C(n-3) + ...... + C(n-m), which can also be solved with a single side or other better methods of the outlining.