\documentclass[12pt,ifthen]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{html} \usepackage{hyperref} \newcommand{\D}{{\sf D}} \newcommand{\N}{{\sf N}} \newcommand{\Z}{{\sf Z}} \newcommand{\Q}{{\sf Q}} \newcommand{\R}{{\sf R}} \newcommand{\reals}{{\sf R}} \newcommand{\into}{{\rightarrow}} \newcommand{\ceil}[1]{\lceil #1 \rceil} \newcommand{\COL}{{\rm COL}} \newcommand{\fractional}{{\rm frac}} \usepackage{amsthm} \newtheorem{theorem}{Theorem} \begin{document} \centerline{\bf CMSC 752 Homework 9} \centerline{\bf Morally Due Tue April 8, 2025} \centerline{\bf Dead Cat April 10} \bigskip \newif{\ifshowsoln} \showsolntrue % comment out to NOT show solution inside \ifshowsoln and \fi blocks. \smallskip \begin{enumerate} \item (50 points) In class we proved the following: {\bf Thm} Let $A\subseteq\reals$, $|A|=n$. Let $L,R$ be such that for all $x\in A$, $L\le x\le R$. There exists a real $a\in [L,R]$ such that the following set has size roughly $n/3$: $$B_a = \{ x\in A \colon \fractional(ax) \in (1/3,2/3) \}.$$ The proof is nonconstructive, so we don't actually find the $a$. In this problem we find the $a$. We will consider the following subcase and restatement of the theorem. {\bf Thm} Let $n,N\in\N$. Let $A\subseteq \{1,\ldots,N\}$ such that $|A|=n$. There exists $1\le a\le N$ such that $$B_a = \{ x\in A \colon \fractional(ax) \in (1/3,2/3) \}.$$ has cardinality $\sim\frac{n}{3}$ \newpage And now (finally) for the question. \begin{enumerate} \item (Nothing to hand in for this step.) Write a program that will, on input $n,N\in\N$ (with $n