1 of 16

Scientific Writing

Chapter 9: Mathematics

Writing for Computer Science

Introduction

Computer Science

Information Systems

1

2 of 16

Prepared by:

  • Zahra __ Mohammad Alam
  • Khatima __ Gholam Hasan

Writing for Computer Science

Introduction

Computer Science

Information Systems

2

3 of 16

Main topics

  • Introduction
  • Clarity
  • Readability
  • Notation
  • Alphabets
  • Line Breaks
  • Numbers
  • Percentages
  • Unit of Measurement

Writing for Computer Science

Introduction

Computer Science

Information Systems

3

4 of 16

Introduction

  • Reading mathematics can be unpleasant if presented badly, and pointless if the mathematics does not make sense. Mathematical notation can be used to describe algorithms, data structures, automat, or just about any of the objects that computer scientists study. The discipline of describing work in a mathematical form can expose inconsistencies and gaps, and provides a basis for making formal statements.

Writing for Computer Science

Introduction

Computer Science

Information Systems

4

5 of 16

Clarity

  • In mathematical writing it is essential to be precise. For example, an ambiguous statement of a theorem can make its proof incomprehensible.
  • Many terms have well-defined mathematical meanings and are confusing if used in another way:
    • Normal, usual, typical. The word “normal” has several mathematical meanings; it is often best to use, say, “usual” or “typical” if a non-mathematical meaning is intended.
    • Definite, strict, proper, all, some. Avoid “definite”, “strict”, and “proper” in their non-mathematical meanings, and be careful with “all” and “some”.

Writing for Computer Science

Introduction

Computer Science

Information Systems

5

6 of 16

Clarity (continued)

  • Equivalent, similar. Two things are “equivalent” if they are indistinguishable with regard to some criteria. If they are not indistinguishable, they are at best “similar”.
  • Subset, proper subset, strict subset. “Subset” should not be used to mean sub problem. Orderings (or partial orderings) specified in writing are assumed to be non-strict. For example, “A is a subset of B” means that A B; confusingly, this is sometimes written A B. To specify A  ⊊ B use “A is a proper (or strict) subset of B”.
  • Similar rules apply to “less than”, “greater than”, and “monotonic”.
  • Metric, Measure. "Metric" is sometimes used informally to mean measure, but both have specific meanings in mathematics. When used in a formal context a metric is expected to satisfy conditions such as the triangle inequality. "Measure" also has a formal meaning, but it is usually the less confusing of the two words.

Writing for Computer Science

Introduction

Computer Science

Information Systems

6

7 of 16

Readability

  • Be careful with choice of letters for subscripts: in some small fonts, the letters i, j, and l are not easy to distinguish. Some mathematics should be rewritten to remove or reduce the use of subscripts.
    • Examples:
      • Not Ok: (p • (in=0 Ai))
      • Ok: p • (in=0 Ai)
      • Not Ok: p q1 ∧···∧ qn is a conditional dependency.
      • Ok:The dependency p q1 ∧···∧ qn is conditional.
      • Not Ok: 7 of the runs were successful, but 46 failed.
      • Not Ok: Seven of the runs were successful, but 46 failed.
      • Ok: There were 7 successful runs and 46 failures.

Writing for Computer Science

Introduction

Computer Science

Information Systems

7

8 of 16

Readability

  • Mathematics should not take the place of text, readers quickly get lost if they need to decipher a stream of complex expressions.
    • Example: Let S be a vector space defined by;

S= αi xi | αi F

i=1 (we now show that S is closed under addition)

Writing for Computer Science

Introduction

Computer Science

Information Systems

8

9 of 16

Notation

  • There is plenty of scope for confusion in mathematics, so it is important to ensure that the symbols you use are clearly understood and familiar to the reader.
  • For example, gcd(x, y) = max{z |∃u,v: x = uz ≢ y = vz}. Here, the largest integer is a divisor (or factor) of both x and y. Adhere to conventions such as using i and j for integer subscripts and calligraphic letters for classes. Use each operator for one purpose only; compilers may understand overloading, but people do not. Don't use aˆ,a˜,a¯,and a together.

Writing for Computer Science

Introduction

Computer Science

Information Systems

9

10 of 16

Alphabets

  • Some mathematical symbols and characters from other alphabets have a superficial resemblance to more familiar symbols that can cause confusion. For example, reading "sets are denoted by alpha(α)" might result in the thought sets being denoted as an alpha-like squiggly while reading "set are denoted by zeta(ζ)" might produce a squiggle-that-looks-like-a-deformed-s.

Writing for Computer Science

Introduction

Computer Science

Information Systems

10

11 of 16

Line Breaks

  • Avoid letting a number, symbol, or

abbreviation appear at the start of the line,

particularly if it is the end of a sentence.

Table 9.1 Symbols that can be confused with each

other.

Symbol

Confused with

ε epsilon

E

ε epsilon

∈ (element of)

η eta

N

ι iota

I

μ mu

U

ρ rho

P

τ tau

T

υ upsilon

v

ν nu

v

ω omega

w

∨ or

V

∪ union

U

∝ proportional

α alpha

# top (of lattice)

T

∅ empty set

0 zero

multiplication

X

×

Writing for Computer Science

Introduction

Computer Science

Information Systems

11

12 of 16

Line Breaks

  • Line breaks example:
    • Not Ok: We therefore have to make use of a further class variable, denoted by x. It allows …
    • Ok: We therefore have to make use of a further class variable, denoted by x. It allows …
  • A line that begins with a variable can look clumsy even if the variable is not at the end of a phrase.

Writing for Computer Science

Introduction

Computer Science

Information Systems

12

13 of 16

Numbers

  • Large numbers should be written in digits, such as 1,401 or 23, and small numbers or round numbers in words such as "one" rather than 1, and "a hundred" or "one hundred" instead of 100. In technical writing, digits are generally preferred when quantities are being reported, and when numbers are being compared.
    • Not Ok:The increase was over five per cent.
    • Ok:The increase was over 5 per cent
    • Not Ok: The method requires 2 passes.
    • Ok:The method requires two passes.
    • Not Ok:About 1/3 of the data was noise.
    • Ok:About one-third of the data was noise.

Writing for Computer Science

Introduction

Computer Science

Information Systems

13

14 of 16

Percentage

  • Percentages use with caution.
    • Not Ok: The error rate grew by 4 %.
  • This example is ambiguous because an error rate is presumably a percentage. It is better to be explicit, and to avoid mixing kinds of percentages.
    • Not Ok: The error rate grew by 4%, from 52% to 54 %.
    • Ok: The error rate grew by 2%, from 52% to 54 %.
  • When stating a percentage, ensure that the reader knows what is a percentage of what .
    • Not Ok: he likelihood of failure is 2:1.
    • Ok: The likelihood of failure is one in three

Writing for Computer Science

Introduction

Computer Science

Information Systems

14

15 of 16

Units of measurement

  • Two quantities are commonly measured in computer science: space and time.
    • For time, the basic units are the second (s), minute (min) and hour (h).
    • For space, the basic units are bit and byte
  • For quantities greater than 1, the unit is plural. For smaller quantities, the convention is that the unit is singular, but in computer science this convention is often not observed

Writing for Computer Science

Introduction

Computer Science

Information Systems

15

16 of 16

Units of Measurement

Writing for Computer Science

Introduction

Computer Science

Information Systems

16