% 
% hw2.tex
%
%   This is LaTeX template to get you started
%   making problem-set solutions
%
 
\documentclass[11pt]{article}
\usepackage{amsthm,amsmath, amssymb}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textheight}{9.0in}
\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{-0.5in}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{\bf Data, Logic, and Computing\\[2ex] 
       \rm\normalsize ECS 17 (Winter 2025)}
\date{\today}
\author{Patrice Koehl\\koehl@cs.ucdavis.edu}

\begin{document}
\maketitle
\section*{\underline{Homework 7}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 1}

Determine the truth values of the following statements; justify your answers:
\begin{itemize}
\item [a)] $\forall n \in \mathbb{N}, (n+2) > n$
\item [b)] $\exists n \in \mathbb{N}, 2n=3n$
\item [c)] $\forall n \in \mathbb{Z}, 3n \leq 4n$
\item [d)] $\exists x \in \mathbb{R}, x^4 < x^2$
\end{itemize}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 2 }

Show that the following statements are true.
\begin{itemize}
\item [a)] Let $x$ be a real number. Prove that if $x^3$ is irrational, then $x$ is irrational.
\item [b)] Let $x$ be a positive real number. Prove that if $x$ is irrational, then $\sqrt{x}$ is irrational.
\item[c)] Prove or disprove that if $a$ and $b$ are two rational numbers, then $a^b$ is also a rational number.
\item [d)] let $n$ be a natural number. Show that $n$ is even if and only if $3n+8$ is even.
\item [e)] Prove that either $4 \times 10^{769}+22$ or $4 \times 10^{769}+23$ is not a perfect square. Is your proof constructive, or non-constructive?
\end{itemize}

Note: for question e), a natural number $n$ is a perfect square if there exists a natural number $q$ such that $n = q^2$. For example, 4, 9, 16, 25, .... are all perfect squares while 2, 3, 5, 6,.... are not.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 3}

Let $n$ be a natural number and let $a_1, a_2, \ldots, a_n$ be a set of $n$ real numbers. Prove that at least one of these numbers is greater than, or equal to the average of
these numbers. What kind of proof did you use?

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Exercise 4 }

Use Exercise 3 to show that if the first 10 strictly positive integers are placed around a circle, in any order, then there exist three integers in consecutive locations around the circle that have a sum greater than or equal to 17.

\end{document}

