Skip to main content

Preliminaries

  • Chapter
  • First Online:
First Course in Algorithms Through Puzzles

Abstract

In this chapter, we learn about (1) machine models, (2) how to measure the efficiency of algorithms, (3) data structures, (4) notations for the analysis of algorithms, (5) functions, and (6) graph theory. All of these are very basic, and we cannot omit any of them when learning about designing/analyzing algorithms. However, “basic” does not necessarily mean “easy” or “trivial.” If you are unable to understand the principle when you read the text for the first time, you do not need to be overly worried. You can revise it again when you learn concrete algorithms later. Some notions may require some concrete examples to ensure proper understanding. The contents of this section are basic tools for understanding algorithms. Although we need to know which tools we have available, we do not have to grasp all the detailed functions of these tools at first. It is not too late to only grasp the principles and usefulness of the tools when you use them.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 49.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Natural number:

    Our natural numbers start from 0, not 1, in the area of information science. “Nonnegative integers” start from 1.

  2. 2.

    Alan Mathison Turing (1912–1954):

    Turing was a British mathematician and computer scientist. The 1930s were the times before real computers, and he was the genius who developed the notion of a “computation model” that holds good even in our day. He was involved with the birth of computer, took an important part in breaking German codes during World War II, and died when he was only 42 years old from poisoning by cyanic acid. He was a dramatic celebrity in various ways.

  3. 3.

    Theory of computation:

    The theory of computation is a science that investigates “computation” itself. When you define a set of basic operations, the set of “computable” functions are determined by the operations. Then the set of “uncomputable” functions is well defined. Diagonalization is a basic proof tool in this area, and it is strongly related to Gödel’s Incompleteness Theorem.

  4. 4.

    Compiler:

    We usually “compile” a computer program, written in a text file, into an executable binary file on a computer. The compiler program reads the computer program in a text file, and exchanges it into the binary file that is written in a sequence of operations readable by the computer system. That is, when we write a program, the program itself is usually different from the real program that runs on your system.

  5. 5.

    How to write an array:

    In this book, an array name is denoted with []. That is, if a variable name is denoted with [], this is an array.

  6. 6.

    Subroutine and Function:

    In current programming languages, it is popular that “everything is function.” In these languages, we only call functions, and a subroutine is considered as a special function that returns nothing.

  7. 7.

    Index of an array:

    For humans, it is easy to see that the index has the values 1 to n. However, as with this mapping, it is sometimes reasonable to use the values 0 to \(n-1\). In this book, we will use both on a case-by-case basis.

  8. 8.

    FIFO:

    The property determining that the first data will be processed first is known as FIFO, which stands for First In, First Out. We also show the other notion of a “stack,” which is the opposite of a queue, and is known as LIFO or FILO. These stand for Last In, First Out and First In, Last Out.

  9. 9.

    Trivial lower bound:

    To make sure, the assumption that “all data should be read to solve a problem” is quite a natural assumption for most problems. This lower bound is sometimes referred to as a trivial lower bound .

  10. 10.

    Harmonic number:

    In the wide sense, the harmonic number is defined by the summation of the inverse of the sequence of numbers with a common difference (or the denominators are a sequence of numbers with a common difference), in the narrow sense, the simplest sequence \(\sum _{i=1}^{\infty }\frac{1}{i}\) is used to define the harmonic number.

  11. 11.

    Mike Paterson and Uri Zwick, “Overhang,” Proceedings of the 17th annual ACM-SIAM symposium on Discrete algorithm, pp. 231–240, ACM, 2006.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ryuhei Uehara .

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Singapore Pte Ltd.

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Uehara, R. (2019). Preliminaries. In: First Course in Algorithms Through Puzzles. Springer, Singapore. https://doi.org/10.1007/978-981-13-3188-6_1

Download citation

  • DOI: https://doi.org/10.1007/978-981-13-3188-6_1

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-13-3187-9

  • Online ISBN: 978-981-13-3188-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics