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

CPS 341 HOMEWORK 5 Due at class time, in class, Tuesday, 20 March, 2018 . You mu

ID: 3731099 • Letter: C

Question

CPS 341 HOMEWORK 5 Due at class time, in class, Tuesday, 20 March, 2018 . You must explain your answers. If you simply write down some ex- pression as answer, then you will receive no credit for that problem If the answer is something ike 154 x 206, you may leave it as it is There is no need to compute the values of these expressions . You can always verify your answers on "smaller problems" » Remember that either .. or means either .. or.. or both . You may approach the problems by "appropriately building an object of interest" in multiple steps. Use "principle of inclusion and exclusion" where needed (1) (30 pts) The company Bi-Supermaz wants to help UD set up two factor authentication: as you know you will have to provide an additional identification on the top of your password to have access. Your addi tional identification is a passcode, an eight-digit string. Here are some passcodes: 22920154, 00287677, and 99998888 Further, a digit is even if it is a member of 0, 2, 4,6, 8) and it is odd if it is a member of 11,3,5,7,9 How many different passcodes are possible (a) in general? (b) if only the even digits can be used? (c) if the odd and even digits must alternate? (d) if either the first digit is odd or the last digit is even? (e) if 9 must appear at least once (among the eight digits in passcode)? (f) if exactly four of the eight digits are even and also all the even digits must be next to each other?

Explanation / Answer

1 a) 108 because all 10 digits can be used at any of the eight places

b) 58 because only even digits can be used.

c) 58 because every place has 5 options even or odd,

d) 5*107 + 107*5

e)108 - 98 , basically total - (no 9 appearing in the passcode)

2 a) 400 places and 20 places fixed

ans : 2380* 20 as 380 places have 2 options and the main diagonal has only one 1 and that can be placed in 20 ways in 20 different rows.

b) only way is to permute a single row and rest all rows will be fixed

ans : 220 as 20 columns and each has 2 options

c) total = 219*20 + 219*20 = 2381 as if we have row 1 then row 2 is fixed and similarly for row 19 and 20