<?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:2023</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-18T06:02:54+03:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:bonus&amp;rev=1702331463&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:c01draft&amp;rev=1696662285&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:coding-style&amp;rev=1699279628&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab01&amp;rev=1728239382&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab02&amp;rev=1728239436&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab03&amp;rev=1698745401&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab04&amp;rev=1699283340&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab05&amp;rev=1699698545&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab06&amp;rev=1700775260&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab07&amp;rev=1701695001&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab08&amp;rev=1702034595&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab09&amp;rev=1705437085&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab10&amp;rev=1705437144&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab11&amp;rev=1704791160&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab_python_extras&amp;rev=1700074490&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:proiect&amp;rev=1734000023&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:proiect_coding_style&amp;rev=1730199068&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:proiect_e2&amp;rev=1699446214&amp;do=diff"/>
                <rdf:li rdf:resource="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:team&amp;rev=1697913366&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:2023:bonus&amp;rev=1702331463&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-12-11T23:51:03+03:00</dc:date>
        <title>lfa:2023:bonus</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:bonus&amp;rev=1702331463&amp;do=diff</link>
        <description>Deadline: 14 ianuarie 2024 (23:59)

Schelet: 

Bonus

In primele 3 etape ati implementat un lexer, etapa bonus consta in folosirea lexerului pentru a face un interpretor pentru un limbaj de programare simplist.

Punctul de intrare a interpretorului vostru o sa fie fisierul</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:c01draft&amp;rev=1696662285&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-10-07T10:04:45+03:00</dc:date>
        <title>lfa:2023:c01draft</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:c01draft&amp;rev=1696662285&amp;do=diff</link>
        <description>C01: Introduction

Abstractions

 The beginning 

In the early 1940s some of the first programmable machines started to appear in research labs such as Harvard Computation Lab or Bell Labs. These machines were glacially slow by today's standards. However, they were also very difficult to program, and to operate. Programming required intimate knowledge of the machine, and often required resorting to hacks in order to make the computations run faster. Speed was always critical. During this time, w…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:coding-style&amp;rev=1699279628&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-11-06T16:07:08+03:00</dc:date>
        <title>lfa:2023:coding-style</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:coding-style&amp;rev=1699279628&amp;do=diff</link>
        <description>Code Quality check

The project will be evaluated for code quality using a set of automated tools, but additional inspection may be done during the presentation by your TA.

The code quality features we will be testing can be divided in two categories: bad practices and improvement suggestions.</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab01&amp;rev=1728239382&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-06T21:29:42+03:00</dc:date>
        <title>lfa:2023:lab01</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab01&amp;rev=1728239382&amp;do=diff</link>
        <description>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:2023:lab02&amp;rev=1728239436&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-06T21:30:36+03:00</dc:date>
        <title>lfa:2023:lab02</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab02&amp;rev=1728239436&amp;do=diff</link>
        <description>2. Deterministic Finite Automata and Regular Expressions

2.1. DFA practice

	*  Blue = final state
	*  Orange = non-final 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} \} $$ L=\{w \in \{0,1,2,3\}^* \text{ | w follows the rule that every zero is immediately followed by a sequen…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab03&amp;rev=1698745401&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-10-31T11:43:21+03:00</dc:date>
        <title>lfa:2023:lab03</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab03&amp;rev=1698745401&amp;do=diff</link>
        <description>3. Regular expressions

3.1. Formation rules (concatenation, reunion, Kleene star)

3.1.1.

$ A=\{ 0^{2k} \mid k \geq 1 \}$

$ B = \{0, \epsilon \}$


$ AB = ? $



...

00...&lt;-

	*  where the words in the language that have an even length are obtained by combining a word from A with the word ε from B
	*  and those with an odd length are obtained by combining a word from A with the word 0 from B$ A = \{ 0^n 1^n \mid n \geq 1 \}$$ B = \{ 1^n \mid n \geq 1 \} $$ AB = ? $$ BA = ? $$ A = \emptyset $…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab04&amp;rev=1699283340&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-11-06T17:09:00+03:00</dc:date>
        <title>lfa:2023:lab04</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab04&amp;rev=1699283340&amp;do=diff</link>
        <description>4. Regex to DFA conversion

4.1. Nondeterministic Finite Automata

4.1.1. Consider the following NFA:



What are all reachable configurations from (0,abba) ?
-&gt;-&gt;-&gt;-&gt;$\varepsilon$
-&gt;-&gt;-&gt;-&gt;$\varepsilon$

-&gt;-&gt;-&gt;

4.1.2. What is the accepted language of the previous NFA? 
$\cup$$\cup$$\cup$$\cup$$\varepsilon$

4.1.3. Write an NFA $ \varepsilon$$ L = \{abc,abd,aacd\}$$ \Sigma = \{a,b,c,d\}$$ (0,abbabbb)$$ (1 \cup \varepsilon)(00^*1)^*0^*$$ (1 \cup \varepsilon)(00^*1)^*0^*$$\in$$ \varepsilon$$ E(q)$</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab05&amp;rev=1699698545&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-11-11T12:29:05+03:00</dc:date>
        <title>lfa:2023:lab05</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab05&amp;rev=1699698545&amp;do=diff</link>
        <description>5. Minimal DFAs

Consider the following DFAs: 
 DFA 1  DFA 2    
5.1. Equivalence between states

5.1.1. Identify a pair of states which are indistinguishable. (Solve the exercise for the 2 given DFAs.)
 DFA 1


“”“”
 DFA 2


“”“”

5.1.2. Identify a pair of final or non-final states which are $ \delta$$ \delta(q,c)=q'$$ q$$ c$$ \delta(q,c)$$ c$$ \delta$$ (1\cup\epsilon)(00^*1)^*0^*$$ (10\cup 0)^*(01 \cup 1)^*(0 \cup \epsilon)$$ E1 = ((ab^*a)^+b)^* $$ E2 = (a(b\mid aa)^*ab)^* $$\varepsilon$…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab06&amp;rev=1700775260&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-11-23T23:34:20+03:00</dc:date>
        <title>lfa:2023:lab06</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab06&amp;rev=1700775260&amp;do=diff</link>
        <description>6. Dfa to Regex conversions

6.1. State elimination

Consider the following DFAs:
 DFA1  DFA2   
Convert the given DFAs to a Regex (using the state-elimination strategy). 
Hint: is it easier to apply conversion on another DFA?





Step 1:









 Step 2:$ X, A$$ B$$ X = A\cdot X \cup B$$ X = A^*B$$ e_A, e_B$$ X = L(e_A)\cdot X \cup L(e_B)$$ X = L(e_A^*e_B)$$ q$$ q = c_1 q_1 \cup c_2 q_2 \ldots c_n q_n$$ \delta(q,c_i) = q_i$$ c_i\in\Sigma$$ q_i$$ c_i$$ q$$ q$$ \epsilon$$ q = c_1 q_1 \cup c_2 q…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab07&amp;rev=1701695001&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-12-04T15:03:21+03:00</dc:date>
        <title>lfa:2023:lab07</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab07&amp;rev=1701695001&amp;do=diff</link>
        <description>7. Closure properties

7.1.1. Identify different strategies to verify that two regular expressions generate the same language. State them as algorithmic procedures.



	*  You can use an existing minimisation algorithm to find the minimal DFAs. Then, label each state from each DFA from 0 to |K|. Fix an ordering of the symbols of the alphabet. Sort the transitions by symbol. Make a textual representation of each DFA which includes the number of states and the sorted transition function.  If the t…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab08&amp;rev=1702034595&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-12-08T13:23:15+03:00</dc:date>
        <title>lfa:2023:lab08</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab08&amp;rev=1702034595&amp;do=diff</link>
        <description>8. Proving languages are not regular
 Pumping Lemma 
$\forall w \in L$$\exists n \in \mathbf{N}$$ |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 \mathbf{N}$$\exists w_{n} \in L $$ |w| \ge n $$ w_{n} $$ 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 lemma holds for finite languages.

$ n \gt max_…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab09&amp;rev=1705437085&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-16T22:31:25+03:00</dc:date>
        <title>lfa:2023:lab09</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab09&amp;rev=1705437085&amp;do=diff</link>
        <description>9. Context-Free Languages

9.1. Accepting and generating a CF language

Write a PDA as well as a CF grammar for the following languages. Specify - for each PDA, the way it accepts (by empty-stack or by final state). 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…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab10&amp;rev=1705437144&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-16T22:32:24+03:00</dc:date>
        <title>lfa:2023:lab10</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab10&amp;rev=1705437144&amp;do=diff</link>
        <description>10. Context-Free Languages &amp; Lexers

10.1. Context-Free Grammar to PDA conversion

For each context-free grammar G: 


	*  describe L(G) 

	*  algoritmically construct a PDA that accepts the same language 

	*  run the PDA on the given inputs 

	*  is the grammar ambiguous? If yes, write a non ambiguous grammar that generates the same language $ S \leftarrow aS | aSb | \epsilon $$ A \leftarrow \gamma $$ \epsilon, S/aS $$ \epsilon, S/aSb $$ \epsilon, S/\epsilon $$ a, a/\epsilon $$ b, b/\epsilon $…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab11&amp;rev=1704791160&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-01-09T11:06:00+03:00</dc:date>
        <title>lfa:2023:lab11</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab11&amp;rev=1704791160&amp;do=diff</link>
        <description>11. Context-Free Grammars

11.1. Chomsky Normal Form

Write the following grammars in CNF:

11.1.1 
$ S \leftarrow ABC \\ A \leftarrow aAb \mid \epsilon \\ B \leftarrow bBc \mid bc \\ C \leftarrow cC \mid c $
Step 1:

$ X \leftarrow \alpha y \beta $$ X \leftarrow \alpha Y \beta, Y \leftarrow y $


$ S \leftarrow ABC \\ A \leftarrow L_aAL_b | \epsilon \\ B \leftarrow L_bBL_c | L_bL_c \\ C \leftarrow L_cC | L_c \\ L_a \leftarrow a \\ L_b \leftarrow b \\ L_c \leftarrow c $
Step 2:



$ S \leftarrow…</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab_python_extras&amp;rev=1700074490&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-11-15T20:54:50+03:00</dc:date>
        <title>lfa:2023:lab_python_extras</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:lab_python_extras&amp;rev=1700074490&amp;do=diff</link>
        <description>Python extras

These extra sections are slightly more advanced python topics which will be useful for the project.

Python 3.12 generics

Python 3.12 introduces a more intuitive syntax for generics than the one presented in Programming introduction - Python. The new syntax is closer to generics in other languages such as Java or C++. The following code (in old syntax):</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:proiect&amp;rev=1734000023&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-12-12T12:40:23+03:00</dc:date>
        <title>lfa:2023:proiect</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:proiect&amp;rev=1734000023&amp;do=diff</link>
        <description>Deadline etapa 1: 22 nov 2023 23:59

Deadline etapa 2: 6 dec 2023 23:59

Deadline etapa 3: 10 jan 2024 23:59

Schelet etapa 1 

Schelet etapa 2 

Schelet etapa 3 

Proiect

Proiectul consta in implementarea unui lexer in python.

Ce este un lexer?

Un lexer este un program care imparte un sir de caractere in subsiruri numite $ \Delta$$ K \times \Sigma \times K$</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:proiect_coding_style&amp;rev=1730199068&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-29T12:51:08+03:00</dc:date>
        <title>lfa:2023:proiect_coding_style</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:proiect_coding_style&amp;rev=1730199068&amp;do=diff</link>
        <description>Coding Style

Pe Moodle, pe langa punctajul pe testele unitare de pe checkerul local, daca aveti punctaj maxim, o sa primiti si un scor pe coding style, la etapa 1 arata ceva de genul:


Total Score: xx/100
Coding Style
	global score: x.xx
	accept function score: x.xx
	subset construction function score: x.xx</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:proiect_e2&amp;rev=1699446214&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-11-08T14:23:34+03:00</dc:date>
        <title>lfa:2023:proiect_e2</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:proiect_e2&amp;rev=1699446214&amp;do=diff</link>
        <description>Deadline etapa 1: 22 nov 2023 23:59

Deadline etapa 2: 6 dec 2023 23:59

Schelet etapa 1 

Schelet etapa 2 

Proiect

Proiectul consta in implementarea unui lexer in python.

Ce este un lexer?

Un lexer este un program care imparte un sir de caractere in subsiruri numite $ \Delta$$ K \times \Sigma \times K$</description>
    </item>
    <item rdf:about="https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:team&amp;rev=1697913366&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-10-21T21:36:06+03:00</dc:date>
        <title>lfa:2023:team</title>
        <link>https://ocw.cs.pub.ro/ppcarte/doku.php?id=lfa:2023:team&amp;rev=1697913366&amp;do=diff</link>
        <description>Limbaje Formale și Automate 2023-2024

Echipa

Curs

	*  Matei POPOVICI

Seminarii

	*  Alexandra UDRESCU
	*  Mihai CALITESCU
	*  Mihai UDUBASA
	*  Theodor-Andrei PRUTEANU

Orar

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