## Abstract

In this paper we present a simple algorithm for calculating the maximal value of the second Zagreb index for trees with prescribed number of vertices of given degree. The user needs only to input values n_{1}, n _{2},...,n_{δ} where n_{i} is the number of vertices of degree i. The algorithm outputs the edge connectivity values m _{ij} as well as the maximal value of the second Zagreb index. The complexity of the algorithm is proportional to Δ^{3}, where Δ is maximal degree. Since complexity is independent of the number of vertices, for chemical trees that have Δ ≤ 4 the algorithm works in constant time no matter how large the molecule is.

Original language | English (US) |
---|---|

Pages (from-to) | 65-70 |

Number of pages | 6 |

Journal | Match |

Volume | 60 |

Issue number | 1 |

State | Published - 2008 |

## All Science Journal Classification (ASJC) codes

- General Chemistry
- Computer Science Applications
- Computational Theory and Mathematics
- Applied Mathematics