• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 4 fuera de 81 páginas
Examen

COS3701 Theoretical Computer Science III Exam 2026 | Practice Questions with Answers & Detailed Explanations | UNISA | Latest Update

Document preview thumbnail
Vista previa 4 fuera de 81 páginas

Comprehensive COS3701 Theoretical Computer Science III exam preparation resource for UNISA Computer Science students. It covers key concepts in computability and formal language theory, including context-free languages, recursively enumerable languages, the Chomsky hierarchy, pushdown automata, and Turing machines. The practice questions are designed to reinforce theoretical understanding, problem-solving, and exam readiness through answers and detailed explanations. UNISA identifies COS3701 as a third-level, NQF Level 7, 12-credit year module with COS2601 as a prerequisite.

Vista previa del contenido

COS3701 Theoretical Computer Science III Exam
2026 | Practice Questions with Answers & Detailed
Explanations | UNISA | Latest Update | Guaranteed
Pass



📚 Section 1: Regular Languages & Finite Automata (Questions 1–40)




1. A deterministic finite automaton (DFA) is defined as a 5-tuple (Q, Σ, δ, q₀, F). What
does δ represent?

 A) The set of accepting states
 B) The transition function
 C) The start state
 D) The input alphabet

Answer: B
Explanation: In the formal definition of a DFA, δ: Q × Σ → Q is the transition function. It
maps a state and an input symbol to the next state. Q is the set of states, Σ is the input
alphabet, q₀ is the start state, and F is the set of accepting states.

, 2. Which of the following languages is accepted by a DFA with a single accepting
state that loops on all inputs?

 A) The empty language
 B) The language of all strings over the alphabet
 C) The language containing only the empty string
 D) A language that accepts no strings

Answer: B
Explanation: If a DFA has a single accepting state that loops on all inputs, it accepts all
strings over the alphabet. The language L = Σ is regular and is accepted by such a DFA.
The empty language would require no accepting states or unreachable accepting states.*




3. The language {aⁿbⁿ | n ≥ 0} is:

 A) Regular
 B) Context-free but not regular
 C) Context-sensitive but not context-free
 D) Recursively enumerable

Answer: B
Explanation: The language {aⁿbⁿ | n ≥ 0} is context-free but not regular. It can be generated
by the grammar S → aSb | ε and accepted by a pushdown automaton. However, it cannot
be recognized by any finite automaton because it requires counting and matching the
number of a's and b's, which a finite automaton cannot do.

, 4. The pumping lemma for regular languages states that for every regular language L,
there exists a constant n such that for every string w in L with |w| ≥ n, w can be
divided into xyz such that:

 A) |y| = 0 and xy^iz ∈ L for all i ≥ 0
 B) |y| > 0, |xy| ≤ n, and xy^iz ∈ L for all i ≥ 0
 C) |x| > 0, |y| > 0, and xyz ∈ L
 D) |xy| ≥ n and |y| = 0

Answer: B
Explanation: The pumping lemma states that if L is regular, there exists a pumping length p
such that any string w ∈ L with |w| ≥ p can be written as w = xyz where |y| > 0, |xy| ≤ p, and
for all i ≥ 0, xy^iz ∈ L. This lemma is used to prove that certain languages are not regular.




5. A non-deterministic finite automaton (NFA) differs from a DFA in that:

 A) An NFA has multiple accepting states
 B) An NFA can have ε-transitions
 C) An NFA can have multiple possible transitions from a state on the same input symbol
 D) An NFA cannot have more states than a DFA

Answer: C
Explanation: The key difference is that in an NFA, δ: Q × (Σ ∪ {ε}) → 2^Q, meaning from a
state on a given input symbol, there can be multiple possible next states (a set of states).
This non-determinism is the defining characteristic of NFAs. While NFAs may have ε-
transitions, this is not always required.

, 6. Which of the following statements is true regarding the equivalence of DFAs and
NFAs?

 A) Every NFA can be converted to an equivalent DFA, but the DFA may have exponentially
more states
 B) NFAs are more powerful than DFAs in terms of the languages they can recognize
 C) DFAs cannot accept languages that NFAs accept
 D) NFAs and DFAs recognize different classes of languages

Answer: A
Explanation: NFAs and DFAs are equivalent in expressive power; they recognize exactly
the same class of languages (regular languages). However, converting an NFA to a DFA
may result in an exponential increase in the number of states (subset construction). This
demonstrates that NFAs can be more concise representations of regular languages.




7. A regular expression for the language of strings over {0,1} that contain at least one
1 is:

 A) 0*1*0*
 B) (0 ∪ 1)1(0 ∪ 1)
 C) 01(0 ∪ 1)
 D) (0 ∪ 1)*

Información del documento

Subido en
1 de septiembre de 2026
Número de páginas
81
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$20.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
4
Seguidores
1
Artículos
231
Última venta
1 hora hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes