Homework Number One - Part Two

 

Part Two: Getting Familiar with Maple

 

Maple is a fairly capable symbolic programming system. We will be using it to automate some of the tedious computational tasks involved in cryptology. You will not be expected to learn to program in Maple (though you are welcome to do so, and may find it a useful skill in some subsequent courses). I will provide Maple "worksheets" containing programs for you to use.

In what follows I will assume that you are using an Andrew Unix workstation (or some kind of Linux machine with Maple 8 installed). You probably want to create a new directory for your Maple experiments.

  1. Use your browser to download the sample Maple worksheet sample.mws, you are welcome to look at it as a plain text file but won't find it very informative I think.
  2. At the command line type "xmaple &". After a few seconds a window headed "Maple 8" should appear. At the top you should see a line with the basic command categories "File Edit View Insert ..." and below that a large number of buttons. Below the buttons is a large white space containing a window headed "Untitled (1)", this window is a "worksheet" where we can enter Maple commands and perform computations.

    All Maple worksheets will appear inside the main Maple 8 window. Maple has its own built in windowing system (which seems to resemble Motif) for managing the worksheet windows. Each worksheet has three buttons at the top, the one at top left has a pulldown menu with some commands and the buttons at top right are for iconifying the window and maximising it to fill the available space. You double-click on an icon to uniconify.

  3. In the worksheet window "Untitled (1)" you should see a greater-than sign (>) which is the Maple prompt, and by it a blinking cursor. Enter "2 + 2;" and hit enter. You should see Maple returning the answer "4".

    Maple works by evaluating expressions, which are terminated by a semi-colon (;) and which can be entered over as many lines as you wish. Try entering "2 [enter] + [enter] 2 [enter] ; [enter]" and see what happens. Play around and see what else you can compute.

  4. Now close the "Untitled (1)" worksheet by clicking on the button at top left and selecting "Close" from the menu. You will be asked if you want to save the worksheet, say "No".

    Select "File" at the top of the screen and then "Open" from the pulldown menu. Enter "sample.mws" in the "Filename" box of the "Open file" window which pops up.

  5. Follow the directions on the worksheet. Once you have worked through it play around! See what you can make the system do.