I was thinking a problem(concurrency related problem in operating system but involve basic maths). There are k programs each with $m_1, m_2,...m_k$ steps. Programs execute concurrently. But i need to maintain order of steps in each program say $P_i : 1, 2, 3, ...m_i$ (i+1 step can only be performed only after performing ith step). In how many ways i can execute k programs concurrently.
My attempt:
Total there are $(m_1+m_2+...m_k)!$ ways. But each 1 to $m_i$ must be executed in same order. $m_i!$ ways - fraction to ensure order = $1/m_i!$
So required number of ways out of total possible ways = $\frac{1}{m_1!}\frac{1}{m_3!}\frac{1}{m_3!}....\frac{1}{m_k!}*(m_1+m_2+...m_k)! $ ways
Can you pls tell me is this correct?