IsDerangement - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


StringTools

  

IsDerangement

  

test whether a string is a derangement of another string

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

IsDerangement( s, t )

Parameters

s

-

string

t

-

string

Description

• 

The IsDerangement( s, t ) command returns the value true if the string s is a derangement of the string t, and returns the value false otherwise. The strings s and t are derangements of one another if they differ at the ith position, for each index i.

• 

Note that no string with a repeated character can be a derangement of another string; therefore, each of the strings s and t must be permutations.  See StringTools[IsPermutation].

• 

All of the StringTools package commands treat strings as (null-terminated) sequences of 8-bit (ASCII) characters.  Thus, there is no support for multibyte character encodings, such as unicode encodings.

Examples

withStringTools:

IsDerangementfoo,oof

false

(1)

IsDerangementedit,tide

true

(2)

Compatibility

• 

The StringTools[IsDerangement] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

string

StringTools

StringTools[IsPermutation]