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


>


The following are some relative polynomial complexities.
>


 (1) 
>


 (2) 
>


 (3) 
>


 (4) 
>


 (5) 
The following are some relative rational complexities.
>


 (6) 
>


 (7) 
>


 (8) 
>


 (9) 
>


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


 (11) 
>


 (12) 
However, they are different from polynomial point of view.
>


 (13) 
>


 (14) 


Download Help Document
Was this information helpful?