%%%%%%%%%%%%%%%%%%%%% PACKAGE IMPORTS %%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt]{article}
\usepackage{amsmath, amsfonts, amsthm, amssymb}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{fullpage}       
\usepackage{changepage}

\usepackage[x11names, rgb]{xcolor}
\usepackage{graphicx}
\usepackage[nooldvoltagedirection]{circuitikz}
\usepackage{tikz}
\usetikzlibrary{automata,arrows,positioning}
\tikzset{
->, % makes the edges directed
% >=stealth’, % makes the arrow heads bold
node distance=3cm, % specifies the minimum distance between two nodes. Change if necessary.
every state/.style={thick, fill=gray!10}, % sets the properties for each ’state’ node
initial text=$ $, % sets the text that appears on the start arrow
}
\usepackage{datetime}
\usepackage{etoolbox}
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{listings}
\usepackage{array}
\usepackage{varwidth}
\usepackage{tcolorbox}

%%%%%%%%%%%%%%%%%%%%%%% DATE DISPLAY %%%%%%%%%%%%%%%%%%%%%%%
%% This is math to change Overleaf's default timezone     %%
%% from GMT to PST. It doesn't account for daylight       %%
%% savings, so it may seem a day ahead or late at times,  %%
%% but no worries. It'll fix itself in an hour :D         %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifnum\currenthour<6 
  \advance\currenthour+18
  \ifnum\day=1
    \testifleapyear\year
    \ifnum\month=1 \month13\advance\year-1\fi
    \advance\month-1
    \day\ifcase\month\or31\or\ifDTleapyear
        29\else 28\fi\or31\or30\or31\or30\or31\or
        31\or30\or31\or30\or31\fi
  \else\advance\day-1\fi
\else\advance\currenthour-6\fi

%%%%%%%%%%%%%%%%%%%%%%%% QUESTION # %%%%%%%%%%%%%%%%%%%%%%%%
%% You can ignore this for the most part. Basically it    %%
%% helps number your questions and creates a new page     %%
%% with each question for the aesthetics. It also creates %%
%% parts i.e. (a) (b) (c) for multiple part questions.    %%
%% To use do: \begin{question} ... \end{question}         %%
%% and: \begin{part} ... \end{part}                       %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt plus 1pt}

\providetoggle{questionnumbers}
\settoggle{questionnumbers}{true}
\newcommand{\noquestionnumbers}{
    \settoggle{questionnumbers}{false}
}

\newcounter{questionCounter}
\newenvironment{question}[2][\arabic{questionCounter}]{%
    \ifnum\value{questionCounter}=0 \else {\newpage}\fi%
    \setcounter{partCounter}{0}%
    \vspace{.25in} \hrule \vspace{0.5em}%
    \noindent{\bf \iftoggle{questionnumbers}{Question #1: }{}#2}%
    \addtocounter{questionCounter}{1}%
    \vspace{0.8em} \hrule \vspace{.10in}%
}

\newcounter{partCounter}[questionCounter]
\renewenvironment{part}[1][\alph{partCounter}]{%
    \addtocounter{partCounter}{1}%
    \vspace{.10in}%
    \begin{indented}%
       {\bf (#1)} %
}{\end{indented}}

\def\indented#1{\list{}{}\item[]}
\let\indented=\endlist
\def\show#1{\ifdefempty{#1}{}{#1\\}}

%%%%%%%%%%%%%%%%%%%%%%%% SHORT CUTS %%%%%%%%%%%%%%%%%%%%%%%%
%% This is just to improve your quality of life. Instead  %%
%% of having to type long things, you can type short      %%
%% things. Ex: \IMP instead of \rightarrow to get ->      %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\IMP{\rightarrow}
\def\AND{\wedge}
\def\OR{\vee}
\def\BI{\leftrightarrow}
\def\DIFF{\setminus}
\def\SUB{\subseteq}

\newcolumntype{C}{>{\centering\arraybackslash}m{1.5cm}}
\renewcommand\qedsymbol{$\blacksquare$}

%%%%%%%%%%%%%%%%%%%%%%%% ANSWER BOX %%%%%%%%%%%%%%%%%%%%%%%%
%% This will improve the quality of life for your TA.     %%
%% Use \begin{answer} and \end{answer} to surround your   %%
%% answers so it will be easier to see. You can adjust    %%
%% the background and frame colors below as needed.       %%
%% Here is the manual to help: tinyurl.com/tcolorbox-man  %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtcolorbox{answer}
{
  colback   = green!5!white,    % Background color
  colframe  = green!75!black,   % Outline color
  box align = center,           % Align box on text line
  varwidth upper,               % Enables multi line input
  hbox                          % Bounds box to text width
}

%%%%%%%%%%%%%%%%%%%%%%%%%%% TITLE %%%%%%%%%%%%%%%%%%%%%%%%%%
%% This is shows the homework number, your name, your     %%
%% collaborators, and the day. If you'd prefer to not so  %%
%% your name, just comment out the "\maketitle" below.    %%
%% If you want to change the date, look in \date{...} and %%
%% change out "\advance\day-1\today" for what you want    %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{\vspace{-2cm}Quick Check: DFAs and NFAs\vspace{-0.3cm}}
\author{**YOUR NAME HERE** \thanks{
Collaborators: List collaborators here or delete if none}}
\date{\vspace{-0.3cm}\today\vspace{-1cm}}

%%%%%%%%%%%%%%%%%%%%%%%% WORK BELOW %%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\maketitle

%%%%%%%%%%%%%%%%%%%%%%%% QUESTION 0 %%%%%%%%%%%%%%%%%%%%%%%%
\begin{question}{Constructing DFAs and NFAs}
\begin{part}
Let $\Sigma = \{0, 1\}$ and $L$ be the language over $\Sigma$ such that $w \in L$ iff. $w$ contains an even number of $1$s and odd number of $0$'s and does not contain the substring $10$. \\\\
Give a DFA to accept strings in $L$. 
    \begin{answer}
    %% TODO: your solution here
    % If you want to include an image of a hand-drawn solution:
    % 1. Upload the image to overleaf. Say it's called image.png and you put it in a folder called Images
    % 2. Uncomment the code below
    % 3. Replace path/to/image.png with the full path to your image. In our example this would be Images/image.png
    % 4. Change the width option (currently 0.3\textwidth) to make the image larger or smaller.
    
    % \begin{center}
    %     \includegraphics[width=0.3\textwidth]{path/to/image.png}
    % \end{center}   
    
    \end{answer}
\end{part}

\begin{part}
Let $\Sigma = \{0, 1, 3, 9\}$ and $L$ be the language over $\Sigma$ such that $w \in L$ iff. The string "311" is a substring of $w$. \\\\
Give an NFA to accept strings in $L$. 

% \vspace{5cm}
    \begin{answer}
    %% TODO: your solution here   
    
    \end{answer}
\vspace{8cm}
\end{part}
\end{question}
%%%%%%%%%%%%%%%%%%%%%%%% QUESTION 1 %%%%%%%%%%%%%%%%%%%%%%%%
\begin{question}{Video Solution}
    \begin{part}
    What is one thing you took away from the video solution?
    \begin{answer}
    %% TODO: Your answer here
    
    \end{answer}
    \end{part}

    \begin{part}
    \textbf{Optional:} How did you like the Imposter Syndrome Workshop? Any feedback for future quarters?
        \begin{answer}
            
        \end{answer}
    \end{part}
    
\end{question}

\end{document}
