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

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]