java program for congestion control using leaky bucket algorithm
The main concept of the leaky bucket algorithm is that the output data flow remains constant despite the variant input traffic, such as the water flow in a bucket with…
The main concept of the leaky bucket algorithm is that the output data flow remains constant despite the variant input traffic, such as the water flow in a bucket with…
The RSA algorithm can be used for both public key encryption and digital signatures. Its security is based on the difficulty of factoring large integers.The RSA algorithm’s efficiency requires a…
import java.util.*; import java.net.*; import java.io.*; public class udpserver { public static void main(String args[]) { DatagramSocket aSocket=null; Scanner scan=new Scanner(System.in); int ServerPort=999; System.out.println("Server ready n Waiting for connectionn"); try…
import java.util.*; import java.net.*; import java.io.*; public class tcpserver { public static void main(String[] args) { try { ServerSocket s=new ServerSocket(998); System.out.println("Server Readynwaiting for connection ....."); Socket s1=s.accept(); DataOutputStream dos=…
Distance Vector Algorithm is a decentralized routing algorithm that requires that each router simply inform its neighbors of its routing table. For each network path, the receiving routers pick the…
import java.util.*; public class Crc { public static int n; public static void main(String[] args) { Scanner in=new Scanner(System.in); Crc ob=new Crc(); String code, copy, rec,zero="0000000000000000"; System.out.println("Enter message"); code=in.nextLine(); n=code.length();…
#set parameters set stop 100 #topology set type umts #AQM parameters set minth 30 set maxth 0 set adaptive 1 #traffic generation set flows 0 set window 30 #plotting statistics…
#Create a simulator object set ns [new Simulator] #Open a trace file set nt [open lab1.tr w] $ns trace-all $nt #Open a nam trace file set nf [open lab1.nam W]…
import java.util.*; class Hamiltoniancycle { private int adj[][],x[],n; public Hamiltoniancycle() { Scanner src = new Scanner(System.in); System.out.println("Enter the number of nodes"); n=src.nextInt(); x=new int[n]; x[0]=0; for (int i=1;i x[i]=-1; adj=new…
import java.util.Scanner; import static java.lang.Math.pow; public class subSet { /** * @param args */ void subset(int num,int n, int x[]) { int i; for(i=1;i