OKlibrary  0.2.1.6
RandomClauseSets.mac
Go to the documentation of this file.
00001 /* Oliver Kullmann, 17.2.2008 (Swansea) */
00002 /* Copyright 2008 Oliver Kullmann
00003 This file is part of the OKlibrary. OKlibrary is free software; you can redistribute
00004 it and/or modify it under the terms of the GNU General Public License as published by
00005 the Free Software Foundation and included in this library; either version 3 of the
00006 License, or any later version. */
00007 
00022 /* The probability that a random assignment over the 
00023    variables in the given clause-set satisfies a random clause-set 
00024    drawn with the same number of clauses of the same lengths as the
00025    given clause-set. */
00026 /* Compare with logprobrand in
00027 ComputerAlgebra/Satisfiability/Lisp/Backtracking/DLL_solvers.mac. */
00028 probsatrand(F) :=
00029   block([L : listify(F)], product(1 - 2^(-length(L[i])),i,1,length(L)))$
00030 
00031