/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Q34E On page 38, we claimed that sinc... [FREE SOLUTION] | 91Ó°ÊÓ

91Ó°ÊÓ

On page 38, we claimed that since about a 1nfraction of n-bit numbers are prime, on average it is sufficient to draw O(n)random n -bit numbers before hitting a prime. We now justify this rigorously. Suppose a particular coin has a probability p of coming up heads. How many times must you toss it, on average, before it comes up heads? (Hint: Method 1: start by showing that the correct expression is∑i=1∞i(1-p)i-1p . Method 2: if E is the average number of coin tosses, show that E=1+(1-p)E).

Short Answer

Expert verified

1ptimes the coin must be tossed on average before it comes up heads.

Step by step solution

01

Explain the given information

Consider that,P is the Probability of a coin to show up heads. Let,X be the number of times the coin should be tossed before outcome is head. The following equation is used to find the average number of coin tossed:

E(X)=∑I=1∞i×P(i)

02

Calculate, how may time the coin must be tossed on average, before it comes up heads.

Consider that i-1times the coins were thrown , and the ith throwis a head. The probability of this event occurring is ,

pi=1-pi-1p

The number of time the coin must be tossed on average can be calculated as follows,

E=∑i=1∞i×PIE=∑i=1∞i1-pi-1p1-pE=∑i=1∞i1-pip

Simplify further,

localid="1659237715633" E-(1-p)E=p+∑i=1∞1-pip=p+(1-p)pp=1

Find as follows,

E-1-pE=1E-E+pE=1pE=1E=1p

Therefore, 1ptimes the coin must be tossed on average before it comes up heads.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with 91Ó°ÊÓ!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Prove or disprove: If a has an inverse modulo b, then b has an inverse modulo a.

1.38. To see if a number, say 562437487, is divisible by 3, you just add up the digits of its decimalrepresentation, and see if the result is divisible by role="math" localid="1658402816137" 3.

( 5+6+2+4+3+7+4+8+7=46, so it is not divisible by 3).

To see if the same number is divisible by 11, you can do this: subdivide the number into pairs ofdigits, from the right-hand end(87,74,43,62,5) , add these numbers and see if the sum is divisible by11 (if it's too big, repeat).

How about 37? To see if the number is divisible by 37, subdivide it into triples from the end(487,437,562) add these up, and see if the sum is divisible by37 .


This is true for any prime pother than2 and 5. That is, for any prime ±è≠2,5, there is an integer rsuch that in order to see ifp divides a decimal number n, we breakn into r-tuples of decimal digits (starting from the right-hand end), add up these r-tuples, and check if the sum is divisible by p.

(a) What is the smallest rsuch for p=13? Forp=13 ?

(b) Show thatr is a divisor of p-1.

Quadratic residues. Fix a positive integer N. We say that a is a quadratic residue modulo N ifthere exists a such that a≡x2modN.
(a) Let N be an odd prime and be a non-zero quadratic residue modulo N. Show that there are exactly two values in{0,1,....,N-1} satisfying x2≡amodN.
(b) Show that if N is an odd prime, there are exactly(N+1)2 quadratic residues in {0,1,...,N-1}.
(c) Give an example of positive integers a and N such thatx2≡amodNhas more than two solutions in {0,1,...,N-1}.


Show that in any base b≥2, the sum of any three single-digit numbers is at most two digits long.

How many integers modulo113 have inverses?(Note:113=1331)

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.