Prof. Cohen Goes To A Party
Prof. Haskell Cohen and his wife, Lois, attended a party with four
other couples. During the course of the evening some of the people
shook hands with each other. Of course, no one shook hands with
themselves or their mates. Afterwards Prof. Cohen asked each of the
nine others how many people they shook hands with. Surprisingly, each
one gave a different answer. Question: How many people did Lois shake
hands with?
From Department of Mathematics and Statistics, University of
Massachusetts, Amherst, Newsletter. Prof. Haskell Cohen,
Problem Editor (and my freshman year calc Prof!)
Hint: After I thought about some of the properties of the problem, I
used a graph to solve it. You may use the graph editor below as a
scratch pad to help you solve the problem.
A Simple Graph Editor
(Directions for use are below the editor)
This is a very large applet (180K). It takes about four minutes to
download on my 28.8 modem. Sorry. When more people start using Java 1.1 I can
VASTLY reduce download times (with a JAR file).
While it loads, think about the problem!
Directions
Add A Node (a shape)
A node is an endpoint in a graph. You may use nodes to represent
different people at the party.
- Click (press and release) the button of the shape you want to add. You
are now in "add node" mode.
- Use the mouse to position the shape on the workspace. You will drag
the shape around until you release the mouse button.
- You do not need to press the button again to add more nodes of this type.
Add An Edge (a line connecting shapes)
An edge represents a relationship between the nodes. You connect nodes
with edges. You may use an edge to show that two people have shaken hands.
- Click (press and release) the button labeled "Edge".
- Press and hold the left mouse button inside the shape that you want
to be the first endpoint.
- Drag the line outside this shape and route it to the shape you want
as the other endpoint.
- You may route an edge through the workspace by adding anchor points.
If you drag the edge to a position outside of all the nodes, and release
the mouse button, I will add an anchor point (an endpoint to a line) and
you can keep routing the edge until you terminate the edge on a node.
Move
You may want to reposition the nodes and edges. Of course, the edges will
stay attached to their edges as the elements are repositioned.
- Click (press and release) the button labeled "Move".
- If you want to move a node, click somewhere inside the node and
drag it to your desired position.
- If you want to move an edge, click on one of its anchor points, and
drag the control point to your desired position
- Sorry, once an edge is added you may not add new anchor points.
Size
You may want to change the size a node.
- Click (press and release) the button labeled "Size".
- Click somewhere inside the node you want to resize, and drag the
corner of the node until it is the size you want.
- Sorry, you can not resize edges.
Delete
You may want to get rid of some of the elements.
- Click (press and release) the button labeled "Delete".
- Click on the element you with to delete.
Changing Colors Of Outlines
- Click (press and release) the button labeled "Pen".
- Click (press and release) the button for the color you want.
- Click on the element you want to change.
Changing Colors Of Fills
- Click (press and release) the button labeled "Brush".
- Click (press and release) the button for the color you want.
- Click on the node you want to change.
Please, please, please, if you have any problems with this page
(especially the applet) please write. I just put it on the web
on Feb. 24. I have only tested it under Netscape 3.0.
I welcome all mail.
determan@world.std.com