randcomb - 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

  

randcomb

  

construct a random combination

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

randcomb(n, m)

Parameters

n

-

list or set of objects, or positive integer

m

-

non-negative integer

Description

• 

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

• 

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

Examples

withcombinat,randcomb

randcomb

(1)

randcomb5,3

1,3,4

(2)

randcomba,b,c,d,2

a,d

(3)

randcombW,X,Y,Z,1

X

(4)

See Also

combinat[choose]