Here's the question:
If we have m loaves of bread and want to divide them between n people equally what is the minimum number of cuts we should make?
example:
3 loaves of bread and 15 people the answer is 12 cuts.
6 loaves of bread and 10 people the answer is 8 cuts.
for example 1, I found that I should cut each piece of bread 4 times so that we can have 15 pieces in total, but I can't find an algorithm for it. Any help would be appreciated.
If $k$ is the number of breads and $n$ is the number of people, you can always do it with $n - \gcd(n,k)$ cuts. Just treat all the breads as one long bread. This would need $n-1$ cuts. But then you can save all the cuts that are already there, i.e. where the different breads separate, which results in $\gcd(n,k) - 1$ saved cuts. Thus we need at most $n - \gcd(n,k)$ cuts.