<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%\documentstyle[10pt,twoside]{article}
\documentstyle[twoside, 11pt,amsfonts]{article}

\setlength{\oddsidemargin}{0.25 in}
\setlength{\evensidemargin}{-0.25 in} \setlength{\topmargin}{-0.6
in} \setlength{\textwidth}{6.5 in} \setlength{\textheight}{8.5 in}
\setlength{\headsep}{0.75 in} \setlength{\parindent}{0 in}
\setlength{\parskip}{0.1 in}

%
% The following commands sets up the lecnum (lecture number)
% counter and make various numbering schemes work relative
% to the lecture number.
%
\newcounter{lecnum}
\renewcommand{\thepage}{\thelecnum-\arabic{page}}
\renewcommand{\thesection}{\thelecnum.\arabic{section}}
\renewcommand{\theequation}{\thelecnum.\arabic{equation}}
\renewcommand{\thefigure}{\thelecnum.\arabic{figure}}
\renewcommand{\thetable}{\thelecnum.\arabic{table}}

%
% The following macro is used to generate the header.
%
\newcommand{\problemset}[3]{
   \pagestyle{myheadings}
   \thispagestyle{plain}
   \newpage
   \setcounter{lecnum}{#1}
   \setcounter{page}{1}
   \noindent
   \begin{center}
   \framebox{
      \vbox{\vspace{2mm}
    \hbox to 6.28in { {\bf CS~151~~~Complexity Theory
                        \hfill Spring 2023} }
       \vspace{4mm}
       \hbox to 6.28in { {\Large \hfill Problem Set #1  \hfill} }
       \vspace{2mm}
       \hbox to 6.28in { {\it Out: #2 \hfill Due: #3} }
      \vspace{2mm}}
   }
   \end{center}
   \vspace*{4mm}
}

%
% Convention for citations is authors' initials followed by the year.
% For example, to cite a paper by Leighton and Maggs you would type
% \cite{LM89}, and to cite a paper by Strassen you would type \cite{S69}.
% (To avoid bibliography problems, for now we redefine the \cite command.)
%
\renewcommand{\cite}[1]{[#1]}

\input{epsf}

%Use this command for a figure; it puts a figure in wherever you want it.
%usage: \fig{NUMBER}{FIGURE-SIZE}{CAPTION}{FILENAME}
\newcommand{\fig}[4]{
            \vspace{0.2 in}
            \setlength{\epsfxsize}{#2}
            \centerline{\epsfbox{#4}}
            \begin{center}
            Figure \thelecnum.#1:~#3
            \end{center}
    }

% Use these for theorems, lemmas, proofs, etc.
\newtheorem{theorem}{Theorem}[lecnum]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newenvironment{proof}{{\bf Proof:}}{\hfill\rule{2mm}{2mm}}

% Some useful equation alignment commands, borrowed from TeX
\makeatletter
\def\eqalign#1{\,\vcenter{\openup\jot\m@th
  \ialign{\strut\hfil$\displaystyle{##}$&amp;$\displaystyle{{}##}$\hfil
      \crcr#1\crcr}}\,}
\def\eqalignno#1{\displ@y \tabskip\@centering
  \halign to\displaywidth{\hfil$\displaystyle{##}$\tabskip\z@skip
    &amp;$\displaystyle{{}##}$\hfil\tabskip\@centering
    &amp;\llap{$##$}\tabskip\z@skip\crcr
    #1\crcr}}
\def\leqalignno#1{\displ@y \tabskip\@centering
  \halign to\displaywidth{\hfil$\displaystyle{##}$\tabskip\z@skip
    &amp;$\displaystyle{{}##}$\hfil\tabskip\@centering
    &amp;\kern-\displaywidth\rlap{$##$}\tabskip\displaywidth\crcr
    #1\crcr}}
\makeatother

% **** IF YOU WANT TO DEFINE ADDITIONAL MACROS FOR YOURSELF, PUT THEM HERE:


\newcommand{\set}[1]{\left\{{#1}\right\}}
\newcommand{\poly}{\mbox{poly}}

\newcommand\Z{{\mathbb{Z}}}
\newcommand\N{{\mathbb{N}}}

\begin{document}
\problemset{6}{May 18}{{\bf May 25}}

Reminder: you are encouraged to work in groups of two or three;
however you must turn in your own write-up and note with whom you
worked. You may consult the course notes and the optional text (Papadimitriou). The
full honor code guidelines and collaboration policy can be found in the course syllabus.


Please attempt all problems. {\bf Please turn in your solutions via
  Gradescope, by 1pm on the due date.}


\begin{enumerate}
\item The following problem comes from Learning Theory, where the
VC-dimension gives important information about the difficulty of
learning a given concept. Given a collection ${\cal S} = \{S_1,
S_2, \ldots, S_M\}$ of subsets of a finite set $U$, the {\em VC
dimension} of ${\cal S}$ is the size of the largest set $X
\subseteq U$ such that for every $X' \subseteq X$, there is an $i$
for which $S_i \cap X = X'$ (we say that $X$ is {\em shattered} by
${\cal S}$). A Boolean circuit $C$ that computes a function
$f:\{0,1\}^m \times \{0,1\}^n \rightarrow \{0,1\}$ succinctly
represents a collection ${\cal S}$ of $2^m$ subsets of $U =
\{0,1\}^n$ as follows: the set $S_i$ consists of exactly those
elements $x$ for which $C(i, x) = 1$. Finally, the language
VC-DIMENSION is the set of pairs $(C, k)$ for which $C$ represents
a collection of subsets ${\cal S}$ whose VC dimension is at least
$k$.

\begin{enumerate}
\item Argue that VC-DIMENSION is in ${\mathbf \Sigma_3^p}$. Hint:
what is the size of the largest possible set $X$ shattered by a
collection of $2^m$ subsets?

\item Show that VC-DIMENSION is ${\mathbf \Sigma_3^p}$-complete by
reducing from $\mbox{QSAT}_3$. Hint: the universe $U$ should be
the set $\{0,1\}^{\ell} \times \{1,2,3,\ldots, {\ell}\}$. For each ${\ell}$-bit
string $a$, define the subset $U_a = \{a\} \times \{1,2,3,\ldots,
{\ell}\}$. The sets in your instance of VC-DIMENSION should each be a
subset of some $U_a$; note that the problem definition does not
require that sets $S_i$ and $S_j$ to be different for $i \ne j$
--- indeed your reduction will probably produce many copies of the
same set with different ``names.''
\end{enumerate}

\item Toda's Theorem (Part II). In this problem you will show that the ability to ``count'' is enough to capture the entire Polynomial-Time Hierarchy.

\begin{enumerate}

\item
Let $C$ be Boolean circuit, and let $g$ be a polynomial with nonnegative integer coefficients. Describe a (deterministic) procedure that, given $C$, produces a circuit $C'$ such that
\[\left |\set{y: C'(y) = 1}\right | = g\left (\left |\set{x : C(x) = 1}\right|\right),\]
and that runs in time polynomial in the size of $C$ and the size of $g$ (when it is encoded in the natural way as a vector of coefficients).

Hint: given two circuits, figure out how to produce a circuit with a number of satisfying assignments equal to the {\em sum} or {\em product} of the number of satisfying assignments of the original two circuits.

\item
Give a (deterministic) procedure that, given $m$ a power of two, outputs (as a sequence of coefficients) a polynomial $g:\Z \rightarrow \Z$ with nonnegative integer coefficients for which
\begin{eqnarray*}
t \equiv 0 \bmod 2 &amp; \Rightarrow &amp; g(t) \equiv 0 \bmod 2^{m} \\
t \equiv 1 \bmod 2 &amp; \Rightarrow &amp; g(t) \equiv 1 \bmod 2^{m},
\end{eqnarray*}
and that runs in time $\poly(m)$.

Hint: first verify that the polynomial $g_0(t) = 3t^2 - 2t^3$ has the property that, for all $i$,
\begin{eqnarray*}
t \equiv 0 \bmod 2^{2^i} &amp; \Rightarrow &amp; g_0(t) \equiv 0 \bmod 2^{2^{i+1}} \\
t \equiv 1 \bmod 2^{2^i} &amp; \Rightarrow &amp; g_0(t) \equiv 1 \bmod 2^{2^{i+1}}.
\end{eqnarray*}

\item
Prove that $\mbox{\bf PH} \subseteq \mbox{\bf P}^{\mbox{\bf \#P}}$.

Hint: use the result proved in Problem 2(e) on the last problem set. Use Problem 2(d) to argue that any language in $\mbox{\bf BPP}^{\oplus \mbox{\bf P}}$ can be decided in $\mbox{\bf BPP}^{\oplus \mbox{\bf P}}$ {\em with the oracle machine making a single query and then immediately entering $q_{\mbox{accept}}$ or $q_{\mbox{reject}}$ depending on the answer}. Argue that the outcome of this query is determined by the number of satisfying assignments of a circuit $C$; now apply parts (a) and (b).
\end{enumerate}


\item 2-sided versus 1-sided error for ${\mbox{\bf MA}}$ and
${\mbox{\bf AM}}$. For this problem you may want to recall
``strong error-reduction via extractors'' from Lecture 11, and the
proof of ${\mbox{\bf BPP}} \subseteq \bf \Sigma_2^P \cap \Pi_2^P$
from Lecture 12. In the characterizations below, $y,z, y', z'$ are
all strings whose length is polynomial in $|x|$.
\begin{enumerate}
\item Recall that a language $L$ is in ${\mbox{\bf MA}}$ if there
is a language $R$ in $\mbox{\bf P}$ for which:
\begin{eqnarray*}
x \in L &amp; \Rightarrow &amp; \exists y \mbox{ for which } \Pr_z[(x, y,
z) \in R] \ge 2/3\mbox{, and} \\
x \not\in L &amp; \Rightarrow &amp; \forall y \; \Pr_z[(x, y, z) \in R]
\le 1/3.
\end{eqnarray*}
Prove that for every such language $L$, there is a language $R'$
in $\mbox{\bf P}$ for which:
\begin{eqnarray*}
x \in L &amp; \Rightarrow &amp; \exists y' \mbox{ for which } \Pr_{z'}[(x,
y',
z') \in R'] = 1\mbox{, and} \\
x \not\in L &amp; \Rightarrow &amp; \forall y' \; \Pr_{z'}[(x, y', z') \in
R'] \le 1/3.
\end{eqnarray*}

\item Recall that a language $L$ is in ${\mbox{\bf AM}}$ if there
is a language $R$ in $\mbox{\bf P}$ for which:
\begin{eqnarray*}
x \in L &amp; \Rightarrow &amp; \Pr_y[\exists z \mbox{ for which } (x, y,
z) \in R] \ge 2/3\mbox{, and} \\
x \not\in L &amp; \Rightarrow &amp; \Pr_y[ \exists z \; (x, y, z) \in R]
\le 1/3.
\end{eqnarray*}
Prove that for every such language $L$, there is a language $R'$
in $\mbox{\bf P}$ for which:
\begin{eqnarray*}
x \in L &amp; \Rightarrow &amp; \Pr_{y'}[\exists z' \mbox{ for which } (x,
y',
z') \in R'] = 1\mbox{, and} \\
x \not\in L &amp; \Rightarrow &amp; \Pr_{y'}[ \exists z' \; (x, y', z')
\in R'] \le 1/3.
\end{eqnarray*}
\end{enumerate}
Hint: for both parts, use strong error reduction, and then allow
Merlin to pick half of Arthur's random string.



\begin{item}
The {\em permanent} of an $n \times n$ matrix $A$ is defined by
\[{\sc perm}(A) = \sum_{\pi}\prod_{i = 1}^n A[i, \pi(i)]\]
where $\pi$ ranges over all permutations of the set $\set{1,2,\ldots, n}$. This looks similar to the {\em determinant} which is defined by
\[{\sc det}(A) = \sum_{\pi}\prod_{i = 1}^n \mbox{sgn}(\pi)A[i, \pi(i)]\]
where $\pi$ ranges over all permutations of the set $\set{1,2,\ldots, n}$, and $\mbox{sgn}(\pi)$ is 1 if $\pi$ can be written as the product of an even number of transpositions, and -1 otherwise. The determinant of an $n \times n$ matrix can be computed in polynomial time by Gaussian elimination. In this problem you will show that the situation is (probably) dramatically different for the problem of computing the permanent.

\begin{enumerate}
\item
Prove that the function $f$ mapping square matrices $A$ with nonnegative integer entries to ${\sc perm}(A)$ is in $\#\mbox{\bf P}$.

\item
Prove that the function $f$ is $\#\mbox{\bf P}$-complete. Hint: your reduction will produce matrices with all entries either 0 or 1.
\end{enumerate}

\end{item}

\end{enumerate}


\end{document}
</pre></body></html>