How to cite the original source of an algorithm and a secondary source that provides a clearer description of the algorithm?

I had a situation where for a particular algorithm, it first shows up in a paper [1]. This makes [1] a primary source. I found [1] a bit hard reading when it came to describing the implementation and fine details of the algorithm. But it was good at describing why the algorithm was needed.

I found another work, which was a masters thesis [2]. It included a step by step mathematical working from what was in [1] (and [2] cited [1] appropriately). It helped me a lot. I could have done the mathematical working myself, but didn't.

So I am writing a brief summery of the Algorithm:

The {{Foo}} algorithm allows the {{Bar}} problem to be solved [1]. It is based on the fact that {{Equation}} holds under {{Conditions}} [2]. {{My own explanation of {{Foo}} here}}

Is this correct?

• It was alot helpful? – TRiG Jan 8 '15 at 14:47
• Oops, Fixed. (didn't even need to follow the link to know which blog it is pointing to) – Lyndon White Jan 9 '15 at 1:18

This is correct only if the source of the first sentence is exclusively [1] and the source of your second sentence is exclusively [2].

That is, if you learn "The {{Foo}} algorithm allows the {{Bar}} problem to be solved" from [1] without having read [2], and "It is based on the fact that {{Equation}} holds under {{Conditions}}" is an original contribution of [2] that is not in [1], then your citation is correct.

Otherwise, you may have to cite [1,2] for the first and/or second sentence as appropriate.

• if [1], never does the derivation, or pressents the final step (that makes the algorithm useful), as the authors assume that the reader is familiar enough with the related mathematics to derive this. Then citing [2] is enough. ie, even though the knowledge pressented in [2] must have been known to the authors of [1]. Because they didn't write it out anywhere I don't need to cite them for that. – Lyndon White May 13 '14 at 1:19
• If [1] makes no mention of "this is because {{Equation}} holds under {{Conditions}}" then you should not cite [1] for that statement. This would be akin to claiming "[1] supports my statement that X" when [1] does not say anything about X. On the other hand, if [1] does mention that "this is because {{Equation}} holds under {{Conditions}}" but you only understand how this matters after reading [2], you would cite both [1,2] for that statement. – ff524 May 13 '14 at 1:37

Something like this should be OK:

The Bar problem can be solved using the Foo algorithm [1], which is based on the fact that Equation holds under Conditions. A useful and detailed exposition of the Foo algorithm and how to implement it in practice can be found in [2].

• I like this way to do it, as it clarifies more precisely the main reason for citing the secondary source. – Tobias Kildetoft May 13 '14 at 7:31