\font\largerbold = cmbx10 scaled \magstep1
\font\largerrm =cmr10 scaled \magstep1
\def\map{{\tt Maple}}
\font\largertt = cmtt10 scaled \magstep2
\def\H{\char `\^}
\def\R{{\sevenbf RET}}
\def\Q{\hskip 1in}
\def\QQ{"}
\nopagenumbers
\font\sc=cmcsc10.tfm
\magnification=\magstep1
%\parindent 0pt


\centerline{\largerbold Math 103: other homework problems}
\bigskip
 
Several problems were not used during the second instantiation of this
course. I wanted to reduce the workload for students, and I also
decided {\it not}\/ to attempt to compute multiplicative inverses mod
a prime. Although this is discussed in the (nominal) text, when I
tried it the first semester, my lack of success in teaching it was
notable.

\bigskip

\noindent{\bf A secret sharing problem}

\medskip

This problem was assigned together with the first writing assignment
on medical record privacy. I assigned it in order to get the students
to think a bit about secret sharing. I believe the problem was a bit
too difficult.

A farm is managed by two committees. There's a combination lock for
watering which is kept secret. Each committee must contribute part of
the secret combination, which is 203. 

The corn committee consists of Albert, Betty, and Charlie. At least
two of the three people on this committee must consent to open the
lock.

The wheat committee consists of Betty, Debbie, Edward, Fran, Gilda,
and Harry. At least four of these six people must consent to open the
lock.

Give everyone mentioned numbers which will allow this to occur. Note
that what you could do is ``share a secret number'' over the corn
committee, and then ``share another secret number'' over the wheat
committee, and make the combination (203) the sum of the two numbers.

You might also want to make Betty's life easier by arranging that she
only needs to remember one $x$ value and one $y$ value which would
work in either committee's considerations.

You should tell me:

\item{$\bullet$} Your polynomial for the corn committee, and the
numbers you give each member of the corn committee.

\item{$\bullet$} Your polynomial for the wheat committee, and the
numbers you give each member of the wheat committee. Note that the
degree of this polynomial should be $\ldots$\footnote*{ When we shared
a secret so that {\it two}\/ people were necessary, the degree used was 1:
$ax+b$. When we shared a secret so that {\it three}\/ people were
necessary, the degree used was 2: $ax^2+bx+c$. Now we will need $\ldots$}

\noindent You don't need to make up anything very complicated. I just
want the numbers and the polynomials so I can check your understanding
of the ``protocol''. 

\bigskip

\noindent{\bf Homework on multiplicative inverses}
\def\mod{{\rm mod}}
\medskip

These problems would be useful if students knew or understood
multiplicative inverses. Problem 2 asked people about a certain
transposition cipher, and problem 3 was an early attempt to have
people work together.

\parindent=0pt
\noindent 
1.~Do problem \# 6 on page 30 of the text. \

{{\sc
Finally, an assignment from the book! If you want
everything on one page, 

here's the problem:}

\smallskip
\noindent 6.\ (a) Compute integers $x$ and $y$ with the property that
$$1=17x+55y.$$

\noindent (b) Compute $(2/17)\;\mod\ 55$ and $(2/55)\;\mod\ 17$.
 
%\noindent 

{\sc I think the textbook wants solutions to 
${17x=2\; \mod\ 55}$ and ${55x=2\; \mod\ 17}$. 

Try
multiplying the equation you get by 2. }}

\bigskip

\noindent
2.~A secret message is being sent in a transposition cipher. A integer
$a$ between 1 and 12 is selected. The
following process is used: the message is divided into chunks of 12
letters each. In each chunk, we imagine the letters ${\sl L}_1$, ${\sl
L}_2$, $\ldots$, ${\sl L}_{12}$ interchanged according to the following
rule:
\medskip
{\narrower\narrower\narrower\noindent
The letter in the $j^{\rm th}$ position gets
changed to the $(a\cdot j)^{\rm th}$ 

\noindent position, where multiplication is
done \underbar{mod {\bf 13}}.\par}
\medskip
The following 12 letter message is encrypted using this procedure (it
is the beginning of a secret about making bread):
\medskip


\indent {\bf Plaintext} {\tt BETTER BATTER} (but no spaces will be
used in encryption!)

\smallskip

\indent {\bf Ciphertext} {\tt E T E B R T T B R E T A}

\medskip

\noindent Question: what is the key, $a$, in this case? Support your
answer with some reasoning.

\bigskip

\noindent 3.~Your number is {\largerrm 1432}\footnote{$\dag$}{There
were two versions of this assignment. Half the class was to get the
version with {\largerrm 8414} here. Alternately, I was going to pass
around two sign-up sheets, as shown on the next page.}. Assume that
the following statement is true:

\centerline{ 9001 is a prime number. }

\noindent
a) Find the multiplicative inverse of your number mod 9001.
Hand in your work for this. Also, verify that your answer is correct,
by showing that the product of your answer and the number you began
with is 1 more than an integer multiple of 9001. (So you just need to
write the equations, with all the integers shown. I hope/assume that
arithmetic will be done ``by silicon''.)

\medskip
\noindent
b) There were two different numbers given out. Two different inverses
will be found. The \underbar{product of the two inverses} will be an
encoded\footnote{**}{{\sc As before:} 

\narrower \noindent The alphabet has 26
letters. Suppose we associate each letter with a two-digit number in
the simplest way: ${\tt A} \to 01$, ${\tt B} \to 02$, $\ldots\;$,
${\tt Z}\to 26$. Thus the word {\tt WIGGLE} would be associated to the
number 230907071205 ({\tt W} is the $23^{\rm rd}$ letter of the
alphabet, {\tt I} is the $9^{\rm th}$ letter of the alphabet, etc.).\par}
pair of letters indicating a recent foe of Rutgers. The first team of
people (at least two on a team, please) to identify this pair of
letters via e-mail to me will win a prize! Some evidence supporting your
solution should also be given in the message. Please identify all
members of your team in the message.

\vfil\eject

\centerline{Your number is: \largerrm 1432}

\bigskip\bigskip

{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip

\vfil


\centerline
{\largerbold  RECORD YOUR NUMBER AS YOU SIGN THIS RECEIPT!!!}
\bigskip\bigskip

\centerline{Your number is: \largerrm 8414}

\bigskip\bigskip

{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip


\eject\end
{\bf Name} {\vrule height 1pt depth 0pt width 1.5in} \smallskip
b e t t e r b a t  t  e  r 
1 2 3 4 5 6 7 8 9 10 11 12

E T E B R T T B R E T A  (BY 5!)
5, 10, 2, 7, 12, 4, 9, 1, 6, 11, 3, 8

B B A E T T T T E E R R (BY 7!)
7, 1, 8, 2, 9, 3, 10, 4, 11, 5, 12, 6

the frog














This assignment has two parts, one primarily mathematical in nature
and one asking you to write about privacy. You should hand in both
parts on Tuesday, September 14.

\bigskip

\noindent{\bf Math}

\medskip

A farm is managed by two committees. There's a combination lock for
watering which is kept secret. Each committee must contribute part of
the secret combination, which is 203. 

The corn committee consists of Albert, Betty, and Charlie. At least
two of the three people on this committee must consent to open the
lock.

The wheat committee consists of Betty, Debbie, Edward, Fran, Gilda,
and Harry. At least four of these six people must consent to open the
lock.

Give everyone mentioned numbers which will allow this to occur. Note
that what you could do is ``share a secret number'' over the corn
committee, and then ``share another secret number'' over the wheat
committee, and make the combination (203) the sum of the two numbers.

You might also want to make Betty's life easier by arranging that she
only needs to remember one $x$ value and one $y$ value which would
work in either committee's considerations.

You should tell me:

\item{$\bullet$} Your polynomial for the corn committee, and the
numbers you give each member of the corn committee.

\item{$\bullet$} Your polynomial for the wheat committee, and the
numbers you give each member of the wheat committee. Note that the
degree of this polynomial should be $\ldots$\footnote*{ When we shared
a secret so that {\it two}\/ people were necessary, the degree used was 1:
$ax+b$. When we shared a secret so that {\it three}\/ people were
necessary, the degree used was 2: $ax^2+bx+c$. Now we will need $\ldots$}

\noindent You don't need to make up anything very complicated. I just
want the numbers and the polynomials so I can check your understanding
of the ``protocol''. 

\bigskip

\noindent{\bf English}

\medskip

Please write an essay of one to two pages (using a standard font!) on
a topic connected with the privacy of medical records. The essay can
be expository, discussing some aspect of the issues. The essay could
be argumentative, supporting a viewpoint. Give any references you use
(please do use at least two!).

General comments about writing:

I've generally found writing even adequately to be difficult. I
have a few suggestions.

\item{$\bullet$} Check your spelling.

\item{$\bullet$} Write complete and direct sentences.

\item{$\bullet$} Proofread your own work and edit it. Plead with a
friend to read your work.

\item{$\bullet$} Buy a copy of {\sl The Elements of Style} by Strunk
and White and read it once a year. This is a very short book. An
early edition of it is available on the web. Take a look at 
{\tt http://www.bartleby.com/141/index.html}.

\vfil\eject\end


\bigskip







Each student should find the answers to the two questions below and
e-mail them to me. Each student {\it must} send me a separate e-mail
message before the next class. Students may work together. If they
work together each student's e-mail message should acknowledge any
help they have gotten, either from other students in the course or
from other people.
\medskip

{\parindent=.5in\narrower

\noindent Question \#1: How many
digits does $13^{13}$ have and what is the middle digit?
\medskip

\noindent Question \#2: $2634^8$ has a bunch of 0's in it. How many?

}

\smallskip
\centerline{\vrule height 2pt depth 0pt width 3truein}
\medskip

I do \underbar{not} expect people to even attempt either of these
questions by hand, or even with a standard calculator. Something
stronger is necessary: I suggest the program, \map, which is available
on most Rutgers computer systems, including {\tt eden}.

\smallskip

\parindent=0pt

\noindent {\bf Step 0} In order to effectively use \map\ with the {\tt
xmaple} interface students need to get {\it out} of the menu system
which they have with their default {\tt eden} login. To do this they
need to find the command {\tt revert} on their menu system, enable
this command, and logoff and logon again. They will then get a
{\tt unix} prompt and will be able to begin the sequence of exercises
described here which will familiarize them with \map.


\noindent{\bf Now begin} What I'd like you to type at the terminal
will be in {\sl this typeface} with numbers that look like this {\sl 1
4 7 9} and these suggestions will be indented about an inch. I'll ask
you to hit the ``enter'' key (new line) with the request \R . Now,
please, log in to {\tt eden} and get a prompt in an x-window. Then
type

\Q {\sl xmaple \&} \R
 
The system should respond with a \map\ screen
on your display. There are standard ways for you to move or resize the
screen, and various \map-specific command possibilities. \map\ is a huge
program with a great many capabilities. We'll just explore a few of
them. Right now I'd like you to move your mouse into the \map\ window. 
You'll see this, which is the ``command line'':

\Q $ >|$

The symbol for your cursor is $|$ and it is currently at an input
line, indicated by the $>$ sign. Please type

\Q {\sl 3+2;} \R

Something should happen. You should get 5 and a new input
line. You can move your cursor up and down. Do this, and see the word
``Input'' on the \map\ screen change in succession to
``Separator'' and then to ``Output'' and then to ``Input'' when your
cursor gets back to the original line. 

Now move your cursor back to your \underbar{new} input line. Type

\Q {\sl 17*3;} \R

and see what the result is. At the next input line type

\Q {\sl "+5;} \R 

and explain the result. What do you think the meaning of the symbol
{\sl "} is?

Now type the following to learn what \H\ means.

\Q {\sl 2\H 3;} \R

But $\ldots$ I made a mistake! I wanted you to calculate the 300$^{\rm
th}$ power of 2! Please do the following: move your cursor back to the
input line with $2\H 3$ and position it in the following place: $>2\H
3|;$ and now type {\sl 00} and immediately hit \R . What happened?
Please compute $3^{300}$ in the same fashion by moving your cursor to
a new input line. What are the first 5 and last 5 decimal
digits of this number? {\sevenrm 13689 and 66001}

A little more: please type (look carefully here -- I'm asking for a
{\bf colon}, {\sl not} a {semicolon}!)

\Q {\sl 5+6:} \R

You should immediately get another input line. Type (for example)

\Q {\sl \QQ +7;}

and deduce what \map\ does when an input line ends with a {\sl :}
(that is, a colon). Note that computations might and do occur which
have results that are huge and silly to print out if you don't need
them --- 2\H (2\H (2\H (2\H 2))), for example. Try that sometime on
your own, please, with ``;'' rather than a ``:'' and see what
happens. {\sevenrm 19729 digits, I think!} Onward: please type

\Q {\sl 20;} \R

and see the result. Go back with your cursor and put a space between
the 2 and the 0 and hit \R . What's the result? \underbar{You haven't
broken anything -- just go on!}

Now let's try

\Q {\sl 2*3+7;} \R

and observe that \map\ follows the usual rules of precedence. Can you
put parentheses in so that \map\ will compute two times the sum of
three plus seven instead? Remember to hit \R\ after you make the
alterations. You should have gotten 20 as your answer, of course. If
you did {\bf not} make an error inserting the parentheses, go back and
take one out (create an intentional {\bf error}!) and then hit \R
. What happens? \underbar{You haven't broken anything}. Let's keep
exploring. Please get a new input line and try these commands in
succession to learn how to do more arithmetic and to explore more
features of \map .

%\medskip
%\rightline{\bf OVER}
%\vfil\eject
\Q {\sl 2/3;} \R

\map\ computes ``exactly'' and can do some (fourth grade?) arithmetic:

\Q {\sl \QQ *300;} \R

Now try 

\Q {\sl{sqrt}(2);} \R

and now

\Q {\sl \QQ \H 2;} \R

so \map\ knows the ``meaning'' of fractions and square roots -- or at
least how to manipulate them. And now try (remember, if you mess up
with a parenthesis or something else, just go back and do it again --
nothing is broken!):

\Q {\sl({sqrt}(2)-1)\H 5;} \R

This result is puzzling. Sometimes \map\ is lazy. Let's urge it to
work by writing

\Q {\sl expand(\QQ);} \R

That's better. But what if we want or need decimal approximations? Try

\Q {\sl evalf(sqrt(2));} \R

Parentheses need to be matched -- always a source of anxiety as more
and more complex expressions and commands are typed.

What if we want more digits of $\sqrt{2}$? We can coax {\sl evalf} to do
this with informed use. To see how, type

\Q {\sl help(evalf);} \R

Another screen should pop up. When I use \map\ I tend to need a lot of
help so the help screens accumulate on my display. You can ``click''
them on and off, and eliminate them entirely if you like. Read the
evalf screen (I usually skip to the examples on any help screen
first!) until you can figure out how to get the first 100 digits of
$\sqrt{2}$. What is the one-hundredth digit \underbar{after} the decimal point?
{\sevenrm It is 7 -- be slightly careful since that second number in evalf
gives the total number of digits, and the 1 before the decimal point
counts as one of the digits!}  Can you tell me the three-hundredth
digit after the decimal point of $17^{1/3}$? {\sevenrm This should be
5.} Use lots of parentheses, even in exponents, to inform \map\
clearly what you want.

Now try

\Q {\sl 1400/24;} \R

and we learn that \map\ knows how to factor integers
automatically. Can you get \map\ to factor your social security
number? How would you find a factoring command in \map ? If the first
thing you try with the {\sl help} command doesn't work, look at
the references on the SEE ALSO line and check one of them.

You can stop your \map\ session at any time in a variety of ways. One
way that is polite to the system and also simple for you is to type

\Q {\sl quit} \R
 
and your \map\ window will disappear after you answer the question
about storing your work. {\sevenrm That's probably not necessary right
now!}

\smallskip
\centerline{\vrule height 2pt depth 0pt width 3truein}
\medskip


\centerline{You can't break the program.} 
\medskip
\centerline{{\map\ will, however,
compute exactly what you type, not what you think you've typed!}}
\medskip

\centerline{\hsize=4.8in \vtop{Almost every time I work with \map\ I
forget to type the darn {\it ;}\/ so I sit and watch the screen,
wondering why my computation doesn't work. The semicolon signals the
program that you've finished typing and that it should start
computing.}}


\vfil\eject\end
