0% found this document useful (0 votes)
4 views3 pages

Parcial Final

The document presents a workshop titled 'Taller 4' by Andres Enrique Cardenas Florez, focusing on constructing pushdown automata for specific languages defined by the conditions on the counts of characters 'a', 'b', and 'c'. Three languages are detailed, with corresponding diagrams illustrating the automata for each language. The languages include conditions such as 'i < j', 'i + j = k', and 'i + k = j'.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Parcial Final

The document presents a workshop titled 'Taller 4' by Andres Enrique Cardenas Florez, focusing on constructing pushdown automata for specific languages defined by the conditions on the counts of characters 'a', 'b', and 'c'. Three languages are detailed, with corresponding diagrams illustrating the automata for each language. The languages include conditions such as 'i < j', 'i + j = k', and 'i + k = j'.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

\documentclass{article}

\usepackage{graphicx} % Required for inserting images


\usepackage{tikz}
\usepackage{amsfonts}
\usetikzlibrary{automata, positioning}
\title{Taller 4}
\author{Andres Enrique Cardenas Florez}
\date{November 2024}

\begin{document}

\maketitle
Para cada uno de los siguientes lenguajes, construya un autómata de pila
que lo lea:
\begin{enumerate}
\item $\{a^{i}b^{j}c^{k} | i, j, k \in \mathbb{N}, i < j\}$

\begin{figure}[htbp]
\centering
\begin{tikzpicture}[shorten >=1pt, node distance=2.5cm, on grid, auto, >=latex]
\tikzstyle{state}=[circle, draw, minimum size=10mm]
\tikzstyle{accept}=[state, double]
\tikzstyle{trans}=[-latex, thick]

% Nodes
\node[state, initial, initial text=Inicio] (q0) {$q_0$};
\node[state] (q1) [right=of q0] {$q_1$};
\node[state] (q2) [right=of q1] {$q_2$};
\node[state] (q3) [right=of q2] {$q_3$};
\node[state, accepting] (q4) [right=of q3] {$q_4$};

% Transitions
\path[trans]
(q0) edge node {$\lambda,\lambda \rightarrow \$$} (q1)
(q1) edge[loop above] node {$a,\lambda \rightarrow a$} (q1)
(q1) edge node { $\lambda, \lambda \rightarrow \lambda$} (q2)
(q2) edge[loop above] node{b,a$\rightarrow \lambda$}(q2)
(q2) edge node {$b, \$ \rightarrow \lambda$} (q3)
(q3) edge[loop above] node{$b,\lambda \rightarrow \lambda$}(q3)
(q3) edge node {$c, \lambda \rightarrow c$} (q4)
(q4) edge[loop above] node{$c,\lambda \rightarrow \lambda$}(q4);

\end{tikzpicture}
\end{figure}

\item $\{a^{i}b^{j}c^{k} | i, j, k \in \mathbb{N}, i+j=k\}$

\begin{figure}[htbp]
\centering
\begin{tikzpicture}[shorten >=1pt, node distance=2.5cm, on grid, auto, >=latex]
\tikzstyle{state}=[circle, draw, minimum size=10mm]
\tikzstyle{accept}=[state, double]
\tikzstyle{trans}=[-latex, thick]

% Nodes
\node[state, initial, initial text=Inicio] (q0) {$q_0$};
\node[state] (q1) [right=of q0] {$q_1$};
\node[state] (q2) [right=of q1] {$q_2$};
\node[state] (q3) [right=of q2] {$q_3$};
\node[state, accepting] (q4) [right=of q3] {$q_4$};

% Transitions
\path[trans]
(q0) edge node {$\lambda,\lambda \rightarrow \$$} (q1)
(q1) edge[loop above] node {$a,\lambda \rightarrow a$} (q1)
(q1) edge node { $\lambda, \lambda \rightarrow \lambda$} (q2)
(q2) edge[loop above] node{$b,\lambda \rightarrow \lambda$}(q2)
(q2) edge node {$\lambda, \lambda \rightarrow \lambda$} (q3)
(q3) edge[loop above] node[align=center]{
$c,a \rightarrow \lambda$\\
$c,b \rightarrow \lambda$
} (q3)
(q3) edge node {$\lambda, \$ \rightarrow \lambda$} (q4);

\end{tikzpicture}
\end{figure}

\item $\{a^{i}b^{j}c^{k} | i, j, k \in \mathbb{N}, i+k=j\}$

\end{enumerate}

\begin{figure}[htbp]
\centering
\begin{tikzpicture}[shorten >=1pt, node distance=2.5cm, on grid, auto, >=latex]
\tikzstyle{state}=[circle, draw, minimum size=10mm]
\tikzstyle{accept}=[state, double]
\tikzstyle{trans}=[-latex, thick]

% Nodes
\node[state, initial, initial text=Inicio] (q0) {$q_0$};
\node[state] (q1) [right=of q0] {$q_1$};
\node[state] (q2) [right=of q1] {$q_2$};
\node[state] (q3) [right=of q2] {$q_3$};
\node[state, accepting] (q4) [right=of q3] {$q_4$};

% Transitions
\path[trans]
(q0) edge node {$\lambda,\lambda \rightarrow \$$} (q1)
(q1) edge[loop above] node {$a,\lambda \rightarrow a$} (q1)
(q1) edge node { $\lambda, \lambda \rightarrow \lambda$} (q2)
(q2) edge[loop above] node{b,a$\rightarrow \lambda$}(q2)
(q2) edge node {$b, \$ \rightarrow \lambda$} (q3)
(q3) edge[loop above] node{$b,\lambda \rightarrow c$}(q3)
(q3) edge node {$\lambda , \lambda \rightarrow \lambda$} (q4)
(q4) edge[loop above] node[align=center]{
$\lambda,c \rightarrow \lambda$\\
$\lambda, \$ \rightarrow \lambda$
}(q4);

\end{tikzpicture}
\end{figure}
\end{document}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy