100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS Assignment 2 solution $5.60   Add to cart

Other

COS Assignment 2 solution

 131 views  3 purchases
  • Course
  • Institution
  • Book

Contains the discussion and solutions of the second assignment

Preview 1 out of 4  pages

  • June 6, 2023
  • 4
  • 2022/2023
  • Other
  • Unknown
avatar-seller
COS2601 2023 Assignment 2
Discussion
Q1
a) The appropriate universal set for the language ODDnotAB is the set of all words over the
alphabet Σ = {a, b}.

b) The generator(s) of ODDnotAB are as follows:
i) The empty string ε.
ii) The single characters a and b.

c) The function on the universal set is defined as follows:
i) If x is a word in ODDnotAB, then ax is also in ODDnotAB.
ii) If x is a word in ODDnotAB, then bx is also in ODDnotAB.

d) Using these concepts, the recursive definition of the language ODDnotAB is as follows:

i) ε ∈ ODDnotAB
ii) a ∈ ODDnotAB
iii) b ∈ ODDnotAB
iv) If x ∈ ODDnotAB, then ax ∈ ODDnotAB
v) If x ∈ ODDnotAB, then bx ∈ ODDnotAB

This definition states that the language ODDnotAB includes the empty string ε, the single
characters a and b, and any word obtained by appending an 'a' or a 'b' to a word already in
ODDnotAB.


Q2
a) Recursive Definition of Set P:
We can define the set P of all positive integers greater than 0 recursively as follows:
Base Case: 1 is in P.
Recursive Case: If n is in P, then (n + 1) is also in P.
In simpler terms, the set P includes 1, and if a number n is in P, then the number (n + 1) is also in P.
b) Induction Principle:
The appropriate induction principle for this proof is the Principle of Mathematical Induction. It
consists of two steps:
1. Base Step: We need to show that the given statement holds true for the base case, which is n = 1.
2. Inductive Step: We assume that the statement is true for a particular positive integer k and then
prove that it holds for the next positive integer k + 1.
c) Proof by Mathematical Induction:

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

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

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 CrystalIndigo. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $5.60. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79373 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$5.60  3x  sold
  • (0)
  Add to cart