Java program for error detecting code using CRC-CCITT

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();…

Continue ReadingJava program for error detecting code using CRC-CCITT

Implement simple ESS and with transmitting nodes in wire-less LAN by simulation and determine the performance with respect to transmission of packets

#set ns simulator set ns [new Simulator] #open trace file set nt [open lab41.tr w] $ns trace-all $nt set topo [new Topography] $topo load_flatgrid 1000 1000 #open nam trace file…

Continue ReadingImplement simple ESS and with transmitting nodes in wire-less LAN by simulation and determine the performance with respect to transmission of packets

Implement an Ethernet LAN using n nodes and set multiple traffic nodes and plot congestion window for different source / destination

#Set ns simulation set ns [new Simulator] #Define color for data flows $ns color 1 Blue $ns color 2 Red #Open trace-file set tracefile1 [open lab3.tr w] set winfile [open…

Continue ReadingImplement an Ethernet LAN using n nodes and set multiple traffic nodes and plot congestion window for different source / destination

Implement transmission of ping messages/trace route over a network topology consisting of 6 nodes and find the number of packets dropped due to congestion

#Create a simulator object set ns [new Simulator] #Open a nam trace file set nf [open PING.nam w] $ns namtrace-all $nf #Open a trace file set nt [open PING.tr w]…

Continue ReadingImplement transmission of ping messages/trace route over a network topology consisting of 6 nodes and find the number of packets dropped due to congestion

Implement three nodes point – to – point network with duplex links between them. Set the queue size, vary the bandwidth and find the number of packets dropped

#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]…

Continue ReadingImplement three nodes point – to – point network with duplex links between them. Set the queue size, vary the bandwidth and find the number of packets dropped

java program to Design and implement the presence of Hamiltonian Cycle in an undirected Graph G of n vertices

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…

Continue Readingjava program to Design and implement the presence of Hamiltonian Cycle in an undirected Graph G of n vertices

Design and implement in Java program to find a subset of a given set S = {Sl, S2,…..,Sn} of n positive integers whose SUM is equal to a given positive integer d

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

Continue ReadingDesign and implement in Java program to find a subset of a given set S = {Sl, S2,…..,Sn} of n positive integers whose SUM is equal to a given positive integer d

Java program to implement Travelling Sales Person problem using Dynamic programming

import java.util.Scanner; class TSPExp { int weight[][],n,tour[],finalCost; final int INF=1000; TSPExp() { Scanner s=new Scanner(System.in); System.out.println("Enter no. of nodes:=>"); n=s.nextInt(); weight=new int[n][n]; tour=new int[n-1]; for(int i=0;i { for(int j=0;j {…

Continue ReadingJava program to implement Travelling Sales Person problem using Dynamic programming