• No results found

Exam Automata & Complexity Vrije Universiteit, 25 March 2015, 12:00-14:45

N/A
N/A
Protected

Academic year: 2021

Share "Exam Automata & Complexity Vrije Universiteit, 25 March 2015, 12:00-14:45"

Copied!
2
0
0

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

Hele tekst

(1)

Exam Automata & Complexity Vrije Universiteit, 25 March 2015, 12:00-14:45

(This exam consists of 90 points in total; every student gets 10 points bonus.)

(At the exam, copies of slides can be used, without handwritten comments. The textbook by Linz, handouts, and laptop are not allowed!)

1. Consider the nfa

q0 q1

q2

a a

b

b a

b a

(a) Transform this nfa into a dfa, with as states subsets of {q0, q1, q2}.

(States of this dfa that are not reachable from {q0} can be omitted. But the

trap state must be included.) (8 pts)

(b) Perform the minimisation algorithm for dfa’s on the resulting dfa.

(Give explicitly all intermediate steps and splitting criteria of the reduction from the original dfa to the minimal dfa.) (10 pts)

2. Check using the string matching algorithm whether baabbabab contains a sub- string that is in L(a(ba+ ab)(ab)a).

(Describe the entire construction: the corresponding nfa, and the on-the-fly con-

struction of the corresponding dfa.) (12 pts)

3. Is the language {anb2nan | n ≥ 0} context-free? If yes, give a context-free gram- mar that produces this language. If no, show this by means of the pumping

lemma. (12 pts)

(2)

4. Show that the context-free grammar

S → bSa | cSa | λ

is LL(1). (Also give the needed FIRST and FOLLOW collections.)

Determine using the parsing table whether bca and bcaa are in the corresponding

language (12 pts)

5. Draw an npda M such that L(M ) consists of all strings over {a, b} with odd

length and a as symbol in the middle. (8 ptn)

6. Given is the grammar G with as productions

S → AB

A → AB | BA AA → a

B → AA | BB AB → b

(a) Transform the question whether string ab is in L(G) into an instance of the

Modified Post Correspondence Problem. (4 pts)

(b) Give a derivation of ab using the productions of G.

Transform this derivation into a solution for the corresponding instance of

the MPCP. (10 pts)

7. Let f : {0, 1}2 → {0, 1}2 be defined as follows:

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

Apply Simon’s algorithm to determine a linear dependence between the digits of

s = 10. (Give one possible scenario.) (14 pts)

Referenties

GERELATEERDE DOCUMENTEN

The orders with an order number, a date and references to customer and product.. (For simplicity, we assume that an order contains precisely one product.) Formulate the

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

Natural numbers describe the shapes of lists (if we instantiate the element type of lists to the unit type, we obtain a type isomorphic to the natural numbers). Indexing lists by

Describe the differences between assert allPos and assert allPos 0 , and more generally between using List versus using Pred to describe a predicate on lists.. (Hint: Think

(b) the maximum possible change in the vertical velocity of air parcels (c) the layer stability between the ground and the capping inversion (v) The equation for thermal wind