diff --git a/Spring-2023/CS-2233/Assignment-3/Assignment.pdf b/Spring-2023/CS-2233/Assignment-3/Assignment.pdf new file mode 100644 index 0000000..994b484 Binary files /dev/null and b/Spring-2023/CS-2233/Assignment-3/Assignment.pdf differ diff --git a/Spring-2023/CS-2233/Assignment-3/Solution.pdf b/Spring-2023/CS-2233/Assignment-3/Solution.pdf new file mode 100644 index 0000000..a702710 Binary files /dev/null and b/Spring-2023/CS-2233/Assignment-3/Solution.pdf differ diff --git a/Spring-2023/CS-2233/Assignment-3/Solution.typ b/Spring-2023/CS-2233/Assignment-3/Solution.typ new file mode 100644 index 0000000..75df380 --- /dev/null +++ b/Spring-2023/CS-2233/Assignment-3/Solution.typ @@ -0,0 +1,118 @@ +#let m(math) = align(center)[$#math$] +#let pgbreakmsg = align(center, text(blue, weight: "black", size: 1.5em)[See Next Page\ ↓]) + +#let solve(work, solution) = align( + center, +)[ + #let solution = align(center, block( + inset: 5pt, + stroke: blue + .3pt, + fill: rgb(0, 149, 255, 15%), + radius: 4pt, + )[#align(left)[#solution]]) + + #if work == [] [ + #solution + ] else [ + #block(inset: 6pt, radius: 4pt, stroke: luma(50%) + .5pt, fill: luma(90%))[ + #align(left, text(font: "Liberation Sans", size: .85em, work)) + #solution + ] + ] +] + +#let problem-header(number, points) = [== Problem #number. #text(weight: "regular")[[#points + points]]] + +#let problem(number, points, body) = [ + == Problem #number. #text(weight: "regular")[[#points points]] + #body +] + +#set page(margin: (x: .4in, y: .4in)) +#set table(align: center) + +_*Price Hiller*_ +#v(-.8em) +_*zfp106*_ +#v(-.8em) +Homework Assignment 3 +#v(-.8em) +CS 2233 +#v(-.8em) +Section 001 + +#align( + center, + block( + inset: 6pt, + radius: 4pt, + stroke: luma(50%) + .5pt, + fill: luma(90%), + )[If you are interested in viewing the source code of this document, you can do so + by clicking + #text( + blue, + link( + "https://git.orion-technologies.io/Price/college/src/branch/Development/Spring-2023/CS-2233/Assignment-3/Solution.typ", + "here", + ), + ).], +) += Problems + +#problem( + 1, + 10, +)[ + - Complete all participation activities in zyBook sections $2.1$, $2.2$, $2.4$-$2.6$. + #solve[][Done] +] + +#problem( + 2, + 10, +)[ + Prove that if $a$, $b$, and $c$ are odd integers, then $a + b + c$ is an odd + integer. + + #solve[ + An odd integer is expressed as $2k + 1$ where $k$ is some integer. + ][ + $a + b + c$ can be rewritten as $(2z + 1) + (2n + 1) + (2p + 1)$. Working this + equation we end up with: $2z + 2n + 2p + 3$. We can then factor out $2$ giving + us $2(z + n + p) + 3$ and with some additional manipulation we can get $2((z + n + p) + 1) + 1$. + Notice the inner part ($(z + n + + p) + 1 $) could be re-expressed as $k$, thus we can rexpress the entire thing + (with a substitution) as $2k + 1$ where $k = (z + n + p + 1)$. Therefore, if $a$, $b$, + and $c$ are odd integers, then $a + b + c$ is an odd integer. + ] +] +#problem( + 3, + 30, +)[ + Recall that a rational number can be put in the form $p/q$ where $p$ and $q$ are + integers and $q + ≠ 0$ Prove the following for any rational number, $x$: + + a.) If $x$ is rational, then $x - 5$ is rational + + b.) If $x - 5$ is rational, then $x/3$ is rational + + c.) If $x/3$ is rational, then $x$ is rational +] + +#pgbreakmsg +#pagebreak() +#problem( + 4, + 20, +)[ + Consider the following statement: For all integers $m$ and $n$, if $m - n$ is + odd, then $m$ is odd or $n$ is odd. + + a. Prove the statement using a proof by contrapositive + + b. Prove the statement by using a proof by contradiction +] diff --git a/Spring-2023/CS-2233/TODO.org b/Spring-2023/CS-2233/TODO.org index 9b00fbe..f11db8f 100644 --- a/Spring-2023/CS-2233/TODO.org +++ b/Spring-2023/CS-2233/TODO.org @@ -1,4 +1,10 @@ -* DONE Assignment 1 +* DONE Assignment 1 :college:cs2233: DEADLINE: <2024-01-26 Fri> SCHEDULED: <2024-01-25 Thu> Complete Zybooks section ~1~ and the first homework assignment + +* TODO Assignment 3 :college:cs2233: +DEADLINE: <2024-02-11 Sun> SCHEDULED: <2024-02-11 Sun> + +Complete Zybooks section ~2~ and the third homework assignment +