SolveTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

SolveTools

  

Complexity

  

compute the (relative) complexity of an expression

 

Calling Sequence

Parameters

Description

Examples

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

withSolveTools:

The following are some relative polynomial complexities.

Complexity2x

665

(1)

Complexity3x

13310

(2)

Complexityx+y

34110

(3)

Complexityx+2y

1715

(4)

Complexityx+ⅇy

609110

(5)

The following are some relative rational complexities.

Complexity2x,x

4000

(6)

Complexity3x,x

9000

(7)

Complexityx+y,x

1001

(8)

Complexityx+2y,x

1004

(9)

Complexityx+ⅇy,x,y

2000

(10)

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

Complexityx+ⅇy,x

1001

(11)

Complexityx+ⅇzy,x

1001

(12)

However, they are different from polynomial point of view.

Complexityx+ⅇy

609110

(13)

Complexityx+ⅇzy

1121110

(14)

See Also

SolveTools

SolveTools[GreaterComplexity]

SolveTools[SortByComplexity]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam