New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Discrete Math Notes - April 12, 14

by: Aaron Maynard

Discrete Math Notes - April 12, 14 CS 2305

Marketplace > ComputerScienence > CS 2305 > Discrete Math Notes April 12 14
Aaron Maynard
GPA 3.5

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

These note cover: Pseudo - Random Number Generator Fermat's Little Theorem Probability Primality Test
Discrete Math for Computing I
Timothy Farage
Class Notes
Math, Descrete, Computer Science, stem
25 ?




Popular in Discrete Math for Computing I

Popular in ComputerScienence

This 2 page Class Notes was uploaded by Aaron Maynard on Monday April 18, 2016. The Class Notes belongs to CS 2305 at a university taught by Timothy Farage in Spring 2016. Since its upload, it has received 28 views.

Similar to CS 2305 at University

Popular in ComputerScienence


Reviews for Discrete Math Notes - April 12, 14


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 04/18/16
DISCRETEMATH SPRINGSEMESTER2016 INSTRUCTOR:DR.TIMFARAGE 12-14 APRIL 2016 Pseudo - Random Number Generator Linear Congruence Method A method for generating random (pseudorandom) numbers using the linear recurrence relation: where a and c must assume certain fixed values, m is some chosen modulus, and X_0 is an initial number known as the seed. Using examples m=9, a=7, c=4, ann​5: n+1​7xn​4)mod9 xn​ 5 -> xn​ 5 Fermat's Little Theorem The theorem is sometimes also simply known as "Fermat's theorem" P-1​ If P>2 is prime, and 1<B<P, then B​modP = 1; OR If P is a prime number, then for any integer A, the nu− A is an integer multiple of P. 1 Proof: Start by listing t​-1 positive multiplea:of ​ a, a,3a, .p​-1a​ Suppose thatraandsa​are the same modulp, then we havr=s​(mod p), so tp-1​ multiples a​above are distinct and nonzero; that is, they must be congruent to 1, 2, 3, ..p-1 in some order. Multiply all these congruences together and we find a2​​3a..p-1a​= 123..(​1) (modp) or bettea​ (p-1) =p-1)! (mop). Divide both sidp-1) to complete the proof. Probability Primality Test A primality test: an algorithm which determines whether a given number is prime. (a)​/2)​ if b is even and b > 0 a​= a*(a)​b-1)if b is odd 1 if b = 0 Miller-Rabin Primality Test If p is prime and x2 = 1 ( mod p ), then x = +1 or -1 ( mod p ). We could prove this as follows: x​= 1 ( mod p ) x​- 1 = 0 ( mod p ) (x-1)(x+1) = 0 ( mod p ) Solovay-Strassen Primality Test 2


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Jennifer McGill UCSF Med School

"Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over $500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.