コンテンツへスキップ
科目

国際バカロレア · IB Diploma · Computer Science · HL

全語彙を練習する
  • 1

    A.1・コンピュータ基礎

    1.1

    Scope and prerequisites

    English

    Supported HL focus. First assessment 2027 target; official PDF returns 403; older acquired brief is final assessment 2026. Remaining guide, assessment and practical requirements retain their recorded holds.

    Prerequisites: read the stated quantities and units, use arithmetic and the model conditions below. Each lesson develops its own method before independent transfer.

    These are original or explicitly fictional teaching examples, not actual measurements or completed assessed learner investigations.

    1.2

    Computing systems, networks and requirements

    English

    What would explain this observation?

    • A school booking system can calculate correctly and still fail if users lose access or records are disclosed. Success includes the system context.
    • Start with a prediction. State the quantities or features you would compare, then decide what evidence could distinguish two explanations.

    Build the model

    • A computer system combines hardware, software, data and people. A network enables communication using protocols. Requirements should distinguish function from constraints such as availability, security and accessibility.
    • authentication 身份验证: Checking an asserted identity; authorization 授权: Determining permitted actions.
    Computing systems, networks and requirements: original worked-case diagram

    Choose evidence that can test it

    • Separate authentication from authorization. Authentication checks identity; authorization determines permitted actions. A threat model connects a valuable asset, a possible attack and an appropriate control.
    • Use a fictitious school dataset to define users and permissions. Draw data flows, compare validation and verification, and specify tests for normal, boundary and invalid input. Do not use real credentials or student records in exercises.

    Work from known quantities

    • State the known values and their units. Choose the relation because its assumptions fit this case, then rearrange before substitution.
    • Known: a file contains 12 megabytes, where this example defines one megabyte as one million bytes. Bits = bytes×8 = 12×1,000,000×8 = 96,000,000 bits. At 8,000,000 bits per second, ideal time = size/rate = 12 s, excluding overhead.

    Example:

    A 40 million bit file transfers at 5 million bits per second. Find ideal time. Use the same sequence: known quantities → model → relation → substitution → unit and interpretation.


    Check the conclusion and its limits

    • Bandwidth is not actual end-to-end throughput. Encryption does not by itself ensure correct authorization or remove every security risk.
    • Return to the original observation. Explain what the result supports, which conditions it assumes, and one way to test a competing explanation.

    Warn:

    Encryption guarantees that every user has appropriate access permissions. This claim is false: Bandwidth is not actual end-to-end throughput. Encryption does not by itself ensure correct authorization or remove every security risk.

    Key:

    Computing systems, networks and requirements: Separate authentication from authorization. Authentication checks identity; authorization determines permitted actions. A threat model connects a valuable asset, a possible attack and an appropriate control.

    Runnable trace and boundary

    size_MB, rate_Mbps = 20, 10
    bits = size_MB * 1_000_000 * 8
    if rate_Mbps <= 0:
        raise ValueError("Rate must be positive")
    seconds = bits / (rate_Mbps * 1_000_000)
    print(seconds)
    print(0 / (rate_Mbps * 1_000_000))
    

    Expected output:

    16.0
    0.0
    

    Decimal MB means one million bytes; multiply by eight before dividing by bits per second. Zero data has zero ideal transmission duration. A nonpositive rate is rejected; actual overhead is outside this arithmetic model.

    English 日本語
    authentication/ɔːˌθentɪˈkeɪʃn/ 認証
    authorization/ˌɔːθəraɪˈzeɪʃn/ 権限付与
  • 2

    A.2・ネットワーク

    2.1

    対象範囲と前提条件

    評価対象HLの焦点。最初の評価2027の目標;公式PDFの返却は403;以前に取得された要約書は最終評価2026である。残りのガイド、評価、実務的要項は記録された保持状態のままとする。

    前提条件:指定された数量と単位を読み取り、算術を使用し、以下のモデル条件に従う。各授業は独立した転移前に独自の方法を発展させる。

    これらは元々または明示的に架空の教学例であり、実際の測定値や完了した評価対象学習者調査ではない。

    2.2

    ネットワーク: レイテンシ、スループット、および層別配送

    この観察を説明するのは何か?

    • バンド幅の高いリンクでも、小さなメッセージが遅延して到着することがある。容量と遅延は異なる特性を測る。
    • まず予測を立てる。比較したい量や特徴を明記し、2つの説明を区別できる証拠は何かを決定せよ。

    モデルを構築する

    • パケットは宛先付きのデータをネットワーク経由で運ぶ。レイヤードモデルは、アプリケーションの意味、トランスポートによる配送、ネットワーク路由といった責務を分離する。バンド幅は容量を記述し、throughputは達成されたデータレート、latencyは遅延を指す。
    • スルースルー:達成された有益なデータ転送レート;レイテンシ:通信で生じる遅延。
    ネットワーク:レイテンシ、スループットおよび層別配送:元の実例図

    モデルを検証できる証拠を選ぶ

    • 送信時間はデータサイズと転送速度に依存する。総遅延には伝搬、処理、キューイングが含まれることもある。暗号化は仮定に基づきコンテンツを保護するが、混雑を解消したり、すべてのメタデータ露出を防いだりするものではない。
    • 文書の記録されたローカルモデルを使用してメッセージのルートをトレースする。ペイロードサイズ、単位、測定時間を記録する。学校が承認したネットワークと合成メッセージを使用し、他のユーザーのトラフィックをスキャンまたは傍受してはならない。

    既知の値から始める

    • 既知の値と単位を明記する。このケースに適応する仮定を持つ関係式を選び、代入前に変形する。
    • 既知:8メガビットのファイルが2メガビット/秒のリンクを通過する。理想的な送信時間=サイズ/速度=8/2=4秒。プロトコルのオーバーヘッド、他ユーザー、レイテンシにより、実際の完了時間は遅くなる可能性がある。

    例:

    12メガビットのファイルが3メガビット/秒のリンクを通過する。理想的な送信時間を計算せよ。同じ手順を使用する:既知量 → モデル → 関係式 → 代入 → 単位と解釈。


    結論とその限界を確認する

    • メガバイトはオーバーヘッドを考慮する前でも8メガビットである。より高速なレートを持つリンクが、低レイテンシや安全なエンドポイントを保証するわけではない。
    • 元の観察に戻り、結果が何を裏付けているか、どのような条件を前提としているかを説明し、対立する説明を検証する方法を一つ示す。

    警告:

    帯域幅の大きい接続はゼロレイテンシを保証する。この主張は誤りである:メガバイトはオーバーヘッドを考慮する前でも8メガビットである。より高速なレートを持つリンクが、低レイテンシや安全なエンドポイントを保証するわけではない。

    重要:

    ネットワーク:レイテンシ、スループット、階層的配信:送信時間はデータサイズと転送速度に依存する。総遅延には伝搬、処理、キューイングが含まれることもある。暗号化は仮定に基づきコンテンツを保護するが、混雑を解消したり、すべてのメタデータ露出を防いだりするものではない。

    実行可能なトレースと境界

    size_Mb, rate_Mbps, propagation_s = 12, 3, 0.10
    for rate in [rate_Mbps, 2 * rate_Mbps]:
        transmission_s = size_Mb / rate
        print(round(transmission_s + propagation_s, 2))
    

    期待される出力:

    4.1
    2.1
    

    送信開始から最終ビット到着まで測定します。シリアル送信時間と伝播遅延は、この理想的なモデルの下で加算されます。帯域幅を増やすのは最初の項のみを変化させます;ストアアンドフォワードホップやキューイングはさらに多くの項を追加します。

    English 日本語
    throughput/ˈθruːpʊt/ スループット
    latency/ˈleɪtənsi/ レイテンシ
  • 3

    A.3・データベース

    3.1

    対象範囲と前提条件

    評価対象HLの焦点。最初の評価2027の目標;公式PDFの返却は403;以前に取得された要約書は最終評価2026である。残りのガイド、評価、実務的要項は記録された保持状態のままとする。

    前提条件:指定された数量と単位を読み取り、算術を使用し、以下のモデル条件に従う。各授業は独立した転移前に独自の方法を発展させる。

    これらは元々または明示的に架空の教学例であり、実際の測定値や完了した評価対象学習者調査ではない。

    3.2

    リレーショナルデータベース:キーとリレーションシップ

    この観察を説明するのは何か?

    • 注文ごとにユーザー住所を複製すると、住所が変更された際に矛盾するレコードが発生する可能性がある。
    • まず予測を立てる。比較したい量や特徴を明記し、2つの説明を区別できる証拠は何かを決定せよ。

    モデルを構築する

    • リレーショナルテーブルは行と属性で構成される。主鍵は行を特定し、外貨鍵は別のテーブル内の参照鍵にリンクする。正規化は意味ある関係を維持しつつ、避けられる重複と更新アノマリーを減少させることができる。
    • プライマリキー:テーブルの行を一意に識別する属性セット;フォレインキー:他のテーブル内のキーを参照する属性セット。
    リレーショナルデータベース:キーと関係:元の実例図

    モデルを検証できる証拠を選ぶ

    • ジョインは指定された条件に従って行を結合する。結果の行数は関係のカルディナリティとフィルタに依存する。外貨制約は関係ルールを強制するが、個人情報自体を自動的に暗号化するわけではない。
    • 実際の個人情報を含さない小さな合成ユーザー-注文データセットを設計する。鍵を宣言し、重複および未参照の挿入をテストした後、クエリ結果を手計算による予想表と比較する。

    既知の値から始める

    • 既知の値と単位を明記する。このケースに適応する仮定を持つ関係式を選び、代入前に変形する。
    • 既知:4人の顧客はそれぞれ 2, 0, 3, 1 の注文を持っている。顧客から注文への内側結合(inner join)は、2+0+3+1 = 6 行を返す。左結合(left join)はまた、注文のない顧客を1つのnullマッチed行として保持するため、ここでは 7 となる。

    例:

    3人の顧客が1、3、2件の注文を持っている。顧客-注文の内側ジョインは何行を返すか。同じ手順を使用する:既知量 → モデル → 関係式 → 代入 → 単位と解釈。


    結論とその限界を確認する

    • 主鍵は必ずしも人名である必要はない。ジョインは単なるテーブルの連結ではない。生文字列からSQLを構築するのではなく、信頼できない入力に対してパラメータ化クエリを使用すべきである。
    • 元の観察に戻り、結果が何を裏付けているか、どのような条件を前提としているかを説明し、対立する説明を検証する方法を一つ示す。

    警告:

    外貨鍵は各行を自動的に暗号化する。この主張は誤りである:主鍵は必ずしも人名である必要はない。ジョインは単なるテーブルの連結ではない。信頼できない入力に対してパラメータ化クエリを使用すべきであり、生文字列からSQLを構築してはならない。

    重要:

    リレーショナルデータベース:鍵と関係:ジョインは指定された条件に従って行を結合する。結果の行数は関係のカルディナリティとフィルタに依存する。外貨制約は関係ルールを強制するが、個人情報自体を自動的に暗号化するわけではない。

    実行可能なトレースと境界

    import sqlite3
    db = sqlite3.connect(":memory:")
    db.executescript("""CREATE TABLE c(id INTEGER PRIMARY KEY);
    CREATE TABLE o(id INTEGER PRIMARY KEY, cid INTEGER);
    INSERT INTO c VALUES(1),(2),(3);
    INSERT INTO o VALUES(10,1),(11,1),(12,3);""")
    for kind in ["INNER", "LEFT"]:
        sql = f"SELECT COUNT(*),COUNT(o.id) FROM c {kind} JOIN o ON c.id=o.cid"
        print(kind, db.execute(sql).fetchone())
    db.close()
    

    期待される出力:

    INNER (3, 3)
    LEFT (4, 3)
    

    左外結合(LEFT JOIN)は、nullの注文フィールドを含む顧客2を保持します。COUNT(*)はその行を含みますが、COUNT(o.id)は除外します。主キーはレコードを識別し、顧客数は注文数とは異なります。補間される結合キーワードはユーザー入力ではなく、固定された内部リストから来ます。

    English 日本語
    primary key/ˈpraɪməri kiː/ 主鍵
    foreign key/ˈfɒrən kiː/ 外部鍵
  • 4

    A.4・機械学習

    4.1

    Scope and prerequisites

    English

    Supported HL focus. First assessment 2027 target; official PDF returns 403; older acquired brief is final assessment 2026. Remaining guide, assessment and practical requirements retain their recorded holds.

    Prerequisites: read the stated quantities and units, use arithmetic and the model conditions below. Each lesson develops its own method before independent transfer.

    These are original or explicitly fictional teaching examples, not actual measurements or completed assessed learner investigations.

    4.2

    Data models and responsible machine learning

    English

    What would explain this observation?

    • A model can score well by learning a shortcut in the training data. Evaluation must test the intended task on appropriate unseen examples.
    • Start with a prediction. State the quantities or features you would compare, then decide what evidence could distinguish two explanations.

    Build the model

    • A relational database uses tables, keys and relationships to organize data. Machine learning estimates patterns from data. Training and evaluation data serve different roles.
    • primary key 主键: An attribute set uniquely identifying a record; data leakage 数据泄漏: Use of information unavailable at the intended prediction time.
    Data models and responsible machine learning: original worked-case diagram

    Choose evidence that can test it

    • A primary key uniquely identifies a record; a foreign key relates records. In prediction, leakage can expose information unavailable at the real decision time. Accuracy alone may hide an unbalanced target distribution.
    • Use fictional booking records to identify entities, attributes and relationships. For a learning exercise, use a public non-sensitive dataset, separate training and test data, and describe who may be affected by errors. The current 2027 CS objective scope awaits the acquired guide.

    Work from known quantities

    • State the known values and their units. Choose the relation because its assumptions fit this case, then rearrange before substitution.
    • Known: a classifier makes 90 correct predictions among 100 cases. Accuracy = correct/total×100 = 90%. If 90 cases belong to one class, always predicting that class gives the same accuracy and can still fail every minority-class case.

    Example:

    A model makes 72 correct predictions out of 80. Find accuracy percentage. Use the same sequence: known quantities → model → relation → substitution → unit and interpretation.


    Check the conclusion and its limits

    • High accuracy is not evidence of fairness or causal understanding. A database primary key is not simply whichever field looks important.
    • Return to the original observation. Explain what the result supports, which conditions it assumes, and one way to test a competing explanation.

    Warn:

    A classifier with 90% accuracy must treat every class equally well. This claim is false: High accuracy is not evidence of fairness or causal understanding. A database primary key is not simply whichever field looks important.

    Key:

    Data models and responsible machine learning: A primary key uniquely identifies a record; a foreign key relates records. In prediction, leakage can expose information unavailable at the real decision time. Accuracy alone may hide an unbalanced target distribution.

    Runnable trace and boundary

    tp, fn, fp, tn = 4, 1, 10, 85
    total = tp + fn + fp + tn
    accuracy = (tp + tn) / total
    recall = tp / (tp + fn) if tp + fn else None
    print(accuracy, recall)
    positives = 0
    print(0 / positives if positives else "UNDEFINED")
    

    Expected output:

    0.89 0.8
    UNDEFINED
    

    Accuracy divides correct predictions by all cases; positive recall divides true positives by actual positives. With no positive cases, recall is undefined rather than zero. The dataset is fictional, with no trained model or personal data.

    English 日本語
    primary key/ˈpraɪməri kiː/ 主鍵
    data leakage/ˈdeɪtə ˈliːkɪdʒ/ データ漏洩
  • 5

    B.1・計算的思考

    5.1

    対象範囲と前提条件

    評価対象HLの焦点。最初の評価2027の目標;公式PDFの返却は403;以前に取得された要約書は最終評価2026である。残りのガイド、評価、実務的要項は記録された保持状態のままとする。

    前提条件:指定された数量と単位を読み取り、算術を使用し、以下のモデル条件に従う。各授業は独立した転移前に独自の方法を発展させる。

    これらは元々または明示的に架空の教学例であり、実際の測定値や完了した評価対象学習者調査ではない。

    5.2

    アルゴリズム、トレース、および妥当性の証拠

    この観察を説明するのは何か?

    • アルゴリズムは特定の例では機能しても境界で失敗することがあります。テストはハッピーパスだけでなく、仕様に基づいて設計すべきです。
    • まず予測を立てる。比較したい量や特徴を明記し、2つの説明を区別できる証拠は何かを決定せよ。

    モデルを構築する

    • アルゴリズムとは、タスクに対する有限かつ明確な手順のことです。トレースは状態の変化を記録します。ループ不変性は各反復によって維持される性質を示し、妥当性の正当化に役立ちます。
    • アルゴリズム: 指定されたタスクを解決する有限の手順;境界テスト: 許容入力範囲の限界で行うテスト。
    アルゴリズム、トレース、妥当性の証拠: 元の実演例図

    モデルを検証できる証拠を選ぶ

    • 入力条件と期待される出力を記述します。境界ケース、空のコレクション(許可される場合)、重複項目、無効な値を使用します。誤ったアルゴリズムと、誤った実装または不完全な要件を区別してください。
    • 小さな架空のソート済みリストに対する探索をトレースします。インデックスの慣例を明記してください。二分探索の場合、残りの区間が縮小するように境界を更新し、ソートがタスクの一部でない限り未ソート入力を却下してください。

    既知の値から始める

    • 既知の値と単位を明記する。このケースに適応する仮定を持つ関係式を選び、代入前に変形する。
    • 既知: 8要素のリストに対する線形探索は、探しているアイテムが最後にあるか存在しない場合に8回の比較を必要とする可能性があります。このモデルでは、リストの長さを倍にすると最悪ケースの比較回数も倍になります。二分探索は各ステップで区間をおおよそ半分ずつ減らしますが、適切な順序構造が必要です。

    例:

    線形探索は一致しない14アイテムをスキャンします。いくつのアイテム比較が行われますか?同じ手順を用いる: 既知の数値 → モデル → 関係式 → 代入 → 単位と解釈。


    結論とその限界を確認する

    • 成功したサンプルテストが、すべての有効入力に対する妥当性を証明するわけではありません。IBコースに、コースソースなしでCambridge固有の擬似コード構文を取り入れるべきではありません。
    • 元の観察に戻り、結果が何を裏付けているか、どのような条件を前提としているかを説明し、対立する説明を検証する方法を一つ示す。

    警告:

    成功したサンプルテストは、すべての有効入力に対してアルゴリズムが正しいことを証明します。この主張は誤りです: 成功したサンプルテストが、すべての有効入力に対する妥当性を証明するわけではありません。IBコースに、コースソースなしでCambridge固有の擬似コード構文を取り入れるべきではありません。

    重要:

    アルゴリズム、トレース、妥当性の証拠: 入力条件と期待される出力を記述します。境界ケース、空のコレクション(許可される場合)、重複項目、無効な値を使用します。誤ったアルゴリズムと、誤った実装または不完全な要件を区別してください。

    実行可能なトレースと境界

    def first_index(values, target):
        for index, value in enumerate(values):
            if value == target:
                return index
        return -1
    print(first_index([4, 7, 4], 4))
    print(first_index([4, 7, 4], 9))
    print(first_index([], 4))
    

    期待される出力:

    0
    -1
    -1
    

    ループはまずインデックス0をテストし、一致したら停止し、リストをすべて探索した後にのみ−1を返します。重複がある場合は最初のインデックスが返されます。空のリストではループ本体は実行されません。

    English 日本語
    algorithm/ˈælɡərɪθəm/ アルゴリズム
    boundary test/ˈbaʊndəri test/ 境界値テスト
  • 6

    B.2・プログラミング

    学習プログラム 間もなく公開

  • 7

    B.3・オブジェクト指向プログラミング

    7.1

    対象範囲と前提条件

    評価対象HLの焦点。最初の評価2027の目標;公式PDFの返却は403;以前に取得された要約書は最終評価2026である。残りのガイド、評価、実務的要項は記録された保持状態のままとする。

    前提条件:指定された数量と単位を読み取り、算術を使用し、以下のモデル条件に従う。各授業は独立した転移前に独自の方法を発展させる。

    これらは元々または明示的に架空の教学例であり、実際の測定値や完了した評価対象学習者調査ではない。

    7.2

    オブジェクト:状態、振る舞い、およびインターフェース

    この観察を説明するのは何か?

    • 2つの銀行口座モデルオブジェクトは、異なる残高を保持しながらも、同じ預金操作に応答できる。
    • まず予測を立てる。比較したい量や特徴を明記し、2つの説明を区別できる証拠は何かを決定せよ。

    モデルを構築する

    • クラスは状態と振る舞いを持つ型を定義する。オブジェクトはインスタンスである。カプセル化は、操作が不変式を維持できるようにするためのインターフェースを通じてアクセスを制御する。継承は適切な型の関係性をモデル化し、合成(コンポジション)はオブジェクトが他のオブジェクトを含んでいるか使用している関係をモデル化する。
    • エンカプスレーション: インターフェースを通じて状態へのアクセスを制御すること;インスタンス: クラスの個々のオブジェクト。
    オブジェクト: 状態、振る舞い、およびインターフェース: 元例示図

    モデルを検証できる証拠を選ぶ

    • メソッド呼び出しは特定のインスタンスに対して動作する。状態の変化は前条件と後条件を満たすべきである。ポリモルフィズムは、契約が遵守される場合、異なる実装でも共通のインターフェースを使ってコードを記述することを可能にする。
    • 小型の架空の口座や在庫モデルを実装せよ。2つの独立したインスタンスをテストし、無効な操作や境界値を拒否せよ。モデルを実際の金融口座や認証情報から遠ざけておけ。

    既知の値から始める

    • 既知の値と単位を明記する。このケースに適応する仮定を持つ関係式を選び、代入前に変形する。
    • 既知: オブジェクトAは 40 単位から始まり 15 を受け取る;オブジェクトBは 20 から始まり 5 を受け取る。最終残高は 55 と 25 である。それらの合計は 80 だが、いずれの個別オブジェクトの残高も 80 ではない。

    例:

    ある値が12単位から始まり、8を加え、3を引きました。最終値を求めよ。同じ手順を用いてください: 既知量 → モデル → 関係式 → 代入 → 単位と解釈。


    結論とその限界を確認する

    • クラスは単一のインスタンスと同じものではない。継承が常に合成より優れているわけではない。フィールドを隠蔽するだけでは、すべての操作が有効な状態を維持することが保証されない。
    • 元の観察に戻り、結果が何を裏付けているか、どのような条件を前提としているかを説明し、対立する説明を検証する方法を一つ示す。

    警告:

    クラス instances の2つは常に1つの残高を共有しなければならないという主張は誤りです。クラスは1つのインスタンスと同じものではありません。継承が自動的にコンポジションより優れているわけではありません。単にフィールドを隠すだけでは、すべての操作が有効な状態を維持することを証明しません。

    重要:

    オブジェクト: 状態、振る舞い、およびインターフェース: メソッド呼び出しは特定のインスタンスに対して動作する。状態の変化は前条件と後条件を満たすべきである。ポリモルフィズムは、契約が遵守される場合、異なる実装でも共通のインターフェースを使ってコードを記述することを可能にする。

    実行可能なトレースと境界

    class Account:
        def __init__(self, balance):
            self.balance = balance
        def withdraw(self, amount):
            if amount < 0 or amount > self.balance:
                return False
            self.balance -= amount
            return True
    a, b = Account(15), Account(20)
    print(a.withdraw(30), a.balance, b.balance)
    print(a.withdraw(15), a.balance, b.balance)
    

    期待される出力:

    False 15 20
    True 0 20
    

    拒否は変異よりも前に返されます。初期残高が非負の場合、検証済みの引き出しは残高≥0を維持します。この小さな授業クラスは属性を露出しますが、生産環境の設計ではメソッド自体がカプセル化を強制すると仮定せず、すべての変異経路を制御する必要があります。

    English 日本語
    instance/ˈɪnstəns/ インスタンス
    encapsulation/ɪnˌkæpsjʊˈleɪʃn/ カプセル化
  • 8

    B.4・抽象データ型(HLのみ)

    8.1

    Scope and prerequisites

    English

    Supported HL focus. First assessment 2027 target; official PDF returns 403; older acquired brief is final assessment 2026. Remaining guide, assessment and practical requirements retain their recorded holds.

    Prerequisites: read the stated quantities and units, use arithmetic and the model conditions below. Each lesson develops its own method before independent transfer.

    These are original or explicitly fictional teaching examples, not actual measurements or completed assessed learner investigations.

    8.2

    Abstract data types: an operation contract

    English

    What would explain this observation?

    • A waiting-line simulation needs the oldest pending item first. A stack 栈 gives the most recent item first, so the operation contract matters.
    • Start with a prediction. State the quantities or features you would compare, then decide what evidence could distinguish two explanations.

    Build the model

    • An abstract data type specifies values and operations independently of a particular implementation. A stack is last in, first out; a queue 队列 is first in, first out. A collection interface needs defined behaviour for empty and invalid operations.
    • stack: A last-in-first-out abstract data type; queue: A first-in-first-out abstract data type.
    Abstract data types: an operation contract: original worked-case diagram

    Choose evidence that can test it

    • Choose the structure for the required access pattern. Complexity depends on implementation and assumptions: removing the first item from a shifting array differs from advancing a head pointer in a queue.
    • Trace operation sequences by hand, then compare a program with the expected states. Test empty, singleton and repeated operations. State overflow behaviour if capacity is fixed.

    Work from known quantities

    • State the known values and their units. Choose the relation because its assumptions fit this case, then rearrange before substitution.
    • Known: enqueue A, B and C, then dequeue twice. A and B leave; C remains. After enqueue D there are two pending items, C then D. The same pushes on a stack would remove C then B.

    Example:

    A queue starts empty, receives 7 items and removes 4. Find the number remaining. Use the same sequence: known quantities → model → relation → substitution → unit and interpretation.


    Check the conclusion and its limits

    • An ADT is not a specific memory layout. A queue does not sort by priority unless its contract defines a priority queue.
    • Return to the original observation. Explain what the result supports, which conditions it assumes, and one way to test a competing explanation.

    Warn:

    Every queue automatically sorts items by priority. This claim is false: An ADT is not a specific memory layout. A queue does not sort by priority unless its contract defines a priority queue.

    Key:

    Abstract data types: an operation contract: Choose the structure for the required access pattern. Complexity depends on implementation and assumptions: removing the first item from a shifting array differs from advancing a head pointer in a queue.

    Runnable trace and boundary

    from collections import deque
    queue = deque()
    queue.extend(["A", "B"])
    print(queue.popleft())
    queue.append("C")
    print(queue.popleft())
    print(list(queue))
    queue.clear()
    print(queue.popleft() if queue else "EMPTY")
    

    Expected output:

    A
    B
    ['C']
    EMPTY
    

    Removing from the left implements FIFO. The explicit empty guard defines the boundary result; deque.popleft without it would raise IndexError. A stack instead removes from the right.

    English 日本語
    stack/stæk/ スタック
    queue/kjuː/ キュー
  • 9

    ケーススタディ・ケーススタディ

    9.1

    Scope and prerequisites

    English

    Supported HL focus. First assessment 2027 target; official PDF returns 403; older acquired brief is final assessment 2026. Remaining guide, assessment and practical requirements retain their recorded holds.

    Prerequisites: read the stated quantities and units, use arithmetic and the model conditions below. Each lesson develops its own method before independent transfer.

    These are original or explicitly fictional teaching examples, not actual measurements or completed assessed learner investigations.

    9.2

    Computing case analysis: evaluate a proposed system

    English

    What would explain this observation?

    • A proposed school booking system looks efficient, but its recommendation depends on users, constraints and evidence. A plausible technical term alone is not a justified decision.
    • Start with a prediction. State the quantities or features you would compare, then decide what evidence could distinguish two explanations.

    Build the model

    • A case study places computational choices within a stated scenario. Identify stakeholders, requirements, available evidence and constraints before recommending an architecture or algorithm. Distinguish a scenario fact from an assumption and a prediction. Trade-offs can involve performance, reliability, accessibility, privacy, maintenance and cost.
    • throughput 吞吐量: Completed work per unit time under a stated workload; acceptance test 验收测试: A test of whether a specified user requirement is met.
    Computing case analysis: evaluate a proposed system: original worked-case diagram

    Choose evidence that can test it

    • A recommendation should connect a requirement to a mechanism and an observable test. For example, a concurrency problem requires a strategy that prevents conflicting updates, plus tests demonstrating the invariant. A claim about faster response requires comparable workload measurements rather than only a complexity label. Evaluate alternatives under the same stated conditions.
    • Use an original school-approved scenario and synthetic data. Build a matrix of claim, supporting scenario evidence, technical explanation, limitation and acceptance test. Mark missing facts explicitly and show how the recommendation would change if an assumption failed. This prepares case-based reasoning without reproducing an unavailable IB assessment case study or inventing its examination rubric.

    Work from known quantities

    • State the known values and their units. Choose the relation because its assumptions fit this case, then rearrange before substitution.
    • Known: a fictional prototype processes 120 successful requests during a 30-second observation. Throughput is 120/30=4 successful requests/s. A second prototype processes 150 in 30 seconds, or 5/s. The second has 25% greater recorded throughput, but no conclusion about latency, failure rate or performance under a larger workload follows without those measurements.

    Example:

    A fictional system successfully processes 210 requests in 30 s. Calculate throughput. Use the same sequence: known quantities → model → relation → substitution → unit and interpretation.


    Check the conclusion and its limits

    • Throughput is not response time. A strong recommendation states the conditions in which it is expected to work and the evidence that could disconfirm it. Current official CS case-study requirements must be checked against the applicable assessment version.
    • Return to the original observation. Explain what the result supports, which conditions it assumes, and one way to test a competing explanation.

    Warn:

    Higher observed throughput automatically proves lower response time for every request. This claim is false: Throughput is not response time. A strong recommendation states the conditions in which it is expected to work and the evidence that could disconfirm it. Current official CS case-study requirements must be checked against the applicable assessment version.

    Key:

    Computing case analysis: evaluate a proposed system: A recommendation should connect a requirement to a mechanism and an observable test. For example, a concurrency problem requires a strategy that prevents conflicting updates, plus tests demonstrating the invariant. A claim about faster response requires comparable workload measurements rather than only a complexity label. Evaluate alternatives under the same stated conditions.

    Runnable trace and boundary

    for successful, attempted, seconds in [(240, 300, 30), (270, 300, 30)]:
        if seconds <= 0 or attempted <= 0:
            raise ValueError("Positive exposure required")
        throughput = successful / seconds
        failure_fraction = (attempted - successful) / attempted
        print(throughput, failure_fraction)
    

    Expected output:

    8.0 0.2
    9.0 0.1
    

    Success throughput and failure fraction use different denominators. Zero time or zero attempts cannot support those rates. These fictional summaries do not supply latency, cost or representative-load evidence.

    English 日本語
    throughput/ˈθruːpʊt/ スループット
    acceptance test/əkˈseptəns test/ 受領テスト
  • 10

    IA・計算による解決策

    学習プログラム 間もなく公開

ログインまたはアカウント作成

IGCSE, A-Level & AP