Ambiguities
This set of exercises were designed to illustrate some of the difficulties in using natural language as a means of precise communication. Most of the exercises were open-ended, so only an illustrative set of possible answers are provided.
Exercise 1
Write three sentences that are ambiguous along the lines of ‘The chicken is ready to eat’. Can you think of more?
Here are some which exhibit various kinds of ambiguity. Some of the ambiguities arise from poor word order in the sentences while others come from the use of homonyms.
-
Arnold’s Body Works. (Sign on automotive repair shop)
-
‘Hmph!’ snorted Major Featherstonehaugh, and grasped his monocle which was lying on his spare chest.
-
I can recommend this candidate for the position for which he has applied with complete confidence.
-
I was thrown from my car as it left the road. I was later found in a ditch by some stray cows.
-
If the baby does not thrive on raw milk, boil it.
-
It was here that the Emperor liked to put on his grand spectacles.
-
Joe saw the man with the telescope.
-
Much discussion was going on about him.
-
Summarising, the study showed that males of the sixties generation kept their hair longer than those who had grown up in other decades.
-
The farmer talked about the stocking of pig pens with his neighbours.
-
There will be a meeting on bicycles in Conference Room 3.
-
Wanted: A rabbit for a child with floppy ears.
Exercise 2
How many ways can a date be written? Are they all in use? What other sorts of calendrical sytsems are there in addition to Anno Domine style dates?
The most common dating systems use a combination of day, month, year. There is a total of six combinations among the ordering of these quantities. However, we are not aware of any dating systems in use that put the year between the month and the day, thus leaving four possible orderings. In the USA the ordering is month, day, year; in the UK it is day, month, year; ISO specifies that the ordering shall be year, month, day.
In Anno Domine style dates years are counted from the birth of Christ; the calender is called the Gregorian calender after Pope Gregory XIII who, in 1582, reformed the previous Julian calander to take better account of the intercalated days (leap days) and thus ensure that the start of the year remained at the same point in the seasons of the year.
Other systems have different starting points for the zero’th year.
The Muslim calendar is basically a lunar calendar with months of either 29 or 30 days. Years are counted from the first day of the month preceeding the flight of Mohammed from Mecca to Medina. In the Gregorian calendar the starting date corresponds to Thursday 19 July, 622 AD.
The Jewish calendar is based on solar years and lunar months. In order to keep these synchronised some years have an intercalary 13th month of 30 days. Years are counted since the Creation and written as 1993 AM (anno mundi). In the Gregorian calendar, and Monday 7 October 3761 BC at 11 hours and eleven and one third minutes PM.
Most countries use the Gregorian calendar for secular purposes, but some countries also have a seperate religious calendar. India is oneexample, where the Hindu calendar is used for the timing of religious festivals.
Another form of calendar is a fiscal calendar. It often happens that the start of a fiscal year does not coincide with the usual calendar year. Examples are the income tax year in the UK which starts on 5 April, so the 1993 tax year extends from 5 April 1993 to 4 April 1994; another is the USA Department of Defence budget year which starts on 1 October. In some cases, fiscal years start on the nearest Monday to a given date, and the months are divided up into 4 and 5 week periods, so that each fiscal month starts on the same day of the week throughout the year. In this case, the months typically are numbered from the start of the year rather than being named.
Some dating systems, particularly for industrial planning and scheduling systems, just use day and year, where the days are counted from the start of the year. Thus, the third of February 1993 would be written as 34/1993.
Exercise 3
Ouida is said to have said ‘All rowed fast but none so fast as stroke’. The word ‘stroke’ has many other meanings than in this quotation. How many ways can you interpret the word ‘stroke’? Write sentences which provide examples for each meaning.
Here is a non-exhaustive listing:
-
He stroked her hair.
-
The blood clot eventually reached his brain and the resulting stroke left his left side paralysed.
-
The advance started at the stroke of midnight.
-
Casey struck out.
-
Frieda won the backstroke competition.
-
The lightning stroke felled the tree.
-
With a stroke of his pen the immigration officer dashed all of their hopes.
-
His plan was a master stroke.
Exercise 4
How many descriptions can you think of for a timepiece? List them.
The following is a reasonably comprehensive list.
-
One or two pointers, mounted on a common axis, rotating above a marked circle. (An analog clock or watch)
-
A device that measures the periods of radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium 133 atom. (An atomic clock)
-
A marked cylinder of wax with a burning central wick. (A candle)
-
A digital display driven by a microchip. (A digital clock or watch)
-
Two chambers, one above the other, connected by a thin passage, with sand flowing between them. (An hourglass)
-
A rod at 45 degrees to the vertical surrounded by a graduated sector. (A sundial)
-
A graduated container with water dripping out of it. (A water clock)
Exercise 5
Write a more general definition for ‘cloverleaf’ that makes no assumptions about which side of the road people drive on.
A traffic arrangement in which one highway passes over another and the roads connecting the two are in the pattern of a four-leaved clover so that traffic moving from one highway to the other can merge with the traffic flow without crossing in front of oncoming vehicles.
Simple models
This set of exercises is intended to help the reader think about categorization and classification, and to provide some experience in creating some small information models.
Exercise 1
Develop a categorization system for non-fiction books. (Hint — think how they are organised in a library).
There are several systems in use for book classification. Two well known ones are the Library of Congress and the Dewey Decimal Systems.
Library of Congress system
The Library of Congress scheme partitions books into 20 classes, each class being designated by a letter. Subclasses are designated by letter combinations and topics by a numerical code. The following is a list of the top-level classes and the number of subclasses within each of these is given in parentheses.
- A:
-
General works (10)
- B:
-
Philosophy, Psychology, Religion (14)
- C:
-
Auxiliary Sciences of History (9)
- D:
-
History: General and Old World (19)
- E-F:
-
History: Western Hemisphere
- G:
-
Geography, Anthropology, Recreation (8)
- H:
-
Social Sciences (15)
- J:
-
Political Science (10)
- K:
-
Law (8)
- L:
-
Education (10)
- M:
-
Music (2)
- N:
-
Fine Arts (7)
- P:
-
Language and Literature (18)
- Q:
-
Science (11)
- R:
-
Medecine (16)
- S:
-
Agriculture (5)
- T:
-
Technology (16)
- U:
-
Military Science (8)
- V:
-
Naval Science (9)
- Z:
-
Bibliography, Library Science
The classification structure extends several levels deep. As an example of a subclass, here is the listing for General Works (Class A).
- AC:
-
Collections
- AE:
-
Encyclopedias
- AG:
-
Dictionaries
- AI:
-
Indexes
- AM:
-
Museums
- AN:
-
Newspapers
- AP:
-
Periodicals
- AS:
-
Acadamies and Societies
- AY:
-
Yearbooks, Almanacs, Directories
- AZ:
-
History of scholarship
The Dewey system
In 1873 Melvil Dewey (1851-1931) proposed the classification system that bears his name. At the top level there are ten classes, numbered from 000 to 900, in steps of one hundred. Sub-classes are numbered in steps of ten, sub-subclasses in steps of one, and so on. The top level of this structure is:
- 000:
-
Generalities
- 100:
-
Philosophy and psychology
- 200:
-
Religion
- 300:
-
Social sciences
- 400:
-
Language
- 500:
-
Natural sciences and mathematics
- 600:
-
Technology (Applied sciences)
- 700:
-
The Arts
- 800:
-
Literature and rhetoric
- 900:
-
Geography and history
The system supports several levels of refinement — a complete listing requiring a a book of itself. In order to provide a comparison with the Library of Congress system the first-level divisions under Generalities (Class 000) are:
- 010:
-
Bibliography
- 020:
-
Library and information sciences
- 030:
-
General encyclopedic works
- 040:
-
(nothing in this sub-class)
- 050:
-
General series and their indexes
- 060:
-
General organisations and museology
- 070:
-
News media, journalism, publishing
- 080:
-
General collections
- 090:
-
Manuscripts and rare books
Exercise 2
Develop a categorization scheme for the goods sold in your local grocery store.
Here is one classification structure, where we use an indented listing to show the categories and sub-categories:
-
FOOD
-
Fresh
-
Frozen
-
Canned and bottled
-
Dried
-
-
DRY GOODS
-
Cleaning materials
-
Paper goods
-
Utensils
-
-
BEVERAGES
-
Soda
-
Juice
-
Dairy
-
Alcoholic
-
Of course, there are many other ways in which we could classify these. For example, the food category has been classified according to the storage process. Here is another way to classify food — by the kind of consumer:
-
FOOD
-
Baby
-
Adult
-
Pet
-
Gourmet
-
Yet another way is by the kind of food itself:
-
FOOD
-
Meat
-
Fish
-
Vegetable
-
Fruit
-
Pasta
-
Baked
-
Dairy
-
etc.
-
From the food example, it rapidly becomes obvious that there are many ways in which things can be classified, and each of the ways is appropriate according to the particular view of the classifier. It also turns out that often we need multiple classifications. For example, a certain baby food may be tinned, pureed fruit, which cuts across the classifications given above.
Exercise 3
A book is written by one or more authors and is printed by a single publisher.
A book is owned by a person. Sketch a model that captures these statements.
The following is one possible EXPRESS model.
*)
SCHEMA exercise_2_3;
ENTITY book;
author : SET [1:?] OF person;
published_by : publisher;
END_ENTITY;
ENTITY ownership;
owner : person;
item : book;
END_ENTITY;
ENTITY person;
name : STRING;
END_ENTITY;
ENTITY publisher;
name : STRING;
END_ENTITY;
END_SCHEMA;
(*
Exercise 4
Sketch a model of a bicycle. Assume that a bicycle consists of a frame, a saddle, handlebars, pedals, and two wheels.
In the following models, the decompostion has only been taken to the first level. That is, the major element in the model, namely the bicycle, has been completely described, but the components of the bicycle have merely been noted and not elaborated. The model is very simple as the bicycle just consists of the noted components.
*)
SCHEMA exercise_2_4;
ENTITY bicycle;
body : frame;
seat : saddle;
steered_by : handlebar;
driven_by : SET [2:2] OF pedal;
supported_by : SET [2:2] OF wheel;
END_ENTITY;
ENTITY frame; (* attributes *) END_ENTITY;
ENTITY saddle; (* attributes *) END_ENTITY;
ENTITY handlebar; (* attributes *) END_ENTITY;
ENTITY pedal; (* attributes *) END_ENTITY;
ENTITY wheel; (* attributes *) END_ENTITY;
END_SCHEMA;
(*
Exercise 5
How does your model change if you include a chain connecting the pedals to the rear wheel, and also if you consider that a wheel has a hub, spokes, a rim and a tire?
Having more knowledge about the components of the bicycle leads to a richer model. There are several ways in which the information could be represented, and we have made a fairly arbitrary choice. It is reasonably obvious that a wheel consists of several components, which enables us to elaborate on the definition of this entity. We also chose to indicate that the pedals, chain and one wheel (usually the rear one) together performed the drive train function for the bicycle. Similarly, the handlebars and the other (front) wheel enabled the bicycle to be steered.
*)
SCHEMA exercise_2_5;
ENTITY bicycle;
body : frame;
seat : saddle;
steered_by : steering_assembly;
driven_by : driving_assembly;
END_ENTITY;
ENTITY frame; (* attributes *) END_ENTITY;
ENTITY saddle; (* attributes *) END_ENTITY;
ENTITY steering_assembly;
control : handlebar;
support : wheel;
END_ENTITY;
ENTITY handlebar; (* attributes *) END_ENTITY;
ENTITY wheel;
center : hub;
outer : rim;
support : tire;
connectors : SET [4:?] OF spoke;
END_ENTITY;
ENTITY hub; (* attributes *) END_ENTITY;
ENTITY rim; (* attributes *) END_ENTITY;
ENTITY tire; (* attributes *) END_ENTITY;
ENTITY spoke; (* attributes *) END_ENTITY;
ENTITY driving_assembly;
driver : SET [2:2] OF pedal;
driven : wheel;
connection : chain;
END_ENTITY;
ENTITY pedal; (* attributes *) END_ENTITY;
ENTITY chain; (* attributes *) END_ENTITY;
END_SCHEMA;
(*
Regular models
The exercises in this set were designed to provide a variety of modeling tasks.
Exercise 1
Do the following:
Write an information model that describes the logical content of a report. Assume that a report consists of a title and one or more authors, together with the publication date. It may have an abstract and may have a table of contents. The body of the report consists of at least two sections. Further divisions of the report are subsections and sub-subsections. Figures and tables may also be included within any sub-subsection, or higher level partitions. The report may have a bibliography.
Write an information model that describes a book. A book is similar to a report with the following exceptions. A book may consist of two or more parts, each of which must contain two or more chapters. Each chapter contains at least two sections. There is always a table of contents and there is never an abstract, although it may have a preface which serves the same purpose. A book may have an index.
Does the above description apply to all books?
Create an information model that supports both reports and books. Include anything extra that you feel is necessary that is missing from the above descriptions.
This is a start at the first part of the exercise.
*)
SCHEMA exercise_4_1_1;
TYPE title = STRING; END_TYPE;
TYPE subject = STRING; END_TYPE;
TYPE page_id = STRING; END_TYPE;
TYPE author = STRING; END_TYPE;
TYPE date = STRING; END_TYPE;
TYPE text = LIST [1:?] OF STRING; END_TYPE;
TYPE table = LIST [1:?] OF BINARY; END_TYPE;
TYPE figure = LIST [1:?] OF BINARY; END_TYPE;
ENTITY report;
start : front_material;
body : LIST [2:?] OF section;
finish : OPTIONAL bibliography;
END_ENTITY;
ENTITY front_material;
title : subject;
authors : SET [1:?] OF author;
issued : date;
abstract : OPTIONAL text;
contents : OPTIONAL table_of_contents;
END_ENTITY;
ENTITY table_of_contents_entry;
subject : subject;
placement : OPTIONAL page_id;
END_ENTITY;
ENTITY table_of_contents;
entries : LIST [1:?] OF UNIQUE table_of_contents_entry;
END_ENTITY;
ENTITY section;
title : subject;
body : OPTIONAL text_andor_insert;
subdivision : LIST OF sub_section;
END_ENTITY;
ENTITY sub_section;
title : subject;
body : OPTIONAL text_andor_insert;
subdivision : LIST OF subsub_section;
END_ENTITY;
ENTITY text_andor_insert;
words : LIST OF UNIQUE text;
tabulars : LIST OF UNIQUE table;
illustrations : LIST OF UNIQUE figure;
END_ENTITY;
-- and so on
END_SCHEMA;
(*