High Intensity Discharge lamps, such as high pressure mercury lamps, high pressure sodium lamps and metal halide lamps (all these are relatively high power lamps that are used to illuminate streets and various other spaces) are what are called "negative resistance" devices:
When they are connected to the AC outlet directly, they cause more and more current to be drawn, until they either blow the fuse or destroy themselves.
To prevent this from happening, they are connected in series with what's called a "ballast". A ballast is an inductive coil which limits the circuit current to i_b Amperes. The value i_b is characteristic of the ballast used. In other words, there is a one-to-one correspondance between ballast type and the amperage it provides when its connected in series with a specific lamp.
The ballast is (almost) pure inductive resistance R_b, therefore the ballast current and resistance are related via Ohm's Law for AC: i_b = 220V (or 110V) /R_b. Let's assume that we are working with 220V AC.
Since ballasts are AC resistors, they can be wired in series or in parallel.
Example: A HID lamp that requires 1.3A to operate, can use a ballast with R_b ~= 169.23 Ohm in AC.
220V/169.23Ohm ~= 1.3A
But it can also use two "larger"[*] ballasts with R_{b1} = R_{b2} ~= 84.6 Ohm wired in series:
220V/(84.6+84.6)Ohm ~= 1.3A
The circuit can also use two "smaller" ballasts with R_{b1} = R_{b2}~=338.4Ohm wired in parallel:
In this case the total resistance R_T is given by:
Therefore the circuit's total amperage i_T will again be:
i_T = 220/R_T ~= 1.3A.
Additionally, the circuit can also use two /different/ ballasts, with R_{b1} + R_{b2} = 169.23Ohm, wired in series.
And it can also use two different ballasts in parallel, provided the total resistance R_T from the parallel connection expression, comes out to be 169.23 Ohm. I am too lazy to cook up an example.
The puzzle: You are given n different ballasts, which provide for corresponding circuit amperages {i_1, i_2,...i_n}.
1) Determine how many different circuit amperages i_m you can get with these n ballasts. (Without using brute force?)
2) Specifically[**]: I have a lamp that requires amperage i_L. Can I find a combined connection with some of my n ballasts (some of them in parallel, others in series, etc) that will provide a "close" amperage i_B for my HID lamp? Let's say close is |i_L - i_B| <= epsilon, for some specified epsilon.
3) Same questions as 1) and 2) but allow some of the n ballasts to be identical (i.e. some of the ballasts in the collection have i_k = i_m)
Many thanks,
[*] By convention ballasts with smaller R_b are termed "larger" because they drive lamps of larger ratings, in Watts. [**] This is an actual problem I encountered with by collection of lamps and ballasts, so if anyone can come up with a Maple solution to the above puzzle, I'd appreciate it. -- Ioannis ------- The best way to predict reality, is to know exactly what you DON'T want.
> The puzzle: You are given n different ballasts, which provide for > corresponding circuit amperages {i_1, i_2,...i_n}.
> 1) Determine how many different circuit amperages i_m you can get with these n > ballasts. (Without using brute force?)
Just to clarify: 1) asks how many different amperages i_m one can get using the n ballasts, but in different wiring combinations. So, for example, when there are only two ballasts {b_1, b_2} of amperages {i_1, i_2}, there are obviously four solutions: the current of ballast b_1 alone in the circuit, the current of ballast b_2 alone in the circuit, the current of ballasts b_1 and b_2 in series and the current of ballasts b_1 and b_2 in parallel. So the solution for n=2, {i_1, i_2} is:
> 2) Specifically[**]: I have a lamp that requires amperage i_L. Can I find a > combined connection with some of my n ballasts (some of them in parallel, > others in series, etc) that will provide a "close" amperage i_B for my HID > lamp? Let's say close is |i_L - i_B| <= epsilon, for some specified epsilon.
Obviously in 2) I am interested for i_L =/= i_n for all n. Otherwise choose the ballast that gives i_n. -- Ioannis ------- The best way to predict reality, is to know exactly what you DON'T want.
Ioannis wrote: > "Ioannis" ... wrote ... > [snip] > > The puzzle: You are given n different ballasts, which provide for > > corresponding circuit amperages {i_1, i_2,...i_n}.
> > 1) Determine how many different circuit amperages i_m you can get > > with these n ballasts. (Without using brute force?)
> Just to clarify: 1) asks how many different amperages i_m one can get using > the n ballasts, but in different wiring combinations. So, for example, when > there are only two ballasts {b_1, b_2} of amperages {i_1, i_2}, there are > obviously four solutions [... {i_1, i_2, i_1||i_2, i_1+i_2} ]
(Insert left-out-_'s at obvious places in following.)
The following recursive approach almost works:
Let L = {L1, L2 ...} be the given values {i_1, i_2, ...}. Let Nj be the set of possible circuits with up to j items from among j items. Let Mj,k be the set of possible circuits with exactly k items from among j items. (That is, if C is in Mj,k, then C is a properly connected circuit made up of k items.) Thus, Nj = union over k=1 to j of Mj,k.
We suppose that item values L1, L2... are completely general, such that if C is in Mj,k and Lq is in C and Lp is not, and p < j+1, then substituting Lp for Lq gives C' in Mj,k, and C != C'.
Now consider augmenting Nj with Lr, r = j+1. For each circuit C in Mj,k, we can form a member of Mr,(k+1) with Lr in series with C, and another with it in parallel, and can form k members of Mr,k by substituting Lr in place of each of the k different Li in C. Then |Mr,k| = 2*|Mj,(k-1)| + k*|Mj,k| if 1 < k < r. (When k = r, this doesn't hold; the approach gives an easy and rigorous upper bound, however.)
> Let L = {L1, L2 ...} be the given values {i_1, i_2, ...}. > Let Nj be the set of possible circuits with up to j items from > among j items. Let Mj,k be the set of possible circuits with > exactly k items from among j items. (That is, if C is in Mj,k, > then C is a properly connected circuit made up of k items.) > Thus, Nj = union over k=1 to j of Mj,k.
> We suppose that item values L1, L2... are completely general, such > that if C is in Mj,k and Lq is in C and Lp is not, and p < j+1, > then substituting Lp for Lq gives C' in Mj,k, and C != C'.
> Now consider augmenting Nj with Lr, r = j+1. For each circuit > C in Mj,k, we can form a member of Mr,(k+1) with Lr in series with C, > and another with it in parallel, and can form k members of Mr,k by > substituting Lr in place of each of the k different Li in C. Then > |Mr,k| = 2*|Mj,(k-1)| + k*|Mj,k| if 1 < k < r. (When k = r, this doesn't > hold; the approach gives an easy and rigorous upper bound, however.)
Thanks. I think you almost got it. I say "almost", because just as soon as I went to bed, I also came up with a complete recursive solution. I think that the step n = 2 also solves the recursive step.
Let I_n = {i_1, i_2, ..., i_n} be the set of amperages from connections obtained with n ballasts.
Now let i_k be in I_n. Adding one more ballast with amperage i_{n+1}, and treating i_k as a single connection/amperage, we have the following recurence:
I think the above gives a complete recursive enumeration of all amperages.
For question 2) then, we have to enumerate I_n and calculate the set S = min{|i_L - i_B|: i_B \in I_n} If the set S contains members s_i for which s_i <= epsilon holds, we are done. We pick one of them. Otherwise we say there is no solution.
> -jiw
-- Ioannis ------- The best way to predict reality, is to know exactly what you DON'T want.
> Thanks. I think you almost got it. I say "almost", because just as soon as I > went to bed, I also came up with a complete recursive solution. I think that > the step n = 2 also solves the recursive step.
> Let I_n = {i_1, i_2, ..., i_n} be the set of amperages from connections > obtained with n ballasts.
> Now let i_k be in I_n. Adding one more ballast with amperage i_{n+1}, and > treating i_k as a single connection/amperage, we have the following recurence:
>> Thanks. I think you almost got it. I say "almost", because just as >> soon as I >> went to bed, I also came up with a complete recursive solution. I >> think that >> the step n = 2 also solves the recursive step.
>> Let I_n = {i_1, i_2, ..., i_n} be the set of amperages from >> connections >> obtained with n ballasts.
>> Now let i_k be in I_n. Adding one more ballast with amperage >> i_{n+1}, and >> treating i_k as a single connection/amperage, we have the following > recurence:
> You miss out, for example, ((A in parallel with C) in series with B).
Hmmm. I see. You and Joe are right. Switching to Joe's notation, it's missing at least the 1 | 3 + 2 connection. I think the reason the recursion misses those is because it considers i_k \in I_n as a single block. Obviously this is not the case with your example above.
Perhaps there is no recursive relationship that describes all the connections. From Joe's response I smell combinatorics here and that scares me.
Thanks to both.
> -- > Clive Tooth
-- Ioannis ------- The best way to predict reality, is to know exactly what you DON'T want.
> Let L = {L1, L2 ...} be the given values {i_1, i_2, ...}. > Let Nj be the set of possible circuits with up to j items from > among j items. Let Mj,k be the set of possible circuits with > exactly k items from among j items. (That is, if C is in Mj,k, > then C is a properly connected circuit made up of k items.) > Thus, Nj = union over k=1 to j of Mj,k.
> We suppose that item values L1, L2... are completely general, such > that if C is in Mj,k and Lq is in C and Lp is not, and p < j+1, > then substituting Lp for Lq gives C' in Mj,k, and C != C'.
> Now consider augmenting Nj with Lr, r = j+1. For each circuit > C in Mj,k, we can form a member of Mr,(k+1) with Lr in series with C, > and another with it in parallel, and can form k members of Mr,k by > substituting Lr in place of each of the k different Li in C. Then > |Mr,k| = 2*|Mj,(k-1)| + k*|Mj,k| if 1 < k < r. (When k = r, this doesn't > hold; the approach gives an easy and rigorous upper bound, however.)
Back to your solution. I /think/ I am starting to understand it now.
The only sad thing to me seems that you are using a counting argument which allows only for the calculation of |Mr,k|.
Looks like an explicit enumeration of Mr,k may be harder...
But thanks again, anyway. Your solution (and any others) will eventually go to my webpages.
> -jiw
-- Ioannis ------- The best way to predict reality, is to know exactly what you DON'T want.
>> You miss out, for example, ((A in parallel with C) in series with >> B).
> Hmmm. I see. You and Joe are right. Switching to Joe's notation, > it's missing > at least the 1 | 3 + 2 connection. I think the reason the recursion > misses > those is because it considers i_k \in I_n as a single block. > Obviously this is > not the case with your example above.
> Perhaps there is no recursive relationship that describes all the > connections. > From Joe's response I smell combinatorics here and that scares me.
COMMENT For n>=2 also operation count to create all permutations of n distinct elements using Algorithm L (lexicographic permutation generation) from Knuth's The Art of Computer Programming, Vol. 4, chapter 7.2.1.2.
Sequence gives number of loop repetitions of the j search loop in step L2. - Hugo Pfoertner (hugo(AT)pfoertner.org), Feb 06 2003
This sequence shares divisibility properties with A000522; each of the primes in A072456 divide only a finite number of terms of this sequence. - T. D. Noe (noe(AT)sspectra.com), Jul 07 2005