\documentclass[a4paper,11pt]{article}
\usepackage[croatian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{html}       % defines \url{}, \latex{}, \html{}, etc
\usepackage{ifpdf}      % allow selection based on pdflatex or latex
\newcommand{\pdflatex}[1]{\ifpdf\latex{#1}\fi}
\usepackage{graphicx}   % defines \includegraphics{mp/piezo.2}
% if pdftex doesn't recognize the type, it's mps                                
% usage: \DeclareGraphicsRule{ext}{type}{sizefile}{command}                             
\pdflatex{\DeclareGraphicsRule{*}{mps}{*}{}}


\addtolength{\hoffset}{-1cm}\addtolength{\textwidth}{2cm}
\addtolength{\voffset}{-2cm}\addtolength{\textheight}{2cm}
\setlength{\headheight}{3em}
\setlength{\arraycolsep}{2pt}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
\author{Filip Crljeni\'{c}}
\begin{document}
\begin{center}
Filip Crljeni\'{c}\\
Prvi zadatak 10 bodova.\\
\end{center}
Da li je jezik L$=\{w\in(o+p+q)^{*}|\ 2|w|_{o}=7|w|_{q}$ \}
\\
Rjesenje:
\\
Pretpostavimo da je L regularan,tada $\exists p \in \emph{N}$ takav da $\forall w \in L \ |w|>p, w=xyz$ tako da
\begin{enumerate}
	\item $ \forall i\geq 0 xy^{i}z\in L$
	\item $ |y|>0$
	\item $ |xy|<p$
\end{enumerate}
Uzmimo da je $w=o^{7p}q^{2p} \in L$\\
$|xy|<p \Rightarrow$ y dio se sastoji samo od o-ova

Pumpanjem izlazimo iz jezika(odma cemo imati da je $2|w|_{o}>7|w|_{q}$)
 

\begin{center}
Drugi zadatak 10 bodova.\\
\end{center}
Na\'{c}i PDA koji prepoznaje jezik L$=\{x^{m}yz^{n}|m>n\geq0\}$
\\
Rjesenje:\\
$\langle q_{0},x,\epsilon,q_{0},x\rangle$\\
$\langle q_{0},y,x,q_{1},\epsilon\rangle$\\
$\langle q_{1},z,x,q_{1},\epsilon\rangle$\\
$\langle q_{1},\epsilon,x,q_{1},\epsilon\rangle$\\

\begin{center}
Treci zadatak 10 bodova.\\
\end{center}
Konstruirajte Turingov stroj koji broj $\left(36800\right)_{13}$ dijeli sa 169.Glava se nalazi na najzna\v{c}ajnijoj znamenci.
\\
Rje\v{s}enje:
\\
Znamo da je $\left(169\right)_{10}=\left(100\right)_{13}$.Zna\'{c}i kada dijelimo sa 169 trebamo obrisati zadnje dvije znamenke.
\\
Turingov stroj:\\
$
\left(q_{0},3,q_{1},3,D\right)\\
\left(q_{1},6,q_{1},6,D\right)\\
\left(q_{1},8,q_{1},8,D\right)\\
\left(q_{1},0,q_{1},0,D\right)\\
\left(q_{1},0,q_{1},0,D\right)\\
\left(q_{1},\wedge,q_{2},\wedge,L\right)\\
\left(q_{2},0,q_{3},\wedge,L\right)\\
\left(q_{3},0,q_{f},\wedge,S\right)\\$
\\
\end{document}
