<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://ocw.cs.pub.ro/ppcarte/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://ocw.cs.pub.ro/ppcarte/feed.php">
        <title>books lfa:2024</title>
        <description></description>
        <link>https://ocw.cs.pub.ro/ppcarte/</link>
        <image rdf:resource="https://ocw.cs.pub.ro/ppcarte/lib/tpl/bootstrap3/images/favicon.ico" />
       <dc:date>2026-04-17T15:38:56+03:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab01&amp;rev=1728288246&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab02&amp;rev=1728686445&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab03&amp;rev=1729574017&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab04&amp;rev=1730186850&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab05&amp;rev=1730714313&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab06&amp;rev=1731365966&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab07&amp;rev=1731956448&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab08&amp;rev=1732750438&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab09&amp;rev=1733132004&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab10&amp;rev=1734370479&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab11&amp;rev=1768751726&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab12&amp;rev=1736692127&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:proiect&amp;rev=1730666996&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:team&amp;rev=1729416324&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://ocw.cs.pub.ro/ppcarte/lib/tpl/bootstrap3/images/favicon.ico">
        <title>books</title>
        <link>https://ocw.cs.pub.ro/ppcarte/</link>
        <url>https://ocw.cs.pub.ro/ppcarte/lib/tpl/bootstrap3/images/favicon.ico</url>
    </image>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab01&amp;rev=1728288246&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-07T11:04:06+03:00</dc:date>
        <title>lfa:2024:lab01</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab01&amp;rev=1728288246&amp;do=diff</link>
        <description>1. Deterministic Finite Automata

2.1. DFA practice

	*  Double-circle = final state
	*  Hanging arrow entering state = initial state
	*  Sink state = a state that is not final; once reached, there is no transition that leaves it, thus the DFA will reject; there is a transition that loops in this state for each possible character$ L=\{w \in \{0,1\}^* \text{ | w contains an odd number of ones} \} $$ 3k \overset{*2}{\longrightarrow} 3k $$ 3k + 1 \overset{*2}{\longrightarrow} 3k + 2 $$ 3k + 2 \over…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab02&amp;rev=1728686445&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-12T01:40:45+03:00</dc:date>
        <title>lfa:2024:lab02</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab02&amp;rev=1728686445&amp;do=diff</link>
        <description>2. Programming introduction - Python

Python3 is a multi-paradigm language, that combines the imperative style with the functional style. It also supports Object-Oriented programming, albeit in a limited way. 

Python3 offers a few programming constructs that:</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab03&amp;rev=1729574017&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-22T08:13:37+03:00</dc:date>
        <title>lfa:2024:lab03</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab03&amp;rev=1729574017&amp;do=diff</link>
        <description>3. Regular Expressions

3.1. Natural Language / DFA $ \rightarrow $ Regex conversion

For each of the exercises from DFA Seminary 1 write a regex describing the same language.

3.1.1. $ L=\{w \in \{0,1\}^* \text{ | w contains an odd number of ones} \} $



$ 0^*10^*(10^*10^*)^*$

3.1.2. The language of binary words which contain exactly two ones$ 0^*10^*10^*$$ (0 \cup 1)^*1$$ (0 \cup 1)^*00101(0 \cup 1)^*$$ A=\{ 0^{2k} \mid k \geq 1 \}$$ B = \{0, \epsilon \}$$ AB = ? $$ A = \{ 0^n 1^n \mid n \ge…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab04&amp;rev=1730186850&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-29T09:27:30+03:00</dc:date>
        <title>lfa:2024:lab04</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab04&amp;rev=1730186850&amp;do=diff</link>
        <description>4. Regex Representation in Python

In this laboratory we will be using Python3 classes to introduce a possible representation of regular expressions inside code and ways to work with those Regexes.

We will start with a base class Regex that will function as an interface for future descendents:$ \rightarrow $$ \rightarrow $$ \rightarrow $</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab05&amp;rev=1730714313&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-04T11:58:33+03:00</dc:date>
        <title>lfa:2024:lab05</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab05&amp;rev=1730714313&amp;do=diff</link>
        <description>5. Regex to NFA to DFA conversions

Thompson's algorithm is used to convert from a Regex to an NFA. Subset construction is used to convert from an NFA to an equivalent DFA.

Thompson's algorithm applies the following rules recursively:






Exercises
$ (1 \cup \varepsilon)(0^*1)^*0^* $$ (0\cup 01) \cup 1(10^*)^* \cup \varepsilon $$ (((00 \cup 11)^*1)^*0)^* $$ e^* $</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab06&amp;rev=1731365966&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-12T00:59:26+03:00</dc:date>
        <title>lfa:2024:lab06</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab06&amp;rev=1731365966&amp;do=diff</link>
        <description>5. Minimal DFAs

Consider the following DFA (blue states are final): 



5.1. Equivalence between states

5.1.1. Identify a pair of states which are indistinguishable.

5.1.2. Identify a pair of final or non-final states which are distinguishable. The pair must be distinguished by a word different from the empty word.$ E1 = ((ab^*a)^+b)^* $$ E2 = (a(b\mid aa)^*ab)^* $$ (1\cup\epsilon)(00^*1)^*0^* $$ (10\cup 0)^*(01 \cup 1)^*(0 \cup \epsilon) $$ D_n $$ L(a^+b^*) $\begin{align*}
&amp;D_n = (K_n, \Sigm…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab07&amp;rev=1731956448&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-18T21:00:48+03:00</dc:date>
        <title>lfa:2024:lab07</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab07&amp;rev=1731956448&amp;do=diff</link>
        <description>7. Closure properties

7.1.1. (Solved during lecture) Define the reversal of a language $ L $ as $ rev(L) = \{ w \in \Sigma^* | rev(w) \in L \}$, where $ rev(c_1c_2 \dots c_n) = c_nc_{n - 1} \dots c_1$ , with $ c_i \in \Sigma, 1 \leq i \leq n $. Show that reversal is a closure property.

7.1.2. Suppose $ A$  is a DFA. Write another DFA which accepts only those words $ w$  such that both $ w \in L(A)$  and $ reverse(w) \in L(A)$$ A^R$$ reverse(L(A))$$ A$$ A^R$$ L \subseteq \Sigma^* $$ c \in \Sigm…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab08&amp;rev=1732750438&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-28T01:33:58+03:00</dc:date>
        <title>lfa:2024:lab08</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab08&amp;rev=1732750438&amp;do=diff</link>
        <description>8. Proving languages are not regular
 Pumping Lemma 
$\exists n \in \mathbb{N}$$ \forall w\ \ \text{s.t.}\ \ |w| \ge n $$ w = xyz $$ |xy| \le n $$ y \neq \varepsilon $$ \forall k \ge 0, w_{k} = xy^{k}z \in L$
 Complement of Pumping Lemma 
$\forall n \in \mathbb{N}$$\exists w_{n} \in L $$ |w| \ge n $$ w_{n} $$ \forall x, y, z \in \Sigma^* $$ w_{n} = xyz $$ |xy| \le n $$ y \neq \varepsilon $$\exists k \ge 0 $$ w_{n} = xy^{k}z \notin L $not

8.1. The pumping lemma

8.1.1. Show that the pumping lemm…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab09&amp;rev=1733132004&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-12-02T11:33:24+03:00</dc:date>
        <title>lfa:2024:lab09</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab09&amp;rev=1733132004&amp;do=diff</link>
        <description>9. Push Down Automata

9.1. Writing PDAs

Find PDAs that accept each of the languages below, both by empty stack and by final state. Identify which approach feels more suitable for each language. 

9.1.1. $ L = \{\: w \in \{A,B\}^* \ | \:w \text{ is a palindrome}\} $.

9.1.2. $ L = \{ A^{m} B^{m+n} C^{n} \ | \: n, m \geq 0 \} $

9.1.3. $ L = \{w \in \{a, b\}^* | \#_a(w) = \#_b(w) \} $

9.1.4. $ L = \{w \in \{a, b\}^* | \#_a(w) \neq \#_b(w) \} $

9.1.5. $ L = \{a^ib^jc^k | i = j \lor j = k \} $ 
…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab10&amp;rev=1734370479&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-12-16T19:34:39+03:00</dc:date>
        <title>lfa:2024:lab10</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab10&amp;rev=1734370479&amp;do=diff</link>
        <description>9. Context-Free Grammars

9.1. Generating a CF language

Write CF grammar for the following languages. For each grammar, make sure it is not ambiguous. (Start with any CF grammar that accepts L. Then write another non-ambiguous grammar for the same language).$ L = \{\: w \in \{a,b\}^* \ | \:w \text{ is a palindrome}\} $$ S \leftarrow aSa\ |\ bSb \ |\ a \ |\ b \ |\ \epsilon $$ L = \{ a^{m} b^{m+n} c^{n} \ | \: n, m \geq 0 \} $$ S \leftarrow AB $$ A \leftarrow aAb\ |\ \ \epsilon $$ B \leftarrow bB…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab11&amp;rev=1768751726&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-01-18T17:55:26+03:00</dc:date>
        <title>lfa:2024:lab11</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab11&amp;rev=1768751726&amp;do=diff</link>
        <description>11. Closure properties for Context-Free Languages

11.0. Lexer Spec

Given the following specs, construct the lexer DFA as presented in Lecture 14:

	*  PAIRS: $ (10 | 01)* $
	*  ONES: $ 1+ $
	*  NO_CONSEC_ONE: $ (1 | \epsilon)(01 | 0)* $

Separate the following input strings into lexemes:
a) 010101$ L_1 = \{ a^{n} b^{n} c^{m} \ | \: n, m \in \mathbb{N} \} $$ L_2 = \{ a^{m} b^{n} c^{n} \ | \: n, m \in \mathbb{N} \} $$ \Rightarrow  L_1 \bigcap L_2 = \{ a^{n} b^{n} c^{n} \ | \: n \in \mathbb{N}  \…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab12&amp;rev=1736692127&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-12T16:28:47+03:00</dc:date>
        <title>lfa:2024:lab12</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:lab12&amp;rev=1736692127&amp;do=diff</link>
        <description>12. Pumping Lemma for Context-Free Languages and Recap
Pumping Lemma for CFL$ L $$ n \geq 1$
$ w\in L $$ |w|\geq n $$ w = uxyzw $
$$ \begin{align}
&amp; |xz| \geq 1 \\
&amp; |xyz| \leq n \\
&amp; ux^kyz^kw \in L \ \ \ \ \ \forall k \geq 0 
\end{align}

12.1. Finding the class of languages

For each of the following languages, find the most restrictive class of languages that it belongs to (regular, context-free but not regular, not context-free). Prove the language belongs to that class by finding a generat…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:proiect&amp;rev=1730666996&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-11-03T22:49:56+03:00</dc:date>
        <title>lfa:2024:proiect</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:proiect&amp;rev=1730666996&amp;do=diff</link>
        <description>Deadline etapa 1: 21 nov 2024 23:55

Schelet etapa 1 

Proiect

Proiectul este structurat in trei teme al caror obiectiv final reprezinta implementarea unui lexer in Python.

Ce este un lexer?

Un lexer este un program care, pe baza unei specificatii, imparte un sir de caractere in subsiruri, si identifica carei $ \Delta$</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:team&amp;rev=1729416324&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-20T12:25:24+03:00</dc:date>
        <title>lfa:2024:team</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2024:team&amp;rev=1729416324&amp;do=diff</link>
        <description>Limbaje Formale și Automate 2024-2025

Echipa

Curs

	*  Matei POPOVICI

Seminarii

	*  Cătălin-Mihail CHIRU
	*  Alexandru TOADER
	*  Ștefan STEREA

Orar

Curs
 Frecvență  Zi  Interval orar   Profesor  săptămânal  Miercuri 10:00-12:00  Matei POPOVICI  săptămâni impare</description>
    </item>
</rdf:RDF>
