(1) | _____ |
Which of the following is a type of automatic vehicle location system? |
|
||
(2) | _____ |
In an even parity checksum scheme: |
|
||
(3) | _____ |
The RS232-C protocol: |
|
||
(4) | _____ |
The worst-case asymptotic (time) efficiency of retrieving an element from an two-dimensional array is: |
|
||
(5) | _____ |
GPS satellites transmit: |
|
Evaluate each of the following expressions related to checksums
(where ^
is the bitwise exclusive or operator, and
%
is the modulo operator). Your answer must be
in decimal (i.e., base 10).
16 ^ 16
|
(1) |
(7 + 4) % 8
|
(2) |
(211 + 32) % 256
|
(3) |
1 ^ 2 ^ 3 ^ 4
|
(4) |
JMUmble
. In this system, arriving messages are
handled by a PostOffice
object. Depending on how the
system is configured at runtime, one or more objects might need to
know when a message arrives. I have currently implemented several
such classes: Flasher
(which makes a light near the
speedometer flash),
PopularityTimer
(which starts a clock on your radio
that show the amount of time since the most recent message
arrived), and Mumbler
(which uses speech generation
to read the name of the person that sent the message -- this is
where the system got its name). Use the observer pattern to
develop a class model of this system (in UML). You do not need to
include the attributes of each class, only the
operations/methods. Include comments that describe each
operation/method.
Point
class discussed in lecture,
trace the execution of the following application (that was developed
as part of a system for partitioning spatial data):
public class Subdivide { public static Point i, j, one, startMax, startMin; public static void main(String[] args) { double[] v; // Create the unit vector i = (0,1) v = new double[2]; v[0] = 1.0; v[1] = 0.0; i = new Point(v); // Create the unit vector j = (1,0) v[0] = 0.0; v[1] = 1.0; j = new Point(v); // Create the vector one = (1,1); one = i.plus(j); // Create the vector lowerLeft = (0,0) v[0] = 0.0; v[1] = 0.0; startMin = new Point(v); // Create the vector upperRight = (4,4) v[0] = 4.0; v[1] = 4.0; startMax = new Point(v); // Quarter the rectangle formed by (0,0) and (4,4) quarter(startMin, startMax); } public static void quarter(Point min, Point max) { Point delta, rho, tmin, tmax; System.out.println("Min: "+min+" Max: "+max); rho = max.minus(min); delta = rho.times(0.5); if (delta.gt(one)) { // NW tmin = min.plus(j.ctimes(delta)); tmax = tmin.plus(delta); quarter(tmin, tmax); // NE tmin = min.plus(delta); tmax = tmin.plus(delta); quarter(tmin, tmax); // SE tmin = min.plus(i.ctimes(delta)); tmax = tmin.plus(delta); quarter(tmin, tmax); // SW tmin = min; tmax = tmin.plus(delta); quarter(tmin, tmax); } } }
You must find non-negative values of and that solve this system. Specifically, you must use the Golden Section algorithm to find the value of that minimizes:
Show three iterations of the Golden Section algorithm starting with a lower bound of and an upper bound of .
Copyright 2007