MAT 331: Mathematical Problem Solving with Computers
Professors Plohr and Sands
Fall 1998
Week 15
Readings:
Assignment due by Tuesday, December 15:
Exercises 9.1 through 9.5 in
Sections 5-9 in the course notes on PDEs.
Note:
The files grid, field, scheme, and evolve
used in Section 8 in the course notes on PDEs
can be found here.
Week 14
Readings:
Grades
Section 1
Due Thursday, December 3.
Week 13
Readings:
Week 12
Readings:
Assignment due by Tuesday, November 24:
Exercise 12.1:
Find turtle command sequences that draw the first four
stages of the middle third Cantor set.
Find a recursive algorithm to draw the nth stage
of the middle third Cantor set.
Exercise 12.2:
Write a Maple procedure that generates the fern
shown on page 99 of the Simanca-Sutherland
course notes.
Week 11
Readings:
Note:
The file turtle.txt
used in Section 4 in in the Simanca-Sutherland
course notes
can be found here.
Solution for Quiz 2,
Section 1 version (as a Maple worksheet).
Solution for Quiz 2,
Section 3 version (as a Maple worksheet).
Due Thursday, November 5.
Cryptography-related items:
-
Some notes on
cryptography written by
Charles Blair of the University of Illinois (also available as
Postscript or LaTeX).
-
Learning About Cryptography
by Terry Ritter
of Ritter Software Engineering. He also provides a good list of
cryptography-related
books. Two particularly good ones are
-
The
Cryptography FAQ has all sorts of good stuff in it.
-
There are many links to cryptography-related sites on the
Quadralay Cryptography
Archive and on
Crypto-Log: The
Internet Guide to Cryptography. However, the latter hasn't been updated
since 1996 and has quite a few dead links. Also, the
International
Cryptography Pages has both links and brief descriptions of currently used
cryptographic algorithms.
-
The ideas of several classical cryptosystems, as well as a summary of RSA,
are briefly covered in
Classic Ciphers and their
Weaknesses.
-
RSA Data Security, owners of the patent on the RSA algorithm, provide
Frequently Asked Questions on
Cryptography, which is good, if a little self-serving.
-
Edgar Allan Poe's story
"The Gold Bug"(1853) is one of the earliest short stories to have
cryptography play a prominent role in the plot, and also one of the best.
Its certainly worth reading, if you never have.
Week 9
Readings:
Project 2
is due by Thursday, November 5.
Week 8
Readings:
Assignment due by Tuesday, October 26:
Exercise 8.1:
Decode the following phrase, which was encoded using a affine
encoding cipher on a 27-letter alphabet (the letters a-z and a blank):
message = "xgb dkjvmbkffcmtkrv m lkaerask mdbmwkfmezremzkmxrcm kkmfvkrx mxgvkmaskrvsc".
Exercise 8.2:
Sometime soon,
you will be sent e-mail containing a message encoded by an affine matrix cipher,
based on 2-vectors in the 61-character alphabet
Alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz.,:;!?' ",
along with the first few letters of the message.
Decrypt the message.
Here are the solutions for
section 3 (as a Maple worksheet).
Week 7
Readings:
-
Sections 3.5--3.7 in the Simanca-Sutherland
course notes.
-
A
CNN report on Internet security and one-time pad encryption schemes.
-
A
tutorial on Maple programming.
Week 6
Readings:
Assignment due by Tuesday, October 13:
Exercise 6.1:
Rewrite the Scramble routine (discussed in Section 3.2.1)
so that it takes three arguments: Alphabet, Cryptabet,
and msg.
Given that the ciphertext "hvdgsifmswzsflnsxtmdgsbdsltpscmuuosdfswu"
is obtained using Scramble with
Alphabet = "abcedefghijklmnopqrstuvwxyz, "
and
Cryptabet = "thequickbro wnfxjmpdv,lazygs",
what is the plaintext?
Exercise 6.2:
Given two integers a and b,
define the integer quotient q and the remainder r
of a and b to be the integers such that
- a = b q + r
- |r| < |b|
- r has the same sign as a
Part A. Write a Maple procedure remainder,
based on the Maple procedure trunc,
that takes the integers a and b as arguments
and returns r. Test your routine with several examples.
Explain why your procedure chooses the sign of r correctly.
Part B. Modify remainder to take a third argument
q in which the integer quotient is stored.
Remark 1: The third argument of remainder cannot be a
variable that has previously been assigned a value.
If q already has a value, then it must be quoted (as in 'q')
if it is to be used as the third argument of remainder.
Remark 2: After a value has been assigned to an argument
of a Maple procedure
(for example, the third argument of remainder),
the argument should not be used again.
This is because Maple has a rule that it evaluates arguments only once.
Due Tuesday, October 6.
Note: The data to be approximated by a circle
should be generated by running the Maple command circle_pts().
This command is available in the file
lsq_data.txt.
Store this file in your home directory
by clicking on this link with the right mouse button
and choose Save Link As....
Within Maple, type read(`lsq_data.txt`).
Then you can obtain the data by typing data := circle_data().
Week 5
Readings:
-
Sections 2.3--2.5 in the Simanca-Sutherland
course notes.
-
The article "Cryptography for the Internet"
from Scientific American.
Project 1
is due by Tuesday, October 6.
Solution for Quiz 1
(as a Maple worksheet).
Week 4
Readings:
Assignment:
Exercise 4.1: Start work on
Project 1.
Week 3
Readings:
-
The introduction to Chapter 2 and Section 2.1 in the Simanca-Sutherland
course notes.
Assignment due by Thursday, September 24:
Exercise 3.1: Do at least six of the eight problems
listed on the handout ``Problems 1''.
Here are the solutions
(as a Maple worksheet).
Week 2
Readings:
-
Chapter 1 in the Simanca-Sutherland course notes, which are available both
in HTML (i.e.,
web browsable) and PostScript
form.
-
Sections 1 (Working Through the New User's Tour), 2 (The Worksheet
Environment), 3 (Numerical Calculations), 4 (Algebraic Calculations),
and 5 (Graphics) in the New User's Tour on the Help
menu of Maple.
-
Here is a Maple worksheet used in one of the classes.
Assignments due by Tuesday, September 15:
Exercise 2.1: Install a Maple icon and menu item by following
the directions here.
Exercise 2.2: Let f(x)=cos(x) and g(x)=a*x^2 + b*x
+ c. Find values for a, b, and c such that
f(0)=g(0), f'(0)=g'(0), and f''(0)=g''(0). Plot
f(x) and g(x) on the same graph for the values of a,
b, and c that you find.
Week 1
Readings:
Assignments due by Tuesday, September 8:
Exercise 1.1: Send an e-mail message to your instructor for this
course. In the message, include the following:
the contents of the file EXERCISE1.1 found in the home directory
of the user mat331;
the text of this exercise (use the mouse to paste a copy into your email);
the value of the environment variable PATH;
a listing of the directory /usr/local/bin;
the full path name of the file called maple2e.sty located somewhere
in the directory hierarchy under /opt/maple;
and the date and time of the final exam.
Exercise 1.2: Set your default home page for Netscape Navigator
to be http://www.mathlab.sunysb.edu/~mat331.
Exercise 1.3: Start a Maple session. What is Pi to 100
decimal places?
Exercise 1.4: Log out.
Problems of the day:
Problems #15 and their
solutions.
Problems #14 (Maple worksheet).
Problems #13.
Problems #12 and their
solutions.
Problems #11 and their
solutions.
Problems #10 and their
solutions.
Problems #9 and their
solutions.
Problems #8 and their
solutions.
Problems #7.
Problems #6.
Problems #5.
Problems #4.
Problems #3.
Problems #2.
Problems #1.