combinat - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : Combinatorics : combinat : combinat/randcomb

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]

 


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