% LaTeX solution template for Math 530
% -----------------------------------------------------------------

% Like most advanced LaTeX files, this one begins with a lot of
% boilerplate. You don't need to understand (or even read) most of it.
% All you need to do is fill in your name, email address,
% and the number of the pset. (Search for "METADATA" to find the place
% for this.) Then, you can go straight to the "EXERCISE 1"
% section and start writing your solutions.
% The "VARIOUS USEFUL COMMANDS" section is probably worth taking a
% look at at some point.

% If you are here to learn about LaTeX, search for
% "START READING HERE" and start reading there.

%----------------------------------------------------------------------------------------
%	PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[paper=a4, fontsize=12pt]{scrartcl} % A4 paper and 12pt font size
\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs
\usepackage[english]{babel} % English language/hyphenation
\usepackage{amsmath,amsfonts,amsthm,amssymb} % Math packages
\usepackage{mathrsfs}    % More math packages
\usepackage{sectsty}  % Allows customizing section commands
\allsectionsfont{\centering \normalfont\scshape} % Make all section titles centered, the default font and small caps %remove this to left align section tites
\usepackage{hyperref} % Turns cross-references into hyperlinks,
                      % and defines \url and \href commands.
\usepackage{graphicx} % For embedding graphics files.
\usepackage{framed}   % For the "leftbar" environment used below.
\usepackage{ifthen}   % Used for the \powset command below.
\usepackage{lastpage} % for counting the number of pages
\usepackage[all,cmtip]{xy} % for commutative diagrams and simple graphs
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[height=10in,a4paper,hmargin={1in,0.8in}]{geometry}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tikz}     % This is a powerful tool to draw vector
                      % graphics inside LaTeX. In particular, you can
                      % use it to draw graphs.
\usepackage{verbatim} % For the "verbatim" environment, in which
                      % special symbols can be used freely without
                      % confusing the compiler. (And it's typeset in
                      % a constant-width font.)
                      % Useful, e.g., for quoting code (or ASCII art).

%\numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)

\setlength\parindent{20pt} % Makes indentation for paragraphs longer.
                           % This makes paragraphs stand out more.

%----------------------------------------------------------------------------------------
%	VARIOUS USEFUL COMMANDS
%----------------------------------------------------------------------------------------
% The commands below might be convenient. For example, you probably
% prefer to write $\powset[2]{V}$ for the set of $2$-element subsets
% of $V$, rather than writing $\mathcal{P}_2(V)$.
% Notice that you can easily define your own commands like this.
% Caveat: Some of these commands need to be properly "guarded" when
% they occur in subscripts or superscripts. So you should not write
% $K_\CC$, but rather $K_{\CC}$.
\newcommand{\CC}{\mathbb{C}} % complex numbers
\newcommand{\RR}{\mathbb{R}} % real numbers
\newcommand{\QQ}{\mathbb{Q}} % rational numbers
\newcommand{\NN}{\mathbb{N}} % nonnegative integers
\newcommand{\Z}[1]{\mathbb{Z}/#1\mathbb{Z}} % integers modulo k
                                            % (syntax: "\Z{k}")
\newcommand{\ZZ}{\mathbb{Z}} % integers
\newcommand{\id}{\operatorname{id}} % identity map
\newcommand{\lcm}{\operatorname{lcm}}
% Lowest common multiple. For historical reasons, LaTeX has a \gcd
% command built in, but not an \lcm command. The preceding line
% rectifies that.
\newcommand{\rev}{\operatorname{rev}} % reversal of a walk
\newcommand{\powset}[2][]{\ifthenelse{\equal{#2}{}}{\mathcal{P}\left(#1\right)}{\mathcal{P}_{#1}\left(#2\right)}}
% $\powset[k]{S}$ stands for the set of all $k$-element subsets of
% $S$. The argument $k$ is optional, and if not provided, the result
% is the whole powerset of $S$.
\newcommand{\set}[1]{\left\{ #1 \right\}}
% $\set{...}$ compiles to {...} (set-brackets).
\newcommand{\abs}[1]{\left| #1 \right|}
% $\abs{...}$ compiles to |...| (absolute value, or size of a set).
\newcommand{\tup}[1]{\left( #1 \right)}
% $\tup{...}$ compiles to (...) (parentheses, or tuple-brackets).
\newcommand{\ive}[1]{\left[ #1 \right]}
% $\ive{...}$ compiles to [...] (Iverson bracket, aka truth value).
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
% $\floor{...}$ compiles to |_..._| (floor function).
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
% $\ceil{...}$ compiles to |°...°| (ceiling function).
\newcommand{\verts}[1]{\operatorname{V}\left( #1 \right)}
% $\verts{...}$ compiles to V(...) (vertex set of a graph/digraph).
\newcommand{\edges}[1]{\operatorname{E}\left( #1 \right)}
% $\edges{...}$ compiles to E(...) (edge set of a graph).
\newcommand{\arcs}[1]{\operatorname{A}\left( #1 \right)}
% $\arcs{...}$ compiles to A(...) (arc set of a digraph).
\newcommand{\lf}[2]{#1^{\underline{#2}}}
% $\lf{...1}{...2}$ compiles to $...1^{\underline{...2}}$.
% This is a notation for the falling factorial.
\newcommand{\are}{\ar@{-}}
% In an xymatrix environment, $\are$ gives an arrow without
% arrowhead. I use this to represent edges in graphs.
\newcommand{\underbrack}[2]{\underbrace{#1}_{\substack{#2}}}
% $\underbrack{...1}{...2}$ yields
% $\underbrace{...1}_{\substack{...2}}$. This is useful for doing
% local rewriting transformations on mathematical expressions with
% justifications. For example, try this out:
% $ \underbrack{(a+b)^2}{= a^2 + 2ab + b^2 \\ \text{(by the binomial formula)}} $
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height
\newcommand{\nnn}{\nonumber\\} % Don't number this line in an "align" environment, and move on to the next line.
\newcommand{\explain}[1]{\tup{\hspace{-0.5pc}\text{\begin{tabular}{c}#1\end{tabular}\hspace{-0.5pc}}}}
% $\explain{...}$ interprets the "..." as text (you can
% nest some math inside by putting it in $...$'s as you
% would in any other text block) and puts it in parentheses.

%----------------------------------------------------------------------------------------
%	MAKING SUMMATION SIGNS ALWAYS PUT THEIR BOUNDS ABOVE AND BELOW
%	THE SIGN
%----------------------------------------------------------------------------------------
% The following are hacks to ensure that sums (such as
% $\sum_{k=1}^n k$) always put their bounds (i.e., the $k=1$ and the
% $n$) underneath and above the sign, as opposed to on its right.
% Same for products (\prod), set unions (\bigcup) and set
% intersections (\bigcap). Remove the 8 lines below if you do not want
% this behavior.
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\let\cupnonlimits\bigcup
\let\capnonlimits\bigcap
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\renewcommand{\bigcup}{\cupnonlimits\limits}
\renewcommand{\bigcap}{\capnonlimits\limits}

%----------------------------------------------------------------------------------------
%	ENVIRONMENTS
%----------------------------------------------------------------------------------------
% The incantations below define how theorem environments
% (\begin{theorem} ... \end{theorem}) and their likes will look like.
\newtheoremstyle{plainsl}% <name>
  {8pt plus 2pt minus 4pt}% <Space above>
  {8pt plus 2pt minus 4pt}% <Space below>
  {\slshape}% <Body font>
  {0pt}% <Indent amount>
  {\bfseries}% <Theorem head font>
  {.}% <Punctuation after theorem head>
  {5pt plus 1pt minus 1pt}% <Space after theorem headi>
  {}% <Theorem head spec (can be left empty, meaning `normal')>

% Environments which make the text inside them slanted:
\theoremstyle{plainsl}
  \newtheorem{theorem}{Theorem}[section]
  \newtheorem{proposition}[theorem]{Proposition}
  \newtheorem{lemma}[theorem]{Lemma}
  \newtheorem{corollary}[theorem]{Corollary}
  \newtheorem{conjecture}[theorem]{Conjecture}
% Environments that don't:
\theoremstyle{definition}
  \newtheorem{definition}[theorem]{Definition}
  \newtheorem{example}[theorem]{Example}
  \newtheorem{exercise}[theorem]{Exercise}
  \newtheorem{examples}[theorem]{Examples}
  \newtheorem{algorithm}[theorem]{Algorithm}
  \newtheorem{question}[theorem]{Question}
 \theoremstyle{remark}
  \newtheorem{remark}[theorem]{Remark}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\newenvironment{fineprint}{\begin{small}}{\end{small}}

%----------------------------------------------------------------------------------------
%	METADATA
%----------------------------------------------------------------------------------------
\newcommand{\myname}{Darij Grinberg} % ENTER YOUR NAME HERE
\newcommand{\mymail}{darij.grinberg@drexel.edu} % ENTER YOUR EMAIL HERE
\newcommand{\psetnumber}{1} % ENTER THE NUMBER OF THIS PSET HERE

%----------------------------------------------------------------------------------------
%	HEADER AND FOOTER
%----------------------------------------------------------------------------------------
\ihead{Math 530 Homework set \#\psetnumber} % Page header left
\ohead{page \thepage\ of \pageref{LastPage}} % Page header right
\ifoot{\myname} % left footer
\ofoot{\mymail} % right footer

%----------------------------------------------------------------------------------------
%	TITLE SECTION
%----------------------------------------------------------------------------------------
\title{	
\normalfont \normalsize 
\textsc{Drexel University, Department of Mathematics} \\ [25pt] % Your university, school and/or department name(s)
\horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule
\huge Math 530: Graph Theory, Spring 2022: \\
Homework \psetnumber\\% The assignment title
due 2022-04-06 at 11:00 AM \\
\textbf{Please solve 4 of the 8 problems!} \\
\horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule
}
\author{\myname}

\begin{document}

\maketitle % This command causes the title part to be printed.

%----------------------------------------------------------------------------------------
%	EXERCISE 1
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 1}

\subsection{Problem}

Let $G = \tup{V, E}$ be a simple graph. Set $n = \abs{V}$.
Prove that we can find some edges $e_1, e_2, \ldots, e_k$
of $G$ and some triangles $t_1, t_2, \ldots, t_\ell$
of $G$ such that $k + \ell \leq n^2 / 4$ and such that each
edge $e \in E \setminus \set{ e_1, e_2, \ldots, e_k }$ is a
subset of (at least) one of the triangles
$t_1, t_2, \ldots, t_\ell$.

\subsection{Remark}

This is a generalization of Mantel's theorem (because if
$G$ has no triangles, then $\ell$ must be $0$, and thus
$e_1, e_2, \ldots, e_k$ must be all edges of $G$, so that
we conclude that $\abs{E} = k \leq k + \ell \leq n^2/4$).

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 2
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 2}

\subsection{Problem}

Let $G$ be a simple graph with $n$ vertices and $k$ edges,
where $n > 0$.
Prove that $G$ has at least $\dfrac{k}{3n} \tup{4k-n^2}$
triangles.

\subsection{Hint}

First argue that for any edge $vw$ of $G$,
the total number of triangles that contain $v$ and
$w$ is at least $\deg v + \deg w - n$.
Then, use the inequality
$n \tup{a_1^2 + a_2^2 + \cdots + a_n^2}
\geq \tup{a_1 + a_2 + \cdots + a_n}^2$, which holds for
any $n$ real numbers $a_1, a_2, \ldots, a_n$.
(This is a particular case of the Cauchy--Schwarz
inequality or the Chebyshev inequality or the Jensen
inequality -- pick your favorite!)

\subsection{Remark}

This, too, is a generalization of Mantel's theorem:
If $k > n^2 / 4$, then
$\dfrac{k}{3n} \tup{4k-n^2} > 0$, so the exercise entails
that $G$ has at least one triangle.

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 3
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 3}

\subsection{Problem}

Let $n$ be a positive integer.
Let $S$ be a simple graph with $2n$ vertices.
Prove that $S$ has two distinct vertices that have
an even number of common neighbors.

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 4
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 4}

\subsection{Problem}

Let $n \geq 2$ be an integer.
Let $G$ be a connected simple graph with $n$ vertices.

\begin{enumerate}

\item[\textbf{(a)}]
Describe $G$ if the degrees of the vertices of $G$
are $1, 1, 2, 2, \ldots, 2$ (exactly two $1$'s and
$n-2$ many $2$'s).

\item[\textbf{(b)}]
Describe $G$ if the degrees of the vertices of $G$
are $1, 1, \ldots, 1, n-1$.

\item[\textbf{(c)}]
Describe $G$ if the degrees of
the vertices of $G$ are $2, 2, \ldots, 2$.

\end{enumerate}

Here, to ``describe'' $G$ means to explicitly determine
(with proof) a graph that is isomorphic to $G$.

\subsection{Remark}

The situations in this exercise are, in a sense,
exceptional. Typically, the degrees of the vertices
of a connected graph do not uniquely determine the
graph up to isomorphism. For example, the two
connected graphs
\[
\begin{tikzpicture}
\begin{scope}[every node/.style={circle,thick,draw=green!60!black}]
\node(A) at (0:2) {$1$};
\node(B) at (60:2) {$2$};
\node(C) at (120:2) {$3$};
\node(D) at (180:2) {$4$};
\node(E) at (240:2) {$5$};
\node(F) at (300:2) {$6$} ;
\end{scope}
\begin{scope}[every edge/.style={draw=black,very thick}]
\path[-] (A) edge (B) (B) edge (C) (C) edge (D) (D) edge (E) (E) edge (F) (F) edge (A);
\path[-] (A) edge (D);
\path[-] (B) edge (E);
\path[-] (C) edge (F);
\end{scope}
\end{tikzpicture}
\qquad \text{ and } \qquad
\begin{tikzpicture}
\begin{scope}[every node/.style={circle,thick,draw=green!60!black}]
\node(A) at (0:1) {$1$};
\node(B) at (120:1) {$2$};
\node(C) at (240:1) {$3$};
\node(D) at (0:3) {$4$};
\node(E) at (120:3) {$5$};
\node(F) at (240:3) {$6$} ;
\end{scope}
\begin{scope}[every edge/.style={draw=black,very thick}]
\path[-] (A) edge (B) (B) edge (C) (C) edge (A);
\path[-] (D) edge (E) (E) edge (F) (F) edge (D);
\path[-] (A) edge (D);
\path[-] (B) edge (E);
\path[-] (C) edge (F);
\end{scope}
\end{tikzpicture}
\]
are not isomorphic\footnote{The easiest way to see this
is to observe that the second graph has a triangle
(i.e., three distinct vertices that are mutually adjacent),
while the first graph does not.}, but have the same degrees
(namely, each vertex of either graph has degree $3$).

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 5
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 5}

\subsection{Problem}

A simple graph $G = \tup{V, E}$ is said to be
\emph{optibip} (short for ``optimal bipartite'')
if the set $V$ can be partitioned into two subsets
$V_1$ and $V_2$ such that
$\abs{V_1} - \abs{V_2} \in \set{0, 1}$ and such that
$E = \set{v_1v_2 \mid v_1 \in V_1 \text{ and } v_2 \in V_2}$.
(The word ``partitioned'' means that $V_1$ and $V_2$
are two disjoint sets whose union is $V$.)

Let $G = \tup{V, E}$ be a simple graph with $n$
vertices and $k$ edges.
Prove that the following two statements are
equivalent:

\begin{enumerate}

\item The graph $G$ has no triangles and satisfies
$k = \floor{n^2 / 4}$.

\item The graph $G$ is optibip.

\end{enumerate}

\subsection{Remark}

This characterizes when equality holds in (the
contrapositive of) Mantel's theorem.

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 6
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 6}

\subsection{Problem}

Let $G$ be a simple graph with $n$ vertices.
Assume that each vertex of $G$ has at least one
neighbor.

A \emph{matching} of $G$ shall mean a set $F$ of edges
of $G$ such that no two edges in $F$ have a vertex in
common.
Let $m$ be the largest size of a matching of $G$.

An \emph{edge cover} of $G$ shall mean a set $F$ of
edges of $G$ such that each vertex of $G$ is
contained in at least one edge $e \in F$.
Let $c$ be the smallest size of an edge cover
of $G$.

Prove that $c + m = n$.

\subsection{Hint}

Prove that $c \leq n-m$ and that $m \geq n-c$.

\subsection{Remark}

Let $G$ be the graph
\begin{align*}
\xymatrix{
& 2 \are[rr] & & 3 \are[rd] \\
1 \are[ru] \are[rrd] & & & & 4 \are[lld] \\
& & 5
}
\ .
\end{align*}
Then, $\set{12, 34}$ is a matching of $G$ of largest
possible size (why?), whereas
$\set{12, 34, 25}$ is an edge cover of $G$ of smallest
possible size (why?).
So the exercise says that $2 + 3 = 5$ here, which is
indeed true.

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 7
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 7}

\subsection{Problem}

Let $G = \tup{V, E}$ be a simple graph.

An edge $e = \set{u, v}$ of $G$ will be called \emph{odd}
if the number $\deg u + \deg v$ is odd.

Prove that the number of odd edges of $G$ is even.

\subsection{Hint}

One solution uses
\href{https://en.wikipedia.org/wiki/Modular_arithmetic}{modular arithmetic}.
Note in particular that $m^2 \equiv m \mod 2$ for every integer $m$.
(There is also a solution without all of this.)

\subsection{Solution}

...

%----------------------------------------------------------------------------------------
%	EXERCISE 8
%----------------------------------------------------------------------------------------
\horrule{0.3pt} \\[0.4cm]

\section{Exercise 8}

\subsection{Problem}

Let $n \geq 2$ be an integer.
Let $G$ be a simple graph with $n$ vertices.

\begin{enumerate}

\item[\textbf{(a)}]
Describe $G$ if the degrees of the vertices of $G$
are $1, 1, \ldots, 1, n-1$.

\item[\textbf{(b)}]
Let $a$ and $b$ be two positive integers
such that $a + b = n$.
Describe $G$ if the degrees of
the vertices of $G$ are $1, 1, \ldots, 1, a, b$.

\end{enumerate}

Here, to ``describe'' $G$ means to explicitly determine
(with proof) a graph that is isomorphic to $G$.

\subsection{Remark}

This is a variation on Exercise 4 above. Note that $G$
is not required to be connected here.


\horrule{0.3pt} \\[0.4cm]

\begin{thebibliography}{99999999}                                                                                         

\bibitem[Grinbe20]{20f}Darij Grinberg, \textit{Math 235: Mathematical Problem
Solving}, 10 August 2021.\newline\url{https://www.cip.ifi.lmu.de/~grinberg/t/20f/mps.pdf}

\end{thebibliography}

\end{document}

