I have a set of function inputs and output but I can't figure out how to get the function.
(The data came from some kind of puzzle that counts combination)
f(1,1)=1 f(1,2)=2 f(1,3)=3 f(1,4)=4
f(2,1)=1 f(2,2)=3 f(2,3)=6 f(2,4)=10
f(3,1)=1 f(3,2)=4 f(3,3)=10 f(3,4)=20
f(4,1)=1 f(4,2)=5 F(4,3)=15
I do notice the difference between row and column have some kind of pattern, but I have no idea how to put out a function of f(x,y). How should I solve a problem like this? Is this like a pre-calculus level question? I need to re-study my math...
Edit: I think I should give out the puzzle detail.
x is the amount of number and y is amount of [], the function calculate the possible combination of [] and number.
e.g. x=2 y=2, we can have:
[12][] [][12] [1][2]
hence f(2,2)=3. The order of number can't be switched.
Yes, it's Pascal's triangle, but why?
Because it's stars and bars. Since the numbers stay ordered, we can treat them as $x$ stars, and since the numbers need to occur within brackets, you can treat each $][$ as a bar that can be placed next to each other and at the ends, and you have $y-1$ of those.
OK, so we basically have $x+y-1$ places to put $x$ stars and $y-1$ bars, which thus can be done in:
$$f(x,y)={{x+y-1} \choose x}$$
ways.