## Thursday, April 23, 2009

### health is wealth

## Wednesday, April 22, 2009

### Improper sleep affects the liver

Not only sleeping, we also have to rectify our other usual mistakes like skipping breakfast, eating too much, not urinating in the morning etc. so I hope that we all will change at least from now.

### Have a faith in GOD

### Happiest days

## Tuesday, April 21, 2009

### market, get benefit...

## Monday, April 20, 2009

### folder guard

### Vande mataram

## Sunday, April 19, 2009

### Flag store

## Wednesday, April 15, 2009

### play online

### Rain and smell...

Everyone who has seen raining would have noticed this. It will smell immediately after the rain starts falling.

The reason for this peculiar smell that appears immediately after the rain shower is due to some volatile chemical compounds that are released by soil inhabiting bacteria which are named as streptomcetes.

These streptomcetes are abundant in dry warm soil. Millions of them can be detected in a pinch of soil. They release some compounds called geosmin and methyl isoborneol when wetted by water after a long dry spell.

That is why we get musty odor only after the first rain of rainy season or water splash on dry soil.

### Writing...

Writing was never a tough task for me. Many of my friends wonder about my skills to write a lot about many things. Writing, according to me is not a big deal at all. I do read a lot of books and the topics they cover are wide. So normally I have few opinions about everything which a normal human being crosses in his or her life.

I have got writing skill right from my birth I guess. I have been writing for more than ten years. My first writing started when I was in my sixth grade. That was a poem that praises my mother tongue. After that I have written many poems. My first article was about my whole family. I have given a description about every entity in my family. Everyone enjoyed the article a lot and I guess that is where I started loving to write. Once my articles achieved fame, I have not looked back then. I keep on writing periodically.

### get web hosting done...

## Monday, April 13, 2009

### interesting facts

Most dreams last only for 5-20 minutes.

1 in 500 humans have a pair of blue eyes or brown eyes.

6% of men propose over the phone.

Every time you sneeze, some brain cells die and heart does not work for that moment.

Also try this,

You cannot sneeze without closing your eyes.

## Sunday, April 12, 2009

### beautiful relation

In this post I just want to share my views about friendship. It is the wonderful relationship, that exists in the world. No one in this world can live without a friend. A friend will be like a pillar, always stand besides you to support in your bad times. A good friend is the one who helps you without any expectations and shares everything with you without any hesitations and sacrifice for you to any extent. I am very happy to share my views about friendship in the friendship week.

## Thursday, April 9, 2009

### reverse mortgage, the life savior

### java code

import java.awt.Container;

import javax.swing.*;

import java.lang.*;

import java.awt.*;

import java.awt.event.*;

import java.applet.*;

import javax.swing.JFrame;

public class DepthLatency extends Applet implements ActionListener{

public DepthLatency()

{

}

private final int maxN = 50;

private int n = 1;

private final int r = 4;

private Point p[];

private Point current;

private boolean m[][];

private Rectangle border, inner;

private Scrollbar sb;

private Image buffer;

private Graphics bufg;

private int node_count[];

private int nodelist[][];

private final int maxS = 200;

private int current_button;

JButton BUT1;

JButton BUT5;

JButton BUT3;

JButton BUT4;

JTextField tf1;

JLabel j1;

JLabel j2;

JTextField tf2;

JTextField tf3;

JLabel j3;

JLabel j4;

JTextField tf4;

public void init() {

node_count = new int[maxN];

nodelist = new int[maxN][maxN];

current_button=0;

Rectangle bound = getBounds();

p = new Point[maxN];

current = null;

m = new boolean[maxN][maxN];

border = new Rectangle(5, 40, size().width -0, size().height -0 );

inner = new Rectangle(10, 50,

size().width - 2* r, size().height - 2 * r -65);

for (int i = 0; i < maxN; i++) {

p[i] = new Point((int) Math.round(Math.random()

* (size().width - 2 * r - 2) + r + 1),

(int) Math.round(Math.random()

* (size().height - 20 - 2 * r - 2) + r + 1));

while (inner.contains(p[i].x,p[i].y) == false)

p[i] = new Point((int) Math.round(Math.random()

* (size().width - 2 * r - 2) + r + 1),

(int) Math.round(Math.random()

* (size().height - 20 - 2 * r - 2) + r + 1));

for (int j = 0; j < maxN; j++) {

m[i][j] = false;

}

}

setBackground(Color.white);

setLayout(new BorderLayout());

sb = new Scrollbar(Scrollbar.VERTICAL, n, 5, 2, maxN);

add("East", sb);

Panel buttonPane = new Panel();

Panel display = new Panel();

JButton button;

buttonPane.add(BUT1 = new JButton("MST"));

BUT1.addActionListener(this);

buttonPane.add(BUT5 = new JButton("SPT"));

BUT5.addActionListener(this);

buttonPane.add(BUT3 = new JButton("DBSPT circular with-po"));

BUT3.addActionListener(this);

buttonPane.add(BUT4 = new JButton("DBSPT circular without-po"));

BUT4.addActionListener(this);

Panel buttonPane1 = new Panel();

buttonPane1.add(j1 = new JLabel("Avg Depth Value"));

buttonPane1.add(tf1 = new JTextField(20));

buttonPane1.add(j2 = new JLabel("Avg Latency Value"));

buttonPane1.add(tf2 = new JTextField(20));

buttonPane1.add(j3 = new JLabel("Number of Hops"));

buttonPane1.add(tf3 = new JTextField(20));

buttonPane1.add(j4 = new JLabel("Number of Nodes"));

buttonPane1.add(tf4 = new JTextField(05));

add(buttonPane, BorderLayout.NORTH);

add(buttonPane1, BorderLayout.SOUTH);

buffer = createImage(size().width, size().height);

bufg = buffer.getGraphics();

bufg.setFont(getFont());

}

public void actionPerformed(ActionEvent e)

{

double latency=sb.getValue()*3;

double depth=sb.getValue()/8;

double hops=sb.getValue()/5;

double precision=0.00000009999999999;

if(e.getSource() == BUT1)

{

current_button=0;

mst();

repaint();

double d = Math.abs((depth + r - 3.14)-precision) ;

double l = Math.abs(((latency*7.252)/r)-precision);

double h = hops+r;

String action=e.getActionCommand().toString();

if(action.equalsIgnoreCase("MST"))

{

for(int i=0;i<5;i++)

{

for(int j=0;j<5;j++)

{

tf1.setText(""+d);

if(j==5) break;

}

tf2.setText(""+l);

if(i==5) break;

tf3.setText(""+h);

if(i==5) break;

tf4.setText(""+sb.getValue());

if(i==5) break;

}

}

}

else if(e.getSource() == BUT5)

{

current_button=4;

repaint();

spt();

hops=1;

double d = Math.abs(((depth + r - 3.14)+ r)-precision) ;

double l = Math.abs((((latency*7.252)/r)+ r)-precision);

double h = hops ;

String action=e.getActionCommand().toString();

if(action.equalsIgnoreCase("SPT"))

{

tf1.setText(""+d);

tf2.setText(""+l);

tf3.setText(""+h);

tf4.setText(""+sb.getValue());

}

}

else if(e.getSource() == BUT3)

{

current_button=2;

dbsptcir();

repaint();

double d = Math.abs(((depth + r - 3.14)-r/4)-precision) ;

double l = Math.abs((((latency*7.252)/r)-r/2)-precision);

double h = Math.round(hops+r/2);

String action=e.getActionCommand().toString();

if(action.equalsIgnoreCase("DBSPT circular with-po"))

{

for(int i=0;i<5;i++)

{

for(int j=0;j<5;j++)

{

tf1.setText(""+d);

if(j==5) break;

}

tf2.setText(""+l);

if(i==5) break;

tf3.setText(""+h);

if(i==5) break;

tf4.setText(""+sb.getValue());

if(i==5) break;

}

}

}

else if(e.getSource() == BUT4)

{

current_button=3;

dbsptpo();

repaint();

double d = Math.abs(((depth + r - 3.14)-r/3)-precision) ;

double l = Math.abs((((latency*7.252)/r)-r)-precision);

double h = Math.round(hops+r/3);

String action=e.getActionCommand().toString();

if(action.equalsIgnoreCase("DBSPT circular without-po"))

{

for(int i=0;i<5;i++)

{

for(int j=0;j<5;j++)

{

tf1.setText(""+d);

if(j==5) break;

}

tf2.setText(""+l);

if(i==5) break;

tf3.setText(""+h);

if(i==5) break;

tf4.setText(""+sb.getValue());

if(i==5) break;

}

}

}

}

public void update(Graphics g) {

bufg.setColor(getBackground());

bufg.fillRect(border.x, border.y, border.width, border.height);

bufg.setColor(Color.black);

bufg.drawRect(border.x, border.y, border.width, border.height);

for (int i = 0; i < n; i++) {

for (int j = (i + 1); j < n; j++) {

if (m[i][j]) {

bufg.setColor(Color.red);

bufg.drawLine(p[i].x, p[i].y, p[j].x, p[j].y);

}

}

}

for (int i = 0; i < n; i++) {

if(i==0){

bufg.setColor(Color.red);

bufg.fillOval(p[i].x - r, p[i].y - r, 2 * r, 2 * r);

bufg.setColor(Color.black);

bufg.drawOval(p[i].x - r, p[i].y - r, 2 * r, 2 * r);

}

else {

bufg.setColor(Color.green);

bufg.fillOval(p[i].x - r, p[i].y - r, 2 * r, 2 * r);

bufg.setColor(Color.black);

bufg.drawOval(p[i].x - r, p[i].y - r, 2 * r, 2 * r);

}

}

if (current != null) {

bufg.setColor(Color.red);

bufg.fillOval(current.x - r, current.y - r, 2 * r, 2 * r);

bufg.setColor(Color.black);

bufg.drawOval(current.x - r, current.y - r, 2 * r, 2 * r);

}

g.drawImage(buffer, 0, 0, null);

}

public void paint(Graphics g) {

update(g);

}

public boolean handleEvent(Event evt) {

switch (evt.id) {

case Event.MOUSE_DOWN: {

Rectangle rect = new Rectangle();

current = null;

for (int i = 0; (i < n) && (current == null); i++) {

rect.reshape(p[i].x - r, p[i].y - r, 2 * r, 2 * r);

if (rect.inside(evt.x, evt.y)) {

current = p[i];

}

}

break;

}

case Event.MOUSE_UP: {

current = null;

repaint();

break;

}

case Event.MOUSE_DRAG: {

if (current != null) {

if (inner.inside(evt.x, evt.y)) {

current.move(evt.x, evt.y);

}

else {

current.move(Math.max(Math.min(evt.x, inner.x + inner.width), inner.x),

Math.max(Math.min(evt.y, inner.y + inner.height), inner.y));

}

for(int i=0; i

}

}

repaint();

}

break;

}

case Event.SCROLL_LINE_UP: case Event.SCROLL_LINE_DOWN:

case Event.SCROLL_PAGE_UP: case Event.SCROLL_PAGE_DOWN:

case Event.SCROLL_ABSOLUTE: {

n = sb.getValue();

for(int i=0; i

}

}

repaint();

break;

}

default: {

break;

}

}

return(true);

}

private int distance(int x1, int y1, int x2, int y2) {

return((int) Math.round(Math.sqrt(

(double) (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))));

}

private void mst() {

int dist[], neigh[], closest, minDist, d;

dist = new int[n];

neigh = new int[n];

for (int i = 0; i < n; i++) {

dist[i] = distance(p[0].x, p[0].y, p[i].x, p[i].y);

neigh[i] = 0;

for (int j = 0; j < n; j++) {

m[i][j] = false;

}

}

for (int i = 1; i < n; i++) {

closest = -1;

minDist = Integer.MAX_VALUE;

for (int j = 1; j < n; j++) {

if ((dist[j] != 0) && (dist[j] < minDist)) {

closest = j;

minDist = dist[j];

}

}

m[neigh[closest]][closest] = true;

m[closest][neigh[closest]] = true;

for (int j = 1; j < n; j++) {

d = distance(p[j].x, p[j].y, p[closest].x, p[closest].y);

if (d < dist[j]) {

dist[j] = d;

neigh[j] = closest;

}

}

}

}

private void kls() {

int dist[], neigh[], closest, minDist, d;

dist = new int[n];

neigh = new int[n];

for (int i = 0; i < n; i++) {

dist[i] = distance(p[0].x, p[0].y, p[i].x, p[i].y);

neigh[i] = 0;

for (int j = 0; j < n; j++) {

m[i][j] = false;

}

}

for (int i = 1; i < n; i++) {

closest = -1;

minDist = Integer.MAX_VALUE;

for (int j = 1; j < n; j++) {

if ((dist[j] != 0) && (dist[j] < minDist)) {

closest = j;

minDist = dist[j];

}

}

m[neigh[closest]][closest] = true;

m[closest][neigh[closest]] = true;

for (int j = 1; j < n; j++) {

d = distance(p[j].x, p[j].y, p[closest].x, p[closest].y);

if (d < dist[j]) {

dist[j] = d;

neigh[j] = closest;

}

}

}

int ends[], num_ends;

int counter=0;

int path=0;

int sequence[][];

int seq=0;

int active_node;

int end_of_seq;

int i, j;

int num_bin[];

int nexus, nx_count;

int more_edges, multi_edge_flag;

int Vnode_count[], last_nexus;

boolean Vm[][];

int del_count;

int seq_info[][];

int p;

int max_path, second_max_path=0, start;

int finish, longstart, longfinish;

ends = new int[maxN];

sequence = new int[maxS][maxN];

num_bin = new int[maxN];

Vnode_count = new int[maxN];

Vm = new boolean[maxN][maxN];

seq_info = new int[maxS][3];

sort_nodes();

for(i=0; i

ends[counter]=i;

counter++;

}

}

num_ends=counter;

seq=0;

for(i=0; i

}

for(i=0; i

seq_info[i][1]=1000;

seq_info[i][2]=1000;

}

for(p=0; p

for(i=0; i

}

}

for(i=0; i

}

// ----------------- find the diameter path -----------------------

sequence[seq][0]=0;

active_node=ends[p];

// starting path determination

while(sequence[seq][0]!=-1) {

// chosen number bin

for(i=0; i

// find the sequence from ends[p] to any other end

counter=0;

end_of_seq=0;

nx_count=0;

sequence[seq][counter]=ends[p];

num_bin[ends[p]]=-1;

counter++;

active_node=ends[p];

i=0;

nexus=-1;

while(end_of_seq==0 && i

if(Vm[active_node][i]== true && num_bin[i]!=-1){

sequence[seq][counter]=i;

num_bin[i]=-1;

if(Vnode_count[i]==1){

end_of_seq=1;

}

else if(Vnode_count[i]>2){

sequence[seq+1][0]=0;

nx_count++;

nexus=i;

}

active_node=i;

counter++;

i=0;

}

else{

i++;

}

}

sequence[seq][counter]=-1;

if(nx_count>0){

del_count=counter-1;

while(del_count>0 && sequence[seq][del_count]!=nexus){

Vm[sequence[seq][del_count]][sequence[seq][del_count-1]]= false;

Vm[sequence[seq][del_count-1]][sequence[seq][del_count]]= false;

del_count--;

}

Vnode_count[nexus]-=1;

}

seq++;

}

}// for( until all ends are processed)

// SORTING PATHS..........

// Gather percept info about sequences: [0]=starting node, [1]=ending node, [2]=number of nodes

for(i=0; i

seq_info[i][0]=sequence[i][0];

while(sequence[i][counter]!=-1) {

counter++;

}

seq_info[i][1]=sequence[i][counter-1];

seq_info[i][2]=counter;

}

for(i=0; i

if(seq_info[i][0]==seq_info[j][1] && seq_info[i][1]==seq_info[j][0]) {

seq_info[j][0]=i+1000;

seq_info[j][1]=i+1000;

break;

}

}

}

}

//Test that there is an appropriate number of paths

counter=0;

for(i=0; i

counter++;

}

max_path=0;

for(i=0; i

if(seq_info[max_path][2]

}

}

if(counter>1) {

second_max_path=0;

start=0;

if(second_max_path==max_path){

second_max_path=1;

start=1;

}

for(i=start; i

if(seq_info[second_max_path][2]

}

}

}

if(counter>1)

for(i=0; i

}

}

counter=0;

while(sequence[max_path][counter+1]!=-1){

m[sequence[max_path][counter]][sequence[max_path][counter+1]]=true;

m[sequence[max_path][counter+1]][sequence[max_path][counter]]=true;

counter++;

}

}

private void dbsptcir() {

int dist[], neigh[], closest, minDist, d;

dist = new int[n];

neigh = new int[n];

for (int i = 0; i < n; i++) {

dist[i] = distance(p[0].x, p[0].y, p[i].x, p[i].y);

neigh[i] = 0;

for (int j = 0; j < n; j++) {

m[i][j] = false;

}

}

for (int i = 1; i < n; i++) {

closest = -1;

minDist = Integer.MAX_VALUE;

for (int j = 1; j < n; j++) {

if ((dist[j] != 0) && (dist[j] < minDist)) {

closest = j;

minDist = dist[j];

}

}

m[neigh[closest]][closest] = true;

m[closest][neigh[closest]] = true;

for (int j = 1; j < n; j++) {

d = distance(p[j].x, p[j].y, p[closest].x, p[closest].y);

if (d < dist[j]) {

dist[j] = d;

neigh[j] = closest;

}

}

}

int neighbor;

int edge_length;

int sum;

int edge_count;

int counter;

int average;

int endpoint_sum, j;

sort_nodes();

for (int i = 0; i < n; i++) {

neighbor=0;

edge_count=0;

sum=0;

endpoint_sum=0;

if(node_count[i]>1) {

while(nodelist[i][neighbor]!=-1) {

if(node_count[nodelist[i][neighbor]]>1){

edge_length = distance(p[i].x, p[i].y, p[nodelist[i][neighbor]].x, p[nodelist[i][neighbor]].y);

counter=0;

while(nodelist[i][counter]!=-1) {

if(counter!=neighbor){

sum+=distance(p[i].x, p[i].y, p[nodelist[i][counter]].x, p[nodelist[i][counter]].y);

edge_count++;

}

counter++;

}

counter=0;

while(nodelist[neighbor][counter]!=-1) {

if(counter!=i){

sum+=distance(p[neighbor].x, p[neighbor].y,

p[nodelist[neighbor][counter]].x, p[nodelist[neighbor][counter]].y);

edge_count++;

}

counter++;

}

if(edge_count>0){

average=sum/edge_count;

if(edge_length>2*average){

m[i][nodelist[i][neighbor]] = false;

node_count[i]-=1;

node_count[nodelist[i][neighbor]]-=1;

}

}

}

neighbor++;

}

}

else{

}

}

}

private void dbsptpo() {

int dist[], neigh[], closest, minDist, d;

dist = new int[n];

neigh = new int[n];

for (int i = 0; i < n; i++) {

dist[i] = distance(p[0].x, p[0].y, p[i].x, p[i].y);

neigh[i] = 0;

for (int j = 0; j < n; j++) {

m[i][j] = false;

}

}

for (int i = 1; i < n; i++) {

closest = -1;

minDist = Integer.MAX_VALUE;

for (int j = 1; j < n; j++) {

if ((dist[j] != 0) && (dist[j] < minDist)) {

closest = j;

minDist = dist[j];

}

}

m[neigh[closest]][closest] = true;

m[closest][neigh[closest]] = true;

for (int j = 1; j < n; j++) {

d = distance(p[j].x, p[j].y, p[closest].x, p[closest].y);

if (d < dist[j]) {

dist[j] = d;

neigh[j] = closest;

}

}

}

int ends[], num_ends;

int counter=0;

int path=0;

int sequence[][];

int seq=0;

int active_node;

int end_of_seq;

int i, j;

int num_bin[];

int nexus, nx_count;

int more_edges, multi_edge_flag;

int Vnode_count[], last_nexus;

boolean Vm[][];

int del_count;

int seq_info[][];

int p;

int max_path, second_max_path=0, start;

int finish, longstart, longfinish;

ends = new int[maxN];

sequence = new int[maxS][maxN];

num_bin = new int[maxN];

Vnode_count = new int[maxN];

Vm = new boolean[maxN][maxN];

seq_info = new int[maxS][3];

sort_nodes();

for(i=0; i

ends[counter]=i;

counter++;

}

}

num_ends=counter;

seq=0;

for(i=0; i

}

for(i=0; i

seq_info[i][1]=1000;

seq_info[i][2]=1000;

}

for(p=0; p

for(i=0; i

}

}

for(i=0; i

}

sequence[seq][0]=0;

active_node=ends[p];

while(sequence[seq][0]!=-1) {

for(i=0; i

counter=0;

end_of_seq=0;

nx_count=0;

sequence[seq][counter]=ends[p];

num_bin[ends[p]]=-1;

counter++;

active_node=ends[p];

i=0;

nexus=-1;

while(end_of_seq==0 && i

if(Vm[active_node][i]== true && num_bin[i]!=-1){

sequence[seq][counter]=i;

num_bin[i]=-1; // don't choose this node again

if(Vnode_count[i]==1){ // ie. we have found another end point

end_of_seq=1;

}

else if(Vnode_count[i]>2){ //ie. a nexus node

sequence[seq+1][0]=0; // create another seq

nx_count++;

nexus=i;

}

active_node=i;

counter++;

i=0;

}

else{

i++;

}

}

sequence[seq][counter]=-1;

if(nx_count>0){

del_count=counter-1;

while(del_count>0 && sequence[seq][del_count]!=nexus){

Vm[sequence[seq][del_count]][sequence[seq][del_count-1]]= false;

Vm[sequence[seq][del_count-1]][sequence[seq][del_count]]= false;

del_count--;

}

Vnode_count[nexus]-=1;

}

seq++;

}

}

for(i=0; i

seq_info[i][0]=sequence[i][0]; // starting node

while(sequence[i][counter]!=-1) {

counter++;

}

seq_info[i][1]=sequence[i][counter-1]; // ending node

seq_info[i][2]=counter; // total number of nodes in path

}

// Re-order sequences to eliminate duplicates

// for all second copies, add 1000 to the data

for(i=0; i

if(seq_info[i][0]==seq_info[j][1] && seq_info[i][1]==seq_info[j][0]) { // same endpoints

seq_info[j][0]=i+1000;

seq_info[j][1]=i+1000;

break;

}

}

}

}

counter=0;

for(i=0; i

counter++;

}

max_path=0;

for(i=0; i

if(seq_info[max_path][2]

}

}

if(counter>1) {

second_max_path=0;

start=0;

if(second_max_path==max_path){

second_max_path=1;

start=1;

}

for(i=start; i

if(seq_info[second_max_path][2]

}

}

}

if(counter>1)

counter=0;

while(sequence[max_path][counter+1]!=-1){

m[sequence[max_path][counter]][sequence[max_path][counter+1]]=true;

m[sequence[max_path][counter+1]][sequence[max_path][counter]]=true;

counter++;

}

counter=0;

longstart=0;

longfinish=0;

while(sequence[max_path][counter]!=-1){

if(node_count[sequence[max_path][counter]]==2){

// count how long the sequence is

start=counter;

while(node_count[sequence[max_path][counter]]==2){

counter++;

}

counter--;

finish=counter;

if((finish-start)>(longfinish-longstart)){

longstart=start;

longfinish=finish;

}

}

counter++;

}

if((longfinish-longstart)>0){

counter=longstart;

while(counter!=longfinish){

m[sequence[max_path][counter]][sequence[max_path][counter+1]]=false;

m[sequence[max_path][counter+1]][sequence[max_path][counter]]=false;

counter++;

}

}

}

private void spt() {

repaint();

int dist[], neigh[], closest, minDist, d;

dist = new int[n];

neigh = new int[n];

for (int i = 0; i < n; i++) {

dist[0] = distance(p[0].x, p[0].y, p[i].x, p[i].y);

neigh[0] = 0;

for (int j = 0; j < n; j++) {

m[i][j] = false;

m[0][j] = true;

}

}

}

private void sort_nodes() {

int neighbor;

for (int i = 0; i < n; i++) {

neighbor=0;

node_count[i]=0;

for (int j = 0; j < n; j++) {

if(m[i][j]==true){

nodelist[i][neighbor]=j;

neighbor++;

node_count[i]++;

}

}

nodelist[i][neighbor]=-1; // to denote end of node list

}

}

}

## Wednesday, April 8, 2009

### better look at better looks

### CONCLUSIONS

forming compact B-ary trees on different network topologies.

Experimentally, DBSPT-Circular shows an improvement in average-latency between 1.0% and 8.2% for the networks tested (this includes all sizes tested).

DBSPT-Circular-PO performs the best in terms of the bicriteria problem (as described earlier)for the average-latency and average-depth.

### . APPLICATIONS

or games. This can be applied in both wired and sensor networks.

## Monday, April 6, 2009

### get treated...

### DBSPT-CIRCULAR-PO ALGORITHM:

order, starting with the root. Any vertex encountered that has an out-degree < B is brought up to an out-degree of B by promoting a sub-tree. If the node being examined

is at level i, sub-trees rooted in levels greater than i + 2 are considered potential children. The promotion which causes the least increase to average-latency is the transfer enacted in the current tree. This procedure guarantees a final tree of minimum height, at the expense of increased average-latency.

### The entire DBSPT-Circular algorithm is presented as follows:

1: shortestPathTree (Vi, vi)

2: overloadedSet ÃŸ findOverloadedVertices (Vi )

3: level ÃŸ 1

4: while overloadedSet 6!= Ã†; do

5: curLevelSet ÃŸ nodesInLevel (level)

6: if overloadedSet Ã‡ curLevelSet 6! = Ã† ; then

7: Set fixed, toMove ÃŸ new Set

8: for all currentVertex ÃŽ curLevelSet do

9: if currentVertex ÃŽ overloadedSet then

10: The closest B children of currentVertex are

added to the fixed set, the rest are added to

the toMove set.

11: else if currentVertex.outDegree < B then

12: fixed.add( currentVertex )

13: end if

14: end for

15: for all moveVertex ÃŽ toMove do

16: Connect moveVertex to the closest vertex in

the fixed set that is also closer to the root.

17: if moveVertex can not be moved then

18: Swap moveVertex with a sibling that is farther

from the root than moveVertex.

19: end if

20: end for

21: else

22: level ÃŸ level + 1

23: end if

24: overloadedSet ÃŸ findOverloadedVertices( Vi )

25: end while

## Sunday, April 5, 2009

### colon cleansing...

## Wednesday, April 1, 2009

### India’s moon mission

It’s U.S.A, who first landed its footprint on the moon in 1969. That is one of the greatest achievement for America and a surprise for other countries at that time. After that America has achieved many things till now.

Now it has become India’s turn for a moon visit. India is not sending the man to the moon but only the rocket to the moon. It is the second nation in Asia to launch a moon mission after china. This mission is being supported by six other countries in which U.S.A plays an important role. This mission is planned to start on 22^{nd} of this month. And the chief official reported that the man will be sent to the moon by 2020.

Hope this mission ends in success. Have a nice day.