# "types" vs "type" with each and all

I have different functions. Each function is able to deal with only one thing. If I have `3` variables, `X1`, `X2`, and `X3`, then, I can fit three different functions to these variables. One function to each pair of these variables `(X1, X2)`, `(X2, X3)` and `(X1, X3)`. However, there is method A that only allows fitting one type of function for all pair of variables. That is if I have functions a, b and c. Then, method A allows only fitting a or b or c to all the pairs of variables.

Therefore, I wrote this:

Method A allows fitting only one type of function to all pair of variables.

Someone told me that, I should change it to:

Method A allows fitting only one type of function to each pair of variables.

I think (as I understand) this will change the meaning of my sentence. That is, the new sentence means that method A allows fitting only (but possibly different) function for each pair of variables. In other words, I think the new sentence means I can fit function a to the first pair, function b to the second pair and function c to the third pair. Is my understanding correct?

In contrast to method A, I have a method B which allows fitting different (single) functions to each pair of variables. That is, I can fit 3 different functions, but only one type (a, or b or c) to each pair of variables. Then, I wrote this:

Method B allows fitting different functions for each pair of variables.

He also told me that I should remove the s from functions. Is this correct?

Method A allows fitting only one type of function to all pair of variables.

That sentence is wrong as written. The suggested method of correcting it is syntactically valid but, as you mention, it can change the meaning of the sentence.

Rather than writing each pair of variables, I suggest the following:

Method A allows fitting only one type of function to all pairs of variables.

All pairs treats them as a collective target.

Note, however, that there may be an additional issue with the meaning.

You say that you want to apply a single function to all of the variable pairs. But by using type, you're not making that explicit.

It's quite possible, for instance, that there are five different functions that are all of the same type. If so, it would not be the same function that would necessarily be applied, but only the same type of function.

If you want to make it very clear that you're applying one, and only one, function, then you need to make a further change:

Method A allows fitting only a single function to all pairs of variables.

If it's a single function, it is the same type by definition—since there is only one.

As for your second sentence, it's not wrong to turn it into a singular, but there should be a further revision:

Method B allows fitting a different function to each pair of variables.

Note that allows just means that it's possible. It doesn't mean that each variable pair can't have the same function fitted to it.

If you want to further specify that they are all of the same type, you can do that too:

Method B allows fitting a different function of the same type to each pair of variables.