• No results found

Exam Automata & complexiteit Vrije Universiteit, 26 March 2014, 12:00–14:45

N/A
N/A
Protected

Academic year: 2021

Share "Exam Automata & complexiteit Vrije Universiteit, 26 March 2014, 12:00–14:45"

Copied!
2
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Exam Automata & complexiteit

Vrije Universiteit, 26 March 2014, 12:00–14:45

Remarks. Copies of the slides without handwritten notes may be used for this exam.

Linz’s textbook and laptop may not be used! This exam consists of 6 questions on 2 pages.

In total 90 points can be scored; every student gets a bonus of 10 points. Good luck!

1. (a) (5 points) Give the minimal dfa that describes the language of strings over {a, b}

in which the number of as in the string is not divisible by three.

(b) (5 points) Convert this dfa into a right linear grammar that describes the same language.

2. Consider the nfa

q0 q1

q2 q3

a

a

a b a

a b

c

(a) (8 points) Convert this nfa into a dfa, with subsets of {q0, q1, q2, q3} as states.

(States of this dfa that are not reachable from {q0} can be omitted. However, it is not allowed to omit the trap state.)

(b) (10 points) Apply the minimisation algorithm for dfas to the resulting dfa.

(Explicitly give all intermediate steps and splitting criteria of the reduction of the original dfa to the resulting minimal dfa.)

Page 1 of 2 Continue on the next page. . .

(2)

Automata & complexity Exam 26 March 2014, 12:00–14:45 3. Σ = {a, b, c}. Let na(w), nb(w) and nc(w) denote the number of as, bs and cs in

string w, respectively.

(a) (12 points) Show that the language L = {w | na(w) + nb(w) = nc(w)} is not regular. Use the pumping lemma.

(b) (8 points) Show that the language L = {w | na(w) + nb(w) = nc(w)} is context free.

4. (12 points) Show that the context free grammar S → aAB | BAa B → b

A → cS | λ

is LL(1). (Also give the required FIRST and FOLLOW sets.)

Determine using the parse table whether aacabb is in the corresponding language.

5. Consider the Turing machine M with Σ = {a, b}, Γ = Σ ∪ {}, F = {q2} en δ(q0, a) = {(q0, b, R)} δ(q0, a) = {(q1, b, R)} δ(q1, b) = {(q2, b, L)}

(a) (8 points) Show how the question x ∈ L(M ) reduces to (an instance of) the bounded tiling problem, and apply this reduction to the following two strings:

x = aba and x = baa.

(b) (7 points) Describe the language L(M ) and give an unrestricted grammar G such that L(G) = L(M ).

6. (15 points) Let f : {0, 1}2 → {0, 1}2 be defined as follows:

f (00) = f (10) = 01 f (01) = f (11) = 10

Apply Simon’s algorithm to determine a linear dependency for the digits of s = 10.

(Give a possible scenario.)

Page 2 of 2 End of exam.

Referenties

GERELATEERDE DOCUMENTEN

“CatalogEntry” and the physical book class a “BookOnShelf.” For each copy of a book on shelf the library keeps a copyNumber and the date on which that copy was acquired by

Consider Awerbuch’s depth-first search algorithm (where a node holding the to- ken for the first time does not send the token to its father and to the node it forwards the token

Suppose that Rana’s algorithm is adapted as follows: Only quiet processes that have been quiet from some logical time < t (instead of ≤ t) onward can take part in a wave tagged

Add the Shavit-Francez termination detection algorithm on top of the basic al- gorithm, and extend this basic computation with control messages, to show how.. termination

Compute the clustering coefficients of each of the vertices in the graph from exercise 2, as well as the clustering coefficient of the entire graph... Up to now the graph has been

The worm infected RFID software can then "infect" new RFID tags by overwriting their data with a copy of the RFID worm code.. An RFID virus is an RFID-based exploit

[r]

Read every question carefully, make sure you understand it, and be sure to answer the question.. Read the question again after answering it, as