Thanks for that... very good.. with the 'random_element' method.
On 24 November 2010 21:16, pang wrote:
> > How many different ways can £2 be made using any number of coins?
>
> wiv = WeightedIntegerVectors(200, [1,2,5,10,20,50,100,200])
> wiv.count()
> 73682
>
> Try the different methods of wiv
> How many different ways can £2 be made using any number of coins?
wiv = WeightedIntegerVectors(200, [1,2,5,10,20,50,100,200])
wiv.count()
73682
Try the different methods of wiv for other questions. I read this in
the Sage book in french:
http://sagebook.gforge.inria.fr/
Regards
--
You recei