Compute the relative margin in time and space O(T^3) where T is the length of the characteristic string. See Appendix A of the paper for reference.
Naively computing these probabilities on a set of size 2^T would take time/space exponential in T.
Saad Quader and Alexander Russell
The code is in C++. The following files should be built as executables:
forkability_table.cppprob_forkable.cpp
Look at the comments around the main() function in each file. They are fairly self-explanatory.
The file prob_forkable.cpp, when built into an executable, is an interactive program which asks for
N, a positive integer, the length of the characteristic stringw = w_1 ... w_NR, a positive integer, the maximum reach allowed in computation, andeps, a real between 0 and 1, so thatPr[w_i = 1] = (1 - eps)/2independently for eachi = 1, ... , N. It outputs an upper bound onPr[w is forkable].
The file forkability_table.cpp, when built into an executable, is an interactive program which requests an output file name and then reproduces the table in Appendix A of the paper. Look in the main() function to see which values of N, eps, and R are being used.
If building on Windows, the header win_mem_leak.h helps detect memory leak, if any.