%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  _______  _______  __  _______   ______
% |       ||       ||  ||       | |      |
% |       ||  _____||  ||____   | |   |  |
% |       || |_____ |  |    |   | |   |  |
% |      _||_____  ||  |    |   | |   |  |
% |     |_  _____| ||  |    |   | |      |
% |_______||_______||__|    |___| |______|
%
% Header and Style File for CS170 TeX Files
%
% This package contains references to other packages, new commands, and values
% for different parameters, common to all documents.
% This file should be placed one level above the TeX files in the directory
% tree.
%
% Please modify the appropriate section below with information about
% the class: this information needs to be updated only once per semester.
%
% Compiled by Aditya Baradwaj (abaradwaj@berkeley.edu),
% with significant inspiration taken from CS 70's header.sty file,
% which was compiled and cleaned by Alvin Wan (http://alvinwan.com)
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\ProvidesPackage{cs170}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Course Information
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% MODIFY THIS INFORMATION AS NECESSARY

\def\coursenumber{CS 170}
\def\class{Efficient Algorithms and Intractable Problems}
\def\semester{Spring 2022}
\def\instructor{P. Raghavendra and J. Wright}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages Needed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Algorithms
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{bbm}
\usepackage{cancel}
\usepackage{caption}
\usepackage{circuitikz}
\usepackage{color}
\usepackage{colortbl}
\usepackage{enumerate}
\usepackage{csquotes}
% \usepackage{enumitem}
\usepackage{epsf}
\usepackage{fancyhdr}
\usepackage{forest}
\usepackage{float}
\usepackage{framed}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{import}
\usepackage{latexsym}
\usepackage{listings}
\usepackage{mathtools}
\usepackage{paralist}
\usepackage{tabu}
\usepackage{textcomp}
\usepackage{tikz}
\usepackage{url}
\usepackage{verbatim}
\usepackage[all]{xy}
\usetikzlibrary{automata, arrows, positioning, shapes}

\usepackage{multicol}
\usepackage[margin=1.2in]{geometry}

\usepackage{algorithm}
\usepackage[noend]{algpseudocode}

%\usepackage[ruled, vlined]{algorithm2e}
%\setlength\parindent{0pt}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Header and Title
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pagestyle{fancy}
\usepackage{color}
\setlength{\headheight}{20pt}
\setlength{\headsep}{10pt}
\fancyhead[L]{\small{\coursenumber, \semester}}
\fancyhead[C]{\small{\title}}
\fancyhead[R]{\small{\instructor}}
\fancyfoot[C]{\small{$\thepage$}}

% The \title command gets defined in the .erb template file
\def\maketitle{
    \section*{CS 170 \title}
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Other
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Commands for questions, parts, and solutions
\newcommand{\question}[1]{\section{#1}}
\newenvironment{subparts}{\begin{enumerate}[(a)]
\newcommand\subpart{\item}}{\end{enumerate}}
\newenvironment{solution}{\color{blue} \smallskip \textbf{Solution:}}{}
\newcount\starcounter
\newcommand{\stars}[1]{%
	(%
	\starcounter0
	\loop\ifnum\starcounter < #1
	$\bigstar$%
	\advance\starcounter by 1
	\repeat
	)
}

% Only keep in the original doc, not the solutions.
\newcommand{\hideifsol}[1]{#1}

% Theorem environments
\newtheorem{claim*}{Claim}

% Other math commands

%%%%%% bold font in math mode; this sucks but is simplest for now
\newcommand{\mbf}[1]{\mbox{{\bfseries #1}}}
\newcommand{\smbf}[1]{\mbox{{\scriptsize\bfseries #1}}}

\newcommand{\mc}[1]{\mathcal{#1}}
\newcommand{\msf}[1]{\mathsf{#1}}

\def\C{\mathbb{C}}
\def\N{\mathbb{N}}
\def\R{\mathbb{R}}
\def\X{\mbf{X}}
\def\x{\mbf{x}}
\def\sx{\smbf{x}}
\def\Y{\mbf{Y}}
\def\y{\mbf{y}}
\def\sy{\smbf{y}}
\def\e{\mathrm{e}}
\def\T{\mbf{T}}
\def\O{\textrm{O}}  % repeated below because it gets redefined by some package?
\def\Q{\mathbb{Q}}
\def\se{\smbf{e}}
\def\Z{\mathbb{Z}}
\def\z{\mbf{z}}
\def\sz{\smbf{z}}
\def\F{\mathbb{F}}
\def\f{\mbf{f}}
\def\A{\mbf{A}}
\def\B{\mbf{B}}
\def\b{\mbf{b}}
% Used in, e.g. \int_0^1 x \, \D x.
\def\D{\mathrm{d}}
% fancy big_O
\def\O{\mathcal{O}}
\def\m{\mbf{m}}
\def\I{\mbf{I}}
\def\ones{\mbf{1}}
\def\ev{\mbf{ev}}
\def\fv{\mbf{ev}}
\def\sv{\mbf{sv}}
\def\e{\mathop{\mathrm{e}}\nolimits}  % for e = 2.718...


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Additional commands
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Feel free to add commands here

\def\defeq{\mathrel{\mathop:}=}
\def\ceil#1{\lceil #1 \rceil}
\def\ceiling#1{\lceil #1 \rceil}
\def\floor#1{\lfloor #1 \rfloor}
\newcommand{\set}[1]{\left\{#1\right\}}
\def\qed{$\Box$}

\newcommand{\bone}{\boldsymbol{1}}
\newcommand{\balpha}{\boldsymbol{\alpha}}
\newcommand{\bbeta}{\boldsymbol{\beta}}
\newcommand{\bdelta}{\boldsymbol{\delta}}
\newcommand{\bepsilon}{\boldsymbol{\epsilon}}
\newcommand{\blambda}{\boldsymbol{\lambda}}
\newcommand{\bomega}{\boldsymbol{\omega}}
\newcommand{\bpi}{\boldsymbol{\pi}}
\newcommand{\bnu}{\boldsymbol{\nu}}
\newcommand{\bphi}{\boldsymbol{\phi}}
\newcommand{\bvphi}{\boldsymbol{\varphi}}
\newcommand{\bpsi}{\boldsymbol{\psi}}
\newcommand{\bsigma}{\boldsymbol{\sigma}}
\newcommand{\btheta}{\boldsymbol{\theta}}
\newcommand{\bzeta}{\boldsymbol{\zeta}}
\newcommand{\bxi}{\boldsymbol{\xi}}
\newcommand{\ba}{\boldsymbol{a}}
\newcommand{\bb}{\boldsymbol{b}}
\newcommand{\bc}{\boldsymbol{c}}
\newcommand{\bd}{\boldsymbol{d}}
\newcommand{\be}{\boldsymbol{e}}
\newcommand{\boldf}{\boldsymbol{f}}
\newcommand{\bg}{\boldsymbol{g}}
\newcommand{\bh}{\boldsymbol{h}}
\newcommand{\bi}{\boldsymbol{i}}
\newcommand{\bj}{\boldsymbol{j}}
\newcommand{\bk}{\boldsymbol{k}}
\newcommand{\bell}{\boldsymbol{\ell}}
\newcommand{\bp}{\boldsymbol{p}}
\newcommand{\br}{\boldsymbol{r}}
\newcommand{\bs}{\boldsymbol{s}}
\newcommand{\bt}{\boldsymbol{t}}
\newcommand{\bu}{\boldsymbol{u}}
\newcommand{\bv}{\boldsymbol{v}}
\newcommand{\bw}{\boldsymbol{w}}
\newcommand{\bx}{{\boldsymbol{x}}}
\newcommand{\by}{\boldsymbol{y}}
\newcommand{\bz}{\boldsymbol{z}}
\newcommand{\bA}{\boldsymbol{A}}
\newcommand{\bB}{\boldsymbol{B}}
\newcommand{\bC}{\boldsymbol{C}}
\newcommand{\bD}{\boldsymbol{D}}
\newcommand{\bE}{\boldsymbol{E}}
\newcommand{\bF}{\boldsymbol{F}}
\newcommand{\bG}{\boldsymbol{G}}
\newcommand{\bH}{\boldsymbol{H}}
\newcommand{\bI}{\boldsymbol{I}}
\newcommand{\bJ}{\boldsymbol{J}}
\newcommand{\bL}{\boldsymbol{L}}
\newcommand{\bP}{\boldsymbol{P}}
\newcommand{\bQ}{\boldsymbol{Q}}
\newcommand{\bR}{\boldsymbol{R}}
\newcommand{\bS}{\boldsymbol{S}}
\newcommand{\bT}{\boldsymbol{T}}
\newcommand{\bU}{\boldsymbol{U}}
\newcommand{\bV}{\boldsymbol{V}}
\newcommand{\bW}{\boldsymbol{W}}
\newcommand{\bX}{\boldsymbol{X}}
\newcommand{\bY}{\boldsymbol{Y}}
\newcommand{\bZ}{\boldsymbol{Z}}

\newcommand{\E}{\mathbf{E}}
\newcommand{\Var}{\mathbf{Var}}
\newcommand{\wt}{\widetilde}
\newcommand{\eps}{\varepsilon}
