Scripts Index
Python Libraries and Modules  

Rabin-Miller probabilistic prime test

download download home home   report broken
important script information
company name:
code.activestate.com
license: Free
minimum requirements: Python
functional limitations:
Rabin-Miller probabilistic prime test description
In this script is included a method for performing the Rabin-Miller probabilistic test for a composite witness. Rabin-Miller test can only tell us if a value is definitely composite. In the case where a test value is not a witness for the compositeness of a potential prime, it can only lie with a probability of at most 1/4.

With this script, you can attempt to catch a liar over some number of trials, and the probability of us not catching at least one liar after k trials (if the number is not actually prime) is at most 4**-k.

Included is an algorithm for generating a number of b bits for which no composite witness was found after k trials. Removing mathematical rigor will suggest that the probability of the value being prime after k trials is at least 1-1/4**k.
Similar scripts
IPv4 address set type (Popularity: ) : IPv4 address set type script initializes an ip4range class.The constructor accepts an unlimited number of arguments that may either be tuples in the form (start,stop), integers, longs or strings, where start and stop in a tuple may also be of ...
Gather detailed system information on Mac OS X (Popularity: ) : This script uses the system_profiler application to retrieve detailed information about a Mac OS X system.There are two useful ways to use it: the first is to ask for a complete Python datastructure containing information about the system (see OSXSystemProfiler.all()) and ...
msoffice2ps Python Module (Popularity: ) : This Python module can be used for conversion of Microsoft Office documents to Postscript via an installed postscript printer driver. This module uses Microsoft Office and the installed postscript printer driver for the export. You can use this module to ...
Gather detailed system information on Ma (Popularity: ) : This script uses the system_profiler application to retrieve detailed information about a Mac OS X system.There are two useful ways to use it: the first is to ask for a complete Python datastructure containing information about the system (see OSXSystemProfiler.all()) ...
PyHtmlTable (Popularity: ) : Allows on-the-fly creation of HTML tables in Python. Similar to Table.pm or Table.php.
Numeric base converter (Popularity: ) : This is a traditional base converter with the twist that it accepts any strings as the digits for the input and output bases. Besides all the normal base-converts, you can now create compact versions of huge numbers by converting them ...
Memento design pattern in python (Popularity: ) : Memento design pattern in python script allows you to cache instances based on what arguments are passed to them.
cgi_buffer (Popularity: ) : A group of libraries that can be used to improve performance in your CGI scripts.
Generator for sequence operations (Popularity: ) : Permutations and combinations are often required in algorithms that do a complete search of the solution space. They are typically rather large so it's best not to compute them entirely but better to lazily generate them.This script uses Python generators ...
Null Object Design Pattern (Popularity: ) : This script is a sample implementation of the 'Null Object' design pattern. Roughly, the goal with Null objects is to provide an 'intelligent' replacement for the often used primitive data type None in Python or Null (or Null pointers) in ...
User reviews

Write a review:
1 2 3 4 5 6 7 8 9 10
1=poor 10=excellent
Write review*
Your name*
Email*
  (Comments are moderated, and will not appear on this site until the editor has approved them)
 
Similar Software
Mahjong Prime 3D (Popularity: ) : Are you ready to enjoy a whole new way to play and experience mahjong? Then you*ll love Mahjong Prime 3D - the last mahjong game you*ll ever need! <br /><br />***STUNNING GRAPHICS*** <br /><br />Mahjong Prime 3D features spectacular graphics ...
uCertify PrepKit for test 70-210 (Popularity: ) : Get one test free with this PrepKit!. Prepare for Microsoft's Installing, Configuring, and Administering Microsoft Windows 2000 Professional(M70-210) certification test. Use this PrepKit to be certified on MCP,MCSE,MCSA certifications. This PrepKit comes with Money Back Guarantee.
uCertify PrepKit for test 70-216 (Popularity: ) : Get one test free with this PrepKit!. Prepare for Microsoft&aposs Implementing and Administering a Microsoft Windows 2000 Network Infrastructure(M70-216) certification test. Use this PrepKit to be certified on MCP,MCSE,MCSA certifications. This PrepKit comes with Money Back Guarantee.
uCertify PrepKit for test 1D0-410 (Popularity: ) : Get one test free with this PrepKit!. Prepare for CIW's CIW Foundations(C1D0-410) certification test. Use this PrepKit to be certified on CIW certifications. This PrepKit comes with Money Back Guarantee.
uCertify PrepKit for test 220-221 (Popularity: ) : Get one test free with this PrepKit!. Prepare for CompTIA's A+ Core Hardware Service Technician(C220-221) certification test. Use this PrepKit to be certified on A+ certifications. This PrepKit comes with Money Back Guarantee.
uCertify PrepKit for test 220-222 (Popularity: ) : Get one test free with this PrepKit!. Prepare for CompTIA&aposs Operating System Technologies(C220-222) certification test. Use this PrepKit to be certified on A+ certifications. This PrepKit comes with Money Back Guarantee.
uCertify PrepKit for test IK0-001 (Popularity: ) : Get one test free with this PrepKit!. Prepare for CompTIA&aposs i-Net+(CIK0-001) certification test. Use this PrepKit to be certified on i-Net+ certifications. This PrepKit comes with Money Back Guarantee.
uCertify PrepKit for test N10-002 (Popularity: ) : Get one test free with this PrepKit!. Prepare for CompTIA&aposs Network+(CN10-002) certification test. Use this PrepKit to be certified on Network+ certifications. This PrepKit comes with Money Back Guarantee.
uCertify PrepKit for test SK0-001 (Popularity: ) : Get one test free with this PrepKit!. Prepare for CompTIA&aposs Server+(CSK0-001) certification test. Use this PrepKit to be certified on Server+ certifications. This PrepKit comes with Money Back Guarantee.
uCertify PrepKit for test 70-028 (Popularity: ) : Get one test free with this PrepKit!. Prepare for Microsoft&aposs Administering Microsoft? SQL Server? 7.0(M70-028) certification test. Use this PrepKit to be certified on MCP,MCDBA,MCSE certifications. This PrepKit comes with Money Back Guarantee.
ad


Rate me
supported os
All
stats
downloads 7
version 1.2
size in Kb
popularity   
796/372169
user rating 5/10
New Scripts
Popular Scripts
Latest Reviews