randperm - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


combinat

  

randperm

  

construct a random permutation

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

randperm( n )

Parameters

n

-

list or set of objects, or positive integer

Description

• 

If n is a list or set, then randperm returns a random permutation of the elements of n. If n is a positive integer, then a random permutation of the first n positive integers is returned.

• 

The command with(combinat,randperm) allows the use of the abbreviated form of this command.

Examples

withcombinat,randperm

randperm

(1)

randperm3

3,2,1

(2)

randperma,b,c,d

b,c,d,a

(3)

randpermW,X,Y,Z

X,W,Z,Y

(4)

See Also

combinat[numbperm]

combinat[permute]