What is the optimal way to cut B chocolate bars to share equally between N people?
If optimal means having less cuts, can do this:

1. Line the chocolate bar up.
   [bar 0][bar 1][bar 2]

2. Treat that as a big bar.
   [big bar            ]

3. Divide the big bar equally. 


Only about N cuts needed (if B &lt; N)

If B > N, just give everyone equal number of bars. Then divide the remaining bars with the above algorithm.

Or 1 cut:

[bar 0]
  [bar 1]
    [bar 2]

cut vertically once.


I am sure there might be easier way to line it up... if optimal means that we don't need to use a ruler to measure the chocolates in real life.