100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS1501 Assignment 3 2021 £9.03   Add to cart

Other

COS1501 Assignment 3 2021

3 reviews
 97 views  8 purchases
  • Module
  • Institution

UNISA COS1501 Theoretical Computer Science Assignment THREE of 2021 solutions. Definitions are given then it is shown how they relate with the particular question.

Last document update: 3 year ago

Preview 3 out of 34  pages

  • June 27, 2021
  • July 1, 2021
  • 34
  • 2021/2022
  • Other
  • Unknown

3  reviews

review-writer-avatar

By: dohansmit • 3 year ago

review-writer-avatar

By: makhesatendaniicon • 3 year ago

review-writer-avatar

By: thembabhembe • 3 year ago

avatar-seller
COS1501 Assignment 3 2021



Question 1



𝑈 = {1, 2, 3, 4, 5, 𝑎, 𝑏, 𝑐} 𝑎𝑛𝑑 𝐴 = {𝑎, 𝑏, 𝑐, 1, 2, 3, 4}



𝑅: 𝐴 → 𝐴
𝐴 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛𝑎𝑙 𝑖𝑓 𝑒𝑣𝑒𝑟𝑦 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑖𝑛 𝑡ℎ𝑒 𝑑𝑜𝑚𝑎𝑖𝑛 𝑖𝑠 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 𝑒𝑥𝑎𝑐𝑡𝑙𝑦 𝑜𝑛𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑖𝑛 𝑡ℎ𝑒
𝑐𝑜𝑑𝑜𝑚𝑎𝑖𝑛.



1. {(1, 3), (𝑏, 3), (1,4), (𝑏, 2), (𝑐, 2)}

1 𝑖𝑠 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 3 𝑎𝑛𝑑 1 𝑖𝑠 𝑎𝑙𝑠𝑜 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 4.
1 𝑖𝑠 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 𝑚𝑜𝑟𝑒 𝑡ℎ𝑎𝑡 𝑜𝑛𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡.
𝑇ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑛𝑜𝑡 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛𝑎𝑙.

2. {(𝑎, 𝑐), (𝑏, 𝑐), (𝑐, 𝑏), (1, 3), (2, 3), (3, 𝑎)}

𝑎, 𝑏, 𝑐, 1, 2 𝑎𝑛𝑑 3 𝑎𝑟𝑒 𝑒𝑎𝑐ℎ 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 𝑒𝑥𝑎𝑐𝑡𝑙𝑦 𝑜𝑛𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡.
𝑇ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛𝑎𝑙.

3. {(𝑎, 𝑎), (𝑐, 𝑐), (2, 2), (3, 3), (4, 4)}

𝑎, 𝑐, 2, 3 𝑎𝑛𝑑 4 𝑎𝑟𝑒 𝑒𝑎𝑐ℎ 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 𝑒𝑥𝑎𝑐𝑡𝑙𝑦 𝑜𝑛𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡.
𝑇ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛𝑎𝑙.

4. {(𝑎, 𝑐), (𝑏, 𝑐), (1, 3), (3, 3)}

𝑎, 𝑏, 1 𝑎𝑛𝑑 3 𝑎𝑟𝑒 𝑒𝑎𝑐ℎ 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 𝑒𝑥𝑎𝑐𝑡𝑙𝑦 𝑜𝑛𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡.
𝑇ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛𝑎𝑙.



Question 1 ONE

,Question 2



𝑈 = {1, 2, 3, 4, 5, 𝑎, 𝑏, 𝑐} 𝑎𝑛𝑑 𝐴 = {𝑎, 𝑏, 𝑐, 1, 2, 3, 4}



𝑅: 𝑈 → 𝐴 𝑈 𝑖𝑠 𝑡ℎ𝑒 𝑑𝑜𝑚𝑎𝑖𝑛 𝑎𝑛𝑑 𝐴 𝑖𝑠 𝑡ℎ𝑒 𝑐𝑜𝑑𝑜𝑚𝑎𝑖𝑛.
𝑇ℎ𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑜𝑓 𝑈 𝑎𝑟𝑒 𝑐𝑎𝑙𝑙𝑒𝑑 𝑡ℎ𝑒 𝑝𝑟𝑒 − 𝑖𝑚𝑎𝑔𝑒𝑠 𝑎𝑛𝑑 𝑡ℎ𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝐴 𝑎𝑟𝑒 𝑐𝑎𝑙𝑙𝑒𝑑 𝑖𝑚𝑎𝑔𝑒𝑠.



𝐴 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑎 𝑠𝑢𝑟𝑗𝑒𝑐𝑡𝑖𝑣𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑖𝑓 𝑖𝑡 𝑖𝑠 𝑎 𝒇𝒖𝒏𝒄𝒕𝒊𝒐𝒏 𝑎𝑛𝑑 𝒇𝒐𝒓 𝒆𝒗𝒆𝒓𝒚 𝒆𝒍𝒆𝒎𝒆𝒏𝒕 𝒊𝒏 𝒕𝒉𝒆 𝒄𝒐𝒅𝒐𝒎𝒂𝒊𝒏, 𝒕𝒉𝒆𝒓𝒆
𝒊𝒔 𝒂𝒏 𝒆𝒍𝒆𝒎𝒆𝒏𝒕 𝒊𝒏 𝒕𝒉𝒆 𝒅𝒐𝒎𝒂𝒊𝒏 𝒕𝒉𝒂𝒕 𝒊𝒔 𝒓𝒆𝒍𝒂𝒕𝒆𝒅 𝒕𝒐 𝒊𝒕.
𝑇ℎ𝑎𝑡 𝑖𝑠, 𝑓𝑜𝑟 𝑒𝑣𝑒𝑟𝑦 𝑦 ∈ 𝐴, 𝑡ℎ𝑒𝑟𝑒 𝑒𝑥𝑖𝑠𝑡𝑠 𝑥 ∈ 𝑈 𝑠𝑢𝑐ℎ 𝑡ℎ𝑎𝑡 (𝑥, 𝑦) ∈ 𝑅.
𝐸𝑣𝑒𝑟𝑦 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑖𝑛 𝐴 𝑚𝑢𝑠𝑡 ℎ𝑎𝑣𝑒 𝑎 𝑝𝑟𝑒 − 𝑖𝑚𝑎𝑔𝑒 𝑓𝑜𝑢𝑛𝑑 𝑖𝑛 𝑈.



1. {(1, 4), (2, 𝑏), (3, 3), (4, 3), (5, 𝑎), (𝑎, 𝑐), (𝑏, 1), (𝑐, 𝑏)}

𝐴𝑙𝑙 𝑡ℎ𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑜𝑓 𝑈, 𝑡ℎ𝑎𝑡 𝑖𝑠, 1, 2, 3, 4, 5, 𝑎, 𝑏 𝑎𝑛𝑑 𝑐 𝑎𝑟𝑒 𝑒𝑎𝑐ℎ 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 𝑒𝑥𝑎𝑐𝑡𝑙𝑦 𝑜𝑛𝑒
𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑖𝑛 𝐴. 𝑆𝑜, 𝑡ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑎 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛.

𝐴𝑙𝑠𝑜,
2 ∈ 𝐴 𝑏𝑢𝑡 𝑡ℎ𝑒𝑟𝑒 𝑖𝑠 𝑛𝑜 (? , 2) 𝑝𝑎𝑖𝑟
2 ℎ𝑎𝑠 𝑛𝑜 𝑝𝑟𝑒 − 𝑖𝑚𝑎𝑔𝑒.
𝑇ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑁𝑂𝑇 𝑎 𝑠𝑢𝑟𝑗𝑒𝑐𝑡𝑖𝑣𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛.

2. {(𝑎, 1), (𝑏, 2), (𝑐, 𝑎), (1, 4), (2, 𝑏), (3, 3), (4, 𝑐)}

𝑇ℎ𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 5 𝑖𝑠 𝑖𝑛 𝑈, ℎ𝑜𝑤𝑒𝑣𝑒𝑟, 5 𝑖𝑠 𝑛𝑜𝑡 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 𝑎𝑛𝑦 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑖𝑛 𝐴.
𝑇ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑛𝑜𝑡 𝑎 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛.

𝑇ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑁𝑂𝑇 𝑎 𝑠𝑢𝑟𝑗𝑒𝑐𝑡𝑖𝑣𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛.

3. {(1, 𝑎), (2, 𝑐), (3, 𝑏), (4, 1), (𝑎, 𝑐), (𝑏, 2), (𝑐, 3)}

𝑇ℎ𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 5 𝑖𝑠 𝑖𝑛 𝑈, ℎ𝑜𝑤𝑒𝑣𝑒𝑟, 5 𝑖𝑠 𝑛𝑜𝑡 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 𝑎𝑛𝑦 𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑖𝑛 𝐴.
𝑇ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑛𝑜𝑡 𝑎 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛.

𝑇ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑁𝑂𝑇 𝑎 𝑠𝑢𝑟𝑗𝑒𝑐𝑡𝑖𝑣𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛.

4. {(1, 𝑎), (2, 𝑏), (3, 4), (4, 3), (5, 𝑐), (𝑎, 𝑎), (𝑏, 1), (𝑐, 2)}

𝐴𝑙𝑙 𝑡ℎ𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑜𝑓 𝑈, 𝑡ℎ𝑎𝑡 𝑖𝑠, 1, 2, 3, 4, 5, 𝑎, 𝑏 𝑎𝑛𝑑 𝑐 𝑎𝑟𝑒 𝑒𝑎𝑐ℎ 𝑟𝑒𝑙𝑎𝑡𝑒𝑑 𝑡𝑜 𝑒𝑥𝑎𝑐𝑡𝑙𝑦 𝑜𝑛𝑒
𝑒𝑙𝑒𝑚𝑒𝑛𝑡 𝑖𝑛 𝐴. 𝑆𝑜, 𝑡ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑎 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛.

𝐴𝑙𝑙 𝑡ℎ𝑒 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑜𝑓 𝐴, 𝑡ℎ𝑎𝑡 𝑖𝑠, 1, 2, 3, 4, 𝑎, 𝑏 𝑎𝑛𝑑 𝑐 ℎ𝑎𝑣𝑒 𝑝𝑟𝑒 − 𝑖𝑚𝑎𝑔𝑒𝑠 𝑖𝑛 𝑈.

𝑇ℎ𝑒 𝑎𝑏𝑜𝑣𝑒 𝑟𝑒𝑙𝑎𝑡𝑖𝑜𝑛 𝑖𝑠 𝑎 𝑠𝑢𝑟𝑗𝑒𝑐𝑡𝑖𝑣𝑒 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛.


Question 2 FOUR

, Question 3



𝐴 = {1, 2, 3, 4}
𝐺: 𝐴 → 𝐴 𝑎𝑛𝑑 𝐿: 𝐴 → 𝐴



𝐺 = {(1, 2), (2, 3), (4, 3)}
(1, 2) ⇒ 𝐺(1) = 2
(2, 3) ⇒ 𝐺(2) = 3
(4, 3) ⇒ 𝐺(4) = 3



𝐿 = {(2, 2), (1, 3), (3, 4)}
(2, 2) ⇒ 𝐿(2) = 2
(1, 3) ⇒ 𝐿(1) = 3
(3, 4) ⇒ 𝐿(3) = 4



𝐿(𝐺(1)) = 𝐿(2) = 2 ⇒ (1, 2) ∈ 𝐿 ∘ 𝐺

𝐿(𝐺(2)) = 𝐿(3) = 4 ⇒ (2, 4) ∈ 𝐿 ∘ 𝐺

𝐿(𝐺(3)) =? 𝐺(3) 𝑖𝑠 𝑛𝑜𝑡 𝑑𝑒𝑓𝑖𝑛𝑒𝑑. 𝑆𝑜, 𝐿(𝐺(3)) 𝑖𝑠 𝑛𝑜𝑡 𝑑𝑒𝑓𝑖𝑛𝑒𝑑.

𝐿(𝐺(4)) = 𝐿(3) = 4 ⇒ (4, 4) ∈ 𝐿 ∘ 𝐺



𝐿 ∘ 𝐺 = {(1, 2), (2, 4), (4, 4)}



Question 3 TWO

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

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67866 documents were sold in the last 30 days

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

Start selling
£9.03  8x  sold
  • (3)
  Add to cart