MATH 3250 -- Problem Solving Tools
Fall 2006 Semester
MATLAB Page
- Locker.m: This is the solution to Problem (2.22).
The command "Locker(# of lockers)" will show which lockers
are open (1) and which are closed (0).
- Monkey.m: This is a brute-force search for the number of coconuts
necessary to solve the Monkey & 5 Sailors problem.
- Monkey6.m: Same as above, but with 6 Sailors.
- C03P36.m: This is the solution to Chapter 03 Problem 36 (3.36).
We perform the erasing algorithm using a "for" loop.
- Reverse.m: Now do the same algorithm, but start at the back of the
list!
- ptod.m: This is the solution to Problem (2.5).
The command "ptod(# of pages)" will give us the number of digits
necessary to number the pages of that book.
- Tractrix.m: This is an approximation for Example 7.4 (Zorba's Towed Boat).
- cubes.m: This finds solutions to x^3 + y^3 + z^3 = n.
These are Diophantine solutions: (x, y, z) must all be positive integers.
- cubesns.m: Same as above, but an example command is:
cubesns(100000, 4).
This will find the first n for which there are 4 different solutions.
It takes about 20 seconds.
- hailstone.m: This executes the hailstone algorithm on p. 88. on a particular
integer n. It returns the number of hailstone iterations necessary to cause
n to come back down to n = 1.
- buffon.m: This simulates the Buffon Needle Experiment and outputs
a decimal approximation for pi. You will need to make a modification
if d is not equal to 1.
- Star-crossed Lovers Demos [DPGraph demos]
ProbSolid.dpg: This is the 3D case where all parties must arrive within 0.5 time
units of each other.
MovingCube.dpg: This shows the 3D cube moving from lowest corner (0,0,0) to
highest corner (1,1,1).
Meeting3D.m: This simulates 3 people meeting. Each person will only wait around for
0.5 time units.
- Sph3D.m: This simulates the ratio of points in 1/8 of a 3D sphere.
6 times this ratio should be pi.
Send
comments to: mkawai@math.cudenver.edu
Last modified on 30 November 2006.