Discrete Structures for Computing ASSIGNMENT 4

UNIVERSITY OF WESTERN ONTARIO
Computer Science 2214a, Fall 2014 - 2015
Discrete Structures for Computing
ASSIGNMENT 4
Given: Wednesday Nov. 12, Due: Wednesday Nov. 19, 6pm
1. Suppose that
A=
a
0
0
b
where a and b are real numbers. Use induction to show that
n
a
0
An =
0 bn
for every positive integer n. Provide detailed justifications for your answer.
2. Use structural induction to prove that in every well-formed formula of the
language of propositional logic (as defined recursively in class), the number of
left parantheses equals the number of right parantheses. Provide detailed justifications for your answer.
3. Suppose that a “word” is any string of seven uppercase letters of the alphabet,
with repeated letters allowed.
1. How many words are there?
2. How many words end with the letter T?
3. How many words begin with R and end with T?
4. How many words begin with A or B?
5. How many words begin with A or end with B?
Provide detailed justifications for your answers.
Continued on next page
1
4. Solve the following counting problems:
1. How many different license plates can be made if each license plate consists
of three letters followed by three digits or four letters followed by two
digits?
2. Each user has a password 8 characters long, where each character is an
uppercase letter, a lowercase letter, or a digit. Each password must contain
at least one digit. How long will it take to check every possible password,
if each check takes one unit of time?
3. How many functions are there from a set with three elements to a set with
eight elements?
4. How many injective functions are there from a set with three elements to
a set with eight elements?
5. How many bijective functions are there from a set with three elements to
a set with eight elements?
Provide detailed justifications for your answers.
5. A computer randomly prints three-digit codes, with no repeated digits in
any code (for example, 387, 072, 760). What is the minimum number of codes
that must be printed in order to guarantee that at least six of the codes are
identical?
Provide detailed justifications for your answer.
2