FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math » Symbolic
mupad: n choose k?
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
Author Message
Markus Dehmann
science forum beginner


Joined: 29 Mar 2006
Posts: 1

PostPosted: Wed Mar 29, 2006 3:51 am    Post subject: mupad: n choose k? Reply with quote

Does anyone know how to do n choose k in mupad? I couldn't find it, not
even in the combinat package.

Thanks,
Markus
Back to top
Joe Riel
science forum beginner


Joined: 22 Jun 2005
Posts: 19

PostPosted: Wed Mar 29, 2006 5:27 am    Post subject: Re: mupad: n choose k? Reply with quote

"Markus Dehmann" <markus.dehmann@gmail.com> writes:

Quote:
Does anyone know how to do n choose k in mupad? I couldn't find it, not
even in the combinat package.

I don't know mupad, but does it have a binomial function?


--
Joe Riel
Back to top
Mark Lawton
science forum beginner


Joined: 22 Mar 2006
Posts: 11

PostPosted: Wed Mar 29, 2006 8:32 am    Post subject: Re: mupad: n choose k? Reply with quote

You can write your own functions. I don't know how to do this in Mupad,
but here's a Maxima example:

Define a "combinations" function
(%i6) c(x,y) := x!/((x-y)! * y!);
(%o6) c(x,y):=x!/((x-y)!*y!)

Use it to calculate the number of ways to select 6 from 49 where the
order is not important (which equates to the odds of winning a
"Canadian style" lottery)
(%i7) c(49,6);
(%o7) 13983816

See
http://en.wikipedia.org/wiki/Permutations_and_combinations#Summary_of_formulae
for other combinatorical formulae.

Markus Dehmann wrote:
Quote:
Does anyone know how to do n choose k in mupad? I couldn't find it, not
even in the combinat package.

Thanks,
Markus
Back to top
Brad Cooper
science forum beginner


Joined: 07 May 2005
Posts: 48

PostPosted: Wed Mar 29, 2006 10:51 am    Post subject: Re: mupad: n choose k? Reply with quote

"Markus Dehmann" <markus.dehmann@gmail.com> wrote in message
news:1143604309.689537.226230@e56g2000cwe.googlegroups.com...
Quote:
Does anyone know how to do n choose k in mupad? I couldn't find it, not
even in the combinat package.

I think you require (for example)...

combinat::subsets::count(6,3);

This returns 20 as the number of combinations of 3 objects chosen from 6
i.e. 6!/(3!x3!)

Cheers, Brad

Quote:
Thanks,
Markus
Back to top
Jay Belanger
science forum beginner


Joined: 12 Sep 2005
Posts: 13

PostPosted: Wed Mar 29, 2006 1:29 pm    Post subject: Re: mupad: n choose k? Reply with quote

Joe Riel <joer@k-online.com> writes:

Quote:
"Markus Dehmann" <markus.dehmann@gmail.com> writes:

Does anyone know how to do n choose k in mupad? I couldn't find it, not
even in the combinat package.

I don't know mupad, but does it have a binomial function?

Yes; good call.
Quote:
binomial(10,4)
will return 10 choose 4.


Jay
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 1:57 pm | All times are GMT
Forum index » Science and Technology » Math » Symbolic
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts MuPAD News Richard Kanarek Symbolic 4 Fri Jul 14, 2006 6:55 am
No new posts Greek Characters in MuPAD graphics Brad Cooper Symbolic 5 Sun Jun 04, 2006 2:23 pm
No new posts MuPad problem Fabrice Symbolic 2 Mon May 22, 2006 8:31 pm
No new posts MuPAD and EPS plot Brad Cooper Symbolic 1 Sat May 20, 2006 11:24 am
No new posts MuPAD, 3-D graphics, animation and Flash Brad Cooper Symbolic 0 Sat May 13, 2006 1:47 pm

Singapore Shopping Guide | Bankruptcy | Debt Help | Debt Consolidation | Debt Consolidation
Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.6070s ][ Queries: 16 (0.5085s) ][ GZIP on - Debug on ]