Problem Set 1
Problem Set 1
1. Scripts
Define a sequence as a map from the set of positive integers to the set of real
numbers. A sequence is denoted {an } instead of a(n), so that we can think of
an as the nth element in an ordered set.
A sequence {an } is said to be periodic if there exists a positive integer k such
that an = an+k for all sufficiently large values of n. In this case, k is called the
period of {an }.
Suppose {an } is given by an = 5n for n > 0. Define {bn } to be a sequence in
which bn is the last 4 digits of an . Verify that {bn } is periodic and find its period.
2. Variables
1
3. Numerical Expressions
4. Matrix Operations
Construct the following 4 9 matrix and carry out the calculations as described
below.
11 12 13 14 15 16 17 18 19
21 22 23 24 25 26 27 28 29
K= 31 32 33 34 35 36 37 38 39
41 42 43 44 45 46 47 48 49
2
Call help elmat and help matfun for help topics on elementary matrices and
matrix functions.
(a) Define a row vector V consisting of integers from 1 to 9 in ascending order.
(b) Construct the matrix K by concatenating copies of V shifted by multiples
of 10.
(c) Compute AB, where A and B, respectively, are submatrices of K corre-
sponding to its first four and last three columns.
(d) Construct a matrix L by appling the natural logarithm to the square of
every entry of AB.
(e) Define a column vector W in which its nth entry is the sum of all entries
in the nth row of L.
(f) Construct the matrix M of the form
W W W
.
W W W