Java Program to Compute Discrete Fourier Transform using Fast Fourier Transform Approach

This is the java implementation of performing Discrete Fourier Transform using Fast Fourier Transform algorithm. This class finds the DFT of N (power of 2) complex elements, generated randomly, using FFT. Further verification is done by taking the Inverse Discrete Fourier Transform, again using FFT. Here is the source code of the Java Program to … Read more

advertisement

Java Program to Solve the Fractional Knapsack Problem

This is a java program to implement a standard fractional knapsack problem. It is an algorithmic problem in combinatorial optimization in which the goal is to fill a container (the “knapsack”) with fractional amounts of different materials chosen to maximize the value of the selected materials. Here is the source code of the Java Program … Read more

advertisement

rand() and srand() Functions in Java

This is a java program to generate random numbers using rand() and srand() functions. Java provides Random class that generates a random numbers. rand() gives long random numbers. srand() provides unique numbers. Here is the source code of the Java Program to Use rand and srand Functions. The Java program is successfully compiled and run … Read more

advertisement

Java Program to Generate Random Numbers Using Probability Distribution Function

This is a java program to generate random numbers using a probability distribution. Probability distribution is based on probability density function. a probability density function (pdf), or density of a continuous random variable, is a function that describes the relative likelihood for this random variable to take on a given value. The probability of the … Read more

advertisement

Java Program to Solve Knapsack Problem Using Dynamic Programming

This is java program to implement Knapsack problem using Dynamic programming.Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. Consider all subsets of items and calculate the total weight and value of all subsets. Consider the only subsets whose … Read more

advertisement

Java Program to Solve the 0-1 Knapsack Problem

This is java program to implement 0/1 Knapsack problem. The knapsack problem or rucksack problem is a problem in combinatorial optimization: Given a set of items, each with a mass and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to … Read more

advertisement

Java Program to Solve Any Linear Equations

This is java program to solve the system of linear equations. This can be done by first representing equations(vectors) to matrix form, then finding the inverse of the matrix formed by the coefficients of variable and multiplying it with constants. Here is the source code of the Java Program to Solve any Linear Equation in … Read more

advertisement

Java Program to Implement Wheel Sieve to Generate Prime Numbers

This is java program to implement Wheel Seive method to generate the prime numbers from 2 to the given limit. This algorithm reduces the time by checking only till n^2. Here is the source code of the Java Program to Implement wheel Sieve to Generate Prime Numbers Between Given Range. The Java program is successfully … Read more

advertisement

Java Program to Generate Random Numbers in a Range

This is java program to generate the random numbers, in the range given by the user. Range could be any numbers of size integer supported by Java. Here is the source code of the Java Program to Generate Randomized Sequence of Given Range of Numbers. The Java program is successfully compiled and run on a … Read more

advertisement

Java Program to Implement Park-Miller Random Number Generation Algorithm

This is java program to generate the random numbers, using the Park-Miller algorithm.Park–Miller random number generator (after Stephen K. Park and Keith W. Miller), is a variant of linear congruential generator (LCG) that operates in multiplicative group of integers modulo n. A general formula of a random number generator (RNG) of this type is, x(n+1) … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.