Thursday, April 23, 2009

health is wealth

Every one of us has to take care of our health. When we lose health, we will lose every thing no matter how much we earn and how much we spend. In particular, when it comes to seniors, we have to provide extreme care to their health. They might get illness any time. There fore, we must take their health in to consideration and provide proper supervision. Here is a site that offers various medicare supplemental plans. If you do not know about How to apply to medicare part D, you can learn from the link given over here. You can also have a look at AARP Medicare Drug Plan which helps you to keep your health stable and healthy. The web site I have mentioned over here are senior related web site for the individuals who are sixty two years older and for the people who are older than that. This web site focuses on educating the senior citizens about various maedicare and the medicaid plans available.

Wednesday, April 22, 2009

Improper sleep affects the liver

Most of us don’t sleep in the proper time. This is due to various reasons and the main reason is our work tension. Some people have the habit of finishing their office work at home, which makes them to sleep late at night. In a recent study, the scientists have found that the late night sleep is the main reason for the liver diseases. By sleeping like this, the toxic substance in the human body gets accumulated and affects our health. It not only affects the health, but also spoils the mood. As a result, the next day we are working with some stress.
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

Most of the people in this world have faith in God. They believe that, almighty will solve all their problems and pains. It has been proved now. England scientists has done a new research and found that the spiritual people have a little pain or can be able to tolerate their pain when compared to atheists. Yes the oxford university researchers had done this. They have done the experiment with the help of 12 Rome Catholics and 12 atheists. The Catholics had given the photo of mother Mary and been asked to meditate thinking about God. The atheists had given some other photo of the davinci. Then the electric shock has been given to them. The Catholics had experienced a less pain in this shock treatment. During this process the activities of the back brain also has been measured, which favors the Catholics. From this, England scientists had arrived at a conclusion that, spiritual people have less pain. So all of us should fear the Almighty God and he is the one who can do magic in our life. I wish he gives all the happiness and joy to all his followers.

Happiest days

A person in his life time, comes through various stages, from childhood to old age. In his lifetime the most enjoyable period for a man is his teenage. And I am also not an exception. These are the days when one can enjoy his life to the fullest without any worries and responsibilities. After then, his life will be completely changed and he will get the social responsibility. There are some colleges which restrict their students with severe rules, which is a stopping stone for their happier life. But I am fortunate that I had my graduation in good college which allows us to be free. Now its all over and only memories lasts.

Tuesday, April 21, 2009

market, get benefit...

Hi every body. I am here to share news about the best dental marketing people I have ever known. Hope you people know about the impact of marketing in any business. Marketing is the back bone of any service. Read more to get to know more. No matter how big or how small your business is, you really need to concentrate in the way you market your service or your product. When it comes to health constraints, we have to be very choosy about our marketing strategy. Here comes the finest Dental Marketing crew who create unique works that portrays your dental work in the best way which can not be seen else where. They do both marketing design and marketing print works that supports your firms to achieve your goal. If you are searching for the best and a unique marketing strategy work for your firm, you need to approach them to make your work well done.

Monday, April 20, 2009

folder guard

we many times might have thought to our privacies in the computer especially when the computer is being shared by many...so in order to protect our secrets in the computer here comes the software...with this software you can set password for the folders in which the secret informations are available.

Vande mataram

This is work done by the Indian air force on the 15th august, the Independence day of India. Really this is a fantastic work and I like it very much.

cool picture

Do you find audience or the buildings???

Sunday, April 19, 2009

Flag store

Hi good evening everybody. Flag is the first thing that comes to our mind while representing patriotism. Now there are many online stores selling these flags. Yesterday while browsing the internet, I came across the American flag website which is selling these types of American flags. They have the flags at all sizes. They also have the flagpoles for hosting the flags. The size of the flagpoles varies from 5 feet to 100 feet. After surfing for the same type of flagpoles and flags in various websites, I found these flags and flagpoles are far cheaper. You cannot have the same flagpole for every location. These flagpoles are different for various locations like street, indoor, and residential areas. They have flagpoles for all these types of locations. They also have flags for all the states in America and also for some international countries. By surfing through their website I also made one purchase of this car flag. I hope you will also like doing the shopping here. Have a nice day.

Wednesday, April 15, 2009

play online

I would like to make it short and simple. If you a looking for USA Casinos , you can play them online now through a web site which is given right here in this post. Through this USA Casino Online, you can play your all time favorite casino games sitting right at your place and you can win as many games as you play. This web site offers Online Casinos for USA Players who has the passion to win in casinos. If you are one among them, then this web site is absolutely for you. Try it out and win the game. Life is for a player who plays to win the game. Be one.

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...

Internet has taken a major role in every one’s life today. Web sites have become a part of our life. We need to have a web site to be updated and we need to look at web sites to get updated about the latest news and information. I was about to start a web site for my self and so I searched for webhosting company. Web hosting is nothing but designing and creating a web site for a particular or general purpose. Right from the planning stage to the output stage, one should take on a web site. The web hosting company which I have found serves the best and they have got lot of awards for being the best web hosting company and for being the cheapest web hosting people. I am planning to create my own web site through them. I am very confident that they will make me the best one. You too can visit their site and know about them more.

Monday, April 13, 2009

interesting facts

Your skeleton keeps growing until you become 35 years old. Then it starts to shrink.
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

nice pictures

How many pillars are there?

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

Hi every body. I would like to talk about few things about economics and reverse mortgage. In the world today, even a kid knows the words like lay off, pay cut, unemployment and very importantly recession and economy crisis. People are going mad since they have no potential to support their life. As you can see the world history, whenever there is a gap for any thing, there would be some thing which is ready to fill the gap. Like the same way, even the economic recession made a gap in all our lives and there is some thing called reverse mortgages which is ready to fill the gap and ensure us not only an ordinary normal life, but a better life. In particular, the life has become very much insecure for the senior citizens. There fore, we have to bring them a potential back ground which gives them a moral support and a hand to lead their life without any economical problems. I would like to suggest them medicare supplemental insurance which ensures them an insurance for their health and so they need not to worry about their health issues. On the whole, this reverse mortgage is a timely helper for all of us. It is up to us to make use of it or spoil our life by not taking it.

java code

import java.util.*;
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 for(int j=0; j m[i][j]=false;
}
}


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 for(int j=0; j m[i][j]=false;
}
}

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 if(node_count[i]==1){
ends[counter]=i;

counter++;
}
}
num_ends=counter;


seq=0;


for(i=0; i sequence[i][0]=-1;
}

for(i=0; i seq_info[i][0]=1000;
seq_info[i][1]=1000;
seq_info[i][2]=1000;
}



for(p=0; p

for(i=0; i for(j=0; j Vm[i][j]=m[i][j];
}
}


for(i=0; i Vnode_count[i]=node_count[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 num_bin[i]=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 counter=0;
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 for(j=0; j if(i!=j){
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 if(seq_info[i][0]<900)
counter++;
}



max_path=0;
for(i=0; i if(seq_info[i][0]<900) {
if(seq_info[max_path][2] max_path=i;
}
}


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[i][0]<900 && i!=max_path) {
if(seq_info[second_max_path][2] second_max_path=i;

}
}
}



if(counter>1)

for(i=0; i for(j=0; j m[i][j]=false;
}
}


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 if(node_count[i]==1){
ends[counter]=i;

counter++;
}
}
num_ends=counter;


seq=0;


for(i=0; i sequence[i][0]=-1;
}

for(i=0; i seq_info[i][0]=1000;
seq_info[i][1]=1000;
seq_info[i][2]=1000;
}



for(p=0; p

for(i=0; i for(j=0; j Vm[i][j]=m[i][j];
}
}


for(i=0; i Vnode_count[i]=node_count[i];
}





sequence[seq][0]=0;
active_node=ends[p];



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


for(i=0; i num_bin[i]=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 counter=0;
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 for(j=0; j if(i!=j){
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 if(seq_info[i][0]<900)
counter++;
}


max_path=0;
for(i=0; i if(seq_info[i][0]<900) {
if(seq_info[max_path][2] max_path=i;
}
}


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[i][0]<900 && i!=max_path) {
if(seq_info[second_max_path][2] second_max_path=i;

}
}
}


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

We can see in the world today that many people are very much concerned about their beauty and looks. One of the major beauty problems of the present days are acne. Many people are affected by acne and they did not get a proper remedy to get rid of acne problem. Here is the remedy. Here is a site that explains you about acne face wash and many other stuff. You can learn lot of information about acne wash which is present in the market today. In addition to this, there are experts and consumers who give their reviews and opinions about various acne treatments available. It is not over yet. You can also get information about the highest rated acne wash. By the help of this, you can choose the best treatment and make your self healthy, stylish and better. Every one will like us if we have good looks. Let us look at the good news and get good looks.

CONCLUSIONS

This work provides an empirical study of existing and new algorithms for the degree-bounded minimum spanning tree problem with a focus on improving the result for average-latency within the constraint of tree compactness. We have presented a new algorithm for approximation of degree-bounded minimum spanning trees with and without hop (tree depth) constraints. Of the three algorithms tested, DBSPT-Circular-PO delivers the best result for the criteria of average-latency and maximum hop count while
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

The application of multicasting includes real time multicast services, such as DV (Digital Video) program multicasting service or interactive multi-party multimedia conferences
or games. This can be applied in both wired and sensor networks.

Monday, April 6, 2009

get treated...

I have asked my friend for Acne Treatment recently. He suggested me a web site where I can get lot of details about acne and the treatment given for acne. I visited the site and I got lot of reviews, information and much other informative stuff which are said by experts and the consumers who have already under went the treatments. In addition to this, I have also found some interesting news which discusses about the best treatments for acne and the best prices for the treatment. By this, you can get a clear picture about the various acne treatments available and you can also choose the one which well suits for your requirement and health condition. Staying fit is always good and every one of us wants to be stay fit. Just check out the site and you will be one among those who stay fit for ever and stay healthy for ever. Cheers.

DBSPT-CIRCULAR-PO ALGORITHM:

The DBSPT-Circular-PO algorithm is an extension to the DBSPT-Circular algorithm in which the tree is forced to be of minimum possible height, logB n. The PO in this algorithm name stands for post optimization. After the DBSPT-Circular algorithm has completed, the tree is compacted by examining the tree in breadth-first search
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:

Algorithm for DBSPT-Circular (Vi, Vi, B):

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...

Many of us would have heard a proverb which goes like, "face is the index of the mind". I would like to add few more words to it. Skin is the index of our age and health. Many people are affected by skin problems. I have a solution for their skin problems. You can go for colon cleansing, which makes your skin enlighten and stay cool for ever. You can get the colon cleanser online and clean your colons. In the web site which I have mentioned here, you can get lot of information about colons and the cleaning methods of colons. You can also get knowledge about the functions of colon cleanser and you can avail the best quality and best rated colon cleanser in the web site. Please do visit once and you will get to know about the best colon cleanser that is available in the market. Clean the colons and stay young always.

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 22nd 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.





my traffic rate




Hire Me Direct
 
ss_blog_claim=47b8cd0f86a684cfdfc7f370edf4619d