100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada
logo-home
COS3701 EXAM PACK 2025 $2.73
Añadir al carrito

Examen

COS3701 EXAM PACK 2025

 3 veces vendidas
  • Grado
  • Institución
  • Book

COS3701 Latest exam pack questions and answers and summarized notes for exam preparation. Updated for 2025 exams . For assistance Whats-App.0.6.7..1.7.1..1.7.3.9 . All the best on your exams!!

Vista previa 4 fuera de 373  páginas

  • 24 de enero de 2025
  • 373
  • 2024/2025
  • Examen
  • Preguntas y respuestas
avatar-seller
COS3701
EXAM PACK




FOR ASSISTANCE WITH THIS MODULE +27 67 171 1739

, UNIVERSITY EXAMINATIONS

OCTOBER/NOVEMBER 2024

COS3701

Theoretical Computer Science III



Welcome to the COS3701 examination

Date: 05 November 2024
Time: 07:45
Hours: 2hrs

Examiner name: Daphney Rakoti Mokwana
Internal moderator name: Dr TG Moape
External moderator name:

This paper consists of 04 pages.

Total marks: 80

Number of pages:
Instructions:

1. Upload your answer scripts in a single PDF file (answer scripts must not be password
protected or uploaded as “read only” files)
2. Incorrect file format and uncollated answer scripts will not be considered.
3. NO emailed scripts will be accepted.
4. Students are advised to preview submissions (answer scripts) to ensure legibility and that
the correct answer script file has been uploaded.
5. Incorrect answer scripts and/or submissions made on unofficial examinations platforms
(including the invigilator cell phone application) will not be marked and no opportunity will
be granted for resubmission. Only the last answer file uploaded within the stipulated
submission duration period will be marked.
6. Mark awarded for incomplete submission will be the student’s final mark. No opportunity for
resubmission will be granted.
7. Mark awarded for illegible scanned submission will be the student’s final mark. No
opportunity for resubmission will be granted.
8. Submissions will only be accepted from registered student accounts.
9. Students who have not utilised the proctoring tool will be deemed to have transgressed
Unisa’s examination rules and will have their marks withheld. If a student is found to have
been outside the proctoring tool for a total of 10 minutes during their examination session,
they will be considered to have violated Unisa’s examination rules and their marks will be
withheld. For examinations which use the IRIS invigilator system, IRIS must be recording
throughout the duration of the examination until the submission of the examinations scripts.
10. Students have 48 hours from the date of their examination to upload their invigilator results
from IRIS. Failure to do so will result in students deemed not to have utilized the proctoring
tools.

, COS3701 Oct/Nov 2024


Question 1 [16]


a) Determine a regular expression for the language L over the alphabet {a; b} that
consists of all words that have at least one a but contain exactly one bb substring (and
no other as). Example of words in the language are bba, aaabbaaa, aaaabbaaaaaa
etc. Examples of words that are not in the language are b, a, bab, ab, aaabbbb,
abaaabaaaaa etc. (2)
b) Design a deterministic finite automaton (DFA) that will recognise all of the words in
L as defined above. (4)
c) Use Theorem 21 to develop a context-free grammar (CFG) for the language L.
(4)
d) Convert the following CFG to Chomsky Normal Form (CNF):
S -> aXY | Yb
X -> XZYZ | a
Y -> bY | Λ
Z -> a | Λ (6)

Question 2 [12]

Build a deterministic pushdown automata (DPDA) that accepts the language L =
{(ab)n(aa)m(ba)n-1 | n ≥1;m ≥1} over the alphabet ∑ = {a; b}.

Question 3 [10]

The pumping lemma with length for context-free languages (CFLs) can be stated as follows:
Let L be a CFL generated by a CFG in CNF with p live productions.
Then any word w in L with length > 2p can be broken into five parts:
w = uvxyz
such that
length(vxy) ≤ 2p
length(x) > 0
length(v) + length(y) > 0
and such that all the words uvnxynz with n ∈{2, 3, 4,…} are also in the language L.
Use the pumping lemma with length to prove that the language

L = {(a)n(b)2n+2(a)n-1 |n ≥ 1}

over the alphabet ∑ = {a, b} is non-context-free.




2

, COS3701 Oct/Nov 2024


Question 4 [6]

Use the reformulated version of Theorem 42 to decide whether the grammar given below
generates any words:
S -> XY
X -> SY
Y -> SX
X -> a
Y -> b

Question 5 [6]

Consider the Turing Machine (TM) T (over the input alphabet ∑ = {a; b}) given below.




a) What is the shortest word that would be accepted by T ? (1)
b) What is accept(T )? (2)
c) What is reject(T )? (2)
d) What is loop(T )? (1)


Question 6 [14]
Build a Turing Machine (TM) that
• accepts all words in {(b)n+2an | n ≥ 1},
• loops forever on all words starting with a, and
• rejects all other words.
Assume that the alphabet is ∑ = {a; b}.




3

Los beneficios de comprar resúmenes en Stuvia estan en línea:

Garantiza la calidad de los comentarios

Garantiza la calidad de los comentarios

Compradores de Stuvia evaluaron más de 700.000 resúmenes. Así estas seguro que compras los mejores documentos!

Compra fácil y rápido

Compra fácil y rápido

Puedes pagar rápidamente y en una vez con iDeal, tarjeta de crédito o con tu crédito de Stuvia. Sin tener que hacerte miembro.

Enfócate en lo más importante

Enfócate en lo más importante

Tus compañeros escriben los resúmenes. Por eso tienes la seguridad que tienes un resumen actual y confiable. Así llegas a la conclusión rapidamente!

Preguntas frecuentes

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.

100% de satisfacción garantizada: ¿Cómo funciona?

Nuestra garantía de satisfacción le asegura que siempre encontrará un documento de estudio a tu medida. Tu rellenas un formulario y nuestro equipo de atención al cliente se encarga del resto.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller EduPal. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for $2.73. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

45,681 summaries were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 15 years now

Empieza a vender

Vistos recientemente


$2.73  3x  vendido
  • (0)
Añadir al carrito
Añadido