On Unimodality of Independence Polynomials of Trees
OOn Unimodality of Independence Polynomials ofTrees
Ron YosefDepartment of Computer ScienceHIT - Holon Institute of TechnologyHolon, Golomb 52, [email protected] MizrachiDepartment of Computer ScienceHIT - Holon Institute of TechnologyHolon, Golomb 52, [email protected] KadrawiDepartment of Computer ScienceAriel UniversityAriel 4070000, [email protected] 30, 2020
Abstract
An independent set in a graph is a set of pairwise non-adjacent vertices.The independence number α ( G ) is the size of a maximum independent setin the graph G . The independence polynomial of a graph is the gener-ating function for the sequence of numbers of independent sets of eachsize. In other words, the k -th coefficient of the independence polynomialequals the number of independent sets comprised of k vertices. For in-stance, the degree of the independence polynomial of the graph G is equalto α ( G ). In 1987, Alavi, Malde, Schwenk, and Erd¨os conjectured thatthe independence polynomial of a tree is unimodal. In what follows, weprovide support to this assertion considering trees with up to 20 vertices.Moreover, we show that the corresponding independence polynomials arelog-concave and, consequently, unimodal. The algorithm computing theindependence polynomial of a given tree makes use of a database of non-isomorphic unlabeled trees to prevent repeated computations. Keywords— independent set, independence polynomial, tree, log-concave se-quence, unimodal sequence. 1 a r X i v : . [ c s . D M ] F e b n Unimodality of Independence Polynomials of Trees The question of whether the independence polynomial of trees is unimodal isan open question. Although this is a question that has yet to be answered, ithas long been conjectured that independence polynomials of trees are unimodal[15][11].When discussing the independence polynomial of graphs, Alavi et al. [15]generally showed that the independence sequence of a graph G could be notunimodal. For example, the graph K + 4 K has an independence sequence of { , , , , } , hence, its independence polynomial of 1 + 33 x + 24 x + 32 x +16 x is not unimodal.Our proof is mainly based on three algorithms. First, an algorithm thatbuilds a unique identifier for a given tree. Second, an algorithm that computesthe independence polynomial of a given tree. Third, the main algorithm, thatmanages the iteration and insertion of the trees.We created a database that contains all of the unlabeled and non-isomorphictrees with up to 20 vertices. We saved the following details about each treein our database: a sorted array of degrees, number of vertices, independencepolynomial, a unique identifier (the primary key of database) and a Booleanflag representing whether the independence polynomial is unimodal. We usedthese details to prove our claim and to analyze the research results.According to Cayley’s formula [3], the amount of labeled trees with n verticesis n n − . Therefore, the number of labeled trees with up to 20 vertices equalsto (cid:80) nk =1 k k − . However, in our case, as will be mentioned later in the article,we would like to examine only non-isomorphic unlabeled trees; hence, Cayley’sformula is not useful for our objectives. The number of all the non-isomorphicunlabeled trees with up to 20 vertices is 1 , ,
025 [13]. After inserting all of thenon-isomorphic unlabeled trees with up to 20 vertices, we showed that all treeswith up to 20 vertices have a unimodal independence polynomial by running asimple SQL query. The query counted the number of trees whose unimodal flagis False. The count returned the result 0, meaning that all of the database treeshave a unimodal independence polynomial. Also, we ran an SQL query thatvalidated whether all the trees in our database have a log-concave independencepolynomial.
Logarithmically concave and unimodal sequences take place in many areas ofmathematics, such as algebra and combinatorics (see [1] and [4]). As a well-known example, the sequence of binomial coefficients is unimodal. As beensaid at the beginning of the introduction, the conjecture that the independencepolynomial of trees is unimodal was never proved.However, for other different types of graphs, it was proved that their inde-pendence polynomial is unimodal.Y. O. Hamidoune showed that the independence polynomial of every graph G = ( V, E ), where G is claw-free, is log-concave [5]. One can easily see that theindependence polynomial of a line graph, path graph, cycle graph, barbell graph,and more classes of claw-free graphs is unimodal. Moreover, Yi Wang and Bao-Xuan Zhu showed that the independence polynomial of each vertebrated graph2n Unimodality of Independence Polynomials of Treesis log-concave, and, hence, unimodal [14]. In [10][8], V. E. Levit, E. Mandrescuproved the unimodality of independence polynomials for some well-covered trees,including centipedes and well-covered spiders.Unlike the methods used to prove the above results, in this paper we providea direct proof by using the brute-force method. We split our statement into afinite number of cases (1 , ,
025 in total [13]) and checked each case.
This section provides basic definitions regarding the model explored throughoutthis paper and an introduction to the methods utilized to prove our statement. An independent set of a graph is a set of pairwise non-adjacent vertices. Theindependence number α ( G ) is the size of a maximum independent set in thegraph G = ( V, E ), where G is a finite, connected, undirected, loop-less graph,with vertex set V and edges set E . Following Gutman and Harary (1983) [7],the independence polynomial of G is defined to be: I ( G ; x ) = α ( G ) (cid:88) n =0 s n x n = s + s x + s x + ... + s α ( G ) x α ( G ) (1)where s k denotes the number of independent sets of cardinality k in graph G,for k ∈ [0 , α ( G )] ∩ N . Note that s = 1 [10]. Readers can refer to a survey on independence polynomials in [11]. A finite sequence s kα ( G ) k =0 ⊆ N is said to be: • unimodal ⇐⇒ ∃ n ∈ { , , ...α ( G ) } such that: s ≤ s ≤ s ≤ ... ≤ s n ≥ s n +1 ≥ s n +2 ≥ ... ≥ s α ( G ) • log-concave ⇐⇒ ∀ n ∈ { , ...α ( G ) − } ( s n ) ≥ s n − s n +1 If G = ( V, E ) is a tree and | V | ⊆ { , , ... } , the independence polynomialsequence of coefficients ( s k ) α ( G ) k =0 is a log-concave (therefore, an unimodal) se-quence (see, for instance, [11]).Readers can refer to [9] for reviewing log-concave independence polynomial con-cerning some graph products.Throughout the entire paper, T = ( V, E ) is an undirected, finite tree, withindexed vertex set V = V ( T ) and edges set E = E ( T ).The operation that will be applied in order to delete any arbitrary set of ver-tices V (cid:48) ⊆ V and their edges, is denoted by T − V (cid:48) = T (cid:48) = ( V (cid:48)(cid:48) , E (cid:48) ), when V (cid:48)(cid:48) = { v ∈ V : v / ∈ V (cid:48) } and E (cid:48) = { e = ( u, v ) ∈ E : v, u / ∈ V (cid:48) } .In order to prove the main result of the paper, we use the two following prop-erties of the independence polynomials : I ( G ; x ) = I ( G − v ; x ) + x · I ( G − N [ v ]; x ) : v ∈ V ( G ) ∀ v ∈ V ( G ) , N [ v ] = { u ∈ V ( G ) : ( u, v ) ∈ E ( G ) } ∪ { v } (2)3n Unimodality of Independence Polynomials of Treeswhere N [ v ] is the neighborhood of the vertex v including v itself, and G − v = ( V ( G ) \ { v } , E ( G ) \ e ( v )) : e ( v ) = { ( u, v ) ∈ E ( G ) } G − N [ v ] = ( V ( G ) \ N [ v ] , E ( G ) \ e ( N [ v ])) : e ( N [ v ]) = { ( u, v ) ∈ E ( G ) } ∪ { ( u, k ) ∈ E ( G − v ) ∩ ( u, v ) ∈ E ( G ) } I ( G ∪ G ; x ) = I ( G ; x ) · I ( G ; x ) [11][6] (3)An isomorphism of graphs G = ( V , E ) ∩ G = ( V , E ) is a bijection φ : V → V such that ∀ u, v ∈ V , ( u, v ) ∈ E ⇐⇒ ( φ ( u ) , φ ( v )) ∈ E In order to store all of the non-isomorphic unlabeled trees in our database with-out any duplication, we constructed a unique identifier for each unlabeled tree.The unique identifier enables us to fetch an unlabeled tree from the databasewith much ease.The unique identifier of each unlabeled tree is a unique primary key in ourdatabase. The algorithm based on the tree canonization explained and provedin [2]. Specifically, one can say that our algorithm implements methods men-tioned in [2].Table 1: Variables used in Algorithm 1 (Unique-ID-Constructor).Variable Definitiondist A method that returns the distance betweentwo input vertices that is defined by the num-ber of edges in the shortest path connectingthem.D An array consisting of the distances betweeneach of the tree’s vertices and the tree’s root.h The maximum value of D.IdArr An array consisting of the unique ID of eachsub-tree of the given tree and the unique IDof the given tree itself.newID A temporary array, consists of the IDs of thegiven vertex’s neighbors, that are also fartheraway from the root, than the given vertex. (cid:15)
An empty word.concatenateAll A list method that concatenates each of theinput list’s strings to each other ordered fromleft to right.sortBinary A list method that sorts its elements by theirbinary values in descending order.4n Unimodality of Independence Polynomials of Trees
Algorithm 1:
Constructed a unique identifier for unlabeled tree
Input:
Tree T = ( V, E, r ) Output: T (cid:48) s unique identifier D ← { dist ( r, u ) , ∀ u ∈ V } ; h ← max { d ∈ D } ; IdArr ← { ( (cid:15), (cid:15), ...(cid:15) ) : | IdArr | = | V |} ; for i ← h to do foreach v ∈ V and dist ( v, r ) = i do if i = h then IdArr [ v.index ] ← (cid:48) (cid:48) ; else newID = {} foreach u ∈ N ( v ) do if dist ( u, r ) = i + 1 then newID ← newID ∪ { IdArr [ u.index ] } newID ← newID.sortBinary (); IdArr [ v.index ] ← concatenateAll ( newID ); IdArr [ v.index ] ← concatenateAll ( { (cid:48) (cid:48) , IdArr [ v.index ] , (cid:48) (cid:48) } ); return IdArr [ r.index ];The algorithm constructs an array of all the distances from the root to eachvertex, and stores the maximum distance in h (line 1-2). It then initializesIdArr with empty words, an array with the length of | V | (line 3). Afterward, ititerates from the maximum distance (from the tree’s root to another vertex) h to0 (line 4). For each vertex v that its distance equals to i , the algorithm is doingone of two things, depending on i ’s value (line 6). If i equals to h , the algorithminserts (cid:48) (cid:48) into IdArr at the vertex’s index (representing a leaf vertex) (lines6-7). Otherwise, the algorithm iterates over each of v ’s neighbors, denoted by u , and checks whether the distance between u and r equals to i + 1 (line 10-11).If so, the algorithm adds the the binary value of u ’s ID to newID array (line12). At the end of this process, newID array is being sorted descendingly bybinary values (line 13). Now, the ID of v is the product of concatenation, fromleft to right, of each element in newID as a string ,and then the algorithm adds (cid:48) (cid:48) to the beginning of v ’s ID and 0 to its end (line 15-16). Once the process isdone with i = 0, the algorithm returns the root’s unique identifier (line 16).Figure 1 constitutes an example for the algorithm, with | V | = 4.Figure 1: Tree with 4 vertices5n Unimodality of Independence Polynomials of TreesWhile vertex ’2’ is obvious to be the tree’s root, and the longest distancefrom the root is 1 to any vertex in the tree, we want to compute the tree’sunique ID. Every single vertex without considering the root itself is the root’sneighbor. Thus, at the end of the very first iteration of the main loop in thealgorithm, IdArr will become [’10’, ’10’, (cid:15) , ’10’]. At the second iteration, IdArrbecomes [’10’, ’10’, ’11010100’, ’10’], as a result of chaining ’10’ to itself threetimes, concatenating the output with the existing (cid:15) at the root’s index in IdArr,then finalizing the process with adding ’1’ and ’0’ to both ends respectively.Meaning, ’1101010’ is the tree’s unique ID. In this subsection, we will use predefined functions designed to deal with databasefetching. We can fetch independence polynomials of trees that have already beencomputed. Furthermore, as already been said, we can check for every input ifan isomorphic tree to it exists in the database.Table 2: Variables used in Tree-Independence-Polynomial-Compute.Variable DefinitionDB The database which consists of the com-puted trees’ independence polynomials andtheir unique IDs.fetchPolynomial A database method that returns the matchingindependence polynomial for the input uniqueID (returns NULL if the unique ID doesn’texist in the database).exists Holds the output of the fetchPolynomialmethod. T (cid:48) An array that consists of every tree componentin the output forest from T − rT (cid:48)(cid:48) An array that consists of every tree componentin the output forest from T − N [ r ] P The product of all trees’, in T (cid:48) , independencepolynomials. P The product of all trees’, in T (cid:48)(cid:48) , independencepolynomials.6n Unimodality of Independence Polynomials of Trees Algorithm 2:
Tree-Independence-Polynomial-Compute
Input: T = ( V, E, r, uid ) Output: I ( T ; x ), the tree’s independence polynomial. exists ← DB.f etchP olynomial ( uid ); if exists (cid:54) = N U LL then return exists ; else if | V | = 0 then return 1; if | V | = 1 then return 1 + x ; T (cid:48) ← T − r : T (cid:48) = { T (cid:48) ∪ T (cid:48) ∪ ... ∪ T (cid:48) n : ∀ ≤ i ≤ n, T (cid:48) i = T ree } ; T (cid:48)(cid:48) ← T − N [ r ] : T (cid:48)(cid:48) = { T (cid:48)(cid:48) ∪ T (cid:48)(cid:48) ∪ ... ∪ T (cid:48)(cid:48) m : ∀ ≤ i ≤ m, T (cid:48)(cid:48) i = T ree } ; P ← P ← for ≤ i ≤ n do P = P · T reeIndependenceP olynomialCompute ( T (cid:48) i ); for ≤ i ≤ m do P = P · T reeIndependenceP olynomialCompute ( T (cid:48)(cid:48) i ); return I ( T ; x ) = P + x · P ;The algorithm receives a tree. If the tree exists in the database, then thealgorithm does not compute its independence polynomial. Instead, it fetches thepolynomial from the database and returns the output (lines 1-3). Otherwise,the algorithm computes the tree’s independence polynomial (lines 4-16). Wehave decided not to keep the two trees, which have one vertex or no vertices atall, so the algorithm returns the independence polynomial of those kinds of treeswithout any real-time computations. If the size of V equals 0, the algorithmreturn 1, and if the size of V equals 1, the algorithm returns 1 + x (lines 5-8). In each of other cases, the algorithm removes r and N [ r ], separately, from T = ( V, E ), and constructs two arrays, consisting of the tree components ofthe resulted forests T − r and T − N [ r ], T (cid:48) and T (cid:48)(cid:48) , respectively (lines 9-10).At this point, the algorithm calls itself recursively with each of the trees in T (cid:48) and computing the output product, then does the same for the trees in T (cid:48)(cid:48) . Theproducts being stored in P and P respectively (lines 13-16). The algorithmends with returning the independence polynomial of T = ( V, E ) as P + x · P (line 17).Figure 2 constitutes an example for the algorithm, with | V | = 7.7n Unimodality of Independence Polynomials of TreesFigure 2: T = ( V, E )The algorithm receives Figure 2, and then it constructs T (cid:48) as an array of two P graphs (Figure 3), and construct T (cid:48)(cid:48) as an array of two P graphs (Figure3). Figure 3: T − r Figure 4: T − N [ r ]it then computes the product of all the trees in T (cid:48) and T (cid:48)(cid:48) as P and P . Thiscomputation happens instantly has P graph and P graph already exists in thedatabase. Afterwords, the algorithm returns P + x · P as the independencepolynomial of Figure 2. We built an algorithm to insert all the non-isomorphic unlabeled trees with upto 20 vertices. The algorithm iterates from 2 to k ≤
20, where k stands forthe number of vertices in a tree. The first unlabeled tree been inserted into thedatabase was T ( V, E ) : | V | = 1, as its independence polynomial I ( T ; x ) = 1 + x ,which is unimodal, and its unique ID is (cid:48) (cid:48) . This tree is inserted manually intothe database since we are using dynamic programming in the algorithm.8n Unimodality of Independence Polynomials of TreesIn each iteration, it fetches all of the non-isomorphic unlabeled trees with k − k − k vertices. Each generated tree results from adding a new leafnode to a different node of the tree.Then, the Unique-ID-Constructor algorithm (4.1) is being used for each gen-erated tree to enable us to check out the existence of any isomorphic tree, tothe iterated one, in the database. In case there is no isomorphic tree in thedatabase, the Tree-Independence-Polynomial-Compute algorithm (4.2) is beingused to compute the iterated tree’s independence polynomial I ( T ; x ).At this point, I ( T ; x ) is being checked for unimodality and whether it is log-concave polynomial. We store all of these in the database and continue to thenext tree. To efficiently insert all the non-isomorphic unlabeled trees with upto 20 vertices into the database, we used a mechanism to split the iterationson the trees between several instances of the following algorithm. We ran thealgorithm non-stop on 20 Docker containers on a remote server for a week.Table 3: Variables used in Algorithm 3 (Main-Algorithm).Variable DefinitionDB The database which consists of the com-puted trees’ independence polynomials andtheir unique ID’s.fetchAllTrees A database method that returns an arrayof the matching trees (re-constructed withunique IDs) for the input number of vertices.isAllTreesInserted A database method that compares the number[13] of inserted trees with the received vertexnumber to the expected number of trees withthat vertex number.Trees Holds the output of the fetchAllTrees method. T A tree from the Trees array.AllTPossible An array consists of trees, which are made byconnecting a new vertex to each of T ’s ver-tices, one at a time. T (cid:48) A tree from AllTPossible array.isTreeExists A database method that checks if a tree existsin the database.P Holds the output of Tree-Independence-Polynomial-Compute (algorithm 2), which isthe input tree’s independence polynomial.isUni A polynomial method that returns
T rue if theinput polynomial is unimodal, and
F alse oth-erwise.insert A database method that inserts to thedatabase the new given data.9n Unimodality of Independence Polynomials of Trees
Algorithm 3:
Insert all the non-isomorphic unlabeled trees with upto 20 vertices
Input:
Array L , which consists of the number of non-isomorphicunlabeled trees with up to 20 vertexes. Output:
None for ≤ i ≤ do l ← L [ i ]; if | DB.f etchAllT rees ( | V | = i ) | = l then continue; else T rees ← DB.f etchAllT rees ( | V | = i − foreach T ∈ T rees do AllT P ossible ← { T ∪ { u } k , ∀ ≤ k ≤ i − (cid:107) T ∪ { u } k meansconnecting a vertex to the Tree via the vertex indexed withinteger k } ; foreach T (cid:48) ∈ AllT P ossible do if DB.isT reeExists ( T (cid:48) .uid ) then continue; else P ← Tree-Independence-Polynomial-Compute( T (cid:48) ); uni ← isU ni ( P ); DB.insert ( T (cid:48) .uid, T (cid:48) .degreeArr, | V ( T (cid:48) ) | , P, uni ); if DB.isAllT reesInserted ( | V | = i, l ) then break;The algorithm receives an array consisting of the number of non-isomorphicunlabeled trees with 2 ≤ | V | ≤
20. The algorithm iterates from i = 2 to 20.If all possible non-isomorphic unlabeled trees with i vertices are already in thedatabase, the algorithm continues (lines 3-4). Otherwise, the algorithm fetchesall of the trees with i − i vertices by connecting a new vertex toeach existing vertex in the given tree. For each new tree, the algorithm com-putes its independence polynomial if it does not already exist in the database.After iterating over each new tree, the algorithm checks whether all of the pos-sible non-isomorphic unlabeled trees with i vertices are already in the databasebefore continuing to the next tree with i − | V | = 3.Figure 5: T = ( V, E ) : | V | = 310n Unimodality of Independence Polynomials of TreesIn order to insert all the non-isomorphic unlabeled trees with four vertices,the algorithm fetches all the non-isomorphic unlabeled trees with three verticesfrom the database (Figure 5). Then, it iterates on each of the non-isomorphicunlabeled trees with three vertices. On each tree, the algorithm constructs anarray of 3 trees with four vertices by adding a new node to each of the tree’sexiting nodes, one at a time (Figures 6,7,8).Figure 6: Figure 5 with a new node connected to node number 1Figure 7: Figure 6 with a new node connected to node number 2Figure 8: Figure 6 with a new node connected to node number 3The algorithm then iterates on each tree. Starting with Figure 6, the al-gorithm checks if the tree exists in the database. The tree does not exist inthe database; therefore, the algorithm computes its independence polynomialand checks if it is unimodal before inserting it with additional data into thedatabase. The same process also happens in Figure 7 and Figure 8. However,in Figure 8, the algorithm continues the iteration because the tree already existsin the database, since (Figure 7 is isomorphic to Figure 8).11n Unimodality of Independence Polynomials of Trees This algorithm’s main requirement is to have in the database it uses all of thetrees with V − V Vertices. Thus, we assume that every T (cid:48) = ( V (cid:48) , E (cid:48) , r (cid:48) , uid (cid:48) ) : | V (cid:48) | < | V | exists in the database.When the algorithm receives T = ( V, E, r, uid ), it first tries to fetch itsindependence polynomial from the database. If it exists, the algorithm returnsthe fetched polynomial. Otherwise, the algorithm computes T ’s independencepolynomial as mentioned in (2). T (cid:48) = T − r = { T ∪ T ∪ ... ∪ T n : 1 ≤ n < | V |} I ( T (cid:48) : x ) = I ( T − r : x ) I ( T (cid:48) − r : x ) = I ( T ∪ T ∪ ... ∪ T n ) I ( T (cid:48) ∪ T (cid:48) ∪ ... ∪ T n ) = I ( T ) · I ( T ) · ... ( T n ) = P ( according to (3)) ∀ T i ∈ { T ∪ T ∪ ... ∪ T n } , | V ( T i ) | < | V ( T ) | = ⇒ T i ∈ DB = ⇒ I ( T i : x ) = DB.f etchP olynomial ( T i .uid ). T (cid:48)(cid:48) = T − N [ r ] = { T ∪ T ∪ ... ∪ T n : 1 ≤ n ≤ | V | − | N [ v ] |} I ( T (cid:48)(cid:48) : x ) = I ( T − N [ r ] : x ) I ( T (cid:48)(cid:48) : x ) = I ( T ∪ T ∪ ... ∪ T n ) I ( T ∪ T ∪ ... ∪ T n ) = I ( T ) · I ( T ) · ... ( T n ) = P ( according to ∀ T i ∈ { T ∪ T ∪ ... ∪ T n } , | V T i | < | V T | = ⇒ T i ∈ DB = ⇒ I ( T i : x ) = DB.f etchP olynomial ( T i .uid )Then it returns P + x · P as I ( T : x ) as mentioned in 2; Lemma 5.1
Every tree with n + 1 vertices, where n ≥ n vertices. Proof.
Suppose a tree T i ( V i , E i ), where | V i | = n + 1 , n ≥ T j ( V j , E j ) wheres | V j | = n .Then, removing a leaf node from T i will not result a tree, T j . This contradictsthe fact that T j is a connected acyclic graph with | E j | = V j − Corollary 5.2
A collection of all the trees with n + 1 vertices can be con-structed, wheres n ≥
2, by adding a new leaf node to each existing node of atree, one at a time, for all the trees with n ≥ Lemma 5.1 ). Theorem 5.3
For every input array L = { s , s , s , s , ...s n : s i = thenumber of non isomorphic trees with i vertices } , Main-Algorithm( L ) computesthe independence polynomial of each tree T = ( V, E, uid ) : 2 ≤ | V | ≤ n andstore the results in the DB. 12n Unimodality of Independence Polynomials of Trees Proof.
For the sake of this proof, we will use strong induction.base case: n = 2 :The main loop in the algorithm will be iterated once. l = L = 1. Assuming thatthe DB is currently holding nothing but the data of T = ( V, E, uid ) : | V | = 1,that has been manually inserted. The first condition in the loop will not bematched, and as a result, the algorithm fetches the only graph existing in theDB, which is, as said, T = ( V, E, uid ) : | V | = 1. Then, the AllTPossible arrayis assigned as the one only possible ”extended” tree for a tree with one vertex,that is, the tree with two vertices, and due to the nonexistence of the tree in theDB, the algorithm computes its independence polynomial and insert its findingsto the DB. Thus, the statement is true for n = 2.Inductive step: Suppose the statement is true for n = 3 , , ..., k . If n = k + 1,then, once again, the algorithm skips the first condition that proposed to makethe algorithm continue working from the point it last stopped at; for example, incases of a connection failure with the DB. Afterward, the algorithm fetches everynon isomorphic tree T = ( V, E, uid ) : | V | = k (we suppose all of them exist in theDB) and ”extending” each of them to trees with k + 1 vertices by adding a newleaf node to each existing node of each tree (as Lemma 5.1). The independencepolynomial of each extended tree that does not exist in the database is computedbefore inserting it into the database. After going through each of the trees with k vertices, the algorithm will succeed in computing the independence polynomialof every non isomorphic tree with k + 1 vertices (Corollary 5.2) and insert therelevant information of each tree into the DB. We have implemented our algorithms with Typescript and used NodeJS serversto execute our algorithms.We have used PostgreSQL database and a Linux Ubuntu server serving as adocker server for our working environment.In order to efficiently insert all of the non-isomorphic unlabeled trees with up to20 vertices into the database, we used a mechanism to split the iterations on thetrees between several instances of the algorithm. We have split the workloadequally, ensuring that each algorithm instance will iterate on different trees fromthe database. We ran our algorithm 24/7 on 20 containers on our server for aweek. Both the database’s and the server’s specifications are listed in Table 4.Table 4: The database’s and the server’s specifications.Database ServerCPU 8 CPU Core 1 CPU CoreRAM 16GB RAM 2GB RAMDISK SPACE 240GB SSD 50GB SSD13n Unimodality of Independence Polynomials of TreesRunning 20 instances of our algorithm working parallel caused the databaseCPU to reach its limit, thus because our algorithm is frequently fetching datafrom the database to prevent calculation of trees that already exist in thedatabase. Because of that, we have used the indexing feature of PostgreSQLDB to boost our database performance twice as much.
As said above, by running a simple SQL query, we showed that all the treeswith up to 20 vertices have a unimodal independence polynomial. The querycounted the number of non-isomorphic unlabeled trees whose unimodal flag isFalse. The count returned the result 0, meaning that all of the trees with up to20 vertices have a unimodal independence polynomial. Furthermore, we ran anSQL query that validated that all trees with up to 20 vertices have a log-concaveindependence polynomial.
By applying a simple SQL query on our database, we were able to count, forevery cardinally k , the number of times it satisfies the following ∀ T ∈ DB.T rees, k = ArgM ax || S || : S = { s , s , ...s α ( T ) } and I ( T ; x ) = α ( T ) (cid:88) i =0 s i x i With up to 1 , ,
025 trees in total [13], we also found that 0 ≤ k ≤
11. Notethat we considered the lower cardinal as the maximum, in case of two or moremaximums.Table 5: The number of trees satisfies the equation above, for each cardinallyk. k Number of trees with most inde-pendent sets of cardinally k We have encountered several cases that are worth mentioning.14n Unimodality of Independence Polynomials of Trees
Two trees can have the same
Independence P olynomial if theyhave the same number of vertices.
Proof. let T = ( V , E ), T = ( V , E ) be an arbitrary trees, and I i ( T i : x ) = α ( T i ) (cid:88) n =0 S i n x n : i = 1 , S and S denote the number of independent sets of cardinality 1 intrees T and T respectively. For every graph G = ( V, E ) : | V | = n , thereare | V | independent sets of cardinality 1, which means S = | V | and S = | V | ([12]) ⇒ I ( T : x ) = I ( T : x ) ⇔ | V | = | V | . (cid:4) Also, two trees can have the same independence polynomial, and have or nothave the same sorted array of degrees.Figure 9: Two non-isomorphic unlabeled trees with the same IndependencePolynomial, and the same sorted array of degrees.In Figure 9, both trees have the independence polynomial of 1 + 9 x + 28 x +37 x + 21 x + 4 x , and a sorted array of degrees equals to { , , , , , , , , } .Figure 10: Two non-isomorphic unlabeled trees with the same IndependencePolynomial, and different sorted arrays of degrees.Figure 10, Both of the trees have an independence polynomial of 1 + 8 x +21 x + 23 x + 11 x + 2 x . The left tree posses a sorted array of degreesof { , , , , , , , } , and the right tree posses a sorted array of degrees of { , , , , , , , } .There are three independence polynomials which are most common amongthe trees with up to 20 vertices, and each of them can be found 25 times amongall the non-isomorphic unlabeled trees with 20 vertices.15n Unimodality of Independence Polynomials of Trees1 + 20 x + 171 x + 825 x + 2499 x + 5006 x + 6802 x + 6319 x +3984 x + 1662 x + 435 x + 64 x + 4 x x + 171 x + 827 x + 2521 x + 5106 x x + 6702 x +4360 X + 1900 x + 529 x + 85 x + 6 x x + 171 x + 827 + 2523 x + 5125 x + 7127 x + 6863 x +4566 x + 2061 x + 604 x + 104 x + 8 x Except for P and P , with the polynomials of 1 and 1 + x respectively, wedid not find any trees with acceding nor descending independence polynomialcoefficients sequence. We found four trees of all the non-isomorphic trees with up to 20 vertices, whoseindependence polynomials have coefficients that are Fibonacci numbers.Figure 11: Trees with Fibonacci numbers as independence sequenceThe trees in the above figure have independence Polynomials (from left toright) as follows: 1 + 8 x + 21 x + 21 x + 8 x + x x + x x x
16n Unimodality of Independence Polynomials of Trees
We found that 60 trees of all the non-isomorphic trees with up to 20 verticeshave an independence Polynomial coefficients sequence that is symmetrical.Figure 12: Several trees with symmetric independence polynomial coefficientssequenceThe independence polynomials of the trees in the above figure (from left toright) are as follows:1 + 9 x + 28 x + 40 x + 28 x + 9 x + x x + 21 x + 21 x + 8 x + x x + 10 x + 6 x + x In this paper, we showed that all of the trees consists with up to 20 vertices,have a unimodal and log-concave independence polynomial.We are considering improving our algorithm so that it will be able to rundirectly on all of the non-isomorphic unlabeled trees without any duplication.The algorithm will be programmed to generate unique IDs in a sequence thatwill enable us to efficiently iterating over all of the trees with n vertices. Sucha sequence will not include two ids representing the same unlabeled tree. References [1] E. A. Bender and E. R. Canfield. Log-concavity and related properties ofthe cycle index polynomials.
Journal of Combinatorial Theory, Series A ,74:57–70, 1996.[2] Samuel R. Buss. Alogtime algorithms for tree isomorphism, comparison,and canonization.
Kurt G¨odel Colloquium on Computational Logic andProof Theory , 5:18–33, 1997.[3] A Cayley. A theorem on trees.
The Quarterly Journal of Mathematics ,23:376–378, 1889.[4] W. M. B. Dukes. On a unimodality conjecture in matroid theory.
DiscreteMathematics and Theoretical Computer Science , 5:181–190, 2002.17n Unimodality of Independence Polynomials of Trees[5] Yahya Ould Hamidoune. On the numbers of independent k-sets in a clawfree graph.
Journal Of Combinatorical Theory, Series B , 50:241–244, 1990.[6] Cornelis Hoede and Xueliang Li. Clique polynomials and independent setpolynomials of graphs.
Discrete Mathematics , 125:219–228, 1994.[7] F. Harary I. Gutman. Generalizations of the matching polynomial.
UtilitasMathematica , 24:97–106, 1983.[8] V. E. Levit and E. Mandrescu. On well-covered trees with unimodal inde-pendence polynomials.
Congressus Numerantium , 159:193–202, 2002.[9] V. E. Levit and E. Mandrescu. Graph products with log-concave inde-pendence polynomials.
WSEAS Transactions on Mathematics , 3:487–493,2004.[10] Vadim E. Levit and Eugen Mandrescu. On unimodality of independencepolynomials of some well-covered trees.
Discrete Mathematics and Theo-retical Computer Science , 4:237–256, 2003.[11] Vadim E. Levit and Eugen Mandrescu. The independence polynomial ofa graph - a survey.
International Conference on Algebraic Informatics,Aristotle University of Thessaloniki , 1:231–252, 2005.[12] T.S. Michael and William N. Traves. Independence sequences of well-covered graphs: non-unimodality and the roller-coaster conjecture.
Graphsand Combinatorics , 19:403–411, 2003.[13] N. J. A. Sloane. Number of trees with n unlabeled nodes.
Available athttp://oeis.org/A000055 .[14] Y. Wang and B. X. Zhu. On the unimodality of independence polynomialsof some graphs.
European Journal of Combinatorics , 32:10–20, 2011.[15] P. Malde Y. Alavi, P. Erd¨os and A. Schwenk. The vertex independencesequence of a graph is not constrained.