Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(a) Suppose a security code can be any string of five or fewer digits in length.

ID: 3871512 • Letter: #

Question

(a) Suppose a security code can be any string of five or fewer digits in length. How many security codes are there?

(b) A typical image on the internet is of size 640 × 480. (How many pixels does it contain?) Let's focus on images of a smaller size, say 10 × 10 (about the size of an alphabetic character on the screen). And let's assume there are just two possible colors for each pixel, black and white. Write a mathematical expression for the number of different possible black-and-white 10 × 10 images?

Explanation / Answer

a) As only digits are allowed i.e. from 0 to 9, and it can be of length from 1 to 5,

Number of security code of length 1 is 10

Number of security code of length 2 is 10*10

Number of security code of length 3 is 10*10*10

Number of security code of length 4 is 10*10*10*10

Number of security code of length 5 is 10*10*10*10*10

Total number of security code (Adding all) = 111110

b) Number of pixels are 640*480 = 307200 pixels

As every pixel can be black or white, and size of image is 10*10, so there are 100 pixels, and every can be either black or white, so we have two choices for every pixel.

Total number of possible images = 2*2*2*...100 times

=2^100