<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">ijms</journal-id>
<journal-title>International Journal of Molecular Sciences</journal-title>
<abbrev-journal-title>Int. J. Mol. Sci.</abbrev-journal-title>
<issn pub-type="epub">1422-0067</issn>
<publisher>
<publisher-name>Molecular Diversity Preservation International (MDPI)</publisher-name></publisher></journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">ijms-09-00131</article-id>
<article-categories>
<subj-group>
<subject>Full Research Paper</subject></subj-group></article-categories>
<title-group>
<article-title>Computing the Szeged and PI Indices of <italic>VC</italic><italic><sub>5</sub></italic><italic>C</italic><italic><sub>7</sub></italic><italic>[p,q]</italic> and <italic>HC</italic><italic><sub>5</sub></italic><italic>C</italic><italic><sub>7</sub></italic><italic>[p,q]</italic> Nanotubes</article-title></title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Iranmanesh</surname><given-names>Ali</given-names></name><xref ref-type="aff" rid="af1-ijms-09-00131">1</xref><xref ref-type="corresp" rid="c1-ijms-09-00131">*</xref></contrib>
<contrib contrib-type="author">
<name><surname>Alizadeh</surname><given-names>Yaser</given-names></name><xref ref-type="aff" rid="af1-ijms-09-00131">1</xref></contrib>
<contrib contrib-type="author">
<name><surname>Taherkhani</surname><given-names>Bahman</given-names></name><xref ref-type="aff" rid="af2-ijms-09-00131">2</xref></contrib></contrib-group>
<aff id="af1-ijms-09-00131">
<label>1</label>Department of Mathematics, Tarbiat Modares University, P. O. Box: 14115-137, Tehran, Iran; E-mail:
<email>yalizadeh@modares.ac.ir</email></aff>
<aff id="af2-ijms-09-00131">
<label>2</label>Department of Mathematics, Payame Noor University, Takestan/Gazvin, 3481699445 Iran; E-mail:
<email>bahman.taherkhani@pnu.ac.ir</email></aff>
<author-notes>
<corresp id="c1-ijms-09-00131">
<label>*</label>Author to whom correspondence should be addressed; E-mail:
<email>iranmana@modares.ac.ir</email>.</corresp></author-notes>
<pub-date pub-type="epub">
<day>5</day>
<month>2</month>
<year>2008</year></pub-date>
<pub-date pub-type="collection">
<month>2</month>
<year>2008</year></pub-date>
<volume>9</volume>
<issue>2</issue>
<fpage>131</fpage>
<lpage>144</lpage>
<history>
<date date-type="received">
<day>27</day>
<month>8</month>
<year>2007</year></date>
<date date-type="rev-recd">
<day>21</day>
<month>9</month>
<year>2007</year></date>
<date date-type="accepted">
<day>15</day>
<month>10</month>
<year>2007</year></date></history>
<copyright-statement>© 2008 by MDPI</copyright-statement>
<copyright-year>2008</copyright-year>
<abstract>
<p>In this paper we give a GAP program for computing the Szeged and the PI indices of any graph. Also we compute the Szeged and PI indices of <italic>VC</italic><sub>5</sub><italic>C</italic><sub>7</sub> [ <italic>p</italic>,<italic>q</italic>] and <italic>HC</italic><sub>5</sub><italic>C</italic><sub>7</sub> [ <italic>p</italic>,<italic>q</italic>] nanotubes by this program.</p></abstract>
<kwd-group>
<kwd>Szeged index</kwd>
<kwd>PI-index</kwd>
<kwd>nanotubes</kwd>
<kwd>Gap programming</kwd></kwd-group></article-meta></front>
<body>
<sec sec-type="intro">
<title>1. Introduction</title>
<p>One of the main distinctive characteristics of modern chemistry is the use of theoretical tools for the molecular modeling of physicochemical processes, chemical reaction, medicinal and toxicological events, etc., in which chemicals are involved. The success of the molecular modeling is judged by the insights that it offers on the nature of the processes studied, which permit better comprehension and a their rational modification. These properties, measured experimentally, are almost invariably expressed in quantitative terms, for instance boiling point, refraction index, transition state energy, percentage of inhibition of some enzymatic activity, lethal dose, and so forth. The paradigm for the modeling of such properties is the relationship that exists between them and the molecular structure of chemical. This fact highlights the first challenge for molecular modeling: the properties are expressed as number while the molecular structure is not. The way to solve this problem is by using molecular descriptors, which are numbers representing information about different molecular features, to describe quantitatively the properties under study. These models are known as quantitative structure-property (<bold>QSPR</bold>) and quantitative structure-activity relationships (<bold>QSAR</bold>), depending on the physicochemical or biological nature of the properties studied, respectively.</p>
<p>Topological indices of nanotubes are numerical descriptors that are derived from graphs of chemical compounds. Such indices based on the distances in a graph are widely used for establishing relationships between the structure of nanotubes and their physicochemical properties. Usage of topological indices in biology and chemistry began in 1947, when the chemist Harold Wiener [<xref ref-type="bibr" rid="b1-ijms-09-00131">1</xref>] introduced the so-called Wiener index to demonstrate correlations between physicochemical properties of organic compounds and the index of their molecular graphs. Wiener originally defined his index (W) on trees and studied its use for correlations of physicochemical properties of alkanes, alcohols, amines and their analogous compounds [<xref ref-type="bibr" rid="b2-ijms-09-00131">2</xref>]. Starting from the middle of the 1970s, the Wiener index gained much popularity and, since then, new results related to it are constantly being reported. For a review, historical details and further bibliography on the chemical applications of the Wiener index see [<xref ref-type="bibr" rid="b3-ijms-09-00131">3</xref>–<xref ref-type="bibr" rid="b5-ijms-09-00131">5</xref>]. Another topological index was introduced by Gutman and called the Szeged index, abbreviated as Sz [<xref ref-type="bibr" rid="b2-ijms-09-00131">2</xref>]. Let G be a connected graph. The vertex-set and edge-set of G denoted by V(G) and E(G) respectively. The distance between the vertices u and v, d(u,v), in a graph is the number of edges in a shortest path connecting them. Two graph vertices are adjacent if they are joined by a graph edge. Let e be an edge of a graph G connecting the vertices u and v. Two sets <italic>N</italic><sub>1</sub> (<italic>e</italic>|<italic>G</italic>) and <italic>N</italic><sub>2</sub> (<italic>e</italic>|<italic>G</italic>) are defined as follows: </p>
<disp-formula id="FD1">
<mml:math id="M1" display="block">
<mml:msub>
<mml:mi>N</mml:mi>
<mml:mn>1</mml:mn></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>e</mml:mi>
<mml:mo>|</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mo stretchy="false">{</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>∈</mml:mo>
<mml:mi>V </mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>|</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>u</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>&lt;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>v</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo stretchy="false">}</mml:mo>
<mml:mtext> and </mml:mtext>
<mml:msub>
<mml:mi>N</mml:mi>
<mml:mn>2</mml:mn></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>e</mml:mi>
<mml:mo>|</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mo stretchy="false">{</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>∈</mml:mo>
<mml:mi>V</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>|</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>v</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>&lt;</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>u</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo stretchy="false">}</mml:mo>
<mml:mo>.</mml:mo></mml:math></disp-formula>
<p>The number of elements of <italic>N</italic><sub>1</sub> (<italic>e</italic>| <italic>G</italic>) and <italic>N</italic><sub>2</sub> (<italic>e|G</italic>) are denoted by <italic>n</italic><sub>1</sub>(<italic>e|G</italic>) and <italic>n</italic><sub>2</sub> (<italic>e|G</italic>) respectively.</p>
<p>The Szeged index of the graph <italic>G</italic> is defined as 
<inline-formula>
<mml:math display="block">
<mml:mi>S</mml:mi>
<mml:mi>z </mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:munder>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mo>∈</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder>
<mml:mrow>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mn>1</mml:mn></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>e</mml:mi>
<mml:mo>|</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>.</mml:mo>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mn>2</mml:mn></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>e</mml:mi>
<mml:mo>|</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
<p>For the reason of the coincidence of Wiener and Szeged indices in case of trees the authors in [<xref ref-type="bibr" rid="b6-ijms-09-00131">6</xref>] and [<xref ref-type="bibr" rid="b7-ijms-09-00131">7</xref>] introduced another Szeged/Wiener-like topological index and named it the Padmakar-Ivan index, abbreviated as PI. In fact the PI index of the graph G is denoted by PI(G) and defined as follows:</p>
<disp-formula id="FD2">
<mml:math id="M2" display="block">
<mml:mi>P</mml:mi>
<mml:mi>I</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:munder>
<mml:mo>∑</mml:mo>
<mml:mrow>
<mml:mi>e</mml:mi>
<mml:mo>∈</mml:mo>
<mml:mi>E</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder>
<mml:mrow>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mn>1</mml:mn></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>e</mml:mi>
<mml:mo>|</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>n</mml:mi>
<mml:mn>2</mml:mn></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>e</mml:mi>
<mml:mo>|</mml:mo>
<mml:mi>G</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
<p>Applications of the PI index to QSRP/QSAR were studied in [<xref ref-type="bibr" rid="b8-ijms-09-00131">8</xref>]. The index was mostly compared with the Wiener and the Szeged indices. It turned out that the PI index has similar discriminating power as the other two indices and in many cases (for instance to model ¢max, the so called difference in doublet of deformation mode, of unbranched cycloalkanes) it gives better results. As we already mentioned, The Szeged index incorporates the distribution of vertices of a molecular graph, while the PI index does this job for the edges. Hence it seems that a combination of both could give good results in QSRP/QSAR studies. Indeed, the combination of the PI index and the Szeged index is the best for modeling polychlorinated biphenyls (PCBs) in environment among the three possible pairs of indices selected from the PI index, the Szeged index, and the Wiener index [<xref ref-type="bibr" rid="b8-ijms-09-00131">8</xref>]. For the Wiener and the Szeged indices such studies were previously done in [<xref ref-type="bibr" rid="b9-ijms-09-00131">9</xref>,<xref ref-type="bibr" rid="b10-ijms-09-00131">10</xref>]. The Szeged and PI indices of some nanotubes were computed in [<xref ref-type="bibr" rid="b11-ijms-09-00131">11</xref>–<xref ref-type="bibr" rid="b14-ijms-09-00131">14</xref>].</p>
<p>The computation of Szeged and PI indices seems straightforward, but this is not entirely true. For computing the Szeged (or PI) index of any graph, we must obtain <italic>n</italic><sub>1</sub> (<italic>e|G</italic>) and <italic>n</italic><sub>2</sub> (<italic>e|G</italic>) for any edge in the graph and this takes very long time. Up to now, many papers have been published in the international scientific literature which computed the Szeged index (or PI index) of some nanotubes by the above explanation [<xref ref-type="bibr" rid="b11-ijms-09-00131">11</xref>–<xref ref-type="bibr" rid="b22-ijms-09-00131">22</xref>]. In our paper, we obtain an algorithm which is faster than the direct implementation. Also, since up to now, not give any algorithm for computing these indexes, it is the best algorithm by GAP program and therefore, our paper is the first paper in this subject which give an algorithm for computation of Szeged and PI indices of any graph.</p></sec>
<sec>
<title>2. An algorithm for the computation of the Szeged and PI indices for an arbitrary graph</title>
<p>In this section, we give an algorithm that enables us to compute the Szeged and PI indices of any graph. For this purpose, the following algorithm is presented:</p>
<p>1-We assign one number to any vertex.</p>
<p>2-We determine all of adjacent vertices set of the vertex <italic>i</italic>, <italic>i</italic>∈<italic>V</italic> (G) and this set is denoted by N(i).</p>
<p>The set of vertices that their distance to vertex <italic>i</italic> is equal to <italic>t</italic> (<italic>t</italic> ≥ 0) is denoted by D <sub>i, t</sub> and considering <italic>D</italic><italic><sub>i</sub></italic><sub>, 0</sub> = {<italic>i</italic>}.Let <italic>e</italic> = <italic>ij</italic> be an edge connecting the vertices <italic>i</italic> and <italic>j</italic>, then we have the following result:</p>
<list list-type="lower-alpha">
<list-item>
<p><italic>V</italic> = ∪<italic><sub>t</sub></italic><sub>≥0</sub> <italic>D</italic><italic><sub>i</sub></italic><sub>,</sub><italic><sub>t</sub></italic>, <italic>i</italic> ∈ <italic>V</italic> (G).</p></list-item>
<list-item>
<p>(<italic>D</italic><italic><sub>i</sub></italic><sub>,</sub><italic><sub>t</sub></italic> \ <italic>D</italic><italic><sub>j</sub></italic><sub>,</sub><italic><sub>t</sub></italic>) ⊆ (<italic>D</italic><italic><sub>j</sub></italic><sub>,</sub><italic><sub>t</sub></italic><sub>−1</sub> ∪ <italic>D</italic><italic><sub>j</sub></italic><sub>,</sub><italic><sub>t</sub></italic> <sub>+1</sub>), <italic>t</italic> ≥1.</p></list-item>
<list-item>
<p>(<italic>D</italic><italic><sub>i,t</sub></italic> ∩<italic>D</italic><italic><sub>j,t−1</sub></italic>) ⊆ <italic>N</italic> <sub>2</sub> (<italic>e</italic>|<italic>G</italic>) <italic>and D</italic><italic><sub>i.t</sub></italic> ∩<italic>D</italic> <italic><sub>j,t+1</sub></italic>⊆<italic>N</italic><sub>1</sub> (<italic>e</italic>|<italic>G</italic>) <italic>t</italic> ≥1.</p></list-item>
<list-item>
<p>(<italic>D</italic><italic><sub>i</sub></italic><sub>,1</sub> ∪{<italic>i</italic>}) \ (<italic>D</italic><italic><sub>j</sub></italic><sub>,1</sub> ∪{ <italic>j</italic>}) ⊆ <italic>N</italic><sub>1</sub> (<italic>e/G</italic>) <italic>and</italic> (<italic>D</italic> <italic><sub>j</sub></italic><sub>,1</sub> ∪{ <italic>j</italic>}) \ (<italic>D</italic><italic><sub>i</sub></italic><sub>,1</sub> ∪{<italic>i</italic>}) ⊆ <italic>N</italic><sub>2</sub> (<italic>e|G</italic>).</p></list-item></list>
<p>According to the above relations, by determining <italic>D</italic><italic><sub>i</sub></italic><sub>,</sub><italic><sub>t</sub></italic>,<italic>t</italic> ≥ 1, we can obtain <italic>N</italic><sub>1</sub> (<italic>e</italic>|<italic>G</italic>) and <italic>N</italic><sub>2</sub> (<italic>e</italic>|<italic>G</italic>) for each edge e and therefore the Szeged and PI indices of the graph G is computed. In the following section we obtain the <italic>D</italic><italic><sub>i</sub></italic><sub>,</sub><italic><sub>t</sub></italic>, <italic>t ≥</italic> 1, for each vertex <italic>i</italic></p>
<p>3- The distance between vertex <italic>i</italic> and its adjacent vertices is equal to 1, therefore D<sub>i,1</sub> = N(i). For each <italic>j</italic> ∈ <italic>D</italic><italic><sub>i</sub></italic><sub>,</sub><italic><sub>t</sub></italic>,<italic>t</italic> ≥1, the distance between each vertex of set <italic>N</italic>(<italic>j</italic>) \ (<italic>D</italic><italic><sub>i</sub></italic><sub>,</sub><italic><sub>t</sub></italic> ∪ <italic>D</italic><italic><sub>i</sub></italic><sub>,</sub><italic><sub>t−</sub></italic><sub>1</sub>) and the vertex <italic>i</italic> is equal to <italic>t</italic> +1, thus we have</p>
<disp-formula id="FD3">
<mml:math id="M3" display="block">
<mml:msub>
<mml:mi>D</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msub>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mo>∪</mml:mo>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>∈</mml:mo>
<mml:msub>
<mml:mi>D</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>N</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>j</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>\</mml:mo>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>D</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi></mml:mrow></mml:msub>
<mml:mo>∪</mml:mo>
<mml:msub>
<mml:mi>D</mml:mi>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:msub>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>,</mml:mo>
<mml:mtext> </mml:mtext>
<mml:mi>t</mml:mi>
<mml:mo>≥</mml:mo>
<mml:mn>1.</mml:mn></mml:math></disp-formula>
<p>According to the above equation we can obtain <italic>D</italic><italic><sub>i</sub></italic><sub>,</sub><italic><sub>t</sub></italic> <italic>t</italic> ≥ 2 for each <italic>i</italic> ∈<italic>V</italic> (G).</p>
<p>4- At the start of program we set SZ and PI equal to zero and T equal to empty set. At the end of program the values SZ and PI are equal to the Szeged and PI indices of the graph G respectively. For each vertex <italic>i</italic>, 1≤<italic>i</italic>≤ <italic>n</italic>, and each vertex <italic>j</italic> in <italic>N</italic>(<italic>i</italic>), we determine <italic>N</italic><sub>1</sub> (<italic>e|G</italic>) and <italic>N</italic><sub>2</sub> (<italic>e|G</italic>) for edge <italic>e</italic> =<italic>ij</italic>,then add the values of <italic>n</italic><sub>1</sub> (<italic>e|G</italic>).<italic>n</italic><sub>2</sub> (<italic>e|G</italic>) and <italic>n</italic><sub>1</sub> (<italic>e|G</italic>) +<italic>n</italic><sub>2</sub> (<italic>e|G</italic>) to <italic>S Z</italic> and PI respectively. Since the edge <italic>j i</italic> is equal to <italic>ij</italic>, we add the vertex i to T and continue this step for the vertex i+1 and for each vertex in <italic>N</italic>(<italic>i</italic> +1) \ <italic>T</italic>.</p>
<p>GAP stands for Groups, Algorithms and Programming [<xref ref-type="bibr" rid="b23-ijms-09-00131">23</xref>]. The name was chosen to reflect the aim of the system, which is group theoretical software for solving computational problems in group theory. The last years have seen a rapid spread of interest in the understanding, design and even implementation of group theoretical algorithms. GAP software was constructed by GAP's team in Aachen. We encourage the reader to consult Refs. [<xref ref-type="bibr" rid="b24-ijms-09-00131">24</xref>] and [<xref ref-type="bibr" rid="b25-ijms-09-00131">25</xref>] for background materials and computational techniques related to applications of GAP in solving some problems in chemistry and biology. According to the above algorithm, we prepared a GAP program to compute the Szeged and PI indices of dendrimers<italic>T</italic><italic><sub>k</sub></italic> <sub>,</sub><italic><sub>d</sub></italic>.</p>
<sec>
<title>2.1. Example</title>
<p>The Wiener index of tree dendrimers <italic>T</italic> <sub><italic>k,d</italic></sub>, <italic>k</italic>≥1, <italic>d</italic>≥3, is computed in [<xref ref-type="bibr" rid="b26-ijms-09-00131">26</xref>,<xref ref-type="bibr" rid="b27-ijms-09-00131">27</xref>]. Since the Wiener and Szeged index coincide on trees [<xref ref-type="bibr" rid="b28-ijms-09-00131">28</xref>,<xref ref-type="bibr" rid="b29-ijms-09-00131">29</xref>], thus the Szeged index of <italic>T</italic><italic><sub>k</sub></italic> <sub>,</sub><italic><sub>d</sub></italic> is equal to its Wiener index.</p>
<p>The following results are obtained in [<xref ref-type="bibr" rid="b26-ijms-09-00131">26</xref>,<xref ref-type="bibr" rid="b27-ijms-09-00131">27</xref>].</p>
<p>For every <italic>d</italic>≥3, the tree <italic>T</italic> <italic><sub>k</sub></italic> <sub>,</sub><italic><sub>d</sub></italic> has order</p>
<disp-formula id="FD4">
<mml:math id="M4" display="block">
<mml:mi>n</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>T</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>d</mml:mi></mml:mrow></mml:msub>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo>+</mml:mo>
<mml:mfrac>
<mml:mi>d</mml:mi>
<mml:mrow>
<mml:mi>d</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>2</mml:mn></mml:mrow></mml:mfrac>
<mml:mo stretchy="true">[</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mi>k</mml:mi></mml:msup>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn></mml:mrow></mml:mrow>
<mml:mo stretchy="true">]</mml:mo></mml:math></disp-formula>
<p>and its Szeged index is equal to Wiener index, i.e.</p>
<disp-formula id="FD5">
<mml:math id="M5" display="block">
<mml:mi>S</mml:mi>
<mml:mi>z</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>T</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>d</mml:mi></mml:mrow></mml:msub>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mi>W</mml:mi>
<mml:mtext> </mml:mtext>
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mi>T</mml:mi>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>d</mml:mi></mml:mrow></mml:msub>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mn>1</mml:mn>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mn>3</mml:mn></mml:msup></mml:mrow></mml:mfrac>
<mml:mrow>
<mml:mo>[</mml:mo> 
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mi>k</mml:mi></mml:mrow></mml:msup>
<mml:mo stretchy="false">[</mml:mo>
<mml:mi>k</mml:mi>
<mml:msup>
<mml:mi>d</mml:mi>
<mml:mn>3</mml:mn></mml:msup>
<mml:mo>−</mml:mo>
<mml:mn>2</mml:mn>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>k</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo>
<mml:msup>
<mml:mi>d</mml:mi>
<mml:mn>2</mml:mn></mml:msup>
<mml:mo>+</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo stretchy="false">]</mml:mo>
<mml:mo>+</mml:mo>
<mml:mn>2</mml:mn>
<mml:msup>
<mml:mi>d</mml:mi>
<mml:mn>2</mml:mn></mml:msup>
<mml:msup>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>d</mml:mi>
<mml:mo>−</mml:mo>
<mml:mn>1</mml:mn>
<mml:mo stretchy="false">)</mml:mo></mml:mrow>
<mml:mi>k</mml:mi></mml:msup>
<mml:mo>−</mml:mo>
<mml:mi>d</mml:mi></mml:mrow> 
<mml:mo>]</mml:mo></mml:mrow>
<mml:mo>.</mml:mo></mml:math></disp-formula>
<p>For computation of the Szeged and PI indices of <italic>T</italic> <italic><sub>k, d</sub></italic> by the above program, at first we assign to any vertex one number (See <xref ref-type="fig" rid="f1-ijms-09-00131">figure 1</xref>); according to this numbering, the set of adjacent vertices to each vertex, 1≤<italic>i</italic>≤<italic>n</italic>, is obtained by the following program (part 1). In fact part 1 of the program is the presentation of the graph. We use part 2 for compute the Szeged and PI indices of the graph.</p>
<p>The following program computes the Szeged and PI indices of the <italic>T</italic><italic><sub>k,d</sub></italic> for arbitrary values of d and k.</p>
<p>d:=3; k:=3;#(For example)</p>
<p>n:=1+(d/(d-2))*((d-1)^k - 1);</p>
<p>N:=[];</p>
<p>K1:=[2..d+1];</p>
<p>N[1]:=K1;</p>
<p>for i in K1 do</p>
<p> if k=1 then N[i]:=[1];</p>
<p> else</p>
<p> N[i]:=[(d-1)*i+4-d..(d-1)*i+2];</p>
<p> Add(N[i],1);fi;</p>
<p>od;</p>
<p>K2:=[d+2..1+(d/(d-2))*((d-1)^(k-1) - 1)];</p>
<p>for i in K2 do</p>
<p> N[i]:=[(d-1)*i+4-d..(d-1)*i+2];</p>
<p> Add(N[i],Int((i-4+d)/(d-1)));</p>
<p>od;</p>
<p>K3:=[2+(d/(d-2))*((d-1)^(k-1) - 1)..n];</p>
<p>for i in K3 do</p>
<p> if k=1 then N[i]:=[1];</p>
<p>  else</p>
<p> N[i]:=[Int((i-4+d)/(d-1))]; fi;</p>
<p>od;</p>
<p># (Part2)</p>
<p>D:=[];</p>
<p>for i in [1..n] do</p>
<p>   D[i]:=[];</p>
<p>   u:=[i];</p>
<p>   D[i][1]:=N[i];</p>
<p>   u:=Union(u,D[i][1]);</p>
<p>   s:=1;</p>
<p>   t:=1;</p>
<p>   while s&lt;&gt;0 do</p>
<p>    D[i][t+1]:=[];</p>
<p>    for j in D[i][t] do</p>
<p>     for m in Difference(N[j],u) do</p>
<p>      AddSet(D[i][t+1],m);</p>
<p>     od;</p>
<p>    od;</p>
<p>   u:=Union(u,D[i][t+1]);</p>
<p>     if D[i][t+1]=[] then</p>
<p>    s:=0;</p>
<p>   fi;</p>
<p>   t:=t+1;</p>
<p>   od;</p>
<p>od;</p>
<p>T:=[];</p>
<p>sz:=0;</p>
<p>pi:=0;</p>
<p>for i in [1..n-1] do</p>
<p>N1:=[];</p>
<p> for j in Difference(N[i],T) do</p>
<p>N2:=[];</p>
<p>  N1[j]:=Union(Difference(N[i],Union([j],N[j])),[i]);</p>
<p>  N2[i]:=Union(Difference(N[j],Union([i],N[i])),[j]);</p>
<p>  for t in [2..Size(D[i])-1] do</p>
<p>   for x in Difference(D[i][t],Union(D[j][t],[j])) do</p>
<p>    if not x in D[j][t-1] then</p>
<p>      AddSet(N1[j],x);</p>
<p>     elif x in D[j][t-1] then</p>
<p>      AddSet(N2[i],x);</p>
<p>    fi;</p>
<p>    od;</p>
<p> od;</p>
<p>  sz:=sz+Size(N1[j])*Size(N2[i]);</p>
<p>  pi:=pi+Size(N1[j])+Size(N2[i]);</p>
<p>  od;</p>
<p>  Add(T,i);</p>
<p> od;</p>
<p>sz;# (The value of sz is equal to Szeged index of the graph)</p>
<p>pi; # (The value of pi is equal to PI index of the graph)</p></sec></sec>
<sec>
<title>3. Computation of the Szeged and PI indices of <italic>VC</italic><italic><sub>5</sub></italic><italic>C</italic><italic><sub>7</sub></italic><italic>[p,q]</italic> nanotubes with the GAP program</title>
<p>A C<sub>5</sub>C<sub>7</sub> net is a trivalent decoration made by alternating C<sub>5</sub> and C<sub>7</sub>. It can cover either a cylinder or a torus. In this section we compute the Szeged and PI indices of <italic>VC<sub>5</sub>C<sub>7</sub>[p,q]</italic> nanotubes by GAP program.</p>
<p>We denote the number of pentagons in the first row by p, in this nanotube the four first rows of vertices and edges are repeated alternatively, we denote the number of this repetition by <italic>q</italic>. In each period there are 16 <italic>p</italic> vertices and 3<italic>p</italic> vertices which are joined to the end of the graph and hence the number of vertices in this nanotube is equal to16 <italic>pq</italic> +3<italic>p</italic>.</p>
<p>We partition the vertices of the graph to the following sets:</p>
<def-list>
<def-item>
<term><italic>K</italic><sub>1</sub></term>
<def>
<p>The vertices of the first row whose number is 6 <italic>p</italic>.</p></def></def-item>
<def-item>
<term><italic>K</italic><sub>2</sub></term>
<def>
<p>The vertices of the first row in each period except the first one whose number is 6 <italic>p</italic>(<italic>q</italic> − 1).</p></def></def-item>
<def-item>
<term><italic>K</italic><sub>3</sub></term>
<def>
<p>The vertices of the second rows in each period whose number is 2 <italic>pq</italic>.</p></def></def-item>
<def-item>
<term><italic>K</italic><sub>4</sub></term>
<def>
<p>The vertices of the third row in each period whose number is 6 <italic>pq</italic>.</p></def></def-item>
<def-item>
<term><italic>K</italic><sub>5</sub></term>
<def>
<p>The vertices of the fourth row in each period whose number is 2 <italic>pq</italic>.</p></def></def-item>
<def-item>
<term><italic>K</italic><sub>6</sub></term>
<def>
<p>The last vertices of the graph whose number is3<italic>p</italic>.</p></def></def-item></def-list>
<p>We write a program to obtain the adjacent vertices set to each vertex in the sets <italic>K</italic><italic><sub>i</sub></italic>, i=1…6. We can obtain the adjacent vertices set to each vertex by the join of these programs. In this program, the value of x is the assign number of vertex <italic>i</italic> in that row.</p>
<p>The following program computes the Szeged and PI indices of <italic>VC<sub>5</sub>C<sub>7</sub>[p,q]</italic> nanotubes for arbitrary values <italic>p</italic> and <italic>q</italic>.</p>
<p>p:=4; q:=2; # (for example)</p>
<p>n:=16*p*q+3*p;</p>
<p>N:=[];</p>
<p>K1:=[1..6*p];</p>
<p>V1:=[2..6*p -1];</p>
<p>for i in V1 do</p>
<p> if i mod 6=1 then N[i]:=[i-1,i+1,i+8*p];</p>
<p>  elif i mod 6 in [0,2,4] then N[i]:=[i-1,i+1];</p>
<p>   elif i mod 6=3 then N[i]:=[i-1,i+1,(1/3)*(i-3)+6*p+1];</p>
<p>    elif i mod 6=5 then N[i]:=[i-1,i+1,(1/3)*(i-5)+6*p +2];fi;</p>
<p> N[1]:=[2,6*p,8*p+1];</p>
<p> N[6*p]:=[6*p-1,1];</p>
<p>od;</p>
<p>K:=[6*p+1..16*p*q];</p>
<p>K2:=Filtered(K,i-&gt;i mod (16*p) in [1..6*p]);</p>
<p>for i in K2 do</p>
<p> x:= i mod (16*p);</p>
<p> if x mod 6=1 then N[i]:=[i-1,i+1,i+8*p];</p>
<p>  elif x mod 6=2 then N[i]:=[i-1,i+1,(1/3)*(x-2)+2+i-x-2*p];</p>
<p>   elif x mod 6=3 then N[i]:=[i-1,i+1,(1/3)*(x-3)+1+i-x+6*p];</p>
<p>    elif x mod 6=4 then N[i]:=[i-1,i+1,i-8*p];</p>
<p>     elif x mod 6=5 then N[i]:=[i-1,i+1,(1/3)*(x-5) +2+i-x+6*p];</p>
<p>      elif x mod 6=0 then N[i]:=[i-1,i+1,(1/3)*x +1+i-x-2*p];fi;</p>
<p> if x=1 then N[i]:=[i+1,i-1+6*p,i+8*p];fi;</p>
<p> if x=6*p then N[i]:=[i-1,i- 6*p+1,i- 8*p+1];fi;</p>
<p>od;</p>
<p>K3:=Filtered(K,i-&gt;i mod (16*p) in [6*p+1..8*p]);</p>
<p>for i in K3 do</p>
<p> x:=(i-6*p) mod (16*p);</p>
<p> if x mod 2=0 then N[i]:=[i-1,3*(x-2)+5+i-x- 6*p,3*(x-2)+5+i-x+2*p];</p>
<p>  else N[i]:=[i+1,2*x+i- 6*p,2*x+i+2*p];fi;</p>
<p>od;</p>
<p>K4:=Filtered(K,i-&gt;i mod (16*p) in [8*p+1..14*p]);</p>
<p>for i in K4 do</p>
<p>x:=(i- 8*p) mod (16*p);</p>
<p>if x mod 6=1 then N[i]:=[i-1,i+1,i- 8*p];</p>
<p> elif x mod 6=2 then N[i]:=[i-1,i+1,(1/3)*(x-2)+2+i-x+6*p];</p>
<p>  elif x mod 6=3 then N[i]:=[i-1,i+1,(1/3)*(x-3)+1+i-x-2*p];</p>
<p>   elif x mod 6=4 then N[i]:=[i-1,i+1,i+8*p];</p>
<p>    elif x mod 6=5 then N[i]:=[i-1,i+1,(1/3)*(x-5)+2+i-x- 2*p];</p>
<p>     elif x mod 6=0 then N[i]:=[i-1,i+1,(1/3)*x+1+i-x+6*p];fi;</p>
<p> if x=1 then N[i]:=[i-8*p,i+1,i+6*p-1];fi;</p>
<p> if x=6*p then N[i]:=[i-1,i-6*p+1,i+1];fi;</p>
<p>od;</p>
<p>K5:=Filtered(K,i-&gt;i mod (16*p) in Union([14*p+1..16*p-1],[0]));</p>
<p>for i in K5 do</p>
<p> x:=(i-14*p) mod (16*p);</p>
<p> if x mod 2=1 then N[i]:=[i+1,3*(x-1)+i-x-6*p,3*(x-1)+i-x+2*p];</p>
<p>  else N[i]:=[i-1,3*(x-2)+2+i-x-6*p,3*(x-2)+2+i-x+2*p];fi;</p>
<p> if x=1 then N[i]:=[i+1,i-1,i-1+8*p];fi;</p>
<p> if x=2*p then N[i]:=[i-1,3*(x-2)+2+i-x-6*p,3*(x-2)+2+i-x+2*p];fi;</p>
<p>od;</p>
<p>K6:=[16*p*q+1..n];</p>
<p>for i in K6 do</p>
<p> x:=i mod (16*p);</p>
<p> if x mod 3=1 then y:= (2/3)*(x-1)+2+i-x- 2*p;</p>
<p>  elif x mod 3=2 then y:=i+x- 8*p;</p>
<p>   elif x mod 3=0 then y:=(2/3)*(x- 3)+3+i-x-2*p;fi;</p>
<p>if x=3*p then y:=i- 5*p+1;fi;</p>
<p> N[i]:=[y];</p>
<p> N[y][3]:=i;</p>
<p>od;</p>
<p>D:=[];</p>
<p>for i in [1..n] do</p>
<p>  D[i]:=[];</p>
<p>  u:=[i];</p>
<p>  D[i][1]:=N[i];</p>
<p>  u:=Union(u,D[i][1]);</p>
<p>  s:=1;</p>
<p>  t:=1;</p>
<p>  while s&lt;&gt;0 do</p>
<p>   D[i][t+1]:=[];</p>
<p>   for j in D[i][t] do</p>
<p>    for m in Difference(N[j],u) do</p>
<p>     AddSet(D[i][t+1],m);</p>
<p>    od;</p>
<p>   od;</p>
<p>  u:=Union(u,D[i][t+1]);</p>
<p>    if D[i][t+1]=[] then</p>
<p>   s:=0;</p>
<p>  fi;</p>
<p>  t:=t+1;</p>
<p>  od;</p>
<p>od;</p>
<p>T:=[];</p>
<p>sz:=0;</p>
<p>pi:=0;</p>
<p>for i in [1..n-1] do</p>
<p>N1:=[];</p>
<p>  for j in Difference(N[i],T) do</p>
<p>N2:=[];</p>
<p>   N1[j]:=Union(Difference(N[i],Union([j],N[j])),[i]);</p>
<p>   N2[i]:=Union(Difference(N[j],Union([i],N[i])),[j]);</p>
<p>    for t in [2..Size(D[i])-1] do</p>
<p>     for x in Difference(D[i][t],Union(D[j][t],[j])) do</p>
<p>      if not x in D[j][t-1] then</p>
<p>        AddSet(N1[j],x);</p>
<p>       elif x in D[j][t-1] then</p>
<p>        AddSet(N2[i],x);</p>
<p>    fi;</p>
<p>    od;</p>
<p>   od;</p>
<p>  sz:=sz+ Size(N1[j])*Size(N2[i]);</p>
<p>  pi:=pi+ Size(N1[j])+Size(N2[i]);</p>
<p>  od;</p>
<p>  Add(T,i);</p>
<p>od;</p>
<p>sz; # (The value of sz is equal to Szeged index of the graph)</p>
<p>pi; # (The value of pi is equal to PI index of the graph)</p></sec>
<sec>
<title>4. Computation of the Szeged and PI indices of <italic>HC</italic><italic><sub>5</sub></italic><italic>C</italic><italic><sub>7</sub></italic><italic>[p,q]</italic> nanotubes with the GAP program</title>
<p>In this section we compute the Szeged and PI indices of <italic>HC</italic><italic><sub>5</sub></italic><italic>C</italic><italic><sub>7</sub></italic><italic>[p,q]</italic> nanotubes similar to the previous section. <italic>HC</italic><italic><sub>5</sub></italic><italic>C</italic><italic><sub>7</sub></italic><italic>[p,q]</italic> nanotubes consists of heptagon and pentagon nets as seen below:</p>
<p>We denote the number of heptagons in the first row by p. In this nanotube the four first rows of vertices and edges are repeated alternatively; we denote the number of this repetition by q. In each period there are <italic>16p</italic> vertices and <italic>2p</italic> vertices are joined to the end of the graph, and hence the number of vertices in this nanotube is equal to <italic>16pq + 2p</italic>.</p>
<p>The following program is the same as the last program. In this program, value of x is the number of vertex <italic>i</italic> in a row.</p>
<p>p:=6;q:=7;# (for example)</p>
<p>n:=16*p*q+2*p;</p>
<p>N:=[];</p>
<p>for i in [1..5*p] do</p>
<p> if i mod 5=1 then N[i]:=[i-1,i+1,(3/5)*(i-1)+1+5*p];</p>
<p>  elif i mod 5 in [0,2] then N[i]:=[i-1,i+1];</p>
<p>   elif i mod 5=3 then N[i]:=[i-1,i+1,(3/5)*(i-3)+2+5*p];</p>
<p>    elif i mod 5=4 then N[i]:=[i-1,i+1,(3/5)*(i-4)+3+5*p];fi;</p>
<p> N[1]:=[2,5*p,5*p+1];</p>
<p> N[5*p]:=[1,5*p-1];</p>
<p>od;</p>
<p>K:=[5*p+1..16*p*q];</p>
<p>K1:=Filtered(K,i-&gt;i mod (16*p) in [1..5*p]);</p>
<p>for i in K1 do</p>
<p> x:=(i) mod (16*p);</p>
<p> if x mod 5=1 then N[i]:=[i-1,i+1,(3/5)*(x-1)+1+i-x+5*p];</p>
<p>  elif x mod 5=2 then N[i]:=[i-1,i+1,(3/5)*(x-2)+1+i-x-3*p];</p>
<p>   elif x mod 5=3 then N[i]:=[i-1,i+1,(3/5)*(x-3)+2+i-x+5*p];</p>
<p>    elif x mod 5=4 then N[i]:=[i-1,i+1,(3/5)*(x-4)+3+i-x+5*p];</p>
<p>     elif x mod 5=0 then N[i]:=[i-1,i+1,(3/5)*x+i-x-3*p];fi;</p>
<p> if x=1 then N[i]:=[i+1,i-1+5*p,i+(5*p)];fi;</p>
<p> if x=5*p then N[i]:=[i-1,i-5*p,i+1-5*p];fi;</p>
<p>od;</p>
<p>K2:=Filtered(K,i-&gt;i mod (16*p) in[5*p+1..8*p]);</p>
<p>for i in K2 do</p>
<p> x:=(i- 5*p) mod (16*p);</p>
<p> if x mod 3 =1 then N[i]:=[i-1,i+1,(5/3)*(x-1)+1+i-x- 5*p];</p>
<p>  elif x mod 3 =2 then N[i]:=[i-1,(5/3)*(x-2)+3+i-x- 5*p,(5/3)*(x-2)+3+i-x+3*p];</p>
<p>   elif x mod 3 =0 then N[i]:=[i+1,(5/3)*x-1+i-x- 5*p,(5/3)*x +i-x+3*p];fi;</p>
<p>  if x=3*p then N[i]:=[i-3*p+1,(5/3)*x-1+i-x- 5*p,(5/3)*x +i-x+3*p];fi;</p>
<p>  if x=1 then N[i]:=[i-5*p,i+1,i-1+3*p];fi;</p>
<p>od;</p>
<p>K3:=Filtered(K,i-&gt;i mod (16*p) in [8*p+1..13*p]);</p>
<p>for i in K3 do</p>
<p> x:=(i- 8*p) mod (16*p);</p>
<p> if x mod 5=1 then N[i]:=[i-1,i+1,(3/5)*(x-1) +i-x+5*p];</p>
<p>  elif x mod 5=2 then N[i]:=[i-1,i+1,(3/5)*(x-2)+1+i-x+5*p];</p>
<p>   elif x mod 5=3 then N[i]:=[i-1,i+1,(3/5)*(x-3)+2+i-x-3*p];</p>
<p>    elif x mod 5=4 then N[i]:=[i-1,i+1,(3/5)*(x-4)+2+i-x+5*p];</p>
<p>     elif x mod 5=0 then N[i]:=[i-1,i+1,(3/5)*x +i-x-3*p];fi;</p>
<p> if x=1 then N[i]:=[i+1,i-1+5*p,i-1+8*p];fi;</p>
<p> if x=5*p then N[i]:=[i-1,i-5*p,i+1-5*p];fi;</p>
<p>od;</p>
<p>K4:=Filtered(K,i-&gt;i mod (16*p) in Union([13*p+1..16*p-1],[0]));</p>
<p>for i in K4 do</p>
<p> x:=(i-13*p) mod (16*p);</p>
<p> if x mod 3=1 then N[i]:=[i+1,(5/3)*(x-1)+2+i-x-5*p,(5/3)*(x-1)+2+i-x+3*p];</p>
<p>  elif x mod 3=2 then N[i]:=[i-1,i+1,(5/3)*(x-2)+4+i-x-5*p];</p>
<p>   elif x mod 3=0 then N[i]:=[i-1,(5/3)*x+1+i-x-5*p,(5/3)*x+i-x+3*p];fi;</p>
<p> if x=3*p then N[i]:=[i-1,i+1-8*p,(5/3)*x+i-x+3*p]; fi;</p>
<p>od;</p>
<p>K5:=[16*p*q+1..n];</p>
<p>for i in K5 do</p>
<p> x:=i mod(16*p);</p>
<p> if x mod 2=0 then y:=(3/2)*x+i-x-3*p;</p>
<p>  else y:=(3/2)*(x-1)+1+i-x-3*p;fi;</p>
<p> N[i]:=[y];</p>
<p> N[y][3]:=i;</p>
<p>od;</p>
<p>D:=[];</p>
<p>for i in [1..n] do</p>
<p>   D[i]:=[];</p>
<p>   u:=[i];</p>
<p>   D[i][1]:=N[i];</p>
<p>   u:=Union(u,D[i][1]);</p>
<p>   s:=1;</p>
<p>   t:=1;</p>
<p>   while s&lt;&gt;0 do</p>
<p>    D[i][t+1]:=[];</p>
<p>    for j in D[i][t] do</p>
<p>     for m in Difference(N[j],u) do</p>
<p>      AddSet(D[i][t+1],m);</p>
<p>     od;</p>
<p>    od;</p>
<p>   u:=Union(u,D[i][t+1]);</p>
<p>    if D[i][t+1]=[] then</p>
<p>     s:=0;</p>
<p>   fi;</p>
<p>   t:=t+1;</p>
<p>   od;</p>
<p>od;</p>
<p>T:=[];</p>
<p>sz:=0;</p>
<p>pi:=0;</p>
<p>for i in [1..n-1] do</p>
<p>N1:=[];</p>
<p> for j in Difference(N[i],T) do</p>
<p>N2:=[];</p>
<p>  N1[j]:=Union(Difference(N[i],Union([j],N[j])),[i]);</p>
<p>  N2[i]:=Union(Difference(N[j],Union([i],N[i])),[j]);</p>
<p>   for t in [2..Size(D[i])-1] do</p>
<p>    for x in Difference(D[i][t],Union(D[j][t],[j])) do</p>
<p>     if not x in D[j][t-1] then</p>
<p>      AddSet(N1[j],x);</p>
<p>     elif x in D[j][t-1] then</p>
<p>      AddSet(N2[i],x);</p>
<p>    fi;</p>
<p>   od;</p>
<p>  od;</p>
<p> sz:=sz+Size(N1[j])*Size(N2[i]);</p>
<p> pi:=pi+Size(N1[j])+Size(N2[i]);</p>
<p> od;</p>
<p> Add(T,i);</p>
<p>od;</p>
<p>sz;# (The value of sz is equal to Szeged index of the graph)</p>
<p>pi;# (The value of pi is equal to PI index of the graph)</p></sec>
<sec sec-type="conclusions">
<title>Conclusions</title>
<p>It takes a long time to compute the Szeged and PI indices of a graph theoretically, especially when the graph has many vertices. According to the algorithm presented in this paper and using the GAP program, we can write a program to compute these indices quickly. This method has been used here for the first time. We teste the algorithm to calculate the Szeged and PI indices of denderimers <italic>T</italic><italic><sub>k,d</sub></italic> that were computed in [<xref ref-type="bibr" rid="b26-ijms-09-00131">26</xref>,<xref ref-type="bibr" rid="b27-ijms-09-00131">27</xref>]. In addition we compute these indices for <italic>HC</italic><sub>5</sub><italic>C</italic><sub>7</sub> [ <italic>p</italic>,<italic>q</italic>] and <italic>VC</italic><sub>5</sub><italic>C</italic><sub>7</sub> [ <italic>p</italic>,<italic>q</italic>] nanotubes.</p></sec></body>
<back>
<ack>
<title>Acknowledgments</title>
<p>This research is supported by Payame Noor University.</p></ack>
<ref-list>
<title>References and Notes</title>
<ref id="b1-ijms-09-00131"><label>1</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wiener</surname><given-names>H</given-names></name></person-group><article-title>Structural determination of paraffin boiling points</article-title><source>J Am Chem Soc</source><year>1947</year><volume>69</volume><fpage>17</fpage><lpage>20</lpage><pub-id pub-id-type="doi">10.1021/ja01193a005</pub-id><pub-id pub-id-type="pmid">20291038</pub-id></citation></ref>
<ref id="b2-ijms-09-00131"><label>2</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Khadikar</surname><given-names>PV</given-names></name><name><surname>Karmarkar</surname><given-names>S</given-names></name></person-group><article-title>On the Estimation of PI index of Polyacenes</article-title><source>Acta Chim Slov</source><year>2002</year><volume>49</volume><fpage>755</fpage><lpage>771</lpage></citation></ref>
<ref id="b3-ijms-09-00131"><label>3</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Nikoli</surname><given-names>S</given-names></name><name><surname>Trinajsti</surname><given-names>N</given-names></name><name><surname>Mihali</surname><given-names>Z</given-names></name></person-group><article-title>The Wiener index: developments and applications</article-title><source>Croat Chem Acta</source><year>1995</year><volume>68</volume><fpage>105</fpage><lpage>129</lpage></citation></ref>
<ref id="b4-ijms-09-00131"><label>4</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gutman</surname><given-names>I</given-names></name><name><surname>Yeh</surname><given-names>YN</given-names></name><name><surname>Lee</surname><given-names>SL</given-names></name><name><surname>Luo</surname><given-names>YL</given-names></name></person-group><article-title>Some recent results in the theory of the Wiener number</article-title><source>Indian J Chem</source><year>1993</year><volume>32A</volume><fpage>651</fpage><lpage>661</lpage></citation></ref>
<ref id="b5-ijms-09-00131"><label>5</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gutman</surname><given-names>I</given-names></name><name><surname>Potgieter</surname><given-names>JH</given-names></name></person-group><article-title>Wiener index and intermolecular forces</article-title><source>J Serb Chem Soc</source><year>1997</year><volume>62</volume><fpage>185</fpage><lpage>192</lpage></citation></ref>
<ref id="b6-ijms-09-00131"><label>6</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Khadikar</surname><given-names>PV</given-names></name></person-group><article-title>On a novel structural descriptor</article-title><source>PL Nat Acad Sci Lett</source><year>2000</year><volume>23</volume><fpage>113</fpage><lpage>118</lpage></citation></ref>
<ref id="b7-ijms-09-00131"><label>7</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Khadikar</surname><given-names>PV</given-names></name><name><surname>Karmarkar</surname><given-names>S</given-names></name><name><surname>Agrawal</surname><given-names>VK</given-names></name></person-group><article-title>Relationships and relative correlation potential of the Wiener, Szeged and PI indices</article-title><source>Nat Acad Sci Lett</source><year>2000</year><volume>23</volume><fpage>165</fpage><lpage>170</lpage></citation></ref>
<ref id="b8-ijms-09-00131"><label>8</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Khadikar</surname><given-names>PV</given-names></name><name><surname>Karmarkar</surname><given-names>S</given-names></name><name><surname>Agrawal</surname><given-names>VK</given-names></name></person-group><article-title>A novel PI index and its applications to QSPR/QSAR studies</article-title><source>J Chem Inf Comput Sci</source><year>2001</year><volume>41</volume><fpage>934</fpage><lpage>949</lpage><pub-id pub-id-type="doi">10.1021/ci0003092</pub-id><pub-id pub-id-type="pmid">11500110</pub-id></citation></ref>
<ref id="b9-ijms-09-00131"><label>9</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Khadikar</surname><given-names>PP</given-names></name><name><surname>Deshpande</surname><given-names>NV</given-names></name><name><surname>Kale</surname><given-names>PP</given-names></name><name><surname>Dobrynin</surname><given-names>AA</given-names></name><name><surname>Gutman</surname><given-names>I</given-names></name><name><surname>Domotor</surname><given-names>G</given-names></name></person-group><article-title>The Szeged Index and an Analogy with the Wiener Index</article-title><source>J Chem Inf Comput Sci</source><year>1995</year><volume>35</volume><fpage>545</fpage><lpage>550</lpage></citation></ref>
<ref id="b10-ijms-09-00131"><label>10</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Mathur</surname><given-names>KC</given-names></name><name><surname>Singh</surname><given-names>S</given-names></name><name><surname>Mathur</surname><given-names>S</given-names></name><name><surname>Khadikar</surname><given-names>PV</given-names></name></person-group><article-title>Modeling polychlorinated biphenyls (PBCs) in environment</article-title><source>Poll Res</source><year>1999</year><volume>18</volume><fpage>405</fpage><lpage>409</lpage></citation></ref>
<ref id="b11-ijms-09-00131"><label>11</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Iranmanesh</surname><given-names>A</given-names></name><name><surname>Khormali</surname><given-names>O</given-names></name></person-group><article-title>PI index of <italic>HAC</italic><italic><sub>5</sub></italic><italic>C</italic><italic><sub>7</sub></italic> nanotube</article-title><source>J Comput Theor Nanosci</source><comment>(In press)</comment></citation></ref>
<ref id="b12-ijms-09-00131"><label>12</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Iranmanesh</surname><given-names>A</given-names></name><name><surname>Khormali</surname><given-names>O</given-names></name></person-group><article-title>Szeged index of <italic>HAC</italic><italic><sub>5</sub></italic><italic>C</italic><italic><sub>7</sub></italic> nanotubes</article-title><source>J Comput Theor Nanosci</source><comment>(In press)</comment></citation></ref>
<ref id="b13-ijms-09-00131"><label>13</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Iranmanesh</surname><given-names>A</given-names></name><name><surname>Soleimani</surname><given-names>B</given-names></name></person-group><article-title>PI Index of <italic>TUC</italic><italic><sub>4</sub></italic><italic>C</italic><italic><sub>8</sub></italic><italic>(R)</italic> Nanotubes</article-title><source>MATCH Commun Math Comput Chem</source><year>2007</year><volume>57</volume><fpage>251</fpage><lpage>262</lpage></citation></ref>
<ref id="b14-ijms-09-00131"><label>14</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Iranmanesh</surname><given-names>A</given-names></name><name><surname>Soleimani</surname><given-names>B</given-names></name><name><surname>Ahmadi</surname><given-names>A</given-names></name></person-group><article-title>Szeged Index of <italic>TUC</italic><italic><sub>4</sub></italic><italic>C</italic><italic><sub>8</sub></italic><italic>(R)</italic> Nanotube</article-title><source>J Comput Theor Nanosci</source><year>2004</year><volume>4</volume><fpage>147</fpage><lpage>151</lpage></citation></ref>
<ref id="b15-ijms-09-00131"><label>15</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ashrafi</surname><given-names>AR</given-names></name><name><surname>Loghman</surname><given-names>A</given-names></name></person-group><article-title>PI Index of Zig-Zag Polyhex Nanotubes</article-title><source>MATCH Commun Math Comput Chem</source><year>2006</year><volume>55</volume><fpage>447</fpage><lpage>452</lpage></citation></ref>
<ref id="b16-ijms-09-00131"><label>16</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ashrafi</surname><given-names>AR</given-names></name><name><surname>Loghman</surname><given-names>A</given-names></name></person-group><article-title>Padmakar-Ivan Index of <italic>TUC<sub>4</sub>C<sub>8</sub>(S)</italic> Nanotubes</article-title><source>J Comput Theor Nanosci</source><year>2006</year><volume>3</volume><fpage>378</fpage><lpage>381</lpage></citation></ref>
<ref id="b17-ijms-09-00131"><label>17</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ashrafi</surname><given-names>AR</given-names></name><name><surname>Rezaei</surname><given-names>F</given-names></name></person-group><article-title>PI Index of Polyhex Nanotori</article-title><source>MATCH Commun Math Comput Chem</source><year>2006</year><volume>57</volume><fpage>243</fpage><lpage>250</lpage></citation></ref>
<ref id="b18-ijms-09-00131"><label>18</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ashrafi</surname><given-names>AR</given-names></name><name><surname>Loghman</surname><given-names>A</given-names></name></person-group><article-title>PI Index of Armchair Polyhex Nanotubes</article-title><source>Ars Combin</source><year>2006</year><volume>80</volume><fpage>193</fpage><lpage>196</lpage></citation></ref>
<ref id="b19-ijms-09-00131"><label>19</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Yousefi</surname><given-names>H</given-names></name><name><surname>Bahrami</surname><given-names>A</given-names></name><name><surname>Yazdani</surname><given-names>J</given-names></name><name><surname>Ashrafi</surname><given-names>AR</given-names></name></person-group><article-title>PI Index of V-Phenylenic Nanotubes and Nanotori</article-title><source>J Comput Theor Nanosci</source><year>2007</year><volume>3</volume><fpage>604</fpage><lpage>605</lpage></citation></ref>
<ref id="b20-ijms-09-00131"><label>20</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ashrafi</surname><given-names>AR</given-names></name><name><surname>Saati</surname><given-names>H</given-names></name></person-group><article-title>PI and Szeged Indices of One Pentagonal Carbon Nanocones</article-title><source>J Comput Theor Nanosci</source><year>2007</year><volume>4</volume><fpage>761</fpage><lpage>763</lpage></citation></ref>
<ref id="b21-ijms-09-00131"><label>21</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Heydari</surname><given-names>A</given-names></name><name><surname>Taeri</surname><given-names>B</given-names></name></person-group><article-title>Szeged index of TUC4C8(R) nanotubes</article-title><source>MATCH Commun Math Comput Chem</source><year>2007</year><volume>57</volume><fpage>463</fpage><lpage>477</lpage></citation></ref>
<ref id="b22-ijms-09-00131"><label>22</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Eliasi</surname><given-names>M</given-names></name><name><surname>Taeri</surname><given-names>B</given-names></name></person-group><article-title>Szeged and Balaban indices of zigzag polyhex nanotubes</article-title><source>MATCH Commun Math Comput Chem</source><year>2006</year><volume>56</volume><fpage>383</fpage><lpage>402</lpage></citation></ref>
<ref id="b23-ijms-09-00131"><label>23</label><citation citation-type="book"><person-group person-group-type="author"><name><surname>Schonert</surname><given-names>M</given-names></name><etal/></person-group><source>GAP, Groups, Algorithms and Programming</source><publisher-name>Lehrstuhl De fur Mathematik, RWTH</publisher-name><publisher-loc>Achen</publisher-loc><year>1992</year></citation></ref>
<ref id="b24-ijms-09-00131"><label>24</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Dabirian</surname><given-names>M</given-names></name><name><surname>Iranmanesh</surname><given-names>A</given-names></name></person-group><article-title>The Full Non-Rigid Group Theory for Trimethylamine-BH3 Complex</article-title><source>MATCH Commun Math Comput Chem</source><year>2005</year><volume>54</volume><fpage>75</fpage><lpage>88</lpage></citation></ref>
<ref id="b25-ijms-09-00131"><label>25</label><citation citation-type="book"><person-group person-group-type="author"><name><surname>Trinajstic</surname><given-names>N</given-names></name></person-group><source>Chemical Group Theory</source><publisher-name>CRC Press</publisher-name><publisher-loc>Boca Roton, FL</publisher-loc><year>1992</year></citation></ref>
<ref id="b26-ijms-09-00131"><label>26</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Entringer</surname><given-names>RC</given-names></name><name><surname>Meir</surname><given-names>AJ</given-names></name><name><surname>Moon</surname><given-names>W</given-names></name><name><surname>Székely</surname><given-names>LA</given-names></name></person-group><article-title>The Wiener index of trees from certain families</article-title><source>Australas J Combin</source><year>1994</year><volume>10</volume><fpage>211</fpage><lpage>224</lpage></citation></ref>
<ref id="b27-ijms-09-00131"><label>27</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gutman</surname><given-names>I</given-names></name><name><surname>Yeh</surname><given-names>YN</given-names></name><name><surname>Lee</surname><given-names>SL</given-names></name><name><surname>Chen</surname><given-names>JC</given-names></name></person-group><article-title>Wiener numbers of dendrimers</article-title><source>MATCH Commun Math Comput Chem</source><year>1994</year><volume>30</volume><fpage>103</fpage><lpage>115</lpage></citation></ref>
<ref id="b28-ijms-09-00131"><label>28</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gutman</surname><given-names>I</given-names></name></person-group><article-title>A formula for the Wiener number of trees and its extension to graphs containing cycles, Graph Theory Notes of NewYork</article-title><year>1994</year><volume>27</volume><fpage>9</fpage><lpage>15</lpage></citation></ref>
<ref id="b29-ijms-09-00131"><label>29</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Karmarkar</surname><given-names>S</given-names></name><name><surname>Karmarkar</surname><given-names>S</given-names></name><name><surname>Joshi</surname><given-names>S</given-names></name><name><surname>Das</surname><given-names>A</given-names></name><name><surname>Khadikar</surname><given-names>PV</given-names></name></person-group><article-title>Novel application of Wiener vis-à-vis Szeged indices in predicting polychlorinated biphenyls in the environment</article-title><source>J Serb Chem Soc</source><year>1997</year><volume>62</volume><fpage>227</fpage><lpage>234</lpage></citation></ref></ref-list>
<sec sec-type="display-objects">
<title>Figures</title>
<fig id="f1-ijms-09-00131" position="float">
<label>Figure 1.</label>
<caption>
<p>Molecular graphs of dendrimers <italic>T</italic> <italic><sub>k,d</sub></italic></p></caption>
<graphic xlink:href="ijms-09-00131f1.png"/></fig>
<fig id="f2-ijms-09-00131" position="float">
<label>Figure 2.</label>
<caption>
<p><italic>VC</italic><italic><sub>5</sub></italic><italic>C</italic><italic><sub>7</sub></italic> <italic>[<xref ref-type="bibr" rid="b4-ijms-09-00131">4</xref>, <xref ref-type="bibr" rid="b2-ijms-09-00131">2</xref>]</italic> nanotube.</p></caption>
<graphic xlink:href="ijms-09-00131f2.png"/></fig>
<fig id="f3-ijms-09-00131" position="float">
<label>Figure 3.</label>
<caption>
<p>Rows of m-th period.</p></caption>
<graphic xlink:href="ijms-09-00131f3.png"/></fig>
<fig id="f4-ijms-09-00131" position="float">
<label>Figure 4.</label>
<caption>
<p>HC<sub>5</sub>C<sub>7</sub> [<xref ref-type="bibr" rid="b4-ijms-09-00131">4</xref>,<xref ref-type="bibr" rid="b2-ijms-09-00131">2</xref>] nanotube.</p></caption>
<graphic xlink:href="ijms-09-00131f4.png"/></fig></sec></back></article>
