
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
For a positive integer \( n \) and a real number \( x \) (where \( 0 \leq x < n \)), define
$$
f(n, x) = (1 - \{x\}) \binom{n}{[x]} + \{x\} \binom{n}{[x] + 1},
$$
where \( [x] \) is the floor function which gives the greatest integer less than or equal to \( x \), and \( \{x\} = x - [x] \).

If integers \( m \) and \( n \) (where \( m, n \geq 2 \)) satisfy
$$
f\left(m, \frac{1}{n}\right) + f\left(m, \frac{2}{n}\right) + \cdots + f\left(m, \frac{mn-1}{n}\right) = 123,
$$
find the value of \( f\left(n, \frac{1}{m}\right) + f\left(n, \frac{2}{m}\right) + \cdots + f\left(n, \frac{mn-1}{m}\right) \).

Present the answer in LaTex format: \boxed{Your answer}
user