## Java Program to Perform Optimal Parenthesize using Dynamic Programming

This is a java program to perform optimal paranthesization by making use of dymanic programming. This program determines the order in which the chain of matrices should be multiplied. Here is the source code of the Java Program to Perform Optimal Paranthesization Using Dynamic Programming. The Java program is successfully compiled and run on a … Read more

## Java Program to Perform Arithmetic Operations without Data Type

This is a java program to perform arithmetic operations on numbers which are greater than size of the integers. Here is the source code of the Java Program to Perform Arithmetic Operations on Numbers of Size Greater than that of Int Without Using any Data Type of Size Greater than Int. The Java program is … Read more

## Java Program to Compute Discrete Fourier Transform using Naive Approach

This is the java implementation of Naive DFT approach over function. Formula for calculating the coefficient is X(k) = Sum(x(n)*cos(2*PI*k*n/N) – iSum(x(n)*sin(2*PI*k*n/N)) over 0 to N-1. This approach tries to many transforms using different values of k from 0 to N-1. Here is the source code of the Java Program to Compute Discrete Fourier Transform … Read more

## Java Program to Solve Any Linear Equation in One Variable

This is a java program to solve a linear equation in one variable. Here is the source code of the Java Program to Solve any Linear Equation in One Variable. The Java program is successfully compiled and run on a Windows system. The program output is also shown below. //This is a java program to … Read more

## Java Program to Implement the Schonhage-Strassen Algorithm for Multiplication

This is a sample program to multiply two given numbers using Schonhage-Strassen Algorithm. Suppose we are multiplying two numbers like 123 and 456 using long multiplication with base B digits, but without performing any carrying. The result might look something like this: 0 1 2 3 × 4 5 6 ——————— 00 00 06 12 … Read more

## Java Program to Optimize Wire Length in Electrical Circuit

This is a java program to find the optimized wire length between any two components in an electric circuits. This problem is similar to the problem of finding the shortest path between any two cities in the state. A simple Dijkstra’s algorithm would result in providing the shortest wire length between any two components in … Read more

## Java Program to Implement Naor-Reingold Pseudo Random Function

This is a java program generate pseudo-random numbers using Naor-Reingold Pseudo-Random function. Let p and l be prime numbers with l |p-1. Select an element g in Fp of multiplicative order l. Then for each n-dimensional vector a = (a1, …, an). Fa(x) = g^(a1^x1 * a2^x2 …). Here is the source code of the … Read more

## Java Program to Perform Partition of an Integer in All Possible Ways

This is a java program to perform partition of an integer in all possible ways. Every partition when added should result in the given integer. Here is the source code of the Java Program to Perform Partition of an Integer in All Possible Ways. The Java program is successfully compiled and run on a Windows … Read more

## Java Program to Generate Random Numbers using Multiply with Carry Method

This is the java implementation of Multiply With Carry (MWC) algorithm to generate a set of random numbers. The main advantages of the MWC method are that it invokes simple computer integer arithmetic and leads to very fast generation of sequences of random numbers with immense periods. The formula it uses is, x(n) = (a*x(n-r) … Read more