Cross-parameter constraint for functions with parameters having different ordering in each function

So I have a problem statement in which I want to have a validation to take place on the inputs of a function and the validation has to take place using two of the inputs provided in the function but the functions on which I have to do these they have their inputs in varied orders. So I have to run validation using two variables suppose a and b. But the functions on which I have to run the validation have their function definition as

  1. f1(a, b, c)
  2. f2(a, d, b)
  3. f3(a, c, d, b)

Also I am not able to use instanceof as the instance of b collides with d. So there any other way in which this can be done?