SolveTools - Maple Help

Home : Support : Online Help : Mathematics : Factorization and Solving Equations : SolveTools : SolveTools/Complexity

SolveTools

 Complexity
 compute the (relative) complexity of an expression

 Calling Sequence Complexity(expr, vars)

Parameters

 expr - expression vars - (optional) set; variables with respect to which the complexity is computed

Description

 • The Complexity command computes the complexity of the expression expr with respect to the set of variables vars.
 A number that reflects the relative complexity of the expression is returned.
 • The Complexity command has two modes. If Complexity is called with one argument, the 'Polynomial' mode is used. If it is called with two arguments, the 'Rational' mode is used.
 The 'Rational' mode takes into account the variables that are used in the expression, whereas the 'Polynomial' mode treats all the variables equally.
 • The two modes are independent and the complexity of the expression in one mode gives no indication of the complexity of the same expression in the other mode. The values of the complexities bear no absolute value in either mode; they serve only as the indication of relative complexities of different expressions in the same modes.
 • This function is part of the SolveTools package, and so it can be used in the form Complexity(..) only after executing the command with(SolveTools). However, it can always be accessed through the long form of the command by using SolveTools[Complexity](..).

Examples

 > $\mathrm{with}\left(\mathrm{SolveTools}\right):$

The following are some relative polynomial complexities.

 > $\mathrm{Complexity}\left(2x\right)$
 $\frac{{66}}{{5}}$ (1)
 > $\mathrm{Complexity}\left(3x\right)$
 $\frac{{133}}{{10}}$ (2)
 > $\mathrm{Complexity}\left(x+y\right)$
 $\frac{{341}}{{10}}$ (3)
 > $\mathrm{Complexity}\left(x+2y\right)$
 $\frac{{171}}{{5}}$ (4)
 > $\mathrm{Complexity}\left(x+{ⅇ}^{y}\right)$
 $\frac{{6091}}{{10}}$ (5)

The following are some relative rational complexities.

 > $\mathrm{Complexity}\left(2x,\left\{x\right\}\right)$
 ${4000}$ (6)
 > $\mathrm{Complexity}\left(3x,\left\{x\right\}\right)$
 ${9000}$ (7)
 > $\mathrm{Complexity}\left(x+y,\left\{x\right\}\right)$
 ${1001}$ (8)
 > $\mathrm{Complexity}\left(x+2y,\left\{x\right\}\right)$
 ${1004}$ (9)
 > $\mathrm{Complexity}\left(x+{ⅇ}^{y},\left\{x,y\right\}\right)$
 ${2000}$ (10)

The following examples are equally complicated with respect to x from rational point of view.

 > $\mathrm{Complexity}\left(x+{ⅇ}^{y},\left\{x\right\}\right)$
 ${1001}$ (11)
 > $\mathrm{Complexity}\left(x+{ⅇ}^{zy},\left\{x\right\}\right)$
 ${1001}$ (12)

However, they are different from polynomial point of view.

 > $\mathrm{Complexity}\left(x+{ⅇ}^{y}\right)$
 $\frac{{6091}}{{10}}$ (13)
 > $\mathrm{Complexity}\left(x+{ⅇ}^{zy}\right)$
 $\frac{{11211}}{{10}}$ (14)