# Combinations ab=x?

1. Oct 1, 2005

### Trepidation

I have a problem that I'm not aware of how to solve. I know about permutations and combinations, but...

Given that the possible values for a are all integers such that $$2 \leq a \leq m_{a}$$, and the possible values for b are all integers such that $$2 \leq b \leq m_{b}$$; how many combinations of a and b give $$ab=x$$, when order matters (ab is counted seperately from ba)?

Could someone please help me out by explaining how this is solved or by providing an answer (preferably both, but whatever you could do would be greatly appreciated)?

Thank you very much for your help...

Last edited: Oct 1, 2005
2. Oct 1, 2005

### HallsofIvy

That depends very strongly on what x is! If x is not an integer (and you didn't say it was) the answer is 0. If x is an integer and x>mamb the answer is still 0. Providing an answer would be easier if you would say exactly what the question is!

3. Oct 1, 2005

### Trepidation

Thank you for replying despite my typo ("how many combinations of n and k give..." should have been, and has now been changed to, "how many combinations of a and b give...")! And I'm sorry about not defining x, it slipped my mind.

x is any integer such that $$4 \leq x \leq m_{a}m_{b}$$

Is there even a known solution to my problem?

4. Oct 1, 2005

### Moo Of Doom

I'd say that the probability that $$ab=x$$ is equal to the number of factors of $x$, not including 1 and $x$, divided by the number of possibilities for $a$ and $b$.

That is, $$P=\frac{F(x)-2}{(m_a-1)(m_b-1)}$$, where $$F(x)$$ stands for the number of factors of $x$.

Last edited: Oct 1, 2005
5. Oct 1, 2005

### Trepidation

Is there any known method for calculating the value of F(x) exactly?

6. Oct 2, 2005

### uart

What! Every possible value of "a" and "b" (as given in the first post) satisfys that "x".

Isn't this whole thing a bit like the old "How many legs has a three legged stool?" question.

Last edited: Oct 2, 2005
7. Oct 2, 2005

### Trepidation

The question is how many values of "a" and "b" satisfy any one specific instance of x.

For instance... When x is 4, the only possible values are (a,b):
(2, 2)

When x is 20, the possible values are:
(2 * 10)
(10 * 2)
(4 * 5)
(5 * 4)

We could actually do away with the and constraints and get the same results, since the values are restricted to integers.

In any case, in the above examples I don't actually need to know WHAT the values are; just how many possibilites there are. What it boils down to, I realize now, is the number of distinct (but not necessarily prime) factors of other than x and one. For x=4, it would be 1. For x=20 it would be 4.

Hopefully that cleared it up?

8. Oct 2, 2005

### uart

"The question is how many values of "a" and "b" satisfy any one specific instance of x".

Ok, now I'm with you. :)

Here's a hint then. Think in terms of the total number of prime factors of x (By "total" I mean including repeated factors as seperate factors, like saying 8=2*2*2 has three prime factors for example). I think that the problem you're asking should be related to how many ways can you partition that set of prime factors into two groups. Taking account of different limits on the maxima (m_a and m_b) might make it a little tricky though.

Last edited: Oct 2, 2005
9. Oct 2, 2005

### uart

Oh forget that last post or mine. It's not as simple as that, repeated factors make it more complicated.

10. Oct 4, 2005

### Trepidation

It's okay... I solved it. ^^