Saturday, March 26, 2011

Dijk's Algorithms in Java

/*Implemented Dijk algo in Java.
*Here I have given simple static example...but you can make it dynamic by removing comment.
*
*/import java.io.*;

public class Dijk {
public static void main(String[] arg) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int i, j, k, nodes;
// int[][] adjMat = new int[10][10];
//
//
//
// System.out.println("Enter No of Nodes");
// nodes = Integer.parseInt(br.readLine());
// for (i = 0; i < nodes; i++) {
// for (j = i + 1; j < nodes; j++) {
// System.out.println("Is there Edge between node " + (i + 1) + "and node " + (j + 1) + " (1=yes)/(0=no)");
// int b = Integer.parseInt(br.readLine());
// if (b == 0) {
// adjMat[i][j] = 0;
// adjMat[j][i] = 0;
// continue;
// } else {
// System.out.print("Enter weight between node " + (i + 1) + "and node " + (j + 1) + ":");
// adjMat[i][j] = Integer.parseInt(br.readLine());
// adjMat[j][i] = adjMat[i][j];
// }
// }
// }
nodes = 5;
int[][] adjMat = {{0, 50, 30, 100, 10},
{50, 0, 5, 20, 0},
{30, 5, 0, 50, 0},
{100, 20, 50, 0, 10},
{10, 0, 0, 10, 0}};
k = 0;
int[][] D = new int[2][nodes];
//int[] cost = new int[nodes];
System.out.println("Enter Staring node from the range 1 to" + nodes);
int st = Integer.parseInt(br.readLine());
for (i = 0; i < nodes; i++) {
if ((i + 1) == st) {
continue;
} else {
D[k][i] = i;
if (adjMat[st - 1][i] > 0) {
D[k + 1][i] = adjMat[st - 1][i];
} else {
D[k + 1][i] = 9999;
}
}
}
int[][] finalCost = new int[2][nodes];
printD(D,nodes);
for (i = 0; i < nodes-1; i++) {
int index = findminIndex(D, nodes);
System.out.println("Min Index "+index);
int cost = findminCost(D, nodes);
System.out.println("Min Cost "+cost);
for (j = 0; j < nodes; j++) {
if (j == index) {
D[0][j] = 0;

continue;
} else {
if (((adjMat[index][j] + cost) < D[1][j]) && adjMat[index][j]>0) {
D[1][j] = adjMat[index][j] + cost;
} else {
continue;
}
}
}
copyD(D,finalCost,nodes,index,st);
st=index;
D[1][index]=0;
printD(D, nodes);
}
 
// for (i = 0; i < nodes; i++) {
// if (D[0][i] == index) {
// D[0][i] = 0;
// }
// }
// printD(D, nodes);
printD(D, nodes);
for(i=0;i<2;i++)
{
for(j=0;j
System.out.print((finalCost[i][j]) + " ");
System.out.println();
}
} catch (Exception e) {
e.printStackTrace();
}
}
private static void printD(int[][] D, int nodes) {
for (int i = 0; i < 2; i++) {
for (int j = 0; j < nodes; j++) {
System.out.print(D[i][j] + " ");
}
System.out.println("");
}
}
private static int findminIndex(int[][] D, int nodes) {
int index = 0, min = D[1][1];
for (int i = 1; i < nodes; i++) {
if (min > D[1][i] && D[1][i]!=0) {
min = D[1][i];
index = i;
}
}
return index;
}
private static int findminCost(int[][] D, int nodes) {
int min = D[1][1];
for (int i = 1; i < nodes; i++) {
if (min > D[1][i] && D[1][i]!=0) {
min = D[1][i];
}
}
return min;
}

private static void copyD(int[][] D, int[][] finalCost,int nodes,int index,int st) {
for(int i=0;i
{
if(D[1][i] != 0)
{
finalCost[1][i] = D[1][i];
}
}
finalCost[0][index] = st;
}
}

Sunday, November 29, 2009

Delay Tolerant Network - The Evolving Interplanetary Internet

This document describes architecture for delay-tolerant networks, and is a generalization of the architecture designed for the Interplanetary Internet.


A communication system to provide Internet-like services across interplanetary distances in support of deep space exploration. This generalization addresses networks whose operational characteristics make conventional networking approaches become either unworkable or impractical. We define a message-based overlay that exists above the transport layer of the networks on which it is hosted. The draft presents an architectural overview followed by discussions of services, topology, routing, security, reliability, state management, and end-to-end information exchange

Unlike TCP/IP on Earth, the DTN does not assume a continuous end-to-end connection. In its design, if a destination path can't be found, the data packets are not discarded. Instead, each network node keeps custody of the information as long as necessary until it can safely communicate with another node. This is called store-and-forward method.

 
The DTN architecture is conceived to relax most of Internet architecture assumptions, based on a number of design principles that are summarized here:


• Use variable-length (possibly long) messages (not streams or limited-sized packets) as the communication abstraction to help enhance the ability of the network to make good scheduling/path selection decisions when possible.

• Use a naming syntax that supports a wide range of naming and addressing conventions to enhance interoperability.

• Use storage within the network to support store-and-forward operation over multiple paths, and over potentially long timescales (i.e., to support operation in environments where many and/or no end-to-end paths may ever exist); do not require end-to-end reliability.

• Provide security mechanisms that protect the infrastructure from unauthorized use by discarding traffic as quickly as possible.

• Provide coarse-grained classes of service, delivery options, and a way to express the useful lifetime of data to allow the network to better deliver data in serving the needs of applications.

InterPlanetary Internet

The objective of the Interplanetary Internet project is to define the architecture and protocols necessary to permit interoperation of the Internet resident on Earth with other remotely located internets resident on other planets or spacecraft in transit.




This document describes the Interplanetary Internet: a communication system to provide Internet-like services across interplanetary distances in support of deep space exploration.



Approaches of Interplanetary Internet, which we refer to as bundling, builds a store-and-forward overlay network above the transport layers of underlying networks. Bundling uses many of the techniques of electronic mail, but is directed toward interprocess communication, and is designed to operate in environments that have very long speed-of-light delays. The Interplanetary Internet must be robust enough to withstand delays, disruptions and disconnections in space.







Fundamental architecture of the Interplanetary Internet is to picture a network of internets. Ordinary internets (many being wireless in nature) are placed on the surface of moons and planets as well as in free-flying spacecraft. These remotely deployed internets run ordinary Internet protocols. A system of Interplanetary Gateways connected by deep-space

Transmission links form a backbone communication infrastructure that provides connectivity for each of the deployed internets. New long haul protocols, some confined to the backbone network and some operating end-to-end, allow the deployed internets to communicate with each other.



There are mainly five areas in the Interplanetary Internet architecture:



• The communication conducted between independent internets

(Termed "Inter-internet dialogs")



• The architecture and functions of the unique nodes of the

Interplanetary Internet



• A security architecture for meeting anticipated data and Infrastructure protection needs



• The issues in developing a stable backbone network for the Interplanetary Internet



• The issues in deploying internets on remote planets, asteroids, and spacecraft



Application of InterPlanetary Internet:

• Delay Dependent Networks

• Sensor Networks

• Military Tactical Networks

• National Emergency Communication Infrastructure

• 24/7 Health Monitoring of Remotely Located Patients

• Mobile Medical Networks

Wednesday, August 5, 2009

Destroy any website

Destroy any website go: http://netdisaster.com/ .
you can destroy any home page.

CRACK BIOS PASSWORD

CRACK BIOS PASSWORD :
1. Open CPU.
2. Remove Semos (Silver) Battery.
3. After 2 mins.
4. Place the Battery again.

Get Videos on Wireless N/W

Get all videos on wireless networking (wifi, wimax)
from www.trainsignal.com

Learn Web Designing

Learn web desinging from video tutorial of lyanda get
it free from http://www.mininova.org/net/24405