This picture gives the origin of the Silmarillion (the book published in 1977 by Christopher Tolkien) from The History of Middle Earth, a 12-volume series of books published between 1983 and 1996 presenting the genesis and the development of the Silmarillion.
I searched the identical character strings between the Silmarillion and HoMe (length : 20 words). One 4*4 pixels square is equivalent to a word and the colormap is associated with a HoMe volume (1-5, 9-12) and Unfinished Tales (UT). Each rectangle represents a chapter : Ainulindalë (a), Valaquenta (v), the chapters of the Quenta Silmarillion (1-28), Akallebeth (a) and Of the Rings of Power and the Third Age (t).
A complete survey of the literary composition of Silmarillion is done by Douglas C. Kane in his book "Arda Reconstructed : the creation of the published Silmarillion" (Lehigh University Press, 2011).
After the end of the publication of the History of Middle-Earth, it is possible to know which texts are selected to compose the published Silmarillion (the 1977 version). Moreover, this composition was done with several editorial modifications which alters the true voice of Tolkien. These modifications are depicted in white in the infography.
The basic idea is to compare the texts. This is easy to do with appropriate algorithms written in C language (or in Scilab).