Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CISC 203: Discrete Mathematics for Computing II

Problem Set 1

2022

Instructions

1.  All solutions must be completed independently, and written up in LATEX  using the template provided.

2.  Show all of your work and explain all solutions. Insufficient justification will result in a loss of marks.

3.  For more details on the collaboration policy and LATEX, see the Assignment Policies document.

4. When completed, submit your compiled PDF to the dropbox posted in onQ before the deadline.

Note:  4 marks (out of 60) in Problem Set 1 are reserved for formatting, which consists of correctly en- tering your name into the LATEX template, removing the sample text/images from it, and formatting your solutions in a way that is readable by the TAs (please be considerate of them), e.g., by inserting line breaks where appropriate, using math mode for equations and text mode for text  (e.g., please make sure that yourtextdoesn\ tlooklikethis and make sure that your equations look like y = x2  instead of y=(1/3)*xˆ2). Formatting grades are assigned at the discretion of the TAs.

Problems

[8 marks]    1.  Count the number of integers from 1 to 999,999 where the sum of their digits equals 9.

[8 marks]   2. How many non-negative integer solutions are there to

x1 + x2 + x3 + x4  = 17

x1  ≥ 5      and      1 ≤ x2  ≤ 4      and     x3  ≤ 4

[8 marks]   3.  Suppose that a website requires you to select a password containing exactly n characters. Each character

may be an upper-case letter, lower-case letter, or numeric digit.  The password requires that any two adjacent characters in the password cannot be the same.

To illustrate, you may consider the following two examples:  If the website requires an  11-character password (i.e., n = 11), the password imperial233 is not allowed (since it contains the sequence 33) but the password stormcloak3 is allowed (even though it contains the character o twice).

How many disallowed n-character passwords are there?  Show all your steps and explain them in a similar level of detail as the examples in the notes, e.g., explain as if you are teaching someone how to solve the problem (marks will be assigned accordingly).

[6 marks]   4.   (a)  Suppose that you are on a Discord server with five channels.  You have created a discrete math

meme (example below), and written a script that sends it to a randomly-chosen channel each time you log in.  Suppose that you have logged in 14 times.  How many possible ways could your meme have been sent across the five channels?

Clarification:  We are not considering the ordering in which the meme was sent to different channels. We are only counting the possibilities for the number of times that the meme could have been sent to each channel.

 

Figure 1: Discrete Math Meme by former student Fall 2020

(b)  Suppose in this same discord server, you have added a new feature to your bot and a new library

of 7 memes.  The bot will now randomly select a discrete math meme, and send it to a randomly selected server (still 5). Then, it randomly decides to either leave the message alone, or react with a crying laughing face emoji.  How many possible ways could your meme have been sent, and reacted to with the emoji across the five channels?

[10 marks]   5. In February 2022, subsequent to the release of Elden Ring, the Computing Students Association, COMPSA

surveyed a group of computing students to see which FromSoftware games they play. and the following results were obtained:

•  119 play Elden Ring or Dark Souls

• 25 play Elden Ring and Dark Souls

•  11 play all three

• 80 play Elden Ring

• 64 play Dark Souls

• 91 play Sekiro

• 61 play ONLY Sekiro

• 89 play Elden Ring or Dark Souls but NOT Sekiro

• 44 play at least two games

•  148 play Elden Ring or Sekiro

Using set notation and operations, show all of your work to determine how many students:

i play at least one of the games?

ii play only one of the games?

iii  do not play any of the games?

iv  Note: item i and item iv ask the same value assuming all students play some FromSoftware game. To avoid confusion this has been removed.

[12 marks]   6.   (a)  Give a counting argument (ie.  combinatorial proof) for the following expression.  You should give

two methods of counting, one for each side, and explain how both are equivalent.

工(n) k (  )k(n) = n · 2n −1

(b)  Give an algebraic proof

(  )() = (  )(  )k(n)2(k)