How do you achieve a specific splitter output?
This is a satisfactory question but more so a CS question. I' can't seem to summarize the problem in a concise manner so let's look at an example and an approach.
## Example
Given an input of 240 items/min, how can I achieve a belt of 63.75 items/min?

## My Solution:
When doing the basic calculations, my intuition indicated that finding a small number that shared a similar decimal value to the goal might be useful.
|i (number of splits)|240 / 3^(i)|240 / 2^(i)| |:-|:-|:-| |1|80|120| |2|26.67|60.00| |3|8.89|30.00| |4|2.96|15.00| |5|0.99|7.50| |6|0.33|3.75| |7|0.11|1.88| |8|0.04|0.94|
To me, dividing by two yielded much closer results to my target of 63.75. I just had to:
* Split the belt to get to 60. Place one 60 on a saved belt. Splitters needed: 2 * Split the non-saved 60 until 3.75 is found. Splitters needed: 4 * Merge that 3.75 into the saved belt and route the belt toward the relevant floor.
## A more generalized description of the problem
*Given a starting value and a target value, find the fewest number divisions which will result in the target value. A division can happen by either two or three.*
My approach ignores the idea that a given value can be divided by either two or three. It would have taken far more time, however, finding the optimal answer may utilize this for other types of splits.
Are there any simpler approaches than my brute-force one above?
How do you go about achieving 100% factory efficiency when it comes to inner-factory logistics?
I know this is a tree however, what is the name for a tree where each child can have multiple forms? I suppose it could also be a linked list or array, where each element has an items/minute value and a split value.
Branch: capacity: float ratio: int # either 2, or 3 child: Branch
I hope you're enjoying update 5. Thanks for reading!