# New results on the Baire partial quasi-metric space, fixed point theory and asymptoticcomplexity analysis for recursive programs

- Maryam A Alghamdi
^{1}, - Naseer Shahzad
^{2}Email author and - Oscar Valero
^{3}

**2014**:14

https://doi.org/10.1186/1687-1812-2014-14

© Alghamdi et al.; licensee Springer. 2014

**Received: **10 September 2013

**Accepted: **12 December 2013

**Published: **20 January 2014

## Abstract

In Cerdà-Uguet *et al.* (Theory Comput. Syst. 50:387-399, 2012), a newmathematical fixed point technique, that uses the so-called Baire partial quasi-metricspace, was introduced with the aim of providing the asymptotic complexity of a class ofrecursive algorithms. The aforementioned technique presents the advantage that requiresless calculations than the quasi-metric original one given by Schellekens (Electron. NotesTheor. Comput. Sci. 1:211-232, 1995). In this paper we continue the study, started inCerdà-Uguet *et al.* (Theory Comput. Syst. 50:387-399, 2012), on the use ofpartial quasi-metric spaces for asymptotic complexity analysis of algorithms. Concretely,our main purpose is to prove that the Baire partial quasi-metric space is an appropriatemathematical framework for discussing via fixed point arguments the asymptotic complexityof a general class of recursive algorithms to which all the algorithms analyzed inCerdà-Uguet *et al.* (Theory Comput. Syst. 50:387-399, 2012) belong. Theobtained results are illustrated by means of applying them to yield the complexity of twocelebrated recursive algorithms which don not belong to the class discussed inCerdà-Uguet *et al.* (Theory Comput. Syst. 50:387-399, 2012).

**MSC:** 47H10, 54E50, 68Q15, 68Q25, 68W40.

## Keywords

## 1 Introduction

In 1994, Matthews introduced the notion of partial metric space in order to obtain a newmathematical framework to model computational recursion processes in program verification bymeans of ‘metric’ fixed-point techniques [1]. Moreover, he gave an application of this new metric structure to parallelcomputing by means of a partial metric version of the celebrated Banach fixed-point theoremin [2]. Later on, in 1995, Schellekens introduced the (quasi-metric) complexity space asa new mathematical approach of the foundation for the asymptotic complexity analysis ofalgorithms [3]. The applicability of this theory to the asymptotic complexity analysis of Divideand Conquer algorithms was also illustrated by Schellekens, in the same reference, usingfixed-point arguments based on the use of a quasi-metric version of the aforementionedBanach fixed-point theorem.

Motivated by the utility of quasi-metric spaces for the asymptotic complexity analysis ofalgorithms via fixed-point techniques and the usefulness of partial metric spaces to analyzeprogram correctness, the possibility of analyzing the asymptotic complexity of algorithmsvia Matthews’ fixed-point theorem was discussed recently in [4]. However, in the aforesaid reference it was shown that, at first, such ananalysis cannot be carried out through the aforementioned result. In consequence, in thepreceding reference a new mathematical tool, which was called the Baire partial quasi-metricspace, was introduced in order to provide a novel mathematical framework for the asymptoticcomplexity analysis of algorithms which unify, under the same framework, the quasi-metricfixed-point arguments originating with the Schellekens approach and the seminal ideas ofMatthews on partial metric spaces. The mathematical framework based on the Baire partialquasi-metric space presents the advantage of providing the complexity of the algorithmsunder consideration through easier and fewer calculations than those given in theSchellekens methods. In [4], the applicability of the Baire partial-quasi-metric fixed-point techniques wereillustrated discussing the complexity of a few particular and celebrated recursivealgorithms. Nevertheless, in the class of recursive algorithms there are some whosecomplexity cannot be analyzed be means of the fixed-point techniques developed in [4]. Examples of this kind of algorithms are the well-know algorithms that solves theTowers of Hanoi puzzle and the algorithm that computes the value of the Fibonacci sequence,which we will call Hanoi and Fibonacci, respectively, in the following.

In this paper we continue and improve the study started in [4] of the use of partial quasi-metrics for asymptotic complexity analysis ofalgorithms. Concretely, our main purpose is to prove that the Baire partial quasi-metricspace is a suitable mathematical framework for discussing by means of fixed-point argumentsthe asymptotic complexity of a general class of recursive algorithms to which the Hanoi,Fibonacci and all the algorithms analyzed in [4] belong.

The remainder of the paper is organized as follows: Section 2 is devoted, on the onehand, to recall the basics on asymptotic complexity analysis of algorithms and, on the otherhand, to introduce the reader to the associated current metric fixed-point tools.Concretely, we recall briefly, with the aim of motivating our subsequent work, theSchellekens fixed-point method and how it can be applied to the complexity analysis of someDivide and Conquer algorithms. Moreover, the fundamentals on partial metric spaces and theirutility in complexity analysis of algorithms are also discussed. Furthermore, in the samesection, we recall, according to [4], how both frameworks, the quasi-metric and the partial metric one, are unified inorder to construct a new mathematical approach, the so-called Baire partial quasi-metricspace, which preserves the original Schellekens ideas and allows to apply the Matthewsseminal ones to complexity analysis. In Section 3, our new results are presented. Inparticular, we introduce a new fixed-point technique based on the Baire partial quasi-metricspace that extends the provided one in [4] and, in addition, allows to provide easily the complexity of some algorithmswhich cannot be analyzed by means of the aforementioned technique given in [4]. Finally, we validate the developed theory applying it to an analysis andretrieving the asymptotic complexity of the celebrated Hanoi and Fibonacci.

## 2 The asymptotic complexity analysis of algorithms and metric fixed-point tools

### 2.1 The fundamentals

From now on, ${\mathbb{R}}^{+}$ and ℕ will denote the set of nonnegative real numbersand the set of positive integer numbers, respectively.

In complexity analysis of algorithms, the running time of computing, that is the timetaking by an algorithm in order to solve the problem for which it has been designed, playsa crucial role (see, for instance, [5]). Usually there are several algorithms that are able to solve a fixed problem.Thus, in a natural way, the complexity analysis focus its interest on determining which ofthem has less complexity, that is which takes less running time of computing. In order tocompare the complexity of all algorithms solving the same problem, the running time ofcomputing of each algorithm is denoted by a function $T:\mathbb{N}\to (0,\mathrm{\infty}]$ in such a way that $T(n)$ represents the time taken by the algorithm to solve theproblem under consideration when the input of the algorithm is of size *n*. Hence,one can compare the running time of computing all the aforesaid algorithms by means of thecomparison of their associated functions.

Nevertheless, given an algorithm, to asses which is the function that describes itsrunning time of computing for every input size is, in many cases, a hard challenge. Forthis reason, in most situations it is enough to work, in order to compare the algorithmcomplexity, with an approximate running time of computing of each algorithm to becompared. To provide the running time of computing of algorithms in an approximate way isthe main objective of the so-called asymptotic complexity analysis of algorithms.

In what follows we recall a few pertinent notions from asymptotic complexity analysiswhich will be a crucial role in our subsequent work. To this end, we will denote by$\mathcal{RT}$ the set of all functions from ℕ into$(0,\mathrm{\infty}]$.

Let $f\in \mathcal{RT}$ denote the running time of computing of a concrete algorithm.Moreover, given a certain function $g\in \mathcal{RT}$, consider that there exist ${n}_{0}\in \mathbb{N}$ and $c>0$ satisfying $f(n)\le cg(n)$ for all $n\in \mathbb{N}$ with $n\ge {n}_{0}$ (of course ≤ stands for the usual order on$(0,\mathrm{\infty}]$). Hence, it is clear that the function *g* provides anasymptotic upper bound of the running time *f* of the algorithm underconsideration. Therefore, if we do not have exact information as regards the expression ofthe function *f*, then the function *g* yields us an‘approximate’ information of the running time of computing *f* in sucha way that the considered algorithm takes a time to solve the problem boundedasymptotically above by *g*. Following the standard notation, we will write$f\in \mathcal{O}(g)$ provided that $f,g\in \mathcal{RT}$ and *g* is an asymptotic upper bound of*f*.

Of course, an asymptotic upper bound itself does not provide much information on thecomplexity *f* of the algorithm under study. In order to give a tighter bound onthe complexity *f*, in asymptotic complexity analysis of algorithms are used inaddition asymptotic lower bounds of the running time of computing. Concretely, a function$h\in \mathcal{RT}$ provides an asymptotic lower bound of the unknown runningtime of computing *f* under consideration provided that there exist${n}_{0}\in \mathbb{N}$ and $c>0$ such that $ch(n)\le f(n)$ for all $n\in \mathbb{N}$ with $n\ge {n}_{0}$. When *h* is an asymptotic lower bound of *f*we will denote it, as usual, by $f\in \mathrm{\Omega}(h)$.

Therefore when we have found two functions $h,g\in \mathcal{RT}$ such that $f\in \mathrm{\Omega}(h)\cap \mathcal{O}(g)$, we obtain, through *h* and *g*, a completeasymptotic information about the time *f* taken by the algorithm under discussion.Moreover, in case of *f* obeying the condition $f\in \mathrm{\Omega}(h)\cap \mathcal{O}(g)$, for any $h,g\in \mathcal{RT}$, we will say that $\mathrm{\Omega}(h)\cap \mathcal{O}(g)$ is the complexity class of *f*. Furthermore, we willdenoted the complexity class of *f* by $\mathrm{\Theta}(l)$ provided the existence of a function $l\in \mathcal{RT}$ such that $f\in \mathrm{\Omega}(l)\cap \mathcal{O}(l)$.

Accordingly, the main aim of the asymptotic complexity analysis is to describe therunning time of algorithms by means of determining its asymptotic complexity class.

### 2.2 The Schellekens approach and the quasi-metric complexity space

*X*is a non-empty set and

*d*is aquasi-metric on

*X*, where by a quasi-metric we mean a function$d:X\times X\to {\mathbb{R}}^{+}$ such that for all $x,y,z\in X$:

- (i)
$d(x,y)=d(y,x)=0\iff x=y$;

- (ii)
$d(x,y)\le d(x,z)+d(z,y)$.

*d*satisfies the next additionalcondition for all $x,y\in X$:

- (iii)
$d(x,y)=d(y,x)$.

It is well known that each quasi-metric *d* on *X* generates a${T}_{0}$-topology $\mathcal{T}(d)$ on *X* which has as a base the family of open*d*-balls $\{{B}_{d}(x,\epsilon ):x\in X,\epsilon >0\}$, where ${B}_{d}(x,\epsilon )=\{y\in X:d(x,y)<\epsilon \}$ for all $x\in X$ and $\epsilon >0$. Moreover, a quasi-metric space $(X,d)$ is called bicomplete if the metric space$(X,{d}^{s})$ is complete, where the metric ${d}^{s}$ is defined for all $x,y\in X$ by ${d}^{s}(x,y)=max(d(x,y),d(y,x))$.

Of course in equation (1) the convention that $\frac{1}{\mathrm{\infty}}=0$ is adopted.

Although in asymptotic complexity analysis of algorithms the running time of computing isrepresented by means of functions in $\mathcal{RT}$ and, thus, the condition ‘${\sum}_{n=1}^{\mathrm{\infty}}{2}^{-n}\frac{1}{f(n)}<\mathrm{\infty}$’ in not required, according to [3], every reasonable algorithm, from a computability point of view, must obey theaforementioned condition. Hence each algorithm can be associated with a function belongingto whichrepresents, as a function of the input size, its running time of computing.

The utility of the complexity space in algorithm complexity is given, in part, by thecomputational interpretation of the numerical value ${d}_{\mathcal{C}}(f,g)$. Concretely, given two functions $f,g\in \mathcal{C}$, the complexity distance from *f* to *g*, thatis ${d}_{\mathcal{C}}(f,g)$, provides information about the relative progress made inlowering the complexity by replacing any program *A* with complexity function*f* by any program *B* with complexity function *g* in such a waythat if $f\ne g$, the fact that ${d}_{\mathcal{C}}(f,g)=0$ can be interpreted as the program *A* is at least asefficient as the program *B*. In fact, the condition ${d}_{\mathcal{C}}(f,g)=0$ implies that $f\in \mathcal{O}(g)$.

It must be stressed that the asymmetry of ${d}_{\mathcal{C}}$ is key in order to provide information about the increase ofcomplexity whenever an algorithm is replaced by another one. Of course, a metric wouldgive at most information on the increase but it would not be able to provide whichalgorithm of both, *A* or *B*, is more efficient.

In [3], Schellekens gave an application of the complexity space to asymptoticcomplexity analysis. In particular, he gave a new method, based on the use of thecelebrated Banach fixed-point theorem, to analyze the running time of computing of Divideand Conquer algorithms.

In what follows we recall briefly the aforesaid method, since this will allow the readerto gain a better understanding of the motivation for our subsequent work (exposed inSection 3). To this end, let us recall that the Banach fixed-point theorem can bestated in the quasi-metric framework as follows.

**Theorem 1**

*Let*

*f*

*be a mapping from a bicomplete quasi*-

*metric space*$(X,d)$

*into itself such that there exists*$s\in [0,1)$

*satisfying*

*for all*
$x,y\in X$. *Then* *f* *has a unique fixed point*.

where $a,b\in \mathbb{N}$ with $a,b>1$, ${\mathbb{N}}_{b}=\{{b}^{k}:k\in \mathbb{N}\}$, $c>0$ and $h\in \mathcal{C}$ with $h(n)<\mathrm{\infty}$ for all $n\in \mathbb{N}$.

Observe that for Divide and Conquer algorithms, it is sufficient to obtain the complexityon inputs of size *n* with *n* ranges over the set ${\mathbb{N}}_{b}$ (for a fuller treatment we refer the reader to [5]).

In order to provide the running time of computing of a Divide and Conquer algorithmsatisfying the recurrence equation (2), we have to prove that the recurrence equation hasa unique solution, which represents the running time, and, in addition, we have to computethe asymptotic complexity class of such a solution. As we show in the following, theannounced Schellekens method is able to prove that equation (2) has a unique solution andto yield an asymptotic upper bound (asymptotic lower bounds of the running time of Divideand Conquer algorithms were obtained by Schellekens following standard arguments which arenot based on the use of fixed-point techniques):

Then the quasi-metric space $({\mathcal{C}}_{b,c},{d}_{\mathcal{C}}{|}_{{\mathcal{C}}_{b,c}})$ is bicomplete, since the quasi-metric space$(\mathcal{C},{d}_{\mathcal{C}})$ is bicomplete (see [7] for the bicompleteness of ) and the set${\mathcal{C}}_{b,c}$ is closed in $(\mathcal{C},{d}_{\mathcal{C}}^{s})$.

for all $f,g\in {\mathcal{C}}_{b,c}$. Consequently, Theorem 1 guarantees the existence of aunique fixed point ${f}_{T}$ of ${\mathrm{\Phi}}_{T}$ and, thus, the existence and uniqueness of the solution tothe recurrence equation (2). Of course such a solution provides a unique possiblerepresentative of the running time.

In order to approximate, according to the Schellekens approach, the running time ofcomputing of the algorithms under consideration it remains to give an asymptotic upperbound of ${f}_{T}$. But Schellekens proved that ${f}_{T}\in \mathcal{O}(g)$ provided that $g\in {\mathcal{C}}_{b,c}$ and that ${\mathrm{\Phi}}_{T}(g)\le g$.

The preceding facts mentioned allow us to state the next useful result [3].

**Theorem 2** *A Divide and Conquer recurrence equation of the form* (2) *has a uniquesolution*
${f}_{T}$
*in*
${\mathcal{C}}_{b,c}$. *Moreover if there exists*
$g\in {\mathcal{C}}_{b,c}$
*such that the functional*
${\mathrm{\Phi}}_{T}$
*associated with equation* (2) *obeys*
${\mathrm{\Phi}}_{T}(g)\le g$, *then*
${f}_{T}\in \mathcal{O}(g)$.

With the aim of illustrating the real utility of Theorem 2, Schellekens applied itto provide a description of an asymptotic upper bound of the running time of computing ofMergesort (for a detailed discussion of Mergesort see, for instance, [5]). Specifically, he gave a new proof of the well-known fact that the (average)running time of computing of Mergesort ${f}_{T}^{M}$ is in $\mathcal{O}(n{log}_{2}n)$.

### 2.3 The partial metric space approach

In 1994, as we have announced in Section 1, Matthews introduced partial metricspaces with a twofold objective [1]. On the one hand, he claimed to present a new mathematical framework to modelcomputational recursion processes, in the spirit of Scott (see [8] for details of Scott theory), in program verification by means of‘metric’ fixed-point techniques. On the other hand, in order to achieve thelater purpose, he wanted to obtain an extension of Banach’s fixed-point theorem tothe partial metric context.

Let us recall a few basic notions about partial metric spaces in order to introduce theMatthews fixed-point theorem.

*X*is a non-empty set

*X*and

*p*is a function $p:X\times X\to {\mathbb{R}}^{+}$ satisfying for all $x,y,z\in X$:

- (i)
$p(x,x)=p(x,y)=p(y,y)\iff x=y$;

- (ii)
$p(x,x)\le p(x,y)$;

- (iii)
$p(x,y)=p(y,x)$;

- (iv)
$p(x,y)\le p(x,z)+p(z,y)-p(z,z)$.

*X*is a partial metric

*p*on

*X*satisfying, in addition, the following condition for all$x\in X$:

- (v)
$p(x,x)=0$.

It is well known that each partial metric *p* on *X* generates a${T}_{0}$ topology $\mathcal{T}(p)$ on *X* which has as a base the family of open*p*-balls $\{{B}_{p}(x,\epsilon ):x\in X,\epsilon >0\}$, where ${B}_{p}(x,\epsilon )=\{y\in X:p(x,y)<p(x,x)+\epsilon \}$ for all $x\in X$ and $\epsilon >0$. Moreover, as a consequence, a sequence${({x}_{n})}_{n\in \mathbb{N}}$ in a partial metric space $(X,p)$ converges to a point $x\in X$ with respect to $\mathcal{T}(p)\iff p(x,x)={lim}_{n\to \mathrm{\infty}}p(x,{x}_{n})$.

With the aim of introducing a partial metric version of the Banach fixed-point theorem,Matthews defined the notion of completeness in partial metric spaces. In particular, andaccording to [1], a sequence ${({x}_{n})}_{n\in \mathbb{N}}$ in a partial metric space $(X,p)$ is called a Cauchy sequence if ${lim}_{n,m\to \mathrm{\infty}}p({x}_{n},{x}_{m})$ exists. A partial metric space $(X,p)$ is said to be complete if every Cauchy sequence${({x}_{n})}_{n\in \mathbb{N}}$ in *X* converges, with respect to$\mathcal{T}(p)$, to a point $x\in X$ such that $p(x,x)={lim}_{n,m\to \mathrm{\infty}}p({x}_{n},{x}_{m})$.

The announced new fixed-point theorem can be stated for partial metric spaces asfollows.

**Theorem 3**

*Let*

*f*

*be a mapping from a complete partial metric space*$(X,p)$

*into itself such that there is*$s\in [0,1)$

*satisfying*

*for all*
$x,y\in X$. *Then* *f* *has a unique fixed point*. *Moreover if*
$x\in X$
*is the fixed point of* *f*, *then*
$p(x,x)=0$.

It is interesting to point out that Matthews used the preceding result to provide asuitable test for lazy data flow deadlock in Kahn’s model of parallel computation(for a fuller treatment of the application we refer the reader to [2]).

does not hold for any $s\in [0,1)$, where ${\mathrm{\Phi}}_{T}$ is the functional associated to the recurrence equation (2)and introduced in Section 2.2. Hence, the Matthews fixed-point theorem cannot beapplied to an analysis of the running time of computing of the Divide and Conqueralgorithms whose running time obeys equation (2).

and, hence, $\mathcal{T}({d}_{\mathcal{C}})=\mathcal{T}({p}_{\mathcal{C}})$.

Inspired by the fact that Matthews fixed-point theorem does not constitute a suitabletool for the aforementioned purpose, a thorough study of the possibility of applying thepartial metric ${p}_{\mathcal{C}}$ to asymptotic complexity analysis of algorithms has been donerecently in [10]. In particular, new fixed-point theorems which differ from the Matthews onehave been proved in such a way that they provide a new mathematical basis to carry out anasymptotic complexity analysis of algorithms via partial metrics (concretely via${p}_{\mathcal{C}}$).

### 2.4 The Baire partial quasi-metric space approach

Since Theorem 3 cannot be used to analyze the complexity of those algorithms whoserunning time of computing is the solution to a recurrence equation (2), the Baire partialquasi-metric space was introduced in [4]. This new mathematical structure allows us to carry out the asymptoticcomplexity analysis of algorithms in the spirit of Schellekens but now involving theoriginal fixed-point arguments of Matthews.

In order to introduce the aforementioned Baire partial quasi-metric space and theassociated fixed-point technique for complexity analysis developed in [4], let us first recall some basics on partial quasi-metrics.

*X*is a non-empty set and

*q*is apartial quasi-metric on

*X*. By a partial quasi-metric we mean a function$q:X\times X\to {\mathbb{R}}^{+}$ such that for all $x,y,z\in X$:

- (i)
$q(x,x)\le q(x,y)$;

- (ii)
$q(x,x)\le q(y,x)$;

- (iii)
$q(x,y)\le q(x,z)+q(z,y)-q(z,z)$;

- (iv)
$q(x,x)=q(x,y)$ and $q(y,y)=q(y,x)\iff x=y$.

*X*is a partial quasi-metric satisfying inaddition the condition:

- (v)
$q(x,y)=q(y,x)$ for all $x,y\in X$.

Similarly to the case of partial metric spaces a partial quasi-metric *q*generates a ${T}_{0}$-topology $\mathcal{T}(q)$ on *X* which has as a base the family of open*q*-balls $\{{B}_{q}(x,\epsilon ):x\in X,\epsilon >0\}$, where ${B}_{q}(x,\epsilon )=\{y\in X:q(x,y)<q(x,x)+\epsilon \}$ for all $x\in X$ and $\epsilon >0$.

*q*on

*X*induces a quasi-metric ${d}_{q}:X\times X\to {\mathbb{R}}^{+}$ in the following way:

for all $x,y\in X$. Moreover, a partial quasi-metric space$(X,q)$ is said to be complete provided that the associatedquasi-metric space $(X,{d}_{q})$ is bicomplete.

The Matthews fixed-point theorem, Theorem 3 in Section 2.3, was extended to thecontext of partial quasi-metric spaces as follows [11].

**Theorem 4**

*Let*

*f*

*be a mapping from a complete partial quasi*-

*metric space*$(X,q)$

*into itself such that there is*$s\in [0,1)$,

*satisfying*

*for all*
$x,y\in X$. *Then* *f* *has a unique fixed point*. *Moreover if*
$x\in X$
*is the fixed point of* *f*, *then*
$q(x,x)=0$.

It is worth to point out that generalizations of the preceding result have been obtainedfor a few type of contractions in partial quasi-metrics spaces in [12] and [13], recently.

In the light of the exposed notions, and according to [4], the Baire partial quasi-metric space can be introduced as follows.

Let Σ be a non-empty alphabet endowed with a partial order ⪯. Denote by${\mathrm{\Sigma}}^{\mathrm{\infty}}$ the set of all finite and infinite sequences (words) overΣ. Moreover, if $x\in {\mathrm{\Sigma}}^{\mathrm{\infty}}$ denote by $l(x)$ the length of *x* ($l(x)\in [1,\mathrm{\infty}]$). Furthermore, given $x,y\in {\mathrm{\Sigma}}^{\mathrm{\infty}}$, we will say that *x* is a subprefix of *y*,denoted by $x{\u2291}_{sp}y$, provided that $l(x)\le l(y)$ and ${x}_{k}\u2aaf{y}_{k}$ for all $k\le l(x)$.

for all $x,y\in {\mathrm{\Sigma}}^{\mathrm{\infty}}$.

with $c>0$ and $h\in \mathcal{RT}$ such that $h(n)<\mathrm{\infty}$ for all $n\in \mathbb{N}$.

More specifically, the utility in asymptotic complexity analysis of the fixed-pointtechnique developed in [4] lies in the following result.

**Theorem 5**

*Let*$\mathrm{\Sigma}=(0,\mathrm{\infty}]$.

*Fix*$c\in \mathrm{\Sigma}$

*and*$z\in {\mathrm{\Sigma}}^{\mathrm{\infty}}$

*with*$l(z)=\mathrm{\infty}$

*and*${z}_{k}\ne \mathrm{\infty}$

*for all*$k\in \mathbb{N}$

*with*$k\ge 2$.

*Let*${\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}$

*be the subset of*${\mathrm{\Sigma}}^{\mathrm{\infty}}$

*given by*${\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}:=\{y\in {\mathrm{\Sigma}}^{\mathrm{\infty}}:1\le l(y)\mathit{\text{and}}{y}_{1}=c\}$

*and let*${\mathrm{\Phi}}_{z}:{\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}\to {\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}$

*be the mapping defined by*

*Then*
${\mathrm{\Phi}}_{z}$
*has a unique fixed point*
$w\in {\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}$. *Moreover*, $l(w)=\mathrm{\infty}$. *Furthermore*, *if*
$u\in {\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}$
*such that*
${\mathrm{\Phi}}_{z}(u){\u2291}_{sp}u$
*then*
$w{\u2291}_{sp}u$.

The new mathematical technique that follows from Theorem 5 is provided by the resultbelow.

**Corollary 6**

*Let*${\mathcal{RT}}_{c}=\{f\in \mathcal{RT}:f(1)=c\}$

*and let*${\mathrm{\Gamma}}_{T}:{\mathcal{C}}_{c}\to {\mathcal{C}}_{c}$

*be the functional associated to recurrence equation*(6)

*and given by*

*for all*$f\in \mathcal{RT}$.

*Then the following assertions hold*:

- (1)
*A recurrence equation of the form*(6)*has a unique solution*${f}_{T}\in {\mathcal{RT}}_{c}$. - (2)
*If there exists*$g\in {\mathcal{RT}}_{c}$*such that*${\mathrm{\Gamma}}_{T}(g)\le g$,*then*${f}_{T}\in \mathcal{O}(g)$.

In the light of the preceding results, it should be pointed out that they allow one toprovide, via fixed-point techniques, an asymptotic upper bound of the running time ofcomputing of those algorithms under consideration but not its complexity class (accordingto the Schellekens approach exposed in Section 2.2). Moreover, they allow to achievethis without assuming the condition ‘${\sum}_{n=1}^{\mathrm{\infty}}{2}^{-n}\frac{1}{f(n)}<\mathrm{\infty}$ for all $f\in \mathcal{RT}$’, which is an advantage with respect to the Schellekensapproach.

## 3 The new results

where $h\in \mathcal{RT}$ such that $h(n)<\mathrm{\infty}$ for all $n\in \mathbb{N}$, $k\in \mathbb{N}$, ${c}_{i}>0$, and ${a}_{i}\ge 1$ for all $1\le i\le k$.

*n*with $n\in \mathbb{N}$, which we will call Fibonacci. Concretely, the running time ofcomputing of Hanoi satisfies the next recurrence equation

where $c>0$.

Obviously, the recurrence equations (9) and (10) can be retrieved as a particular case ofthe recurrence equation (8). Observe, also, that the recurrence equation (6) can beretrieved from the recurrence equation (8). For a fuller treatment of Hanoi and Fibonacci werefer the reader to [14].

In [15] and [16], the Schellekens approach, exposed in Section 2.2, was extended and a newfixed-point technique based on the use of the (quasi-metric) complexity space was introducedin order to provide the complexity class of those recursive algorithms with running timesatisfying the recurrence equation (8). The aforesaid technique was applied successfully toyield lower and upper asymptotic complexity bounds of Hanoi and Fibonacci in the samereferences. However, such a quasi-metric fixed-point technique involves arduous computations(see, for instance, Theorem 5 in [15] and Theorem 5 in [16]) when compared with the technique based on the Baire partial quasi-metric andgiven by Theorem 5.

Motivated, on the one hand, by the fact that Theorem 5 is not able to provide thecomplexity class of algorithms like Hanoi and Fibonacci and, on the other hand, by the factthat the Baire partial quasi-metric allows one to develop fixed-point techniques thatrequire fewer and easier calculations than those involved by the Schellekens approach andexposed in [15] and [16], in this section we introduce a new mathematical technique based on the Bairepartial quasi-metric, given by Theorem 9, which extends the technique provided byTheorem 5 and, in addition, allows to provide easily, by means of Theorem 11, theasymptotic class of those recursive algorithms whose running time satisfies the recurrenceequation (8).

### 3.1 The new fixed-point technique

In order to present the announced technique we need to introduce the followinglemmata.

**Lemma 7** *Let*
$\mathrm{\Sigma}=(0,\mathrm{\infty}]$, $k\in \mathbb{N}$
*and*
${c}_{1},{c}_{2},\dots ,{c}_{k}\in \mathrm{\Sigma}$. *Let*
${\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$
*be the subset of*
${\mathrm{\Sigma}}^{\mathrm{\infty}}$
*given by*
${\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}:=\{y\in {\mathrm{\Sigma}}^{\mathrm{\infty}}:k\le l(y)\mathit{\text{and}}{y}_{m}={c}_{m}\mathit{\text{with}}1\le m\le k\}$. *Then*
${\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$
*is closed in*
$({\mathrm{\Sigma}}^{\mathrm{\infty}},{d}_{{q}_{B}}^{s})$.

*Proof*Suppose that ${({u}^{n})}_{n\in \mathbb{N}}$ is a sequence in ${\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$ which converges to

*w*in $({\mathrm{\Sigma}}^{\mathrm{\infty}},{d}_{{q}_{B}}^{s})$. First of all we prove that $k\le l(w)$. Indeed, assume that $l(w)<k$. Then taking $\epsilon ={2}^{-l(w)}-{2}^{-k}$ we find that there exists ${n}_{0}\in \mathbb{N}$ such that

which is a contradiction. So $k\le l(w)$.

Next we show that ${w}_{m}={c}_{m}$ for all $1\le m\le k$. To this end, assume that there exists${k}_{0}\in \mathbb{N}$ with ${k}_{0}<k$ such that ${w}_{m}={c}_{m}$ for all $m\le {k}_{0}$ and ${w}_{{k}_{0}+1}\ne {c}_{{k}_{0}+1}$. We distinguish two possible cases:

*n*. Taking $\epsilon ={2}^{-{k}_{0}}-{2}^{-l(w)}$ we have guaranteed the existence of ${n}_{0}\in \mathbb{N}$ such that

*w*in $({\mathrm{\Sigma}}^{\mathrm{\infty}},{d}_{{q}_{B}}^{s})$. Hence

which is impossible.

It follows that $k+1\le {k}_{0}<k$, which is impossible.

Consequently ${w}_{m}={c}_{m}$ for all $1\le m\le k$ and, thus, $w\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$. Therefore ${\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$ is closed in $({\mathrm{\Sigma}}^{\mathrm{\infty}},{d}_{{q}_{B}}^{s})$. □

**Lemma 8**

*Let*

*f*

*be a mapping from a complete partial quasi*-

*metric space*$(X,q)$

*into itself such that there is*$s\in [0,1[$

*satisfying*

*for all*$x,y\in X$.

*Then*

*f*

*has a unique fixed point*

*x*.

*Moreover*,

*the following assertions hold*:

- (1)
*If there exists*$y\in X$*such that*$q(f(y),y)=0$*then*$q(x,y)=0$. - (2)
*If there exists*$y\in X$*such that*$q(y,f(y))=0$*then*$q(y,x)=0$.

*Proof* First of all we note that the existence and uniqueness of the fixed point*x* of *f* is guaranteed by Theorem 4.

It follows that $1\le s<1$, which is a contradiction.

(2) Similar arguments to those given in the proof of (1) apply to the proof of assertion (2). □

The next result provides the mathematical foundations for the fixed-point techniqueuseful for analyzing the complexity class of recursive algorithms whose running time ofcomputing satisfies the recurrence equation (8).

**Theorem 9**

*Let*$\mathrm{\Sigma}=(0,\mathrm{\infty}]$

*and*$k\in \mathbb{N}$.

*Fix*${a}_{1},{c}_{1},{a}_{2},{c}_{2},\dots ,{a}_{k},{c}_{k}\in \mathrm{\Sigma}$

*and*$z\in {\mathrm{\Sigma}}^{\mathrm{\infty}}$

*with*$l(z)=\mathrm{\infty}$

*and*${z}_{m}\ne \mathrm{\infty}$

*for all*$m\in \mathbb{N}$

*and*$m\ge k+1$.

*Let*${\mathrm{\Phi}}_{z}:{\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}\to {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$

*be the mapping defined by*

*Then the following assertions hold*:

- (1)
${\mathrm{\Phi}}_{z}$

*has a unique fixed point*$w\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$. - (2)
$l(w)=\mathrm{\infty}$.

- (3)
*If*$u\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$*such that*${\mathrm{\Phi}}_{z}(u){\u2291}_{sp}u$,*then*$w{\u2291}_{sp}u$. - (4)
*If*$v\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$,*then*$v{\u2291}_{sp}w$*provided that*$l(v)=\mathrm{\infty}$*and*$v{\u2291}_{sp}{\mathrm{\Phi}}_{z}(v)$.

*Proof*The completeness of the Baire partial quasi-metric space$({\mathrm{\Sigma}}^{\mathrm{\infty}},{q}_{B})$ shows that the quasi-metric space $({\mathrm{\Sigma}}^{\mathrm{\infty}},{d}_{{q}_{B}})$ is bicomplete. Moreover, by Lemma 7, we see that the set${\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$ is closed in $({\mathrm{\Sigma}}^{\mathrm{\infty}},{d}_{{q}_{B}}^{s})$. Thus the quasi-metric space $({\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}},{d}_{{q}_{B}})$ is bicomplete. Whence we deduce that the partial quasi-metricspace $({\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}},{q}_{B})$ is complete. Furthermore, it is a straightforward computationto check that the mapping ${\mathrm{\Phi}}_{z}:{\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}\to {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$ obeys the following inequality:

for all $u,v\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$. It follows, by Theorem 4, that ${\mathrm{\Phi}}_{z}$ has a unique fixed point $w\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$ with ${q}_{B}(w,w)=0$. Hence $l(w)=\mathrm{\infty}$. So we have proved statements (1) and (2).

Now assume the existence of $u\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$ such that ${\mathrm{\Phi}}_{z}(u){\u2291}_{sp}u$. It follows, by construction of ${\mathrm{\Phi}}_{z}$, that $l(u)=l({\mathrm{\Phi}}_{z}(u))=\mathrm{\infty}$. Since ${\mathrm{\Phi}}_{z}(u){\u2291}_{sp}u$ we obtain ${q}_{B}({\mathrm{\Phi}}_{z}(u),u)=0$. Hence, by assertion (1) in statement of Lemma 8, wefind that ${q}_{B}(w,u)=0$. Whence we deduce that ${l}_{\u2aaf}(w,u)=\mathrm{\infty}$ and, hence, that $w{\u2291}_{sp}u$. This proves statement (3).

Finally, assume the existence of $v\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$ such that $l(v)=\mathrm{\infty}$. It follows that $l({\mathrm{\Phi}}_{z}(v))=\mathrm{\infty}$. Since $v{\u2291}_{sp}{\mathrm{\Phi}}_{z}(v)$ we deduce that ${q}_{B}(v,{\mathrm{\Phi}}_{z}(v))=0$. Hence, by assertion (2) in statement of Lemma 8, wefind that ${q}_{B}(v,w)=0$. Whence we deduce that $v{\u2291}_{sp}w$. This proves statement (4). □

We must emphasize that taking $k=1$ and ${a}_{1}=1$ in statement of Theorem 9 we retrieve, as a particularcase, Theorem 5. Moreover, setting $k=1$ and ${a}_{1}=a$ for any $a\in \mathbb{N}$ with $a>1$ in statement of Theorem 9 we obtain the followingcorollary.

**Corollary 10**

*Let*$\mathrm{\Sigma}=(0,\mathrm{\infty}]$.

*Fix*$a,c\in \mathrm{\Sigma}$

*and*$z\in {\mathrm{\Sigma}}^{\mathrm{\infty}}$

*with*$a>1$, $l(z)=\mathrm{\infty}$

*and*${z}_{k}\ne \mathrm{\infty}$

*for all*$k\in \mathbb{N}$

*and*$k\ge 2$.

*Let*${\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}$

*be the subset of*${\mathrm{\Sigma}}^{\mathrm{\infty}}$

*given by*${\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}:=\{y\in {\mathrm{\Sigma}}^{\mathrm{\infty}}:1\le l(y)\mathit{\text{and}}{y}_{1}=c\}$

*and let*${\mathrm{\Phi}}_{z}:{\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}\to {\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}$

*be the mapping defined by*

*Then the following assertions hold*:

- (1)
${\mathrm{\Phi}}_{z}$

*has a unique fixed point*$w\in {\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}$. - (2)
$l(w)=\mathrm{\infty}$.

- (3)
*If*$u\in {\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}$*such that*${\mathrm{\Phi}}_{z}(u){\u2291}_{sp}u$,*then*$w{\u2291}_{sp}u$. - (4)
*If*$v\in {\mathrm{\Sigma}}_{c}^{\mathrm{\infty}}$,*then*$v{\u2291}_{sp}w$*provided that*$l(v)=\mathrm{\infty}$*and*$v{\u2291}_{sp}{\mathrm{\Phi}}_{z}(v)$.

where $S(m)=T({b}^{m-1})$ and $r(m)=h({b}^{m-1})$ for all $m\in \mathbb{N}$ (recall that ${\mathbb{N}}_{b}=\{{b}^{k}:k\in \mathbb{N}\}$ with $b\in \mathbb{N}$ and $b>1$).

with $a>1$, $c>0$, and $h\in \mathcal{RT}$ such that $h(n)<\mathrm{\infty}$ for all $n\in \mathbb{N}$.

Notice that the recurrence equation (9) associated to Hanoi is a concrete case ofequation (16). Besides, celebrated examples of algorithms whose running time of computinglead to the recurrence equations (2) and (16) are, for instance, Mergesort and Quicksort(for more details see [5] and [14]).

### 3.2 The application to asymptotic complexity analysis

Then Theorem 9 provides, in a very easy way without involving arduous computations,the promised asymptotic complexity technique, Theorem 11, to determine the asymptoticcomplexity (upper and lower) bounds, and thus the complexity class, of the running time ofthose algorithms under study.

**Theorem 11** *A recurrence equation of the form* (8) *has a unique solution*
${f}_{T}\in {\mathcal{RT}}_{c,k}$. *Moreover*, *if there exist*
$g,h\in {\mathcal{RT}}_{c,k}$
*such that*
${\mathrm{\Gamma}}_{T}(g)\le g$
*and*
$h\le {\mathrm{\Gamma}}_{T}(h)$, *then*
${f}_{T}\in \mathrm{\Omega}(h)\cap \mathcal{O}(g)$. *Furthermore*, ${f}_{T}\in \mathrm{\Theta}(l)$
*provided that there exist*
$c,d>0$
*and*
$l\in {\mathcal{RT}}_{c,k}$
*in such a way that the preceding functions* *g*, *h* *satisfy*
$h(n)=cl(n)$
*and*
$g(n)=dl(n)$
*for all*
$n\in \mathbb{N}$.

*Proof* Let $w\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$ be the fixed point of the mapping ${\mathrm{\Phi}}_{z}$ ensured by Theorem 9. Now, define${f}_{w}\in {\mathcal{RT}}_{c,k}$ by ${f}_{w}(n)={w}_{n}$ for all $n\in \mathbb{N}$. Then we immediately see that ${f}_{w}$ is the unique solution to the recurrence equation (8). So${f}_{w}$ can be identified with the running time of computing of arecursive algorithm satisfying the recurrence equation (8), say ${f}_{T}$. Of course, ${f}_{T}(n)={f}_{w}(n)={w}_{n}$ for all $n\in \mathbb{N}$.

Next assume that there exists $g\in {\mathcal{RT}}_{c,k}$ such that ${\mathrm{\Gamma}}_{T}(g)\le g$. Then we identify such a function with a word${u}^{g}\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$ which is defined by ${u}_{n}^{g}=g(n)$ for all $n\in \mathbb{N}$. It is obvious that ${\mathrm{\Phi}}_{z}({u}^{g}){\u2291}_{sp}{u}^{g}$. It follows, by Theorem 9, that $w{\u2291}_{sp}{u}^{g}$. Hence we have showed that ${f}_{w}\in \mathcal{O}(g)$ or, equivalently, that ${f}_{T}\in \mathcal{O}(g)$.

Now suppose that there exists $h\in {\mathcal{RT}}_{c,k}$ such that $h\le {\mathrm{\Gamma}}_{T}(h)$. Then we identify such a function with a word${v}^{h}\in {\mathrm{\Sigma}}_{c,k}^{\mathrm{\infty}}$ which is defined by ${v}_{n}^{h}=h(n)$ for all $n\in \mathbb{N}$. Clearly $l({v}^{h})=\mathrm{\infty}$ and ${v}^{h}{\u2291}_{sp}{\mathrm{\Phi}}_{z}({v}^{h})$. By Theorem 9 we obtain ${v}^{h}{\u2291}_{sp}w$. Whence we deduce that $h\le {f}_{w}$ and, hence, that ${f}_{w}\in \mathrm{\Omega}(h)$ or, equivalently, that ${f}_{T}\in \mathrm{\Omega}(h)$.

Finally, assume that there exist $c,d>0$ and $l\in {\mathcal{RT}}_{c,k}$ such that the function $g,h$ satisfy $g(n)=cl(n)$ and $h(n)=dl(n)$ for all $n\in \mathbb{N}$. Since ${\mathrm{\Gamma}}_{T}(g)\le g$ and $h\le {\mathrm{\Gamma}}_{T}(h)$ we have ${f}_{w}\in \mathrm{\Omega}(h)\cap \mathcal{O}(g)$. It follows that ${f}_{w}\in \mathrm{\Omega}(l)\cap \mathcal{O}(l)$. Consequently ${f}_{w}\in \mathrm{\Theta}(l)$. Thus ${f}_{T}\in \mathrm{\Theta}(l)$. □

Observe that, although Theorem 5 can be obtained from Theorem 9, the lattergives a few more information about the running time of computing under consideration thanthe former. This is due to the fact that the assertion (4) in statement of Theorem 9allows to determine the lower asymptotic complexity bound for algorithms whose runningtime obeys equation (6) while that Theorem 5 does not allow one to do this.Consequently, the version of Theorem 5 retrieved from Theorem 9 improvesTheorem 5. So the new fixed-point result is clearly a non-trivial extension of theold one.

Furthermore, it must be stressed that a first attempt to apply fixed-point techniquesbased on the use of words to complexity analysis of algorithms was made in [17] by means of the so-called Baire balanced quasi-metric. However, theaforementioned quasi-metric fixed-point technique was only able to provide the existenceand uniqueness of solution to recurrence equations and not the complexity class. So, insome sense, our new technique improves those given in [17], since Theorem 9 allows to obtain the asymptotic complexity class of thesolution to a recurrence equation associated to an algorithm and, thus, the complexityclass of its running time of computing.

In order to help the reader to glimpse the utility of Theorem 11, and with it alsoof Theorem 9, we end the paper showing that, like the Schellekens approach, thedeveloped theory is helpful in providing the asymptotic complexity class of the recursivealgorithms whose running time satisfies the recurrence equation (8). In particular, weapply Theorem 11 to the analysis of Hanoi and Fibonacci, retrieving their well-knownasymptotic complexity class [14].

**Hanoi**As mentioned before, the running time of computing of Hanoi matches up withthe solution, under the uniform cost criterion assumption (see [14]), to the recurrence equation (9). Of course, such a recurrence equation can beretrieved from equation (8) as a particular case when we put $k=1$, ${c}_{1}=c$, ${a}_{1}=2$ and $h(n)=d$ for all $n\in \mathbb{N}$. Consider the functional associated with equation (9) andgiven by equation (17) as follows:

for all $f\in {\mathcal{RT}}_{c,1}$. Then Theorem 11 yields the existence and uniqueness of thesolution ${f}_{T}^{H}$ (in ${\mathcal{RT}}_{c,1}$), which obviously represents the running time of computing ofHanoi, to the above recurrence equation.

Accordingly, by Theorem 11, we obtain ${f}_{T}^{H}\in \mathrm{\Omega}(h)\cap \mathcal{O}(g)$ with *g* and *h* given by equations (19) and(20), respectively. Since $g=h$ we conclude, by Theorem 11, that ${f}_{T}^{H}\in \mathrm{\Theta}(g)$. Therefore we have proved the following result.

**Corollary 12** *The complexity class of the running time of computing of Hanoi is*
$\mathrm{\Theta}({2}^{n-1})$.

**Fibonacci**As we have exposed above, the running time of computing of Fibonacci isthe solution to the recurrence equation (10). Clearly, such a recurrence equation can beretrieved from equation (8) as a particular case when we put $k=2$, ${a}_{1}={a}_{2}=1$, ${c}_{1}=2c$, ${c}_{2}=3c$ and $h(n)=4c$ for all $n\in \mathbb{N}$. Consider the functional associated with equation (10) andgiven by equation (17) as follows:

for all $f\in {\mathcal{RT}}_{c,2}$. Then Theorem 11 yields the existence and uniqueness of thesolution ${f}_{T}^{F}$ (in ${\mathcal{RT}}_{c,2}$), which obviously represents the running time of computing ofFibonacci, to the above recurrence equation.

In what follows we denote the value $\frac{1+\sqrt{5}}{2}$ by *ϕ*. It is a straightforward computation tocheck that ${\mathrm{\Gamma}}_{T}^{F}({g}_{\alpha ,r})\le {g}_{\alpha ,r}$ if and only if $\alpha >\varphi $ and $r\ge \frac{4c}{{\varphi}^{3}-{\varphi}^{2}-\varphi}$. Then, by Theorem 11, ${f}_{T}^{H}\in \mathcal{O}({g}_{\alpha ,r})$ for all $\alpha >\varphi $ and $r\ge \frac{4c}{{\varphi}^{3}-{\varphi}^{2}-\varphi}$. Hence, taking $\alpha =1.619$, we immediately have ${f}_{T}^{F}\in \mathcal{O}({g}_{1.619,\frac{4c}{{\varphi}^{3}-{\varphi}^{2}-\varphi}})$.

Moreover, it is not hard to check that ${g}_{\alpha ,r}\le {\mathrm{\Gamma}}_{T}^{F}({g}_{\alpha ,r})$ if and only if $\alpha \le \varphi $ for all $r>0$. It follows, by Theorem 11, that ${f}_{T}^{F}\in \mathrm{\Omega}({g}_{\alpha ,r})$ for all $\alpha \le \varphi $ and all $r>0$. Hence, taking $\alpha =\varphi $, we obtain ${f}_{T}^{F}\in \mathrm{\Omega}({g}_{\varphi ,r})$.

Consequently, by Theorem 11, we obtain ${f}_{T}^{F}\in \mathrm{\Omega}({g}_{\varphi ,r})\cap \mathcal{O}({g}_{1.619,\frac{4c}{{\varphi}^{3}-{\varphi}^{2}-\varphi}})$ for all $r>0$. Therefore we have proved the following result.

**Corollary 13** *The running time of computing of Fibonacci belongs to the complexity class*
$\mathrm{\Omega}({(1.618)}^{n})\cap \mathcal{O}({(1.619)}^{n})$.

Observe that the fact that the running time of computing is in $\mathrm{\Omega}({(1.618)}^{n})\cap \mathcal{O}({(1.619)}^{n})$ guarantees that any other function, different from${g}_{\alpha ,r}$, chosen to determine the complexity class of${f}_{T}^{F}$ would not be able to provide the suitable lower and upperasymptotic bounds at the same time.

## Declarations

### Acknowledgements

This work was funded by the Deanship of Scientific Research (DSR), King AbdulazizUniversity, Jeddah, under grant No. 363-002-D1434. The authors, therefore acknowledge withthanks DSR for technical and financial support.

## Authors’ Affiliations

## References

- Matthews SG: Partial metric topology.
*Ann. N.Y. Acad. Sci.*1994, 728: 183–197. 10.1111/j.1749-6632.1994.tb44144.xView ArticleMathSciNetGoogle Scholar - Matthews SG: An extensional treatment of lazy data flow deadlock.
*Theor. Comput. Sci.*1995, 151: 195–205. 10.1016/0304-3975(95)00051-WView ArticleMathSciNetMATHGoogle Scholar - Schellekens MP: The Smyth completion: a common foundation for denotational semantics and complexityanalysis.
*Electron. Notes Theor. Comput. Sci.*1995, 1: 211–232.View ArticleMathSciNetGoogle Scholar - Cerdà-Uguet MA, Schellekens MP, Valero O: The Baire partial quasimetric space: a mathematical tool for the asymptotic complexityanalysis in computer science.
*Theory Comput. Syst.*2012, 50: 387–399. 10.1007/s00224-010-9310-7View ArticleMathSciNetMATHGoogle Scholar - Brassard G, Bratley P:
*Algorithms: Theory and Practice*. Prentice Hall, New Jersey; 1988.Google Scholar - Künzi HPA: Nonsymmetric distances and their associated topologies: about the origins of basicideas in the area of asymmetric topology. 3. In
*Handbook of the History of General Topology*. Edited by: Aull CE, Lowen R. Kluwer Academic, Dordrecht; 2001:853–968.View ArticleGoogle Scholar - Romaguera S, Schellekens MP: Quasi-metric properties of complexity spaces.
*Topol. Appl.*1999, 98: 311–322. 10.1016/S0166-8641(98)00102-3View ArticleMathSciNetMATHGoogle Scholar - Scott DS: Outline of a mathematical theory of computation.
*Proc. 4th Annual Princeton Conference on Information Sciences and Systems*1970, 169–176.Google Scholar - Oltra S, Romaguera S, Sánchez-Pérez EA: Bicompleting weightable quasi-metric spaces and partial metric spaces.
*Rend. Circ. Mat. Palermo*2002, 51: 151–162. 10.1007/BF02871458View ArticleMathSciNetMATHGoogle Scholar - Alghamdi MA, Shahzad N, Valero O: Fixed point theorems in generalized metric spaces with applications to computerscience.
*Fixed Point Theory Appl.*2013., 2013: Article ID 118Google Scholar - Künzi HPA, Pajooshesh H, Schellekens MP: Partial quasi-metrics.
*Theor. Comput. Sci.*2006, 365: 237–246. 10.1016/j.tcs.2006.07.050View ArticleMATHGoogle Scholar - Karapinar E, Erhan IM, Öztürk A: Fixed point theorems on quasi-partial metric spaces.
*Math. Comput. Model.*2013, 57: 2442–2448. 10.1016/j.mcm.2012.06.036View ArticleMATHGoogle Scholar - Shoaib A, Arshad M, Ahmad J: Fixed point results of locally contractive mappings in ordered quasi-partial metricspaces.
*Sci. World J.*2013., 2013: Article ID 194897Google Scholar - Cull P, Flahive M, Robson R:
*Difference Equations: From Rabbits to Chaos*. Springer, New York; 2005.Google Scholar - Romaguera S, Tirado P, Valero O: New results on mathematical foundations of asymptotic complexity analysis of algorithmsvia complexity spaces.
*Int. J. Comput. Math.*2012, 89: 1728–1741. 10.1080/00207160.2012.659246View ArticleMathSciNetMATHGoogle Scholar - Romaguera S, Valero O: A common mathematical framework for asymptotic complexity analysis and denotationalsemantics for recursive programs based on complexity spaces. 1. In
*Semantics-Advances in Theories and Mathematical Models*. Edited by: Afzal MT. InTech, Rijeka; 2012:99–120.Google Scholar - Rodríguez-López J, Romaguera S, Valero O: Denotational semantics for programming languages, balanced quasi-metrics and fixedpoints.
*Int. J. Comput. Math.*2008, 85: 623–630. 10.1080/00207160701210653View ArticleMathSciNetMATHGoogle Scholar

## Copyright

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative CommonsAttribution License (http://creativecommons.org/licenses/by/2.0), which permitsunrestricted use, distribution, and reproduction in any medium, provided the original workis properly cited.