CS/MATH 1019 Discrete Math for Computer Science
All documents for this subject (14)
Seller
Follow
YourAssignmentHandlers
Reviews received
Content preview
SC/MATH 1019B - HOMEW ORK 3
DUE NOVEMB ER 20, 2024
Solutions to the problems below must be brought to class on November 20, 2018.
Solutions may by typed or neatly hand written. You must clearly indicate which
problem you are solving. All solutions must be fully justified.
# 1. Let Σ = { a, b, c . Find a recurrence for the number of length n strings in Σ∗
that do not contain
} any two consecutive a’s, b’s, nor c’s (i.e. none of aa, bb, nor cc
are in the string).
Let sn denote the number of string which do not contain any two consecutive a’s,
b’s, nor c’s. For any such string of length n − 1
• if it ends in an a, I can add either b or c;
• if it ends in a b, I can add either a or c;
• if it ends in a c, I can add either a or c;
Thus any string of length n − 1 can be extended to a string of length n in
two possible ways and so an = 2an−1.
# 2. Solve the recurrence an = 5an−1 − 6an−2 where a0 = 2 and a1 = 5.
The characteristic equation is r2 — 5r + 6 = (r −2)(r −
3). So, the solution of the
recurrence is
A2n + B3n
for some constants A and B. Using the initial conditions we find that
A+B =2
2A + 3B = 5
and so A = 1 and B = 1. Therefore an = 2n + 3n.
# 3. Consider the relation R on Z × (Z \ {0}) defined by
R = {((a, b), (c, d)) : ad =
bc}.
Prove that R is an equivalence relation. Does the relation R have any meaning to
you?
Since ab = ba for any (a, b) ∈ Z × (Z \ {0 } ) we find that ((a, b), (a, b)) R and R
is reflexive. ∈
Assuming that ((a, b), (c, d)) ∈ R we have that ad = bc. This also means cb = da
and so ((c, d), (a, b)) ∈ R and R is symmetric.
Assuming that ((a, b), (c, d)) ∈ R and ((c, d), (e, f )) ∈ R we have that
ad = bc cf = de.
Since b
0, d /= 0, and f /= 0 we see that
a c c e
= = .
b d d f
1
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller YourAssignmentHandlers. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $14.99. You're not tied to anything after your purchase.