プリンキピア

第2章計算論的思考と設計の再利用性

Computational Thinking Techniques計算論的思考の技法
In today’s technology world, mastering computational thinking techniques is important. These techniques offer a systematic way to solve problems using tools like data structures, which are like containers used to organize and store data efficiently in a computer. They define how data is logically arranged and manipulated, making it easier to access and work with information in algorithms and programs. There are four key techniques (cornerstones) to computational thinking, as illustrated in Figure 2.4:
英語のヒント
今日の技術社会では、計算論的思考の技法を身につけることが重要である。これらの技法は、データ構造などの道具を使って体系的に問題を解く方法を提供する。データ構造は、コンピューター内でデータを効率よく整理・保存する容器のようなものである。データを論理的にどう配置し操作するかを定め、アルゴリズムやプログラムから情報へアクセスし、扱うことを容易にする。図2.4に示すように、計算論的思考には四つの主要な技法、すなわち基礎となる柱がある。
• Decomposition is a fundamental concept in computational thinking, representing the process of systematically breaking down a complex problem or system into smaller, more manageable parts or subproblems. By breaking down complexity into simpler elements, decomposition promotes a more organized approach to problem-solving.
英語のヒント
• 分解は計算論的思考の基本概念であり、複雑な問題やシステムを、より小さく扱いやすい部分や部分問題へ体系的に分ける過程を指す。複雑さをより単純な要素に分けることで、問題解決にいっそう整理された形で取り組めるようになる。
• Logical thinking and pattern recognition is a computational thinking technique that involves the process of identifying similarities among and within problems. This computational thinking technique emphasizes the ability to recognize recurring structures, relationships, or sequences in various problem-solving situations.
英語のヒント
• 論理的思考とパターン認識は、問題同士の間や一つの問題の内部にある類似点を見つける過程を含む、計算論的思考の技法である。さまざまな問題解決の場面で、繰り返し現れる構造、関係、並びを見いだす能力を重視する。
• Abstraction is a computational thinking technique that centers on focusing on important information while ignoring irrelevant details. This technique enables a clearer understanding of the core issues.
英語のヒント
• 抽象化は、無関係な細部を無視しながら、重要な情報に注目することを中心とした、計算論的思考の技法である。これにより、問題の核心をより明確に理解できる。
• Algorithms are like detailed sets of instructions for solving a problem step-by-step. They help break down complex tasks into manageable actions, ensuring a clear path to problem-solving.
• アルゴリズムは、問題を一段階ずつ解決するための詳細な指示の集まりのようなものである。複雑な作業を扱いやすい動作に分け、問題解決への明確な道筋を確保する。
Figure 2.4

attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license · CC BY 4.0 · Source出典

Figure 2.4 Users can explore the essence of computational thinking through decomposition, logical thinking, abstraction, and algorithms. (attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license)
英語のヒント
図2.4 分解、論理的思考、抽象化、アルゴリズムを通じて、計算論的思考の本質を探ることができる。(出典:著作権Rice University、OpenStax。CC BY 4.0ライセンス)
In addition to the four techniques, computational thinking involves essential steps such as testing and debugging. Testing is crucial for uncovering errors within the step-by-step instructions or algorithms employed to tackle a problem. On the other hand, debugging entails identifying and rectifying issues within the code.
英語のヒント
計算論的思考には、四つの技法に加えて、テストやデバッグといった重要な手順も含まれる。テストは、問題に取り組むために用いられる段階的な指示やアルゴリズムに潜む誤りを見つけ出すうえで欠かせない。それに対してデバッグでは、コード内の問題を特定し、修正する。
A programmer is someone who writes instructions for a computer to follow. A typical example is that of a programmer who gives instructions to a robot and tells it to make a jam sandwich. In this case, applying computational techniques to give instructions to the robot entails the following techniques: decomposition, logical thinking and pattern recognition, abstraction, and algorithms. These techniques are explained in the following subsections as they apply to the jam sandwich example.
英語のヒント
プログラマーとは、コンピューターが従う指示を書く人のことである。典型的な例は、ロボットに指示を与え、ジャムサンドイッチを作るよう命じるプログラマーである。この場合、計算論的な技法を使ってロボットへ指示を出すことには、分解、論理的思考とパターン認識、抽象化、アルゴリズムという技法が関わる。以下の各項では、ジャムサンドイッチの例に適用しながら、これらを説明する。
TECHNOLOGY IN EVERYDAY LIFE日常生活の中の技術
Traffic Accident Data交通事故のデータ
Analyzing data involves collecting and cleaning information, exploring patterns through visual and statistical methods, and forming hypotheses. Statistical analysis and visualization are used to draw conclusions, and findings are interpreted and communicated in reports or presentations to help in the process of decision-making. Analyze the patterns and trends in traffic accident data to understand the prevalence of road injuries and fatalities, and examine the progression of traffic incidents over time. To enhance road safety measures and policies, you should apply computational thinking skills to identify recurring patterns and abstract the most crucial information from the data. By extracting valuable insights, you can contribute to the development and refinement of strategies that effectively improve road safety.
英語のヒント
データ分析には、情報の収集と整備、視覚的・統計的な方法によるパターンの探索、仮説の形成が含まれる。統計分析や可視化を使って結論を導き、得られた知見を解釈して、報告書やプレゼンテーションで伝えることで、意思決定を支える。交通事故データのパターンや傾向を分析し、道路上の負傷や死亡がどの程度発生しているかを理解するとともに、交通事故が時間とともにどう推移しているかを調べなさい。道路の安全対策や政策を改善するには、計算論的思考を使い、繰り返し現れるパターンを見つけ、データから最も重要な情報を抽出する必要がある。有用な知見を取り出すことで、交通安全を効果的に高める戦略の開発や改善に貢献できる。
Decomposition分解
Decomposition involves solving a complex problem by breaking it up into smaller, more manageable tasks. Decomposition enables the consideration of various components essential for solving a seemingly complex task, allowing it to be redefined into a more manageable problem. In the case of the jam sandwich example, decomposition involves identifying all the required ingredients and the steps the robot must take to successfully create a jam sandwich.
英語のヒント
分解では、複雑な問題を、より小さく扱いやすい作業に分けて解決する。一見複雑な作業を解くために不可欠なさまざまな構成要素を検討し、より扱いやすい問題として定義し直すことができる。ジャムサンドイッチの例では、必要な材料をすべて特定し、ロボットがうまく作るために実行しなければならない手順を洗い出すことが、分解に当たる。
Logical Thinking and Pattern Recognition論理的思考とパターン認識
Pattern recognition makes it possible to group all the different features considered in decomposition into categories. In the jam sandwich example, pattern recognition leads to grouping the various things identified via decomposition into categories, in this case, ingredients, equipment, and actions. Therefore, applying decomposition and pattern recognition will lead to thinking of as many things as possible that are required to make a jam sandwich. The more things that can be thought of (i.e., ingredients, equipment, and actions), the clearer the instructions will be. A first attempt at decomposition and pattern recognition is summarized in Table 2.1.
英語のヒント
パターン認識によって、分解の段階で検討したさまざまな特徴を、分類してまとめられる。ジャムサンドイッチの例では、分解で見つけた多様なものを、材料、道具、動作というカテゴリーに分ける。したがって、分解とパターン認識を使うことで、ジャムサンドイッチを作るのに必要なものを、できるだけ多く考えられる。材料、道具、動作など、考え出せるものが多いほど、指示は明確になる。分解とパターン認識の最初の試みを、表2.1にまとめた。
Ingredients
材料
Equipment
道具
Actions
動作
Bread
パン
Plate
皿
Repeat x times
x回繰り返す
Jam
ジャム
Knife
ナイフ
Left hand (LH)
左手(LH)
Butter
バター
Right hand (RH)
右手(RH)
Pick up
持ち上げる
Unscrew
ねじを回して開ける
Table 2.1 Logical Thinking and Pattern Recognition Example The jam sandwich pattern recognition defines the ingredients, equipment, and actions needed for completion.
表2.1 論理的思考とパターン認識の例。ジャムサンドイッチのパターン認識では、完成までに必要な材料、道具、動作を定める。
The process of identifying patterns typically requires logical thinking such as inductive or deductive reasoning. Inductive reasoning makes it possible to go from specific examples to general principles. For example, recognizing that dividing any number by 1 results in the original number leads to the broader conclusion that holds true for any number. Similarly, understanding that the sum of two odd numbers yields an even number leads to the generalization that adding two odd numbers always results in an even number. Inductive reasoning turns an observation into a pattern, which allows making a tentative hypothesis that can be turned into a theory. Deductive reasoning is the process of drawing valid conclusions from premises given the fact that it is not possible for the premises to be true and the conclusion to be false. A traditional example illustrates how the premises “all men are mortal” and “Socrates is a man” lead to the deductively correct conclusion that “Socrates is mortal.”
英語のヒント
パターンを見つける過程では、通常、帰納的推論や演繹的推論などの論理的思考が必要となる。帰納的推論によって、具体的な例から一般的な原理へ進むことができる。たとえば、ある数を1で割ると元の数になると気づくことは、どの数にも当てはまる、より広い結論につながる。同様に、二つの奇数の和が偶数になると理解すれば、二つの奇数を足すと常に偶数になると一般化できる。帰納的推論は観察をパターンに変え、それによって、理論へと発展させられる暫定的な仮説を立てられるようにする。演繹的推論とは、前提が真で結論が偽となることはないという条件のもとで、前提から妥当な結論を導く過程である。古典的な例では、「すべての人間は死ぬ」と「ソクラテスは人間である」という前提から、「ソクラテスは死ぬ」という演繹的に正しい結論が導かれる。