Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
21 views734 pages

CT Week 1-4 Lectures

The document provides an introduction to flowcharts, detailing commonly used symbols and their meanings, such as process activities, flowlines, decisions, and terminals. It includes specific flowcharts for counting cards and summing math marks, illustrating iterative processes and conditions for filtering data. Additionally, it discusses data types, their constraints, and operations, emphasizing the importance of defining data types for effective data management.

Uploaded by

hariram2728
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views734 pages

CT Week 1-4 Lectures

The document provides an introduction to flowcharts, detailing commonly used symbols and their meanings, such as process activities, flowlines, decisions, and terminals. It includes specific flowcharts for counting cards and summing math marks, illustrating iterative processes and conditions for filtering data. Additionally, it discusses data types, their constraints, and operations, emphasizing the importance of defining data types for effective data management.

Uploaded by

hariram2728
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 734

Introduction to Flowcharts

Flowcharts: Some commonly used symbols

Process or Flowline or Decision Terminal


Activity Arrow
Flowcharts: Some commonly used symbols

Process or Flowline or Decision Terminal


Activity Arrow

Set of operations that


change the value of
data (variables)
Flowcharts: Some commonly used symbols

Process or Flowline or Decision Terminal


Activity Arrow

Shows the order


of execution of
the program steps
Flowcharts: Some commonly used symbols

Process or Flowline or Decision Terminal


Activity Arrow

Determines which
path the program
will take
Flowcharts: Some commonly used symbols

Process or Flowline or Decision Terminal


Activity Arrow

Indicates the
“Start” or “End”
of the program
Flowchart for counting cards
Flowchart for counting cards
Start When we start, the cards are all assumed
to be in a single pile - called Pile 1
Flowchart for counting cards
Start

Count = 0 We initialise the count variable to 0


Flowchart for counting cards
Start

Count = 0

This is where the iterator starts.


We need to repeat the following steps:
• Pick a card from Pile 1
• Move it into a different pile (say Pile 2)
• Increment the value of count

The iteration stops when Pile 1 is empty


Flowchart for counting cards
Start

Count = 0
We need to pick a card from Pile 1
More cards
But we can do that only if there
in Pile 1?
are more cards in Pile 1 to pick !
Flowchart for counting cards
Start

Count = 0

More cards No (False)


in Pile 1?
Yes (True) Two outcomes are possible here:
Either there are no more cards
(condition = False) or there
are more cards (condition = True)
Flowchart for counting cards
Start

Count = 0

More cards No (False)


End
in Pile 1?
Yes (True) If there are no more cards
we can end the program.
The variable count carries the
required value.
Flowchart for counting cards
Start

Count = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1 If there are more cards in Pile 1
we pick a card from the pile.
Lets call this card X
Flowchart for counting cards
Start

Count = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1 To make sure that we don't
revisit card X again, we move it
Move X to Pile 2 to Pile 2
Flowchart for counting cards
Start

Count = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
What should we do after we
Increment count increment the value of count ?
Flowchart for counting cards
Start

Count = 0

More cards No (False)


End
in Pile 1?
We go back
Yes (True)
to the
beginning Pick a card X from Pile 1
of the
iteration ! Move X to Pile 2

Increment count
Summary: Flowchart for counting cards
Start
Initialisation: Put all cards in Pile 1
Count = 0 } and set count to 0

More cards No (False)


End
in Pile 1?
Yes (True)

Iteration Pick a card X from Pile 1 Iterative steps:


Move X to Pile 2

Increment count
} • Pick a card
• Move card to Pile 2
• Increment count
Flowchart for Sum of Maths
Marks
Flowchart for counting cards
Start

Count = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2

Increment count
How do we modify this to do Sum of Maths marks?
Start

Count = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2

Increment count
How do we modify this to do Sum of Maths marks?
Start
Initialise Sum to 0
Count = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2

Increment count
How do we modify this to do Sum of Maths marks?
Start

Sum = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2 Add Maths marks


of Card X to Sum
Increment count
How do we modify this to do sum of Maths marks?
Start

Sum = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Rest of the
Pick a card X from Pile 1
flowchart
Move X to Pile 2 remains
Add CardX's Maths score to Sum the same !
Summary: Flowchart for sum of Maths marks
Start
Initialisation: Put all cards in Pile 1
Sum = 0 } and set sum to 0

More cards No (False)


End
in Pile 1?
Yes (True)
Iteration
Pick a card X from Pile 1 Iterative steps:
Move X to Pile 2
} • Pick a card
• Move card to Pile 2
• Accumulate in Sum
Add CardX's Maths score to Sum
Summary: Generic flowchart for iteration
Start

Initialise

Unvisited No (False)
End
elements?
Yes (True)
Pick an unvisited element

Mark element as visited

Update variables
Flowchart for Sum with
Filtering
How do we modify this to do sum of Boys Maths marks?
Start

Sum = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2

Add CardX's Maths score to Sum


How do we modify this to do sum of Boys Maths marks?
Start

Sum = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1
We have to do something here
Move X to Pile 2 before we add to Sum

Add CardX's Maths score to Sum


How do we modify this to do sum of Boys Maths marks?
Start

Sum = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2 We check if X is a boy

X is a boy?
Yes (True)
Add CardX's Maths score to Sum
How do we modify this to do sum of Boys Maths marks?
Start

Sum = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
Nothing to be done if X is a girl
X is a boy?
Yes (True)
Add CardX's Maths score to Sum
How do we modify this to do sum of Boys Maths marks?
Start

Sum = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
X is a boy?
Yes (True)
Add CardX's Maths score to Sum
Sum of both Boys and Girls Maths marks
Start
GirlSum = 0
BoySum = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False) Add CardX's Maths
X is a boy?
Yes (True) score to GirlSum
Add CardX's Maths score to BoySum
Sum of both Boys and Girls Maths marks
Start
GirlSum = 0
BoySum = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Iteration:
Both Pick a card X from Pile 1
paths Move X to Pile 2
go back No (False)
to same Add CardX's Maths
X is a boy?
place Yes (True) score to GirlSum
Add CardX's Maths score to BoySum
Summary: Sum with filtering
Start
GirlSum = 0
BoySum = 0

More cards No (False)


End
in Pile 1?
Yes (True)
We add the filter condition
Pick a card X from Pile 1
inside the iteration
Move X to Pile 2
No (False) Add CardX's Maths
X is a boy?
Yes (True) score to GirlSum
Add CardX's Maths score to BoySum
Introduction to Datatypes
Sanity of data: what we observed
• We organised our data set into cards, each storing one data item
• Each card had a number of elements, e.g.:
• numbers (e.g. marks)
• sequence of characters (e.g. name, bill item, word etc)
• We observed that there were restrictions on the values each element
can take:
• for example marks has to lie between 0 and 100
• name cannot have funny characters
• Constraints on the kinds of operations that can be performed:
• addition of marks is possible
• but multiplication of marks does not make sense !
• compare one name with another to generate a boolean type (True or False)
• but cannot add a name with another !
This leads us to the concept of a Data Type ...
• By associating a Data Type (or simply Type) with a data element,
we can tell the computer (or another person) how we intend to use a
data element:
• What are the values (or range of values) that the element can take ?
• What are the operations that can be performed on the data element ?

• When we specify that a variable is of a specific type, we are


describing the constraints placed on that variable in terms of the
values it can store, and the operations that are permitted on it
Basic Data Types
Basic Data Types

Boolean
Basic Data Types

Boolean

Has only two values:


True, False
Basic Data Types

Boolean

Has only two values:


True, False
Operation Result type
AND, OR Boolean
Basic Data Types

Boolean Integer

Has only two values:


True, False
Operation Result type
AND, OR Boolean
Basic Data Types

Boolean Integer

Has only two values: Range of values is:


True, False ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
AND, OR Boolean
Basic Data Types

Boolean Integer

Has only two values: Range of values is:


True, False ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type Operation Result type
AND, OR Boolean +, - , ×, ÷ Integer
Basic Data Types

Boolean Integer

Has only two values: Range of values is:


True, False ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type Operation Result type
AND, OR Boolean +, - , ×, ÷ Integer

There are constraints on division (÷)


For result to be integer, first number has to be divisible by
second (e.g. 21 ÷ 7 = 3)
Or we change the definition to take only the quotient and
drop the remainder (e.g. 22 ÷ 7 = 3)
Basic Data Types

Boolean Integer

Has only two values: Range of values is:


True, False ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type Operation Result type
AND, OR Boolean +, - , ×, ÷ Integer
<, >, = Boolean
Character Data Type
Values ?
Character
Character Data Type
Values - alphanumeric:
Character A B ... Z a b ... z 0 1 ... 9
Special characters:
. , ; : * / & % $ # @ ! ...
Character Data Type
Values - alphanumeric:
Character A B ... Z a b ... z 0 1 ... 9
Special characters:
. , ; : * / & % $ # @ ! ...
Operation Result type
?
Character Data Type
Values - alphanumeric:
Character A B ... Z a b ... z 0 1 ... 9
Special characters:
. , ; : * / & % $ # @ ! ...
Operation Result type
= Boolean
Subtypes
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
SeqNo
Range of values is: ?
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
SeqNo
Range of values is:
0,1,2,....,Max

Max can be some reasonable number, e.g. 10000,


which is the largest data set size that we can handle
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
SeqNo
Range of values is:
0,1,2,....,Max

Max can be some reasonable number, e.g. 10000,


which is the largest data set size that we can handle
None of the integer operations make sense for the SeqNo data type
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Marks
Range of values is: ?
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Marks
Range of values is:
0, 1, 2, 3, ..., 100
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Marks
Range of values is:
0, 1, 2, 3, ..., 100
Operation Result type
??
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Marks
Range of values is:
0, 1, 2, 3, ..., 100
Operation Result type
+, - Marks

×, ÷ do not make sense for marks


Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Marks
Range of values is:
0, 1, 2, 3, ..., 100
Operation Result type
+, - Marks
<, >, = Boolean
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Count
Range of values is:
?
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Count
Range of values is:
0, 1, 2, 3, ...
Operation Result type
??
Subtypes of Integer
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Count
Range of values is:
0, 1, 2, 3, ...
Operation Result type
+, - Count
<, >, = Boolean
×, ÷ do not make sense for counts
Character Data Type and its subtype
Values - alphanumeric:
Character A B ... Z a b ... z 0 1 ... 9
Special characters:
. , ; : * / & % $ # @ ! ...
Operation Result type
= Boolean

Gender
Values: ?
Character Data Type and its subtype
Values - alphanumeric:
Character A B ... Z a b ... z 0 1 ... 9
Special characters:
. , ; : * / & % $ # @ ! ...
Operation Result type
= Boolean

Gender
Values: M or F
Character Data Type and its subtype
Values - alphanumeric:
Character A B ... Z a b ... z 0 1 ... 9
Special characters:
. , ; : * / & % $ # @ ! ...
Operation Result type
= Boolean

Gender
Values: M or F
Operation Result type
?
Character Data Type and its subtype
Values - alphanumeric:
Character A B ... Z a b ... z 0 1 ... 9
Special characters:
. , ; : * / & % $ # @ ! ...
Operation Result type
= Boolean

Gender
Values: M or F
Operation Result type
= Boolean
String Data Type and its subtypes
Values - any sequence of
String characters
String Data Type and its subtypes
Values - any sequence of
String characters
Operation Result type
char in string? Boolean
= Boolean
....
String Data Type and its subtypes
Values - any sequence of
String characters
Operation Result type
char in string? Boolean
= Boolean
....

Names
Values: Strings with only
alphabet characters
Operation Result type
= Boolean

Note - Change from video: String made more restrictive and operation added
String Data Type and its subtypes
Values - any sequence of
String characters
Operation Result type
char in string? Boolean
= Boolean
....

City
Values: Strings with only
alphabet characters
Operation Result type
= Boolean

Note - Change from video: String made more restrictive and operation added
String Data Type and its subtypes
Values - any sequence of
String characters
Operation Result type
char in string? Boolean
= Boolean
....

Words
Values: Strings with
alphanumeric and . , ; : ...
Operation Result type
= Boolean

Note - Change from video: operation added


String Data Type and its subtypes
Values - any sequence of
String characters
Operation Result type
char in string? Boolean
= Boolean
....

Category Values: Can take only one of the values:


“Noun”, “Verb”, “Pronoun”, “Adjective”, ...
Operation Result type
= Boolean

Note - Change from video: operation added


Subtypes: transforming values
Date: Subtype of Integer ?
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Dates
Date: Subtype of Integer ?
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Dates
Range of values is:
0, 1, 2, 3, ..., 365

Date value is 0 for 1 Jan, 1 for 2 Jan, ..., 30 for 31 Jan, 31 for 1 Feb, ...
Date: Subtype of Integer ?
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Dates
Range of values is:
0, 1, 2, 3, ..., 365
Operation Result type
print String

print(0) = “1 Jan”, print(31) = “1 Feb”, ...


Date: Subtype of Integer ?
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Dates
Range of values is:
0, 1, 2, 3, ..., 365
Operation Result type
print String
<, >, = Boolean
Subtypes of Integer: fractional marks
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Marks
Range of values is:
0, 1, 2, 3, ..., 100
Operation Result type
+, - Marks
<, >, = Boolean

What about fractional marks, e.g. 62.5 ?


Dealing with fractional values
• Can use another basic type for real numbers - called Float
• But our values are going to typically be only up to 2 decimal places (e.g.
75.25). So, we have to write constraints for the float values.
• What if we just multiply the fractional number by 100?
• Then the fractional value with at most 2 decimal places will become an
integer !
• We can do corresponding operations on the integer values (remembering that
they have been scaled by 100)
• And when we finally print the output, we scale the number down and print it
Subtypes of Integer: Fractional marks
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Marks Range of values is:
0, 1, 2, 3, ..., 10000
Operation Result type
Store 62.5 as 6250 print String
and let print(6250) = “62.5” +, - Marks
<, >, = Boolean

Note - Change from video: Range corrected to 10000


Subtypes of Integer: shopping bill price/total
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Amount Range of values is:
0, 1, 2, 3, ...
Operation Result type
print String
+, - Amount
<, >, = Boolean

Store 27.50 as 2750 and let print(2750) = “Rs. 27.50”


Subtypes of Integer: shopping bill quantity
Range of values is:
Integer ... , -3, -2, -1, 0, 1, 2, 3, ...
Operation Result type
+, - , ×, ÷ Integer
<, >, = Boolean
Quantity Range of values is:
0, 1, 2, 3, ...
Operation Result type
print String
+, - Quantity
<, >, = Boolean

Store 1.25 as 125 and let print(125) = “1.25”


Records and Lists
Record (also called struct or tuple)
Data type with multiple fields - each of which has a name and a value

value:
MarksCard
Record (also called struct or tuple)
Data type with multiple fields - each of which has a name and a value
Name of field Type of field
sequence no: SeqNo
name: Names
gender: Gender
value: date of birth: Dates
MarksCard city: City
mathsMarks: Marks
Sanity of field values is physicsMarks: Marks
ensured by the data chemistryMarks: Marks
type specifications totalMarks: TMarks

Note - Change from video: TMarks for totalMarks is the same as Marks, except range is upto 300
Record (also called struct or tuple)
Data type with multiple fields - each of which has a name and a value

value:
WordInPara
Record (also called struct or tuple)
Data type with multiple fields - each of which has a name and a value

Name of field Type of field


sequence no: SeqNo
value: word: Words
WordInPara category: Category
letterCount: Count
List

• A sequence of data elements (for example a sequence of records)


• MarksCardList - is the data type for our data set of all marks cards
• Each element in the sequence is of MarksCard Record data type
• ParagraphWordList - is the data type for our word data set
• Each element in the sequence is of WordInPara Record data type
• ShoppingBillList - data type for the shopping bill data set
• We need to define the Record data type for a shopping bill
Record (also called struct or tuple)
Data type with multiple fields - each of which has a name and a value

value:
ShoppingBill
Record data type for shopping bill

Name of field Type of field


sequence no: SeqNo
value: storeName: Name
ShoppingBill customerName: Name
items: ??
totalBillValue: Amount
Record data type for shopping bill
Item

There is a list of items


in the shopping bill !

Name of field Type of field


sequence no: SeqNo
value: storeName: Name
ShoppingBill customerName: Name
items: ??
totalBillValue: Amount
Record data type for shopping bill
Name of field Type of field
itemName: Name
value: itemCategory: String
Item quantity: Quantity
unitPrice: Amount
cost: Amount

Name of field Type of field


sequence no: SeqNo
value: storeName: Name
ShoppingBill customerName: Name
items: ItemList
totalBillValue: Amount
itemList is a List of Item data type
Summary
• A data type defines the values that the variable can take, and the set
of operations that are permitted on it
• Basic data types - Integer, Boolean and Character are needed for our
data sets
• Subtypes of a type can be used to further restrict the values and/or
operations allowed
• Record type is a collections of named fields, each with the same or
different data types
• List type is a sequence of items, all of which are usually of the same
data type
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 1
Monday 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 1
Monday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 1
Monday 1
morning 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 1
Monday 1
morning 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 1
Monday 1
morning 1
Swaminathan 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 1
Monday 1
morning 1
Swaminathan 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 1
Monday 1
morning 1
Swaminathan 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1
was 2
Monday 2
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 0
was 2
Monday 2
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2
Monday 2
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 0
Monday 2
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 0
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 0
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 1
Swaminathan 1 calendar 0
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 1
Swaminathan 1 calendar 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 1
Swaminathan 1 calendar 1
reluctant 1 After 0
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 1
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 0
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 0
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 0
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 0
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 0
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 0
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 0
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 2 in 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 2 in 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 0
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 0
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 0
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 0
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 0
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 0
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 2 thought 0
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 2 thought 1
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 2 thought 1
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 0
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 0
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 0
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 0


was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 5 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 0
Monday 3 in 1 mood 1
morning 1 the 5 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1
morning 1 the 5 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 0
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 2 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 0
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 0
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 0
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 1 of 3 thought 1 with 0
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 1 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 3 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 0
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 1
He 2 and 3 that 1 long 0
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 1
He 2 and 3 that 1 long 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 1
He 2 and 3 that 1 long 1
considered 1 Sunday 1 dismal 1 cane 0
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 1
He 2 and 3 that 1 long 1
considered 1 Sunday 1 dismal 1 cane 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 0

It 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
was 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
was 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
was 1
Monday 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
was 1
Monday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
was 1
Monday 1
morning 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
was 1
Monday 1
morning 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
was 1
Monday 1
morning 1
Swaminathan 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
was 1
Monday 1
morning 1
Swaminathan 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
was 1
Monday 1
morning 1
Swaminathan 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 1

It 1
was 2
Monday 1
morning 1
Swaminathan 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1
was 2
Monday 2
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 0
was 2
Monday 2
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2
Monday 2
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 0
Monday 2
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 0
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 0
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 1
Swaminathan 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 1
Swaminathan 1 calendar 0
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 1
Swaminathan 1 calendar 1
reluctant 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 1
Swaminathan 1 calendar 1
reluctant 1 After 0
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 1
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 0
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 0
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 0
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 0
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 0
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 1 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 2 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 2 specially 1
was 2 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 2

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 1 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 0
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 0
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 2 in 1
morning 1 the 2
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 2 in 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 2 in 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 0
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 1
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 0
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 0
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 1 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 0
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 0
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 3 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 3

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 0
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 2
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 2 thought 0
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 2 thought 1
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 2 thought 1
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 0
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 0
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 0
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 0
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1
was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1 building 0


was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 4 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 4

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 5 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1
Monday 3 in 1 mood 1
morning 1 the 5 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 0
Monday 3 in 1 mood 1
morning 1 the 5 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1
morning 1 the 5 work 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 0
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1
reluctant 1 After 1 shuddered 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 2 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 0
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 2 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 5 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 5

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 0
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 0
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 1 of 3 thought 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane....

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 1 of 3 thought 1 with 0
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 1 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 3 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 0
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 1
He 2 and 3 that 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 1
He 2 and 3 that 1 long 0
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 1
He 2 and 3 that 1 long 1
considered 1 Sunday 1 dismal 1
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 1
He 2 and 3 that 1 long 1
considered 1 Sunday 1 dismal 1 cane 0
difficult 1 yellow 1
It was Monday morning. Swaminathan was reluctant to open his eyes. He
considered Monday specially unpleasant in the calendar. After the delicious
freedom of Saturday and Sunday, it was difficult to get into the Monday mood
of work and discipline. He shuddered at the very thought of school: that dismal
yellow building; the fire-eyed Vedanayagam, his class-teacher; and the Head
Master with his thin long cane.... Max-frequency 6

It 2 specially 1 get 1 building 1


was 3 unpleasant 1 into 1 fire-eyed 1
Monday 3 in 1 mood 1 Veda-
morning 1 the 6 work 1 nayagam 1
Swaminathan 1 calendar 1 discipline 1 class-
reluctant 1 After 1 shuddered 1 teacher 1
to 2 delicious 1 at 1 Head 1
open 1 freedom 1 very 1 Master 1
his 2 of 3 thought 1 with 1
eyes 1 Saturday 1 school 1 thin 1
He 2 and 3 that 1 long 1
considered 1 Sunday 1 dismal 1 cane 1
difficult 1 yellow 1
Flowchart for Max of Maths
Marks
Iteration with filtering
Start

Initialise

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
Check for ? Do something for No
Yes (True)
Do something for Yes
Iteration with filtering: modify for max
Start Initialise max to 0

Initialise

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
Check for ? Do something for No
Yes (True)
Do something for Yes
Iteration with filtering: modify for max
Start

max = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Maths marks of Card X > max? if
Pick a card X from Pile 1
so, update max, else do nothing
Move X to Pile 2
No (False)
Check for ? Do something for No
Yes (True)
Do something for Yes
Iteration with filtering: modify for max
Start

max = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
?
Yes (True)
Do something for Yes
Iteration with filtering: modify for max
Start

max = 0

More cards No (False)


End
in Pile 1?
Yes (True)
CardX.Maths is Maths
Pick a card X from Pile 1
marks of Card X
Move X to Pile 2
No (False)
CardX.Maths > max?
Yes (True)
Do something for Yes
Iteration with filtering: modify for max
Start

max = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
CardX.Maths > max?
Yes (True)
max = CardX.Maths
Iteration with filtering: modify for max
max variable value is
Start
the max Maths marks
max = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
CardX.Maths > max?
Yes (True)
max = CardX.Maths
Flowchart for Max of Maths
Marks; keep track of the card
which has the max marks
Max of Maths marks: keep track of card
Start

max = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
CardX.Maths > max?
Yes (True)
max = CardX.Maths
Max of Maths marks: keep track of card
Start Initialise maxCardId to -1

max = 0

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
CardX.Maths > max?
Yes (True)
max = CardX.Maths
Max of Maths marks: keep track of card
Start

max = 0, maxCardId = -1

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
CardX.Maths > max?
Yes (True)
max = CardX.Maths
Max of Maths marks: keep track of card
Start

max = 0, maxCardId = -1

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1 Update maxCardId
Move X to Pile 2
No (False)
CardX.Maths > max?
Yes (True)
max = CardX.Maths
Max of Maths marks: keep track of card
Start

max = 0, maxCardId = -1

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1 CardX.Id is the index
number on card
Move X to Pile 2
No (False)
CardX.Maths > max?
Yes (True)
max = CardX.Maths, maxCardId = CardX.id
Max of Maths marks: keep track of card
Start max contains the max Maths
value and maxCardId the card
max = 0, maxCardId = -1 index no

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
CardX.Maths > max?
Yes (True)
max = CardX.Maths, maxCardId = CardX.id
Max of Maths marks: keep track of card - PROBLEM !
Start

max = 0, maxCardId = -1

More cards No (False)


End
in Pile 1?
Yes (True)
What if there are more than
Pick a card X from Pile 1
one cards with the same max?
Move X to Pile 2 Only the first one is retained
No (False)
CardX.Maths > max?
Yes (True)
max = CardX.Maths, maxCardId = CardX.id
Max of Maths marks: keep track of card - SOLUTION !
Start

max = 0, maxCardId = -1

More cards No (False)


End
in Pile 1?
Yes (True)
Pick a card X from Pile 1
Keep a list of ids in maxCardId
Move X to Pile 2
No (False)
CardX.Maths > max?
Yes (True)
max = CardX.Maths, maxCardId = CardX.id
Max of Maths marks: keep track of list of cards
Start
max = 0, maxCardId = -1
More cards
No (False) End
in Pile 1?
Yes (True)
Pick a card X from Pile 1 If CardX is also the max marks

Move X to Pile 2
No (False)
CardX.Maths > max?
CardX.Maths = max?
Yes (True)
Yes (True)
max = CardX.Maths, maxCardId = CardX.id ?
Max of Maths marks: keep track of list of cards
Start
max = 0, maxCardId = -1
More cards
No (False) End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
CardX.Maths > max? No (False)
CardX.Maths = max?
Yes (True)
Yes (True)
max = CardX.Maths, maxCardId = CardX.id ?
Max of Maths marks: keep track of list of cards
Start
max = 0, maxCardId = -1
More cards
No (False) End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
CardX.Maths > max? No (False)
CardX.Maths = max?
Yes (True)
Yes (True)
Append CardX.id to
max = CardX.Maths, maxCardId = CardX.id
maxCardId
Max of Maths marks: keep track of list of cards
Start
max = 0, maxCardId = -1
More cards
No (False) End
in Pile 1?
Yes (True)
Pick a card X from Pile 1 Append of a and b is a, b

Move X to Pile 2
No (False)
CardX.Maths > max? No (False)
CardX.Maths = max?
Yes (True)
Yes (True)
Append CardX.id to
max = CardX.Maths, maxCardId = CardX.id
maxCardId
Max of Maths marks: keep track of list of cards
Start maxCardId contains list of all the
max = 0, maxCardId = -1 card indices with max Maths.
max contains max Maths value
More cards
No (False) End
in Pile 1?
Yes (True)
Pick a card X from Pile 1

Move X to Pile 2
No (False)
CardX.Maths > max? No (False)
CardX.Maths = max?
Yes (True)
Yes (True)
Append CardX.id to
max = CardX.Maths, maxCardId = CardX.id
maxCardId
Pseudocode: From pictures to text
Flowcharts
Start
Pictorial representation of
computational process Count = 0
Counting the number of cards

More cards
End
in Pile 1?

Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 2/7


Flowcharts
Start
Pictorial representation of
computational process Count = 0
Counting the number of cards

Node types More cards


End
in Pile 1?

Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 2/7


Flowcharts
Start
Pictorial representation of
computational process Count = 0
Counting the number of cards

Node types More cards


End
Process in Pile 1?

Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 2/7


Flowcharts
Start
Pictorial representation of
computational process Count = 0
Counting the number of cards

Node types More cards


End
Process in Pile 1?

Decision
Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 2/7


Flowcharts
Start
Pictorial representation of
computational process Count = 0
Counting the number of cards

Node types More cards


End
Process in Pile 1?

Decision
Yes (True)
Terminal
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 2/7


Flowcharts
Start
Pictorial representation of
computational process Count = 0
Counting the number of cards

Node types More cards


End
Process in Pile 1?

Decision
Yes (True)
Terminal
Pick a card
Arrows indicate operation flow X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 2/7


Flowcharts
Start
Pictorial representation of
computational process Count = 0
Counting the number of cards

Node types More cards


End
Process in Pile 1?

Decision
Yes (True)
Terminal
Pick a card
Arrows indicate operation flow X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 2/7


Pros and cons of flowcharts
Start
Advantages
Visual representation of computation Count = 0

Easy to understand
More cards
End
in Pile 1?

Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 3/7


Pros and cons of flowcharts
Start
Advantages
Visual representation of computation Count = 0

Easy to understand
More cards
End
Disadvantages in Pile 1?

Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 3/7


Pros and cons of flowcharts
Start
Advantages
Visual representation of computation Count = 0

Easy to understand
More cards
End
Disadvantages in Pile 1?

Size: Complex processes generate


large flowcharts Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 3/7


Pros and cons of flowcharts
Start
Advantages
Visual representation of computation Count = 0

Easy to understand
More cards
End
Disadvantages in Pile 1?

Size: Complex processes generate


large flowcharts Yes (True)
Pick a card
Collaboration: Sharing pictures in X from Pile 1
editable format
Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 3/7


Pros and cons of flowcharts
Start
Advantages
Visual representation of computation Count = 0

Easy to understand
More cards
End
Disadvantages in Pile 1?

Size: Complex processes generate


large flowcharts Yes (True)
Pick a card
Collaboration: Sharing pictures in X from Pile 1
editable format
Move X to Pile 2
Versions: Compare changes between
flowcharts
Increment Count

Pseudocode: From pictures to text 3/7


From pictures to text
Start
Describe the process in words
Step 0 Start Count = 0
Step 1 Initialize Count to 0
Step 2 Check cards in Pile 1
More cards
End
Step 3 If no more cards, go Step 8 in Pile 1?
Step 4 Pick a card X from Pile 1
Step 5 Move X to Pile 2 Yes (True)

Step 6 Increment Count Pick a card


X from Pile 1
Step 7 Go back to Step 2
Step 8 End Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 4/7


Programming language
Succinct notation for computational Start
processes
Count = 0

More cards
End
in Pile 1?

Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 5/7


Programming language
Succinct notation for computational Start
processes
Count = 0
Better textual representation for
Conditional execution
More cards
Step 3 If no more cards, go to End
in Pile 1?
Step 8
Step 4 Pick a card X from Pile 1 Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 5/7


Programming language
Succinct notation for computational Start
processes
Count = 0
Better textual representation for
Conditional execution
More cards
Step 3 If no more cards, go to End
in Pile 1?
Step 8
Step 4 Pick a card X from Pile 1 Yes (True)
Pick a card
Repeated execution
X from Pile 1
Step 2 Check cards in Pile 1
.. Move X to Pile 2
.
Step 7 Go back to Step 2
Increment Count

Pseudocode: From pictures to text 5/7


Pseudocode
Start Start
Count = 0
Count = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
in Pile 1?
Increment Count
} Yes (True)
End Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 6/7


Pseudocode
Start Start
Count = 0
Count = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
in Pile 1?
Increment Count
} Yes (True)
End Pick a card
X from Pile 1
1 Assign a value to a variable
Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 6/7


Pseudocode
Start Start
Count = 0
Count = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
More cards
Move X to Pile 2 End
in Pile 1?
Increment Count
} Yes (True)

End Pick a card


X from Pile 1
1 Assign a value to a variable
2 Repeat steps while condition holds Move X to Pile 2

Increment Count

Pseudocode: From pictures to text 6/7


Pseudocode
Start Start
Count = 0
Count = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
More cards
Move X to Pile 2 End
in Pile 1?
Increment Count
} Yes (True)

End Pick a card


X from Pile 1
1 Assign a value to a variable
2 Repeat steps while condition holds Move X to Pile 2
3 Mark start and end of repeated block
Increment Count

Pseudocode: From pictures to text 6/7


Summary

Flowcharts are easy to read, visual descriptions of procedures

Pseudocode: From pictures to text 7/7


Summary

Flowcharts are easy to read, visual descriptions of procedures


. . . but they are cumbersome, hard to share and edit

Pseudocode: From pictures to text 7/7


Summary

Flowcharts are easy to read, visual descriptions of procedures


. . . but they are cumbersome, hard to share and edit
Writing down steps in text is an alternative

Pseudocode: From pictures to text 7/7


Summary

Flowcharts are easy to read, visual descriptions of procedures


. . . but they are cumbersome, hard to share and edit
Writing down steps in text is an alternative
Tune the notation to capture standard features

Pseudocode: From pictures to text 7/7


Summary

Flowcharts are easy to read, visual descriptions of procedures


. . . but they are cumbersome, hard to share and edit
Writing down steps in text is an alternative
Tune the notation to capture standard features
Assigning values to variables

Pseudocode: From pictures to text 7/7


Summary

Flowcharts are easy to read, visual descriptions of procedures


. . . but they are cumbersome, hard to share and edit
Writing down steps in text is an alternative
Tune the notation to capture standard features
Assigning values to variables
Conditional execution

Pseudocode: From pictures to text 7/7


Summary

Flowcharts are easy to read, visual descriptions of procedures


. . . but they are cumbersome, hard to share and edit
Writing down steps in text is an alternative
Tune the notation to capture standard features
Assigning values to variables
Conditional execution
Repeated execution

Pseudocode: From pictures to text 7/7


Pseudocode: Iteration and Filtering
Counting cards
Start Start
Count = 0
Count = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
in Pile 1?
Increment Count
} Yes (True)
End Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: Iteration and Filtering 2/8


Counting cards
Start Start

Count = 0
Count = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
More cards
Move X to Pile 2 End
in Pile 1?
Increment Count
} Yes (True)

End Pick a card


X from Pile 1
Will dispense with Start and End,
henceforth Move X to Pile 2

Increment Count

Pseudocode: Iteration and Filtering 2/8


Sum of Maths marks
Count = 0 Start

while (Pile 1 has more cards) {


Count = 0
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
Increment Count in Pile 1?

} Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: Iteration and Filtering 3/8


Sum of Maths marks
Sum = 0 Start

while (Pile 1 has more cards) { Sum = 0


Pick a card X from Pile 1
Move X to Pile 2 More cards
End
Increment Count in Pile 1?

} Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Increment Count

Pseudocode: Iteration and Filtering 3/8


Sum of Maths marks
Sum = 0 Start

while (Pile 1 has more cards) {


Sum = 0
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
Add X’s Maths marks to Sum in Pile 1?

} Yes (True)
Pick a card
X from Pile 1

Move X to Pile 2

Add X’s Maths


marks to Sum

Pseudocode: Iteration and Filtering 3/8


Sum of Maths marks
Sum = 0 Start

while (Pile 1 has more cards) {


Sum = 0
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
Sum = Sum + X.Maths in Pile 1?

} Yes (True)

Update Sum : assignment statement Pick a card


X from Pile 1
Sum on right is current value
Sum on left is updated value Move X to Pile 2
= is not mathematical equality!
Sum =
Sum + X.Maths

Pseudocode: Iteration and Filtering 3/8


Sum of Maths marks
Sum = 0 Start

while (Pile 1 has more cards) {


Sum = 0
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
Sum = Sum + X.Maths in Pile 1?

} Yes (True)

Update Sum : assignment statement Pick a card


X from Pile 1
Sum on right is current value
Sum on left is updated value Move X to Pile 2
= is not mathematical equality!
Sum =
Increment: Count = Count + 1 Sum + X.Maths

Pseudocode: Iteration and Filtering 3/8


Sum of Maths marks
Sum = 0 Start

while (Pile 1 has more cards) {


Sum = 0
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
Sum = Sum + X.Maths in Pile 1?

} Yes (True)

Update Sum : assignment statement Pick a card


X from Pile 1
Sum on right is current value
Sum on left is updated value Move X to Pile 2
= is not mathematical equality!
Sum =
Increment: Count = Count + 1 Sum + X.Maths
X.Maths : Maths marks in card X
Pseudocode: Iteration and Filtering 3/8
Sum of Maths marks
Sum = 0 Start

while (Pile 1 has more cards) {


Sum = 0
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
Sum = Sum + X.Maths in Pile 1?

} Yes (True)

Update Sum : assignment statement Pick a card


X from Pile 1
Sum on right is current value
Sum on left is updated value Move X to Pile 2
= is not mathematical equality!
Sum =
Increment: Count = Count + 1 Sum + X.Maths
X.Maths : Maths marks in card X
Pseudocode: Iteration and Filtering 3/8
Sum of Boys’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

Sum = Sum + X.Maths Yes (True)


} Pick a card
X from Pile 1

Move X to Pile 2

Sum =
Sum + X.Maths

Pseudocode: Iteration and Filtering 4/8


Sum of Boys’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

Sum = Sum + X.Maths Yes (True)


} Pick a card
X from Pile 1

Move X to Pile 2

No
X is a boy?

Yes (True)
Sum =
Sum + X.Maths
Pseudocode: Iteration and Filtering 4/8
Sum of Boys’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X is a boy) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
X is a boy?

Yes (True)
Sum =
Sum + X.Maths
Pseudocode: Iteration and Filtering 4/8
Sum of Boys’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X is a boy) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
Conditional execution, once X is a boy?

Yes (True)
Sum =
Sum + X.Maths
Pseudocode: Iteration and Filtering 4/8
Sum of Boys’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if ( X.Gender == M ) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
Conditional execution, once X.Gender == M?
Equality (==) vs assignment (=)
Yes (True)
Sum =
Sum + X.Maths
Pseudocode: Iteration and Filtering 4/8
Sum of Boys’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Gender == M) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
Conditional execution, once X.Gender == M?

Equality (==) vs assignment (=) Yes (True)


Sum =
Sum + X.Maths

Pseudocode: Iteration and Filtering 4/8


Sum of Boys’ and Girls’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Gender == M) { Yes (True)

Sum = Sum + X.Maths Pick a card


X from Pile 1
}
Move X to Pile 2
}
No
X.Gender == M?

Yes (True)
Sum =
Sum + X.Maths

Pseudocode: Iteration and Filtering 5/8


Sum of Boys’ and Girls’ Maths marks
Start
BoySum = 0
while (Pile 1 has more cards) { BoySum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Gender == M) { Yes (True)

BoySum = BoySum+X.Maths Pick a card


X from Pile 1
}
Move X to Pile 2
}
No
X.Gender == M?

Yes (True)

BoySum =

BoySum+X.Maths

Pseudocode: Iteration and Filtering 5/8


Sum of Boys’ and Girls’ Maths marks
Start
BoySum = 0
GirlSum = 0 BoySum = 0

while (Pile 1 has more cards) {


GirlSum = 0
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
in Pile 1?
if (X.Gender == M) {
Yes (True)
BoySum = BoySum + X.Maths
Pick a card
} X from Pile 1

} Move X to Pile 2

No
X.Gender == M?

Yes (True)
BoySum =
BoySum+X.Maths

Pseudocode: Iteration and Filtering 5/8


Sum of Boys’ and Girls’ Maths marks
Start
BoySum = 0
GirlSum = 0 BoySum = 0

while (Pile 1 has more cards) {


GirlSum = 0
Pick a card X from Pile 1
Move X to Pile 2 More cards
End
in Pile 1?
if (X.Gender == M) {
Yes (True)
BoySum = BoySum + X.Maths
Pick a card
} X from Pile 1

else { Move X to Pile 2

GirlSum = GirlSum + X.Maths


No GirlSum =
} X.Gender == M?
GirlSum+X.Maths
Yes (True)
} BoySum =
BoySum+X.Maths

Pseudocode: Iteration and Filtering 5/8


Sum of Boys’ and Girls’ Maths marks
Start
BoySum = 0
GirlSum = 0 BoySum = 0

while (Pile 1 has more cards) { GirlSum = 0


Pick a card X from Pile 1
Move X to Pile 2 More cards
End
in Pile 1?
if (X.Gender == M) {
Yes (True)
BoySum = BoySum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
else {
GirlSum = GirlSum + X.Maths No GirlSum =
X.Gender == M?
} GirlSum+X.Maths
Yes (True)
} BoySum =
BoySum+X.Maths
Alternative branch for conditional

Pseudocode: Iteration and Filtering 5/8


Sum of Boys’ and Girls’ Maths marks
Start
BoySum = 0
GirlSum = 0 BoySum = 0

while (Pile 1 has more cards) {


More cards
Pick a card X from Pile 1 in Pile 1?
End

Move X to Pile 2 Yes (True)

if (X.Gender == M) { Pick a card


X from Pile 1
BoySum = BoySum + X.Maths
Move X to Pile 2
}
else { X.Gender == M?
No GirlSum =
GirlSum+X.Maths
GirlSum = GirlSum + X.Maths Yes (True)
} BoySum =
BoySum+X.Maths
}

Pseudocode: Iteration and Filtering 5/8


Finding the maximum Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Gender == M) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
X.Gender == M?

Yes (True)
Sum =
Sum + X.Maths

Pseudocode: Iteration and Filtering 6/8


Finding the maximum Maths marks
Start
MaxM = 0
while (Pile 1 has more cards) { MaxM = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Gender == M) {
Yes (True)
Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
X.Gender == M?

Yes (True)
Sum =
Sum + X.Maths
Pseudocode: Iteration and Filtering 6/8
Finding the maximum Maths marks
Start
MaxM = 0
while (Pile 1 has more cards) { MaxM = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Maths > MaxM) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
X.Maths > MaxM?

Yes (True)
Sum =
Sum + X.Maths
Pseudocode: Iteration and Filtering 6/8
Finding the maximum Maths marks
Start
MaxM = 0
while (Pile 1 has more cards) { MaxM = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Maths > MaxM) { Yes (True)


MaxM = X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
X.Maths > MaxM?

Yes (True)
MaxM = X.Maths

Pseudocode: Iteration and Filtering 6/8


Finding the maximum Maths marks
Start
MaxM = 0
while (Pile 1 has more cards) { MaxM = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Maths > MaxM) { Yes (True)


MaxM = X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
X.Maths > MaxM?

Yes (True)
MaxM = X.Maths

Pseudocode: Iteration and Filtering 6/8


Finding the card with maximum Maths marks
Start
MaxM = 0
MaxM = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1 More cards
End
in Pile 1?
Move X to Pile 2
Yes (True)

if (X.Maths > MaxM) { Pick a card


X from Pile 1

MaxM = X.Maths
Move X to Pile 2
}
No
} X.Maths > MaxM?

Yes (True)
MaxM = X.Maths

Pseudocode: Iteration and Filtering 7/8


Finding the card with maximum Maths marks
Start
MaxM = 0
MaxM = 0
MaxCard = −1
while (Pile 1 has more cards) { MaxCard = −1

Pick a card X from Pile 1


More cards
End
Move X to Pile 2 in Pile 1?

Yes (True)
if (X.Maths > MaxM) {
Pick a card
X from Pile 1
MaxM = X.Maths
Move X to Pile 2
}
} No
X.Maths > MaxM?

Yes (True)
MaxM = X.Maths

Pseudocode: Iteration and Filtering 7/8


Finding the card with maximum Maths marks
Start
MaxM = 0
MaxM = 0
MaxCard = −1
MaxCard = −1
while (Pile 1 has more cards) {
Pick a card X from Pile 1 More cards
End
in Pile 1?
Move X to Pile 2
Yes (True)
if (X.Maths > MaxM) { Pick a card
X from Pile 1
MaxM = X.Maths
Move X to Pile 2
MaxCard = X.Id
No
} X.Maths > MaxM?

} Yes (True)
MaxM = X.Maths

MaxCard = X.Id

Pseudocode: Iteration and Filtering 7/8


Finding the card with maximum Maths marks
Start
MaxM = 0
MaxM = 0
MaxCard = −1
MaxCard = −1
while (Pile 1 has more cards) {
Pick a card X from Pile 1 More cards
End
in Pile 1?
Move X to Pile 2
Yes (True)
if (X.Maths > MaxM) { Pick a card
X from Pile 1
MaxM = X.Maths
Move X to Pile 2
MaxCard = X.Id
No
} X.Maths > MaxM?

} Yes (True)
MaxM = X.Maths

MaxCard = X.Id

Pseudocode: Iteration and Filtering 7/8


Summary

Assignment statement

Pseudocode: Iteration and Filtering 8/8


Summary

Assignment statement
Count = 0

Pseudocode: Iteration and Filtering 8/8


Summary

Assignment statement
Count = 0
Sum = Sum + X.Maths

Pseudocode: Iteration and Filtering 8/8


Summary

Assignment statement
Count = 0
Sum = Sum + X.Maths

Conditional execution

Pseudocode: Iteration and Filtering 8/8


Summary

Assignment statement
Count = 0
Sum = Sum + X.Maths

Conditional execution
Once

Pseudocode: Iteration and Filtering 8/8


Summary

Assignment statement
Count = 0
Sum = Sum + X.Maths

Conditional execution
Once
if (condition) { . . . }

Pseudocode: Iteration and Filtering 8/8


Summary

Assignment statement
Count = 0
Sum = Sum + X.Maths

Conditional execution
Once
if (condition) { . . . }
if (condition) { . . . } else { ...}

Pseudocode: Iteration and Filtering 8/8


Summary

Assignment statement
Count = 0
Sum = Sum + X.Maths

Conditional execution
Once
if (condition) { . . . }
if (condition) { . . . } else { ...}
Repeatedly

Pseudocode: Iteration and Filtering 8/8


Summary

Assignment statement
Count = 0
Sum = Sum + X.Maths

Conditional execution
Once
if (condition) { . . . }
if (condition) { . . . } else { ...}
Repeatedly
while (condition) { . . . }

Pseudocode: Iteration and Filtering 8/8


Summary

Assignment statement
Count = 0
Sum = Sum + X.Maths

Conditional execution
Once
if (condition) { . . . }
if (condition) { . . . } else { ...}
Repeatedly
while (condition) { . . . }

Equality (==) vs assignment (=)

Pseudocode: Iteration and Filtering 8/8


Summary

Assignment statement
Count = 0
Sum = Sum + X.Maths

Conditional execution
Once
if (condition) { . . . }
if (condition) { . . . } else { ...}
Repeatedly
while (condition) { . . . }

Equality (==) vs assignment (=)


if (X.Gender == M)

Pseudocode: Iteration and Filtering 8/8


Tables
Extracting data from cards

Each card is a unit of information

p
Tables 2/7
Extracting data from cards

Each card is a unit of information


Different attributes or fields
Card ID, Name, Gender, . . . , Total

p
Tables 2/7
Extracting data from cards

Each card is a unit of information


Different attributes or fields
Card ID, Name, Gender, . . . , Total

Organize as a table

p
Tables 2/7
Extracting data from cards

p
Each card is a unit of information
Different attributes or fields
Card ID, Name, Gender, . . . , Total

Organize as a table

Id Name Gen DoB City Math Phys Chem Total


10 Kavya F 12 Jan Chennai 64 72 68 204

Tables 2/7
Extracting data from cards

p
Each card is a unit of information
Different attributes or fields
Card ID, Name, Gender, . . . , Total

Organize as a table

Id Name Gen DoB City Math Phys Chem Total


10 Kavya F 12 Jan Chennai 64 72 68 204
24 Siddharth M 26 Dec Madurai 44 72 58 174

Tables 2/7
Extracting data from cards

p
Each card is a unit of information
Different attributes or fields
Card ID, Name, Gender, . . . , Total

Organize as a table

Id Name Gen DoB City Math Phys Chem Total


10 Kavya F 12 Jan Chennai 64 72 68 204
24 Siddharth M 26 Dec Madurai 44 72 58 174
17 Arshad M 14 Dec Chennai 62 81 67 210

Tables 2/7
Extracting data from cards

p
Each card is a unit of information
Different attributes or fields
Card ID, Name, Gender, . . . , Total

Organize as a table
All the grade cards in a single table

Id Name Gen DoB City Math Phys Chem Total


10 Kavya F 12 Jan Chennai 64 72 68 204
24 Siddharth M 26 Dec Madurai 44 72 58 174
17 Arshad M 14 Dec Chennai 62 81 67 210

Tables 2/7
Word in the paragraph

Can do the same with words

Tables 3/7
Word in the paragraph

Can do the same with words

Id Word Type Length


24 Saturday Noun 8

Tables 3/7
Word in the paragraph

Can do the same with words

Id Word Type Length


24 Saturday Noun 8
12 considered Verb 10

Tables 3/7
Shopping bills

What are the attributes?


Bill ID, Shop Name, Customer Name

Tables 4/7
Shopping bills

What are the attributes?


Bill ID, Shop Name, Customer Name
Item, Category, Qty, Price, Cost, Total

Tables 4/7
Shopping bills

What are the attributes?


Bill ID, Shop Name, Customer Name
Item, Category, Qty, Price, Cost, Total
Variable number of rows per bill

Tables 4/7
Shopping bills

What are the attributes?


Bill ID, Shop Name, Customer Name
Item, Category, Qty, Price, Cost, Total
Variable number of rows per bill

Variable number of columns?


No longer a neat table!

Tables 4/7
Shopping bills

What are the attributes?


Bill ID, Shop Name, Customer Name
Item, Category, Qty, Price, Cost, Total
Variable number of rows per bill

Variable number of columns?


No longer a neat table!

Variable number of rows per card?


Tag rows for each card

Tables 4/7
Shopping bill as a table
Id Shop Customer Item Category Qty Price Cost Total
5 Big Bazaar Akshaya Trousers Women/Apparel 2 870 1740 4174
5 Big Bazaar Akshaya Shirts Women/Apparel 1 1350 1350 4174
5 Big Bazaar Akshaya Detergent Household 0.5 270 135 4174
5 Big Bazaar Akshaya Tee Shirts Women/Apparel 4 220 880 4174
5 Big Bazaar Akshaya Instant Noodles Canned/Food 3 23 69 4174

Tables 5/7
Shopping bill as a table
Id Shop Customer Item Category Qty Price Cost Total
5 Big Bazaar Akshaya Trousers Women/Apparel 2 870 1740 4174
5 Big Bazaar Akshaya Shirts Women/Apparel 1 1350 1350 4174
5 Big Bazaar Akshaya Detergent Household 0.5 270 135 4174
5 Big Bazaar Akshaya Tee Shirts Women/Apparel 4 220 880 4174
5 Big Bazaar Akshaya Instant Noodles Canned/Food 3 23 69 4174

Id, Shop, Customer and Total are


duplicated in each row of the table

Tables 5/7
Shopping bill as a table
Id Shop Customer Item Category Qty Price Cost Total
5 Big Bazaar Akshaya Trousers Women/Apparel 2 870 1740 4174
5 Big Bazaar Akshaya Shirts Women/Apparel 1 1350 1350 4174
5 Big Bazaar Akshaya Detergent Household 0.5 270 135 4174
5 Big Bazaar Akshaya Tee Shirts Women/Apparel 4 220 880 4174
5 Big Bazaar Akshaya Instant Noodles Canned/Food 3 23 69 4174

Id, Shop, Customer and Total are


duplicated in each row of the table
Problem is aggravated as number of
entries in the bill increase

Tables 5/7
Multiple tables
Id Shop Customer Total Id Item Category Qty Price Cost
5 Big Bazaar Akshaya 4174 5 Trousers Women/Apparel 2 870 1740
5 Shirts Women/Apparel 1 1350 1350
5 Detergent Household 0.5 270 135
5 Tee Shirts Women/Apparel 4 220 880
5 Instant Noodles Canned/Food 3 23 69

Tables 6/7
Multiple tables
Id Shop Customer Total Id Item Category Qty Price Cost
5 Big Bazaar Akshaya 4174 5 Trousers Women/Apparel 2 870 1740
5 Shirts Women/Apparel 1 1350 1350
5 Detergent Household 0.5 270 135
5 Tee Shirts Women/Apparel 4 220 880
5 Instant Noodles Canned/Food 3 23 69

One table has columns that are fixed for


the bill

Tables 6/7
Multiple tables
Id Shop Customer Total Id Item Category Qty Price Cost
5 Big Bazaar Akshaya 4174 5 Trousers Women/Apparel 2 870 1740
5 Shirts Women/Apparel 1 1350 1350
5 Detergent Household 0.5 270 135
5 Tee Shirts Women/Apparel 4 220 880
5 Instant Noodles Canned/Food 3 23 69

One table has columns that are fixed for


the bill
Second table has variable entries as
multiple rows

Tables 6/7
Multiple tables
Id Shop Customer Total Id Item Category Qty Price Cost
5 Big Bazaar Akshaya 4174 5 Trousers Women/Apparel 2 870 1740
5 Shirts Women/Apparel 1 1350 1350
5 Detergent Household 0.5 270 135
5 Tee Shirts Women/Apparel 4 220 880
5 Instant Noodles Canned/Food 3 23 69

One table has columns that are fixed for


the bill
Second table has variable entries as
multiple rows
Bill ID links the tables

Tables 6/7
Multiple tables
Id Shop Customer Total Id Item Category Qty Price Cost
1 SV Stores Srivatsan 567 1 Carrots Vegetables/Food 1.5 50 75
1 Soap Toiletries 4 32 128
1 Tomatoes Vegetables/Food 2 40 80
..
.
1 Milk Dairy/Food 1.5 24 36

One table has columns that are fixed for


the bill
Second table has variable entries as
multiple rows
Bill ID links the tables

Tables 6/7
Summary

Data on cards can be naturally represented using tables

Tables 7/7
Summary

Data on cards can be naturally represented using tables


Each attribute is a column in the table

Tables 7/7
Summary

Data on cards can be naturally represented using tables


Each attribute is a column in the table
Each card is a row in the table

Tables 7/7
Summary

Data on cards can be naturally represented using tables


Each attribute is a column in the table
Each card is a row in the table
Difficulty if the cards has a variable number of attributes

Tables 7/7
Summary

Data on cards can be naturally represented using tables


Each attribute is a column in the table
Each card is a row in the table
Difficulty if the cards has a variable number of attributes
Items in shopping bill

Tables 7/7
Summary

Data on cards can be naturally represented using tables


Each attribute is a column in the table
Each card is a row in the table
Difficulty if the cards has a variable number of attributes
Items in shopping bill
Multiple rows — duplication of data

Tables 7/7
Summary

Data on cards can be naturally represented using tables


Each attribute is a column in the table
Each card is a row in the table
Difficulty if the cards has a variable number of attributes
Items in shopping bill
Multiple rows — duplication of data
Split as separate tables — need to link via unique attribute

Tables 7/7
Pseudocode: Procedures
Sum of Boys’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Gender == M) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
X.Gender == M?

Yes (True)
Sum =
Sum + X.Maths

Pseudocode: Procedures 2/8


Sum of Boys’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Gender == M) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
What if we want to sum Maths X.Gender == M?
marks of girls? Yes (True)
Sum =
Sum + X.Maths

Pseudocode: Procedures 2/8


Sum of Girls’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Gender == F ) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
X.Gender == F ?

Yes (True)
Sum =
Sum + X.Maths
Pseudocode: Procedures 3/8
Sum of Girls’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Gender == F ) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
Only change is the value we X.Gender == F ?
check for X.Gender
Yes (True)
Sum =
Sum + X.Maths
Pseudocode: Procedures 3/8
Sum of Girls’ Maths marks
Start
Sum = 0
while (Pile 1 has more cards) { Sum = 0

Pick a card X from Pile 1


More cards
Move X to Pile 2 in Pile 1?
End

if (X.Gender == F ) { Yes (True)


Sum = Sum + X.Maths Pick a card
X from Pile 1
}
Move X to Pile 2
}
No
Only change is the value we X.Gender == F ?
check for X.Gender
Yes (True)
Remaining pseudocode is
Sum =
identical Sum + X.Maths
Pseudocode: Procedures 3/8
A procedure to sum up Maths marks

Procedure SumMaths(gen)
Sum = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X.Maths
}
}
return(Sum)
end SumMaths

Pseudocode: Procedures 4/8


A procedure to sum up Maths marks

Procedure name: SumMaths Procedure SumMaths(gen)


Sum = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X.Maths
}
}
return(Sum)
end SumMaths
Pseudocode: Procedures 4/8
A procedure to sum up Maths marks

Procedure name: SumMaths Procedure SumMaths( gen )


Sum = 0
Argument receives value: gen
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen ) {
Sum = Sum + X.Maths
}
}
return(Sum)
end SumMaths

Pseudocode: Procedures 4/8


A procedure to sum up Maths marks

Procedure name: SumMaths Procedure SumMaths(gen)


Sum = 0
Argument receives value: gen
while (Pile 1 has more cards) {
Call procedure with a parameter
Pick a card X from Pile 1
SumMaths( F )
Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X.Maths
}
}
return(Sum)
end SumMaths

Pseudocode: Procedures 4/8


A procedure to sum up Maths marks

Procedure name: SumMaths Procedure SumMaths(gen)


Sum = 0
Argument receives value: gen
while (Pile 1 has more cards) {
Call procedure with a parameter
Pick a card X from Pile 1
SumMaths(F)
Move X to Pile 2
Argument variable is assigned if (X.Gender == gen) {
parameter value
Sum = Sum + X.Maths
}
}
return(Sum)
end SumMaths

Pseudocode: Procedures 4/8


A procedure to sum up Maths marks

Procedure name: SumMaths Procedure SumMaths(gen)


Sum = 0
Argument receives value: gen
while (Pile 1 has more cards) {
Call procedure with a parameter
Pick a card X from Pile 1
SumMaths(F)
Move X to Pile 2
Argument variable is assigned if (X.Gender == gen) {
parameter value
Sum = Sum + X.Maths
Procedure call SumMaths(F), }
implicitly starts with
}
gen = F
return(Sum)
end SumMaths

Pseudocode: Procedures 4/8


A procedure to sum up Maths marks

Procedure name: SumMaths Procedure SumMaths(gen)


Sum = 0
Argument receives value: gen
while (Pile 1 has more cards) {
Call procedure with a parameter
Pick a card X from Pile 1
SumMaths(F)
Move X to Pile 2
Argument variable is assigned if (X.Gender == gen) {
parameter value
Sum = Sum + X.Maths
Procedure call SumMaths(F), }
implicitly starts with
}
gen = F
return(Sum)
Procedure returns the value stored in
end SumMaths
Sum
Pseudocode: Procedures 4/8
A procedure to sum up Physics marks

Procedure SumPhysics(gen)
Sum = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X.Physics
}
}
return(Sum)
end SumPhysics

Pseudocode: Procedures 5/8


A procedure to sum up Physics marks

Only change is the field we examine Procedure SumPhysics(gen)


in the card Sum = 0
while (Pile 1 has more cards) {
X.Physics, instead of X.Maths
Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X. Physics
}
}
return(Sum)
end SumPhysics

Pseudocode: Procedures 5/8


A procedure to sum up Physics marks

Only change is the field we examine Procedure SumPhysics(gen)


in the card Sum = 0
while (Pile 1 has more cards) {
X.Physics, instead of X.Maths
Pick a card X from Pile 1
For Chemistry, add up X.Chemistry
Move X to Pile 2
For Total, add up X.Total if (X.Gender == gen) {
Sum = Sum + X.Physics
}
}
return(Sum)
end SumPhysics

Pseudocode: Procedures 5/8


A procedure to sum up Physics marks

Only change is the field we examine Procedure SumPhysics(gen)


in the card Sum = 0
while (Pile 1 has more cards) {
X.Physics, instead of X.Maths
Pick a card X from Pile 1
For Chemistry, add up X.Chemistry
Move X to Pile 2
For Total, add up X.Total if (X.Gender == gen) {
Pass field name as parameter Sum = Sum + X.Physics
}
}
return(Sum)
end SumPhysics

Pseudocode: Procedures 5/8


A procedure to sum up any type of marks

Procedure SumMarks(gen,fld)
Sum = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Procedures 6/8


A procedure to sum up any type of marks

Two parameters, gender ( gen ) and Procedure SumMarks( gen , fld )


field ( fld ) Sum = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen ) {
Sum = Sum + X. fld
}
}
return(Sum)
end SumMarks
Pseudocode: Procedures 6/8
A procedure to sum up any type of marks

Two parameters, gender (gen) and Procedure SumMarks(gen,fld)


field (fld) Sum = 0
gen is assigned a value, M or F, to while (Pile 1 has more cards) {
check against X.gender Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Procedures 6/8


A procedure to sum up any type of marks

Two parameters, gender (gen) and Procedure SumMarks(gen,fld)


field (fld) Sum = 0
gen is assigned a value, M or F, to while (Pile 1 has more cards) {
check against X.gender Pick a card X from Pile 1
fld is assigned a field name, to Move X to Pile 2
extract appropriate card entry X.fld if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Procedures 6/8


A procedure to sum up any type of marks

Two parameters, gender (gen) and Procedure SumMarks(gen,fld)


field (fld) Sum = 0
gen is assigned a value, M or F, to while (Pile 1 has more cards) {
check against X.gender Pick a card X from Pile 1
fld is assigned a field name, to Move X to Pile 2
extract appropriate card entry X.fld if (X.Gender == gen) {
Single procedure SumMarks to Sum = Sum + X.fld
handle different requirements }
}
return(Sum)
end SumMarks

Pseudocode: Procedures 6/8


A procedure to sum up any type of marks

Two parameters, gender (gen) and Procedure SumMarks(gen,fld)


field (fld) Sum = 0
gen is assigned a value, M or F, to while (Pile 1 has more cards) {
check against X.gender Pick a card X from Pile 1
fld is assigned a field name, to Move X to Pile 2
extract appropriate card entry X.fld if (X.Gender == gen) {
Single procedure SumMarks to Sum = Sum + X.fld
handle different requirements }
SumMarks(F,Chemistry)
}
Sum of Girls’ Chemistry marks
SumMarks(M,Physics) return(Sum)
Sum of Boys’ Physics marks end SumMarks
...
Pseudocode: Procedures 6/8
Calling a procedure
Use procedure name like a math GirlChemSum = SumMarks(F,Chemistry)
function, as part of an expression
BoyChemSum = SumMarks(M,Chemistry)
if (GirlChemSum ≥ BoyChemSum) {
“Congratulate the girls”
}
else {
“Congratulate the boys”
}

Pseudocode: Procedures 7/8


Calling a procedure
Use procedure name like a math GirlChemSum = SumMarks(F,Chemistry)
function, as part of an expression BoyChemSum = SumMarks(M,Chemistry)
Assign the return value to a if (GirlChemSum ≥ BoyChemSum) {
variable “Congratulate the girls”
}
else {
“Congratulate the boys”
}

Pseudocode: Procedures 7/8


Calling a procedure
Use procedure name like a math GirlChemSum = SumMarks(F,Chemistry)
function, as part of an expression BoyChemSum = SumMarks(M,Chemistry)
Assign the return value to a if (GirlChemSum ≥ BoyChemSum) {
variable “Congratulate the girls”
}
A procedure may not return a else {
value “Congratulate the boys”
}

Pseudocode: Procedures 7/8


Calling a procedure
Use procedure name like a math GirlChemSum = SumMarks(F,Chemistry)
function, as part of an expression BoyChemSum = SumMarks(M,Chemistry)
Assign the return value to a if (GirlChemSum ≥ BoyChemSum) {
variable “Congratulate the girls”
}
A procedure may not return a else {
value “Congratulate the boys”
Correct marks for one subject on }
a card
Procedure
UpdateMarks(CardId,
Subject, Marks)

Pseudocode: Procedures 7/8


Calling a procedure
Use procedure name like a math GirlChemSum = SumMarks(F,Chemistry)
function, as part of an expression BoyChemSum = SumMarks(M,Chemistry)
Assign the return value to a if (GirlChemSum ≥ BoyChemSum) {
variable “Congratulate the girls”
}
A procedure may not return a else {
value “Congratulate the boys”
Correct marks for one subject on }
a card
Procedure Sum = 0
UpdateMarks(CardId, ...
Subject, Marks)
UpdateMarks(17,Physics,88)
Procedure call is a separate ...
statement GirlChemSum =SumMarks(F,Chemistry)
Pseudocode: Procedures 7/8
Summary
Procedures are pseudocode templates that work in different situations

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters
Parameter can be a value, or a field name

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters
Parameter can be a value, or a field name
SumMarks(M,Total)

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters
Parameter can be a value, or a field name
SumMarks(M,Total)

Calling a procedure

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters
Parameter can be a value, or a field name
SumMarks(M,Total)

Calling a procedure
Procedure call is an expression, assign return value to a variable

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters
Parameter can be a value, or a field name
SumMarks(M,Total)

Calling a procedure
Procedure call is an expression, assign return value to a variable
GirlsChemSum = SumMarks(F,Chemistry)

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters
Parameter can be a value, or a field name
SumMarks(M,Total)

Calling a procedure
Procedure call is an expression, assign return value to a variable
GirlsChemSum = SumMarks(F,Chemistry)
No useful return value, procedure call is a separate statement

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters
Parameter can be a value, or a field name
SumMarks(M,Total)

Calling a procedure
Procedure call is an expression, assign return value to a variable
GirlsChemSum = SumMarks(F,Chemistry)
No useful return value, procedure call is a separate statement
UpdateMarks(17,Physics,88)

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters
Parameter can be a value, or a field name
SumMarks(M,Total)

Calling a procedure
Procedure call is an expression, assign return value to a variable
GirlsChemSum = SumMarks(F,Chemistry)
No useful return value, procedure call is a separate statement
UpdateMarks(17,Physics,88)

Procedures help to modularize pseudocode

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters
Parameter can be a value, or a field name
SumMarks(M,Total)

Calling a procedure
Procedure call is an expression, assign return value to a variable
GirlsChemSum = SumMarks(F,Chemistry)
No useful return value, procedure call is a separate statement
UpdateMarks(17,Physics,88)

Procedures help to modularize pseudocode


Avoid descibing the same process repeatedly

Pseudocode: Procedures 8/8


Summary
Procedures are pseudocode templates that work in different situations
Delegate work by calling a procedure with appropriate parameters
Parameter can be a value, or a field name
SumMarks(M,Total)

Calling a procedure
Procedure call is an expression, assign return value to a variable
GirlsChemSum = SumMarks(F,Chemistry)
No useful return value, procedure call is a separate statement
UpdateMarks(17,Physics,88)

Procedures help to modularize pseudocode


Avoid descibing the same process repeatedly
If we improve the code in a procedure, benefit automatically applies to all procedure calls
Pseudocode: Procedures 8/8
Pseudocode: Using Procedures
Analysis of top students

Is there a single student who is the best performer across subjects?

Pseudocode: Using Procedures 2/5


Analysis of top students

Is there a single student who is the best performer across subjects?


Is the highest overall total the same as the sum of the highest marks in
each subject?

Pseudocode: Using Procedures 2/5


Analysis of top students

Is there a single student who is the best performer across subjects?


Is the highest overall total the same as the sum of the highest marks in
each subject?
Need to compute maximum for different fields in a score card
Maths, Physics, Chemistry, Total

Pseudocode: Using Procedures 2/5


Analysis of top students

Is there a single student who is the best performer across subjects?


Is the highest overall total the same as the sum of the highest marks in
each subject?
Need to compute maximum for different fields in a score card
Maths, Physics, Chemistry, Total

Ideally suited to using procedures


Same computation with a parameter to indicate the field of interest

Pseudocode: Using Procedures 2/5


Finding the maximum in a given field

As usual, keep track of the maximum Procedure Maxmarks(fld)


using a variable Maxval = 0
Initialize to 0 while (Pile 1 has more cards) {
Update whenever you see a bigger Pick a card X from Pile 1
value
Move X to Pile 2
The value to be compared is not fixed if (X.fld > Maxval) {
Parameter fld determines the field
Maxval = X.fld
of interest
}
}
return(Maxval)
end Maxmarks

Pseudocode: Using Procedures 3/5


Analysis of top students
MaxMaths = Maxmarks(Maths)
Use the procedure Maxmarks to
MaxPhysics = Maxmarks(Physics)
find maximum marks in different
categories MaxChemistry = Maxmarks(Chemistry)
Four procedure calls, with fld MaxTotal = Maxmarks(Total)
set appropriately SubjTotal = MaxMaths + MaxPhysics
Save each return value + MaxChemistry
separately
if (MaxTotal == SubjTotal) {
Use saved return values to SingleTopper = True
compare the maximum overall
}
total with the sum of the
maximum subject totals else {
SingleTopper = False
}
Pseudocode: Using Procedures 4/5
Summary

Use a procedure when the same computation is used for different


situations

Pseudocode: Using Procedures 5/5


Summary

Use a procedure when the same computation is used for different


situations
Parameters fix the context

Pseudocode: Using Procedures 5/5


Summary

Use a procedure when the same computation is used for different


situations
Parameters fix the context

Use variables to save values returned by procedures

Pseudocode: Using Procedures 5/5


Summary

Use a procedure when the same computation is used for different


situations
Parameters fix the context

Use variables to save values returned by procedures


Keep track of the outcomes of multiple procedure calls

Pseudocode: Using Procedures 5/5


Summary

Use a procedure when the same computation is used for different


situations
Parameters fix the context

Use variables to save values returned by procedures


Keep track of the outcomes of multiple procedure calls

Procedures help to modularize pseudocode

Pseudocode: Using Procedures 5/5


Summary

Use a procedure when the same computation is used for different


situations
Parameters fix the context

Use variables to save values returned by procedures


Keep track of the outcomes of multiple procedure calls

Procedures help to modularize pseudocode


Avoid descibing the same process repeatedly

Pseudocode: Using Procedures 5/5


Summary

Use a procedure when the same computation is used for different


situations
Parameters fix the context

Use variables to save values returned by procedures


Keep track of the outcomes of multiple procedure calls

Procedures help to modularize pseudocode


Avoid descibing the same process repeatedly
If we improve the code in a procedure, benefit automatically applies to
all procedure calls

Pseudocode: Using Procedures 5/5


Pseudocode: Awarding three prizes
Awarding three prizes

Want to award prizes to top 3


students
Basic criterion is total marks

Pseudocode: Awarding three prizes 2 / 10


Awarding three prizes

Want to award prizes to top 3


students
Basic criterion is total marks
Must also be within top three in
at least one subject

Pseudocode: Awarding three prizes 2 / 10


Awarding three prizes

Want to award prizes to top 3


students
Basic criterion is total marks
Must also be within top three in
at least one subject
Must select at least one boy and
one girl for top three prizes

Pseudocode: Awarding three prizes 2 / 10


Awarding three prizes

Want to award prizes to top 3


students
Basic criterion is total marks
Must also be within top three in
at least one subject
Must select at least one boy and
one girl for top three prizes
Basic pattern

Pseudocode: Awarding three prizes 2 / 10


Awarding three prizes

Want to award prizes to top 3


students
Basic criterion is total marks
Must also be within top three in
at least one subject
Must select at least one boy and
one girl for top three prizes
Basic pattern
Find top three marks in a
category
How is this to be done?

Pseudocode: Awarding three prizes 2 / 10


Awarding three prizes

Want to award prizes to top 3 Finding maximum


students
Initialize max to 0, scan cards, update
Basic criterion is total marks each time you see a bigger value
Must also be within top three in
at least one subject
Must select at least one boy and
one girl for top three prizes
Basic pattern
Find top three marks in a
category
How is this to be done?

Pseudocode: Awarding three prizes 2 / 10


Awarding three prizes

Want to award prizes to top 3 Finding maximum


students
Initialize max to 0, scan cards, update
Basic criterion is total marks each time you see a bigger value
Must also be within top three in Finding top two marks
at least one subject
Must select at least one boy and
one girl for top three prizes
Basic pattern
Find top three marks in a
category
How is this to be done?

Pseudocode: Awarding three prizes 2 / 10


Awarding three prizes

Want to award prizes to top 3 Finding maximum


students
Initialize max to 0, scan cards, update
Basic criterion is total marks each time you see a bigger value
Must also be within top three in Finding top two marks
at least one subject Maintain two values, max and secondmax
Must select at least one boy and
one girl for top three prizes
Basic pattern
Find top three marks in a
category
How is this to be done?

Pseudocode: Awarding three prizes 2 / 10


Awarding three prizes

Want to award prizes to top 3 Finding maximum


students
Initialize max to 0, scan cards, update
Basic criterion is total marks each time you see a bigger value
Must also be within top three in Finding top two marks
at least one subject Maintain two values, max and secondmax
Must select at least one boy and If current card value is bigger than max
one girl for top three prizes Copy max to secondmax, update max to
Basic pattern current value

Find top three marks in a


category
How is this to be done?

Pseudocode: Awarding three prizes 2 / 10


Awarding three prizes

Want to award prizes to top 3 Finding maximum


students
Initialize max to 0, scan cards, update
Basic criterion is total marks each time you see a bigger value
Must also be within top three in Finding top two marks
at least one subject Maintain two values, max and secondmax
Must select at least one boy and If current card value is bigger than max
one girl for top three prizes Copy max to secondmax, update max to
Basic pattern current value

Find top three marks in a If current card value is between max and
category secondmax
No change in max, update secondmax to
How is this to be done? current value

Pseudocode: Awarding three prizes 2 / 10


Top three marks in a subject
Maintain max, secondmax, Procedure TopThreeMarks(Subj)
thirdmax max = 0
secondmax = 0
thirdmax = 0

End TopThreeMarks

Pseudocode: Awarding three prizes 3 / 10


Top three marks in a subject
Maintain max, secondmax, Procedure TopThreeMarks(Subj)
thirdmax max = 0
Scan through all the cards secondmax = 0
thirdmax = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
...
...
}
End TopThreeMarks

Pseudocode: Awarding three prizes 3 / 10


Top three marks in a subject
Maintain max, secondmax, Procedure TopThreeMarks(Subj)
thirdmax max = 0
Scan through all the cards secondmax = 0
thirdmax = 0
Update max, secondmax,
while (Pile 1 has more cards) {
thirdmax as approprate
Pick a card X from Pile 1
...
...
}
End TopThreeMarks

Pseudocode: Awarding three prizes 3 / 10


Top three marks in a subject
Maintain max, secondmax, Procedure TopThreeMarks(Subj)
thirdmax max = 0
Scan through all the cards secondmax = 0
thirdmax = 0
Update max, secondmax,
while (Pile 1 has more cards) {
thirdmax as approprate
Pick a card X from Pile 1
Current value is
if (X.Subj > max) {
Bigger than max
thirdmax = secondmax
secondmax = max
max = X.Subj
}
}
End TopThreeMarks
Pseudocode: Awarding three prizes 3 / 10
Top three marks in a subject
Maintain max, secondmax, Procedure TopThreeMarks(Subj)
thirdmax max = 0
Scan through all the cards secondmax = 0
thirdmax = 0
Update max, secondmax,
while (Pile 1 has more cards) {
thirdmax as approprate
Pick a card X from Pile 1
Current value is
...
Bigger than max if (max > X.Subj > secondmax) {
Between max and secondmax
thirdmax = secondmax
secondmax = X.Subj
}
}
End TopThreeMarks
Pseudocode: Awarding three prizes 3 / 10
Top three marks in a subject
Maintain max, secondmax, Procedure TopThreeMarks(Subj)
thirdmax max = 0
Scan through all the cards secondmax = 0
thirdmax = 0
Update max, secondmax,
while (Pile 1 has more cards) {
thirdmax as approprate
Pick a card X from Pile 1
Current value is
...
Bigger than max ...
Between max and secondmax if (secondmax > X.Subj > thirdmax) {
Between secondmax and
thirdmax = X.Subj
thirdmax
}
}
End TopThreeMarks
Pseudocode: Awarding three prizes 3 / 10
Top three marks in a subject
Maintain max, secondmax, Procedure TopThreeMarks(Subj)
thirdmax max = 0
Scan through all the cards secondmax = 0
thirdmax = 0
Update max, secondmax,
while (Pile 1 has more cards) {
thirdmax as approprate
Pick a card X from Pile 1
Current value is
...
Bigger than max
...
Between max and secondmax
}
Between secondmax and
thirdmax return([max,secondmax,thirdmax])

Need to return three values as a End TopThreeMarks


list [v1 , v2 , v3 ]?

Pseudocode: Awarding three prizes 3 / 10


Top three marks in a subject
Maintain max, secondmax, Procedure TopThreeMarks(Subj)
thirdmax max = 0
Scan through all the cards secondmax = 0
thirdmax = 0
Update max, secondmax,
while (Pile 1 has more cards) {
thirdmax as approprate
Pick a card X from Pile 1
Current value is
...
Bigger than max
...
Between max and secondmax
}
Between secondmax and
thirdmax return([max,secondmax,thirdmax])

Need to return three values as a End TopThreeMarks


list [v1 , v2 , v3 ]? Lists later . . .

Pseudocode: Awarding three prizes 3 / 10


Top three marks in a subject
Maintain max, secondmax, Procedure TopThreeMarks(Subj)
thirdmax max = 0
Scan through all the cards secondmax = 0
thirdmax = 0
Update max, secondmax,
while (Pile 1 has more cards) {
thirdmax as approprate
Pick a card X from Pile 1
Current value is
...
Bigger than max
...
Between max and secondmax
}
Between secondmax and
thirdmax return( thirdmax )
End TopThreeMarks
Need to return three values as a
list [v1 , v2 , v3 ]? Lists later . . .
Sufficient to return thirdmax
Pseudocode: Awarding three prizes 3 / 10
Top three marks in a subject, in entirety
Procedure TopThreeMarks(Subj)
max = 0 if (max > X.Subj > secondmax) {
secondmax = 0 thirdmax = secondmax
thirdmax = 0 secondmax = X.Subj
}
while (Pile 1 has more cards) {
if (secondmax > X.Subj >
Pick a card X from Pile 1
thirdmax) {
if (X.Subj > max) { thirdmax = X.subj
thirdmax = secondmax }
secondmax = max
}
max = X.Subj
return(thirdmax)
}
End TopThreeMarks

Pseudocode: Awarding three prizes 4 / 10


Three prizes
Top three totals such that top three in at least one subject
Deal with boy/girl requirement later

Pseudocode: Awarding three prizes 5 / 10


Three prizes
Top three totals such that top three in at least one subject
Deal with boy/girl requirement later

Again, maintain and update max, secondmax, thirdmax

Pseudocode: Awarding three prizes 5 / 10


Three prizes
Top three totals such that top three in at least one subject
Deal with boy/girl requirement later

Again, maintain and update max, secondmax, thirdmax


Scan through all the cards

Pseudocode: Awarding three prizes 5 / 10


Three prizes
Top three totals such that top three in at least one subject
Deal with boy/girl requirement later

Again, maintain and update max, secondmax, thirdmax


Scan through all the cards
For each card, update max, secondmax, thirdmax as before

Pseudocode: Awarding three prizes 5 / 10


Three prizes
Top three totals such that top three in at least one subject
Deal with boy/girl requirement later

Again, maintain and update max, secondmax, thirdmax


Scan through all the cards
For each card, update max, secondmax, thirdmax as before
But only if in the top three of at least one subject!

Pseudocode: Awarding three prizes 5 / 10


Three prizes
Top three totals such that top three in at least one subject
Deal with boy/girl requirement later

Again, maintain and update max, secondmax, thirdmax


Scan through all the cards
For each card, update max, secondmax, thirdmax as before
But only if in the top three of at least one subject!
Record third highest mark in each subject
Compare with subject marks before updating max, secondmax, thirdmax

Pseudocode: Awarding three prizes 5 / 10


Three prizes
Top three totals such that top three in at least one subject
Deal with boy/girl requirement later

Again, maintain and update max, secondmax, thirdmax


Scan through all the cards
For each card, update max, secondmax, thirdmax as before
But only if in the top three of at least one subject!
Record third highest mark in each subject
Compare with subject marks before updating max, secondmax, thirdmax

After scanning all cards, we have three prize winning totals

Pseudocode: Awarding three prizes 5 / 10


Three prizes
Top three totals such that top three in at least one subject
Deal with boy/girl requirement later

Again, maintain and update max, secondmax, thirdmax


Scan through all the cards
For each card, update max, secondmax, thirdmax as before
But only if in the top three of at least one subject!
Record third highest mark in each subject
Compare with subject marks before updating max, secondmax, thirdmax

After scanning all cards, we have three prize winning totals


But who are the winners?

Pseudocode: Awarding three prizes 5 / 10


Three prizes
Top three totals such that top three in at least one subject
Deal with boy/girl requirement later

Again, maintain and update max, secondmax, thirdmax


Scan through all the cards
For each card, update max, secondmax, thirdmax as before
But only if in the top three of at least one subject!
Record third highest mark in each subject
Compare with subject marks before updating max, secondmax, thirdmax

After scanning all cards, we have three prize winning totals


But who are the winners?
Keep track of card number of prize winners

Pseudocode: Awarding three prizes 5 / 10


Three prizes
Maintain max, secondmax, max = 0
thirdmax, as well as maxid, secondmax = 0
secondmaxid, thirdmaxid
thirdmax = 0
maxid = -1
secondmaxid = -1
thirdmaxid = -1

Pseudocode: Awarding three prizes 6 / 10


Three prizes
Maintain max, secondmax, h Initialization of max, maxid etc i
thirdmax, as well as maxid,
maths3 = TopThreeMarks(Maths)
secondmaxid, thirdmaxid
phys3 = TopThreeMarks(Physics)
Record third highest mark in
each subject chem3 = TopThreeMarks(Chemistry)

Pseudocode: Awarding three prizes 6 / 10


Three prizes
Maintain max, secondmax, h Initialization of max, maxid etc i
thirdmax, as well as maxid, h Record third highest per subject i
secondmaxid, thirdmaxid
while (Pile 1 has more cards) {
Record third highest mark in Pick a card X from Pile 1
each subject ...
Scan through all the cards ...
}

Pseudocode: Awarding three prizes 6 / 10


Three prizes
Maintain max, secondmax, h Initialization of max, maxid etc i
thirdmax, as well as maxid, h Record third highest per subject i
secondmaxid, thirdmaxid while (Pile 1 has more cards) {
Record third highest mark in Pick a card X from Pile 1
each subject ...
...
Scan through all the cards
}
Update max, secondmax,
thirdmax as appropriate

Pseudocode: Awarding three prizes 6 / 10


Three prizes
Maintain max, secondmax, h Initialization of max, maxid etc i
thirdmax, as well as maxid, h Record third highest per subject i
secondmaxid, thirdmaxid while (Pile 1 has more cards) {
Record third highest mark in Pick a card X from Pile 1
each subject if (SubjectTopper(X,math3,phys3,chem3)){
...
Scan through all the cards
...
Update max, secondmax, }
thirdmax as appropriate }
Only if top three in some
subject — new procedure
SubjectTopper(. . . )

Pseudocode: Awarding three prizes 6 / 10


Three prizes
Maintain max, secondmax, h Initialization of max, maxid etc i
thirdmax, as well as maxid, h Record third highest per subject i
secondmaxid, thirdmaxid while (Pile 1 has more cards) {
Record third highest mark in Pick a card X from Pile 1
each subject if (SubjectTopper(X,math3,phys3,chem3)){
if (X.Total > max) {
Scan through all the cards
thirdmax = secondmax
Update max, secondmax,
thirdmaxid = secondmaxid
thirdmax as appropriate
secondmax = max
Only if top three in some
subject — new procedure secondmaxid = maxid
SubjectTopper(. . . ) max = X.Total
maxid = X.Id
}
}
Pseudocode: Awarding three prizes 6 / 10
Three prizes
Maintain max, secondmax, h Initialization of max, maxid etc i
thirdmax, as well as maxid, h Record third highest per subject i
secondmaxid, thirdmaxid while (Pile 1 has more cards) {
Record third highest mark in Pick a card X from Pile 1
each subject if (SubjectTopper(X,math3,phys3,chem3)){
...
Scan through all the cards
if (max > X.Total > secondmax) {
Update max, secondmax, thirdmax = secondmax
thirdmax as appropriate thirdmaxid = secondmaxid
Only if top three in some secondmax = X.Total
subject — new procedure
SubjectTopper(. . . ) secondmaxid = X.Id
}
}
}
Pseudocode: Awarding three prizes 6 / 10
Three prizes
Maintain max, secondmax, h Initialization of max, maxid etc i
thirdmax, as well as maxid, h Record third highest per subject i
secondmaxid, thirdmaxid while (Pile 1 has more cards) {
Record third highest mark in Pick a card X from Pile 1
each subject if (SubjectTopper(X,math3,phys3,chem3)){
...
Scan through all the cards
...
Update max, secondmax, if (secondmax > X.Total > thirdmax) {
thirdmax as appropriate thirdmax = X.Total
Only if top three in some thirdmaxid = X.Id
subject — new procedure
}
SubjectTopper(. . . )
}
}

Pseudocode: Awarding three prizes 6 / 10


Three prizes
Maintain max, secondmax, h Initialization of max, maxid etc i
thirdmax, as well as maxid, h Record third highest per subject i
secondmaxid, thirdmaxid while (Pile 1 has more cards) {
Record third highest mark in Pick a card X from Pile 1
each subject h Update max, maxid etc i
}
Scan through all the cards
}
Update max, secondmax,
thirdmax as appropriate Variables of interest
Only if top three in some maxid, max
subject — new procedure
SubjectTopper(. . . ) secondmaxid, secondmax

In the end, we have what we thirdmaxid, thirdmax


need
Pseudocode: Awarding three prizes 6 / 10
Subject topper
Compare each subject’s marks on Procedure SubjectTopper
card with third highest (Card,MMark,PMark,CMark)
if ( Card.Maths ≥ MMark or
Card.Physics ≥ PMark or
Card.Chemistry ≥ CMark ) {
return(True)
}
else {
return(False)
}
End SubjectTopper

Pseudocode: Awarding three prizes 7 / 10


Subject topper
Compare each subject’s marks on Procedure SubjectTopper
card with third highest (Card,MMark,PMark,CMark)
Passed explicitly as parameters if (Card.Maths ≥ MMark or
Card.Physics ≥ PMark or
Card.Chemistry ≥ CMark) {
return(True)
}
else {
return(False)
}
End SubjectTopper

Pseudocode: Awarding three prizes 7 / 10


Subject topper
Compare each subject’s marks on Procedure SubjectTopper
card with third highest (Card,MMark,PMark,CMark)
Passed explicitly as parameters if (Card.Maths ≥ MMark or
One or more comparisons should Card.Physics ≥ PMark or
succeed — or operator Card.Chemistry ≥ CMark) {
return(True)
}
else {
return(False)
}
End SubjectTopper

Pseudocode: Awarding three prizes 7 / 10


Subject topper
Compare each subject’s marks on Procedure SubjectTopper
card with third highest (Card,MMark,PMark,CMark)
Passed explicitly as parameters if (Card.Maths ≥ MMark or
One or more comparisons should Card.Physics ≥ PMark or
succeed — or operator Card.Chemistry ≥ CMark) {
Value returned is a Boolean — return(True)
True or False }
else {
return(False)
}
End SubjectTopper

Pseudocode: Awarding three prizes 7 / 10


Subject topper
Compare each subject’s marks on Procedure SubjectTopper
card with third highest (Card,MMark,PMark,CMark)
Passed explicitly as parameters if (Card.Maths ≥ MMark or
One or more comparisons should Card.Physics ≥ PMark or
succeed — or operator Card.Chemistry ≥ CMark) {
Value returned is a Boolean — return(True)
True or False }
else {
Typically, we would call this as
follows: return(False)
if (SubjectTopper(X,M,C,P) == True) }
End SubjectTopper

Pseudocode: Awarding three prizes 7 / 10


Subject topper
Compare each subject’s marks on Procedure SubjectTopper
card with third highest (Card,MMark,PMark,CMark)
Passed explicitly as parameters if (Card.Maths ≥ MMark or
One or more comparisons should Card.Physics ≥ PMark or
succeed — or operator Card.Chemistry ≥ CMark) {
Value returned is a Boolean — return(True)
True or False }
else {
Typically, we would call this as
follows: return(False)
if (SubjectTopper(X,M,C,P) == True) }
End SubjectTopper
Return value is Boolean, so . . .
if (SubjectTopper(X,M,C,P))

Pseudocode: Awarding three prizes 7 / 10


Three prizes, in entirety
max = 0
secondmax = 0 max = X.Total
thirdmax = 0 maxid = X.Id
}
maxid = -1
secondmaxid = -1 if (max > X.Total > secondmax) {
thirdmaxid = -1 thirdmax = secondmax
thirdmaxid = secondmaxid
maths3 = TopThreeMarks(Maths)
secondmax = X.Total
phys3 = TopThreeMarks(Physics)
secondmaxid = X.Id
chem3 = TopThreeMarks(Chemistry)
}
while (Pile 1 has more cards) {
if (secondmax > X.Total > thirdmax) {
Pick a card X from Pile 1
thirdmax = X.Total
if (SubjectTopper(X,math3,phys3,chem3)){ thirdmaxid = X.Id
if (X.Total > max) { }
thirdmax = secondmax }
thirdmaxid = secondmaxid
}
secondmax = max
secondmaxid = maxid

Pseudocode: Awarding three prizes 8 / 10


Boundary conditions
What if all prize winners are of the same gender?

Pseudocode: Awarding three prizes 9 / 10


Boundary conditions
What if all prize winners are of the same gender?
Exclude the third prize winner and repeat the process

Pseudocode: Awarding three prizes 9 / 10


Boundary conditions
What if all prize winners are of the same gender?
Exclude the third prize winner and repeat the process
How many times?

Pseudocode: Awarding three prizes 9 / 10


Boundary conditions
What if all prize winners are of the same gender?
Exclude the third prize winner and repeat the process
How many times?
Till we get three prize winners with at least one boy and one girls

Pseudocode: Awarding three prizes 9 / 10


Boundary conditions
What if all prize winners are of the same gender?
Exclude the third prize winner and repeat the process
How many times?
Till we get three prize winners with at least one boy and one girls
Will this always given us three valid prize winners?

Pseudocode: Awarding three prizes 9 / 10


Boundary conditions
What if all prize winners are of the same gender?
Exclude the third prize winner and repeat the process
How many times?
Till we get three prize winners with at least one boy and one girls
Will this always given us three valid prize winners?

What if there are ties?

Pseudocode: Awarding three prizes 9 / 10


Boundary conditions
What if all prize winners are of the same gender?
Exclude the third prize winner and repeat the process
How many times?
Till we get three prize winners with at least one boy and one girls
Will this always given us three valid prize winners?

What if there are ties?


How many ties can we tolerate?

Pseudocode: Awarding three prizes 9 / 10


Boundary conditions
What if all prize winners are of the same gender?
Exclude the third prize winner and repeat the process
How many times?
Till we get three prize winners with at least one boy and one girls
Will this always given us three valid prize winners?

What if there are ties?


How many ties can we tolerate?
Does it depend on first, second or third position?

Pseudocode: Awarding three prizes 9 / 10


Summary

We have worked out a complex problem in full detail

Pseudocode: Awarding three prizes 10 / 10


Summary

We have worked out a complex problem in full detail


Identify natural units to convert into procedures

Pseudocode: Awarding three prizes 10 / 10


Summary

We have worked out a complex problem in full detail


Identify natural units to convert into procedures
TopThreeMarks(Subj)

Pseudocode: Awarding three prizes 10 / 10


Summary

We have worked out a complex problem in full detail


Identify natural units to convert into procedures
TopThreeMarks(Subj)
SubjectTopper(CardId,MMark,PMark,CMark)

Pseudocode: Awarding three prizes 10 / 10


Summary

We have worked out a complex problem in full detail


Identify natural units to convert into procedures
TopThreeMarks(Subj)
SubjectTopper(CardId,MMark,PMark,CMark)

Shortcut for checking return value of a procedure that returns a Boolean value

Pseudocode: Awarding three prizes 10 / 10


Summary

We have worked out a complex problem in full detail


Identify natural units to convert into procedures
TopThreeMarks(Subj)
SubjectTopper(CardId,MMark,PMark,CMark)

Shortcut for checking return value of a procedure that returns a Boolean value
if (SubjectTopper(CardID,Math3,Phys3,Chem3))

Pseudocode: Awarding three prizes 10 / 10


Summary

We have worked out a complex problem in full detail


Identify natural units to convert into procedures
TopThreeMarks(Subj)
SubjectTopper(CardId,MMark,PMark,CMark)

Shortcut for checking return value of a procedure that returns a Boolean value
if (SubjectTopper(CardID,Math3,Phys3,Chem3))

Have to anticipate and account for unexpected situations in data

Pseudocode: Awarding three prizes 10 / 10


Summary

We have worked out a complex problem in full detail


Identify natural units to convert into procedures
TopThreeMarks(Subj)
SubjectTopper(CardId,MMark,PMark,CMark)

Shortcut for checking return value of a procedure that returns a Boolean value
if (SubjectTopper(CardID,Math3,Phys3,Chem3))

Have to anticipate and account for unexpected situations in data


All toppers are same gender

Pseudocode: Awarding three prizes 10 / 10


Summary

We have worked out a complex problem in full detail


Identify natural units to convert into procedures
TopThreeMarks(Subj)
SubjectTopper(CardId,MMark,PMark,CMark)

Shortcut for checking return value of a procedure that returns a Boolean value
if (SubjectTopper(CardID,Math3,Phys3,Chem3))

Have to anticipate and account for unexpected situations in data


All toppers are same gender
Ties

Pseudocode: Awarding three prizes 10 / 10


Pseudocode: Side effects
A procedure to sum up any type of marks

Procedure SumMarks(gen,fld)
Sum = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Side effects 2/8


A procedure to sum up any type of marks

Two parameters, gender (gen) and Procedure SumMarks(gen,fld)


field (fld) Sum = 0
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Side effects 2/8


A procedure to sum up any type of marks

Two parameters, gender (gen) and Procedure SumMarks(gen,fld)


field (fld) Sum = 0
What about the set of cards? while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Side effects 2/8


A procedure to sum up any type of marks

Two parameters, gender (gen) and Procedure SumMarks(gen,fld)


field (fld) Sum = 0
What about the set of cards? while (Pile 1 has more cards) {

This procedure works for a fixed set Pick a card X from Pile 1
of cards Move X to Pile 2
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Side effects 2/8


A procedure to sum up any type of marks

Two parameters, gender (gen) and Procedure SumMarks(gen,fld)


field (fld) Sum = 0
What about the set of cards? while (Pile 1 has more cards) {

This procedure works for a fixed set Pick a card X from Pile 1
of cards Move X to Pile 2
Pass the deck of cards through a if (X.Gender == gen) {
third parameter! Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Side effects 2/8


Sum up any type of marks for any deck of cards

Procedure SumMarks(gen,fld,Deck)
Sum = 0
while (Deck has more cards) {
Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Side effects 3/8


Sum up any type of marks for any deck of cards

Third parameter Deck Procedure SumMarks(gen,fld, Deck )


Sum = 0
while (Deck has more cards) {
Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks
Pseudocode: Side effects 3/8
Sum up any type of marks for any deck of cards

Third parameter Deck Procedure SumMarks(gen,fld, Deck )


New variable SeenDeck for second Sum = 0
pile while (Deck has more cards) {
Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks
Pseudocode: Side effects 3/8
Sum up any type of marks for any deck of cards

Third parameter Deck Procedure SumMarks(gen,fld,Deck)


Sum = 0
New variable SeenDeck for second
pile while (Deck has more cards) {

Deck is modified as the procedure Pick a card X from Deck


executes Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Side effects 3/8


Sum up any type of marks for any deck of cards
Procedure SumMarks(gen,fld,Deck)
Third parameter Deck Sum = 0
New variable SeenDeck for second while (Deck has more cards) {
pile Pick a card X from Deck
Deck is modified as the procedure Move X to SeenDeck
executes
if (X.Gender == gen) {
Cards move from Deck to
SeenDeck Sum = Sum + X.fld
}
}
return(Sum)
end SumMarks

Pseudocode: Side effects 3/8


Sum up any type of marks for any deck of cards
Procedure SumMarks(gen,fld,Deck)
Third parameter Deck Sum = 0
New variable SeenDeck for second while (Deck has more cards) {
pile Pick a card X from Deck
Deck is modified as the procedure Move X to SeenDeck
executes
if (X.Gender == gen) {
Cards move from Deck to
SeenDeck Sum = Sum + X.fld

At the end of the procedure, Deck is }


empty! }
return(Sum)
end SumMarks

Pseudocode: Side effects 3/8


Sum up any type of marks for any deck of cards
Procedure SumMarks(gen,fld,Deck)
Third parameter Deck Sum = 0
New variable SeenDeck for second while (Deck has more cards) {
pile Pick a card X from Deck
Deck is modified as the procedure Move X to SeenDeck
executes
if (X.Gender == gen) {
Cards move from Deck to
SeenDeck Sum = Sum + X.fld

At the end of the procedure, Deck is }


empty! }
Procedure should also restore Deck Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 3/8
Sum up any type of marks for any deck of cards
Procedure SumMarks(gen,fld,Deck)
Third parameter Deck Sum = 0
New variable SeenDeck for second while (Deck has more cards) {
pile Pick a card X from Deck
Deck is modified as the procedure Move X to SeenDeck
executes
if (X.Gender == gen) {
Cards move from Deck to
SeenDeck Sum = Sum + X.fld

At the end of the procedure, Deck is }


empty! }
Procedure should also restore Deck Restore Deck from SeenDeck

Is this sufficient? return(Sum)


end SumMarks
Pseudocode: Side effects 3/8
Side effects
What is the status of Deck after the Procedure SumMarks(gen,fld,Deck)
procedure? Sum = 0
while (Deck has more cards) {
Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 4/8
Side effects
What is the status of Deck after the Procedure SumMarks(gen,fld,Deck)
procedure? Sum = 0
Is each card the same as it was while (Deck has more cards) {
before? Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 4/8
Side effects
What is the status of Deck after the Procedure SumMarks(gen,fld,Deck)
procedure? Sum = 0
Is each card the same as it was while (Deck has more cards) {
before? Pick a card X from Deck
We certainly expect so
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 4/8
Side effects
What is the status of Deck after the Procedure SumMarks(gen,fld,Deck)
procedure? Sum = 0
Is each card the same as it was while (Deck has more cards) {
before? Pick a card X from Deck
We certainly expect so
Move X to SeenDeck
Is the sequence of cards the same as
if (X.Gender == gen) {
it was before?
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 4/8
Side effects
What is the status of Deck after the Procedure SumMarks(gen,fld,Deck)
procedure? Sum = 0
Is each card the same as it was while (Deck has more cards) {
before? Pick a card X from Deck
We certainly expect so
Move X to SeenDeck
Is the sequence of cards the same as
if (X.Gender == gen) {
it was before?
Perhaps not Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 4/8
Side effects
What is the status of Deck after the Procedure SumMarks(gen,fld,Deck)
procedure? Sum = 0
Is each card the same as it was while (Deck has more cards) {
before? Pick a card X from Deck
We certainly expect so
Move X to SeenDeck
Is the sequence of cards the same as
if (X.Gender == gen) {
it was before?
Perhaps not Sum = Sum + X.fld
Depends what we mean by }
“restore” Deck
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 4/8
Side effects
What is the status of Deck after the Procedure SumMarks(gen,fld,Deck)
procedure? Sum = 0
Is each card the same as it was while (Deck has more cards) {
before? Pick a card X from Deck
We certainly expect so
Move X to SeenDeck
Is the sequence of cards the same as
if (X.Gender == gen) {
it was before?
Perhaps not Sum = Sum + X.fld
Depends what we mean by }
“restore” Deck
}
SeenDeck would normally be in
reverse order Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 4/8
Side effects
What is the status of Deck after the Procedure SumMarks(gen,fld,Deck)
procedure? Sum = 0
Is each card the same as it was while (Deck has more cards) {
before? Pick a card X from Deck
We certainly expect so
Move X to SeenDeck
Is the sequence of cards the same as
if (X.Gender == gen) {
it was before?
Perhaps not Sum = Sum + X.fld
Depends what we mean by }
“restore” Deck
}
SeenDeck would normally be in
reverse order Restore Deck from SeenDeck
Side effect Procedure modifies some return(Sum)
data during its computation end SumMarks
Pseudocode: Side effects 4/8
Side effects . . .
Sequence of cards may be disturbed Procedure SumMarks(gen,fld,Deck)
Sum = 0
while (Deck has more cards) {
Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 5/8
Side effects . . .
Sequence of cards may be disturbed Procedure SumMarks(gen,fld,Deck)
Does it matter? Sum = 0
while (Deck has more cards) {
Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 5/8
Side effects . . .
Sequence of cards may be disturbed Procedure SumMarks(gen,fld,Deck)
Does it matter? Sum = 0
Not in this case — adding marks while (Deck has more cards) {
does not depend on how the cards Pick a card X from Deck
are arranged
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 5/8
Side effects . . .
Sequence of cards may be disturbed Procedure SumMarks(gen,fld,Deck)
Does it matter? Sum = 0
Not in this case — adding marks while (Deck has more cards) {
does not depend on how the cards Pick a card X from Deck
are arranged
Move X to SeenDeck
Sometimes the side effect is the end
if (X.Gender == gen) {
goal
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 5/8
Side effects . . .
Sequence of cards may be disturbed Procedure SumMarks(gen,fld,Deck)
Does it matter? Sum = 0
Not in this case — adding marks while (Deck has more cards) {
does not depend on how the cards Pick a card X from Deck
are arranged
Move X to SeenDeck
Sometimes the side effect is the end
if (X.Gender == gen) {
goal
Sum = Sum + X.fld
Procedure to arrange cards in
decreasing order of Total Marks }
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 5/8
Side effects . . .
Sequence of cards may be disturbed Procedure SumMarks(gen,fld,Deck)
Does it matter? Sum = 0
Not in this case — adding marks while (Deck has more cards) {
does not depend on how the cards Pick a card X from Deck
are arranged
Move X to SeenDeck
Sometimes the side effect is the end
if (X.Gender == gen) {
goal
Sum = Sum + X.fld
Procedure to arrange cards in
decreasing order of Total Marks }
A side effect could be undesirable }
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 5/8
Side effects . . .
Sequence of cards may be disturbed Procedure SumMarks(gen,fld,Deck)
Does it matter? Sum = 0
Not in this case — adding marks while (Deck has more cards) {
does not depend on how the cards Pick a card X from Deck
are arranged
Move X to SeenDeck
Sometimes the side effect is the end
if (X.Gender == gen) {
goal
Sum = Sum + X.fld
Procedure to arrange cards in
decreasing order of Total Marks }
A side effect could be undesirable }
We pass a deck arranged in Restore Deck from SeenDeck
decreasing order of Total Marks return(Sum)
end SumMarks
Pseudocode: Side effects 5/8
Side effects . . .
Sequence of cards may be disturbed Procedure SumMarks(gen,fld,Deck)
Does it matter? Sum = 0
Not in this case — adding marks while (Deck has more cards) {
does not depend on how the cards Pick a card X from Deck
are arranged
Move X to SeenDeck
Sometimes the side effect is the end
if (X.Gender == gen) {
goal
Sum = Sum + X.fld
Procedure to arrange cards in
decreasing order of Total Marks }
A side effect could be undesirable }
We pass a deck arranged in Restore Deck from SeenDeck
decreasing order of Total Marks return(Sum)
After the procedure, the deck is
randomly rearranged end SumMarks
Pseudocode: Side effects 5/8
Interface vs implementation
Each procedure comes with a contract Procedure SumMarks(gen,fld,Deck)
Sum = 0
while (Deck has more cards) {
Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 6/8
Interface vs implementation
Each procedure comes with a contract Procedure SumMarks(gen,fld,Deck)
Functionality Sum = 0
while (Deck has more cards) {
Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 6/8
Interface vs implementation
Each procedure comes with a contract Procedure SumMarks(gen,fld,Deck)
Functionality Sum = 0
What parameters will be passed while (Deck has more cards) {
Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 6/8
Interface vs implementation
Each procedure comes with a contract Procedure SumMarks(gen,fld,Deck)
Functionality Sum = 0
What parameters will be passed while (Deck has more cards) {
What is expected in return Pick a card X from Deck
Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 6/8
Interface vs implementation
Each procedure comes with a contract Procedure SumMarks(gen,fld,Deck)
Functionality Sum = 0
What parameters will be passed while (Deck has more cards) {
What is expected in return Pick a card X from Deck
Data integrity Move X to SeenDeck
if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 6/8
Interface vs implementation
Each procedure comes with a contract Procedure SumMarks(gen,fld,Deck)
Functionality Sum = 0
What parameters will be passed while (Deck has more cards) {
What is expected in return Pick a card X from Deck
Data integrity Move X to SeenDeck
Can the procedure have side effects? if (X.Gender == gen) {
Sum = Sum + X.fld
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 6/8
Interface vs implementation
Each procedure comes with a contract Procedure SumMarks(gen,fld,Deck)
Functionality Sum = 0
What parameters will be passed while (Deck has more cards) {
What is expected in return Pick a card X from Deck
Data integrity Move X to SeenDeck
Can the procedure have side effects? if (X.Gender == gen) {
Is the nature of the side effect
Sum = Sum + X.fld
predictable?
}
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 6/8
Interface vs implementation
Each procedure comes with a contract Procedure SumMarks(gen,fld,Deck)
Functionality Sum = 0
What parameters will be passed while (Deck has more cards) {
What is expected in return Pick a card X from Deck
Data integrity Move X to SeenDeck
Can the procedure have side effects? if (X.Gender == gen) {
Is the nature of the side effect
Sum = Sum + X.fld
predictable?
For instance, deck is reversed }
}
Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 6/8
Interface vs implementation
Each procedure comes with a contract Procedure SumMarks(gen,fld,Deck)
Functionality Sum = 0
What parameters will be passed while (Deck has more cards) {
What is expected in return Pick a card X from Deck
Data integrity Move X to SeenDeck
Can the procedure have side effects? if (X.Gender == gen) {
Is the nature of the side effect
Sum = Sum + X.fld
predictable?
For instance, deck is reversed }
}
Contract specifies interface Restore Deck from SeenDeck
return(Sum)
end SumMarks
Pseudocode: Side effects 6/8
Interface vs implementation
Each procedure comes with a contract Procedure SumMarks(gen,fld,Deck)
Functionality Sum = 0
What parameters will be passed while (Deck has more cards) {
What is expected in return Pick a card X from Deck
Data integrity Move X to SeenDeck
Can the procedure have side effects? if (X.Gender == gen) {
Is the nature of the side effect
Sum = Sum + X.fld
predictable?
For instance, deck is reversed }
}
Contract specifies interface Restore Deck from SeenDeck
Can change procedure
return(Sum)
implementation (code) provided
interface is unaffected end SumMarks
Pseudocode: Side effects 6/8
Side effects . . .
Associating personal pronouns with nouns It was Monday morning. Swaminathan
was reluctant to open his eyes. He
considered Monday specially unpleasant in
the calendar. After the delicious freedom
of Saturday and Sunday, it was difficult to
get into the Monday mood of work and
discipline. He shuddered at the very
thought of school: that dismal yellow
building; the fire-eyed Vedanayagam, his
class-teacher; and the Head-Master with
his thin long cane.

Pseudocode: Side effects 7/8


Side effects . . .
Associating personal pronouns with nouns It was Monday morning. Swaminathan
was reluctant to open his eyes. He
Fix a pronoun
considered Monday specially unpleasant in
the calendar. After the delicious freedom
of Saturday and Sunday, it was difficult to
get into the Monday mood of work and
discipline. He shuddered at the very
thought of school: that dismal yellow
building; the fire-eyed Vedanayagam, his
class-teacher; and the Head-Master with
his thin long cane.

Pseudocode: Side effects 7/8


Side effects . . .
Associating personal pronouns with nouns It was Monday morning. Swaminathan
was reluctant to open his eyes. He
Fix a pronoun
considered Monday specially unpleasant in
Search text before pronoun backwards the calendar. After the delicious freedom
of Saturday and Sunday, it was difficult to
get into the Monday mood of work and
discipline. He shuddered at the very
thought of school: that dismal yellow
building; the fire-eyed Vedanayagam, his
class-teacher; and the Head-Master with
his thin long cane.

Pseudocode: Side effects 7/8


Side effects . . .
Associating personal pronouns with nouns It was Monday morning. Swaminathan
was reluctant to open his eyes. He
Fix a pronoun
considered Monday specially unpleasant in
Search text before pronoun backwards the calendar. After the delicious freedom
Stop at the nearest name of Saturday and Sunday, it was difficult to
get into the Monday mood of work and
discipline. He shuddered at the very
thought of school: that dismal yellow
building; the fire-eyed Vedanayagam, his
class-teacher; and the Head-Master with
his thin long cane.

Pseudocode: Side effects 7/8


Side effects . . .
Associating personal pronouns with nouns It was Monday morning. Swaminathan
was reluctant to open his eyes. He
Fix a pronoun
considered Monday specially unpleasant in
Search text before pronoun backwards the calendar. After the delicious freedom
Stop at the nearest name of Saturday and Sunday, it was difficult to
get into the Monday mood of work and
Write a procedure for pronoun matching discipline. He shuddered at the very
thought of school: that dismal yellow
building; the fire-eyed Vedanayagam, his
class-teacher; and the Head-Master with
his thin long cane.

Pseudocode: Side effects 7/8


Side effects . . .
Associating personal pronouns with nouns It was Monday morning. Swaminathan
was reluctant to open his eyes. He
Fix a pronoun
considered Monday specially unpleasant in
Search text before pronoun backwards the calendar. After the delicious freedom
Stop at the nearest name of Saturday and Sunday, it was difficult to
get into the Monday mood of work and
Write a procedure for pronoun matching discipline. He shuddered at the very
thought of school: that dismal yellow
FindMatch(before, pronoun, after)
building; the fire-eyed Vedanayagam, his
Three parameters
class-teacher; and the Head-Master with
his thin long cane.

Pseudocode: Side effects 7/8


Side effects . . .
Associating personal pronouns with nouns It was Monday morning. Swaminathan
was reluctant to open his eyes. He
Fix a pronoun
considered Monday specially unpleasant in
Search text before pronoun backwards the calendar. After the delicious freedom
Stop at the nearest name of Saturday and Sunday, it was difficult to
get into the Monday mood of work and
Write a procedure for pronoun matching discipline. He shuddered at the very
thought of school: that dismal yellow
FindMatch(before, pronoun, after)
building; the fire-eyed Vedanayagam, his
Three parameters
class-teacher; and the Head-Master with
FindMatch should not disturb his thin long cane.
before and after
Sequence of words, position

Pseudocode: Side effects 7/8


Side effects . . .
Associating personal pronouns with nouns It was Monday morning. Swaminathan
was reluctant to open his eyes. He
Fix a pronoun
considered Monday specially unpleasant in
Search text before pronoun backwards the calendar. After the delicious freedom
Stop at the nearest name of Saturday and Sunday, it was difficult to
get into the Monday mood of work and
Write a procedure for pronoun matching discipline. He shuddered at the very
thought of school: that dismal yellow
FindMatch(before, pronoun, after)
building; the fire-eyed Vedanayagam, his
Three parameters
class-teacher; and the Head-Master with
FindMatch should not disturb his thin long cane.
before and after
Sequence of words, position
No side effects should happen

Pseudocode: Side effects 7/8


Summary

Need to separate interface and implementation

Pseudocode: Side effects 8/8


Summary

Need to separate interface and implementation


Interface describes a contract

Pseudocode: Side effects 8/8


Summary

Need to separate interface and implementation


Interface describes a contract
Parameters to be passed

Pseudocode: Side effects 8/8


Summary

Need to separate interface and implementation


Interface describes a contract
Parameters to be passed
Value to be returned

Pseudocode: Side effects 8/8


Summary

Need to separate interface and implementation


Interface describes a contract
Parameters to be passed
Value to be returned
What side effects are possible

Pseudocode: Side effects 8/8


Summary

Need to separate interface and implementation


Interface describes a contract
Parameters to be passed
Value to be returned
What side effects are possible

Can change the implementation provided we preserve the interface

Pseudocode: Side effects 8/8


Summary

Need to separate interface and implementation


Interface describes a contract
Parameters to be passed
Value to be returned
What side effects are possible

Can change the implementation provided we preserve the interface


Side effects are important to be aware of

Pseudocode: Side effects 8/8


Summary

Need to separate interface and implementation


Interface describes a contract
Parameters to be passed
Value to be returned
What side effects are possible

Can change the implementation provided we preserve the interface


Side effects are important to be aware of
Sometimes no guarantee is needed (adding up mark)

Pseudocode: Side effects 8/8


Summary

Need to separate interface and implementation


Interface describes a contract
Parameters to be passed
Value to be returned
What side effects are possible

Can change the implementation provided we preserve the interface


Side effects are important to be aware of
Sometimes no guarantee is needed (adding up mark)
Sometimes no side effect is tolerated (pronoun matching)

Pseudocode: Side effects 8/8


Summary

Need to separate interface and implementation


Interface describes a contract
Parameters to be passed
Value to be returned
What side effects are possible

Can change the implementation provided we preserve the interface


Side effects are important to be aware of
Sometimes no guarantee is needed (adding up mark)
Sometimes no side effect is tolerated (pronoun matching)
Sometimes the side effect is the goal (sort the data)

Pseudocode: Side effects 8/8


Reducing number of
comparisons
Reducing comparisons: what we observed
• Some computations seem to require comparisons of each card with all
the other cards in the pile
• for example, choosing a study partner for each student
• the number of comparisons required can be very large
• We observed that if we can organise the cards into bins based on some
heuristic:
• then we only need to compare cards within one bin
• this seems to significantly reduce the number of comparisons required
• Is there a formal way of determining the reduction in comparisons?
• Calculate the number of comparisons without binning
• Calculate the number of comparisons with binning
• Use these calculations to determine the reduction factor
Comparing each element with all other elements
A B

D E
For 5 elements A, B, C, D, E:
Comparing each element with all other elements
A B

D E
For 5 elements A, B, C, D, E:
The comparisons required are:
A with B, A with C, A with D, A with E (4)
Comparing each element with all other elements
A B

D E
For 5 elements A, B, C, D, E:
The comparisons required are:
A with B, A with C, A with D, A with E (4)
B with C, B with D, B with E (3)
Comparing each element with all other elements
B with A need not
A B be repeated !

D E
For 5 elements A, B, C, D, E:
The comparisons required are:
A with B, A with C, A with D, A with E (4)
B with C, B with D, B with E (3)
Comparing each element with all other elements
A B

D E
For 5 elements A, B, C, D, E:
The comparisons required are:
A with B, A with C, A with D, A with E (4)
B with C, B with D, B with E (3)
C with D, C with E (2)
Comparing each element with all other elements
C with A and C with B
A B need not be repeated !

D E
For 5 elements A, B, C, D, E:
The comparisons required are:
A with B, A with C, A with D, A with E (4)
B with C, B with D, B with E (3)
C with D, C with E (2)
Comparing each element with all other elements
A B

D E
For 5 elements A, B, C, D, E:
The comparisons required are:
A with B, A with C, A with D, A with E (4)
B with C, B with D, B with E (3)
C with D, C with E (2)
D with E (1)
Comparing each element with all other elements
A B

D E
For 5 elements A, B, C, D, E:
The comparisons required are:
A with B, A with C, A with D, A with E (4)
B with C, B with D, B with E (3)
C with D, C with E (2)
D with E (1)

Number of comparisons: 4 + 3 + 2 + 1 = 10
Comparing each element with all other elements
• For N objects, the number of comparisons
A B required will be:
• (N - 1) + (N - 2) + .... + 1
• which is = N × (N - 1)
C 2

D E
For 5 elements A, B, C, D, E:
The comparisons required are:
A with B, A with C, A with D, A with E (4)
B with C, B with D, B with E (3)
C with D, C with E (2)
D with E (1)
Number of comparisons: 4 + 3 + 2 + 1 = 10
Comparing each element with all other elements
• For N objects, the number of comparisons
A B required will be:
• (N - 1) + (N - 2) + .... + 1
• which is = N × (N - 1)
C 2

• This is the same as the number of ways of


D E
choosing 2 objects from N objects:
• NC2 = N × (N - 1)
For 5 elements A, B, C, D, E: 2
The comparisons required are:
A with B, A with C, A with D, A with E (4)
B with C, B with D, B with E (3)
C with D, C with E (2)
D with E (1)
Number of comparisons: 4 + 3 + 2 + 1 = 10
Comparing each element with all other elements
• For N objects, the number of comparisons
required will be:
A B • (N - 1) + (N - 2) + .... + 1
• which is = N × (N - 1)
2
C
• This is the same as the number of ways of
choosing 2 objects from N objects:
• NC 2 = N × (N - 1)
D E 2

For 5 elements A, B, C, D, E: • From first principles:


The comparisons required are: • Total number of pairs is N × N
A with B, A with C, A with D, A with E (4) • From this reduce self comparisons (e.g. A with A). So
B with C, B with D, B with E (3) number is reduced to: N × N - N
C with D, C with E (2) • which can be written as N × (N - 1)
D with E (1) • Comparing A with B is the same as comparing B with A, so
we are double counting this comparison
Number of comparisons: 4 + 3 + 2 + 1 = 10 • So, reduce the count by half = N × (N - 1)
2
Comparing each element with all other elements
• For N objects, the number of comparisons
required will be:
A B • (N - 1) + (N - 2) + .... + 1
• which is = N × (N - 1)
2
C
• This is the same as the number of ways of
choosing 2 objects from N objects:
• NC 2 = N × (N - 1)
D E 2

For 5 elements A, B, C, D, E: • From first principles:


The comparisons required are: • Total number of pairs is N × N
A with B, A with C, A with D, A with E (4) • From this reduce self comparisons (e.g. A with A). So
B with C, B with D, B with E (3) number is reduced to: N × N - N
C with D, C with E (2) • which can be written as N × (N - 1)
D with E (1) • Comparing A with B is the same as comparing B with A, so
we are double counting this comparison
Number of comparisons: 4 + 3 + 2 + 1 = 10 • So, reduce the count by half = N × (N - 1)
2
Number of comparisons can be written as: ½ × N × (N - 1)
The number of comparisons grows really fast
N N × (N - 1)
2
2 1
3 3
4 6
5 10
6 15
7 21
8 28
9 36
10 45
100 49,500
1000 4,99,500
The number of comparisons grows really fast
N N × (N - 1)
2 50
Quadratic curve
2 1 45

3 3 40

4 6 35

5 10 30

6 15 25

7 21 20

8 28 15

9 36 10

10 45 5

100 49,500
0

1000 4,99,500 2 3 4 5 6 7 8 9 10
How do we reduce the number of
comparisons?
Key idea: Use binning
• For 9 objects A,B,C,D,E,F,G,H,I:
• The number of comparisons is ½ × 9 × (9 - 1)
A = ½ × 9 × 8 = 9 × 4 = 36

B C

G E F

H I
Key idea: Use binning
• For 9 objects A,B,C,D,E,F,G,H,I:
• The number of comparisons is ½ × 9 × (9 - 1)
A = ½ × 9 × 8 = 9 × 4 = 36

B C • If the objects can be binned into 3 bins of


3 each:
D

G E F

H I
Key idea: Use binning
• For 9 objects A,B,C,D,E,F,G,H,I:
• The number of comparisons is ½ × 9 × (9 - 1)
A = ½ × 9 × 8 = 9 × 4 = 36

B C • If the objects can be binned into 3 bins of


3 each:
D • The number of comparisons per bin is:
½ × 3 × (3 -1) = ½ × 3 × 2 = 3
G E F

H I
Key idea: Use binning
• For 9 objects A,B,C,D,E,F,G,H,I:
• The number of comparisons is ½ × 9 × (9 - 1)
A = ½ × 9 × 8 = 9 × 4 = 36

B C • If the objects can be binned into 3 bins of


3 each:
D • The number of comparisons per bin is:
½ × 3 × (3 -1) = ½ × 3 × 2 = 3
E F • Total number of comparisons for all 3 bins is:
G 3 ×3=9

H I
Key idea: Use binning
• For 9 objects A,B,C,D,E,F,G,H,I:
• The number of comparisons is ½ × 9 × (9 - 1)
A = ½ × 9 × 8 = 9 × 4 = 36

B C • If the objects can be binned into 3 bins of


3 each:
• The number of comparisons per bin is:
D ½ × 3 × (3 -1) = ½ × 3 × 2 = 3
• Total number of comparisons for all 3 bins is:
3 ×3=9
G E F

H I • So, the number of comparisons reduces


from 36 to 9 !
• Reduced by a factor of 4 times.
Calculation of reduction due to binning
• For N items:
• Number of comparisons without binning is: ½ × N × (N - 1)

• If we use K bins of equal size, number of items in each bin is: N/K
• Number of comparisons per bin is: ½ × N/K × (N/K - 1)
• Total number of comparisons is:
K × ½ × N/K × (N/K - 1) = ½ × N × (N/K - 1)

• Factor of reduction is: [½ × N × (N - 1)] / [ ½ × N × (N/K - 1)]


= (N - 1) / (N/K - 1)
• For N = 9 and K = 3, this is (9 - 1) / (3 - 1) = 4
• So reduction is by a factor of 4 times.
Summary
• The number of comparisons between all pairs of items grows quadratically,
i.e. quite fast
• The formula of number of comparisons for N items is: ½ × N × (N - 1)

• Sometimes, it is possible to find a heuristic that allows us to put the items


into bins and compare only items within the bins
• If there are N items put into K bins each of equal size, then the number of
comparisons reduces to: ½ × N × (N/K - 1)

• The factor of reduction is: (N - 1) / (N/K - 1)


Summary of concepts introduced in weeks 1-4
Iterators and Variables

The iterator is the most commonly used pattern in computational thinking


Represents the procedure of doing some task repeatedly
requires an initialisation step,
the steps for the task that needs to be repeated,
and a way to determine when to stop the iteration

Summary of concepts introduced in weeks 1-4 2 / 12


Iterators and Variables

The iterator is the most commonly used pattern in computational thinking


Represents the procedure of doing some task repeatedly
requires an initialisation step,
the steps for the task that needs to be repeated,
and a way to determine when to stop the iteration
Variables keep track of intermediate values during the iteration
Variables are given starting values at the initialisation step
At each repeated step, the variable values are updated

Summary of concepts introduced in weeks 1-4 2 / 12


Iterators and Variables

The iterator is the most commonly used pattern in computational thinking


Represents the procedure of doing some task repeatedly
requires an initialisation step,
the steps for the task that needs to be repeated,
and a way to determine when to stop the iteration
Variables keep track of intermediate values during the iteration
Variables are given starting values at the initialisation step
At each repeated step, the variable values are updated
Initialisation and updates of variables are done through assignment statements

Summary of concepts introduced in weeks 1-4 2 / 12


Iterator represented as a flowchart

Start terminal symbol

Initialise variables process symbol

No (False)
Continue decision
End
iteration? symbol

Yes (True)
Update values −→ show progress
of variables from one step to another

Summary of concepts introduced in weeks 1-4 3 / 12


Iteration expressed through pseudocode

Start

Initialise variables Initialise variables


while (Continue with Iteration?) {
No (False)
Update values of variables Continue
End
iteration?
}

Yes (True)
Update values
of variables

Summary of concepts introduced in weeks 1-4 4 / 12


Iteration to systematically go through a set of items

Initialise variables
while (Pile 1 has more cards) {
Pick a card X from Pile 1
Move X to Pile 2
Update values of variables
}

Summary of concepts introduced in weeks 1-4 5 / 12


The set of items need to have well defined values

Sanity of different data fields of the item


... leads us to the concept of datatypes, which clearly identifies the values and allowed
operations
Basic data types - boolean, integer, character
Add to this string data type
Subtypes put more constraints on the values and operations allowed
Lists and Records are two ways of creating bigger bundles of data
In a list all data items typically have the same datatype
Whereas, a record has multiple named fields, each can be of a different datatype

Summary of concepts introduced in weeks 1-4 6 / 12


Iteration with Filtering

Filtering makes a decision at each repeated step whether to process an item or not
This introduces a decision step within the iteration loop

Summary of concepts introduced in weeks 1-4 7 / 12


Iteration with Filtering

Filtering makes a decision at each repeated step whether to process an item or not
This introduces a decision step within the iteration loop
Expressed in pseudocode, it would look something like this:
Initialise variables
while (Continue with Iteration?) {
...
if (condition is satisfied?) {
Update some variables
}
...
}
Prepare final results from variable values

Summary of concepts introduced in weeks 1-4 7 / 12


Iteration with Filtering

Filtering makes a decision at each repeated step whether to process an item or not

Summary of concepts introduced in weeks 1-4 8 / 12


Iteration with Filtering

Filtering makes a decision at each repeated step whether to process an item or not
The filtering condition can compare the item values with a constant

Summary of concepts introduced in weeks 1-4 8 / 12


Iteration with Filtering

Filtering makes a decision at each repeated step whether to process an item or not
The filtering condition can compare the item values with a constant
⇒The filtering condition does not change after each iteration step (is constant)

Summary of concepts introduced in weeks 1-4 8 / 12


Iteration with Filtering

Filtering makes a decision at each repeated step whether to process an item or not
The filtering condition can compare the item values with a constant
⇒The filtering condition does not change after each iteration step (is constant)
Example: Count, Sum

Summary of concepts introduced in weeks 1-4 8 / 12


Iteration with Filtering

Filtering makes a decision at each repeated step whether to process an item or not
The filtering condition can compare the item values with a constant
⇒The filtering condition does not change after each iteration step (is constant)
Example: Count, Sum
Or, it could compare item values with a variable

Summary of concepts introduced in weeks 1-4 8 / 12


Iteration with Filtering

Filtering makes a decision at each repeated step whether to process an item or not
The filtering condition can compare the item values with a constant
⇒The filtering condition does not change after each iteration step (is constant)
Example: Count, Sum
Or, it could compare item values with a variable
⇒The filtering condition changes after an iteration step

Summary of concepts introduced in weeks 1-4 8 / 12


Iteration with Filtering

Filtering makes a decision at each repeated step whether to process an item or not
The filtering condition can compare the item values with a constant
⇒The filtering condition does not change after each iteration step (is constant)
Example: Count, Sum
Or, it could compare item values with a variable
⇒The filtering condition changes after an iteration step
Example: max

Summary of concepts introduced in weeks 1-4 8 / 12


Procedures and parameters

Sometimes we have to write the same piece of code again and again with small differences

Summary of concepts introduced in weeks 1-4 9 / 12


Procedures and parameters

Sometimes we have to write the same piece of code again and again with small differences
A piece of pseudocode can be converted into a procedure by separating it out from the
rest of the code

Summary of concepts introduced in weeks 1-4 9 / 12


Procedures and parameters

Sometimes we have to write the same piece of code again and again with small differences
A piece of pseudocode can be converted into a procedure by separating it out from the
rest of the code
Some variables (or constants) used in this piece of code can be replaced by a parameter
variable

Summary of concepts introduced in weeks 1-4 9 / 12


Procedures and parameters

Sometimes we have to write the same piece of code again and again with small differences
A piece of pseudocode can be converted into a procedure by separating it out from the
rest of the code
Some variables (or constants) used in this piece of code can be replaced by a parameter
variable
Instead of writing the code again with a small difference, we now just have to make a call
to the procedure with a different parameter value

Summary of concepts introduced in weeks 1-4 9 / 12


Procedures and parameters

Sometimes we have to write the same piece of code again and again with small differences
A piece of pseudocode can be converted into a procedure by separating it out from the
rest of the code
Some variables (or constants) used in this piece of code can be replaced by a parameter
variable
Instead of writing the code again with a small difference, we now just have to make a call
to the procedure with a different parameter value
e.g. finding max for each subject

Summary of concepts introduced in weeks 1-4 9 / 12


Accumulation through Iteration

The most common use of an iterator is to create an aggregate value (accumulation)


from the available values
Simple examples of this are count, sum, average
We could also apply filtering while doing accumulation - e.g. sum of boys marks
We could also collect a list of elements - e.g. list of students with max marks in a subject

Summary of concepts introduced in weeks 1-4 10 / 12


Doing two iterations - one after another

Use the first iteration to do some accumulation


The variables in which these accumulations are done can be called accumulators

Summary of concepts introduced in weeks 1-4 11 / 12


Doing two iterations - one after another

Use the first iteration to do some accumulation


The variables in which these accumulations are done can be called accumulators
Second iteration can do filtering using the accumulator variables
e.g. find above average students - average is an accumulator from the first iteration

Summary of concepts introduced in weeks 1-4 11 / 12


Doing two iterations - one after another

Use the first iteration to do some accumulation


The variables in which these accumulations are done can be called accumulators
Second iteration can do filtering using the accumulator variables
e.g. find above average students - average is an accumulator from the first iteration
This establishes a relationship between any element and the aggregate of all elements
e.g. find out the more frequently occuring word, higher spending customers, etc

Summary of concepts introduced in weeks 1-4 11 / 12


Doing two iterations - one nested within another

If we need to go beyond the relationship between an element and the aggregate of all
elements

Summary of concepts introduced in weeks 1-4 12 / 12


Doing two iterations - one nested within another

If we need to go beyond the relationship between an element and the aggregate of all
elements
... to expressing a relationship between any two elements

Summary of concepts introduced in weeks 1-4 12 / 12


Doing two iterations - one nested within another

If we need to go beyond the relationship between an element and the aggregate of all
elements
... to expressing a relationship between any two elements
We will need to do one iteration within another

Summary of concepts introduced in weeks 1-4 12 / 12


Doing two iterations - one nested within another

If we need to go beyond the relationship between an element and the aggregate of all
elements
... to expressing a relationship between any two elements
We will need to do one iteration within another
e.g. find out if two students have the same birth day and month

Summary of concepts introduced in weeks 1-4 12 / 12


Doing two iterations - one nested within another

If we need to go beyond the relationship between an element and the aggregate of all
elements
... to expressing a relationship between any two elements
We will need to do one iteration within another
e.g. find out if two students have the same birth day and month
Nested iterations are costly in terms of number of computations required

Summary of concepts introduced in weeks 1-4 12 / 12


Doing two iterations - one nested within another

If we need to go beyond the relationship between an element and the aggregate of all
elements
... to expressing a relationship between any two elements
We will need to do one iteration within another
e.g. find out if two students have the same birth day and month
Nested iterations are costly in terms of number of computations required
We could reduce the number of comparisons by using binning wherever possible

Summary of concepts introduced in weeks 1-4 12 / 12


Doing two iterations - one nested within another

If we need to go beyond the relationship between an element and the aggregate of all
elements
... to expressing a relationship between any two elements
We will need to do one iteration within another
e.g. find out if two students have the same birth day and month
Nested iterations are costly in terms of number of computations required
We could reduce the number of comparisons by using binning wherever possible
How do we store such relationships?

Summary of concepts introduced in weeks 1-4 12 / 12


Doing two iterations - one nested within another

If we need to go beyond the relationship between an element and the aggregate of all
elements
... to expressing a relationship between any two elements
We will need to do one iteration within another
e.g. find out if two students have the same birth day and month
Nested iterations are costly in terms of number of computations required
We could reduce the number of comparisons by using binning wherever possible
How do we store such relationships?
To be discussed in the next 4 weeks

Summary of concepts introduced in weeks 1-4 12 / 12

You might also like