\documentclass[11pt]{article}

%----------Packages----------
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{mdwlist}
%\usepackage{amsrefs}
\usepackage{mathrsfs}
\usepackage{mathpazo}
\usepackage[mathcal]{eucal}
\usepackage{verbatim}  %%includes comment environment
\usepackage{fullpage}  %%smaller margins
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{tikz}
\usepackage{pgf}
\usepackage{MnSymbol,wasysym}
\usepackage{textcomp}

%----------Commands----------

%%penalizes orphans
\clubpenalty=9999
\widowpenalty=9999

%----------Theorems----------

\newtheorem{theorem}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem*{defi}{Definition}
\newtheorem{exercise}{Exercise}[section]
\newtheorem*{example*}{Example}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{nondefinition}[theorem]{Non-Definition}
\newtheorem{claim}[theorem]{Claim}

\numberwithin{equation}{subsection}

\begin{document}

\begin{center}
{\Large Notes on the Combinatorial Nullstellensatz} \\\vspace{0.05in}
Constructive and Nonconstructive Methods in Combinatorics and TCS \\
U. Chicago, Spring 2018\\
Instructor: Andrew Drucker\\
Scribe: Roberto Fern\'andez \\
\end{center}

\begin{comment}
The Combinatorial Nullstellensatz and the Schwartz-Zippel Lemma both give us conditions for when a polynomial has nonzero values $\overline{x}\colon \mathcal{P}(\overline{x})\neq0$.
\end{comment}

For the following theorems and examples we let $\mathbb{F}$ be a field and $\mathcal{P}[x_1,\ldots,x_n]$ be a formal polynomial over $\mathbb{F}$. Note that in our definition of formal polynomials we consider a polynomial as being uniquely defined by its coefficients.

\section{Schwartz-Zippel Lemma}

The Schwartz-Zippel lemma \cite{Schwartz, Zippel} provides us with sufficient conditions under which we can bound the probability that a specific evaluation of a polynomial vanishes, and thus allows us to make statements about whether a polynomial is identically zero.

\begin{theorem}[Schwartz-Zippel Lemma]
Let $\mathcal{P}\in \mathbb{F}[x_1,\ldots,x_n]$ be a non-zero polynomial with deg$(\mathcal{P})=d\geq 0$. We then consider a finite subset $S\subseteq \mathbb{F}$. If we randomly and independently sample $r_1,\ldots,r_n$ from $S$ then $$\mathbb{P}[\mathcal{P}(r_1,\ldots,r_n)=0]\leq \frac{d}{|S|}.$$
\end{theorem}

\begin{proof}
We prove this by induction on $n$. The base case is immediate since $n=1$  gives us a univariate polynomial, for which we know deg$(\mathcal{P})=d$ implies at most $d$ roots. Now we assume it holds for all polynomials with degree $n-1$. Given that $\mathcal{P}\not\equiv 0$ we can, without loss of generality, assume that $x_1$ occurs in some nonzero monomial. We can then consider each monomial and factor out this $x_1$ component so that we can write $\mathcal{P}$ as a polynomial in $x_1$: $$\mathcal{P}(x_1,\ldots,x_n)=\sum_{i=1}^d x_1^i Q_i(x_2,\ldots,x_n).$$ By our assumption that $x_1$ occurs in a nonzero monomial we know that, for some $i$, we have $Q_i\not\equiv 0$, let $k$ denote such monomial with the highest degree. We know that deg$(x_1^kQ_k(x_2,\ldots,x_n))\leq d$ and thus deg$(Q_k)\leq d-k$.

Now let $A$ denote the event that $Q_k(y_2,\ldots,y_n)=0$, where $y_2,\ldots,y_n$ is randomly sampled from $S^{n-1}$. It follows by our inductive hypothesis that $\mathbb{P}[A]\leq \frac{d-k}{|S|}$. If we then have such $\overline{y}\triangleq y_2,\ldots,y_n$ with $Q_k(\overline{y}) \not\equiv 0$ then it follows that $\mathcal{P}(x_1, y_2,\ldots,y_n)$ is univariate in $x_1$, nonzero, and of degree $k$. If we then condition this polynomial on $\overline{y}$ we can use the base case and get that $\mathbb{P}[\mathcal{P}(x_1,y_2,\ldots,y_n)=0\mid (y_2,\ldots,y_n)]\leq \frac{k}{|S|}.$ Ultimately, we can write: $$\mathbb{P}[\mathcal{P}\equiv0]\geq (1-\mathbb{P}(A))\left(1-\frac{k}{|S|}\right)=\left(1-\frac{d-k}{|S|}\right)\left(1-\frac{k}{|S|}\right)\geq 1-\frac{d-k}{|S|}-\frac{k}{|S|}=1-\frac{d}{|S|}.$$ It then clearly follows that $\mathbb{P}[\mathcal{P}\neq 0]=1-\left(1-\frac{d}{|S|}\right)=\frac{d}{|S|}$, just as desired.
\end{proof}

The above theorem thus tells us that, if applicable, we can find a $\overline{x}\in S^n$ such that $\mathcal{P}(\overline{X})\neq 0$ with high probability after $\mathcal{O}\left(\frac{|S|}{d}\right)$ trials.

We now consider our first application of the Schwartz-Zippel Lemma, Polynomial Identity Testing (PIT):

\begin{example*}
Let our input be an arithmetic circuit representing a formal polynomial over variables $x_1,\ldots,x_n$ in a field $\mathbb{F}$. We are then interested on whether $\mathcal{P}\equiv 0$. This can be used to test the equivalence of two polynomials $\mathcal{P}_1, \mathcal{P}_2$ over this same field since we can simply write $\mathcal{Q}=\mathcal{P}_2-\mathcal{P}_2$ and test whether $\mathcal{Q}\equiv 0$.
\end{example*}

Given our above result we can provide an algorithm which shows that PIT $\in$ co-RP, at least in cases where our polynomial has bounded degree. If we have $\mathcal{P}(x_1,\ldots,x_n)$ over our field $\mathbb{F}$ such that deg$(\mathcal{P})\leq |\mathbb{F}|$ we can use the following algorithm.
\begin{enumerate}
\item Randomly and uniformly sample $\overline{y}\triangleq y_1,\ldots,y_n$ from $\mathbb{F}^n$.
\item If $\mathcal{P}(\overline{y})\neq 0$ then conclude $\mathcal{P}$ is not identically $0$ and conclude execution.
\item If $\mathcal{P}(\overline{y})=0$ return that $\mathcal{P}$ is identically zero with a probability error of at most $\frac{d}{|\mathbb{F}|}<1$, due to Schwartz-Zippel. We can thus repeat this procedure until this error has reached an appropriate bound.
\end{enumerate}

This bound on our error gives us, even in the worst case under our assumptions of $d=|\mathbb{F}|-1$, that our bound decreases by $$\left(\frac{|\mathbb{F}|-1}{|\mathbb{F}|}\right)^{|\mathbb{F}|}\leq \left(1-\frac{1}{|\mathbb{F}|}\right)^{|\mathbb{F}|}=e^{-1}.$$

We can now look at another application of the Schwartz-Zippel Lemma: checking for the existence of perfect matches in bipartite graphs. \cite{Tutte}

\begin{example*}
Let $G=(U,V,E)$ be a bipartite graph with $|V|=|U|=n$ and $E\subseteq U\times V$. We thus want to check if there exists a set of edges $M\subseteq E$ such that every vertex is contained in exactly one edge of $M$. We call such a subset $M$ a perfect matching of $G$.
\end{example*}

\begin{definition}
Let $G=(U,V,E)$ be a bipartite graph. We then define the tutte matrix, $M_G$, of our graph as follows:
\[ M_{i,j}=\begin{cases}
      x_{i,j} & (i,j)\in E \\
      0 & (i,j)\not\in E
   \end{cases}
\] where $x_{i,j}$ is a fresh symbolic variable at each iteration (i.e. each $x_{i,j}$ value is unique.)
\end{definition}

\begin{lemma}
The determinant of $M_G$, which is a polynomial in $(x_{i,j})$ with degree at most $n$, is nonzero as a formal polynomial if and only if $G$ has a perfect matching.
\end{lemma}

\begin{proof}
We can use the Leibniz Formula for the determinant: $$\text{det}(M_G)=\sum_{\sigma\in S_n}\left(\text{sgn}(\sigma)\prod_{i=1}^n M_{i,\sigma(i)}\right)$$ and we then have a 1-1 correspondence between $\sigma\in S_n$ and the possible perfect matchings in $G$ which can be written as $\{(u_1,v_{\sigma(1)}),\ldots,(u_n,v_{\sigma(n)}\}$. By the definition of the tutte matrix we can see that if for some $i$ we have $(u_i,v_{\sigma(i)})$ (i.e. the possible perfect matching is not in $G$) then that term of our summation will be $0$ since $M_{i,\sigma(i)}=0$. We can then restrict our summation range to solely consider $\sigma\in P$, where $P$ is the set of perfect matchings in $G$. We thus write $$\text{det}(M_G)=\sum_{\sigma\in P}\left(\text{sgn}(\sigma)\prod_{i=1}^n M_{i,\sigma(i)}\right)=\sum_{\sigma\in P}\left(\text{sgn}(\sigma)\prod_{i=1}^n x_{i,\sigma(i)}\right)$$ and using this expression we can show the lemma. If the determinant is $0$ then it is clear that $P=\emptyset$ and thus $G$ has no perfect matching. If $P\neq\emptyset$, however, we know that for $\sigma\in P$ we have $\text{sgn}(\sigma)\prod_{i=1}^n M_{i,\sigma(i)}=\text{sgn}(\sigma)\prod_{i=1}^n x_{i,\sigma(i)}\neq 0$ and by our definition of $x_{i,\sigma(i)}$ always being a fresh variable we know that there does not exist another term in our sum that has the same set of variables and thus this value is not cancelled out and we must have a non-zero determinant.
\end{proof}

Given the above result and the PIT algorithm we can define an algorithm, in $RP$, for determining whether $G$ has a perfect matching. Furthermore, we can also design an algorithm to return a perfect matching. One major advantage of this tutte matrix approach compared to the traditional max flow approach is that of easy parallelization. Refer to \cite{Mulmuley}.

\section{Combinatorial Nullstellensatz}

We now move on to the related Combinatorial Nullstellensatz, \cite{Alon, Michalek} which gives us conditions under which we are assured a point within a defined sub-cube for which our polynomial doesn't vanish.

\begin{theorem}[Combinatorial Nullstellensatz]
Let $\mathcal{P}(x_1,\ldots,x_n)$ be a polynomial in $\mathbb{F}[x_1,\ldots,x_n]$ with deg$(\mathcal{P})=\sum_{i=1}^n k_i$ where each $k_i\in\mathbb{N}$ and suppose that the coefficient $x_1^{k_1}x_2^{k_2}\cdots x_n^{k_n}$ in $\mathcal{P}$ is non-zero. Then for any collection of subsets $S_1,\ldots,S_n\subseteq \mathbb{F}$ such that $|S_i|>k_i$ for all $i$ we have that there exists $\overline{x}\in S_1\times\cdots\times S_n$ such that $\mathcal{P}(\overline{x})\neq 0$.
\end{theorem}

\begin{proof}
We show the above result through induction on $d\triangleq \text{deg}(\mathcal{P})$. The base case of $d=1$ is trivial since a polynomial of degree $d$ will have at most $d$ roots. Now let $d>1$ and for contradiction's sake assume that $\mathcal{P}$ satisfies all of our theorem's assumptions and yet $\mathcal{P}\equiv 0$ on $S_1\times S_2\times\cdots\times S_n$. We can assume without loss of generality that $\alpha_1>0$. Now fix any $s\in S_1$. We can then use the division algorithm to give us the following polynomial: $$\mathcal{P}(x_1,\ldots,x_n)=(x_1-s)\mathcal{Q}(x_1,\ldots,x_n)+R(x_2,\ldots,x_n).$$

Now let $x\in \{s\}\times S_2\times\cdots\times S_n$. We then have that $\mathcal{P}(x)=0$ implies that $R(x)=0$. Since $R$ does not contain $x_1$ we can also say that $R$ vanishes on $(S_1-\{s\})\times S_2\times\cdots\times S_n$. Now if we fix $x\in (S_1-\{s\})\times S_2\times\cdots\times S_n$ it follows that $x_1-s$ is non-zero but since we assumed the polynomial vanishes it must be true that $Q(x)=0$ and we thus have that $Q$ vanishes on $(S_1-\{s\}\times S_2\times\cdots\times S_n$. Since we also have deg$(Q)=\text{deg}(P)-1$ this vanishing implies a smaller counterexample which contradicts our inductive hypothesis.
\end{proof}

We now look at some possible applications of the above result, starting with the Cauchy-Davenport Theorem.

\begin{theorem}[Cauchy-Davenport]
Let $p$ be a prime and $A,B$ be two non-empty subsets of $\mathbb{F}_p$ and define $A+B=\{a+b\mid a\in A, b\in B\}$. Then, $$|A+B|\geq \text{min}\{p, |A|+|B|-1\}.$$
\end{theorem}

\begin{proof}
The $|A|+|B|>p$ case is straightforward since for any $x\in \mathbb{F}_p$ there are $p$ distinct expressions of the form $a+b$ that equal $x$. Since the sum of elements in our sets is greater than $p$ we must then have that these expressions overlap and thus $A+B=\mathbb{F}_p$. Now we consider the $|A|+|B|\leq p$ case. Assume for contradiction's sake that $|A+B|\leq |A|+|B|-2$ and let $C\subseteq \mathbb{F}_p$ such that $A+B\subset C$ and $|C|=|A|+|B|-2$. Now define $\mathcal{P}(x,y)=\prod_{c\in C}(x+y-c)$ be a polynomial over $\mathbb{F}_p$. (Note that $\mathcal{P}(a,b)=0$ for all $a\in A, b\in B\colon a+b\in C$.) Now let $S_1\triangleq A, S_2\triangleq B$ and since the coefficient of $x^{|A|-1}y^{|B|-1}$ is given by ${|A|+|B|-2\choose |A|-1}$ and since $p$ is a prime by assumption we know that this coefficient is non-zero in $\mathbb{F}_p$ and thus by the CNSS we have that there exists $(x,y)\in A\times B$ such that $\mathcal{P}(x,y)\neq 0$. Since our polynomial was constructed such that it vanishes for all points in $C$ we reach a contradiction since $A+B\not\subset C$.
\end{proof}

Now we look at the Chevalley-Warning Theorem, which concerns algebraic varieties in $\mathbb{F}_p^n$.

\begin{definition}
Let $\mathcal{P}_1,\ldots,\mathcal{P}_m$ be a collection of polynomials in $\mathbb{F}_p^n$. We then define the vanishing set: $$\mathcal{V}(\{\mathcal{P}_i\}_i)\triangleq \{x\in\mathbb{F}_p^n\colon \mathcal{P}_i(x)=0\text{ for all i}\}.$$
\end{definition}

Given the above definition, however, we note that different collections can have the same vanishing set, e.g. for $\vec{c}=\{c_1,\ldots,c_n\}$ we could consider $\mathcal{A}=\{x-c_1,x-c_2,\ldots,x-c_n\}, \mathcal{B}=\prod_{i=1}^n(x-c_i)$ and it is clear that $\mathcal{V}(\mathcal{A})=\mathcal{V}(\mathcal{B})=\vec{c}$. We can thus associate a "cost measure" to the collections of polynomials, namely the sum of the degrees of each polynomial in the collection, which define a singleton vanishing set. Further, we can bound the minimum of this cost measure required to specify such a vanishing set.

\begin{theorem}[Chevalley-Warning Theorem]
Let $\mathcal{P}_1,\ldots,\mathcal{P}_m\in \mathbb{F}[x_1,\ldots,x_n]$ and assume that $\mathcal{V}(\{\mathcal{P}_i\}_i)=\{\overline{c}\}$ where $\overline{c}\in \mathbb{F}_p^n$. Then, $$\sum_{i=1}^m \text{deg}(\mathcal{P}_i)\geq n.$$
\end{theorem}

\begin{proof}
Assume for sake of contradiction that we have the desired singleton vanishing set but $\sum d_i<n$. Let $$\mathcal{P}\triangleq \prod_{i=1}^m \left[1-\mathcal{P}^{p-1}\right]-\delta\prod_{j=1}^n\prod_{a\neq c_j}(x_j-a)$$ where we choose $\delta$ such that $\mathcal{P}(\overline{c})=0$. (Note that the LHS evaluates to $1$ on $\overline{c}$ so $\delta\neq 0$.)

Let $S_i=\mathbb{F}$ for all $i$ and define $\vec{\alpha}\triangleq (p-1,p-2,\ldots,p-n)$ and consider $x^{\vec{\alpha}}$. We claim that $F\equiv 0$ on $S_1\times\cdots\times S_n$ and to show this we will prove the existence of some leading term with degree $\leq p-1$ in $x_1,\ldots x_n$.

In the $x=\vec{c}$ case it is clear that $\mathcal{P}\equiv 0$ by definition. Now we consider the $x\neq\vec{c}$ and assume WLOG that $x_k\neq \vec{c}_k$. In this case we note that $x\neq\vec{c}$ implies that for some $i$ we have $\mathcal{P}_i(x)\neq 0$ which implies that the LHS evaluates to $0$ since $1-\mathcal{P}_i(x)^{p-1}=0$ and we must also have that the RHS evaluates to $0$ since by our assumption $x_k\neq c_k$ and thus $\prod_{a\neq c_k}(x_k-a)$ will have a zero term. Since the degree of the LHS is $(p-1)\cdot\sum d_i<(p-1)n$ but it has a non-zero coefficient of the term $\prod x_i^{p-1}$ it thus gives us a contradiction through CNSS, which assures us a non-zero value of $\mathbb{F}$.
\end{proof}

Our final application is that of covering the boolean cube, $C^n\triangleq \{0,1\}^n$, with hyperplanes. We define a hyperplane, $H$, as follows: $$H\triangleq \{\vec{x}\colon \langle \vec{a}, \vec{x}\rangle=b\}\text{ for a given }\vec{a},b$$

\begin{theorem}
Let $H_1,\ldots,H_m$ cover all of $C^n$ except for one point. Then we have that $m\geq n$.
\end{theorem}

\begin{proof}
Assume without loss of generality that the one point not covered by our hyperplanes is $\vec{0}$ and let our collection of hyperplanes, $\{H_i\}$, be defined such that $H_i=\{\langle a_i,x\rangle=b_i\}$. For contradiction's sake assume that $m<n$ and consider $$\mathcal{P}(x)\triangleq(-1)^{n+m+1}\left(\prod_{j=1}^mb_j\right)\left(\prod_{i=1}^n(x_i-1)\right)-\prod_{i=1}^m\left(\langle a_i,x\rangle - b_i\right).$$ From the left term we clearly have that deg$(\mathcal{P})=n$ and the coefficient of it is $(-1)^{m+n+1}\prod_{j=1}^mb_j\neq 0.$ By CNSS we then have that there exists $\vec{x}\in\{0,1\}^n$ such that $\mathcal{P}(\vec{x})\neq0$. This point $\vec{x}$, however, is not $\vec{0}$ since the LHS of our polynomial is designed to cancel the RHS under $\vec{0}$, and thus $\mathcal{P}(\vec{0})=0$. We know that our LHS vanishes for $\vec{x}\neq 0$ and thus $\mathcal{P}(\vec{x})\neq 0$ implies that the RHS doesn't vanish. We thus have $\langle a_i,\vec{x}\rangle -b_i\neq 0$ for all $i$ and thus $\vec{x}$ is not in any $H_i$, giving us the desired contradiction.
\end{proof}

\pagebreak

\bibliography{nullstellensatz_scribe_notes}
\nocite{*}
\bibliographystyle{plain}
\end{document}