Home
Evaluations
Tags
Lectures
Sandbox
About
Contribute
Evaluations
Tags
Lectures
About
Back
Question:
2017 Fall Midterm - 6
Author: Michiel Smid
Let $n \geq 7$ be an integer and consider strings of length $n$ consisting of the characters $a$, $b$, $c$, and $d$. How many such strings are there that start with $abc$ or end with $dddd$?
(a)
$2 \cdot 4^{n-3} - 4^{n-7}$
(b)
$4^{n-3} + 4^{n-4} - 4^{n-7}$
(c)
$2 \cdot 4^{n-4} - 4^{n-7}$
(d)
$4^{n-3} + 4^{n-4}$
COMP 2804: Discrete Structures II
COMP 2804 Midterm
The Product Rule (3.1)
The Principle of Inclusion and Exclusion (3.5)