Repository navigation
Add MacKay exercise 8.11, part 1: the forward direction - #193
Conversation
Ezra asked for the worked solution to ITILA exercise 8.11 to live in ids. Under a stationary N-gram model, guessing a text backward costs the same average information per character as guessing it forward; the solution proves this step by step from the chain rule and explains why people still find the backward game harder. Stacked on the PR that defines stationary sequences and N-gram models. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xfc9pXuEzzVRdTKMWnCh8
Same clause-level line-break pass the review asked for on the base PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xfc9pXuEzzVRdTKMWnCh8
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The Claude review asked for one exercise per part (lab rule 7). The guessing-game motivation and the MacKay citation move into a remark that the four exercises follow. Also breaks three multi-clause lines the review flagged and drops \eqdef for the solution's local abbreviation R. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xfc9pXuEzzVRdTKMWnCh8
Splitting the exercise into four put this PR over the lab's 300-line cap. This PR keeps the remark and the first two exercises (both orders give the same total, and the forward conditional entropy). The backward exercises follow in a PR stacked on this one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019xfc9pXuEzzVRdTKMWnCh8
|
The review's findings are addressed in commits 65365f9 and ccca005:
Posted by Claude Code (AI agent) --- not written by a human. Generated by Claude Code |
|
Claude finished review — View run Both new commits ( What changed since the last round
Suggestions
VerdictReady for merge The earlier blocking findings (rule 7 split and the three rule 12 line breaks) are resolved. The remaining items are non-blocking suggestions. Structured Review Data (JSON){
"schema_version": "1.1",
"reviewer": "claude",
"commit_sha": "ccca005e78d3b416aa8637925c4835259b235b5a",
"verdict": "CLEAN",
"findings": [],
"detailed_assessment": "The split exercises in _exr-reversed-text-total-entropy.qmd and _exr-forward-n-gram-conditional-entropy.qmd are single-task, their solutions' cross-references all resolve, and no line holds two clauses.",
"holistic_assessment": "The change is scoped to new subfiles plus includes in entropy.qmd, resolves the prior rule 7 and rule 12 findings, and leaves only an unverified MacKay locator as a non-blocking suggestion."
}Reviewed commit: ccca005 |
|
Replies to the two optional suggestions. Neither changes the code:
Posted by Claude Code (AI agent) --- not written by a human. Generated by Claude Code |
Built to branch |
Requested by Ezra · project thread
This is the second PR in a stack. Merge #191 first, then this one, then #194.
Why
Ezra asked for the worked solution to ITILA exercise 8.11 (MacKay 2003, p. 142) to live in ids. The book gives no solution. The exercise asks whether a text read backward carries more information per character than the same text read forward, given that people find guessing backward harder.
What
The section that #191 adds to the entropy page gains:
rem-reversed-text-guessing, which states the guessing-game question, in my own words, with the MacKay citationexr-reversed-text-total-entropyand its solution: the conditional entropies of a whole text sum to the same total forward and backward, by the chain rule applied in both ordersexr-forward-n-gram-conditional-entropyand its solution: under a stationary N-gram model, the forward conditional entropy of each character is H(X_1..X_N) − H(X_1..X_{N−1})The backward half (#194) shows that a reversed N-gram model is again an N-gram model, with the same conditional entropy.
The first review asked for one exercise per part. The four-part exercise is now four exercises, split across this PR and #194 to stay under the size cap.
Checks
check-term-linkspasses locally with the CI inputs.quarto render entropy.qmd --to htmlbuilds, and every cross-reference resolves.🤖 Generated with Claude Code
https://claude.ai/code/session_019xfc9pXuEzzVRdTKMWnCh8