COMS W3203-002
In-Class Problems, Ch. 4
assigned 23 Sept. 2016
class 26-28 Sept. 2016
1. 4.1 # 38
Show that if n is an integer then n2 0 or 1(mod 4).
2. 4.3 # 12
Prove that for every positive integer n, there are n consecutive composite integers. (Hint: C

PM; 3x10 H03 SJUTms
/, plasma RgW
3*
a
/ N GEN-r334] [Vikw
ADJ -" C(AI-tju [mm A dgwtt x
M Edyfg Mi LS K /Hh NC'bM/pblor WLLW
W114" Nln Chtjf'
?+ 7 ieNAX
ig x 55m, inf. run Md TTANt NJIMJ uswcc (kag
clmm'm, mm 0-3. fr/A: 16AM,
.
9. draw Chasm. PxHLHX

Physics 3Llo PK 03 Salim; "h? Homewa/lc #l
1. Simple harmonic motion implies the functional form
x(t) = Asin(ut + 8)
a) The stated "maximum excursion" of 10 cm gives A = 10 cm while (0 and8 are determined from
the boundary conditions
x(0)=0=Asin8=>8=0
x'(

Counting (Combinatorics)
1
1.1
The Basics of Counting
The Product Rule
Suppose that a procedure can be broken down into a sequence of two tasks. If there are n1 ways to do the first task
and n2 ways to do the second task, then there are n1 n2 ways to do t

Number Theory and Cryptography
1
Divisibility and Modular Arithmetic
Let a, b be integers, a 6= 0. We say a divides b if there is an integer c such that b = ac. We write a|b for a divides
b. a is a factor or divisor of b, and b is a multiple of a.
Example

Sets, Functions, Sequences, Sums, and Matrices
1
Sets
A set is an unordered collections of objects. The objects in the set are called members or elements. We write
a A to denote a is a member of/belongs to A.
We can describe a set by
listing all its elem

Algorithms
1
Algorithms
An algorithm is a finite sequence of precise instructions for performing a computation or task (eg. a recipe).
1.1
Search
input: an integer x, a list of integers a1 , a2 , . . . , an
output: i if x = ai , 0 if x is not one of the a

Logic and Proofs
1
Propositional Logic
A proposition is a statement that is either true or false, but not both. The truth value of a proposition is denoted
T(rue) or F(alse).
Example: proposition or not?
propositions
Albany is the capital of New York. (T

Homework 1-2 Solutions
1. Ch 1.2 # 10 [2pts]
Whenever the system software is being upgraded, users cannot access the file system. If users can access the
file system, then they can save new files. If users cannot save new files, then the system software i

Induction and Recursion
1
Mathematical Induction
To prove that P (n) is true for all positive integers n, where P (n) is a propositional function, we need two steps:
basis step: verify P (b) is true, where b is a positive integer (most commonly b = 1)
ind

COMS W3203-002
In-Class Problems, Ch. 5
assigned 07 Oct. 2016
class 10-12 Oct. 2016
1. 5.1 # 34
Use mathematical induction to prove that 6 divides n3 n whenever n is a nonnegative integer.
2. 5.1 # 40
Use mathematical induction to prove that if A1 , A2 ,

Homework 3 Solutions
1. 3.1 # 14 [3pts]
List all the steps used to search for 7 in the sequence 1, 3, 4, 5, 6, 8, 9, 11 using binary search. Follow the same
formatting as the binary search example in the lecture notes.
1.
2.
3.
4.
List
List
List
List
is
i

WNW: 3N0 fmpwwk 12*- ? -.Sa/t"f\ws 9/29/03)
(Flaw 5"! )
1.x) a 4/96;th cylmday- 15. m e7w'irbrxm W44. 319794.! I 5.401;an
. A: ma . W & W944 ~st WM
4' .
cfw_I If: 01mm, adj-0 (,5 M barf'm aF
L Crhndff,
i 1 (WWW-f '5 Prune clam an dimwr'g
Jr _ Li" 9? 5 h