I don't really hope to get an answer but I think of this more like a brainstorm so give you're best idea please :)
So I want to make a program that makes permutations of all the ASCII characters, and I can't connect 1000 computer to calculate this because unfortunately I have only one computer so I need some kind of algorithm to speed up the process.
I made the algorithm to find the possible combinations but I look online and it will take more then 100 years. PLEASE HELP.
This is the code to find permutations (it doesn't find all ASCII character permutations, but has a string with all letters and numbers and from that string he makes the permutations):
import java.io.*;
public class doIt extends AI {
public void check() {
String letters = "qwertzuioplkjhgfdsayxcvbnm0123456789-_";
permute(letters);
}
public void permute(String letters) {
int length = letters.length();
boolean[] used = new boolean[length];
StringBuffer str = new StringBuffer(length);
permutation(str, letters, used, length, 0);
}
public void permutation(StringBuffer str, String letters, boolean[] used, int length, int position) {
if (position == length) {
try {
File one = new File("G:/AllDateBases/Combinations.txt");
PrintWriter pw = new PrintWriter(new FileWriter("G:/AllDateBases/Combinations.txt", true));
pw.println(str.toString());
pw.close();
} catch (IOException e) {
System.out.println("Error");
}
return;
} else {
for (int i = 0; i < length; i++) {
if (used[i]) continue;
str.append(letters.charAt(i));
used[i] = true;
permutation(str, letters, used, length, position + 1);
str.deleteCharAt(str.length() - 1);
used[i] = false;
}
}
}
}