Abstract

Algorithms represent one of the fundamental issues in computer science, while asymptotic notations are widely accepted as the main tool for estimating the complexity of algorithms. Over the years a certain number of asymptotic notations have been proposed. Each of these notations is based on the comparison of various complexity functions with a given complexity function. In this paper, we define a new asymptotic notation, called “Weak Theta,” that uses the comparison of various complexity functions with two given complexity functions. Weak Theta notation is especially useful in characterizing complexity functions whose behaviour is hard to be approximated using a single complexity function. In addition, in order to highlight the main particularities of Weak Theta, we propose and prove several theoretical results: properties of Weak Theta, criteria for comparing two complexity functions, and properties of a new set of complexity functions (also defined in the paper) based on Weak Theta. Furthermore, to illustrate the usefulness of our notation, we discuss an application of Weak Theta in artificial intelligence.

1. Introduction

Computational complexity [16] is a very popular research area in computer science that covers algorithm design [3, 4], algorithm complexity [3, 4], asymptotic notations [3, 79], complexity recurrences [3, 10, 11], classes of problems and NP-completeness [12, 13], and heuristics and approximation algorithms [13, 14].

Tools from computational complexity are intensively used in various research areas such as computer networks [15], operating systems [16], parallel and distributed computing [17], and artificial intelligence [18, 19]. Artificial intelligence is particularly linked with computational complexity; see swarm intelligence [2025], multiagent systems [2628], machine learning [29, 30], and semantic web services [31, 32].

Algorithms represent one of the most important issues in computer science, while asymptotic notations are considered to be the main tool for estimating the complexity of algorithms. Several asymptotic notations have been proposed in the literature. They are all based on the comparison of various complexity functions with a given complexity function. Consequently, the main idea is to choose a complexity function and then to see what is the relation between this function and other complexity functions. Some of these asymptotic notations provide relations that are too general, while others offer relations that are too specific and therefore not applicable for all the cases.

In this paper, we propose a new asymptotic notation that aims to offer a solution for the problem discussed above. It proposes the use of two given complexity functions to construct the set of all complexity functions that can be caught between these two given functions. The main advantage of our asymptotic notation is the fact that it can be used to describe the behaviour of a wide set of complexity functions (some of them hard to be approximated using a single complexity function). In this paper, we also propose and prove several properties that characterize this new asymptotic notation and outline its importance in the field of computational complexity.

The paper is organized as follows. Section 2 contains an overview on the asymptotic notations proposed in the literature. In Section 3, we define an asymptotic notation, called “Weak Theta,” we provide a motivation for the need of this notation, and we discuss an application of “Weak Theta” in artificial intelligence. In the end of this section, we also present a brief description of the main symbols used in the paper. In Section 4, we propose several relations between “Weak Theta” and other asymptotic notations. In Section 5, we develop some properties of “Weak Theta” related to membership, inclusion, intersection, and union. In Section 6, we discuss several criteria concerning the comparison of two complexity functions. In Section 7, we define the set of complexity functions comparable with two given complexity functions and we propose several properties of this new set of functions. Section 8 contains the conclusions of the paper.

In this section, we present several asymptotic notations proposed in the literature.

Definition 1 (see, e.g., [3, 6, 7]). A complexity function is a function , where is the set of positive integers and is the set of positive real numbers. One denotes by the set of complexity functions, .

Remark 2. In this paper, a function will be denoted by whenever this function is in relation with a complexity class that depends on a complexity function of the argument (e.g., , but ).

Definition 3 (see, e.g., [3, 4, 6, 7, 3336]). Let  , an arbitrary fixed complexity function. The main asymptotic notations used in the literature are defined as follows:

Proposition 4 (see, e.g., [3, 6]). One has the following.(a)Reflexivity. Let . Then , , and .(b)Transitivity. Let . Then,(b1)if and then ;(b2)if and then ;(b3)if and then ;(b4)if and then ;(b5)if and then .(c)Symmetry. Let . If then .(d)Transpose Symmetry. Let be . Then,(d1) if and only if ;(d2) if and only if .(e)Projection. Let . Then if and only if and .

Definition 5 (see [7]). Let . The set of all complexity functions comparable with is defined as follows:

Definition 6 (see [7]). Let . The asymptotic notations and are defined as follows:

Proposition 7 (see [7]). Let . Then (a);(b).

Proposition 8 (see [7]). Let . Then,(a);(b), , , , and are pairwise disjoint;(c).
Other important asymptotic notations used in the literature are the following: soft [3, 8], soft [36, 37], infinity [3, 9], [35, 38], and almost [35].

3. Weak Theta

In this section, we propose a new asymptotic notation called “Weak Theta,” we present some motivation for using this notation, and we discuss an application of “Weak Theta” in artificial intelligence. In the end of the section we briefly describe the main symbols used in the paper.

3.1. Definition of Weak Theta

Definition 9. Let . One defines the asymptotic notation Weak Theta, denoted by , as follows:

Remark 10. represents the set of all complexity functions that are bounded by the functions and for sufficiently large .

Proposition 11. Let . Then(a) if and only if ;(b) if and only if .

Proof. (a) “” Let . Then,It follows thatConsequently,” Consider that ; it follows thatFrom (8), we obtainSo, we haveConsequently,(b) The result follows from (a) using the relation

Remark 12. In all situations in which a proposition or a theorem has as a hypothesis a relation of the form , one implicitly understands that .

3.2. Motivation

(a) The first use of our notation is for describing complexity functions with complex behaviour (i.e., functions difficult to be approximated by a single elementary complexity function). As an example, let with the form

If we use the asymptotic notations from Definition 3, we may obtain orwhich are too general descriptions of the behavior of , while the use of is not appropriate.

If we use the new asymptotic notation proposed in Definition 9, then we obtain

(b) Usually, the best case, the worst case, and the average case of the running time of an algorithm are described by functions with different behaviours. Also, for all algorithms, the average case is situated between the best case and the worst case. For example, assume that for an algorithm the best case is represented by and the worst case is represented by .

Using , we obtain that and . This is a valid description of the two cases of the algorithm, but we need two complexity classes ( and ) for this analysis.

If we use , only one complexity class is necessary. The running time of the algorithm is fully described by .

3.3. An Application of Weak Theta in Artificial Intelligence

In this subsection, we propose an artificial intelligence based solution for the following problem denoted by . “Let be a set of software programs and a given problem. Each program , , solves the problem . We make the following assumptions: each program , , terminates for each valid input; for all programs , , the inputs have the same form; the codes of the programs are not available. One asks to find the fastest program(s) from the set .”

The problem can be seen as an unsupervised classification problem that can be solved in terms of “Weak Theta.” In this framework, we propose an algorithm that aims to solve the problem . This algorithm uses for the first two steps a simple and common idea for estimating the running time of a software program: “choose several inputs for the program; for each input measure the corresponding running time and then, using this information, find the function that best estimates the running time of the program.”

The algorithm can be described as follows.

Step 1. Consider a set of inputs of sizes (where is the size of input ). We run each program , , for all inputs and we obtain the corresponding running times . In the end, for each program , , we will have a set of pairs .

Step 2. For each program , , we use the data for obtaining a complexity function that best approximates the running time of the program. For this step we may use estimation techniques.

Step 3. First, we choose a set of complexity functions such that , for all ; from Proposition 11, we have , for all . Next, for each program , , we find the complexity class such that . Sometimes, the function can be simultaneous in two consecutive complexity classes and (according to Proposition 20, ); in such cases we consider that is only in .

As a result of the method proposed above, we obtain a classification of the programs from the set that offers a solution for the problem . This classification is based on the complexity classes .

3.4. Main Symbols Used in the Paper

This subsection contains a brief description of the main symbols used in the paper. In Notations section, one can observe three types of symbols: sets, asymptotic notations, and functions and numbers.

4. Relations between Weak Theta and Other Asymptotic Notations

Proposition 13. Let such that . Then,

Proof. First, we prove the direct inclusion Let . It follows thatFrom (19), we have thatSo, we haveNext, we prove the reverse inclusion Let . It follows thatFrom (23) we have thatConsequently,

Corollary 14. Let . Then .

Proof. From Proposition 13, we have thatNext, using the relationwe obtain the result.

Proposition 15. Let such that . Then,(a);(b).

Proof. (a) First, we prove that . Let . It follows thatFrom the hypothesis, we have that . So we haveFrom (28) and (29), we obtainConsequently,Using (27), we have thatFrom (31) and (32), we obtain the result.
We prove the reverse inclusion . Let . It follows thatFrom (33), we obtainConsequently,(b) For the proof, one can follow the same idea used for proving (a) and the definition of .

Corollary 16. Let such that . Then,(a);(b).

Proof. The proof follows easily using Proposition 15.

Proposition 17. Let such that . Then if and only if .

Proof. ” From the hypothesis, we have” We consider that . It follows thatFrom Corollary 16 and the relation , we have thatWe have to prove thatLet . It follows thatUsing (37), we have thatFrom (41) and (42), we obtain thatConsequently,The other inclusion, from (40), can be proved using the same idea.

Proposition 18. Let such that and . Then if and only if and .

Proof. ” From the hypothesis and Corollary 16, we have thatFrom (45) and Proposition 13, we obtain thatFrom the hypothesis and Corollary 16, we have thatFrom (47) and Proposition 13, we obtain thatNext, from (48), we haveFrom (46) and (49), we deduce that” Consider that and . It follows thatLet . It follows thatUsing (51) and (52), we haveConsequently,The other inclusion, , can be proved using a similar idea.

Proposition 19. Let . Then,

Proof. ” Consider that . We prove that Since , it follows that . Consequently, we obtain the relation .
Let . It follows thatFrom the relation , we haveNext, using the relationwe obtain thatFrom (57), (58), and (60), we have thatConsequently,The proof of follows the same idea used for the first inclusion.
” We consider that .
Let . It follows thatFrom (63), we obtainUsing (64), we haveConsequently,

5. Membership, Inclusion, Intersection, and Union

Proposition 20. Let such that . Let . Then,(a);;(b);(c).

Proof. (a) Let . It follows thatFrom the relation , we haveFrom (68), we obtainUsing (67) and (69), we have thatConsequently,For proving that , one can follow the same idea used for the first relation of (a).
(b) From Corollary 16, it follows that Let . It follows thatFrom (73), we obtainConsequently,(c) The proof follows from (a).

Proposition 21. Let such that and . Then,(a),(b).

Proof. (a) We use the transitivity of the complexity class “” (see Proposition 4), described asHence, from the hypothesis and (76), we haveNext, using (77) and Proposition 11(a), we obtain that (b) Using the hypothesis and Proposition 4(d), we have thatConsequently, using (79) and the hypothesis, we haveFrom (80) and Proposition 13, we have that

Proposition 22. Let such that and . Let , , and with the form where and are two infinite subsets of   such that and . Then .

Proof. Using the hypothesis and Proposition 21, we have thatAlso, from the hypothesis and Proposition 4(b), we obtainFrom (84), (83), and Proposition 20, we haveUsing (85) and the hypothesis, we obtain thatConsequently,

Proposition 23. Let such that . Let . Then,(a)if or , then (b)if , then

Proof. (a) Consider the following.
Case 1. Consider . From Proposition 17, we have thatFrom (90) and Corollary 16, we have thatNext, from the relation and Proposition 18, we have thatCase 2. Consider . The proof follows the same idea used for proving Case 1.
(b) Suppose for a contradiction that and .
Let such thatwhere and are infinite subsets of such that and . From the relations and and from Proposition 22 we have thatSincethenorCase 1. Consider .
From (93) and the relation , we have thatUsing the relation , it follows thatWe take in (99) and we obtain thatFrom (98), (100), and the fact that is an infinite subset of , we obtain thatwhich is a contradiction.
Case 2. Consider .
From (93) and the relation , we have thatUsing the relation , it follows thatWe take in (103) and we obtain thatFrom (102), (104), and the fact that is an infinite subset of , we obtain thatwhich is a contradiction.

Proposition 24. Let such that and . Then,(a)if , then(b)if , then(c)if , , and , thenwhere  .

Proof. (a) The relationis obvious from . We prove that (i) From the hypothesis, one can easily obtain that .
Let . It follows thatFrom the relation , we have thatFrom (112), we have thatUsing (111) and (113), we obtainConsequently,(ii) From Corollary 16, we haveFrom (109) and Corollary 16, we haveUsing (116) and (117), we obtain that(b) Suppose for a contradiction that there exists such that . It follows thatFrom the relation , we have thatWe take in (120) and we obtain thatFrom (119) and (121), we have thatwhich is a contradiction.
We conclude that (c) From relation , we have thatThus, from Proposition 11, it follows thatFurthermore, we prove that . Suppose for a contradiction that . It follows thatThus, from (126), we have thatFrom , we have thatWe take in (128) and we obtain thatFrom (127) and (129), we obtain thatwhich is a contradiction. Consequently, we have .
Now, we prove that .
(i) First, we prove that .
From the hypothesis one can easily obtain that .
Let . It follows thatFrom (131), we obtain thatConsequently,(ii) We prove that .
Let . From Proposition 13, we haveFrom the hypothesis and Proposition 13, we haveFrom (134), (137), and Proposition 4 (transitivity of ), we have thatFrom (135), (136), and Proposition 4 (transitivity of ), we have thatUsing (135), (138), and Proposition 13, we haveUsing (134), (139), and Proposition 13, we haveConsequently,

Proposition 25. Let such that , . Then(a), ;(b), ;(c).

Proof. (a) Let arbitrarily fixed.
From the hypothesis and Proposition 4 (transitivity of ), we haveLet . Then, using Proposition 13, we haveFrom (143) and Proposition 4 (transpose symmetry), we haveThus, from (145), (147), and Proposition 4 (transitivity of ), we obtainFrom (146), (144), and Proposition 4 (transitivity of ), we obtainUsing (148), (149), and Proposition 13, we have that(b) Let arbitrarily fixed. Sincewe obtain, using Proposition 13, the relationNext, using Proposition 20(b), we obtain that(c) The proof results easily from (a).

6. Some Relations between Complexity Functions

Proposition 26. Let such that and . Let such that and . Then,(a)if , then ;(b)if , then ;(c)if , then ;(d)if , then .

Proof. (a) From the hypothesis and Proposition 13, we have thatIt follows thatNext, using the relation and Proposition 4 (the transitivity of ), we obtain the relationIn the end, using Definition 5, we obtain that((b), (c), and (d)) The proof follows from (a) using the relations

Proposition 27. Let such that , , , , and . Let such that and . Then,(a)if and , then ;(b)if and , then ;(c)if and , then .

Proof. (a) Since then, from Proposition 13, we have thatNext, from Proposition 11, we have thatFrom , , and Proposition 13, we obtain thatThus, from Proposition 4 (the transitivity of ), we haveConsequently,((b) and (c)) The proof follows the same idea used for (a).

Remark 28. In Proposition 27, the hypothesis is not used in the proof. The purpose of this hypothesis is to emphasize that Propositions 26 and 27 discuss disjoint cases.

Proposition 29. There exist with the following properties: (i1) , (i2) , (i3) , (i4) , (i5) , (i6) , and (i7) such that .

Proof. Let , , , and .
The properties (i1)–(i5) are easily verified since , , , , and .
Let where and are two infinite subsets of such that and . One can easily verify thatFor proving that , we start from the following relation (see Proposition 8):Suppose for a contradiction thatIt follows thatUsing (168) for , we obtainwhich is false for . We know that there exists , , because is an infinite subset of . Consequently,Using the same idea one can prove thatFrom (170) and (171), it follows that

7. The Set of Complexity Functions Comparable with Two Given Complexity Functions

Definition 30. Let such that . We define the set of complexity functions comparable with and , denoted by , as follows:

Proposition 31. Let such that . Then,

Proof. From Definition 30, we haveFrom Corollary 16, we have thatIt follows thatConsequently, we obtainNext, using Propositions 7 and 13, we have that

Proposition 32. Let such that . Then,(a);(b)if , then .

Proof. (a) From Proposition 31 it follows thatSince , we have thatFrom (180), (181), and Proposition 8, we obtain that(b) Since , one can easily prove thatUsing (183) and Proposition 31, we haveNext, from Proposition 4(e) we obtain thatConsequently,Thus, from Proposition 8, it follows that

Proposition 33. Let such that . Then,(a);(b)if then .

Proof. The proof follows the same idea used for proving Proposition 32.

Proposition 34. Let such that . Then,(a);(b)if then .

Proof. The proof follows easily using Propositions 32 and 33.

Proposition 35. Let such that . Then,

Proof. Using Proposition 8, we have thatFrom (189), using the distributivity of intersection over union, we obtainNext, using the relations and , we obtain thatConsequently, using Proposition 31, we have

8. Conclusions

In this paper, we defined a new asymptotic notation based on two given complexity functions and then we proposed and proved several properties of this new notation, classified in the following four categories: (i)relations between “Weak Theta” and other asymptotic notations; (ii)properties concerning membership, inclusion, intersection, and union; (iii)some relations between complexity functions; (iv)properties related to “Weak Theta” and the set of complexity functions comparable with two given complexity functions.

The main benefit of this new asymptotic notation is the possibility to characterize a complexity function by catching it between two given complexity functions, thus allowing approximation of functions with complex behaviours that are hard to be analyzed using other existent asymptotic notations.

Notations

:The set of positive integers
:The set of positive real numbers
:The set of complexity functions (see Definition 1)
:Subsets of
:The main asymptotic notations used in the literature (see Definition 3)
:Other asymptotic notations used in this paper (see Definitions 5 and 6)
:The new asymptotic notation weak theta defined in this paper (see Definition 9)
:Complexity functions
:Positive real constants
:Positive integer constants
:The argument of the complexity functions, positive integer.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgment

The work has been funded by the Sectoral Operational Programme Human Resources Development 2007–2013 of the Ministry of European Funds through the Financial Agreement POSDRU/159/1.5/S/132397.