For two weightings it's quite simple:
- Take 1 ball from every machine,
ActualWeight - 10gr*10
is the difference for the faulty machine
- Using information from #1 you have the original task which is solvable with 1 weighting
I believe 1 weighting is not sufficient and here is why: if you take n1,n2,n3,...,n10 balls from corresponding machines, it's equally possible that 1st machine is faulty with weight difference 1/n1 and that 2nd machine is faulty with weight difference 1/n2 - these cases don't seem to be distinguishable...
To understand the formula, it would be easiest to explain how it works conceptually before we derive it.
Let's simplify the problem and say there are only 3 bags each with 2 coins in them. 2 of those bags have the 1 gram coins and one has the 1.01 gram gold coins. Let's denote the bags arbitrarily as $Bag_0$, $Bag_1$, and $Bag_2$. Similarly to your problem, let's take 0 coins from $Bag_0$, 1 coin from $Bag_1$, and 2 coins from $Bag_2$. We know that the gold coins must be in one of those bags, so there are three possibilities when we weigh the three coins we removed:
Gold Coins in $Bag_0$: So the weight of the 3 coins on the scale are all 1 gram. So the scale will read 3 grams.
Gold Coins in $Bag_1$: So the weight of 1 of the coins is 1.01 grams and 2 of the coins are 2 grams. So the scale will read 3.01 grams.
Gold Coins in $Bag_2$: So the weight of 2 of the coins is 2.02 grams and 1 of the coins is 1 gram. So the scale will read 3.02 grams.
So each possibility has a unique scenario. So if we determine the weight, we can determine from which bag those coins came from based on that weight.
We can generalize our results from this simplified example to your 100 bag example.
Now for deriving the formula. Say hypothetically, of our 100 bags, all 100 coins in each of the 100 bags weigh 1 gram each. In that case, when we remove 0 coins from $Bag_0$, 1 from $Bag_1$, up until 99 coins from $Bag_{99}$, we'll have a total of 4950 coins on the scale, which will equivalently be 4950 grams. Simply put, if $n$ is our Bag number (denoted $Bag_n$), we've placed $n$ coins from each $Bag_n$ onto the scale for $n = 0, 1, 2, ... 99 $.
So the weight of the coins will be $Weight = 1 + 2 + 3 + ... + 99 = 4950$
But we actually have one bag with gold coins weighing 1.01 grams. And we know that those 1.01 gram coins must be from some $Bag_n$. In our hypothetical example, all of our coins were 1 gram coins, so we must replace the $n$ coins weighed from $Bag_n$ with $n$ gold coins weighing 1.01 grams. Mathematically, we would have:
$Weight = 4950 - n + 1.01n = 4950 + .01n = 4950 + n/100$
Rearranging the formula to solve for n, we have:
$100(Weight-4950) = n$, where $Weight$ is $W$ and $n$ is $N$ in your example.
I have no knowledge of an alternative answer to this puzzle, but perhaps another member's answer may be enlightening if there is. Technically speaking, you could have denoted the bags from 1 to 100 and gone through a similar process as above, but the method is still the same, so I wouldn't treat it as a new answer.
If our electric scale is replaced by a scale of libra, I don't believe it would be possible to answer this puzzle with only one measurement of weight. But again, perhaps another answer may be enlightening on that.
Best Answer
Assuming that all normal coins have a uniform weight:
I think you would want to number the sets $1,2,\ldots,10$. Then take $1$ coin from the first set, $2$ coins from the second set, $i$ coins from the $i$th set, and $10$ coins from the $10$th set. Then the weighing machine will display the correct weight minus $n$ hundredths of an ounce. Then the faulty set is the one from which you selected $n$ coins.
You could also do this by selecting $0,1,2,\ldots,9$ coins. I'm not sure if either strategy fails for any edge cases.