\documentclass[12pt]{article} \newcommand{\N}{{\sf N}} \newcommand{\Q}{{\sf Q}} \newcommand{\R}{{\sf R}} \newcommand{\Z}{{\sf Z}} \newcommand{\into}{{\rightarrow}} \newcommand{\lf}{\left\lfloor} \newcommand{\rf}{\right\rfloor} \newcommand{\lc}{\left\lceil} \newcommand{\rc}{\right\rceil} \newcommand{\Ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\ceil}[1]{\left\lceil {#1}\right\rceil} \newcommand{\floor}[1]{\left\lfloor{#1}\right\rfloor} \newcommand{\Rpos}{{\sf R}^+} \usepackage{amsmath} \begin{document} \centerline{\bf Questions from Past 250 MIDTERMS} \newpage \begin{enumerate} \item In this problem (1) all symbols have their usual meaning, and (2) a domain is a subset of $\R$. \begin{enumerate} \item[I)] Consider the sentence \bigskip (A)$\qquad$ $(\forall x)(\exists y)[x+y=0]$. \bigskip a) Give an infinite domain where A is TRUE OR prove there is no infinite domain where A is TRUE. \bigskip b) Give an infinite domain where A is FALSE OR prove there is no infinite domain where A is FALSE. \bigskip c) Give a finite domain with \textbf{at least three elements} where A is TRUE OR prove there is no finite domain with at least three elements where A is TRUE. \bigskip d) Give a finite domain with \textbf{at least three elements} where A is FALSE OR prove there is no finite domain with at least three elements where A is FALSE. \newpage \item[II)] Consider the sentence \bigskip (B)$\qquad$ $(\forall x)(\exists y)[xy=1]$. \bigskip a) Give an infinite domain where B is TRUE OR prove there is no infinite domain where B is TRUE. \bigskip b) Give an infinite domain where B is FALSE OR prove there is no infinite domain where B is FALSE. \bigskip c) Give a finite domain with \textbf{at least three elements} where B is TRUE OR prove there is no finite domain with at least three elements where B is TRUE. \bigskip d) Give a finite domain with \textbf{at least three elements} where B is FALSE OR prove there is no finite domain with at least three elements where B is FALSE. \end{enumerate} \newpage \item Consider the following boolean function: \begin{equation} f(x_1,x_2,x_3,x_4,x_5,x_6,x_7)= \begin{cases} T & \text{if exactly ONE of the inputs is T} \\ F & \text{otherwise}\\ \end{cases} \end{equation} \begin{enumerate} \item How many rows are in the truthtable for $f$? \item How many rows in the truthtable for $f$ evalute to TRUE? \item Write down all of the rows that make $f$ evaluate to TRUE. \item Write a formula for $f$. (Do not write a truth table to do this.) \item Let \begin{equation} f_n(x_1,\ldots,x_n)= \begin{cases} T & \text{if exactly ONE of the inputs is T} \\ F & \text{otherwise}\\ \end{cases} \end{equation} Name a function $g$ such that the following is true: {\it The technique used in problem d can be extended to show that there is a formula for $f_n$ of length $O(g(n))$ }. \end{enumerate} \newpage \item In this problem the domain is the natural numbers and the language has the usual logical symbols and arithmetic operations. \begin{enumerate} \item A number is {\it cool} if it can be written as the sum of $\le 3$ cubes. Let $COOL(x)$ mean that $x$ is cool. Write a formula for $COOL(x)$. \item (You may use $COOL(x)$ in this problem.) Write a sentence to express the following: {\it There exists an infinite number of numbers that are NOT cool} \item Give 2 examples of cool numbers. Prove that they are cool. \item Give 2 examples of numbers that are not cool. Prove that they are not cool. \end{enumerate} \newpage \item (20 points) \begin{enumerate} \item Compute the following mod 16: $0^4, 1^4, 2^4,\ldots, 15^4$. (You may use the following shortcut: $(16-a)^4 \equiv a^6 \pmod {16}$.) \item Use the results of part a to find a number $N$ and an infinite set $X$ such that the following is true \bigskip {\it If $x\in X$ then $x$ cannot be written as the sum of $N$ fourth powers.} \bigskip Make $X$ as large as possible. \end{enumerate} \newpage \item Let $T(n)$ be defined by $T(1)=0$ $$(\forall n\ge 1)\biggl [ T(n) = T\biggl ( \floor{\frac{n}{11}} \biggr ) + T\biggl (\floor{\frac{2n}{11}}\biggr ) + T\biggl (\floor{\frac{3n}{11}}\biggr ) + 2n\biggr ]$$ Use constructive induction to find a constant $A\in \N$ such that $$(\forall n\ge 0)[ T(n) \le An].$$ \newpage \item \begin{enumerate} \item (0 points but it will be helpfu) Compute all of the following mod 7: $2^0$, $2^1$, $2^2$, $2^3$, $2^4$, $2^5$, $2^6$ \item State a true conjecture about the value of $2^n \pmod 7$. It should be of the form (and this is NOT true) \begin{equation} 2^n \bmod 7 = \begin{cases} 1 & \text{if $n\equiv 0,1 \pmod 5$} \\ 4 & \text{if $n\equiv 2,3 \pmod 5$}\\ 6 & \text{if $n\equiv 4 \pmod 5$}\\ \end{cases} \end{equation} \item Prove your conjecture by induction. \end{enumerate} \end{enumerate} \end{document}