While naming any compound, the numbering should be done such that position of substituted groups gives smallest sum.
I'm struggling with the IUPAC naming for cyclic compounds. How exactly does this rule work?
The guideline that you have mentioned (‘While naming any compound, the numbering should be done such that position of substituted groups gives the smallest sum.’) does not exist in the IUPAC recommendations.
The corresponding section in the current version of Nomenclature of Organic Chemistry – IUPAC Recommendations and Preferred Names 2013 (Blue Book) actually reads as follows:
P-14.3.5 Lowest set of locants
The lowest set of locants is defined as the set that, when compared term by term with other locant sets, each cited in order of increasing value, has the lowest term at the first point of difference; for example, the locant set ‘2,3,5,8’ is lower than ‘3,4,6,8’ and ‘2,4,5,7’.
(…)
Therefore, the smallest sum of locants can lead to wrong results.
For example, for 2,7,8-trimethyldecane, the smallest sum of locants would yield the wrong name ‘3,4,9-trimethyldecane’, since $2+7+8=17 > 3+4+9=16$.
Likewise, for 2,2,6,6,7-pentamethyloctane, the smallest sum of locants would yield the wrong name ‘2,3,3,7,7-pentamethyloctane’, since $2 + 2 + 6 + 6 + 7 = 23 > 2 + 3 + 3 + 7 + 7 = 22$.
For 1,6,7-trimethylnaphthalene, the smallest sum of locants would yield the wrong name ‘2,3,5-trimethylnaphthalene’, since $1 + 6 + 7 = 14 > 2 + 3 + 5 = 10$.
For 1,6-dimethylcyclohex-1-ene, the smallest sum of locants would yield the wrong name ‘2,3-dimethylcyclohex-1-ene’, since $1 + 6 = 7 > 2 + 3 = 5$.
Anyway, the IUPAC recommendations have more than 1500 pages. Hence, you should be careful when applying any simplified or abridged version of the nomenclature rules.
The way you have stated the rule can be misleading or even incorrect at times.
I think what you are talking about is the lowest locant rule or the first-point difference rule.
There are lots of sites,blogs and other online sources where you can learn about the topic in depth. http://chemwiki.ucdavis.edu/Organic_Chemistry/Hydrocarbons/Alkanes/Properties_of_Alkanes/Cycloalkanes/Nomenclature_of_Cycloalkanes. and here is the site where you can learn by watching online http://leah4sci.com/naming-organic-compounds-iupac-nomenclature/ . You can get many videos in YouTube as well. So go for these sources.