MIXED GROUPING OF BATTERY CELLS (mn=constant)
* In electricity, when there is a mixed group of cells of emf E each, internal resistance r each such that there are n cells in series in a row, and there are m equal rows arranged in parallel and the system is linked to an external resistance R , current in the resistor R is given by I = nE / (R + nr/m ) = mnE / (mR+nr). If mn = k=constant, the arrangement of m and n which results in I being maximum is given by mR+ nr = minimum ; mR +nr = ( √mR √ nr )^{2} + 2√(mnrR) . So for mR+nr to be minimum, (√mR √ nr ) =0 or mR =nr or R =nr/m and I_{max} = kE/2nr = mnE / 2nr = (m/r)E/2 or I_{max} = mnE/2√(mnrR) = √(mn/rR)* ( E / 2) We can get the same result by calculus method by putting mn=k=constant and putting I=nE / (R + nr/m ) = f(m)= E/ [R/n +r/m] = E/ [Rm/k +r/m] to be extremum. df(m)/dm = 0 or r/m^{2} + R/k = 0 or m =± √(kr/R) = √(kr/R) since ve sign is meaning less. So (mR+nr)_{min}=mR + mnr/m =mR + kr/m =√(kr/R) *R +kr *√ (R/kr) = √(mnrR) +√(mnrR)=2√(mnrR) and I_{max} = mnE / 2√(mnrR)=√(mn/rR)* ( E / 2) 
* For mn=24, m=4,n=6, r=2, mR + nr will be minimum when R= 6*2/4=3; In other words, when R=3, R/r=3/2. thus n/m =6/4=3/2 will be the combination at which maximum current will flow through the resistance. Similarly, when R=2, R/r=1 and so m/n=1 or m*m=24 or m =4.8 , n=5. And at this combination, maximum current will flow. Rounding up, m=4,n=6 and R=2. 
since m,n,r, R i.e. 4 numbers are involved, we have tried to find out whether the numbers can form a quadrilateral . For example, taking mn= 24, the combination can be (m,n)=(24,1) , (1,24) , (12,2), (2,12), (8,3), (3,8), (6,4), (4,6) if m,n are to be integers only. 
taking (24,1) > and r=2, permissible k=2 only and permissible R=23,24,25. The minimum R which will result in maximum current is not permissible since triangle ACD cannot be constructed with that value of R. 
* the value of m for which m+n is minimum is given by f(x) = m+n=x+(
K/x) where k=mn =const. for extremum value of f(x), differentiating
f'(x) = 1 K/x^{2}=0 or x =√K =√mn

* When 2 cells are in series, resultant emf E = E1 + E2; Resultant r =r1+r2; resultant I= E/r = (E1+E2)/(r1+r2) If E1=E2 and r1=r2 , then I = 2E / 2r . if there are n such cells, I =nE/nr. If there is an external resistance R in series, then I = nE/(nr + R) 
* When 2 cells are in parallel, treatment is slightly different. First , we calculate R =r1r2/(r1+r2) and I = E1/r1 + E2/r2 = (E1r2+E2r1) / (r1r2) and E=IR=(E1r2+E2r1) / (r1+r2). Thus in series, we calculate E, r and then I but in parallel, we calculate first r, I and then E. For 3 parallel cells with different E, r , situation becomes more complicated. However, if we take E, r to be same for all cells, then for m combination, I becomes mE / r or E/(r/m). For an external resistance R in series, I= E/ [(r/m ) + R] =mE/(mR+r) 