• ¿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 2 fuera de 9 páginas
Otro

COS3701 Assignment 4 Solutions

Document preview thumbnail
Vista previa 2 fuera de 9 páginas

COS3701 Solutions to the 4th Assignment 2022.

Vista previa del contenido

COS3701 -
THEORETICAL
COMPUTER SCIENCE 3
ASSIGNMENT 4 - 2022
83046

, Solution
SELF ASSESSMENT ASSIGNMENT 04



Discussion

You have probably by now worked through all the prescribed work. We hope you have found the
course matter interesting. Please work carefully through our solutions and compare them to yours.
Note that if not otherwise indicated we assume that the alphabet is Σ = {a, b}.



Question 1


Chapter 23 – Problem 1(i), p. 562

Σ = {a, b}. EVEN-EVEN is defined on page 236 of Cohen: EVEN-EVEN = all strings x with an
even number of as and an even number of bs.

Note that TL101 refers to ODDPALINDROME but the language we are actually interested in is
EVEN-EVEN.

A TM that accepts this language is illustrated in Figure 1.

This TM has essentially four states


State 1 This represents the case where an odd number of as and an even number of bs have
been read (OE).

State 2 This represents the case where an even number of as and an odd number of bs have
been read (EO).

State 3 This represents the case where an even number of as and an even number of bs have
been read (EE).

State 4 This represents the case where an odd number of as and an odd number of bs have been
read (OO).


Consider the string aa. In this case the TM moves to state 1 after reading the first a (OE) and then
to state 3 after reading the second a (EE). The TM will then go the halt state and even number of
as (2) and an even number of bs (0) have been read.

Consider a more complicated string abaabbba. In this case the word is in EVEN-EVEN so the TM
should reach the halt state. What happens is:



2

Información del documento

Subido en
29 de septiembre de 2022
Número de páginas
9
Escrito en
2022/2023
Tipo
Otro
Personaje
Desconocido
$5.90

¿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

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
StudyWellNotes
5.0
(1)
Vendido
43
Seguidores
31
Artículos
0
Última venta
1 mes 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