arprotree_journal

18

Click here to load reader

Upload: chandramowliswaran-narayanaswamy

Post on 23-Jan-2018

112 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: ArproTree_journal

1

Arithmetical properties of tree generation codes and algorithm to

generate all tree codes for a given number of edges

K. Balasubramaniana, S. Arun

b, N. Chandramowliswaran

c,

aDepartment of Statistics , Indian Statistical Institute, New Delhi, India.

bDepartment of Computer Science & Engineering, Sri Chandrasekharendra Saraswathi Viswa Maha

Vidyalaya, Kanchipuram, Kanchipuram-631 561, India. cDepartment of Mathematics, Sri Chandrasekharendra Saraswathi Viswa Maha Vidyalaya,

Kanchipuram-631 561, India. c E Mail: [email protected]

Abstract: Graceful Code is a way to represent graceful graph in terms of sequence of

non-negative integers. Given a graceful graph G on “q” edges, we can generate its

graceful code in the form of (a1, a2, a3, …, aq−1, aq) to represent the graph. Similarly, we

can easily draw the graph from the given graceful code.

In this paper, we present an algorithm to generate all possible tree codes on a

given number of edges. Moreover, we also present the arithmetic properties of tree

generating codes and an algorithm to check whether the code of a given graceful graph

represents a tree or not. This algorithm uses prüfer code techniques on graceful codes to

perform tree checking. The prüfer technique of removing the lowest labeled leaf easily

determines the code to be a tree or not.

Keywords: Graceful graphs, Graceful codes, α-valuable codes.

Introduction:

Definition 1: A Graceful labeling of a simple graph G with “q” edges is an injection “f ”

from the vertices of G to the set {0, 1, 2, 3, …, q} such that the induced function

g: E→{1, 2, …, q}, g(e) = | f(u) −−−− f(v) | for every edge e ={u, v}, is a bijective function

A graph, which has a graceful labeling, is called a Graceful graph.

This labeling was originally introduced in 1967 by Rosa who has also showed that the

existence of a graceful labeling of a given graph G with “q” edges is a sufficient

condition for the existence of a cyclic decomposition of a complete graph of order

“2q+1” into sub-graphs isomorphic to G. [See References]. The famous Graceful Tree

Conjecture says that all trees have a graceful labeling.

Section 1 of this paper describes definitions and notations of graceful codes.

Section 2 discusses Arithmetical Properties of Tree Generation Codes.

Section 3 describes algorithm to generate all tree codes for a given number of edges.

Page 2: ArproTree_journal

2

Section 1

Code of a Graceful Graph:

Let G be any graceful graph on “q” edges then (a1, a2, a3, …, aq− 1, aq) is called a graceful

code of G, if 0 ≤ ai ≤ q−−−− i, 1 ≤ i ≤ q. Here ai is the lower end vertex of the edge label “i”.

It is important to note that aq is always zero.

Example:

Code= (4, 3, 1, 2, 1, 0)

Figure 1 shows a graceful graph on 6 edges.

The code of this graceful graph is = (4, 3, 1, 2, 1, 0), where

a1= 4= lower end vertex of the edge label “1”.

a2= 3= lower end vertex of the edge label “2”.

a3= 1= lower end vertex of the edge label “3”.

a4= 2= lower end vertex of the edge label “4”.

a5= 1= lower end vertex of the edge label “5”.

a6= 0= lower end vertex of the edge label “6”.

For every graceful graph G we can write its corresponding graceful code. Conversely, for

every given graceful code we can draw the corresponding graceful graph as follows.

Join edges: {(a1, 1 + a1), (a2, 2 + a2), …, (aq −−−− 1, q −−−− 1 + aq −−−− 1), (aq, q + aq)}

Definition 2:

α-valuable Code:

Let G be a graceful graph on “q” edges. Then the code (a1, a2, a3,…, aq) is called

α-valuable code of G if

Here a1 is called the separator or critical value of the α-valuable code.

a1 ≥ ai ; for all i

Max {ai | 0 ≤ i ≤ q} < Min {i + ai | 0 ≤ i ≤ q}

Page 3: ArproTree_journal

3

The following Proposition gives the criteria for the graceful code to be an α-valuable

code,

Proposition

(a1, a2, a3, …, aq) represents an α-valuable code if and only if

0 ≤ (a1 – aq − i + 1 / q – i) ≤ 1

for all i, 1 ≤ i ≤ q −1

Equivalently, (a1, a2, a3, ..., aq − 1, aq) represents an α-valuable code if and only if

(a1 – aq, a1 – aq −−−−1, …, a1 – a3, a1 – a2, 0) represents a code of a graceful graph.

Notation: If X= (a1, a2, …, aq) is a given α-valuable code of a graph G, then

{a1, a2,…, aq}are lower vertices of G, and {1 + a1, 2 + a2, …,q + aq} are upper vertices of

G.

In this paper, we identify vertices as labels.

Section 2

Arithmetic properties of Tree Generation codes

THEOREM 1 Let X= (a1, a2, …, aq) be a given α-valuable tree code on “q” edges.

Let p ≤ q − a1. Then,

(σ (a1 + 1), σ (a1 + 2), …, σ (a1 + p), X) always represent a tree code on “q + p” edges for

any σ Є Sp= Symmetric group on “p” symbols.

Proof:

Let the code (σ (a1 + 1), σ (a1 + 2), …, σ (a1 + p), X) represent the graph H and

the code X represent a tree T, a subgraph of H such that the upper vertices of T in H are

{1 + a1 + p, 2 + a1+ p,…, q + p}. Consider the induced subgraph G of H on vertices

{1 + a1, 2 + a1,…, q}. This subgraph G has components G1, G2, …, Gk (Some of the

components contain only one vertex) with the following properties:

1. 1 + a1= t1 + a1∈ G1, …, ti + a1 ∈ Gi, (1≤ i ≤ k), 1≤ ti ≤ p

2. t1+ a1 < t2+ a1 < …< tk+ a1.

3. ti+ a1 is the least labeled pendant vertex in Gi,

such that any x< ti+ a1, i ≥ 2 ⇒ x∈ V(G1)∪…∪V(Gi –1)

4. Let Mi ∈ V(Gi) be the maximum label.

Now there is a unique edge ei = {Mi, Ci},

Ci ∈{1 + a1 + p, 2 + a1+ p,…, q + p}. Here it is easy to see that each Gi is a

caterpillar(removal of pendant vertices leads to a path), hence the given graph H

represent a tree.

Page 4: ArproTree_journal

4

………………

COROLLARY 1

Consider the following caterpillar,

( )11 2, ( 1) ,...,1 ,0N NN N +−α αα α . Let “p” be any positive integer ≤

1

1

N

i

i

Nα+

=

−∑

Then ( )11 2( 1), ( 2),..., ( ), , ( 1) ,...,1 ,0N NN N N p N Nσ σ σ ++ + + −α αα α always represent a

tree code on 1

1

N

i

i

pα+

=

+∑ edges for any σ Є Sp= Symmetric group on “p” symbols.

COROLLARY 2

( )(1), (2),..., ( ),0qqσ σ σ always represent a tree code on “2q” edges for

any σ Є Sp= Symmetric group on “p” symbols.

COROLLARY 3

Let Ψ be any permutation on {2q+1, 2q+2, …, 4q}.

Then (Ψ(2q+1),Ψ(2q+2), …, Ψ(4q), X) represents atree code on 6q edges.

Where X= (2q, 2q – 1, …, q + 1, q + σ(q), q – 1+ σ(q – 1), …, 2 + σ(2), 1 + σ(1),

σ(1), …, σ(q), 0q), σ Є Sq= Symmetric group on “q” symbols.

Proof: It is straight forward to verify

X= (2q, 2q – 1, …, q + 1, q + σ(q), q – 1+ σ(q – 1), …, 2 + σ(2), 1 + σ(1),

σ(1), …, σ(q), 0q) represent a α- valuable tree code on “4q” edges and then

applying Theorem 1, we have the corollary –3.

THEOREM 2 Let X= (a1, a2, …, aq) be a given α-valuable tree code on “q” edges, such

that q − a1= odd integer. Then for any m ≥ 2,

( )1 1( 1, 2,..., ) ,ma a q X+ + always represent a tree code on “m(q − a1) + q” edges.

COROLLARY 1

For any odd positive integer q and m ≥ 2,

( )1( 1, 2,..., 2 ) , , 1, 2,..., 2,1,0m q qq q q q q q++ + − − represent a tree code on “(m + 3)⋅ q”

edges.

T

ek

e2

e1

Gk G2 G1

C1 C2 Ck

1+a1 M1

t2 + a1 M2

tk + a1 Mk

Page 5: ArproTree_journal

5

THEOREM 3

Suppose X= (a1, a2, …, aq) be a given α-valuable tree code on “q” edges.

Assume q - a1= even integer. Then for any positive integer m ≥ 2,

( )1

1 1 1 1 1( 1, 2,..., , ) , 1, 2,..., 1, ,ma a q a a a q q X−+ + + + − represents a tree code on

“(m + 1)q − a1⋅ m + m −1” edges.

THEOREM 4

Suppose X= (a1, a2, …, aq) be a given α-valuable tree code on “q” edges

such that, i. q is odd.

ii. a1 is even.

Then,

(1 + a1, σ (a1 + 3), 1 + a1, σ (a1 + 5), 1 + a1, …, 1 + a1, σ (q), 1 + a1, X) represents a tree

code on “2q − a1” edges.

Here σ is any permutation on “(q − a1 − 1)/ 2” symbols= {a1+3, a1+5, …, q}.

Here 1 + a1 is repeated “(q − a1 + 1)/ 2” times.

THEOREM 5

Suppose X= (a1, a2, …, aq) be a given α-valuable tree code on “q” edges.

Assume,

1) 3│q and 3│a1.

2) a1 ≤ 2⋅ q / 3.

3) q ≥ 6. Then,

(a1 + q − 2, a1 + q - 5, …, 4 + a1, 1 + a1, a1 + q − 3, a1 + q – 4, a1 + q - 6, a1 + q − 7, …,

a1 + 3, a1 + 2, X) always represent a tree code on “2⋅ q-2” edges.

THEOREM 6

Suppose X= (a1, a2, …, aq) be a given α - valuable tree code on “q” edges,

such that,

1. q = even.

2. a1 = even.

3. a1 ≤ q / 2 and q ≥ 4. Then,

(a1 + q − 1, a1 + q − 3, …, 3 + a1, 1 + a1, a1 + q − 2, a1 + q − 4, …, a1 + 4, a1 + 2, X) always represent a tree code on “2⋅ q − 1” edges.

Page 6: ArproTree_journal

6

Tree Codes

1. (1n, n + 2, …, n + r + 1, 1

n, 0

2n + r) represents a tree code on “4⋅ n + 2⋅ r” edges for

any positive integer n, r.

2. (1, 3, 4, …, n + 2, 1, 0n + 2

) always represent a tree code on “2⋅ n + 4” edges.

3. (1, σ (3), σ (4), …, σ (n + 2), 1, 0n + 2

) always represent a tree code on “2⋅ n + 4”

edges for any σ Є Sn= Symmetric group on n symbols.

4. (1, 2, …, 2n, 2n + 1, 1, 2, …, 2n, 04n + 1

) represent a tree code on “8⋅ n+2” edges

for any n ≥ 1.

5. (1, 3, 1, 5, 1, 7, 1, …, 1, 2n + 1, 1, 02n + 1

) represent a tree code on “4⋅ n + 2”

edges.

6. (1, σ (3), 1, …, 1, σ (2n + 1), 1, 02n + 1

) represent a tree code on “4⋅ n + 2” edges

for any σ Є Sn = group of permutations on n= {3, 5, …, 2n+1} symbols.

THEOREM 7

Suppose (a1, a2, …, aq − 1, aq) represents code of a graceful tree on “q” edges. Then

X = (aq + q, aq – 1 + q −1, …, 2 + a2, 1 + a1, x, a1, a2, a3, …, aq − 1, aq), [0 ≤ x ≤ q]

represent a α–valuable tree code on “2q + 1” edges.

Define,

U (X) = (q + 1 + (aq, aq − 1, …, a2, a1), x + q + 1, q + 1 + (a1 + 1, a2 + 2, …, aq + q ))

U (X) R

= (q + 1 + (aq + q, aq − 1 + q – 1, …, a2 + 2 , a1 + 1) , x + q + 1, q + 1 + (a1, a2, …,

aq − 1, aq)) Then,

(U (X) R

+ (k – 2) q, U (X) R

+ (k – 3) q, …, U (X) R + q, U (X)

R, X) always represent a

α–valuable tree code on “2⋅ k⋅ q + k” edges. (k ≥ 3) +== +

THEOREM 8

Let X1 = (q, a2(1)

, a3(1)

, …, a2q(1)

, a2q + 1(1)

)

X2 = (q, a2(2)

, a3(2)

, …, a2q(2)

, a2q + 1(2)

) ……………………………………

Xi = (q, a2(i)

, a3(i)

, …, a2q(i)

, a2q + 1(i)

) ……………………………………

Xk = (q, a2(k)

, a3(k)

, …, a2q(k)

, a2q + 1(k)

)

represent “k” α–valuable tree codes on “2q + 1” edges of trees T1, T2, …, Ti, …, Tk

respectively (k ≥ 3)

Define,

U (Xi) = (q + 1, 2 + a2(i)

, 3 + a3(i)

, …, 2q + a2q(i)

, 2q + 1 + a2q + 1(i)

)

U (Xi) R = (2q + 1 + a2q + 1

(i) , 2q + a2q

(i), …, 3 + a3

(i), 2 + a2

(i), q + 1), for 1 ≤ i ≤ k.

Page 7: ArproTree_journal

7

Then,

(U (X1) R + (k – 2) q, U (X2)

R + (k – 3) q, …, U (Xk - 2)

R + q, U (Xk - 1)

R, Xk)

represent α–valuable tree code of a tree “T” on “2⋅ k⋅ q + k” edges such that

E (T) = E (T1) U E (T2) U … U E (Tk)

Also,

(U (X1) R + (k – 2) q, U (X2)

R + (k – 3) q, …, U(Xk - 2)

R + q, U (Xk - 1)

R, 0, Xk) represent

a α–valuable tree code of a tree “S” on “2⋅ k⋅ q + k+ 1” edges.

THEOREM 9

Suppose (a1, a2, …, aq − 1, aq) represent a α- valuable tree code of a graceful tree on “q”

edges. Then,

X = (aq + q, aq − 1+ q − 1, …, 2 + a2, 1 + a1, a1, a2, a3, …, aq − 1, aq), represent a

α–valuable tree code on “2q” edges.

Define, Y = (2q – 1, 2q – 2, …, q + 1, q, q – 1, q – 2, …, 1, 0) – X.

= (q – 1, q – 1 – aq − 1, …, q – 1 – a2, q – 1 – a1, q – 1 – a1, q – 2 – a2, …,

1 – aq − 1, 0) U (Y) = (q, q + 1 − aq − 1, …, 2q – 2 – a2, 2q – 1 – a1, 2q – a1, 2q – a2, …, 2q – aq − 1, 2q). U (Y)

R = (2q, 2q – aq − 1, …, 2q – a2, 2q – a1, 2q – 1 – a1, 2q – 2 – a2, …, q + 1 – aq − 1, q).

Then,

(U (Y) R

+ (k – 2) q, U (Y) R + (k – 3) q, …, U (Y)

R + q, U(Y)

R, Y) always represent a

α–valuable tree code on “2⋅ k⋅ q ” edges (k ≥ 3).==

=

Section 3

Generation of all Tree codes on a given number of edges Before we present an algorithm to generate all tree codes on a given number of edges, we

summarize the following concepts involved in formulating the algorithm.

Cantor Representation

Every non-negative integer less than q! has a unique Cantor representation,

a1⋅(q – 1)! + a2⋅(q – 2)! + …+ aq − 2 ⋅2! + aq – 1 ⋅1!

where ai is a nonnegative integer not exceeding q - i, for i = 1, 2, …, q − 1. The integers

a1, a2, …, aq − 1 are called the Cantor coefficients of this integer.

Therefore a unique code can be obtained for every nonnegative integer less than q! of the

form,

(a1, a2, a3, …, aq − 1, 0)

where 0 ≤ ai ≤ q − i, for 1 ≤ i ≤ q.

This representation is called graceful code representation of this integer.

Page 8: ArproTree_journal

8

Now we have the following method to convert any non-negative integer less than

q! to a graceful code,

1. Divide the given nonnegative integer (x < q!) by (q – i)!, for i = 1, 2, …, q.

2. Place at the ith

position, c = x / (q − i)!. 3. Subtract c⋅(q – i)! from x. i.e., x = x – c⋅(q – i)!.

4. Repeat steps 1 to 3 till i = q, when at the end of the qth

iteration x becomes zero.

5. The string finally obtained is the graceful code representation of the nonnegative

integer x.

Example.

The graceful code (a1, a2, a3, a4, a5) that correspond to the integer 89 is (3, 2, 2, 1, 0)

Here x = 89, n = 5, 1 ≤ i ≤ 5. Begin by dividing 89 by 4!. From step 2, we obtain c = 3.

Therefore, a1 = 3. Next, subtract 72 from 89(By step 3). x reduces to 17. Now, 17 is

divided by 3!, clearly a2 = 2, since 17/ 3! = 2. Now subtract 12 from 17. Proceeding in a

similar way we get, a3 = 2, a4 = 1 and a5 = 0. Therefore the graceful code representation

of 89 is (3, 2, 2, 1, 0).

Algorithm 1 converts any nonnegative integer less than q! to its corresponding

unique graceful code. Therefore we can also generate all graceful codes on given q.

Algorithm 1: Conversion of any nonnegative integer to Code of length q.

NUMBER_TO_CODE (q, x: integers with q ≥ 1 and 0 ≤ x ≤ q! − 1)

create array a[1 . . q]

a[q] ← 0

fact ← FACTORIAL (q −−−− 1) /* returns (q – 1)!

for k ← 1 to q − 1

a[k] ← x / fact

x ← x − (a[k] * fact)

fact ← fact / FACTORIAL(q −−−− k)

/* a[] contains the code corresponding to integer x.

Now, we are able to generate all graceful codes on a given number of edges.

These codes are tested for tree property using prüfer tree checking algorithm ([3], [38]).

Every graceful code generated is tested for tree property before next code is generated.

As a result, all tree codes are isolated on a given number of edges.

Prüfer tree checking algorithm

Let the “q+1” vertices of a graceful tree T be labeled 0, 1, 2, …, q. The pendant

vertex (and the edge incident on it) having the smallest label, which is, say a1 is removed.

Suppose that b1 was the vertex adjacent to a1. Among the remaining “q” vertices let a2 be

Page 9: ArproTree_journal

9

the pendant vertex with the smallest label and b2 be the vertex adjacent to a2. The edge

(a2, b2) is removed. This operation is continued on the remaining “q−1” vertices, and then

on “q−2” vertices, and so on. This process is terminated after “q−1” steps, when only two

vertices are left. Now the graceful tree T defines the following prüfer sequence,

(b1, b2, …, bq−−−−1) uniquely.

When we work with graceful codes, we are performing the operation as described

above by eliminating the least pendant vertex and the edge incident on it. If all the edges

can be exhausted after “q−1” steps, the given code represent a graceful tree T. If we

could not exhaust all the edges, then the given code represent a disconnected graph which

contains a cycle.

Algorithm to decide whether the code of a graceful graph represents a tree or not

Algorithm 2: To check the code of a graceful graph represents a tree or not.

Input. Number of edges q and graceful code a[]

Output. Either a[] represents a tree or not.

PRUFER_TREECHECKING (q: Number of edges, a[]: Code of the graceful graph)

q1← q

for i ← 0 to q − 1

if (a[i] < 0 or a[i]> q − i − 1)

/* not a graceful code

exit

for i ←1 to q

do b[i −1] ← i + a[i −1]

/* upper code stored in array b[]

for key ← 0 to q1

element ← 0

j ← 0

while (j < q)

if (key = a[j] or key = b[j])

element ← element +1

j ← j + 1

else

j ← j + 1

if (element = 0)

/*code does not represent tree

Page 10: ArproTree_journal

10

exit

key ← 0

while (key ≤ q1)

element ← 0

j ← 0

while (j < q)

if (key = a[j] or key = b[j])

element ← element + 1

j ← j + 1

else

j ← j + 1

key ← key + 1

if (element = 1)

SEARCH (key −1)

if (z < 2*q1)

/*code does not represent tree

SEARCH (temp)

for n ← 0 to q − 1

if (a[n] = temp or b[n] = temp) /*returns position of pendant vertex in the code

TREEVERT (n)

VERDELETE (n, q)

key ← 0

VERDELETE (n, k)

for x ← n to k − 2

a[x] ← a[x + 1] /* vertices deleted from lower and upper code

b[x] ← b[x + 1]

k ← k − 1

q ← k

TREEVERT (d)

tree [z] ← a[d]

z ← z + 1

tree [z] ← b[d]

Page 11: ArproTree_journal

11

z ← z + 1

if (z = 2*q1) /* all edges are exhausted

/* code represents a tree

Generation of all Tree Codes on a given number of Edges

Using the algorithms discussed earlier, we now construct an algorithm, which

generates all possible graceful tree codes on a given number of edges.

Algorithm 3: Generation of all Tree Codes

Input. Number of edges “q”

Output. All tree codes on “q” edges.

TREECODE_GENERATION (q)

1. q ← q1 ← n

2. create arrays a[1 . . n] and b[1 . . n] to store lower and upper code respectively

3. a[n] ← 0, b[n] ← n

4. fact1 ← FACTORIAL (n)

5. fact ← facts ← fact1 / n

6. for inc ← 0 to fact1/ 2 /* Restricted to Complimentary Labeling

6.1. inc1 ← inc

6.2. fact ← facts

6.3. for k ← 1 to n − 1

6.3.1. a[k] ← inc / fact

6.3.2. b[k] ← k + a[k]

6.3.3. inc1 ← inc1 − (a[k] * fact)

6.3.4. fact ← fact / (n − k)

6.4. sp ← 0

6.5. element ← INITIAL_TREECHECKING (a, b, n) /*Check whether all numbers from 0 to q

appear or not

6.6. key ← 0

6.7. while key ≤ q1

6.7.1. element ← 0

6.7.2. for j ← 1 to q

6.7.3. begin

6.7.3.1. if key = a[j] or key = b[j] /*To select least pendant vertex

Page 12: ArproTree_journal

12

6.7.3.1.1. element ← element + 1

6.7.3.1.2. j ← j + 1

6.7.3.2. else

6.7.3.2.1. j ← j + 1

6.7.4. end

6.7.5. if element = 1

6.7.5.1. temp1[sp] ← key /* exhausted vertex stored here

6.7.5.2. sp ← sp + 1

6.7.5.3. SEARCH (key)

6.7.5.4. exit while

6.7.6. else

6.7.6.1. key ← key + 1

6.8. while key ≤ q1

6.8.1. flag = ELIMINATE_VERTEX ( key, sp) /*Remove pendant vertex

6.8.2. if flag = 1

6.8.2.1. key ← key + 1

6.8.3. else

6.8.3.1. element ← 0

6.8.4. for j ← 1 to q

6.8.5. begin

6.8.5.1. if key = a[j] or key = b[j]

6.8.5.1.1. element ← element + 1

6.8.5.1.2. j ← j + 1

6.8.5.2. else

6.8.5.2.1. j ← j + 1

6.8.6. end

6.8.7. if element = 1

6.8.7.1. temp1[sp] ← key

6.8.7.2. sp ← sp + 1

6.8.7.3. SEARCH (key)

6.8.8. else

6.8.8.1. key ← key + 1

6.9. end while

7. if z = q1

7.1. q ← n

7.2. count ← count + 1

Page 13: ArproTree_journal

13

7.3. z ← 0

7.4. /* Display a[] as tree code

8. else /* all edges are not exhausted

8.1. z ← 0

8.2. q ← n

8.3. inc ← inc + 1 /* Get next code

8.4. /* Display number of tree codes, count

SEARCH (temp)

for i ← 1 to q /*returns the position of pendant vertex

if a[i] = temp or b[i] = temp

z ← z + 1

VERDELETE (i, q)

end if

key ← 0

INITIAL_TREECHECK (x[], y[], n)

1. for key ← 1 to q − 1

1.1. element ← 0

1.2. for j ← 1 to d − 1

1.2.1. if key = x[j] or key = b[j]

1.2.1.1. element ← element + 1

1.2.1.2. key ← key + 1

1.2.2. else

1.2.2.1. key ← key + 1

1.3. if element = 0

1.3.1. key ← key +1

2. return element

VERDELETE (s, k)

for x ← s to k − 1

a[x] ← a[x + 1]

b[x] ← b[x + 1]

k ← k − 1

q ← k

Page 14: ArproTree_journal

14

FACTORIAL (f)

fac ← 1

if f = 0 or f = 1

return 1

else

for i ← 1 to f

fac ← fac * I

return fac

ELIMINATE_VERTEX (temp, spc)

flag1 ← 0

for i ← 1 to spc

if temp = temp1[i] /* temp1[] stores exhausted vertices

flag1 ← 1

return flag1

else

i ← i + 1

Page 15: ArproTree_journal

15

The following table shows the number of all possible tree codes (restricted to

complimentary labeling) up to 13 edges

No. of Edges ‘q’ No. of Tree Codes Tn

1 1

2 1

3 2

4 6

5 20

6 82

7 376

8 2010

9 11788

10 77816

11 556016

12 4366814

13 36773666

Page 16: ArproTree_journal

16

Reference:

1. R. E. Aldred, J. Siran and M. Siran, “A note on number of Graceful Labellings of Paths”, Discrete

Math., 261, 27−30, 2003.

2. Mousa Alfalayleh, Ljiljana Brankovic, Helen Giggins and Md. Zahidul Islam, “Towards the

Graceful Tree Conjecture: A Survey”

3. S. Arun, “A Project Report on Graceful Labellings” Nov 2006, Dept. of Computer Science &

Engineering, Sri Chandrasekharendra Saraswathi Viswa Maha Vidyalaya (Deemed University),

Kanchipuram.

4. V. Bhat Nayak and U. Deshmukh, “New Families of Graceful Banana Trees”, Proc. Indian Acad.

Sci. Math. Sci., 106, 187-190, 1996.

5. C. P. Bonnington and J. Siran, “Bipartite Labelling of Trees with Maximum Degree Three”,

Journal of Graph Theory, 31, 37-56, 1999.

6. L. Brankovic, A. Rosa and J. Siran, “Labelling of Trees with Maximum Degree Three - And

Improved Bound”, preprint.

7. H. J. Broersma and C. Hoede. “Another Equivalent of Graceful Tree Conjecture” Ars

Combinatoria, 51, 183-192, 1999.

8. M. Burzio and G. Ferrarese, “The Subdivision Graph of a Graceful Tree is a Graceful Tree”,

Discrete Mathematics, 181,275-281, 1998.

9. F. Van Bussel, “Relaxed Graceful Labellings of Trees”, The Electronic Journal of Combinatorics,

9(1), #R4, 2002.

10. S. M. Hegde and S. Shetty, “On Graceful Trees”, Applied Mathematics E-Notes, 2, 192-197,

2002.

11. P. Hrnčiar and A. Haviar, “All Trees of Diameter Five are Graceful”, Discrete Mathematics, 233,

133-150, 2001.

12. C. Huang, A. Kotzig and A. Rosa, “Further Results on Tree Labellings”, Util. Math., 21C, 31-48,

1982.

13. C. Huang and A. Rosa, “Decomposition of Complete Graphs into trees”, Ars Combinatoria, 4

(1978), 23-63.

14. J. A. Gallian, “A Dynamic Survey of Graph Labelling”, Electronic Journal of Combinatorics, DS6

(October 2003).

15. K. M. Koh, D. G. Rogers and T. Tan, “A Graceful Arboretum: A Survey of Graceful Trees”, Proc.

of Franco-Southeast Asian Conference, Singapore, May 2, 279-292, 1979.

16. A. Kotzig, “On Certain Vertex-Valuations of Finite Graphs”, Utilitas Math., 4, 261-290, 1973.

17. H. K. Ng, “Gracefulness of a Class of Lobsters”, Notices AMS, 7, 825-2924, 1986.

Page 17: ArproTree_journal

17

18. Pawan Kumar, Graceful Graph: Code Operator, Software Project Thesis- Nov 2005, Dept. Of

Computer Science & Engineering, Sri Chandrasekharendra Saraswathi Viswa Maha Vidyalaya

(Deemed University), Kanchipuram.

19. A. Rosa, “On Certain Valuations of the Vertices of a Graph”, Theory of graphs (Proc. Internat.

Symposium, Rome, 1966), Gordon and Breach, N. Y. and Dunod Paris, 349-355, 1967.

20. A. Rosa, “Labelling Snakes”, ARS Combinatoria, 3, 67-74, 1977.

21. A. Rosa and J. Sira, “Bipartite Labellings of Tree and the Gracesize”, Journal of Graph Theory,

19, 201-215, 1995.

22. R. Stanton and C. Zarnke, Labelling of Balanced Trees”, Proc. 4th

Southeast Conference of Comb.,

Graph Theory, Computing, 479-495, 1973.

23. S. Zhao, “All Trees of Diameter Four Are Graceful” Annals New York Academy of Sciences,

700-706, 1986.

24. R. E. Aldred and B. D. McKay, “Graceful and Harmonious labellings of Trees ”, Bull. Inst.

Combin. Appl., 23, 69-72, 1998.

25. J. C. Bermond, “Graceful Graphs, Radio Antennae and French Windmills”, Graph Theory and

Combinatorics, Pitman, London, 13-37, 1979.

26. J. C. Bermond and D. Sotteau, “Graph Decompositions and G-design”, Proc. 5th

British

Combinatorics Conference, 1975, 52-72 (Second Series), 12, 25-28, 1989.

27. W. C. Chen, H. I. Lü and Y. N. Yeh, “Operations of Interlaced Trees and Graceful Trees”, South

East Asian Bulletin of Mathematics, 21, 337-348, 1997.

28. P. Erdos, P. Hell and P. Winkler, “Bandwidth versus Bandsize”, Annals of Discrete Mathematics,

41, 117-130, 1989.

29. S. W. Golomb, “How to Number a Graph”, Graph Theory and Computing, R. C. Read, Academic

Press, New York, 23-37, 1972.

30. B. Mohar, “The laplacian spectrum of graphs”, Graph Theory, Combinatorics, and Applications,

2, 279-292, 1979.

31. D. Morgan, “Gracefully Labelled Trees from Skolem sequences”, Proc. of Thirty-first South

Eastern Internat. Conf on Combin., Graph Theory, and Computing (Boca Raton, Fl, 2000),

Congressus Numerantium, 142, 41-48, 2000.

32. D. Morgan and R. Rees, “Using Skolem sequences and Hooked-skolem sequences to generate

Graceful Trees”, Journal of Combinatorial Mathematics and Combinatorial Computing, 44, 47-63,

2003.

33. A. M. Pastel and H. Raynaud. “Les Oliviers sont gracieux” Colloq. Grenoble, Publications

Université de Grenoble, 1978.

34. G. Ringel, “Problem 25”, Theory of Graphs and its Applications (Proc. Sympos. Smolenice 1963,

Nakl. CSAV, Praha 1964), 1978.

Page 18: ArproTree_journal

18

35. D. A. Sheppard, “The factorial Representation of Balanced Graceful Graphs”, Discrete Math., 15,

379-388, 1976.

36. J. G. Wang, D. J. Jin, X. G. Lu and D. Zhang, “The gracefulness of a class of Lobster Trees”,

Mathematical Computer Modeling, 20, 105-110, 1994.

37. K. Balasubramanian, N. Chandramowliswaran, N. Ramachandran, Pawan Kumar, “Generation of

graceful trees through graceful codes”, Internat. Conf. on Number Theory and Combinatorics,

SASTRA University, December 2006.

38. K. Balasubramanian, S. Arun, N. Chandramowliswaran, “Algorithm for a given code of a graceful

graph represents a tree”, Internat. Conf. on Number Theory and Combinatorics, SASTRA

University, December 2006.

39. K. Balasubramanian, N. Chandramowliswaran, “Tree Generation Theorems”, Kyoto Interat. Conf.

on Computational Geometry and Graph Theory- in honor of Jin Akiyama and Vasek Chvatal on

their 60th

birthdays, June 11-15, 2007,Kyoto, Japan.

40. K. Balasubramanian, N. Chandramowliswaran, N. Ramachandran, S. Arun, Pawan Kumar,

“Arithmetical properties of Tree Generation codes and algorithm to generate all tree codes for a

given number of edges”, Kyoto Interat. Conf. on Computational Geometry and Graph Theory- in

honor of Jin Akiyama and Vasek Chvatal on their 60th

birthdays, June 11-15, 2007,Kyoto, Japan.

41. J. A. Bondy and U. S. R. Murty, “Graph Theory with Applications”, MacMillan Press Ltd, First

Edition 1976.

42. T. H. Cormen, C. E. Leiserson, R. L. Rivest, C. Stein, Introduction to Algorithms, MIT Press,

Cambridge, 2001.