Some edits to some notebooks.

This commit is contained in:
sforman
2023-10-09 12:48:14 -07:00
parent 356f67dd7d
commit 32d772e8b0
4 changed files with 34 additions and 31 deletions
+16 -12
View File
File diff suppressed because one or more lines are too long
+6
View File
@@ -68,6 +68,12 @@ joy? zip
[[1 2] [0 7] [0 1] [1 19] [1 18] [1 3]]
</code></pre>
<h1>UGH! Pairs are in reverse order! Python vs. our Nice New Definition!</h1>
<pre><code>[[2 1] [7 0] [1 0] [19 1] [18 1] [3 1]]
</code></pre>
<p>See <a href="/notebooks/DeriveZip.html">DeriveZip notebook</a>. Not that it matters
for this application because we are about to multiply these pairs and,
of course, multiplication is <a href="https://en.wikipedia.org/wiki/Commutative">commutative</a>.</p>
<p>Now, for each pair we want to multiply the pairs (using the duality of Booleans as integers to convert the numbers we want to work on to themselves and the numbers we do not want to work on to zero which is the --I don't recall the jargon!-- zero times anything is zero, and zero plus anything is that thing, and we use that in a moment to get around actually filtering our list!) As I was saying we multiply the pairs, then square the result, then sum all the results:</p>
<pre><code>[[1 2] [0 7] [0 1] [1 19] [1 18] [1 3]]