Algorithm Search⌘K

Algorithmadvanced

Chow-Cioffi-Bingham algorithm

Also called Chow bit loading.

Fast DMT bit loading: compute real rates log2(1 + SNR/(Gamma margin)), round them, adjust the margin until the rounded total meets the target, then fix the last bits and scale the energies.

Time
O(N (K + F)) worst
Space
O(N) extra
Where
F = the number of bits moved by the fix-up; K = the number of margin rounds (at most MaxCount); N = the number of subcarriers
Properties
deterministicheuristicneeds csitnot optimal
Origin
Peter S. Chow, John M. Cioffi, John A. C. Bingham, 1995

The Chow-Cioffi-Bingham algorithm is a fast heuristic for bit loading in discrete multitone modems. It starts with unit energy on every subcarrier and computes a real rate bi=log⁡2(1+SNRi/(Γγ))b_i = \log_2(1 + \mathrm{SNR}_i/(\Gamma \gamma)) for each, with the SNR gap Γ\Gamma and a margin γ\gamma that starts at 0 dB. It rounds the rates, compares their sum with the target, and changes the margin by 10log⁡102(Btotal−Btarget)/U10 \log_{10} 2^{(B_{\mathrm{total}} - B_{\mathrm{target}})/U} dB, where UU is the number of subcarriers in use; this is about 3 dB per missing or extra bit per subcarrier. After a few rounds it fixes the remaining difference one bit at a time, using the rounding errors, and finally gives each used subcarrier the energy its bits need and scales all energies to the budget. Each round costs O(N)O(N). The result meets the target exactly and gives every used subcarrier the same margin, but unlike the Hughes-Hartogs and Levin-Campello algorithms it is not optimal in general.

In plain words

A modem must place a fixed number of bits on its tones. The slow, exact method places the bits one at a time.

This method is faster. It first asks: with equal power on every tone and a given safety margin, how many bits could each tone carry? It rounds each answer to a whole number and adds them up. If the sum is too large, it asks for a bigger margin; if too small, a smaller one, and it repeats a few times. Then it fixes the last few bits by hand, picking the tones that were rounded the most. Last, it sets the power of each tone so that all used tones have the same safety margin.

The problem

This is the margin-adaptive form of bit loading: carry exactly BtargetB_{\mathrm{target}} bits with the total energy PP and the largest margin that is common to all used subcarriers. Subcarrier ii has SNRi\mathrm{SNR}_i at unit energy. Under the gap model, b^i\hat b_i bits at the energy eie_i have the margin eiSNRi/(Γ(2b^i−1))e_i \mathrm{SNR}_i / (\Gamma(2^{\hat b_i} - 1)). The largest common margin is P/E∗(B)P/E^*(B), where E∗(B)E^*(B) is the least energy for BB bits at margin 1, and the optimal algorithms reach it. This algorithm reaches a common margin that is usually close to it.

The algorithm

Γ\Gamma and γ\gamma are linear factors here; the paper writes the sum of the gap and the margin in dB.

  1. CHOW-CIOFFI-BINGHAM(SNR[1..N], Γ, B_target, P, MaxCount) ▷ SNR_i at unit energy
  2. 1γ_dB ← 0, count ← 0
  3. 2repeat: b_i ← log2(1 + SNR_i / (Γ · 10^(γ_dB/10))), b̂_i ← round(b_i), diff_i ← b_i - b̂_i
  4. 3B_total ← Σ b̂_i, U ← the number of i with b̂_i > 0
  5. 4γ_dB ← γ_dB + 10 log10(2^((B_total - B_target)/U)), count ← count + 1
  6. 5until B_total = B_target or count = MaxCount
  7. 6while B_total ≠ B_target: if B_total > B_target, take a bit from the i with b̂_i > 0 and the smallest diff_i (diff_i ← diff_i + 1); else add a bit to the i with the largest diff_i (diff_i ← diff_i - 1)
  8. 7e_i ← Γ (2^(b̂_i) - 1) / SNR_i for i = 1 .. N ▷ the energy for b̂_i bits at margin 1
  9. 8scale every e_i by P / Σ_j e_j and return (b̂, e)

The test code uses MaxCount=10\mathrm{MaxCount} = 10. A channel that loads no bit in the first round is reported as unusable. With a cap bmax⁡b_{\max}, line L2 clips b^i\hat b_i to it, and line L6 adds bits only below it.

Example

Take SNR=(20,9,5,1.5)\mathrm{SNR} = (20, 9, 5, 1.5) at unit energy, Γ=1\Gamma = 1, Btarget=8B_{\mathrm{target}} = 8, and the budget P=4P = 4, one unit per subcarrier.

round margin before real rates bib_i rounded BtotalB_{\mathrm{total}} margin step
1 0 dB 4.392, 3.322, 2.585, 1.322 (4, 3, 3, 1) 11 +2.258+2.258 dB (3 extra bits over 4 carriers)
2 2.258 dB 3.688, 2.667, 1.990, 0.920 (4, 3, 2, 1) 10 +1.505+1.505 dB
3 3.763 dB 3.234, 2.258, 1.633, 0.706 (3, 2, 2, 1) 8 stop

The loading (3,2,2,1)(3, 2, 2, 1) needs 0.35+0.333+0.6+0.667=1.950.35 + 0.333 + 0.6 + 0.667 = 1.95 units at margin 1. Line L8 scales by 4/1.954/1.95, so the energies are (0.718,0.684,1.231,1.368)(0.718, 0.684, 1.231, 1.368) and the common margin is 2.0512.051, or 3.12 dB. The optimal loading (4,2,2,0)(4, 2, 2, 0) needs 101/60≈1.6833101/60 \approx 1.6833, for a margin of 3.76 dB; the heuristic gives up 0.64 dB here.

With MaxCount=1\mathrm{MaxCount} = 1, the fix-up starts from round 1: (4,3,3,1)(4, 3, 3, 1) with diff=(0.392,0.322,−0.415,0.322)\mathrm{diff} = (0.392, 0.322, -0.415, 0.322). It removes a bit from carrier 3, then from carrier 2 and carrier 4, whose rounding errors are equal, and reaches (4,2,2,0)(4, 2, 2, 0), which is optimal. More margin rounds are not always better.

Correctness

Claim. If the first round loads at least one bit, the algorithm stops, the output carries exactly BtargetB_{\mathrm{target}} bits, the energies add up to PP, and every used subcarrier has the same margin γ∗=P/∑jΓ(2b^j−1)/SNRj\gamma^* = P / \sum_j \Gamma(2^{\hat b_j} - 1)/\mathrm{SNR}_j. This margin is at most the optimal margin P/E∗(Btarget)P/E^*(B_{\mathrm{target}}), with equality when the rounded loading is optimal.

Key steps. The margin loop has at most MaxCount\mathrm{MaxCount} rounds. Each fix-up step moves BtotalB_{\mathrm{total}} one bit toward the target, and a subcarrier to change always exists, so the fix-up takes exactly ∣Btotal−Btarget∣|B_{\mathrm{total}} - B_{\mathrm{target}}| steps. Lines L7 and L8 make eie_i proportional to the energy that b^i\hat b_i bits need at margin 1, so all used subcarriers get the same factor γ∗\gamma^*. Raising the margin by 2t2^t lowers each real rate by at most tt bits, and by almost exactly tt on strong subcarriers, which is why the step of line L4 aims at the target. The full proof is in the proofs folder.

Proof: The Chow-Cioffi-Bingham loading meets the bit target and the energy budget with one common marginfull

The algorithm is a heuristic, so its correctness is a statement about what its output satisfies, not about optimality. The input is SNRi>0\mathrm{SNR}_i > 0, the SNR of subcarrier ii at unit energy, for i=1,…,Ni = 1, \ldots, N; the gap Γ≥1\Gamma \ge 1; the target BB with 0≤B≤Nbmax⁡0 \le B \le N b_{\max} (or B≥0B \ge 0 without a cap); the energy budget P>0P > 0; and MaxCount≥1\mathrm{MaxCount} \ge 1. Write b^i\hat b_i for the integer bits, and γ\gamma for the margin as a linear factor (γdB=10log⁡10γ\gamma_{\mathrm{dB}} = 10 \log_{10} \gamma).

Theorem. If the first round loads at least one bit or B=0B = 0, the algorithm stops, and its output satisfies

  1. ∑ib^i=B\sum_i \hat b_i = B and 0≤b^i≤bmax⁡0 \le \hat b_i \le b_{\max};
  2. ∑iei=P\sum_i e_i = P and ei≥0e_i \ge 0;
  3. every used subcarrier (b^i>0\hat b_i > 0) gets ei SNRi=γ∗ Γ (2b^i−1)e_i\, \mathrm{SNR}_i = \gamma^*\, \Gamma\, (2^{\hat b_i} - 1) with the same γ∗=P/∑jΓ(2b^j−1)/SNRj\gamma^* = P / \sum_j \Gamma (2^{\hat b_j} - 1)/\mathrm{SNR}_j, and every unused subcarrier gets ei=0e_i = 0;
  4. γ∗≤P/E∗(B)\gamma^* \le P / E^*(B), where E∗(B)E^*(B) is the least energy that carries BB bits at margin 1.

Lemma 1 (the margin loop stops). Lines L2 to L5 run at most MaxCount\mathrm{MaxCount} rounds.

Proof. Each round raises the counter by 1, and line L5 stops the loop when the counter reaches MaxCount\mathrm{MaxCount}. (The implementation also stops when a later round loads no bit, because then the margin step of line L4 is not defined.) □\square

Lemma 2 (the fix-up stops at the target). Line L6 runs exactly ∣Btotal−B∣|B_{\mathrm{total}} - B| steps, and each step is possible.

Proof. Each step changes BtotalB_{\mathrm{total}} by one toward BB and stops when they are equal. When Btotal>B≥0B_{\mathrm{total}} > B \ge 0, some b^i>0\hat b_i > 0, so a bit can be removed. When Btotal<B≤Nbmax⁡B_{\mathrm{total}} < B \le N b_{\max}, some b^i<bmax⁡\hat b_i < b_{\max}, so a bit can be added. Removing a bit from b^i>0\hat b_i > 0 keeps b^i≥0\hat b_i \ge 0, and adding one to b^i<bmax⁡\hat b_i < b_{\max} keeps b^i≤bmax⁡\hat b_i \le b_{\max}. The rounding at line L2 is clipped to [0,bmax⁡][0, b_{\max}] as well, since bi≥0b_i \ge 0. □\square

This proves property 1.

Lemma 3 (the energies). Let ni=Γ(2b^i−1)/SNRin_i = \Gamma (2^{\hat b_i} - 1)/\mathrm{SNR}_i, the energy that carries b^i\hat b_i bits at margin 1, and S=∑iniS = \sum_i n_i. If B>0B > 0, then S>0S > 0, and lines L7 and L8 give ei=niP/Se_i = n_i P / S.

Proof. If B>0B > 0, some b^i≥1\hat b_i \ge 1, so ni>0n_i > 0. Then ∑iei=(P/S)∑ini=P\sum_i e_i = (P/S) \sum_i n_i = P, and ei≥0e_i \ge 0. For a used subcarrier, ei SNRi/(Γ(2b^i−1))=ei/ni=P/Se_i\, \mathrm{SNR}_i / (\Gamma(2^{\hat b_i} - 1)) = e_i / n_i = P/S, the same for every ii. For an unused one, ni=0n_i = 0, so ei=0e_i = 0. □\square

This proves properties 2 and 3 with γ∗=P/S\gamma^* = P/S. Under the gap model, the margin γ∗\gamma^* on every used subcarrier means that each one reaches the target error rate with the same reserve, which is the aim of the last step of the algorithm. If B=0B = 0, all bits are 0 and the energies are 0; the margin is unbounded.

Property 4. The loading b^\hat b carries BB bits, so its energy at margin 1 is S≥E∗(B)S \ge E^*(B) by the definition of E∗E^*. So γ∗=P/S≤P/E∗(B)\gamma^* = P/S \le P/E^*(B), the margin of an optimal loading such as that of the Levin-Campello algorithm. Equality can fail: for SNR=(20,9,5,1.5)\mathrm{SNR} = (20, 9, 5, 1.5), Γ=1\Gamma = 1, B=8B = 8 and P=4P = 4, the loop stops after three rounds at (3,2,2,1)(3, 2, 2, 1) with S=1.95S = 1.95, while the optimum (4,2,2,0)(4, 2, 2, 0) has E∗(8)=101/60≈1.6833E^*(8) = 101/60 \approx 1.6833, so the algorithm loses 10log⁡10(1.95⋅60/101)≈0.6410 \log_{10}(1.95 \cdot 60/101) \approx 0.64 dB of margin.

Lemma 4 (the size of a margin step). For x>0x > 0, m>0m > 0 and t≥0t \ge 0,

0≤log⁡2 ⁣(1+xm)−log⁡2 ⁣(1+xm 2t)≤t,0 \le \log_2\!\left(1 + \frac{x}{m}\right) - \log_2\!\left(1 + \frac{x}{m\, 2^{t}}\right) \le t,

with strict inequality on the right when t>0t > 0.

Proof. The difference is log⁡2r\log_2 r with r=(m+x) 2tm 2t+xr = \dfrac{(m + x)\, 2^{t}}{m\, 2^{t} + x}. Since 2t≥12^t \ge 1, the denominator satisfies m+x≤m2t+x≤(m+x)2tm + x \le m 2^t + x \le (m + x) 2^t. The right inequality gives r≥1r \ge 1, so the difference is at least 0. The left inequality gives r≤2tr \le 2^t, so the difference is at most tt; when t>0t > 0 and m>0m > 0, the left inequality is strict, and so is the bound. □\square

So when line L4 raises the margin by the factor 2t2^t with t=(Btotal−B)/U>0t = (B_{\mathrm{total}} - B)/U > 0, every real rate bib_i falls by at most tt, and the rates of subcarriers with high SNR fall by almost exactly tt, since the difference tends to tt as x/m→∞x/m \to \infty. If all UU used subcarriers had high SNR and the rounding did not change, the next total would be BB; this is the reason for the step. Rounding and subcarriers near zero bits can make the loop overshoot or cycle, which is why it has the cap MaxCount\mathrm{MaxCount} and the fix-up of line L6. The same bound holds for a lower margin (t<0t < 0) with the signs reversed.

Complexity

In the real RAM, each round of lines L2 to L4 costs O(N)O(N), and there are K≤MaxCountK \le \mathrm{MaxCount} rounds. Each fix-up step of line L6 scans the subcarriers in O(N)O(N); with the rounding errors sorted once, the fix-up costs O(Nlog⁡N+F)O(N \log N + F) instead, because a subcarrier changed once has the largest or smallest error until all others have changed. Lines L7 and L8 cost O(N)O(N). So the time is O(N(K+F))O(N(K + F)) as written, and the space is O(N)O(N). The Hughes-Hartogs rule needs O(N+Blog⁡N)O(N + B \log N), which is much more when each of thousands of tones carries many bits.

Properties

  • Exact target, common margin. The output always meets the bit target, and all used subcarriers have the same margin, so under the gap model they have the same error rate.
  • Not optimal. The rounding to the nearest integer ignores the costs of the bits. The example loses 0.64 dB against the optimum.
  • Usually close. On random channels with many subcarriers and a gap of 9.8 dB, the test code measures a mean loss of under 0.3 dB of margin; this is a measurement, not a bound.
  • Few rounds. At high SNR one margin step nearly corrects the total, since each bit per subcarrier costs about 3.01 dB.
  • No sort and no heap in the main loop. This made it attractive for the modem hardware of the 1990s.

Variants and improvements

  • Rate-adaptive form. Fix the margin, compute the rounded rates once, and scale the energies; the result is the rate that the channel supports at that margin.
  • Bisection on the margin. Search the margin by bisection for the value where the rounded total crosses the target, then fix up; this replaces the step of line L4 when the loop does not settle.
  • A final optimal pass. Run the swap phase of the Levin-Campello algorithm on the output. Since the output is already close, few swaps are needed, and the result is optimal.
  • Fine gains. DSL modems apply a fine gain per tone, a small energy adjustment that equalizes the margins; line L8 is a simple form of it.

When to use it

Use it for a fast first loading of many tones, as in the training phase of a DSL modem, when an exact optimum is not needed or when a repair pass will follow. For an exact result use the Hughes-Hartogs or Levin-Campello algorithm.

Pitfalls

  • The margin in dB. The paper writes the denominator as the gap plus the margin in dB, which is a product of linear factors. Adding linear values is a bug.
  • Division by zero. If a round loads no bit, U=0U = 0 and line L4 is undefined. Stop or report the channel as unusable.
  • Cycling. The margin step can overshoot, for example when several subcarriers are near a rounding boundary. Keep MaxCount\mathrm{MaxCount} and the fix-up.
  • Rounding of halves. Some languages round halves to even. Pick one rule and use it in both the loop and the fix-up.
  • Forgetting the scaling. Without line L8 the total energy can exceed the budget or waste it, and the margins of the subcarriers differ.

Implementations

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

chow_cioffi_bingham_algorithm.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/chow-cioffi-bingham-algorithm/. The authors are listed in prov/KRYPZ8.jsonl.

"""Chow-Cioffi-Bingham loading for a multicarrier link (margin-adaptive form).

snr[i] is the SNR of subcarrier i when it gets unit energy. Each round
computes the real rate b[i] = log2(1 + snr[i] / (Gamma * margin)), rounds it
to the nearest integer, and moves the margin by the factor
2 ** ((total - target) / used), so that the next round lands closer to the
target. After at most max_count rounds, the bits are fixed one at a time with
the rounding errors diff[i] = b[i] - round(b[i]): extra bits are taken from
the subcarriers with the smallest diff, and missing bits are added where diff
is largest. Last, each used subcarrier gets the energy its bits need under the
gap model, and all energies are scaled to the budget, which gives every used
subcarrier the same margin.

Each round costs O(N). The fix-up scans all subcarriers once per bit that it
moves.
"""

import heapq
import math


def round_half_up(x: float) -> int:
    return math.floor(x + 0.5)


def chow_cioffi_bingham(snr, target_bits, gap=1.0, budget=None, max_count=10, b_max=None):
    """Return (bits, energies, margin, rounds).

    budget defaults to N (unit energy per subcarrier, as in the paper's
    initialization). margin is the common margin, a linear factor, that the
    final energies give on every used subcarrier.
    """
    n = len(snr)
    if n == 0 or any(not s > 0 for s in snr):
        raise ValueError("need at least one subcarrier and positive SNR values")
    if target_bits < 0 or (b_max is not None and target_bits > n * b_max):
        raise ValueError("the target must lie in [0, N * b_max]")
    if max_count < 1:
        raise ValueError("max_count must be at least 1")
    if budget is None:
        budget = float(n)
    margin_db, rounds = 0.0, 0  # @line L1
    while True:
        m = gap * 10 ** (margin_db / 10)
        b = [math.log2(1 + s / m) for s in snr]  # @line L2
        bh = [round_half_up(x) if b_max is None else min(round_half_up(x), b_max) for x in b]
        diff = [x - y for x, y in zip(b, bh)]
        used = sum(1 for y in bh if y > 0)
        total = sum(bh)  # @line L3
        if total == 0 and target_bits > 0 and rounds == 0:
            raise ValueError("the channel carries no bits at this gap")
        if used > 0:
            margin_db += 10 * math.log10(2 ** ((total - target_bits) / used))  # @line L4
        rounds += 1
        if total == target_bits or rounds >= max_count or used == 0:  # @line L5
            break
    while total > target_bits:  # @line L6
        i = min((d, i) for i, d in enumerate(diff) if bh[i] > 0)[1]
        bh[i], diff[i], total = bh[i] - 1, diff[i] + 1, total - 1
    while total < target_bits:
        i = -max((d, -i) for i, d in enumerate(diff) if b_max is None or bh[i] < b_max)[1]
        bh[i], diff[i], total = bh[i] + 1, diff[i] - 1, total + 1
    need = [gap * (2**y - 1) / s for y, s in zip(bh, snr)]  # @line L7
    total_need = sum(need)
    if total_need == 0:
        return bh, [0.0] * n, math.inf, rounds
    scale = budget / total_need
    return bh, [e * scale for e in need], scale, rounds  # @line L8


def loading_power(snr, bits, gap=1.0) -> float:
    """The least energy that carries the bits at margin 1: the sum of Gamma (2**b - 1) / snr."""
    return sum(gap * (2**b - 1) / s for b, s in zip(bits, snr))


def optimal_power(snr, target_bits, gap=1.0) -> float:
    """The least energy for target_bits bits, by the greedy rule; the reference optimum."""
    bits = [0] * len(snr)
    heap = [(gap / s, i) for i, s in enumerate(snr)]
    heapq.heapify(heap)
    total = 0.0
    for _ in range(target_bits):
        c, i = heapq.heappop(heap)
        total += c
        bits[i] += 1
        heapq.heappush(heap, (gap * 2 ** bits[i] / snr[i], i))
    return total
test_chow_cioffi_bingham_algorithm.py 91 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/chow-cioffi-bingham-algorithm/. The authors are listed in prov/KRYPZ8.jsonl.

import math
import random

import pytest

from chow_cioffi_bingham_algorithm import chow_cioffi_bingham, loading_power, optimal_power


def check_output(snr, target, gap, budget, bits, energy, margin, b_max=None):
    assert sum(bits) == target
    assert min(bits) >= 0
    if b_max is not None:
        assert max(bits) <= b_max
    assert abs(sum(energy) - budget) < 1e-9 * budget
    for b, e, s in zip(bits, energy, snr):
        if b == 0:
            assert e == 0
        else:
            assert abs(s * e / (gap * (2**b - 1)) - margin) < 1e-9 * margin


def test_page_example() -> None:
    snr = [20, 9, 5, 1.5]
    bits, energy, margin, rounds = chow_cioffi_bingham(snr, 8)
    assert bits == [3, 2, 2, 1] and rounds == 3
    assert abs(loading_power(snr, bits) - 1.95) < 1e-12
    assert abs(margin - 4 / 1.95) < 1e-12
    assert abs(optimal_power(snr, 8) - 101 / 60) < 1e-12
    assert abs(10 * math.log10(1.95 / (101 / 60)) - 0.638) < 1e-3
    check_output(snr, 8, 1.0, 4.0, bits, energy, margin)


def test_targets_budget_and_equal_margin() -> None:
    rng = random.Random(41)
    for _ in range(300):
        n = rng.randint(1, 64)
        snr = [rng.expovariate(1 / 1000) + 0.5 for _ in range(n)]
        gap = 10 ** (rng.uniform(0, 10) / 10)
        b_max = rng.choice([None, 15])
        target = rng.randint(1, 6 * n)
        budget = rng.uniform(1, 100)
        bits, energy, margin, rounds = chow_cioffi_bingham(snr, target, gap, budget, b_max=b_max)
        assert 1 <= rounds <= 10
        check_output(snr, target, gap, budget, bits, energy, margin, b_max)


def test_never_better_than_the_optimum_and_close_on_average() -> None:
    rng = random.Random(42)
    losses = []
    for _ in range(200):
        n = rng.randint(16, 64)
        snr = [rng.expovariate(1 / 1000) + 0.5 for _ in range(n)]
        gap = 10 ** 0.98
        target = rng.randint(n, 6 * n)
        bits, _, _, _ = chow_cioffi_bingham(snr, target, gap)
        ratio = loading_power(snr, bits, gap) / optimal_power(snr, target, gap)
        assert ratio >= 1 - 1e-12
        losses.append(10 * math.log10(ratio))
    assert sum(losses) / len(losses) < 0.3


def test_one_round_when_rounding_hits_the_target() -> None:
    snr = [3.0, 15.0, 63.0]
    bits, _, margin, rounds = chow_cioffi_bingham(snr, 2 + 4 + 6)
    assert bits == [2, 4, 6] and rounds == 1
    assert abs(margin - 3 / 3) < 1e-12


def test_fix_up_after_max_count() -> None:
    snr = [20, 9, 5, 1.5]
    bits, _, _, rounds = chow_cioffi_bingham(snr, 8, max_count=1)
    assert rounds == 1 and bits == [4, 2, 2, 0]
    assert abs(loading_power(snr, bits) - optimal_power(snr, 8)) < 1e-12
    bits, _, _, rounds = chow_cioffi_bingham(snr, 5, max_count=1)
    assert rounds == 1 and sum(bits) == 5


def test_bad_input() -> None:
    with pytest.raises(ValueError):
        chow_cioffi_bingham([], 1)
    with pytest.raises(ValueError):
        chow_cioffi_bingham([1, 0], 1)
    with pytest.raises(ValueError):
        chow_cioffi_bingham([1, 2], 31, b_max=15)
    with pytest.raises(ValueError):
        chow_cioffi_bingham([1e-9], 1, gap=1e9)
    bits, energy, margin, _ = chow_cioffi_bingham([5, 7], 0)
    assert bits == [0, 0] and energy == [0.0, 0.0] and margin == math.inf

History

Peter Chow, John Cioffi and John Bingham published the algorithm in 1995 in the IEEE Transactions on Communications, in a short paper on a practical loading method for discrete multitone transceivers on spectrally shaped channels such as telephone lines. It came from the work on DMT for ADSL, and it was an alternative to the greedy method of Hughes-Hartogs, whose cost grows with the number of bits. Later work, such as Campello's 1999 paper, gave fast loading methods that are also optimal.

References

  1. Peter S. Chow, John M. Cioffi and John A. C. Bingham, A practical discrete multitone transceiver loading algorithm for data transmission over spectrally shaped channels, IEEE Transactions on Communications 43(2/3/4), 1995, pages 773 to 775, the loading algorithm: unit energy per carrier at the start, the rounded rates log2(1 + SNR/(Gamma + margin in dB)), the margin iteration and the final energy adjustment
  2. John A. C. Bingham, Multicarrier modulation for data transmission: an idea whose time has come, IEEE Communications Magazine 28(5), 1990, pages 5 to 14, multicarrier modems that load each subchannel according to its SNR, the setting of the algorithm
  3. Jorge Campello, Practical bit loading for DMT, IEEE International Conference on Communications (ICC), 1999, pages 801 to 805, optimal discrete loading, against which heuristics such as this one are compared

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH1 sketch
  • a full proof of time.worst
  • a full proof of space.extra
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a scene preset for the example