プリンキピア

第1章コンピューターサイエンス入門

1.1 Computer Science1.1 コンピューターサイエンス

Learning Objectives学習目標
By the end of this section, you will be able to:
この節を学び終えると、次のことができるようになる。
• Discuss the history that led to the creation of computer science as a field
• コンピューターサイエンスという分野の成立に至る歴史を論じる。
• Define computer science
• コンピューターサイエンスを定義する。
• Assess what computer science can do, as well as what it should not do
英語のヒント
• コンピューターサイエンスに何ができるか、また何をすべきではないかを評価する。
The field of computer science (CS) is the study of computing, which includes all phenomena related to computers, such as the Internet. With foundations in engineering and mathematics, computer science focuses on studying algorithms. An algorithm is a sequence of precise instructions that enables computing. This includes components computers use to process information. By studying and applying algorithms, computer science creates applications and solutions that impact all areas of society. For example, computer science developed the programs that enable online shopping, texting with friends, streaming music, and other technological processes.
英語のヒント
コンピューターサイエンス(CS)はコンピューティングを研究する分野であり、そこにはインターネットなど、コンピューターに関わるあらゆる現象が含まれる。工学と数学を基盤とし、アルゴリズムの研究に重点を置く。アルゴリズムとは、計算を可能にする正確な指示の並びである。これには、コンピューターが情報処理に用いる構成要素も含まれる。アルゴリズムを研究し、応用することで、コンピューターサイエンスは社会のあらゆる領域に影響するアプリケーションや解決策を生み出す。例えば、オンラインショッピング、友人とのメッセージ交換、音楽のストリーミングなどの技術的な処理を可能にするプログラムも、この分野から生まれた。
While computers are common today, they weren’t always this pervasive. For those whose lives have been shaped by computer technology, it can sometimes seem like computer technology is ahistorical: computing often focuses on rapid innovation and improvement, wasting no time looking back and reflecting on the past. Yet the foundations of computer science defined over 50, and as much as 100, years ago very much shape what is possible with computing today.
英語のヒント
今日、コンピューターは身近にあるが、以前からこれほど広く普及していたわけではない。コンピューター技術によって生活を形づくられてきた人には、この技術には歴史がないかのように感じられることもある。コンピューティングでは、急速な革新と改善に目が向けられ、過去を振り返って考えることには時間が割かれない場合が多いからである。それでも、50年以上前、長いものでは100年も前に定められたコンピューターサイエンスの基礎が、現在のコンピューティングで何が可能かを強く左右している。

The Early History of Computingコンピューティングの初期の歴史

The first computing devices were not at all like the computers we know today. They were physical calculation devices such as the abacus, which first appeared in many societies across the world thousands of years ago. They allowed people to tally, count, or add numbers (Figure 1.2). Today, abaci are still used in some situations, such as helping small children learn basic arithmetic, keeping score in games, and as a calculating tool for people with visual impairments. However, abaci are not common today because of the invention of number systems such as the Arabic number system (0, 1, 2, 3, . . .), which included zero and place values that cannot be computed with abaci. The concept of an algorithm was also invented around this time. Algorithms use inputs and a finite number of steps to carry out arithmetic operations like addition, subtraction, multiplication, and division, and produce outputs used in computing. Today’s computers still rely on the same foundations of numbers, calculations, and algorithms, except at the scale of billions of numbers and billions of calculations per second.
英語のヒント
最初の計算装置は、現在のコンピューターとはまったく異なるものだった。何千年も前に世界の多くの社会で登場したそろばんのように、物理的な仕組みを使う計算器具であった。人々はこれらを使って、数を集計したり、数えたり、足したりすることができた(図1.2)。今日でも、幼い子どもが基礎的な算数を学ぶ手助け、ゲームの得点の記録、視覚障害のある人の計算用具など、そろばんが使われる場面はある。しかし、アラビア式の数の体系(0、1、2、3、…)のように、そろばんでは計算できないゼロと位取りを含む数の体系が発明されたため、現在ではそろばんは一般的ではない。アルゴリズムの概念もこの頃に生まれた。アルゴリズムは入力と有限個の手順を用いて、加算、減算、乗算、除算などの算術演算を行い、コンピューティングで使う出力を生成する。現在のコンピューターも、数、計算、アルゴリズムという同じ基礎に依拠している。ただし、扱う規模は何十億もの数、そして毎秒何十億回もの計算に達する。
To introduce a concrete example of an algorithm, let us consider binary search algorithm, which is used to locate a number in a sorted array of integers efficiently. The algorithm operates by repeatedly dividing the search interval in half to perform the search. If the number being searched is less than the integer in the middle of the interval, the interval is narrowed to the lower half. In the alternative, the interval is narrowed to the upper half. The algorithm repeatedly checks until the number is found or the interval is empty.
英語のヒント
アルゴリズムの具体例として、整数を並べ替え済みの配列から、ある数を効率よく見つける二分探索アルゴリズムを考えよう。このアルゴリズムは、探索範囲を繰り返し半分に分割して探索する。探している数が探索範囲の中央の整数より小さければ、範囲を小さい側の半分に絞る。それ以外の場合は、大きい側の半分に絞る。目的の数が見つかるか、探索範囲が空になるまで、この確認を繰り返す。
Algorithms may sound complicated, but they can be quite simple. For example, recipes to prepare food are algorithms with precise directions for ingredient amounts, the process to combine these, and the temperatures and cooking methods needed to transform the combined ingredients into a specific dish. The dish is the output produced by following the algorithm of a recipe.
英語のヒント
アルゴリズムと聞くと複雑に感じるかもしれないが、とても単純なものもある。例えば料理のレシピは、材料の分量、材料を混ぜ合わせる手順、そして混ぜた材料を特定の料理へと変えるための温度や調理法を正確に指示するアルゴリズムである。そのレシピのアルゴリズムに従うことで生まれる出力が、料理である。
Figure 1.2

credit: “Traditional Chinese abacus illustrating the suspended bead use” by Jccsvq/Wikimedia Commons, CC0 · CC0 · Source出典

Figure 1.2 An abacus is one of the first calculators. (credit: “Traditional Chinese abacus illustrating the suspended bead use” by Jccsvq/Wikimedia Commons, CC0)
図1.2 そろばんは最初期の計算器具の一つである。(出典:Jccsvq/Wikimedia Commons「Traditional Chinese abacus illustrating the suspended bead use」、CC0)
The next major development in the evolution of computing occurred in 1614 when John Napier, a Scottish mathematician, developed logarithms, which express exponents by denoting the power that a number must be raised to obtain another value. Logarithms provided a shortcut for making tedious calculations and became the foundation for multiple analog calculating machines invented during the 1600s.
英語のヒント
計算技術の発展における次の大きな進歩は1614年に起きた。スコットランドの数学者ジョン・ネイピアが対数を考案したのである。対数は、ある数から別の値を得るために何乗すればよいかを示すことで、指数を表す。対数は、手間のかかる計算を簡略化する手段となり、1600年代に発明された複数のアナログ計算機の基礎となった。
Scientists continued to explore different ways to speed up or automate calculations. In the 1820s, English mathematician Charles Babbage invented the Difference Engine with the goal of preventing human errors in manual calculations. The Difference Engine provided a means to automate the calculations of polynomial functions and astronomical calculations.
英語のヒント
科学者たちは、計算を速くしたり自動化したりする方法を引き続き探究した。1820年代、イギリスの数学者チャールズ・バベッジは、手計算で生じる人為的な誤りを防ぐために、階差機関を発明した。階差機関は、多項式関数の計算や天文学の計算を自動化する手段となった。
Babbage followed the Difference Engine with his invention of the Analytical Engine. With assistance from Ada Lovelace, the Analytical Engine was program-controlled and included features like an integrated memory and an arithmetic logic unit. Lovelace used punched cards to create sequencing instructions that could be read by the Analytical Engine to automatically perform any calculation included in the programming code. With her work on the Analytical Engine, Lovelace became the world’s first computer programmer.
英語のヒント
バベッジは階差機関に続いて、解析機関を発明した。エイダ・ラブレスの協力を得た解析機関は、プログラムで制御され、内部に組み込まれた記憶装置や算術論理演算装置といった機能を備えていた。ラブレスはパンチカードを用いて、プログラムコードに含まれるあらゆる計算を自動で行うための、一連の指示を作った。解析機関はこの指示を読み取ることができた。解析機関での仕事によって、ラブレスは世界初のコンピュータープログラマーとなった。
The next major development in computing occurred in the late 1800s when Herman Hollerith, an employee of the U.S. Census Office, developed a machine that could punch cards and count them. In 1890, Hollerith’s invention was used to tabulate and prepare statistics for the U.S. census.
英語のヒント
次の大きな進歩は1800年代後半に起きた。アメリカ合衆国国勢調査局の職員ハーマン・ホレリスが、カードに穴をあけ、それを数える機械を開発したのである。1890年には、ホレリスの発明がアメリカの国勢調査の集計と統計作成に使われた。
By the end of the 1800s and leading into the early 1900s, calculators, adding machines, typewriters, and related machines became more commonplace, setting the stage for the invention of the computer. In the 1940s, multiple computers became available, including IBM’s Harvard Mark 1. These were the forerunners to the advent of the digital computer in the 1950s, which changed everything and evolved into the computers and related technology we have today.
英語のヒント
1800年代末から1900年代初頭にかけて、計算器、加算機、タイプライターなどの機械が以前より広く使われるようになり、コンピューターの発明への土台が整った。1940年代には、IBMのHarvard Mark 1を含む複数のコンピューターが登場した。これらは、1950年代に姿を現すデジタルコンピューターの先駆けとなった。デジタルコンピューターはあらゆるものを変え、現在のコンピューターや関連技術へと発展した。
Around this time, computer science emerged as an academic discipline rooted in the principles of mathematics, situated primarily in elite institutions, and funded by demand from the military for use in missile guidance systems, airplanes, and other military applications. As computers could execute programs faster than humans, computer science replaced human-powered calculation with computer-powered problem-solving methods. In this way, the earliest academic computer scientists envisioned computer science as a discipline that was far more intellectual and cognitive compared to the manual calculation work that preceded it.
英語のヒント
この頃、コンピューターサイエンスは数学の原理に根ざした学問分野として登場した。主な拠点は一流の研究教育機関で、ミサイル誘導システム、航空機などの軍事用途に対する軍の需要を背景に資金が供給された。コンピューターは人間より速くプログラムを実行できるため、この分野は人間による計算を、コンピューターによる問題解決の方法へと置き換えた。こうして最初期の研究者たちは、コンピューターサイエンスを、それ以前の手計算の仕事に比べて、はるかに知的・認知的な学問分野として構想した。
Richard Bellman was a significant contributor to this effort. A mathematics professor at Princeton and later at Stanford in the 1940s, Bellman later went to work for the Rand Corporation, where he studied the theory of multistage decision processes. In 1953, Bellman invented dynamic programming,1 which is a mathematical optimization methodology and a technique for computer programming. With dynamic programming, complex problems are divided into more manageable subproblems. Each subproblem is solved, and the results are stored, ultimately resulting in a solution to the overall complex problem.2 With this approach, Bellman helped revolutionize computer programming and enable computer science to become a robust field.
英語のヒント
リチャード・ベルマンは、この取り組みに大きく貢献した人物である。1940年代にプリンストン大学、その後スタンフォード大学で数学の教授を務めたベルマンは、のちにランド研究所に移り、多段階の意思決定過程の理論を研究した。1953年、ベルマンは数学的な最適化の方法論であり、コンピュータープログラミングの技法でもある動的計画法を考案した。1 動的計画法では、複雑な問題を、より扱いやすい部分問題に分割する。それぞれの部分問題を解いて結果を保存し、最終的には複雑な問題全体の解を得る。2 この手法を通じ、ベルマンはコンピュータープログラミングの変革と、コンピューターサイエンスが確かな基盤を持つ分野へ成長することに貢献した。