Premutations? or combinations?

  • Thread starter Thread starter BananaNeil
  • Start date Start date
  • Tags Tags
    Combinations
AI Thread Summary
The discussion centers on calculating the number of combinations and permutations of a string of numbers where a specific number of positions must be filled with 1s and the rest with 0s. The formula for combinations is clarified as x choose n, represented mathematically as x!/(n!(x-n)!), while permutations are discussed as the different arrangements of these combinations. An example is provided to illustrate how to select 3 positions from 10, emphasizing the need to account for the order of selection. The distinction between combinations and permutations is highlighted, noting that there is only one combination for a given set of numbers, but multiple permutations exist. Understanding these concepts is essential for programming and mathematical applications.
BananaNeil
Messages
3
Reaction score
0
Hey every body... I have been trying to figure this out for quite a while now... and i feel like i am making progress, but it just doesn't seem to be working.

Imagine you have a string of numbers with a length of X

N of those numbers must be 1 and X-N of those numbers must be zero. how many different combinations can i make?




(if it matters the relationship between n and x is this... x=(n^2)-(2*n))


any help would be really appreciated.
 
Physics news on Phys.org
x choose n = x!/(n!*(x-n)!)
 
wowwww, thank you so much. =]

I was wondering if you could possibly explain why it works..

your answer was defiantly sufficient for my program, but i am really interested in why works.
 
Since you title this "Permutations? or combinations?", I feel I should point out that, strictly speaking, there is only one combination of X numbers, N of which are 1 and X- N of which are 0. There are
\begin{pmatrix}X \\ N\end{pmatrix}= \frac{X!}{N!(X- N)!}[/itex]<br /> <b>permutations</b>.<br /> <br /> For example, if X= 4 and N= 1, 1000, 0100, 0010, and 0001 are all the <b>same</b> combination. They are different <b>permutations</b>, differing in the order in which the digits are written. There is eactly 1 combination and 4!/(3!1!)= 4 permutations.<br /> <br /> By the way, please don&#039;t use &quot;X&quot; and &quot;x&quot;, &quot;N&quot; and &quot;n&quot; interchangably. They are different symbols and often mean different values in equations and formulas.
 
BananaNeil said:
I was wondering if you could possibly explain why it works..

your answer was defiantly sufficient for my program, but i am really interested in why works.

Consider a particular example, say X=10, N=3:

You want to pick 3 spots out of 10 spots. In how many ways can you do that?
Well, for the first one you have 10 possible choices for the second you have 9 possible choices and for the third you have 8 possible choices. So you can do this in 10·9·8 ways. This is equal to:

\frac{10 \cdot 9 \cdot 8 \cdot 7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1}{7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1}<br /> = \frac{10!}{(10-3)!}

These 10·9·8 possible ways to pick the spots include different ways of picking the same 3 spots (i.e. picking the same spots in different order). So we want to divide these 10·9·8 possible ways to pick the spots by the number of ways in which each set of 3 spots can be ordered. This is the number of ways in which you can pick 3 out of 3 spots: 3·2·1 = 3!

So the total number of different sets of 3 spots that can be drawn from a set of 10 spots is: \frac{10!}{(10-3)!\cdot 3!}
 
Actually, the number of permutations (not combinations) is x!/(x-n)!
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Back
Top