プリンキピア

第3章データ構造とアルゴリズム

GLOBAL ISSUES IN TECHNOLOGY技術をめぐる世界の課題
Contact Tracing接触者追跡
Epidemiology is the study of how infectious diseases spread across the world. Within epidemiology, contact tracing attempts to identify confirmed cases of disease and limit its spread by tracing contacted people and isolating them from further spreading the disease.
英語のヒント
疫学は、感染症が世界にどのように広がるかを研究する学問である。疫学の中でも接触者追跡では、感染が確認された例を特定し、その人と接触した人々を追跡して隔離し、さらに感染を広げないようにすることで、感染の拡大を抑えようとする。
Graph data structures can help epidemiologists manage the data and people involved in contact tracing. Imagine a graph where each vertex in a tracing graph represents a person, and each edge between two people represents a possible contact. When a person receives a positive test result for contracting the disease, healthcare professionals can identify all the people that they’ve been in contact with by tracing through the graph.
英語のヒント
グラフのデータ構造は、接触者追跡に関わるデータや人々を疫学者が管理するのに役立つ。追跡用グラフの各頂点が人を、2人を結ぶ各辺が接触の可能性を表すグラフを想像してみよう。ある人が、その病気に感染したかを調べる検査で陽性となったとき、医療従事者はグラフをたどり、その人が接触したすべての人々を特定できる。
In addition to improving public health through contact tracing, our imaginary graph can also represent a history of the spread of the disease for epidemiologists to understand how the disease moves through communities. For example, if each vertex includes identity characteristic data such as age, race, or gender, epidemiologists can study which groups of people are most affected by the disease. This can then inform the distribution of vaccines to assist the most impacted groups first.
英語のヒント
この架空のグラフは、接触者追跡によって公衆衛生を改善するだけでなく、感染拡大の履歴も表し、疫学者が地域社会での病気の広がり方を理解するのにも役立つ。たとえば各頂点に、年齢、人種、ジェンダーなどの個人の属性データが含まれていれば、どの集団が最も大きな影響を受けるかを調べられる。これをワクチンの配分に生かし、最も影響を受けた集団から支援できる。
Complex Data複雑なデータ
Now that we have seen several data structure implementations for abstract data, let us consider how these data structures are used in practice. Recall that we compared calculators whose algorithms operated on numbers with the idea of a computer whose algorithms operated on complex data. Data structures can be used to represent complex data by modeling hierarchy and relationships.
英語のヒント
抽象的なデータを実装するデータ構造をいくつか見たので、これらが実際にどう使われるかを考えよう。数を扱うアルゴリズムを持つ計算機と、複雑なデータを扱うアルゴリズムを持つコンピューターという考え方を、比較したことを思い出してほしい。データ構造は、階層や関係をモデル化することで、複雑なデータを表せる。
We might represent an online retail store as a map associating each item with details such as an image, a brief description, price, and the number of items in stock. This map makes some online storefront features easier to implement than others. Given an item, this map makes it easy to retrieve the details associated with that item. On the other hand, it is not so easy to sort items by price, sort items by popularity, or search for an item by keywords in its description. All these features could be implemented with additional data structures. We can combine multiple data structures together to implement these features. In computer science, we use database systems (see Chapter 8 Data Management) that work behind the scenes in many applications to manage these data structures and facilitate long-term storage and access to large amounts of data.
英語のヒント
オンライン小売店は、各商品を、画像、短い説明、価格、在庫数などの詳細情報に対応させるマップとして表せるかもしれない。このマップを使うと、オンライン店舗の機能には、実装しやすいものと、そうでないものが生じる。商品が与えられたとき、その商品に対応する詳細情報を取り出すのは簡単である。一方、価格順や人気順に商品を並べたり、説明文のキーワードで商品を検索したりするのは、それほど簡単ではない。これらの機能はすべて、データ構造を追加すれば実装できる。複数のデータ構造を組み合わせて実現するのである。コンピューターサイエンスでは、データベースシステム(第8章「データ管理」参照)を利用する。これは多くのアプリケーションの裏側で動作し、これらのデータ構造を管理して、大量のデータの長期保存やアクセスを容易にする。
Just as calculators have algorithms for calculating numbers, computers have algorithms for computing complex data. Data structures represent these complex data, and algorithms act on these data structures.
英語のヒント
計算機が数を計算するアルゴリズムを持つのと同様に、コンピューターは複雑なデータを計算処理するアルゴリズムを持つ。データ構造はその複雑なデータを表し、アルゴリズムはそれらのデータ構造に作用する。