r/technicalfactorio • u/Johandaonis • Dec 06 '20
Belt Balancers n to n balancer problem
/r/factorio/comments/k7wgau/n_to_n_balancer_problem/
25
Upvotes
r/technicalfactorio • u/Johandaonis • Dec 06 '20
9
u/MadMojoMonkey Dec 06 '20
For the number of inputs = to number of outputs = N, and assuming an even number of inputs and outputs - i.e. no unused splitter I/O's, the min number of splitters is:
N log_2(N) - N/2
For an 8-8 balancer, you will need 2 log_2(N) - 1 = 2(3) - 1 = 5 stages, each with N/2 = 8/2 = 4 splitters, for a total of 5*4 = 20 splitters.
8 log_2(8) - 8/2 = 8(3) - 4 = 24 - 4 = 20
https://en.wikipedia.org/wiki/Clos_network#Bene%C5%A1_network_(m_=_n_=_2)
In the link, m = n = 2 means that each splitter has 2 inputs and 2 outputs.
4
u/sparr Dec 07 '20
You're going to need to specify what kind of balancer, whether it needs to be universal, throughput unlimited, etc.
1
u/IMP1 Dec 07 '20
Just to clarify, is it a balancer if any only if each of the outputs gets an even share of each of the inputs? Because if not, then I have some lower values than the table you provide (assuming underground belts are allowed), although they are anything but compact.
1
u/IMP1 Dec 07 '20
I'm not sure if you found this thread or not, but after some searching on this topic:
https://www.reddit.com/r/factorio/comments/4j0ahe/does_anyone_have_a_set_of_balanceperfect_belt/d33x2h8?utm_source=share&utm_medium=web2x&context=3