# 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 . This makes  a primary source. I found  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 . It included a step by step mathematical working from what was in  (and  cited  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 . It is based on the fact that {{Equation}} holds under {{Conditions}} . {{My own explanation of {{Foo}} here}}

Is this correct?

– TRiG
Jan 8, 2015 at 14:47
• Oops, Fixed. (didn't even need to follow the link to know which blog it is pointing to) Jan 9, 2015 at 1:18

This is correct only if the source of the first sentence is exclusively  and the source of your second sentence is exclusively .

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

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

• if , 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  is enough. ie, even though the knowledge pressented in  must have been known to the authors of . Because they didn't write it out anywhere I don't need to cite them for that. May 13, 2014 at 1:19
• If  makes no mention of "this is because {{Equation}} holds under {{Conditions}}" then you should not cite  for that statement. This would be akin to claiming " supports my statement that X" when  does not say anything about X. On the other hand, if  does mention that "this is because {{Equation}} holds under {{Conditions}}" but you only understand how this matters after reading , you would cite both [1,2] for that statement. May 13, 2014 at 1:37

Something like this should be OK:

The Bar problem can be solved using the Foo algorithm , 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 .

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