• Post Reply Bookmark Topic Watch Topic
  • New Topic

posibility  RSS feed

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does anybody know the formula to claculate the posibility

ex. I have 10 numbers and i wanna choose 5 numbers randomly.
What is the formula to find out how many different group of 5 numbers I can choose.
 
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are talking about probability theory. Go through some math books
 
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends. is the subset (1,2,3,4,5) considered the same as (5,4,3,2,1) or not?

is the subset (1,1,1,1,1) valid?

how about (1,2,3)?

the formula is different for each of these, but try googling "Permutations" and "Combinations".
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look for the combinatory number:
C(n,m)=n!/(m!(n-m)!)
I think this can be what you're looking for.
 
Ranch Hand
Posts: 2072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Umut, as previously suggested, you need to look at the theories behind it. After you know the theory, you will know what to program. There are a lot of factors on probabilities, e.g. repetitions allowed or not, etc.
 
umut uzumcu
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m looking for all different possibilities,
Not less or more than 5 numbers.
no repetition of the same number in the group. (1,2,1,3,5) is not valid
order doesnt make difference (1,2,3,4,5) and (5,4,3,2,1) are same


Pablo Muller
The formula you send
C(n,m)=n!/(m!(n-m)!)
I think this is what i was looking for.


thank you all
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!