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 n1, n 2,...,nδ where ni 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