• Keine Ergebnisse gefunden

Exercise4:PumpingLemmaforContext-FreeLanguages (3+3Points) Exercise3:ConstructingPushdownAutomata (3Points) Exercise2:ChomskyNormalForm (4Points) Exercise1:ContextFreeGrammar (7Points) TheoreticalComputerScience-BridgingCourseExerciseSheet4

N/A
N/A
Protected

Academic year: 2022

Aktie "Exercise4:PumpingLemmaforContext-FreeLanguages (3+3Points) Exercise3:ConstructingPushdownAutomata (3Points) Exercise2:ChomskyNormalForm (4Points) Exercise1:ContextFreeGrammar (7Points) TheoreticalComputerScience-BridgingCourseExerciseSheet4"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

University of Freiburg Dept. of Computer Science Prof. Dr. F. Kuhn

S. Faour, P. Schneider

Theoretical Computer Science - Bridging Course Exercise Sheet 4

Due:Wednesday, 19th of May 2021, 12:00 pm

Exercise 1: Context Free Grammar (7 Points)

Give a context free grammar for each of the following languages, where the alphabet set for the first three is Σ ={a, b}.

1. L1 ={akb3k|k≥0}

2. L2 ={aibj|0< i≤j}

3. L1∪L2

4. L3 ={w∈ {0,1} |w contains at least three ones}

Exercise 2: Chomsky Normal Form (4 Points)

Convert the following CFG into an equivalent CFG in Chomsky Normal Form (CNF). Write down the grammar you obtain after each step of the conversion algorithm.

A → BAB|B| B → 00|

Exercise 3: Constructing Pushdown Automata (3 Points)

Consider the language L={anb2mban|m, n >0}over the alphabet Σ ={a, b}.

Construct a PDAA withL(A) =L.

Exercise 4: Pumping Lemma for Context-Free Languages (3+3 Points)

Use the pumping lemma to show that the following languages over the alphabet Σ = {a, b} are not context free:

(a) L1 ={am |m is a prime}

(b) L2 ={anba2nba3n|n≥0}

Referenzen

ÄHNLICHE DOKUMENTE

Write down the induced equation system and determine its least solution using Kleene’s fixed-point theorem.. Aufgabe 4: Data flow

The following problems are about sanitization of input. Note that the automaton A det is completely deterministic since for every pair of states Q and every input symbol a, there is

c) [3 points] We call a transducer deterministic if in any state and for any input, the transducer has at most one possible, and hence unique, transition; this transition may

Right linear means that the right-hand sides of all production rules contain at most one non-terminal which (if it exists) is at the right most position. That is why we speak of

The CYK algorithm assumes as input a context-free grammar (CFG) in Chomsky normal form (CNF).. Exercise 3: The syntax of programming languages as grammar [8 points].. In this

a) [1 Point] Username: Does the input text have at least 4 symbols and no special characters?.. b) [2 Points] Does the input text satisfy the following property: Every special

Geben Sie ein Beispiel f¨ ur eine Menge von Punkten in der Ebene, die sich durch keine achsenparallele Schnittgerade in zwei gleich große Teile zerlegen l¨ asst.. Die Menge sollte

Please compare the following categories of VR displays: fish tank VR display (i.e., stereoscopic moni- tor, please specify whether you consider autostereo or with glasses),